text
stringlengths 5
1.04M
|
|---|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "gtest/gtest.h"
#include "core/common/logging/logging.h"
#include "core/framework/compute_capability.h"
#include "core/framework/execution_provider.h"
#include "core/framework/kernel_registry.h"
#include "core/framework/op_kernel.h"
#include "core/graph/graph_viewer.h"
#include "core/providers/cpu/cpu_execution_provider.h"
#include "core/session/inference_session.h"
#include "core/session/onnxruntime_cxx_api.h"
#include "test/framework/test_utils.h"
#include "test/test_environment.h"
#include <iostream>
#include <dlfcn.h>
#include <string>
#include <dlpack/dlpack.h>
#include "core/graph/onnx_protobuf.h"
#include "core/graph/model.h"
#include <fstream>
#include <tvm/runtime/module.h>
#include <tvm/runtime/c_runtime_api.h>
#include <tvm/driver/jit_interface.h>
#include "Python.h"
namespace {
std::wstring wide_str(const std::string& str)
{
std::wostringstream wstm ;
const std::ctype<wchar_t>& ctfacet = std::use_facet<std::ctype<wchar_t>>(wstm.getloc());
for(size_t i = 0; i < str.size(); ++i)
{
wstm << ctfacet.widen(str[i]);
}
return wstm.str();
}
}
namespace onnxruntime {
static DLDataType GetDataType(ONNXTensorElementDataType type) {
if (type == ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE) {
return {kDLFloat, 64, 1};
} else
ORT_THROW("not implement.");
}
namespace test {
struct TVMFuncState {
AllocateFunc test_allocate_func = nullptr;
DestroyFunc test_release_func = nullptr;
AllocatorHandle allocator = nullptr;
tvm::runtime::Module* module = nullptr;
std::function<tvm::runtime::Module*(std::string func_name, const std::vector<std::vector<int64_t>>& input_shapes)> compiler = nullptr;
};
class TVMExecutionProviderX : public CPUExecutionProvider {
public:
explicit TVMExecutionProviderX(const CPUExecutionProviderInfo& info) : CPUExecutionProvider(info) {
Py_Initialize();
auto pythonpath = std::getenv("PYTHONPATH");
if (pythonpath)
{
PySys_SetPath(wide_str(pythonpath).c_str());
}
py_name_ = PyUnicode_FromString("tvm.relay");
py_module_ = PyImport_Import(py_name_);
PyRun_SimpleString("print(0)\n");
// PyRun_SimpleString("import tvm.relay");
}
~TVMExecutionProviderX() {
Py_DECREF(py_name_);
Py_DECREF(py_module_);
Py_Finalize();
}
std::vector<std::unique_ptr<ComputeCapability>>
GetCapability(const onnxruntime::GraphViewer& graph_viewer,
const std::vector<const KernelRegistry*>& /*kernel_registries*/) const override {
std::vector<std::unique_ptr<ComputeCapability>> result;
if (graph_viewer.IsSubgraph()) {
return result;
}
// Construct modelproto from graph
onnxruntime::Model model(graph_viewer.Name(), true, ModelMetaData(), PathString{}, IOnnxRuntimeOpSchemaRegistryList(), graph_viewer.DomainToVersionMap(), std::vector<ONNX_NAMESPACE::FunctionProto>(), *GetLogger());
onnxruntime::Graph& graph_build = model.MainGraph();
for (const auto& node : graph_viewer.Nodes()) {
std::vector<onnxruntime::NodeArg*> inputs, outputs;
for (auto input : node.InputDefs()) {
auto& n_input = graph_build.GetOrCreateNodeArg(input->Name(), input->TypeAsProto());
inputs.push_back(&n_input);
}
for (auto output : node.OutputDefs()) {
auto& n_output = graph_build.GetOrCreateNodeArg(output->Name(), output->TypeAsProto());
outputs.push_back(&n_output);
}
graph_build.AddNode(node.Name(), node.OpType(), node.Description(), inputs, outputs, &node.GetAttributes(), node.Domain());
}
const auto& init_tensors = graph_viewer.GetAllInitializedTensors();
for (const auto& tensor : init_tensors) {
graph_build.AddInitializedTensor(*(tensor.second));
}
ORT_ENFORCE(graph_build.Resolve().IsOK());
ONNX_NAMESPACE::ModelProto model_proto = model.ToProto();
model_proto.set_ir_version(ONNX_NAMESPACE::Version::IR_VERSION);
auto status = graph_build.Resolve();
std::string onnx_string_buffer;
model_proto.SerializeToString(&onnx_string_buffer);
std::unordered_set<std::string> required_initializers;
const std::vector<NodeIndex>& sorted_nodes = graph_viewer.GetNodesInTopologicalOrder();
std::unique_ptr<IndexedSubGraph> sub_graph = onnxruntime::make_unique<IndexedSubGraph>();
for (auto& node_idx : sorted_nodes) {
graph_viewer.GetNode(node_idx)->ForEachDef([&required_initializers, &init_tensors](const onnxruntime::NodeArg& node_arg, bool is_input) {
if(is_input && init_tensors.count(node_arg.Name())) {
required_initializers.insert(node_arg.Name());
}}, true);
}
auto meta_def = onnxruntime::make_unique<::onnxruntime::IndexedSubGraph::MetaDef>();
meta_def->name = "TVMStandalone";
meta_def->domain = "StandaloneTest";
std::vector<std::string> inputs;
std::vector<std::string> outputs;
for (auto& nodeArgPtr : graph_viewer.GetInputs())
{
inputs.push_back(nodeArgPtr->Name());
}
for (auto& name : required_initializers)
{
inputs.push_back(name);
}
for (auto& nodeArgPtr : graph_viewer.GetOutputs())
{
outputs.push_back(nodeArgPtr->Name());
}
meta_def->inputs = inputs;
meta_def->outputs = outputs;
meta_def->since_version = 1;
meta_def->status = ONNX_NAMESPACE::EXPERIMENTAL;
sub_graph->SetMetaDef(std::move(meta_def));
sub_graph->nodes = sorted_nodes;
result.push_back(
onnxruntime::make_unique<ComputeCapability>(std::move(sub_graph)));
return result;
}
common::Status Compile(const std::vector<onnxruntime::Node*>& nodes,
std::vector<NodeComputeInfo>& node_compute_funcs) override {
for (auto* fused_node : nodes) {
auto func_body = fused_node->GetFunctionBody();
if (!func_body)
return common::Status(common::ONNXRUNTIME, common::INVALID_ARGUMENT, "Function body is empty");
const onnxruntime::Graph& node_graph = func_body->Body();
onnxruntime::Model model(node_graph.Name(), true, ModelMetaData(), PathString(),
IOnnxRuntimeOpSchemaRegistryList(), node_graph. DomainToVersionMap(),
std::vector<ONNX_NAMESPACE::FunctionProto>(), *GetLogger());
ONNX_NAMESPACE::ModelProto model_proto = model.ToProto();
model_proto.set_ir_version(ONNX_NAMESPACE::Version::IR_VERSION);
*(model_proto.mutable_graph()) = node_graph.ToGraphProto();
auto opset = model_proto.add_opset_import();
opset->set_domain(kOnnxDomain);
opset->set_version(node_graph.DomainToVersionMap().at(kOnnxDomain));
std::string string_buf;
model_proto.SerializeToString(&string_buf);
std::fstream dump("/tmp/" + fused_node->Name() + ".onnx", std::ios::out | std::ios::trunc | std::ios::binary);
model_proto.SerializeToOstream(&dump);
const std::string func_name = fused_node->Name();
auto compiler = [this, model_proto, string_buf](std::string func_name, const std::vector<std::vector<int64_t>>& input_shapes) -> tvm::runtime::Module* {
if (modules_.count(func_name))
{
return modules_[func_name].get();
}
void * handle = dlopen("/usr/local/lib/libtvm.so", RTLD_LAZY);
if (!handle)
std::cerr << "Cannot load library: " << dlerror() << '\n';
dlerror();
typedef tvm::runtime::Module compile_entry_t(const std::string&, const std::string&, const std::string&, int, const std::vector<std::vector<int64_t>>&);
compile_entry_t* compile_entry = (compile_entry_t*) dlsym(handle, "TVMCompile");
const char* dlsym_error = dlerror();
if (dlsym_error) {
std::cerr << "Cannot load symbol create: " << dlsym_error << '\n';
}
tvm::runtime::Module mod_f = compile_entry(string_buf, "llvm", "llvm", 3, input_shapes);
auto module_ptr = std::make_shared<tvm::runtime::Module>();
*module_ptr = mod_f;
modules_[func_name] = module_ptr;
dlclose(handle);
return modules_[func_name].get();
};
NodeComputeInfo compute_info;
compute_info.create_state_func = [compiler](ComputeContext* context, FunctionState* state) {
auto* p = new TVMFuncState();
*p = {context->allocate_func, context->release_func, context->allocator_handle, nullptr, compiler};
*state = p;
return 0;
};
compute_info.release_state_func = [](FunctionState state) {
if (state)
delete static_cast<TVMFuncState*>(state);
};
compute_info.compute_func = [func_name](FunctionState state, const OrtCustomOpApi* api, OrtKernelContext* context) {
Ort::CustomOpApi ort{*api};
TVMFuncState* tvm_state = reinterpret_cast<TVMFuncState*>(state);
std::vector<std::vector<int64_t>> input_shapes;
std::vector<std::vector<int64_t>> output_shapes;
DLContext cpu_context = {kDLCPU, 0};
size_t num_inputs = ort.KernelContext_GetInputCount(context);
std::vector<DLTensor> dl_tensors_inputs(num_inputs);
for (auto i = 0u; i < num_inputs; i++) {
const OrtValue* input_tensor = ort.KernelContext_GetInput(context, i);
auto tensor_info = ort.GetTensorTypeAndShape(input_tensor);
auto tensor_type = ort.GetTensorElementType(tensor_info);
input_shapes.emplace_back(ort.GetTensorShape(tensor_info));
ort.ReleaseTensorTypeAndShapeInfo(tensor_info);
dl_tensors_inputs[i].ctx = cpu_context;
dl_tensors_inputs[i].dtype = GetDataType(tensor_type);
dl_tensors_inputs[i].strides = nullptr;
dl_tensors_inputs[i].byte_offset = 0;
dl_tensors_inputs[i].data = const_cast<double*>(ort.GetTensorData<double>(input_tensor));
dl_tensors_inputs[i].ndim = input_shapes.back().size();
dl_tensors_inputs[i].shape = input_shapes.back().data();
}
size_t num_outputs = ort.KernelContext_GetOutputCount(context);
std::vector<DLTensor> dl_tensors_outputs(num_outputs);
for (auto i = 0u; i < num_outputs; i++) {
//setup output tensor property
//todo: type should be set by framework.
output_shapes.push_back(input_shapes[i]);
OrtValue* output_tensor = ort.KernelContext_GetOutput(context, i, output_shapes[i].data(), output_shapes[i].size());
auto tensor_info = ort.GetTensorTypeAndShape(output_tensor);
auto tensor_type = ort.GetTensorElementType(tensor_info);
ort.ReleaseTensorTypeAndShapeInfo(tensor_info);
dl_tensors_outputs[i].ctx = cpu_context;
dl_tensors_outputs[i].dtype = GetDataType(tensor_type);
dl_tensors_outputs[i].strides = nullptr;
dl_tensors_outputs[i].byte_offset = 0;
dl_tensors_outputs[i].data = ort.GetTensorMutableData<double>(output_tensor);
dl_tensors_outputs[i].ndim = output_shapes.back().size();
dl_tensors_outputs[i].shape = output_shapes.back().data();
}
tvm::runtime::Module* mod = tvm_state->compiler(func_name, input_shapes);
void * run_handle = dlopen("/usr/local/lib/libtvm.so", RTLD_LAZY);
if (!run_handle)
std::cerr << "Cannot load library: " << dlerror() << '\n';
typedef void run_entry_t(tvm::runtime::Module&, std::vector<DLTensor>&, std::vector<DLTensor>&, tvm::runtime::TVMRetValue*);
run_entry_t* run_entry = (run_entry_t*) dlsym(run_handle, "TVMRun");
tvm::runtime::TVMRetValue rvalue;
run_entry(*mod, dl_tensors_inputs, dl_tensors_outputs, &rvalue);
return Status::OK();
};
node_compute_funcs.push_back(compute_info);
}
return Status::OK();
}
private:
PyObject *py_name_;
PyObject *py_module_;
std::unordered_map<std::string, std::shared_ptr<tvm::runtime::Module>> modules_;
};
static void RunSession(InferenceSession& session_object,
RunOptions& run_options,
std::vector<int64_t>& dims_x,
std::vector<double>& values_x,
std::vector<int64_t>& dims_y,
std::vector<double>& values_y) {
// prepare inputs
OrtValue ml_value;
CreateMLValue<double>(TestCPUExecutionProvider()->GetAllocator(0, OrtMemTypeDefault), dims_x, values_x, &ml_value);
NameMLValMap feeds;
feeds.insert(std::make_pair("X1", ml_value));
// prepare outputs
std::vector<std::string> output_names;
output_names.push_back("Y4");
std::vector<OrtValue> fetches;
// Now run
common::Status st = session_object.Run(run_options, feeds, output_names, &fetches);
if (!st.IsOK()) {
std::cout << "Run returned status: " << st.ErrorMessage() << std::endl;
}
EXPECT_TRUE(st.IsOK());
ASSERT_EQ(1, fetches.size());
auto& rtensor = fetches.front().Get<Tensor>();
TensorShape expected_shape(dims_y);
EXPECT_EQ(expected_shape, rtensor.Shape());
const std::vector<double> found(rtensor.template Data<double>(), rtensor.template Data<double>() + expected_shape.Size());
ASSERT_EQ(found.size(), values_y.size());
for (size_t i = 0; i < found.size(); i++)
ASSERT_EQ(found[i], values_y[i]);
}
static const std::string MODEL_URI = "testdata/fuse_mul_1.onnx";
TEST(TVMTest, Standalone_tvm) {
SessionOptions so;
so.session_logid = "InferenceSessionTests.NoTimeout";
InferenceSession session_object{so, GetEnvironment()};
CPUExecutionProviderInfo info;
auto tvm_xp = onnxruntime::make_unique<TVMExecutionProviderX>(info);
EXPECT_TRUE(session_object.RegisterExecutionProvider(std::move(tvm_xp)).IsOK());
EXPECT_TRUE(session_object.Load(MODEL_URI).IsOK());
EXPECT_TRUE(session_object.Initialize().IsOK());
RunOptions run_options;
run_options.run_tag = "one session/one tag";
// prepare inputs
std::vector<int64_t> dims_x = {
6,
};
std::vector<double> values_x = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0};
// prepare expected inputs and outputs
std::vector<int64_t> expected_dims_y = {
6,
};
// now the expected value should be Mul's result.
std::vector<double> expected_values_y = {1.0, 32.0, 243.0, 1024.0, 3125.0, 7776.0};
// Now run
RunSession(session_object, run_options, dims_x, values_x, expected_dims_y, expected_values_y);
}
} // namespace test
} // namespace onnxruntime
|
#include <algorithm>
#include <cctype>
#include <deque>
#include <iostream>
#include <string>
using namespace std;
class Solution
{
public:
string decodeString(string s)
{
string result{};
deque<char> stack;
int n=s.size();
for(int i=0;i<n;i++)
{
if(s[i]==']')
{
string betweenBrackets{};
string part{};
//Store the string between the brackets
while(!stack.empty() && stack.back()!='[')
{
betweenBrackets+=stack.back();
stack.pop_back();
}
//pop the opening [ off the stack
if(!stack.empty())
{
stack.pop_back();
}
//number of times to add the string between the brackets to the part string
string kString{};
//pop the number off the stack; since the number could be double digits, use loop
while(!stack.empty() && isdigit(stack.back()))
{
kString+=stack.back();
stack.pop_back();
}
//reverse the string between the brackets and number so that they have the correct values
reverse(betweenBrackets.begin(), betweenBrackets.end());
reverse(kString.begin(), kString.end());
int k=stoi(kString);
//add string between the brackets to part string k times
for(int count=0;count<k;count++)
{
part+=betweenBrackets;
}
//add the part string back onto the stack since it can be inside another set of []
for(int index=0;index<part.size();index++)
{
stack.emplace_back(part[index]);
}
}
else
{
stack.push_back(s[i]);
}
}
//build the answer by iterating through the stack and adding each character to result
while(!stack.empty())
{
result+=stack.front();
stack.pop_front();
}
return result;
}
};
|
/*********************************************************\
* File: SceneHierarchyNode.cpp *
*
* Copyright (C) 2002-2013 The PixelLight Team (http://www.pixellight.org/)
*
* This file is part of PixelLight.
*
* 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.
\*********************************************************/
//[-------------------------------------------------------]
//[ Includes ]
//[-------------------------------------------------------]
#include <PLMath/Plane.h>
#include <PLMath/Intersect.h>
#include <PLRenderer/Renderer/Renderer.h>
#include <PLRenderer/Renderer/DrawHelpers.h>
#include "PLScene/Scene/SceneContainer.h"
#include "PLScene/Scene/SceneHierarchy.h"
#include "PLScene/Scene/SceneHierarchyNodeItem.h"
#include "PLScene/Scene/SceneHierarchyNode.h"
//[-------------------------------------------------------]
//[ Namespace ]
//[-------------------------------------------------------]
using namespace PLCore;
using namespace PLMath;
using namespace PLGraphics;
using namespace PLRenderer;
namespace PLScene {
//[-------------------------------------------------------]
//[ Public functions ]
//[-------------------------------------------------------]
/**
* @brief
* Returns the scene context the scene hierarchy node is in
*/
SceneContext *SceneHierarchyNode::GetSceneContext() const
{
return m_pHierarchy ? m_pHierarchy->GetSceneContainer().GetSceneContext() : nullptr;
}
/**
* @brief
* Returns the owner scene hierarchy
*/
SceneHierarchy *SceneHierarchyNode::GetHierarchy() const
{
return m_pHierarchy;
}
/**
* @brief
* Returns the parent scene hierarchy node
*/
SceneHierarchyNode *SceneHierarchyNode::GetParentNode() const
{
return m_pParentNode;
}
/**
* @brief
* Returns the unique ID of the scene hierarchy node
*/
uint32 SceneHierarchyNode::GetID() const
{
return m_nID;
}
/**
* @brief
* Returns the level/tree depth of the scene hierarchy node
*/
uint8 SceneHierarchyNode::GetLevel() const
{
return m_nLevel;
}
/**
* @brief
* Returns the axis aligned bounding box of the scene hierarchy node
*/
const AABoundingBox &SceneHierarchyNode::GetAABoundingBox() const
{
return m_cAABoundingBox;
}
/**
* @brief
* Checks whether the scene hierarchy node volume is intersecting the given line
*/
bool SceneHierarchyNode::CheckLine(const Line &cLine) const
{
return Intersect::AABoxLine(m_cAABoundingBox.vMin, m_cAABoundingBox.vMax, cLine);
}
/**
* @brief
* Checks whether the scene hierarchy node volume is within the given plane set
*/
bool SceneHierarchyNode::CheckPlaneSet(const PlaneSet &cPlaneSet, uint32 *pnOutClipMask) const
{
return Intersect::PlaneSetAABox(cPlaneSet, m_cAABoundingBox.vMin, m_cAABoundingBox.vMax, pnOutClipMask);
}
/**
* @brief
* Returns the side of the plane the scene hierarchy node volume is on
*/
char SceneHierarchyNode::GetPlaneSide(const Plane &cPlane) const
{
Vector3 vVertex[8];
uint8 nInFront = 0;
uint8 nInBack = 0;
// Check plane side
m_cAABoundingBox.GetVertices(vVertex);
for (uint8 i=0; i<8; i++) {
if (cPlane.GetDistance(vVertex[i]) > 0.0f)
nInFront++;
else
nInBack++;
}
// Return plane side
if (nInFront == 8)
return 1;
else if (nInBack == 8)
return -1;
else
return 0;
}
/**
* @brief
* Returns the shortest distance from a given point to the scene hierarchy node volume
*/
float SceneHierarchyNode::GetShortestDistance(const Vector3 &vPoint) const
{
// Get vector from viewpoint to center of bounding volume
Vector3 vV = m_cAABoundingBox.GetCenter()-vPoint;
// Compute distance from nearest point to viewpoint
vV = m_cAABoundingBox.GetVertex(m_cAABoundingBox.GetNearestVertexIndex(vV))-vPoint;
return vV.GetSquaredLength();
}
/**
* @brief
* Returns the number of scene hierarchy node items
*/
uint32 SceneHierarchyNode::GetNumOfItems() const
{
return m_nNumOfItems;
}
/**
* @brief
* Returns the first scene hierarchy node item
*/
SceneHierarchyNodeItem *SceneHierarchyNode::GetFirstItem() const
{
return m_pFirstItem;
}
//[-------------------------------------------------------]
//[ Protected functions ]
//[-------------------------------------------------------]
/**
* @brief
* Constructor
*/
SceneHierarchyNode::SceneHierarchyNode(SceneHierarchy &cHierarchy) :
m_pHierarchy(&cHierarchy),
m_pParentNode(nullptr),
m_nLevel(0),
m_nNumOfItems(0),
m_pFirstItem(nullptr)
{
// Get an unique ID
m_nID = m_pHierarchy->m_nTotalNumOfNodes;
// Update the total number of scene hierarchy nodes
m_pHierarchy->m_nTotalNumOfNodes++;
}
/**
* @brief
* Destructor
*/
SceneHierarchyNode::~SceneHierarchyNode()
{
// Update the total number of scene hierarchy nodes and free the unique node ID
m_pHierarchy->m_nTotalNumOfNodes--;
// Delete the items
DeleteItems();
}
/**
* @brief
* Returns a free scene hierarchy node
*/
SceneHierarchyNode &SceneHierarchyNode::GetFreeNode()
{
if (m_pHierarchy->m_lstFreeNodes.IsEmpty()) {
// Create a new node
return m_pHierarchy->CreateNode();
} else {
// Get the node and remove it from the list of free nodes
SceneHierarchyNode *pNode = m_pHierarchy->m_lstFreeNodes.Get(0);
m_pHierarchy->m_lstFreeNodes.RemoveAtIndex(0);
// Initialize the variables - just for sure
pNode->Init();
// Return the node
return *pNode;
}
}
/**
* @brief
* Marks a scene hierarchy node as free
*/
void SceneHierarchyNode::FreeNode(SceneHierarchyNode &cNode)
{
m_pHierarchy->m_lstFreeNodes.Add(&cNode);
}
//[-------------------------------------------------------]
//[ Protected virtual SceneHierarchyNode functions ]
//[-------------------------------------------------------]
/**
* @brief
* Initializes the scene hierarchy node variables
*/
void SceneHierarchyNode::Init()
{
// m_pHierarchy = nullptr; // Do not touch!
// m_nID = 0; // Do not touch!
m_nLevel = 0;
// m_cAABoundingBox = ?; // We do not need touch this
m_pParentNode = nullptr;
m_nNumOfItems = 0;
m_pFirstItem = nullptr;
}
//[-------------------------------------------------------]
//[ Private functions ]
//[-------------------------------------------------------]
/**
* @brief
* Adds a scene node to this scene hierarchy node
*/
void SceneHierarchyNode::AddSceneNode(SceneNode &cSceneNode)
{
// Create a new item
SceneHierarchyNodeItem *pItem = new SceneHierarchyNodeItem();
// Link the scene node to this new item
pItem->Link(cSceneNode);
// Attach the new item to this scene hierarchy node
pItem->Attach(*this);
}
/**
* @brief
* Deletes all items attached to this scene hierarchy node
*/
void SceneHierarchyNode::DeleteItems()
{
while (m_pFirstItem) {
SceneHierarchyNodeItem *pItem = m_pFirstItem;
m_pFirstItem = m_pFirstItem->m_pNextSceneHierarchyNodeItem;
delete pItem;
}
m_nNumOfItems = 0;
}
/**
* @brief
* Draws the hierarchy node (for debugging)
*/
void SceneHierarchyNode::Draw(Renderer &cRenderer, const Color4 &cColor, const Matrix4x4 &mWorldViewProjection, float fLineWidth) const
{
// Draw the bounding box of this node
cRenderer.GetDrawHelpers().DrawBox(cColor, m_cAABoundingBox.vMin, m_cAABoundingBox.vMax, mWorldViewProjection, fLineWidth);
// Draw the child nodes
for (uint32 i=0; i<GetNumOfNodes(); i++)
GetNode(i)->Draw(cRenderer, cColor, mWorldViewProjection, fLineWidth);
}
//[-------------------------------------------------------]
//[ Namespace ]
//[-------------------------------------------------------]
} // PLScene
|
#include "kablunkpch.h"
#include "Platform/OpenGL/OpenGLRendererAPI.h"
#include "glad/glad.h"
namespace Kablunk
{
void OpenGLRendererAPI::Init()
{
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //Interpolative blending
//glBlendFunc(GL_ONE, GL_ONE); //Additive blending
//glBlendFunc(GL_DST_COLOR, GL_ZERO); // Multiplicative blending
glEnable(GL_MULTISAMPLE);
glEnable(GL_STENCIL_TEST);
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
}
void OpenGLRendererAPI::SetViewport(uint32_t x, uint32_t y, uint32_t width, uint32_t height)
{
glViewport(x, y, width, height);
}
void OpenGLRendererAPI::SetClearColor(const glm::vec4& color)
{
glClearColor(color.r, color.g, color.b, color.a);
}
void OpenGLRendererAPI::Clear()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
void OpenGLRendererAPI::DrawIndexed(const Ref<VertexArray>& vertexArray, uint32_t indexCount)
{
// turn wireframe on
if (m_draw_wireframe)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
vertexArray->Bind();
uint32_t count = (indexCount) ? indexCount : vertexArray->GetIndexBuffer()->GetCount();
glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_INT, nullptr);
//glBindTexture(GL_TEXTURE_2D, 0);
// normal rendering
if (m_draw_wireframe)
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
}
|
// Distributed under the MIT License.
// See LICENSE.txt for details.
#include "tests/Unit/TestingFramework.hpp"
#include <array>
#include <boost/functional/hash.hpp> // IWYU pragma: keep
#include <cstddef>
#include <functional>
#include <map>
#include <memory>
#include <pup.h>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include "DataStructures/DataBox/DataBox.hpp"
#include "DataStructures/DataBox/DataBoxTag.hpp"
#include "DataStructures/DataVector.hpp"
#include "DataStructures/Tensor/Tensor.hpp"
#include "DataStructures/Variables.hpp"
#include "Domain/CoordinateMaps/Affine.hpp"
#include "Domain/CoordinateMaps/CoordinateMap.hpp"
#include "Domain/CoordinateMaps/ProductMaps.hpp"
#include "Domain/Direction.hpp"
#include "Domain/Element.hpp"
#include "Domain/ElementId.hpp"
#include "Domain/ElementIndex.hpp"
#include "Domain/ElementMap.hpp"
#include "Domain/Mesh.hpp"
#include "Domain/Neighbors.hpp"
#include "Domain/OrientationMap.hpp"
#include "Domain/Tags.hpp"
#include "Evolution/DiscontinuousGalerkin/SlopeLimiters/LimiterActions.hpp" // IWYU pragma: keep
#include "NumericalAlgorithms/LinearOperators/MeanValue.hpp"
#include "NumericalAlgorithms/Spectral/Spectral.hpp"
#include "Utilities/Gsl.hpp"
#include "Utilities/TMPL.hpp"
#include "Utilities/TaggedTuple.hpp"
#include "tests/Unit/ActionTesting.hpp"
// IWYU pragma: no_forward_declare Tensor
namespace {
struct TemporalId : db::SimpleTag {
static std::string name() noexcept { return "TemporalId"; }
using type = int;
};
struct Var : db::SimpleTag {
static std::string name() noexcept { return "Var"; }
using type = Scalar<DataVector>;
};
template <size_t Dim>
struct System {
static constexpr const size_t volume_dim = Dim;
using variables_tag = Tags::Variables<tmpl::list<Var>>;
};
class DummyLimiterForTest {
public:
// Data sent by the limiter to its neighbors
struct PackagedData {
double mean_;
};
using package_argument_tags = tmpl::list<Var, Tags::Mesh<2>>;
void package_data(const gsl::not_null<PackagedData*> packaged_data,
const Scalar<DataVector>& var, const Mesh<2>& mesh) const
noexcept {
packaged_data->mean_ = mean_value(get(var), mesh);
}
using limit_tags = tmpl::list<Var>;
using limit_argument_tags = tmpl::list<Tags::Mesh<2>, Tags::Element<2>>;
void operator()(const gsl::not_null<db::item_type<Var>*> var,
const Mesh<2>& /*mesh*/, const Element<2>& /*element*/,
const std::unordered_map<
std::pair<Direction<2>, ElementId<2>>,
DummyLimiterForTest::PackagedData,
boost::hash<std::pair<Direction<2>, ElementId<2>>>>&
neighbor_packaged_data) const noexcept {
// Zero the data as an easy check that the limiter got called
get(*var) = 0.;
for (const auto& data : neighbor_packaged_data) {
get(*var) += data.second.mean_;
}
}
void pup(const PUP::er& /*p*/) const noexcept {}
};
struct LimiterTag {
using type = DummyLimiterForTest;
};
template <size_t Dim, typename Metavariables>
struct component {
using metavariables = Metavariables;
using chare_type = ActionTesting::MockArrayChare;
using array_index = ElementIndex<Dim>;
using const_global_cache_tag_list = tmpl::list<LimiterTag>;
using action_list =
tmpl::list<SlopeLimiters::Actions::SendData<Metavariables>,
SlopeLimiters::Actions::Limit<Metavariables>>;
using simple_tags =
db::AddSimpleTags<TemporalId, Tags::Mesh<Dim>, Tags::Element<Dim>,
Tags::ElementMap<Dim>, Var>;
using initial_databox = db::compute_databox_type<simple_tags>;
};
template <size_t Dim>
struct Metavariables {
using component_list = tmpl::list<component<Dim, Metavariables>>;
using const_global_cache_tag_list = tmpl::list<>;
using limiter = LimiterTag;
using system = System<Dim>;
using temporal_id = TemporalId;
static constexpr bool local_time_stepping = false;
};
} // namespace
SPECTRE_TEST_CASE("Unit.Evolution.DG.SlopeLimiters.LimiterActions.Generic",
"[Unit][NumericalAlgorithms][Actions]") {
using metavariables = Metavariables<2>;
using my_component = component<2, metavariables>;
using limiter_comm_tag =
SlopeLimiters::Tags::LimiterCommunicationTag<metavariables>;
const Mesh<2> mesh{3, Spectral::Basis::Legendre,
Spectral::Quadrature::GaussLobatto};
// xi Block +- xi
// | 0 | 1 |
// eta -+ +-------+-+-+---+ eta
// | |X| | |
// | +-+-+ |
// | | | | |
// +-------+-+-+---+
// We run the actions on the indicated element. The blocks are square.
const ElementId<2> self_id(1, {{{2, 0}, {1, 0}}});
const ElementId<2> west_id(0);
const ElementId<2> east_id(1, {{{2, 1}, {1, 0}}});
const ElementId<2> south_id(1, {{{2, 0}, {1, 1}}});
// OrientationMap from block 1 to block 0
const OrientationMap<2> block_orientation(
{{Direction<2>::upper_xi(), Direction<2>::upper_eta()}},
{{Direction<2>::lower_eta(), Direction<2>::lower_xi()}});
// Since we're lazy and use the same map for both blocks (the
// actions are only sensitive to the ElementMap, which does differ),
// we need to make the xi and eta maps line up along the block
// interface.
const CoordinateMaps::Affine xi_map{-1., 1., 3., 7.};
const CoordinateMaps::Affine eta_map{-1., 1., 7., 3.};
const auto coordmap =
make_coordinate_map_base<Frame::Logical, Frame::Inertial>(
CoordinateMaps::ProductOf2Maps<CoordinateMaps::Affine,
CoordinateMaps::Affine>(xi_map,
eta_map));
const struct {
std::unordered_map<Direction<2>, Scalar<DataVector>> var;
} test_data{
{{Direction<2>::lower_xi(),
Scalar<DataVector>(mesh.number_of_grid_points(), 5.)},
{Direction<2>::upper_xi(),
Scalar<DataVector>(mesh.number_of_grid_points(), 6.)},
{Direction<2>::upper_eta(),
Scalar<DataVector>(mesh.number_of_grid_points(), 7.)}},
};
auto start_box = [
&self_id, &west_id, &east_id, &south_id, &block_orientation, &coordmap,
&mesh
]() noexcept {
const Element<2> element(
self_id, {{Direction<2>::lower_xi(), {{west_id}, block_orientation}},
{Direction<2>::upper_xi(), {{east_id}, {}}},
{Direction<2>::upper_eta(), {{south_id}, {}}}});
auto map = ElementMap<2, Frame::Inertial>(self_id, coordmap->get_clone());
auto var = Scalar<DataVector>(mesh.number_of_grid_points(), 1234.);
return db::create<db::AddSimpleTags<
TemporalId, Tags::Mesh<2>, Tags::Element<2>, Tags::ElementMap<2>, Var>>(
0, mesh, element, std::move(map), std::move(var));
}
();
const auto create_neighbor_databox = [&mesh, &self_id, &coordmap ](
const ElementId<2>& id, const Direction<2>& direction,
const OrientationMap<2>& orientation,
const Scalar<DataVector>& var) noexcept {
const Element<2> element(id, {{direction, {{self_id}, orientation}}});
auto map = ElementMap<2, Frame::Inertial>(id, coordmap->get_clone());
return db::create<db::AddSimpleTags<
TemporalId, Tags::Mesh<2>, Tags::Element<2>, Tags::ElementMap<2>, Var>>(
0, mesh, element, std::move(map), var);
};
using MockRuntimeSystem = ActionTesting::MockRuntimeSystem<metavariables>;
using MockDistributedObjectsTag =
MockRuntimeSystem::MockDistributedObjectsTag<my_component>;
MockRuntimeSystem::TupleOfMockDistributedObjects dist_objects{};
tuples::get<MockDistributedObjectsTag>(dist_objects)
.emplace(self_id, std::move(start_box));
tuples::get<MockDistributedObjectsTag>(dist_objects)
.emplace(south_id, create_neighbor_databox(
south_id, Direction<2>::lower_eta(), {},
test_data.var.at(Direction<2>::upper_eta())));
tuples::get<MockDistributedObjectsTag>(dist_objects)
.emplace(east_id, create_neighbor_databox(
east_id, Direction<2>::lower_xi(), {},
test_data.var.at(Direction<2>::upper_xi())));
tuples::get<MockDistributedObjectsTag>(dist_objects)
.emplace(west_id, create_neighbor_databox(
west_id, Direction<2>::lower_eta(),
block_orientation.inverse_map(),
test_data.var.at(Direction<2>::lower_xi())));
ActionTesting::MockRuntimeSystem<metavariables> runner{
{DummyLimiterForTest{}}, std::move(dist_objects)};
using initial_databox_type = db::compute_databox_type<db::AddSimpleTags<
TemporalId, Tags::Mesh<2>, Tags::Element<2>, Tags::ElementMap<2>, Var>>;
// Call SendDataForLimiter on self, sending data to neighbors
runner.next_action<my_component>(self_id);
// Here, we just check that messages are sent to the correct places.
// We do not check the contents. We will check the contents of received
// messages on self later
{
CHECK(runner.nonempty_inboxes<my_component, limiter_comm_tag>() ==
std::unordered_set<ElementIndex<2>>{west_id, east_id, south_id});
const auto check_sent_data = [&runner, &self_id ](
const ElementId<2>& id, const Direction<2>& direction) noexcept {
const auto& inboxes = runner.inboxes<my_component>();
const auto& inbox = tuples::get<limiter_comm_tag>(inboxes.at(id));
CHECK(inbox.size() == 1);
CHECK(inbox.count(0) == 1);
const auto& inbox_at_time = inbox.at(0);
CHECK(inbox_at_time.size() == 1);
CHECK(inbox_at_time.count({direction, self_id}) == 1);
};
check_sent_data(west_id, Direction<2>::lower_eta());
check_sent_data(east_id, Direction<2>::lower_xi());
check_sent_data(south_id, Direction<2>::lower_eta());
}
// Now we check ApplyLimiter
CHECK_FALSE(runner.is_ready<my_component>(self_id));
runner.next_action<my_component>(south_id);
CHECK_FALSE(runner.is_ready<my_component>(self_id));
runner.next_action<my_component>(east_id);
CHECK_FALSE(runner.is_ready<my_component>(self_id));
runner.next_action<my_component>(west_id);
CHECK(runner.is_ready<my_component>(self_id));
// ApplyLimiter::is_ready reports true, so here we check that the inbox is
// correctly filled with information from neighbors.
{
const auto check_inbox = [&runner, &self_id ](
const ElementId<2>& id, const Direction<2>& direction,
const double expected_mean_data) noexcept {
CHECK(
tuples::get<limiter_comm_tag>(runner.inboxes<my_component>()[self_id])
.at(0)
.at(std::make_pair(direction, id))
.mean_ == approx(expected_mean_data));
};
check_inbox(west_id, Direction<2>::lower_xi(), 5.);
check_inbox(east_id, Direction<2>::upper_xi(), 6.);
check_inbox(south_id, Direction<2>::upper_eta(), 7.);
}
// Now we run the ApplyLimiter action. We verify the pre- and post-limiting
// state of the variable being limited.
const auto& var_to_limit =
db::get<Var>(runner.algorithms<my_component>()
.at(self_id)
.get_databox<initial_databox_type>());
CHECK_ITERABLE_APPROX(
var_to_limit, Scalar<DataVector>(mesh.number_of_grid_points(), 1234.));
runner.next_action<my_component>(self_id);
// Expected value: 18 = 5 + 6 + 7 from the three neighbors.
CHECK_ITERABLE_APPROX(var_to_limit,
Scalar<DataVector>(mesh.number_of_grid_points(), 18.));
// Check that data for this time (t=0) was deleted from the inbox after the
// limiter call. Note that we only put in t=0 data, so the whole inbox should
// be empty.
CHECK(tuples::get<limiter_comm_tag>(runner.inboxes<my_component>()[self_id])
.empty());
}
SPECTRE_TEST_CASE("Unit.Evolution.DG.SlopeLimiters.LimiterActions.NoNeighbors",
"[Unit][NumericalAlgorithms][Actions]") {
using metavariables = Metavariables<2>;
using my_component = component<2, metavariables>;
using limiter_comm_tag =
SlopeLimiters::Tags::LimiterCommunicationTag<metavariables>;
const Mesh<2> mesh{3, Spectral::Basis::Legendre,
Spectral::Quadrature::GaussLobatto};
const ElementId<2> self_id(1, {{{2, 0}, {1, 0}}});
const Element<2> element(self_id, {});
auto input_var = Scalar<DataVector>(mesh.number_of_grid_points(), 1234.);
const CoordinateMaps::Affine xi_map{-1., 1., 3., 7.};
const CoordinateMaps::Affine eta_map{-1., 1., 7., 3.};
auto map = ElementMap<2, Frame::Inertial>(
self_id, make_coordinate_map_base<Frame::Logical, Frame::Inertial>(
CoordinateMaps::ProductOf2Maps<CoordinateMaps::Affine,
CoordinateMaps::Affine>(
xi_map, eta_map)));
using initial_databox_type = db::compute_databox_type<db::AddSimpleTags<
TemporalId, Tags::Mesh<2>, Tags::Element<2>, Tags::ElementMap<2>, Var>>;
using MockRuntimeSystem = ActionTesting::MockRuntimeSystem<metavariables>;
using MockDistributedObjectsTag =
MockRuntimeSystem::MockDistributedObjectsTag<my_component>;
MockRuntimeSystem::TupleOfMockDistributedObjects dist_objects{};
tuples::get<MockDistributedObjectsTag>(dist_objects)
.emplace(
self_id,
db::create<
db::AddSimpleTags<TemporalId, Tags::Mesh<2>, Tags::Element<2>,
Tags::ElementMap<2>, Var>>(
0, mesh, element, std::move(map), std::move(input_var)));
ActionTesting::MockRuntimeSystem<metavariables> runner{
{DummyLimiterForTest{}}, std::move(dist_objects)};
// Call SendDataForLimiter on self. Except empty inboxes all around.
runner.next_action<my_component>(self_id);
CHECK(runner.nonempty_inboxes<my_component, limiter_comm_tag>().empty());
CHECK(runner.is_ready<my_component>(self_id));
CHECK(tuples::get<limiter_comm_tag>(runner.inboxes<my_component>()[self_id])
.empty());
// Now we run the ApplyLimiter action, checking pre and post values.
const auto& var_to_limit =
db::get<Var>(runner.algorithms<my_component>()
.at(self_id)
.get_databox<initial_databox_type>());
CHECK_ITERABLE_APPROX(
var_to_limit, Scalar<DataVector>(mesh.number_of_grid_points(), 1234.));
runner.next_action<my_component>(self_id);
CHECK_ITERABLE_APPROX(var_to_limit,
Scalar<DataVector>(mesh.number_of_grid_points(), 0.));
}
|
/*
* Copyright 2021 4Paradigm
*
* 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 "client/ns_client.h"
#include <utility>
#include "base/strings.h"
#include "glog/logging.h"
#include "plan/plan_api.h"
DECLARE_int32(request_timeout_ms);
namespace openmldb {
namespace client {
using hybridse::plan::PlanAPI;
NsClient::NsClient(const std::string& endpoint, const std::string& real_endpoint)
: endpoint_(endpoint), client_(endpoint) {
if (!real_endpoint.empty()) {
client_ = ::openmldb::RpcClient<::openmldb::nameserver::NameServer_Stub>(real_endpoint);
}
}
int NsClient::Init() { return client_.Init(); }
std::string NsClient::GetEndpoint() { return endpoint_; }
const std::string& NsClient::GetDb() { return db_; }
void NsClient::ClearDb() { db_.clear(); }
bool NsClient::Use(const std::string& db, std::string& msg) {
::openmldb::nameserver::UseDatabaseRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_db(db);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::UseDatabase, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
db_ = db;
return true;
}
return false;
}
bool NsClient::CreateDatabase(const std::string& db, std::string& msg) {
if (db.empty()) {
return false;
}
::openmldb::nameserver::CreateDatabaseRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_db(db);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::CreateDatabase, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
return ok && response.code() == 0;
}
bool NsClient::ShowDatabase(std::vector<std::string>* dbs, std::string& msg) {
::openmldb::nameserver::GeneralRequest request;
::openmldb::nameserver::ShowDatabaseResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::ShowDatabase, &request, &response,
FLAGS_request_timeout_ms, 1);
for (auto db : response.db()) {
dbs->push_back(db);
}
msg = response.msg();
return ok && response.code() == 0;
}
bool NsClient::DropDatabase(const std::string& db, std::string& msg) {
::openmldb::nameserver::DropDatabaseRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_db(db);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::DropDatabase, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
return ok && response.code() == 0;
}
bool NsClient::ShowTablet(std::vector<TabletInfo>& tablets, std::string& msg) {
::openmldb::nameserver::ShowTabletRequest request;
::openmldb::nameserver::ShowTabletResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::ShowTablet, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
for (int32_t i = 0; i < response.tablets_size(); i++) {
const ::openmldb::nameserver::TabletStatus& status = response.tablets(i);
TabletInfo info;
info.endpoint = status.endpoint();
info.state = status.state();
info.age = status.age();
info.real_endpoint = status.real_endpoint();
tablets.push_back(info);
}
return true;
}
return false;
}
bool NsClient::ShowSdkEndpoint(std::vector<TabletInfo>& tablets, std::string& msg) {
::openmldb::nameserver::ShowSdkEndpointRequest request;
::openmldb::nameserver::ShowSdkEndpointResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::ShowSdkEndpoint, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
for (int32_t i = 0; i < response.tablets_size(); i++) {
const ::openmldb::nameserver::TabletStatus& status = response.tablets(i);
TabletInfo info;
info.endpoint = status.endpoint();
info.real_endpoint = status.real_endpoint();
tablets.push_back(info);
}
return true;
}
return false;
}
bool NsClient::ShowTable(const std::string& name, const std::string& db, bool show_all,
std::vector<::openmldb::nameserver::TableInfo>& tables, std::string& msg) {
::openmldb::nameserver::ShowTableRequest request;
if (!name.empty()) {
request.set_name(name);
}
request.set_db(db);
request.set_show_all(show_all);
::openmldb::nameserver::ShowTableResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::ShowTable, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
for (int32_t i = 0; i < response.table_info_size(); i++) {
::openmldb::nameserver::TableInfo table_info;
table_info.CopyFrom(response.table_info(i));
tables.push_back(table_info);
}
return true;
}
return false;
}
bool NsClient::ShowTable(const std::string& name, std::vector<::openmldb::nameserver::TableInfo>& tables,
std::string& msg) {
return ShowTable(name, GetDb(), false, tables, msg);
}
bool NsClient::ShowAllTable(std::vector<::openmldb::nameserver::TableInfo>& tables, std::string& msg) {
return ShowTable("", "", true, tables, msg);
}
bool NsClient::MakeSnapshot(const std::string& name, uint32_t pid, uint64_t end_offset, std::string& msg) {
return MakeSnapshot(name, GetDb(), pid, end_offset, msg);
}
bool NsClient::MakeSnapshot(const std::string& name, const std::string& db, uint32_t pid, uint64_t end_offset,
std::string& msg) {
::openmldb::nameserver::MakeSnapshotNSRequest request;
request.set_name(name);
request.set_pid(pid);
request.set_offset(end_offset);
request.set_db(db);
::openmldb::nameserver::GeneralResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::MakeSnapshotNS, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::ShowOPStatus(::openmldb::nameserver::ShowOPStatusResponse& response, const std::string& name,
uint32_t pid, std::string& msg) {
::openmldb::nameserver::ShowOPStatusRequest request;
if (!name.empty()) {
request.set_name(name);
request.set_db(GetDb());
}
if (pid != INVALID_PID) {
request.set_pid(pid);
}
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::ShowOPStatus, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::CancelOP(uint64_t op_id, std::string& msg) {
::openmldb::nameserver::CancelOPRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_op_id(op_id);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::CancelOP, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::AddTableField(const std::string& table_name, const ::openmldb::common::ColumnDesc& column_desc,
std::string& msg) {
::openmldb::nameserver::AddTableFieldRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_name(table_name);
request.set_db(GetDb());
::openmldb::common::ColumnDesc* column_desc_ptr = request.mutable_column_desc();
column_desc_ptr->CopyFrom(column_desc);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::AddTableField, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::ExecuteSQL(const std::string& script, std::string& msg) { return ExecuteSQL(GetDb(), script, msg); }
bool NsClient::ExecuteSQL(const std::string& db, const std::string& script, std::string& msg) {
hybridse::node::NodeManager node_manager;
DLOG(INFO) << "start to execute script from dbms:\n" << script;
hybridse::base::Status sql_status;
hybridse::node::PlanNodeList plan_trees;
PlanAPI::CreatePlanTreeFromScript(script, plan_trees, &node_manager, sql_status);
if (plan_trees.empty() || 0 != sql_status.code) {
msg = sql_status.msg;
return false;
}
hybridse::node::PlanNode* node = plan_trees[0];
switch (node->GetType()) {
case hybridse::node::kPlanTypeCmd: {
bool ok = HandleSQLCmd(dynamic_cast<hybridse::node::CmdPlanNode*>(node), db, &sql_status);
if (!ok) {
msg = sql_status.msg;
}
return ok;
}
case hybridse::node::kPlanTypeCreate: {
bool ok = HandleSQLCreateTable(dynamic_cast<hybridse::node::CreatePlanNode*>(node), db, &node_manager,
&sql_status);
if (!ok) {
msg = sql_status.msg;
}
return ok;
}
default: {
msg = "fail to execute script with unsupported type";
return false;
}
}
}
bool NsClient::HandleSQLCmd(const hybridse::node::CmdPlanNode* cmd_node, const std::string& db,
hybridse::base::Status* sql_status) {
switch (cmd_node->GetCmdType()) {
case hybridse::node::kCmdDropTable: {
std::string name = cmd_node->GetArgs()[0];
std::string error;
bool ok = DropTable(db, name, error);
if (ok) {
return true;
} else {
sql_status->msg = error;
return false;
}
}
case hybridse::node::kCmdDropIndex: {
std::string index_name = cmd_node->GetArgs()[0];
std::string table_name = cmd_node->GetArgs()[1];
std::string error;
bool ok = DeleteIndex(db, table_name, index_name, error);
if (ok) {
return true;
} else {
sql_status->msg = error;
return false;
}
}
case hybridse::node::kCmdDropSp: {
std::string sp_name = cmd_node->GetArgs()[0];
std::string error;
bool ok = DropProcedure(db, sp_name, error);
if (ok) {
return true;
} else {
sql_status->msg = error;
return false;
}
}
default: {
sql_status->msg = "fail to execute script with unsupported type";
return false;
}
}
}
bool NsClient::HandleSQLCreateTable(hybridse::node::CreatePlanNode* create, const std::string& db,
hybridse::node::NodeManager* node_manager, hybridse::base::Status* sql_status) {
if (nullptr == create) {
sql_status->msg = "fail to execute plan : create plan null";
return false;
}
::openmldb::nameserver::CreateTableRequest request;
::openmldb::nameserver::GeneralResponse response;
::openmldb::nameserver::TableInfo* table_info = request.mutable_table_info();
table_info->set_db(db);
TransformToTableDef(create, table_info, sql_status);
if (0 != sql_status->code) {
return false;
}
client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::CreateTable, &request, &response,
FLAGS_request_timeout_ms, 1);
sql_status->msg = response.msg();
if (0 != response.code()) {
return false;
}
return true;
}
bool NsClient::CreateProcedure(const ::openmldb::api::ProcedureInfo& sp_info, uint64_t request_timeout,
std::string* msg) {
if (msg == nullptr) return false;
::openmldb::api::CreateProcedureRequest request;
::openmldb::nameserver::GeneralResponse response;
::openmldb::api::ProcedureInfo* sp_info_ptr = request.mutable_sp_info();
sp_info_ptr->CopyFrom(sp_info);
request.set_timeout_ms(request_timeout);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::CreateProcedure, &request, &response,
request_timeout, 1);
*msg = response.msg();
if (!ok || response.code() != 0) {
return false;
}
return true;
}
bool NsClient::CreateTable(const ::openmldb::nameserver::TableInfo& table_info, std::string& msg) {
::openmldb::nameserver::CreateTableRequest request;
::openmldb::nameserver::GeneralResponse response;
::openmldb::nameserver::TableInfo* table_info_r = request.mutable_table_info();
table_info_r->CopyFrom(table_info);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::CreateTable, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::DropTable(const std::string& name, std::string& msg) { return DropTable(GetDb(), name, msg); }
bool NsClient::DropTable(const std::string& db, const std::string& name, std::string& msg) {
::openmldb::nameserver::DropTableRequest request;
request.set_name(name);
request.set_db(db);
::openmldb::nameserver::GeneralResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::DropTable, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::SyncTable(const std::string& name, const std::string& cluster_alias, uint32_t pid, std::string& msg) {
::openmldb::nameserver::SyncTableRequest request;
request.set_name(name);
request.set_cluster_alias(cluster_alias);
if (pid != INVALID_PID) {
request.set_pid(pid);
}
request.set_db(GetDb());
::openmldb::nameserver::GeneralResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::SyncTable, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::SetSdkEndpoint(const std::string& server_name, const std::string& sdk_endpoint, std::string* msg) {
::openmldb::nameserver::SetSdkEndpointRequest request;
request.set_server_name(server_name);
request.set_sdk_endpoint(sdk_endpoint);
::openmldb::nameserver::GeneralResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::SetSdkEndpoint, &request, &response,
FLAGS_request_timeout_ms, 1);
msg->swap(*response.mutable_msg());
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::AddReplica(const std::string& name, const std::set<uint32_t>& pid_set, const std::string& endpoint,
std::string& msg) {
if (pid_set.empty()) {
return false;
}
::openmldb::nameserver::AddReplicaNSRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_name(name);
request.set_pid(*(pid_set.begin()));
request.set_endpoint(endpoint);
request.set_db(GetDb());
if (pid_set.size() > 1) {
for (auto pid : pid_set) {
request.add_pid_group(pid);
}
}
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::AddReplicaNS, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::AddReplicaNS(const std::string& name, const std::vector<std::string>& endpoint_vec, uint32_t pid,
const ::openmldb::nameserver::ZoneInfo& zone_info,
const ::openmldb::api::TaskInfo& task_info) {
if (endpoint_vec.empty()) {
return false;
}
::openmldb::nameserver::AddReplicaNSRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_name(name);
for (auto& endpoint : endpoint_vec) {
request.add_endpoint_group(endpoint);
}
request.set_pid(pid);
request.set_endpoint(endpoint_vec.front());
::openmldb::api::TaskInfo* task_info_p = request.mutable_task_info();
task_info_p->CopyFrom(task_info);
::openmldb::nameserver::ZoneInfo* zone_info_p = request.mutable_zone_info();
zone_info_p->CopyFrom(zone_info);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::AddReplicaNSFromRemote, &request, &response,
FLAGS_request_timeout_ms, 1);
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::DelReplica(const std::string& name, const std::set<uint32_t>& pid_set, const std::string& endpoint,
std::string& msg) {
if (pid_set.empty()) {
return false;
}
::openmldb::nameserver::DelReplicaNSRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_name(name);
request.set_pid(*(pid_set.begin()));
request.set_endpoint(endpoint);
request.set_db(GetDb());
if (pid_set.size() > 1) {
for (auto pid : pid_set) {
request.add_pid_group(pid);
}
}
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::DelReplicaNS, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::ConfSet(const std::string& key, const std::string& value, std::string& msg) {
::openmldb::nameserver::ConfSetRequest request;
::openmldb::nameserver::GeneralResponse response;
::openmldb::nameserver::Pair* conf = request.mutable_conf();
conf->set_key(key);
conf->set_value(value);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::ConfSet, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::ConfGet(const std::string& key, std::map<std::string, std::string>& conf_map, std::string& msg) {
conf_map.clear();
::openmldb::nameserver::ConfGetRequest request;
::openmldb::nameserver::ConfGetResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::ConfGet, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
for (int idx = 0; idx < response.conf_size(); idx++) {
if (key.empty()) {
conf_map.insert(std::make_pair(response.conf(idx).key(), response.conf(idx).value()));
} else if (key == response.conf(idx).key()) {
conf_map.insert(std::make_pair(key, response.conf(idx).value()));
break;
}
}
if (!key.empty() && conf_map.empty()) {
msg = "cannot found key " + key;
return false;
}
return true;
}
return false;
}
bool NsClient::ChangeLeader(const std::string& name, uint32_t pid, std::string& candidate_leader, std::string& msg) {
::openmldb::nameserver::ChangeLeaderRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_name(name);
request.set_pid(pid);
if (!candidate_leader.empty()) {
request.set_candidate_leader(candidate_leader);
}
request.set_db(GetDb());
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::ChangeLeader, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::OfflineEndpoint(const std::string& endpoint, uint32_t concurrency, std::string& msg) {
::openmldb::nameserver::OfflineEndpointRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_endpoint(endpoint);
if (concurrency > 0) {
request.set_concurrency(concurrency);
}
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::OfflineEndpoint, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::Migrate(const std::string& src_endpoint, const std::string& name, const std::set<uint32_t>& pid_set,
const std::string& des_endpoint, std::string& msg) {
::openmldb::nameserver::MigrateRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_src_endpoint(src_endpoint);
request.set_name(name);
request.set_des_endpoint(des_endpoint);
request.set_db(GetDb());
for (auto pid : pid_set) {
request.add_pid(pid);
}
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::Migrate, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::RecoverEndpoint(const std::string& endpoint, bool need_restore, uint32_t concurrency, std::string& msg) {
::openmldb::nameserver::RecoverEndpointRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_endpoint(endpoint);
if (concurrency > 0) {
request.set_concurrency(concurrency);
}
request.set_need_restore(need_restore);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::RecoverEndpoint, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::RecoverTable(const std::string& name, uint32_t pid, const std::string& endpoint, std::string& msg) {
::openmldb::nameserver::RecoverTableRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_name(name);
request.set_pid(pid);
request.set_endpoint(endpoint);
request.set_db(GetDb());
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::RecoverTable, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::ConnectZK(std::string& msg) {
::openmldb::nameserver::ConnectZKRequest request;
::openmldb::nameserver::GeneralResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::ConnectZK, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::DisConnectZK(std::string& msg) {
::openmldb::nameserver::DisConnectZKRequest request;
::openmldb::nameserver::GeneralResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::DisConnectZK, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::SetTablePartition(const std::string& name, const ::openmldb::nameserver::TablePartition& table_partition,
std::string& msg) {
::openmldb::nameserver::SetTablePartitionRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_name(name);
request.set_db(GetDb());
::openmldb::nameserver::TablePartition* cur_table_partition = request.mutable_table_partition();
cur_table_partition->CopyFrom(table_partition);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::SetTablePartition, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::GetTablePartition(const std::string& name, uint32_t pid,
::openmldb::nameserver::TablePartition& table_partition, std::string& msg) {
::openmldb::nameserver::GetTablePartitionRequest request;
::openmldb::nameserver::GetTablePartitionResponse response;
request.set_name(name);
request.set_pid(pid);
request.set_db(GetDb());
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::GetTablePartition, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
table_partition.CopyFrom(response.table_partition());
return true;
}
return false;
}
bool NsClient::UpdateTableAliveStatus(const std::string& endpoint, std::string& name, uint32_t pid, bool is_alive,
std::string& msg) {
::openmldb::nameserver::UpdateTableAliveRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_endpoint(endpoint);
request.set_name(name);
request.set_is_alive(is_alive);
if (pid < UINT32_MAX) {
request.set_pid(pid);
}
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::UpdateTableAliveStatus, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::UpdateTTL(const std::string& name, const ::openmldb::type::TTLType& type, uint64_t abs_ttl,
uint64_t lat_ttl, const std::string& index_name, std::string& msg) {
::openmldb::nameserver::UpdateTTLRequest request;
::openmldb::nameserver::UpdateTTLResponse response;
request.set_name(name);
::openmldb::common::TTLSt* ttl_desc = request.mutable_ttl_desc();
ttl_desc->set_ttl_type(type);
ttl_desc->set_abs_ttl(abs_ttl);
ttl_desc->set_lat_ttl(lat_ttl);
if (!index_name.empty()) {
request.set_index_name(index_name);
}
request.set_db(GetDb());
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::UpdateTTL, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::DeleteOPTask(const std::vector<uint64_t>& op_id_vec) {
::openmldb::api::DeleteTaskRequest request;
::openmldb::api::GeneralResponse response;
for (auto op_id : op_id_vec) {
request.add_op_id(op_id);
}
bool ret = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::DeleteOPTask, &request, &response,
FLAGS_request_timeout_ms, 1);
if (!ret || response.code() != 0) {
return false;
}
return true;
}
bool NsClient::GetTaskStatus(::openmldb::api::TaskStatusResponse& response) {
::openmldb::api::TaskStatusRequest request;
bool ret = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::GetTaskStatus, &request, &response,
FLAGS_request_timeout_ms, 1);
if (!ret || response.code() != 0) {
return false;
}
return true;
}
bool NsClient::LoadTable(const std::string& name, const std::string& endpoint, uint32_t pid,
const ::openmldb::nameserver::ZoneInfo& zone_info,
const ::openmldb::api::TaskInfo& task_info) {
return LoadTable(name, GetDb(), endpoint, pid, zone_info, task_info);
}
bool NsClient::LoadTable(const std::string& name, const std::string& db, const std::string& endpoint, uint32_t pid,
const ::openmldb::nameserver::ZoneInfo& zone_info,
const ::openmldb::api::TaskInfo& task_info) {
::openmldb::nameserver::LoadTableRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_name(name);
request.set_endpoint(endpoint);
request.set_pid(pid);
request.set_db(db);
::openmldb::api::TaskInfo* task_info_p = request.mutable_task_info();
task_info_p->CopyFrom(task_info);
::openmldb::nameserver::ZoneInfo* zone_info_p = request.mutable_zone_info();
zone_info_p->CopyFrom(zone_info);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::LoadTable, &request, &response,
FLAGS_request_timeout_ms, 3);
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::CreateRemoteTableInfo(const ::openmldb::nameserver::ZoneInfo& zone_info,
::openmldb::nameserver::TableInfo& table_info, std::string& msg) {
::openmldb::nameserver::CreateTableInfoRequest request;
::openmldb::nameserver::CreateTableInfoResponse response;
::openmldb::nameserver::ZoneInfo* zone_info_p = request.mutable_zone_info();
zone_info_p->CopyFrom(zone_info);
::openmldb::nameserver::TableInfo* table_info_p = request.mutable_table_info();
table_info_p->CopyFrom(table_info);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::CreateTableInfo, &request, &response,
FLAGS_request_timeout_ms, 3);
msg = response.msg();
table_info = response.table_info();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::CreateRemoteTableInfoSimply(const ::openmldb::nameserver::ZoneInfo& zone_info,
::openmldb::nameserver::TableInfo& table_info, std::string& msg) {
::openmldb::nameserver::CreateTableInfoRequest request;
::openmldb::nameserver::CreateTableInfoResponse response;
::openmldb::nameserver::ZoneInfo* zone_info_p = request.mutable_zone_info();
zone_info_p->CopyFrom(zone_info);
::openmldb::nameserver::TableInfo* table_info_p = request.mutable_table_info();
table_info_p->CopyFrom(table_info);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::CreateTableInfoSimply, &request, &response,
FLAGS_request_timeout_ms, 3);
msg = response.msg();
table_info = response.table_info();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::DropTableRemote(const ::openmldb::api::TaskInfo& task_info, const std::string& name,
const std::string& db, const ::openmldb::nameserver::ZoneInfo& zone_info,
std::string& msg) {
::openmldb::nameserver::DropTableRequest request;
::openmldb::nameserver::GeneralResponse response;
::openmldb::api::TaskInfo* task_info_p = request.mutable_task_info();
task_info_p->CopyFrom(task_info);
::openmldb::nameserver::ZoneInfo* zone_info_p = request.mutable_zone_info();
zone_info_p->CopyFrom(zone_info);
request.set_name(name);
request.set_db(db);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::DropTable, &request, &response,
FLAGS_request_timeout_ms, 3);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::CreateTableRemote(const ::openmldb::api::TaskInfo& task_info,
const ::openmldb::nameserver::TableInfo& table_info,
const ::openmldb::nameserver::ZoneInfo& zone_info, std::string& msg) {
::openmldb::nameserver::CreateTableRequest request;
::openmldb::nameserver::GeneralResponse response;
::openmldb::api::TaskInfo* task_info_p = request.mutable_task_info();
task_info_p->CopyFrom(task_info);
::openmldb::nameserver::ZoneInfo* zone_info_p = request.mutable_zone_info();
zone_info_p->CopyFrom(zone_info);
::openmldb::nameserver::TableInfo* table_info_p;
table_info_p = request.mutable_table_info();
table_info_p->CopyFrom(table_info);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::CreateTable, &request, &response,
FLAGS_request_timeout_ms, 3);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::AddReplicaClusterByNs(const std::string& alias, const std::string& name, const uint64_t term,
std::string& msg) {
::openmldb::nameserver::ReplicaClusterByNsRequest request;
::openmldb::nameserver::ZoneInfo* zone_info = request.mutable_zone_info();
::openmldb::nameserver::AddReplicaClusterByNsResponse response;
zone_info->set_replica_alias(alias);
zone_info->set_zone_name(name);
zone_info->set_zone_term(term);
zone_info->set_mode(::openmldb::nameserver::kFOLLOWER);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::AddReplicaClusterByNs, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && ((response.code() == 0) || (response.code() == 408))) {
return true;
}
return false;
}
bool NsClient::AddReplicaCluster(const std::string& zk_ep, const std::string& zk_path, const std::string& alias,
std::string& msg) {
::openmldb::nameserver::ClusterAddress request;
::openmldb::nameserver::GeneralResponse response;
if (zk_ep.empty() || zk_path.empty() || alias.empty()) {
msg = "zookeeper endpoints or zk_path or alias is null";
return false;
}
request.set_alias(alias);
request.set_zk_path(zk_path);
request.set_zk_endpoints(zk_ep);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::AddReplicaCluster, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && (response.code() == 0)) {
return true;
}
return false;
}
bool NsClient::ShowReplicaCluster(std::vector<::openmldb::nameserver::ClusterAddAge>& clusterinfo, std::string& msg) {
clusterinfo.clear();
::openmldb::nameserver::GeneralRequest request;
::openmldb::nameserver::ShowReplicaClusterResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::ShowReplicaCluster, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && (response.code() == 0)) {
for (int32_t i = 0; i < response.replicas_size(); i++) {
const auto& status = response.replicas(i);
clusterinfo.push_back(status);
}
return true;
}
return false;
}
bool NsClient::RemoveReplicaCluster(const std::string& alias, std::string& msg) {
::openmldb::nameserver::RemoveReplicaOfRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_alias(alias);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::RemoveReplicaCluster, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::RemoveReplicaClusterByNs(const std::string& alias, const std::string& zone_name, const uint64_t term,
int& code, std::string& msg) {
::openmldb::nameserver::ReplicaClusterByNsRequest request;
::openmldb::nameserver::ZoneInfo* zone_info = request.mutable_zone_info();
::openmldb::nameserver::GeneralResponse response;
zone_info->set_replica_alias(alias);
zone_info->set_zone_term(term);
zone_info->set_zone_name(zone_name);
zone_info->set_mode(::openmldb::nameserver::kNORMAL);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::RemoveReplicaClusterByNs, &request,
&response, FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::SwitchMode(const ::openmldb::nameserver::ServerMode& mode, std::string& msg) {
::openmldb::nameserver::SwitchModeRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_sm(mode);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::SwitchMode, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::AddIndex(const std::string& table_name, const ::openmldb::common::ColumnKey& column_key,
std::vector<openmldb::common::ColumnDesc>* cols, std::string& msg) {
::openmldb::nameserver::AddIndexRequest request;
::openmldb::nameserver::GeneralResponse response;
::openmldb::common::ColumnKey* cur_column_key = request.mutable_column_key();
request.set_name(table_name);
cur_column_key->CopyFrom(column_key);
request.set_db(GetDb());
if (cols != nullptr) {
for (const auto& col : *cols) {
openmldb::common::ColumnDesc* new_col = request.add_cols();
new_col->CopyFrom(col);
}
}
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::AddIndex, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::DeleteIndex(const std::string& db, const std::string& table_name, const std::string& idx_name,
std::string& msg) {
::openmldb::nameserver::DeleteIndexRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_table_name(table_name);
request.set_idx_name(idx_name);
request.set_db_name(db);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::DeleteIndex, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
int code = response.code();
return ok && code == 0;
}
bool NsClient::DeleteIndex(const std::string& table_name, const std::string& idx_name, std::string& msg) {
return DeleteIndex(GetDb(), table_name, idx_name, msg);
}
bool NsClient::ShowCatalogVersion(std::map<std::string, uint64_t>* version_map, std::string* msg) {
if (version_map == nullptr || msg == nullptr) {
return false;
}
version_map->clear();
::openmldb::nameserver::ShowCatalogRequest request;
::openmldb::nameserver::ShowCatalogResponse response;
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::ShowCatalog, &request, &response,
FLAGS_request_timeout_ms, 1);
int code = response.code();
if (ok && code == 0) {
for (const auto& catalog_info : response.catalog()) {
version_map->emplace(catalog_info.endpoint(), catalog_info.version());
}
return true;
}
*msg = response.msg();
return false;
}
bool NsClient::TransformToTableDef(::hybridse::node::CreatePlanNode* create_node,
::openmldb::nameserver::TableInfo* table, hybridse::plan::Status* status) {
if (create_node == NULL || table == NULL || status == NULL) return false;
std::string table_name = create_node->GetTableName();
const hybridse::node::NodePointVector& column_desc_list = create_node->GetColumnDescList();
const hybridse::node::NodePointVector& distribution_list = create_node->GetDistributionList();
std::set<std::string> index_names;
std::map<std::string, ::openmldb::common::ColumnDesc*> column_names;
table->set_name(table_name);
// todo: change default setting
int replica_num = create_node->GetReplicaNum();
if (replica_num <= 0) {
status->msg = "CREATE common: replica_num should be bigger than 0";
status->code = hybridse::common::kSqlError;
return false;
}
table->set_replica_num(static_cast<uint32_t>(replica_num));
int partition_num = create_node->GetPartitionNum();
if (partition_num <= 0) {
status->msg = "CREATE common: partition_num should be greater than 0";
status->code = hybridse::common::kSqlError;
return false;
}
table->set_partition_num(create_node->GetPartitionNum());
table->set_format_version(1);
int no_ts_cnt = 0;
for (auto column_desc : column_desc_list) {
switch (column_desc->GetType()) {
case hybridse::node::kColumnDesc: {
auto* column_def = (hybridse::node::ColumnDefNode*)column_desc;
::openmldb::common::ColumnDesc* column_desc = table->add_column_desc();
if (column_names.find(column_desc->name()) != column_names.end()) {
status->msg = "CREATE common: COLUMN NAME " + column_def->GetColumnName() + " duplicate";
status->code = hybridse::common::kSqlError;
return false;
}
column_desc->set_name(column_def->GetColumnName());
column_desc->set_not_null(column_def->GetIsNotNull());
column_names.insert(std::make_pair(column_def->GetColumnName(), column_desc));
switch (column_def->GetColumnType()) {
case hybridse::node::kBool:
column_desc->set_data_type(openmldb::type::DataType::kBool);
break;
case hybridse::node::kInt16:
column_desc->set_data_type(openmldb::type::DataType::kSmallInt);
break;
case hybridse::node::kInt32:
column_desc->set_data_type(openmldb::type::DataType::kInt);
break;
case hybridse::node::kInt64:
column_desc->set_data_type(openmldb::type::DataType::kBigInt);
break;
case hybridse::node::kFloat:
column_desc->set_data_type(openmldb::type::DataType::kFloat);
break;
case hybridse::node::kDouble:
column_desc->set_data_type(openmldb::type::DataType::kDouble);
break;
case hybridse::node::kTimestamp:
column_desc->set_data_type(openmldb::type::DataType::kTimestamp);
break;
case hybridse::node::kVarchar:
column_desc->set_data_type(openmldb::type::DataType::kVarchar);
break;
case hybridse::node::kDate:
column_desc->set_data_type(openmldb::type::DataType::kDate);
break;
default: {
status->msg = "CREATE common: column type " +
hybridse::node::DataTypeName(column_def->GetColumnType()) + " is not supported";
status->code = hybridse::common::kSqlError;
return false;
}
}
break;
}
case hybridse::node::kColumnIndex: {
auto* column_index = (hybridse::node::ColumnIndexNode*)column_desc;
std::string index_name = column_index->GetName();
if (index_name.empty()) {
index_name = PlanAPI::GenerateName("INDEX", table->column_key_size());
column_index->SetName(index_name);
}
if (index_names.find(index_name) != index_names.end()) {
status->msg = "CREATE common: INDEX NAME " + index_name + " duplicate";
status->code = hybridse::common::kSqlError;
return false;
}
index_names.insert(index_name);
::openmldb::common::ColumnKey* index = table->add_column_key();
index->set_index_name(index_name);
if (column_index->GetKey().empty()) {
status->msg = "CREATE common: INDEX KEY empty";
status->code = hybridse::common::kSqlError;
return false;
}
for (const auto& key : column_index->GetKey()) {
auto cit = column_names.find(key);
if (cit == column_names.end()) {
status->msg = "column " + key + " does not exist";
status->code = hybridse::common::kSqlError;
return false;
}
index->add_col_name(key);
}
::openmldb::common::TTLSt* ttl_st = index->mutable_ttl();
if (!column_index->ttl_type().empty()) {
std::string ttl_type = column_index->ttl_type();
std::transform(ttl_type.begin(), ttl_type.end(), ttl_type.begin(), ::tolower);
openmldb::type::TTLType type;
if (!TTLTypeParse(ttl_type, &type)) {
status->msg = "CREATE common: ttl_type " + column_index->ttl_type() + " not support";
status->code = hybridse::common::kSqlError;
return false;
}
ttl_st->set_ttl_type(type);
} else {
ttl_st->set_ttl_type(openmldb::type::kAbsoluteTime);
}
if (ttl_st->ttl_type() == openmldb::type::kAbsoluteTime) {
if (column_index->GetAbsTTL() == -1 || column_index->GetLatTTL() != -2) {
status->msg = "CREATE common: abs ttl format error";
status->code = hybridse::common::kSqlError;
return false;
}
if (column_index->GetAbsTTL() == -2) {
ttl_st->set_abs_ttl(0);
} else {
ttl_st->set_abs_ttl(column_index->GetAbsTTL() / 60000);
}
} else if (ttl_st->ttl_type() == openmldb::type::kLatestTime) {
if (column_index->GetLatTTL() == -1 || column_index->GetAbsTTL() != -2) {
status->msg = "CREATE common: lat ttl format error";
status->code = hybridse::common::kSqlError;
return false;
}
if (column_index->GetLatTTL() == -2) {
ttl_st->set_lat_ttl(0);
} else {
ttl_st->set_lat_ttl(column_index->GetLatTTL());
}
} else {
if (column_index->GetAbsTTL() == -1) {
status->msg = "CREATE common: abs ttl format error";
status->code = hybridse::common::kSqlError;
return false;
}
if (column_index->GetAbsTTL() == -2) {
ttl_st->set_abs_ttl(0);
} else {
ttl_st->set_abs_ttl(column_index->GetAbsTTL() / 60000);
}
if (column_index->GetLatTTL() == -1) {
status->msg = "CREATE common: lat ttl format error";
status->code = hybridse::common::kSqlError;
return false;
}
if (column_index->GetLatTTL() == -2) {
ttl_st->set_lat_ttl(0);
} else {
ttl_st->set_lat_ttl(column_index->GetLatTTL());
}
}
if (!column_index->GetTs().empty()) {
index->set_ts_name(column_index->GetTs());
auto it = column_names.find(column_index->GetTs());
if (it == column_names.end()) {
status->msg = "CREATE common: TS NAME " + column_index->GetTs() + " not exists";
status->code = hybridse::common::kSqlError;
return false;
}
} else {
no_ts_cnt++;
}
break;
}
default: {
status->msg = "can not support " + hybridse::node::NameOfSqlNodeType(column_desc->GetType()) +
" when CREATE TABLE";
status->code = hybridse::common::kSqlError;
return false;
}
}
}
if (no_ts_cnt > 0 && no_ts_cnt != table->column_key_size()) {
status->msg = "CREATE common: need to set ts col";
status->code = hybridse::common::kSqlError;
return false;
}
if (!distribution_list.empty()) {
if (replica_num != static_cast<int32_t>(distribution_list.size())) {
status->msg =
"CREATE common: "
"replica_num should equal to partition meta size";
status->code = hybridse::common::kSqlError;
return false;
}
::openmldb::nameserver::TablePartition* table_partition = table->add_table_partition();
table_partition->set_pid(0);
std::vector<std::string> ep_vec;
for (auto partition_meta : distribution_list) {
switch (partition_meta->GetType()) {
case hybridse::node::kPartitionMeta: {
auto* p_meta_node = (hybridse::node::PartitionMetaNode*)partition_meta;
const std::string& ep = p_meta_node->GetEndpoint();
if (std::find(ep_vec.begin(), ep_vec.end(), ep) != ep_vec.end()) {
status->msg =
"CREATE common: "
"partition meta endpoint duplicate";
status->code = hybridse::common::kSqlError;
return false;
}
ep_vec.push_back(ep);
::openmldb::nameserver::PartitionMeta* meta = table_partition->add_partition_meta();
meta->set_endpoint(ep);
if (p_meta_node->GetRoleType() == hybridse::node::kLeader) {
meta->set_is_leader(true);
} else if (p_meta_node->GetRoleType() == hybridse::node::kFollower) {
meta->set_is_leader(false);
} else {
status->msg = "CREATE common: role_type " +
hybridse::node::RoleTypeName(p_meta_node->GetRoleType()) + " not support";
status->code = hybridse::common::kSqlError;
return false;
}
break;
}
default: {
status->msg = "can not support " + hybridse::node::NameOfSqlNodeType(partition_meta->GetType()) +
" when CREATE TABLE 2";
status->code = hybridse::common::kSqlError;
return false;
}
}
}
}
return true;
}
bool NsClient::DropProcedure(const std::string& db_name, const std::string& sp_name, std::string& msg) {
::openmldb::api::DropProcedureRequest request;
::openmldb::nameserver::GeneralResponse response;
request.set_db_name(db_name);
request.set_sp_name(sp_name);
bool ok = client_.SendRequest(&::openmldb::nameserver::NameServer_Stub::DropProcedure, &request, &response,
FLAGS_request_timeout_ms, 1);
msg = response.msg();
if (ok && response.code() == 0) {
return true;
}
return false;
}
bool NsClient::TTLTypeParse(const std::string& type_str, ::openmldb::type::TTLType* type) {
if (type_str == "absolute") {
*type = openmldb::type::kAbsoluteTime;
} else if (type_str == "latest") {
*type = openmldb::type::kLatestTime;
} else if (type_str == "absorlat") {
*type = openmldb::type::kAbsOrLat;
} else if (type_str == "absandlat") {
*type = openmldb::type::kAbsAndLat;
} else {
return false;
}
return true;
}
} // namespace client
} // namespace openmldb
|
// Copyright (C) 2017 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library 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 library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
// { dg-do compile { target c++11 } }
#include <unordered_map>
struct MoveOnly {
MoveOnly(int) { }
MoveOnly(MoveOnly&&) = default;
};
void
test01()
{
std::unordered_multimap<int, MoveOnly> m;
m.insert({1, 2}); // PR libstdc++/82522 - LWG 2354
}
void
test02()
{
std::unordered_multimap<int, MoveOnly> m;
m.insert(m.begin(), {1, 2}); // PR libstdc++/82522 - LWG 2354
}
|
#include <Nazara/Core/MovablePtr.hpp>
#include <Nazara/Core/StackVector.hpp>
#include <Catch/catch.hpp>
#include <array>
#include <numeric>
// This is a quick way to check that checks are valid
#define USE_STD_VECTOR 0
class DestructionCounter
{
public:
DestructionCounter() :
m_counter(nullptr),
m_value(0)
{
}
DestructionCounter(std::size_t* counter, int value) :
m_counter(counter),
m_value(value)
{
if (m_counter)
(*m_counter)++;
}
DestructionCounter(const DestructionCounter& counter) :
m_counter(counter.m_counter),
m_value(counter.m_value)
{
if (m_counter)
(*m_counter)++;
}
DestructionCounter(DestructionCounter&& counter) :
m_counter(counter.m_counter),
m_value(counter.m_value)
{
if (m_counter)
(*m_counter)++;
}
~DestructionCounter()
{
if (m_counter)
{
assert(*m_counter > 0);
(*m_counter)--;
}
}
operator int() const
{
return m_value;
}
DestructionCounter& operator=(const DestructionCounter& counter)
{
if (m_counter)
{
assert(*m_counter > 0);
(*m_counter)--;
}
m_counter = counter.m_counter;
m_value = counter.m_value;
if (m_counter)
(*m_counter)++;
return *this;
}
DestructionCounter& operator=(DestructionCounter&& counter)
{
if (this == &counter)
return *this;
if (m_counter)
{
assert(*m_counter > 0);
(*m_counter)--;
}
m_counter = counter.m_counter;
m_value = counter.m_value;
if (m_counter)
(*m_counter)++;
return *this;
}
private:
std::size_t* m_counter;
int m_value;
};
SCENARIO("StackVector", "[CORE][STACKVECTOR]")
{
GIVEN("A StackVector to contain multiple int")
{
std::size_t counter = 0;
{
volatile std::size_t capacity = 50;
#if USE_STD_VECTOR
std::vector<DestructionCounter> vector;
vector.reserve(capacity);
#else
Nz::StackVector<DestructionCounter> vector = NazaraStackVector(DestructionCounter, capacity);
#endif
WHEN("At construction, the vector is empty but has capacity")
{
CHECK(vector.capacity() == capacity);
CHECK(vector.empty());
CHECK(vector.size() == 0);
#if !USE_STD_VECTOR
CHECK(vector.max_size() == capacity);
#endif
}
WHEN("Resizing it changes its size and create/destroy elements")
{
vector.resize(vector.capacity());
CHECK(vector.size() == vector.capacity());
CHECK(counter == 0);
vector.resize(0);
CHECK(vector.empty());
CHECK(vector.size() == 0);
CHECK(counter == 0);
}
WHEN("Resizing it allocates elements")
{
vector.resize(vector.capacity(), DestructionCounter(&counter, 0));
CHECK(vector.size() == vector.capacity());
CHECK(counter == capacity);
vector.resize(0);
CHECK(vector.empty());
CHECK(vector.size() == 0);
CHECK(counter == 0);
}
WHEN("Emplacing five elements, vector size increase accordingly")
{
for (std::size_t i = 0; i < 5; ++i)
{
#if USE_STD_VECTOR
vector.emplace_back(&counter, int(i));
#else
CHECK(vector.emplace_back(&counter, int(i)) == int(i));
#endif
}
CHECK(!vector.empty());
CHECK(vector.size() == 5);
std::array<int, 5> expectedValues = { 0, 1, 2, 3, 4 };
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
WHEN("Pushing three elements, vector size increase accordingly")
{
for (std::size_t i = 0; i < 3; ++i)
{
DestructionCounter val(&counter, int(i));
#if USE_STD_VECTOR
vector.push_back(val);
#else
CHECK(vector.push_back(val) == val);
#endif
}
CHECK(!vector.empty());
CHECK(vector.size() == 3);
{
std::array<int, 3> expectedValues = { 0, 1, 2 };
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
THEN("We resize to five")
{
vector.resize(5);
CHECK(!vector.empty());
CHECK(vector.size() == 5);
std::array<int, 5> expectedValues = { 0, 1, 2, 0, 0 };
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
AND_THEN("We resize it back to zero")
{
vector.resize(0);
CHECK(vector.empty());
CHECK(vector.size() == 0);
}
AND_THEN("We clear it")
{
vector.clear();
CHECK(vector.empty());
CHECK(vector.size() == 0);
CHECK(counter == 0);
}
}
}
WHEN("We generate its content will iota")
{
vector.resize(10);
for (std::size_t i = 0; i < vector.size(); ++i)
vector[i] = DestructionCounter(&counter, -5 + int(i));
{
std::array<int, 10> expectedValues = { -5, -4, -3, -2, -1, 0, 1, 2, 3, 4 };
CHECK(vector.size() == expectedValues.size());
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
AND_WHEN("We pop back some elements")
{
for (std::size_t i = 0; i < 5; ++i)
vector.pop_back();
std::array<int, 5> expectedValues = { -5, -4, -3, -2, -1 };
CHECK(vector.size() == expectedValues.size());
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
AND_WHEN("We erase elements at the beginning")
{
vector.erase(vector.begin());
vector.erase(vector.begin());
std::array<int, 8> expectedValues = { -3, -2, -1, 0, 1, 2, 3, 4 };
CHECK(vector.size() == expectedValues.size());
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
AND_WHEN("We erase elements in the middle")
{
vector.erase(vector.begin() + 2);
vector.erase(vector.begin() + 2);
vector.erase(vector.begin() + 6);
std::array<int, 7> expectedValues = { -5, -4, -1, 0, 1, 2, 4 };
CHECK(vector.size() == expectedValues.size());
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
AND_WHEN("We erase elements at the end")
{
vector.erase(vector.end() - 1);
vector.erase(vector.end() - 1);
std::array<int, 8> expectedValues = { -5, -4, -3, -2, -1, 0, 1, 2 };
CHECK(vector.size() == expectedValues.size());
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
AND_WHEN("We erase a range")
{
vector.erase(vector.begin() + 2, vector.end() - 3);
std::array<int, 5> expectedValues = { -5, -4, 2, 3, 4 };
CHECK(vector.size() == expectedValues.size());
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
AND_WHEN("We erase everything")
{
vector.erase(vector.begin(), vector.end());
CHECK(vector.empty());
}
}
WHEN("We generate its content using emplace")
{
for (std::size_t i = 0; i < 5; ++i)
CHECK(*vector.emplace(vector.end(), &counter, int(i)) == int(i));
CHECK(!vector.empty());
CHECK(vector.size() == 5);
std::array<int, 5> expectedValues = { 0, 1, 2, 3, 4 };
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
WHEN("We generate its content using emplace, in reverse order")
{
for (std::size_t i = 0; i < 5; ++i)
CHECK(*vector.emplace(vector.begin(), &counter, int(i)) == int(i));
CHECK(!vector.empty());
CHECK(vector.size() == 5);
std::array<int, 5> expectedValues = { 4, 3, 2, 1, 0 };
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
WHEN("We generate its content using emplace, at the middle")
{
for (std::size_t i = 0; i < 10; ++i)
CHECK(*vector.emplace(vector.begin() + i / 2, &counter, int(i)) == int(i));
CHECK(!vector.empty());
CHECK(vector.size() == 10);
std::array<int, 10> expectedValues = { 1, 3, 5, 7, 9, 8, 6, 4, 2, 0 };
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
WHEN("We generate its content using insert")
{
for (std::size_t i = 0; i < 5; ++i)
CHECK(*vector.insert(vector.end(), DestructionCounter(&counter, int(i))) == int(i));
CHECK(!vector.empty());
CHECK(vector.size() == 5);
std::array<int, 5> expectedValues = { 0, 1, 2, 3, 4 };
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
WHEN("We generate its content using insert, in reverse order")
{
for (std::size_t i = 0; i < 5; ++i)
CHECK(*vector.insert(vector.begin(), DestructionCounter(&counter, int(i))) == int(i));
CHECK(!vector.empty());
CHECK(vector.size() == 5);
std::array<int, 5> expectedValues = { 4, 3, 2, 1, 0 };
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
WHEN("We generate its content using insert, at the middle")
{
for (std::size_t i = 0; i < 10; ++i)
CHECK(*vector.insert(vector.begin() + i / 2, DestructionCounter(&counter, int(i))) == int(i));
CHECK(!vector.empty());
CHECK(vector.size() == 10);
std::array<int, 10> expectedValues = { 1, 3, 5, 7, 9, 8, 6, 4, 2, 0 };
CHECK(std::equal(vector.begin(), vector.end(), expectedValues.begin(), expectedValues.end()));
}
}
CHECK(counter == 0);
}
}
|
/*
* The Arithmetic / Logic Unit
* ===========================
*
* This contains all the code needed for storing variables, parsing expressions,
* and evaluating expressions. These are needed to implement the PRINT and SET
* directives of specs.
*/
#include <sstream>
#include <cmath>
#include <stack>
#include <algorithm>
#include <iomanip>
#include "ErrorReporting.h"
#include "alu.h"
#include "aluFunctions.h"
#include "processing/Config.h" // for configured literals
extern stateQueryAgent* g_pStateQueryAgent;
void ALUValue::set(std::string& s)
{
m_value = s;
m_type = counterType__Str;
}
void ALUValue::set(const std::string& s)
{
m_value = s;
m_type = counterType__Str;
}
void ALUValue::set(const char* st)
{
std::string s(st);
set(s);
}
void ALUValue::set(ALUInt l)
{
m_value = std::to_string(l);
m_type = counterType__Int;
}
void ALUValue::set(ALUFloat f)
{
if (std::isnan(f)) {
m_type = counterType__None; /* NaN */
return;
}
std::ostringstream ost;
ost.precision(ALUFloatPrecision);
ost << f;
m_value = ost.str();
m_type = counterType__Float;
}
void ALUValue::set()
{
m_type = counterType__None;
}
ALUInt ALUValue::getInt() const
{
try {
switch (m_type) {
case counterType__None:
return 0;
case counterType__Int:
break;
case counterType__Float:
return ALUInt(std::stold(m_value));
default:
if (counterType__Float == getDivinedType()) {
return ALUInt(std::stold(m_value));
}
}
return std::stoll(m_value);
} catch (std::invalid_argument& e) {
return 0;
} catch (std::out_of_range& e) {
std::string err = "Out of range trying to convert " + m_value + " to Int";
MYTHROW(err);
}
}
ALUInt ALUValue::getHex() const
{
try {
return (counterType__None==m_type) ? 0 : std::stoll(m_value, NULL, 16);
} catch (std::invalid_argument& e) {
return 0;
}
}
ALUFloat ALUValue::getFloat() const
{
try {
return (counterType__None==m_type) ? 0.0 : std::stold(m_value);
} catch (std::invalid_argument& e) {
return 0;
}
}
bool ALUValue::getBool() const
{
return (counterType__None!=m_type && m_value!="" && m_value!="0" && m_value!="0.0");
}
bool ALUValue::isWholeNumber() const
{
if (!isNumeric()) return false;
ALUFloat f = getFloat();
return (f==std::floor(f));
}
bool ALUValue::isFloat() const
{
return isNumeric() && (!isWholeNumber() || m_value.find('.')!=std::string::npos);
}
bool ALUValue::isNumeric() const
{
switch (m_type) {
case counterType__None:
return false;
case counterType__Int:
case counterType__Float:
return true;
default: try {
std::size_t pos;
std::stold(m_value, &pos);
return m_value.length() == pos;
} catch (std::out_of_range& e) {
return false;
} catch (std::invalid_argument& e) {
return false;
}
}
}
ALUCounterType ALUValue::getDivinedType() const
{
if (m_type != counterType__Str) {
return m_type;
}
if (!isNumeric()) {
return counterType__Str;
}
if (isWholeNumber() && (std::string::npos==m_value.find('.'))) {
return counterType__Int;
}
return counterType__Float;
}
class ALUCounterDeleter {
public:
ALUCounterDeleter(ALUValue* p) {p_ctr = p;}
~ALUCounterDeleter() {if (p_ctr) delete p_ctr;}
private:
ALUValue* p_ctr;
};
ALUValue* AluUnit::evaluate()
{
std::string err = _identify() + " should not be called with no operands";
MYTHROW(err);
}
ALUValue* AluUnit::compute(ALUValue* op)
{
std::string err = _identify() + " should not be called with one operand";
MYTHROW(err);
}
ALUValue* AluUnit::compute(ALUValue* op1, ALUValue* op2)
{
std::string err = _identify() + " should not be called with two operands";
MYTHROW(err);
}
ALUValue* AluUnit::compute(ALUValue* op1, ALUValue* op2, ALUValue* op3)
{
std::string err = _identify() + " should not be called with three operands";
MYTHROW(err);
}
ALUValue* AluUnit::compute(ALUValue* op1, ALUValue* op2, ALUValue* op3, ALUValue* op4)
{
std::string err = _identify() + " should not be called with four operands";
MYTHROW(err);
}
ALUValue* AluUnit::compute(ALUValue* op1, ALUValue* op2, ALUValue* op3, ALUValue* op4, ALUValue* op5)
{
std::string err = _identify() + " should not be called with five operands";
MYTHROW(err);
}
void AluUnitLiteral::_serialize(std::ostream& os) const
{
os << '(' << m_literal.getFloat() << ')';
}
std::string AluUnitLiteral::_identify()
{
if (m_hintNumerical) {
return std::string("Number(") + m_literal.getStr() + ")";
} else {
return std::string("Literal(") + m_literal.getStr() + ")";
}
}
ALUValue* AluUnitLiteral::evaluate()
{
ALUValue* ret = new ALUValue(m_literal);
if (m_hintNumerical) ret->divineType();
return ret;
}
void AluUnitNull::_serialize(std::ostream& os) const
{
os << "dummy";
}
std::string AluUnitNull::_identify()
{
return std::string("Dummy");
}
ALUValue* AluUnitNull::evaluate()
{
return NULL;
}
void AluUnitCounter::_serialize(std::ostream& os) const
{
os << '#' << m_ctrNumber;
}
std::string AluUnitCounter::_identify()
{
return std::string("Counter(") + std::to_string(m_ctrNumber) + ")";
}
ALUValue* AluUnitCounter::compute(ALUCounters* pCtrs)
{
return new ALUValue(*(pCtrs->getPointer(m_ctrNumber)));
}
static fieldIdentifierGetter* g_fieldIdentifierGetter = NULL;
void setFieldIdentifierGetter(fieldIdentifierGetter* getter)
{
g_fieldIdentifierGetter = getter;
}
void AluUnitFieldIdentifier::_serialize(std::ostream& os) const
{
os << m_id;
}
std::string AluUnitFieldIdentifier::_identify()
{
if (m_ReturnIdentifier) {
return std::string("FI(") + m_id + " - by name)";
}
return std::string("FI(") + m_id + ")";
}
ALUValue* AluUnitFieldIdentifier::evaluate()
{
if (m_ReturnIdentifier) {
return new ALUValue(ALUInt(m_id));
}
if (!g_fieldIdentifierGetter) {
MYTHROW("Field Identifier Getter is not set")
}
return new ALUValue(g_fieldIdentifierGetter->Get(m_id));
}
#define X(nm,st) if (s==st) {m_op = UnaryOp__##nm; return;}
void AluUnitUnaryOperator::setOpByName(std::string& s)
{
ALU_UOP_LIST
std::string err = "Invalid unary operand: <"+s+">";
MYTHROW(err);
}
#undef X
AluUnitUnaryOperator::AluUnitUnaryOperator(std::string& s)
{
setOpByName(s);
}
AluUnitUnaryOperator::AluUnitUnaryOperator(const char* str)
{
std::string s(str);
setOpByName(s);
}
#define X(nm,st) case UnaryOp__##nm: os << st; break;
void AluUnitUnaryOperator::_serialize(std::ostream& os) const
{
switch(m_op) {
ALU_UOP_LIST
default:
MYTHROW("Invalid unary operand");
};
}
#undef X
#define X(nm,st) case UnaryOp__##nm: return ret + st + ")"; break;
std::string AluUnitUnaryOperator::_identify()
{
std::string ret = std::string("UOP(");
switch (m_op) {
ALU_UOP_LIST
default:
MYTHROW("Invalid unary operand");
return ""; // prevent warning
}
}
#undef X
#define X(nm,st) case UnaryOp__##nm: return compute##nm(operand);
ALUValue* AluUnitUnaryOperator::compute(ALUValue* operand)
{
ALUCounterDeleter _op(operand);
if (counterType__None==operand->getType()) {
return new ALUValue();
}
switch (m_op) {
ALU_UOP_LIST
default:
MYTHROW("Invalid unary operand");
}
}
#undef X
#define RETURN_FALSE return new ALUValue(ALUInt(0))
#define RETURN_TRUE return new ALUValue(ALUInt(1))
#define RETURN_COND(cond) { if ((cond)) { RETURN_TRUE; } else { RETURN_FALSE; } }
ALUValue* AluUnitUnaryOperator::computeNot(ALUValue* operand)
{
RETURN_COND(false==operand->getBool());
}
ALUValue* AluUnitUnaryOperator::computePlus(ALUValue* operand)
{
switch (operand->getType()) {
case counterType__Float:
case counterType__Int:
return new ALUValue(*operand);
case counterType__Str:
if (operand->isFloat()) {
return new ALUValue(operand->getFloat());
} else {
return new ALUValue(operand->getInt());
}
default:
MYTHROW("Invalid operand type");
}
}
ALUValue* AluUnitUnaryOperator::computeMinus(ALUValue* operand)
{
switch (operand->getType()) {
case counterType__Float:
return new ALUValue(-operand->getFloat());
case counterType__Int:
return new ALUValue(-operand->getInt());
case counterType__Str:
if (operand->isFloat()) {
return new ALUValue(-operand->getFloat());
} else {
return new ALUValue(-operand->getInt());
}
default:
MYTHROW("Invalid operand type");
}
}
#define X(nm,st,prio) if (s==st) {m_op = BinaryOp__##nm; m_priority = prio; return;}
void AluBinaryOperator::setOpByName(std::string& s)
{
ALU_BOP_LIST
std::string err = "Invalid binary operand: <"+s+">";
MYTHROW(err);
}
#undef X
AluBinaryOperator::AluBinaryOperator(std::string& s)
{
setOpByName(s);
}
AluBinaryOperator::AluBinaryOperator(const char* str)
{
std::string s(str);
setOpByName(s);
}
#define X(nm,st,prio) case BinaryOp__##nm: os << st; break;
void AluBinaryOperator::_serialize(std::ostream& os) const
{
switch(m_op) {
ALU_BOP_LIST
default:
MYTHROW("Invalid binary operand");
};
}
#undef X
#define X(nm,st,prio) case BinaryOp__##nm: return ret + st + ")"; break;
std::string AluBinaryOperator::_identify()
{
std::string ret = std::string("BOP(");
switch (m_op) {
ALU_BOP_LIST
default:
MYTHROW("Invalid binary operand");
return ""; // prevent warning
}
}
#undef X
#define X(nm,st,prio) case BinaryOp__##nm: return compute##nm(op1, op2);
ALUValue* AluBinaryOperator::compute(ALUValue* op1, ALUValue* op2)
{
ALUCounterDeleter _op1(op1);
ALUCounterDeleter _op2(op2);
if (counterType__None==op1->getType() || counterType__None==op2->getType()) {
return new ALUValue();
}
switch (m_op) {
ALU_BOP_LIST
default:
MYTHROW("Invalid unary operand");
}
}
#undef X
// Simple floating point or integer addition
ALUValue* AluBinaryOperator::computeAdd(ALUValue* op1, ALUValue* op2)
{
if (counterType__Float==op1->getType() || counterType__Float==op2->getType()) {
return new ALUValue(op1->getFloat() + op2->getFloat());
}
if (counterType__Int==op1->getType() && counterType__Int==op2->getType()) {
return new ALUValue(op1->getInt() + op2->getInt());
}
if (op1->isWholeNumber() && op2->isWholeNumber()) {
return new ALUValue(op1->getInt() + op2->getInt());
}
return new ALUValue(op1->getFloat() + op2->getFloat());
}
// Simple floating point or integer subtraction
ALUValue* AluBinaryOperator::computeSub(ALUValue* op1, ALUValue* op2)
{
if (counterType__Float==op1->getType() || counterType__Float==op2->getType()) {
return new ALUValue(op1->getFloat() - op2->getFloat());
}
if (counterType__Int==op1->getType() && counterType__Int==op2->getType()) {
return new ALUValue(op1->getInt() - op2->getInt());
}
if (op1->isWholeNumber() && op2->isWholeNumber()) {
return new ALUValue(op1->getInt() - op2->getInt());
}
return new ALUValue(op1->getFloat() - op2->getFloat());
}
// Floating point or integer multiplication
ALUValue* AluBinaryOperator::computeMult(ALUValue* op1, ALUValue* op2)
{
if (counterType__Float==op1->getType() || counterType__Float==op2->getType()) {
return new ALUValue(op1->getFloat() * op2->getFloat());
}
if (counterType__Int==op1->getType() && counterType__Int==op2->getType()) {
return new ALUValue(op1->getInt() * op2->getInt());
}
if (op1->isWholeNumber() && op2->isWholeNumber()) {
return new ALUValue(op1->getInt() * op2->getInt());
}
return new ALUValue(op1->getFloat() * op2->getFloat());
}
// Numeric division. The result quotient may be floating point even when the
// dividend and divisor are both integers.
ALUValue* AluBinaryOperator::computeDiv(ALUValue* op1, ALUValue* op2)
{
// guard against divide-by-zero: return NaN
if (counterType__None!=op2->getType() && 0.0==op2->getFloat()) {
return new ALUValue();
}
if (counterType__Float==op1->getType() || counterType__Float==op2->getType()) {
return new ALUValue(op1->getFloat() / op2->getFloat());
}
if (counterType__Int==op1->getType() && counterType__Int==op2->getType()) {
if (0==(op1->getInt() % op2->getInt())) {
return new ALUValue(op1->getInt() / op2->getInt());
} else {
return new ALUValue(op1->getFloat() / op2->getFloat());
}
}
if (op1->isWholeNumber() && op2->isWholeNumber() && (0==(op1->getInt() % op2->getInt()))) {
return new ALUValue(op1->getInt() / op2->getInt());
}
return new ALUValue(op1->getFloat() / op2->getFloat());
}
// String concatenation ||
ALUValue* AluBinaryOperator::computeAppnd(ALUValue* op1, ALUValue* op2)
{
return new ALUValue(op1->getStr() + op2->getStr());
}
// Integer division. Divides the integer form of both numbers: 19.5 % 2.001 = 9
ALUValue* AluBinaryOperator::computeIntDiv(ALUValue* op1, ALUValue* op2)
{
// guard against divide-by-zero: return NaN
if (counterType__None!=op2->getType() && 0.0==op2->getFloat()) {
return new ALUValue();
}
return new ALUValue(op1->getInt() / op2->getInt());
}
// Remainder in integer division. The operator is //
ALUValue* AluBinaryOperator::computeRemDiv(ALUValue* op1, ALUValue* op2)
{
// guard against divide-by-zero: return NaN
if (counterType__None!=op2->getType() && 0.0==op2->getFloat()) {
return new ALUValue();
}
return new ALUValue(op1->getInt() % op2->getInt());
}
// Logical AND. Always returns zero or one.
ALUValue* AluBinaryOperator::computeAND(ALUValue* op1, ALUValue* op2)
{
RETURN_COND(op1->getBool() && op2->getBool());
}
// Logical OR. Always returns zero or one.
ALUValue* AluBinaryOperator::computeOR(ALUValue* op1, ALUValue* op2)
{
RETURN_COND(op1->getBool() || op2->getBool());
}
// Simple floating point or string comparison
ALUValue* AluBinaryOperator::computeEQ(ALUValue* op1, ALUValue* op2)
{
if (op1->isNumeric() || op2->isNumeric()) {
RETURN_COND(op1->getFloat() == op2->getFloat());
}
RETURN_COND(op1->getStr() == op2->getStr());
}
// Simple floating point or string comparison
ALUValue* AluBinaryOperator::computeNE(ALUValue* op1, ALUValue* op2)
{
if (op1->isNumeric() || op2->isNumeric()) {
RETURN_COND(op1->getFloat() != op2->getFloat());
}
RETURN_COND(op1->getStr() != op2->getStr());
}
// Simple floating point or string comparison
ALUValue* AluBinaryOperator::computeGT(ALUValue* op1, ALUValue* op2)
{
if (op1->isNumeric() || op2->isNumeric()) {
RETURN_COND(op1->getFloat() > op2->getFloat());
}
RETURN_COND(op1->getStr().compare(op2->getStr()) > 0);
}
// Simple floating point or string comparison
ALUValue* AluBinaryOperator::computeGE(ALUValue* op1, ALUValue* op2)
{
if (op1->isNumeric() || op2->isNumeric()) {
RETURN_COND(op1->getFloat() >= op2->getFloat());
}
RETURN_COND(op1->getStr().compare(op2->getStr()) >= 0);
}
// Simple floating point or string comparison
ALUValue* AluBinaryOperator::computeLT(ALUValue* op1, ALUValue* op2)
{
if (op1->isNumeric() || op2->isNumeric()) {
RETURN_COND(op1->getFloat() < op2->getFloat());
}
RETURN_COND(op1->getStr().compare(op2->getStr()) < 0);
}
// Simple floating point or string comparison
ALUValue* AluBinaryOperator::computeLE(ALUValue* op1, ALUValue* op2)
{
if (op1->isNumeric() || op2->isNumeric()) {
RETURN_COND(op1->getFloat() <= op2->getFloat());
}
RETURN_COND(op1->getStr().compare(op2->getStr()) <= 0);
}
// Strict floating point or string comparison
ALUValue* AluBinaryOperator::computeSEQ(ALUValue* op1, ALUValue* op2)
{
RETURN_COND(op1->getStr() == op2->getStr());
}
// Strict floating point or string comparison
ALUValue* AluBinaryOperator::computeSNE(ALUValue* op1, ALUValue* op2)
{
RETURN_COND(op1->getStr() != op2->getStr());
}
// Strict floating point or string comparison
ALUValue* AluBinaryOperator::computeSGT(ALUValue* op1, ALUValue* op2)
{
RETURN_COND(op1->getStr().compare(op2->getStr()) > 0);
}
// Strict floating point or string comparison
ALUValue* AluBinaryOperator::computeSLT(ALUValue* op1, ALUValue* op2)
{
RETURN_COND(op1->getStr().compare(op2->getStr()) < 0);
}
// Strict floating point or string comparison
ALUValue* AluBinaryOperator::computeSGTE(ALUValue* op1, ALUValue* op2)
{
RETURN_COND(op1->getStr().compare(op2->getStr()) >= 0);
}
// Strict floating point or string comparison
ALUValue* AluBinaryOperator::computeSLTE(ALUValue* op1, ALUValue* op2)
{
RETURN_COND(op1->getStr().compare(op2->getStr()) <= 0);
}
#define X(nm,st) if (s==st) {m_op = AssnOp__##nm; return;}
void AluAssnOperator::setOpByName(std::string& s)
{
ALU_ASSOP_LIST
std::string err = "Invalid assignment operator: <"+s+">";
MYTHROW(err);
}
#undef X
AluAssnOperator::AluAssnOperator(std::string& s)
{
setOpByName(s);
}
AluAssnOperator::AluAssnOperator(const char* str)
{
std::string s(str);
setOpByName(s);
}
#define X(nm,st) case AssnOp__##nm: os << st; break;
void AluAssnOperator::_serialize(std::ostream& os) const
{
switch(m_op) {
ALU_ASSOP_LIST
default:
MYTHROW("Invalid assignment operand");
};
}
#undef X
#define X(nm,st) case AssnOp__##nm: return ret + st + ")"; break;
std::string AluAssnOperator::_identify()
{
std::string ret = std::string("ASS(");
switch (m_op) {
ALU_ASSOP_LIST
default:
MYTHROW("Invalid assignment operand");
return ""; // prevent warning
}
}
#undef X
#define X(nm,st) case AssnOp__##nm: result = compute##nm(operand, prevOp); break;
void AluAssnOperator::perform(ALUCounterKey ctrNumber, ALUCounters* ctrs, ALUValue* operand)
{
ALUValue* result;
ALUCounterDeleter _op(operand);
ALUValue* prevOp = ctrs->getPointer(ctrNumber);
// NaN is contagious
if (counterType__None==operand->getType() ||
(m_op!=AssnOp__Let && counterType__None==prevOp->getType())) {
ctrs->set(ctrNumber);
return;
}
switch (m_op) {
ALU_ASSOP_LIST
default:
MYTHROW("Invalid assignment operator");
}
ALUCounterDeleter _res((result==operand) ? NULL : result);
switch (result->getDivinedType()) {
case counterType__None:
ctrs->set(ctrNumber);
break;
case counterType__Str:
{
std::string s = result->getStr();
ctrs->set(ctrNumber, s);
break;
}
case counterType__Int:
ctrs->set(ctrNumber, result->getInt());
break;
case counterType__Float:
ctrs->set(ctrNumber, result->getFloat());
break;
default:
MYTHROW("Invalid assignment result");
}
}
#undef X
ALUValue* AluAssnOperator::computeLet(ALUValue* operand, ALUValue* prevOp)
{
// Previous value is ignored
return operand;
}
ALUValue* AluAssnOperator::computeAdd(ALUValue* operand, ALUValue* prevOp)
{
if (counterType__Float==operand->getType() || counterType__Float==prevOp->getType()) {
return new ALUValue(prevOp->getFloat() + operand->getFloat());
}
if (counterType__Int==operand->getType() && counterType__Int==prevOp->getType()) {
return new ALUValue(prevOp->getInt() + operand->getInt());
}
if (operand->isWholeNumber() && prevOp->isWholeNumber()) {
return new ALUValue(prevOp->getInt() + operand->getInt());
}
return new ALUValue(prevOp->getFloat() + operand->getFloat());
}
ALUValue* AluAssnOperator::computeSub(ALUValue* operand, ALUValue* prevOp)
{
if (counterType__Float==operand->getType() || counterType__Float==prevOp->getType()) {
return new ALUValue(prevOp->getFloat() - operand->getFloat());
}
if (counterType__Int==operand->getType() && counterType__Int==prevOp->getType()) {
return new ALUValue(prevOp->getInt() - operand->getInt());
}
if (operand->isWholeNumber() && prevOp->isWholeNumber()) {
return new ALUValue(prevOp->getInt() - operand->getInt());
}
return new ALUValue(prevOp->getFloat() - operand->getFloat());
}
ALUValue* AluAssnOperator::computeMult(ALUValue* operand, ALUValue* prevOp)
{
if (counterType__Float==operand->getType() || counterType__Float==prevOp->getType()) {
return new ALUValue(prevOp->getFloat() * operand->getFloat());
}
if (counterType__Int==operand->getType() && counterType__Int==prevOp->getType()) {
return new ALUValue(prevOp->getInt() * operand->getInt());
}
if (operand->isWholeNumber() && prevOp->isWholeNumber()) {
return new ALUValue(prevOp->getInt() * operand->getInt());
}
return new ALUValue(prevOp->getFloat() * operand->getFloat());
}
ALUValue* AluAssnOperator::computeDiv(ALUValue* operand, ALUValue* prevOp)
{
// guard against divide-by-zero: return NaN
if (0.0==operand->getFloat()) {
return new ALUValue();
}
if (counterType__Float==operand->getType() || counterType__Float==prevOp->getType()) {
return new ALUValue(prevOp->getFloat() / operand->getFloat());
}
if (counterType__Int==operand->getType() && counterType__Int==prevOp->getType()) {
if (0==(prevOp->getInt() % operand->getInt())) {
return new ALUValue(prevOp->getInt() / operand->getInt());
} else {
return new ALUValue(prevOp->getFloat() / operand->getFloat());
}
}
if (operand->isWholeNumber() && prevOp->isWholeNumber() && (0==(prevOp->getInt() % operand->getInt()))) {
return new ALUValue(prevOp->getInt() / operand->getInt());
}
return new ALUValue(prevOp->getFloat() / operand->getFloat());
}
ALUValue* AluAssnOperator::computeIntDiv(ALUValue* operand, ALUValue* prevOp)
{
// guard against divide-by-zero: return NaN
if (0.0==operand->getFloat()) {
return new ALUValue();
}
return new ALUValue(prevOp->getInt() / operand->getInt());
}
ALUValue* AluAssnOperator::computeRemDiv(ALUValue* operand, ALUValue* prevOp)
{
// guard against divide-by-zero: return NaN
if (0.0==operand->getFloat()) {
return new ALUValue();
}
return new ALUValue(prevOp->getInt() % operand->getInt());
}
ALUValue* AluAssnOperator::computeAppnd(ALUValue* operand, ALUValue* prevOp)
{
std::string ret = prevOp->getStr() + operand->getStr();
return new ALUValue(ret);
}
void AluInputRecord::_serialize(std::ostream& os) const
{
os << "@@";
}
ALUValue* AluInputRecord::evaluate()
{
PSpecString ps = g_pStateQueryAgent->getFromTo(1,-1);
ALUValue* ret;
if (ps) {
ret = new ALUValue(ps->data(), ps->length());
} else {
ret = new ALUValue("");
}
delete ps;
return ret;
}
void AluOtherToken::_serialize(std::ostream& os) const
{
switch(m_type) {
case UT_OpenParenthesis:
os << '(';
break;
case UT_ClosingParenthesis:
os << ')';
break;
case UT_Comma:
os << ',';
break;
default:
MYTHROW("Unexpected token");
}
}
std::string AluOtherToken::_identify()
{
switch(m_type) {
case UT_OpenParenthesis:
return "(";
case UT_ClosingParenthesis:
return ")";
case UT_Comma:
return "COMMA";
default:
MYTHROW("Unexpected token");
}
}
// AluFunction class
unsigned char AluFunction::m_flags = ALUFUNC_REGULAR;
#define X(nm,cnt,flags,rl) if (s==#nm) { \
m_FuncName = s; m_ArgCount = cnt; \
m_reliesOnInput = rl; \
mp_Func = (void*)AluFunc_##nm; \
m_flags |= flags; \
return; \
}
AluFunction::AluFunction(std::string& _s)
{
std::string s(_s);
std::transform(s.begin(), s.end(),s.begin(), ::tolower);
ALU_FUNCTION_LIST
#ifdef DEBUG
ALU_DEBUG_FUNCTION_LIST
#endif
std::string err = "Unrecognized function "+_s;
MYTHROW(err);
}
#undef X
void AluFunction::_serialize(std::ostream& os) const
{
os << m_FuncName;
}
ALUValue* AluFunction::evaluate()
{
if (0 != countOperands()) return AluUnit::evaluate();
return (AluFunc0(mp_Func))();
}
ALUValue* AluFunction::compute(ALUValue* op1)
{
if (1 != countOperands()) return AluUnit::compute(op1);
return (AluFunc1(mp_Func))(op1);
}
ALUValue* AluFunction::compute(ALUValue* op1, ALUValue* op2)
{
if (2 != countOperands()) return AluUnit::compute(op1,op2);
return (AluFunc2(mp_Func))(op1,op2);
}
ALUValue* AluFunction::compute(ALUValue* op1, ALUValue* op2, ALUValue* op3)
{
if (3 != countOperands()) return AluUnit::compute(op1,op2,op3);
return (AluFunc3(mp_Func))(op1,op2,op3);
}
ALUValue* AluFunction::compute(ALUValue* op1, ALUValue* op2, ALUValue* op3, ALUValue* op4)
{
if (4 != countOperands()) return AluUnit::compute(op1,op2,op3,op4);
return (AluFunc4(mp_Func))(op1,op2,op3,op4);
}
ALUValue* AluFunction::compute(ALUValue* op1, ALUValue* op2, ALUValue* op3, ALUValue* op4, ALUValue* op5)
{
if (5 != countOperands()) return AluUnit::compute(op1,op2,op3,op4,op5);
return (AluFunc5(mp_Func))(op1,op2,op3,op4,op5);
}
/*
* Code for parsing expressions and assignments
*/
static bool isDigit(char c) {
return (c>='0' && c<='9');
}
static bool isLetter(char c) {
return ((c>='a' && c<='z') || (c>='A' && c<='Z'));
}
static bool isCharInIdentifier(char c) {
return isLetter(c) || isDigit(c) || c=='_';
}
static bool isFirstCharInIdentifier(char c) {
return isLetter(c) || c=='_';
}
#define X(nm,st) if (s==st) return new AluUnitUnaryOperator(s);
static AluUnit* getUnaryOperator(std::string& s)
{
ALU_UOP_LIST
return NULL;
}
#undef X
#define X(nm,st,prio) if (s==st) return new AluBinaryOperator(s);
static AluUnit* getBinaryOperator(std::string& s)
{
ALU_BOP_LIST
return NULL;
}
#undef X
static AluAssnOperator* getAssnOperator(std::string& s)
{
#define X(nm,st) if (s==st) return new AluAssnOperator(s);
ALU_ASSOP_LIST
#undef X
return NULL;
}
void dumpAluVec(const char* title, AluVec& vec, int pointer = -1)
{
std::cerr << title << ": ALU Vector at " << &vec << " with " << vec.size() << " items:\n";
int index = 0;
for (AluUnit* pUnit : vec) {
if (index==pointer) {
std::cerr << " ==> | ";
} else {
std::cerr << " | ";
}
std::cerr << std::setw(40) << std::left << pUnit->_identify() << "|" << std::endl;
index++;
}
std::cerr << " +" << std::setw(42) << std::setfill('-') <<
std::right << "+" << std::endl << std::setw(0) << std::setfill(' ') << std::endl;
}
void dumpAluStack(const char* title, std::stack<ALUValue*>& stk)
{
std::cerr << title << ": ALU Stack at " << &stk << " with " << stk.size() << " items:\n";
std::stack<ALUValue*> tmp;
while (!stk.empty()) {
ALUValue* v = stk.top();
stk.pop();
std::cerr << " > " << (v ? v->getStr() : "(nil)") << std::endl;
tmp.push(v);
}
std::cerr << std::endl;
while (!tmp.empty()) {
ALUValue* v = tmp.top();
tmp.pop();
stk.push(v);
}
}
void dumpAluStack(const char* title, std::stack<AluUnit*>& stk)
{
std::cerr << title << ": ALU Unit Stack at " << &stk << " with " << stk.size() << " items:\n";
std::stack<AluUnit*> tmp;
while (!stk.empty()) {
AluUnit* v = stk.top();
stk.pop();
std::cerr << " > " << v->_identify() << std::endl;
tmp.push(v);
}
std::cerr << std::endl;
while (!tmp.empty()) {
AluUnit* v = tmp.top();
tmp.pop();
stk.push(v);
}
}
bool expressionIsAssignment(AluVec& vec)
{
return (vec.size() > 2 &&
UT_Counter == vec[0]->type() &&
UT_AssignmentOp == vec[1]->type());
}
bool parseAluExpression(std::string& s, AluVec& vec)
{
char* c = (char*)s.c_str();
char* cEnd = c + s.length();
AluUnit* pUnit;
AluUnitType prevUnitType = UT_None;
if (!vec.empty()){
MYTHROW("Entered with non-empty vec.");
}
#ifdef ALU_DUMP
if (g_bDebugAluCompile) {
std::cerr << __FUNCTION__ << ": Parsing Expression: " << s << std::endl;
}
#endif
bool mayBeStart = true; // will be false after an expression that is not followed by whitespace
while (c<cEnd) {
// skip over whitespace (if any)
while (c<cEnd && *c<=32) {
c++;
mayBeStart = true;
}
if (c==cEnd) break;
// First character a digit, a dot, or a minus sign?
if (*c=='.' ||
(*c=='-' && mayBeStart && (c+1 < cEnd) && isDigit(*(c+1))) ||
isDigit(*c)) {
unsigned int countDots = (*c=='.') ? 1 : 0;
char* tokEnd = c+1;
while (tokEnd < cEnd) {
if (*tokEnd=='.' && countDots==0) {
countDots++;
} else if (*tokEnd>='0' && *tokEnd<='9') {
// nothing
} else {
break;
}
tokEnd++;
}
std::string num(c,(tokEnd-c));
pUnit = new AluUnitLiteral(num,true);
vec.push_back(pUnit);
prevUnitType = pUnit->type();
c = tokEnd;
mayBeStart = false;
continue;
}
// First character a single or double quote?
// Only one is really possible because the other is used to delimit
// the expression, but we don't know that inside...
if (*c=='\'' || *c=='"') {
std::string tok;
char delimiter = *c++;
char* tokEnd = c;
while (tokEnd<cEnd && *tokEnd!=delimiter) {
if (*tokEnd=='\\' && tokEnd < (cEnd-1)) {
tokEnd++;
}
tok += *tokEnd++;
}
pUnit = new AluUnitLiteral(tok);
vec.push_back(pUnit);
prevUnitType = pUnit->type();
c = tokEnd+1;
mayBeStart = false;
continue;
}
// Also a configured string
if (*c=='@' && isFirstCharInIdentifier(c[1])) {
char* tokEnd = ++c;
while (isCharInIdentifier(*tokEnd) && (tokEnd<cEnd)) {
tokEnd++;
}
std::string key = std::string(c,tokEnd-c);
if (!configSpecLiteralExists(key)) {
std::string err = "Key '" + key + "' not found in expression.";
MYTHROW(err);
}
pUnit = new AluUnitLiteral(configSpecLiteralGet(key));
vec.push_back(pUnit);
prevUnitType = pUnit->type();
c = tokEnd;
mayBeStart = false;
continue;
}
// A special string @@ representing the entire input record
if (*c=='@' && c[1]=='@') {
c+=2;
pUnit = new AluInputRecord();
vec.push_back(pUnit);
prevUnitType = pUnit->type();
mayBeStart = false;
continue;
}
// hash-sign followed by a number is a counter
if (*c=='#') {
c++;
char* tokEnd = c;
while (tokEnd<cEnd && *tokEnd>='0' && *tokEnd<='9') tokEnd++;
std::string num(c,(tokEnd-c));
if ((num.length() == 0) || (num.length() > 3)) {
std::string err = "Invalid counter <#" + num + *tokEnd + "> in expression";
MYTHROW(err);
}
pUnit = new AluUnitCounter(std::stoi(num));
vec.push_back(pUnit);
prevUnitType = pUnit->type();
c = tokEnd;
mayBeStart = false;
continue;
}
// string of letters and digits. May be function or field identifier
if (isLetter(*c)) {
char *tokEnd = c+1;
while (tokEnd<cEnd && (isLetter(*tokEnd) || isDigit(*tokEnd) || *tokEnd=='_')) tokEnd++;
if (tokEnd == c+1) {
pUnit = new AluUnitFieldIdentifier(*c);
} else {
std::string identifier(c,(tokEnd-c));
pUnit = new AluFunction(identifier);
}
vec.push_back(pUnit);
prevUnitType = pUnit->type();
c = tokEnd;
mayBeStart = false;
continue;
}
// parenthesis
if (*c=='(') {
pUnit = new AluOtherToken(UT_OpenParenthesis);
vec.push_back(pUnit);
prevUnitType = pUnit->type();
c++;
mayBeStart = true;
continue;
}
if (*c==')') {
pUnit = new AluOtherToken(UT_ClosingParenthesis);
vec.push_back(pUnit);
prevUnitType = pUnit->type();
c++;
mayBeStart = false;
continue;
}
if (*c==',') {
pUnit = new AluOtherToken(UT_Comma);
vec.push_back(pUnit);
prevUnitType = pUnit->type();
c++;
mayBeStart = true;
continue;
}
// string of operator characters
static std::string operatorChars = "=+-*/|!<>:&%";
if (operatorChars.find(*c)!=std::string::npos) {
char* tokEnd = c+1;
while (tokEnd<cEnd && std::string::npos!=operatorChars.find(*tokEnd)) tokEnd++;
std::string operatr(c,(tokEnd-c));
if (prevUnitType==UT_None || prevUnitType==UT_OpenParenthesis || prevUnitType==UT_BinaryOp) {
pUnit = getUnaryOperator(operatr);
} else {
pUnit = getBinaryOperator(operatr);
}
if (!pUnit) {
pUnit = getAssnOperator(operatr);
}
if (!pUnit) {
std::string err = "Operator '"+operatr+"' is invalid.";
MYTHROW(err);
}
vec.push_back(pUnit);
prevUnitType = pUnit->type();
c = tokEnd;
mayBeStart = true;
continue;
}
// Anything else is a string literal
if (1) {
char* tokEnd = c+1;
while (tokEnd < cEnd && *tokEnd!=*c) tokEnd++;
if (*tokEnd!=*c) {
std::string err = "Error parsing expression <" + std::string(c) + ">";
MYTHROW(err);
}
std::string sLiteral(c+1, (tokEnd-c-1));
pUnit = new AluUnitLiteral(sLiteral);
vec.push_back(pUnit);
prevUnitType = pUnit->type();
c = tokEnd;
mayBeStart = false;
continue;
}
}
#ifdef ALU_DUMP
if (g_bDebugAluCompile) dumpAluVec("Parsed Expression", vec);
#endif
return true;
}
void cleanAluVec(AluVec& vec)
{
while (!vec.empty()) {
AluUnit* pUnit = vec[0];
vec.erase(vec.begin());
delete pUnit;
}
}
std::string dumpAluVec(AluVec& vec, bool deleteUnits)
{
std::string ret;
if (deleteUnits) {
while (!vec.empty()) {
AluUnit* pUnit = vec[0];
if (!ret.empty()) ret += ";";
ret += pUnit->_identify();
vec.erase(vec.begin());
delete pUnit;
}
} else {
for (int i=0; i<vec.size(); i++) {
if (!ret.empty()) ret += ";";
ret += vec[i]->_identify();
}
}
return ret;
}
bool parseAluStatement(std::string& s, ALUCounterKey& k, AluAssnOperator* pAss, AluVec& vec)
{
if (false==parseAluExpression(s, vec)) {
return false;
}
// First item in the vector must be a counter key, the second is an assignment operator
// Need to remove them both.
if (vec.size() < 3) {
std::string err = "Expression <" + s + "> is not a valid ALU assignment";
MYTHROW(err);
}
if (UT_Counter!=vec[0]->type()) {
std::string err = "ALU assignment statements must begin with a counter. Got " + vec[0]->_identify() + " instead.";
MYTHROW(err);
}
if (UT_AssignmentOp!=vec[1]->type()) {
std::string err = "ALU assignment statements must have an assignment operator as the second element. Got " + vec[1]->_identify() + " instead.";
MYTHROW(err);
}
AluUnitCounter* ctr = dynamic_cast<AluUnitCounter*>(vec[0]);
AluAssnOperator* pAssnOp = dynamic_cast<AluAssnOperator*>(vec[1]);
*pAss = *pAssnOp;
k = ctr->getKey();
vec.erase(vec.begin());
vec.erase(vec.begin());
delete ctr;
delete pAssnOp;
// Check that we don't have something terrible like an assignment operator in the
// expression. Like this is C or something
for (AluUnit* pUnit : vec) {
if (UT_AssignmentOp==pUnit->type()) {
MYTHROW("ALU expression should not contain an assignment operator");
}
}
return true;
}
bool isHigherPrecedenceBinaryOp(AluUnit* op1, AluUnit* op2)
{
AluBinaryOperator *bop1 = dynamic_cast<AluBinaryOperator*>(op1);
AluBinaryOperator *bop2 = dynamic_cast<AluBinaryOperator*>(op2);
if (!bop1 || !bop2) {
MYTHROW("Received two units. Not both are binary operators");
}
return bop1->priority() >= bop2->priority();
}
bool breakAluVecByComma(AluVec& source, AluVec& dest)
{
int countOpens = 0;
int countUnits = 0;
bool foundComma = false;
if (!dest.empty()){
MYTHROW("Entered with non-empty destination vec.");
}
for (AluUnit* pUnit : source) {
countUnits++;
switch(pUnit->type()) {
case UT_OpenParenthesis:
countOpens++;
break;
case UT_ClosingParenthesis:
MYASSERT(countOpens>0);
countOpens--;
break;
case UT_Comma:
if (0==countOpens) foundComma = true;
break;
default:
break;
}
if (foundComma) {
delete pUnit;
break;
}
else {
dest.push_back(pUnit);
}
}
for (int i=0 ; i < countUnits ; i++) {
source.erase(source.begin());
}
MYASSERT(foundComma || source.empty());
return true;
}
#define X(fn,argc,flags,rl) if (s==##fn) { argCount = argc; return; }
struct functionArgcountPair {
functionArgcountPair(std::string& s, unsigned int argc, unsigned int avail) {
funcName = s;
argCount = argc;
availableOperands = avail;
}
std::string funcName;
unsigned int argCount;
unsigned int availableOperands;
};
#undef X
class functionNestingStack {
public:
functionNestingStack() {}
~functionNestingStack() {
// MYASSERT_WITH_MSG(m_stack.empty(), "Function nesting stack not empty");
}
void push(std::string& s, unsigned int argc, unsigned int availableOperands) {
m_stack.push(functionArgcountPair(s,argc,availableOperands));
}
void pop() {
m_stack.pop();
}
std::string fname() {
return m_stack.top().funcName;
}
unsigned int argc() {
return m_stack.top().argCount;
}
unsigned int availBefore() {
return m_stack.top().availableOperands;
}
private:
std::stack<functionArgcountPair> m_stack;
};
bool isPseudoFunctionName(std::string& fn)
{
#define X(nm) if (#nm==fn) return true;
ALU_PSEUDO_FUNCTION_LIST
return false;
}
/*
* Function: convertAluVecToPostfix
* Implements the Shunting-Yard algorithm to convert an infix expression
* to a postfix expression for easier calculation later on.
*
* This function also finds and fixes instances of the break() pseudo-function
*/
enum pseudoFunctionFindingState {
PFFS_lookingForPseudoFunction,
PFFS_lookingForOpen,
PFFS_lookingForFI,
PFFS_lookingForClose
};
bool convertAluVecToPostfix(AluVec& source, AluVec& dest, bool clearSource)
{
std::stack<AluUnit*> operatorStack;
unsigned int availableOperands = 0;
if (!dest.empty()){
MYTHROW("Entered with non-empty vec.");
}
// Handle the special case of pseudo-functions.
// The parameter should be a field identifier and it is converted to a number
// representing the ASCII value of the character
pseudoFunctionFindingState pffs = PFFS_lookingForPseudoFunction;
for (AluUnit* pUnit : source) {
switch (pffs) {
case PFFS_lookingForPseudoFunction: {
if (pUnit->type() != UT_Identifier) continue;
AluFunction* func = (AluFunction*)pUnit;
if (!isPseudoFunctionName(func->getName())) continue;
pffs = PFFS_lookingForOpen;
break;
}
case PFFS_lookingForOpen: {
if (pUnit->type() != UT_OpenParenthesis) {
pffs = PFFS_lookingForPseudoFunction;
continue;
}
pffs = PFFS_lookingForFI;
break;
}
case PFFS_lookingForFI: {
if (pUnit->type() != UT_FieldIdentifier) {
MYTHROW("Pseudo-functions' first argument may only be a field identifier");
}
AluUnitFieldIdentifier* pFI = (AluUnitFieldIdentifier*)pUnit;
pFI->setEvaluateToName();
pffs = PFFS_lookingForClose;
break;
}
case PFFS_lookingForClose: {
if (pUnit->type() != UT_ClosingParenthesis) {
continue;
}
pffs = PFFS_lookingForPseudoFunction;
break;
}
}
}
#ifdef ALU_DUMP
if (g_bDebugAluCompile) {
dumpAluVec("Expression to Convert to RPN", source);
if (g_bVerbose) {
clearSource = false;
}
}
#endif
int stepNumber = 0;
bool bExpectNullArgument = false;
functionNestingStack fstack;
for (AluUnit* pUnit : source) {
#ifdef ALU_DUMP
if (g_bDebugAluCompile && g_bVerbose) {
std::cerr << "\n\n\nStep #" << stepNumber << " - available operands: " << availableOperands << std::endl;
dumpAluVec("Source", source, stepNumber++);
dumpAluVec("Dest", dest);
dumpAluStack("operator stack",operatorStack);
}
#endif
switch (pUnit->type()) {
case UT_Comma:
while (!operatorStack.empty() && UT_OpenParenthesis!=operatorStack.top()->type()) {
MYASSERT_WITH_MSG(operatorStack.top()->countOperands() <= availableOperands, "Not enough operands for operator (3)");
availableOperands = availableOperands + 1 - operatorStack.top()->countOperands();
dest.push_back(operatorStack.top());
operatorStack.pop();
}
if (bExpectNullArgument) {
dest.push_back(new AluUnitNull);
availableOperands++;
}
if (clearSource) delete pUnit;
bExpectNullArgument = true;
break;
case UT_AssignmentOp:
MYTHROW("Assignment operator used in expression");
break;
case UT_None:
case UT_Invalid:
case UT_Null:
MYTHROW("None or Invalid - internal logic error");
case UT_LiteralNumber:
case UT_Counter:
case UT_FieldIdentifier:
case UT_InputRecord:
dest.push_back(pUnit);
availableOperands++;
bExpectNullArgument = false;
break;
case UT_Identifier: { // a function
AluFunction* pFunc = dynamic_cast<AluFunction*>(pUnit);
operatorStack.push(pUnit);
fstack.push(pFunc->getName(), pFunc->countOperands(), availableOperands);
bExpectNullArgument = false;
break;
}
case UT_UnaryOp: { // Unary operator - higher precedence than any binary but not a function
AluUnitType topType = operatorStack.empty() ? UT_None : operatorStack.top()->type();
while (topType==UT_Identifier) {
MYASSERT_WITH_MSG(operatorStack.top()->countOperands() <= availableOperands, "Not enough operands for operator (1)");
availableOperands = availableOperands + 1 - operatorStack.top()->countOperands();
dest.push_back(operatorStack.top());
operatorStack.pop();
topType = operatorStack.empty() ? UT_None : operatorStack.top()->type();
}
operatorStack.push(pUnit);
bExpectNullArgument = false;
break;
}
case UT_BinaryOp: { // Binary operator - lower than unary and an interesting rank among them
AluUnitType topType = operatorStack.empty() ? UT_None : operatorStack.top()->type();
while (topType==UT_Identifier || topType==UT_UnaryOp ||
(topType==UT_BinaryOp && isHigherPrecedenceBinaryOp(operatorStack.top(),pUnit))) {
MYASSERT_WITH_MSG(operatorStack.top()->countOperands() <= availableOperands, "Not enough operands for operator (2)");
availableOperands = availableOperands + 1 - operatorStack.top()->countOperands();
dest.push_back(operatorStack.top());
operatorStack.pop();
topType = operatorStack.empty() ? UT_None : operatorStack.top()->type();
}
operatorStack.push(pUnit);
bExpectNullArgument = false;
break;
}
case UT_OpenParenthesis:
operatorStack.push(pUnit);
bExpectNullArgument = true;
break;
case UT_ClosingParenthesis:
while (!operatorStack.empty() && UT_OpenParenthesis!=operatorStack.top()->type()) {
MYASSERT_WITH_MSG(operatorStack.top()->countOperands() <= availableOperands, "Not enough operands for operator (3)");
availableOperands = availableOperands + 1 - operatorStack.top()->countOperands();
dest.push_back(operatorStack.top());
operatorStack.pop();
}
if (operatorStack.empty()) {
MYTHROW("Mismatched parenthesis -- too many closing");
} else {
if (clearSource) {
delete pUnit;
delete operatorStack.top();
}
operatorStack.pop(); // Pop off the opening parenthesis
// issue #37 - if what remains is a function, it should also go
if (!operatorStack.empty() && UT_Identifier==operatorStack.top()->type()) {
if ((availableOperands) > (fstack.availBefore() + fstack.argc())) {
std::string err = "Too many operands (" +
std::to_string(availableOperands - fstack.availBefore()) +
") for function " + fstack.fname() + " (accepts " +
std::to_string(fstack.argc()) + ")";
MYTHROW(err);
}
while (availableOperands < (fstack.availBefore() + fstack.argc())) {
dest.push_back(new AluUnitNull);
availableOperands++;
}
availableOperands = availableOperands + 1 - operatorStack.top()->countOperands();
dest.push_back(operatorStack.top());
operatorStack.pop();
fstack.pop();
}
}
bExpectNullArgument = false;
}
}
while (!operatorStack.empty()) {
if (operatorStack.top()->type()==UT_OpenParenthesis) {
MYTHROW("Mismatched parenthesis -- too many opening");
}
AluUnit* pTopUnit = operatorStack.top();
operatorStack.pop();
MYASSERT_WITH_MSG(pTopUnit->countOperands()<=dest.size(), "Not enough operands for operator (4)");
dest.push_back(pTopUnit);
}
if (clearSource) {
while (!source.empty()) {
AluUnit* pUnit = source[0];
source.erase(source.begin());
}
}
#ifdef ALU_DUMP
if (g_bDebugAluCompile) dumpAluVec("RPN Expression", dest);
#endif
return true;
}
ALUValue* evaluateExpression(AluVec& expr, ALUCounters* pctrs)
{
std::stack<ALUValue*> computeStack;
ALUValue* arg1;
ALUValue* arg2;
ALUValue* arg3;
ALUValue* arg4;
ALUValue* arg5;
#ifdef ALU_DUMP
if (g_bDebugAluRun) {
std::cerr << "\n============= " << __FUNCTION__ << " ==============\n";
}
int index = 0;
#endif
for (AluUnit* pUnit : expr) {
#ifdef ALU_DUMP
if (g_bDebugAluRun) {
dumpAluVec("Expression Progress", expr, index);
dumpAluStack("Execution Stack", computeStack);
std::cerr << std::endl << std::endl;
}
index++;
#endif
switch (pUnit->type()) {
case UT_LiteralNumber:
case UT_FieldIdentifier:
case UT_InputRecord:
case UT_Null:
computeStack.push(pUnit->evaluate());
break;
case UT_Counter: {
AluUnitCounter* pCtr = dynamic_cast<AluUnitCounter*>(pUnit);
computeStack.push(pCtr->compute(pctrs));
break;
}
case UT_UnaryOp:
MYASSERT(computeStack.size()>=1);
arg1 = computeStack.top();
computeStack.pop();
computeStack.push(pUnit->compute(arg1));
break;
case UT_BinaryOp:
MYASSERT(computeStack.size()>=2);
arg2 = computeStack.top();
computeStack.pop();
arg1 = computeStack.top();
computeStack.pop();
computeStack.push(pUnit->compute(arg1,arg2));
break;
case UT_Identifier: {
MYASSERT(computeStack.size() >= pUnit->countOperands());
MYASSERT(pUnit->countOperands() <= MAX_FUNC_OPERANDS);
switch (pUnit->countOperands()) {
case 5:
arg5 = computeStack.top();
computeStack.pop();
case 4:
arg4 = computeStack.top();
computeStack.pop();
case 3:
arg3 = computeStack.top();
computeStack.pop();
case 2:
arg2 = computeStack.top();
computeStack.pop();
case 1:
arg1 = computeStack.top();
computeStack.pop();
default:
break;
}
switch (pUnit->countOperands()) {
case 0:
computeStack.push(pUnit->evaluate());
break;
case 1:
try {
computeStack.push(pUnit->compute(arg1));
}
catch (const SpecsException& e) {
delete arg1;
throw;
}
delete arg1; // Argh. Why doesn't C++ have a finally clause???!!!!!
break;
case 2:
try {
computeStack.push(pUnit->compute(arg1, arg2));
}
catch (const SpecsException& e) {
delete arg1;
delete arg2;
throw;
}
delete arg1;
delete arg2;
break;
case 3:
try {
computeStack.push(pUnit->compute(arg1, arg2, arg3));
}
catch (const SpecsException& e) {
delete arg1;
delete arg2;
delete arg3;
throw;
}
delete arg1;
delete arg2;
delete arg3;
break;
case 4:
try {
computeStack.push(pUnit->compute(arg1, arg2, arg3, arg4));
}
catch (const SpecsException& e) {
delete arg1;
delete arg2;
delete arg3;
delete arg4;
throw;
}
delete arg1;
delete arg2;
delete arg3;
delete arg4;
break;
case 5:
try {
computeStack.push(pUnit->compute(arg1, arg2, arg3, arg4, arg5));
}
catch (const SpecsException& e) {
std::cerr << "EXCEPTION: " << e.what() << std::endl;
delete arg1;
delete arg2;
delete arg3;
delete arg4;
delete arg5;
throw;
}
delete arg1;
delete arg2;
delete arg3;
delete arg4;
delete arg5;
break;
default:
break;
}
break;
default:
std::string err = "Logic error, should not have gotten this type of Unit: " + pUnit->_identify();
MYTHROW(err);
}
}
}
MYASSERT(computeStack.size() == 1);
#ifdef ALU_DUMP
if (g_bDebugAluRun) {
dumpAluStack("Final Stack", computeStack);
}
#endif
ALUValue* ret = computeStack.top();
computeStack.pop();
return ret;
}
void ALUPerformAssignment(ALUCounterKey& k, AluAssnOperator* pAss, AluVec& expr, ALUCounters* pctrs)
{
ALUValue* exprResult = evaluateExpression(expr, pctrs);
pAss->perform(k, pctrs, exprResult);
}
bool AluExpressionReadsLines(AluVec& vec)
{
for (AluUnit* unit : vec) {
if (unit->requiresRead()) {
return true;
}
}
return false;
}
bool expressionForcesRunoutCycle(AluVec& vec)
{
for (AluUnit* unit : vec) {
switch (unit->type()) {
case UT_Identifier:
{
AluFunction* pFunction = dynamic_cast<AluFunction*>(unit);
MYASSERT(NULL!=pFunction);
return ("eof" == pFunction->getName());
}
default:
return false;
}
}
return false;
}
void AluValueStats::initialize()
{
m_intCount = 0;
m_floatCount = 0;
m_totalCount = 0;
m_sumInt = 0;
m_sumFloat = 0.0;
m_minInt = 0;
m_minFloat = 0.0;
m_maxInt = 0;
m_maxFloat = 0.0;
m_runningAverage = 0.0;
m_runningSn = 0.0;
}
AluValueStats::AluValueStats()
{
initialize();
}
AluValueStats::AluValueStats(char id)
{
initialize();
AddValue(id);
}
void AluValueStats::AddValue(char id)
{
ALUValue v(g_fieldIdentifierGetter->Get(id));
auto type = v.getDivinedType();
switch (type) {
case counterType__Int:
{
ALUInt value = v.getInt();
m_intCount++;
if (1 == m_intCount) {
m_sumInt = value;
m_minInt = value;
m_maxInt = value;
} else {
if (value > m_maxInt) m_maxInt = value;
if (value < m_minInt) m_minInt = value;
m_sumInt += value;
}
/* intentional fall-through */
}
case counterType__Float:
{
ALUFloat value = v.getFloat();
// Collect running average and variance
if (0 == m_totalCount++) {
m_runningAverage = value;
m_runningSn = 0.0;
} else {
ALUFloat diffFromPreviousAverage = value - m_runningAverage;
m_runningAverage += (diffFromPreviousAverage / m_totalCount);
m_runningSn += (diffFromPreviousAverage * (value - m_runningAverage));
}
if (type != counterType__Float) break;
m_floatCount++;
if (1 == m_floatCount) {
m_sumFloat = value;
m_minFloat = value;
m_maxFloat = value;
} else {
if (value > m_maxFloat) m_maxFloat = value;
if (value < m_minFloat) m_minFloat = value;
m_sumFloat += value;
}
break;
}
default:
break;
}
}
ALUValue* AluValueStats::sum()
{
if (0 < m_floatCount) {
return new ALUValue(m_sumFloat + m_sumInt);
} else {
return new ALUValue(m_sumInt);
}
}
ALUValue* AluValueStats::sumi()
{
return new ALUValue(m_sumInt);
}
ALUValue* AluValueStats::sumf()
{
return new ALUValue(m_sumFloat);
}
ALUValue* AluValueStats::_min()
{
if (0 < m_floatCount) {
if (0 < m_intCount && m_minInt < m_minFloat) {
return new ALUValue(ALUFloat(m_minInt));
} else {
return new ALUValue(m_minFloat);
}
} else {
return mini();
}
}
ALUValue* AluValueStats::mini()
{
if (0 < m_intCount) {
return new ALUValue(m_minInt);
} else {
return new ALUValue(); /* returns NaN */
}
}
ALUValue* AluValueStats::minf()
{
if (0 < m_floatCount) {
return new ALUValue(m_minFloat);
} else {
return new ALUValue(); /* returns NaN */
}
}
ALUValue* AluValueStats::_max()
{
if (0 < m_floatCount) {
if (0 < m_intCount && m_maxInt < m_maxFloat) {
return new ALUValue(ALUFloat(m_maxInt));
} else {
return new ALUValue(m_maxFloat);
}
} else {
return maxi();
}
}
ALUValue* AluValueStats::maxi()
{
if (0 < m_intCount) {
return new ALUValue(m_maxInt);
} else {
return new ALUValue(); /* returns NaN */
}
}
ALUValue* AluValueStats::maxf()
{
if (0 < m_floatCount) {
return new ALUValue(m_maxFloat);
} else {
return new ALUValue(); /* returns NaN */
}
}
ALUValue* AluValueStats::average()
{
if (m_totalCount==0) {
return new ALUValue(); /* returns NaN */
}
return new ALUValue(m_runningAverage);
}
ALUValue* AluValueStats::variance()
{
if (m_totalCount==0) {
return new ALUValue(); /* returns NaN */
}
return new ALUValue(m_runningSn / m_totalCount);
}
ALUValue* AluValueStats::stddev()
{
if (m_totalCount==0) {
return new ALUValue(); /* returns NaN */
}
return new ALUValue(std::sqrt(m_runningSn / m_totalCount));
}
ALUValue* AluValueStats::stderrmean()
{
if (m_totalCount<=1) {
return new ALUValue(); /* returns NaN */
}
return new ALUValue(std::sqrt(m_runningSn / m_totalCount) / (m_totalCount-1));
}
|
#pragma once
#include <Eigen/Core>
#include <string>
#include <vector>
#include "attributes.hpp"
namespace swr {
// Contains the three shaders used by the rasterizer
class Shaders {
public:
// Vertex Shader
std::function<VertexAttributes(
const VertexAttributes&, const UniformAttributes&)>
vertex_shader;
// Fragment Shader
std::function<FragmentAttributes(
const VertexAttributes&, const UniformAttributes&)>
fragment_shader;
// Blending Shader
std::function<void(const FragmentAttributes&, FrameBufferAttributes&)>
blending_shader;
};
// Rasterizes a single triangle v1,v2,v3 using the provided shaders and
// uniforms. Note: v1, v2, and v3 needs to be in the canonical view volume (i.e.
// after being processed by the vertex shader)
void rasterize_triangle(
const Shaders& shaders,
const UniformAttributes& uniform,
const VertexAttributes& v1,
const VertexAttributes& v2,
const VertexAttributes& v3,
FrameBuffer& frameBuffer);
// Rasterizes a collection of triangles, assembling one triangle for each 3
// consecutive vertices. Note: the vertices will be processed by the vertex
// shader
void rasterize_triangles(
const Shaders& shaders,
const UniformAttributes& uniform,
const std::vector<VertexAttributes>& vertices,
FrameBuffer& frameBuffer);
// Rasterizes a single line v1,v2 of thickness line_thickness using the provided
// shaders and uniforms. Note: v1, v2 needs to be in the canonical view volume
// (i.e. after being processed by the vertex shader)
void rasterize_line(
const Shaders& shaders,
const UniformAttributes& uniform,
const VertexAttributes& v1,
const VertexAttributes& v2,
Float line_thickness,
FrameBuffer& frameBuffer);
// Rasterizes a collection of lines, assembling one line for each 2 consecutive
// vertices. Note: the vertices will be processed by the vertex shader
void rasterize_lines(
const Shaders& shaders,
const UniformAttributes& uniform,
const std::vector<VertexAttributes>& vertices,
Float line_thickness,
FrameBuffer& frameBuffer);
// Exports the framebuffer to a uint8 raw image
void framebuffer_to_uint8(
const FrameBuffer& frameBuffer, std::vector<uint8_t>& image);
} // namespace swr
|
class Solution {
public:
vector<vector<int>> kClosest(vector<vector<int>>& points, int K) {
auto cmp = [](vector<int>&a, vector<int>&b){
return a[0]*a[0] + a[1]*a[1] < b[0]*b[0] + b[1]*b[1];
};
priority_queue<vector<int>, vector<vector<int>>, decltype(cmp)>pq(cmp);
for(auto p: points)
{
pq.push(p);
if(pq.size()>K)
pq.pop();
}
vector<vector<int>>res;
while(pq.size())
{
res.push_back(pq.top());
pq.pop();
}
return res;
}
};
// Time: O(n) on average
// Space: O(1)
class Solution {
public:
vector<vector<int>> kClosest(vector<vector<int>>& points, int K) {
static const auto& dist = [](const vector<int>& v) {
return v[0] * v[0] + v[1] * v[1];
};
nth_element(points.begin(), points.begin() + K, points.end(),
[&](const vector<int>& a, const vector<int>& b) {
return dist(a) < dist(b);
});
return {points.cbegin(), points.cbegin() + K};
}
};
// Time: O(nlogk)
// Space: O(k)
class Solution2 {
public:
vector<vector<int>> kClosest(vector<vector<int>>& points, int K) {
static const auto& dist = [](const vector<int>& v) {
return v[0] * v[0] + v[1] * v[1];
};
struct Compare {
bool operator()(const vector<int>& a, const vector<int>& b) {
return dist(a) < dist(b);
}
};
priority_queue<vector<int>, vector<vector<int>>, Compare> max_heap;
for (const auto& point : points) {
max_heap.emplace(point);
if (max_heap.size() > K) {
max_heap.pop();
}
}
vector<vector<int>> result;
while (!max_heap.empty()) {
result.emplace_back(max_heap.top()), max_heap.pop();
}
return result;
}
};
//Quick-Select
/**
In the quick sort, we will always choose a pivot to compare with other elements.
After one iteration, we will get an array that all elements smaller than the pivot are on the left side of the pivot and
all elements greater than the pivot are on the right side of the pviot (assuming we sort the array in ascending order).
So, inspired from this, each iteration, we choose a pivot and then find the position p the pivot should be.
Then we compare p with the K, if the p is smaller than the K,
meaning the all element on the left of the pivot are all proper candidates but it is not adequate,
we have to do the same thing on right side, and vice versa.
If the p is exactly equal to the K, meaning that we've found the K-th position.
Therefore, we just return the first K elements, since they are not greater than the pivot.
Theoretically, the average time complexity is O(N) , but just like quick sort,
in the worst case, this solution would be degenerated to O(N^2), and pratically, the real time it takes on leetcode is 15ms.
*/
class Solution {
public:
vector<vector<int>> kClosest(vector<vector<int>>& points, int K) {
int l = 0, r = points.size()-1;
while(l<=r){
//cout<<"l "<<l<<" r "<<r<<endl;
int mid = quickselect(points, l, r);
if(mid == K)
break;
else if(mid < K)
l = mid + 1;
else
r = mid - 1;
}
vector<vector<int>>res;
for(int i = 0; i<K;++i)
res.push_back(points[i]);
return res;
}
int compare(const vector<int>&a, const vector<int>&b){
return a[0]*a[0] + a[1]*a[1] - b[0]*b[0] - b[1]*b[1];
}
int quickselect(vector<vector<int>>& points, int l, int r){
vector<int> pivot = points[l];
while(l < r){
while(l < r && compare(pivot, points[r])<=0) //大于等于pivot 左移
--r;
points[l] = points[r];
while(l < r && compare(pivot, points[l])>=0) //小于等于 pivot 右移
++l;
points[r] = points[l];
}
points[l] = pivot;
return l;
}
/* 也可以这么写把pivot 放成left
int quickselect(vector<vector<int>>& points, int l, int r){
vector<int> pivot = points[r];
while(l < r){
while(l < r && compare(pivot, points[l])>=0)
++l;
points[r] = points[l];
while(l < r && compare(pivot, points[r])<=0)
--r;
points[l] = points[r];
}
points[r] = pivot;
return r;
}
*/
};
/**
QuickSelect [4, 6, 7, 3, 2, 5, 10, 13, 2]
l 1 r 8
2, 6, 7, 3, 2, 5, 10, 13, 6,
l 2 r 4
2, 2, 7, 3, 7, 5, 10, 13, 6,
l 3 r 3
2, 2, 3, 4, 7, 5, 10, 13, 6,
*/
/*
O(N^2) 的例子
[[1,2],[1,3],[1,4],[1,5],[1,6],[1,7],[1,8],[1,9]] 每次run partition都是只run r--
8
l 0 r 7
l 1 r 7
l 2 r 7
l 3 r 7
l 4 r 7
l 5 r 7
l 6 r 7
l 7 r 7
*/
class Solution {
public:
vector<vector<int>> kClosest(vector<vector<int>>& points, int K) {
int l = 0, r = points.size() - 1;
while (true) {
//cout<<"l "<<l<<" r "<<r<<endl;
int p = partition(points, l, r);
if (p == K - 1) {
break;
}
if (p < K - 1) {
l = p + 1;
} else {
r = p - 1;
}
}
return vector<vector<int>>(points.begin(), points.begin() + K);
}
private:
bool farther(vector<int>& p, vector<int>& q) {
return p[0] * p[0] + p[1] * p[1] > q[0] * q[0] + q[1] * q[1];
}
bool closer(vector<int>& p, vector<int>& q) {
return p[0] * p[0] + p[1] * p[1] < q[0] * q[0] + q[1] * q[1];
}
int partition(vector<vector<int>>& points, int left, int right) {
int pivot = left, l = left + 1, r = right; //是left + 1, 把pivot 割除
while (l <= r) { //必须是 <=, l == r 点看跟pivot 点比,大的话, --r, 小的话 ++l
if (farther(points[l], points[pivot]) && closer(points[r], points[pivot])) {
swap(points[l++], points[r--]);
}
if (!farther(points[l], points[pivot])) {
l++;
}
if (!closer(points[r], points[pivot])) {
r--;
}
}
swap(points[pivot], points[r]); //l 可能大于point.size(), 因为可能所有点都小于0, 但r 不会小于0,因为pivot是起点 被隔开
return r;
}
/* or 可以这么写
int partition(vector<vector<int>>& points, int left, int right) {
int pivot = left, l = left+1, r = right;
while (l <= r) {
while (l<= r && farther(points[l], points[pivot]) && closer(points[r], points[pivot])) {
swap(points[l++], points[r--]);
}
while (l <= r && !farther(points[l], points[pivot])) {
l++;
}
while (l<= r && !closer(points[r], points[pivot])) {
r--;
}
}
swap(points[pivot], points[r]);
return r;
}
也可以换顺序
int partition(vector<vector<int>>& points, int left, int right) {
int pivot = left, l = left + 1, r = right;
while (l <= r) {
if (!farther(points[l], points[pivot])) {
l++;
}
if (!closer(points[r], points[pivot])) {
r--;
}
if (farther(points[l], points[pivot]) && closer(points[r], points[pivot])) {
swap(points[l++], points[r--]);
}
}
swap(points[pivot], points[r]);
return r;
}
*/
};
//multiset
class Solution {
public:
vector<vector<int>> kClosest(vector<vector<int>>& points, int K) {
multiset<vector<int>, compare> mset;
for (vector<int>& point : points) {
mset.insert(point);
if (mset.size() > K) {
mset.erase(mset.begin());
}
}
vector<vector<int>> ans;
copy_n(mset.begin(), K, back_inserter(ans));
return ans;
}
private:
struct compare {
bool operator()(const vector<int>& p, const vector<int>& q) const {
return p[0] * p[0] + p[1] * p[1] > q[0] * q[0] + q[1] * q[1];
}
};
};
class Solution {
public:
vector<vector<int>> kClosest(vector<vector<int>>& points, int K) {
multiset<vector<int>, compare> mset(points.begin(), points.end());
vector<vector<int>> ans;
copy_n(mset.begin(), K, back_inserter(ans));
return ans;
}
private:
struct compare {
bool operator()(const vector<int>& p, const vector<int>& q) const {
return p[0] * p[0] + p[1] * p[1] < q[0] * q[0] + q[1] * q[1];
}
};
};
|
//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// 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)
//
// Official repository: https://github.com/CPPAlliance/url
//
// Test that header file is self-contained.
#include <boost/url/rfc/userinfo_bnf.hpp>
#include <boost/url/bnf/parse.hpp>
#include "test_suite.hpp"
#include "test_bnf.hpp"
namespace boost {
namespace urls {
class userinfo_bnf_test
{
public:
void
check(
string_view s,
string_view s1,
optional<
string_view> s2)
{
using urls::detail::throw_system_error;
userinfo_bnf p;
error_code ec;
using bnf::parse;
if(! BOOST_TEST(
parse(s, ec, p)))
return;
if(! BOOST_TEST(! ec))
return;
BOOST_TEST(p.str == s);
BOOST_TEST(p.username.str == s1);
if(s2.has_value())
BOOST_TEST(
p.password.has_value() &&
p.password->str == *s2);
else
BOOST_TEST(! p.password.has_value());
}
void
run()
{
using T = userinfo_bnf;
bad<T> ("@");
good<T>("");
good<T>("x");
good<T>("xy");
good<T>("x:");
good<T>("x:y");
good<T>("x:y:");
good<T>("x:y:z");
good<T>("%41");
using U =
optional<string_view>;
check("x", "x", boost::none);
check("x:", "x", U(""));
check(":", "", U(""));
check("::", "", U(":"));
check(":x", "", U("x"));
check("x:y", "x", U("y"));
check("xy:zz:", "xy", U("zz:"));
check(
"%41%42:%43%44", "%41%42", U("%43%44"));
}
};
TEST_SUITE(
userinfo_bnf_test,
"boost.url.userinfo_bnf");
} // urls
} // boost
|
// Floating Temple
// Copyright 2015 Derek S. Snyder
//
// 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 "util/stl_util.h"
#include <vector>
#include "base/logging.h"
#include "third_party/gmock-1.7.0/gtest/include/gtest/gtest.h"
using google::InitGoogleLogging;
using google::ParseCommandLineFlags;
using std::vector;
using testing::InitGoogleTest;
namespace floating_temple {
namespace {
TEST(StlUtilTest, SimpleTest) {
vector<int> vect(5);
vect[0] = 1;
vect[1] = 2;
vect[2] = 3;
vect[3] = 4;
vect[4] = 5;
// Const version
EXPECT_EQ(3, *FindInContainer(static_cast<const vector<int>*>(&vect), 3));
// Non-const version
EXPECT_EQ(3, *FindInContainer(static_cast<vector<int>*>(&vect), 3));
}
} // namespace
} // namespace floating_temple
int main(int argc, char** argv) {
ParseCommandLineFlags(&argc, &argv, true);
InitGoogleLogging(argv[0]);
InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
|
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkGpuDevice.h"
#include "GrBitmapTextureMaker.h"
#include "GrBlurUtils.h"
#include "GrContext.h"
#include "GrGpu.h"
#include "GrImageTextureMaker.h"
#include "GrRenderTargetContextPriv.h"
#include "GrStyle.h"
#include "GrTextureAdjuster.h"
#include "GrTracing.h"
#include "SkCanvasPriv.h"
#include "SkDraw.h"
#include "SkGlyphCache.h"
#include "SkGr.h"
#include "SkGrPriv.h"
#include "SkImage_Base.h"
#include "SkImageCacherator.h"
#include "SkImageFilter.h"
#include "SkImageFilterCache.h"
#include "SkLatticeIter.h"
#include "SkMaskFilter.h"
#include "SkPathEffect.h"
#include "SkPicture.h"
#include "SkPictureData.h"
#include "SkRasterClip.h"
#include "SkRRect.h"
#include "SkRecord.h"
#include "SkSpecialImage.h"
#include "SkStroke.h"
#include "SkSurface.h"
#include "SkSurface_Gpu.h"
#include "SkTLazy.h"
#include "SkUtils.h"
#include "SkVertState.h"
#include "batches/GrRectBatchFactory.h"
#include "effects/GrBicubicEffect.h"
#include "effects/GrDashingEffect.h"
#include "effects/GrSimpleTextureEffect.h"
#include "effects/GrTextureDomain.h"
#include "text/GrTextUtils.h"
#if SK_SUPPORT_GPU
#define ASSERT_SINGLE_OWNER \
SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fContext->debugSingleOwner());)
#if 0
extern bool (*gShouldDrawProc)();
#define CHECK_SHOULD_DRAW(draw) \
do { \
if (gShouldDrawProc && !gShouldDrawProc()) return; \
this->prepareDraw(draw); \
} while (0)
#else
#define CHECK_SHOULD_DRAW(draw) this->prepareDraw(draw)
#endif
///////////////////////////////////////////////////////////////////////////////
/** Checks that the alpha type is legal and gets constructor flags. Returns false if device creation
should fail. */
bool SkGpuDevice::CheckAlphaTypeAndGetFlags(
const SkImageInfo* info, SkGpuDevice::InitContents init, unsigned* flags) {
*flags = 0;
if (info) {
switch (info->alphaType()) {
case kPremul_SkAlphaType:
break;
case kOpaque_SkAlphaType:
*flags |= SkGpuDevice::kIsOpaque_Flag;
break;
default: // If it is unpremul or unknown don't try to render
return false;
}
}
if (kClear_InitContents == init) {
*flags |= kNeedClear_Flag;
}
return true;
}
sk_sp<SkGpuDevice> SkGpuDevice::Make(GrContext* context,
sk_sp<GrRenderTargetContext> renderTargetContext,
int width, int height,
InitContents init) {
if (!renderTargetContext || renderTargetContext->wasAbandoned()) {
return nullptr;
}
unsigned flags;
if (!CheckAlphaTypeAndGetFlags(nullptr, init, &flags)) {
return nullptr;
}
return sk_sp<SkGpuDevice>(new SkGpuDevice(context, std::move(renderTargetContext),
width, height, flags));
}
sk_sp<SkGpuDevice> SkGpuDevice::Make(GrContext* context, SkBudgeted budgeted,
const SkImageInfo& info, int sampleCount,
GrSurfaceOrigin origin,
const SkSurfaceProps* props, InitContents init) {
unsigned flags;
if (!CheckAlphaTypeAndGetFlags(&info, init, &flags)) {
return nullptr;
}
sk_sp<GrRenderTargetContext> renderTargetContext(MakeRenderTargetContext(context, budgeted,
info, sampleCount,
origin, props));
if (!renderTargetContext) {
return nullptr;
}
return sk_sp<SkGpuDevice>(new SkGpuDevice(context, std::move(renderTargetContext),
info.width(), info.height(), flags));
}
static SkImageInfo make_info(GrRenderTargetContext* context, int w, int h, bool opaque) {
SkColorType colorType;
if (!GrPixelConfigToColorType(context->config(), &colorType)) {
colorType = kUnknown_SkColorType;
}
return SkImageInfo::Make(w, h, colorType,
opaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType,
sk_ref_sp(context->getColorSpace()));
}
SkGpuDevice::SkGpuDevice(GrContext* context, sk_sp<GrRenderTargetContext> renderTargetContext,
int width, int height, unsigned flags)
: INHERITED(make_info(renderTargetContext.get(), width, height,
SkToBool(flags & kIsOpaque_Flag)), renderTargetContext->surfaceProps())
, fContext(SkRef(context))
, fRenderTargetContext(std::move(renderTargetContext))
{
fSize.set(width, height);
fOpaque = SkToBool(flags & kIsOpaque_Flag);
if (flags & kNeedClear_Flag) {
this->clearAll();
}
}
sk_sp<GrRenderTargetContext> SkGpuDevice::MakeRenderTargetContext(
GrContext* context,
SkBudgeted budgeted,
const SkImageInfo& origInfo,
int sampleCount,
GrSurfaceOrigin origin,
const SkSurfaceProps* surfaceProps) {
if (kUnknown_SkColorType == origInfo.colorType() ||
origInfo.width() < 0 || origInfo.height() < 0) {
return nullptr;
}
if (!context) {
return nullptr;
}
SkColorType ct = origInfo.colorType();
SkAlphaType at = origInfo.alphaType();
SkColorSpace* cs = origInfo.colorSpace();
if (kRGB_565_SkColorType == ct || kGray_8_SkColorType == ct) {
at = kOpaque_SkAlphaType; // force this setting
}
if (kOpaque_SkAlphaType != at) {
at = kPremul_SkAlphaType; // force this setting
}
GrPixelConfig config = SkImageInfo2GrPixelConfig(ct, at, cs, *context->caps());
return context->makeRenderTargetContext(SkBackingFit::kExact, // Why exact?
origInfo.width(), origInfo.height(),
config, sk_ref_sp(cs), sampleCount,
origin, surfaceProps, budgeted);
}
sk_sp<SkSpecialImage> SkGpuDevice::filterTexture(const SkDraw& draw,
SkSpecialImage* srcImg,
int left, int top,
SkIPoint* offset,
const SkImageFilter* filter) {
SkASSERT(srcImg->isTextureBacked());
SkASSERT(filter);
SkMatrix matrix = *draw.fMatrix;
matrix.postTranslate(SkIntToScalar(-left), SkIntToScalar(-top));
const SkIRect clipBounds = draw.fRC->getBounds().makeOffset(-left, -top);
sk_sp<SkImageFilterCache> cache(this->getImageFilterCache());
SkImageFilter::OutputProperties outputProperties(fRenderTargetContext->getColorSpace());
SkImageFilter::Context ctx(matrix, clipBounds, cache.get(), outputProperties);
return filter->filterImage(srcImg, ctx, offset);
}
///////////////////////////////////////////////////////////////////////////////
bool SkGpuDevice::onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
int x, int y) {
ASSERT_SINGLE_OWNER
return fRenderTargetContext->readPixels(dstInfo, dstPixels, dstRowBytes, x, y);
}
bool SkGpuDevice::onWritePixels(const SkImageInfo& srcInfo, const void* srcPixels,
size_t srcRowBytes, int x, int y) {
ASSERT_SINGLE_OWNER
return fRenderTargetContext->writePixels(srcInfo, srcPixels, srcRowBytes, x, y);
}
bool SkGpuDevice::onAccessPixels(SkPixmap* pmap) {
ASSERT_SINGLE_OWNER
return false;
}
// call this every draw call, to ensure that the context reflects our state,
// and not the state from some other canvas/device
void SkGpuDevice::prepareDraw(const SkDraw& draw) {
ASSERT_SINGLE_OWNER
fClip.reset(draw.fClipStack, &this->getOrigin());
}
GrRenderTargetContext* SkGpuDevice::accessRenderTargetContext() {
ASSERT_SINGLE_OWNER
return fRenderTargetContext.get();
}
void SkGpuDevice::clearAll() {
ASSERT_SINGLE_OWNER
GrColor color = 0;
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "clearAll", fContext.get());
SkIRect rect = SkIRect::MakeWH(this->width(), this->height());
fRenderTargetContext->clear(&rect, color, true);
}
void SkGpuDevice::replaceRenderTargetContext(bool shouldRetainContent) {
ASSERT_SINGLE_OWNER
SkBudgeted budgeted = fRenderTargetContext->priv().isBudgeted();
sk_sp<GrRenderTargetContext> newRTC(MakeRenderTargetContext(
this->context(),
budgeted,
this->imageInfo(),
fRenderTargetContext->numColorSamples(),
fRenderTargetContext->origin(),
&this->surfaceProps()));
if (!newRTC) {
return;
}
if (shouldRetainContent) {
if (fRenderTargetContext->wasAbandoned()) {
return;
}
newRTC->copySurface(fRenderTargetContext->asTexture().get(),
SkIRect::MakeWH(this->width(), this->height()),
SkIPoint::Make(0, 0));
}
fRenderTargetContext = newRTC;
}
///////////////////////////////////////////////////////////////////////////////
void SkGpuDevice::drawPaint(const SkDraw& draw, const SkPaint& paint) {
ASSERT_SINGLE_OWNER
CHECK_SHOULD_DRAW(draw);
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPaint", fContext.get());
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), paint, *draw.fMatrix,
&grPaint)) {
return;
}
fRenderTargetContext->drawPaint(fClip, grPaint, *draw.fMatrix);
}
// must be in SkCanvas::PointMode order
static const GrPrimitiveType gPointMode2PrimitiveType[] = {
kPoints_GrPrimitiveType,
kLines_GrPrimitiveType,
kLineStrip_GrPrimitiveType
};
static inline bool is_int(float x) { return x == (float) sk_float_round2int(x); }
// suppress antialiasing on axis-aligned integer-coordinate lines
static bool needs_antialiasing(SkCanvas::PointMode mode, size_t count, const SkPoint pts[],
const SkMatrix& matrix) {
if (mode == SkCanvas::PointMode::kPoints_PointMode) {
return false;
}
if (count == 2) {
// We do not antialias horizontal or vertical lines along pixel centers, even when the ends
// of the line do not fully cover the first and last pixel of the line, which is slightly
// wrong.
if (!matrix.isScaleTranslate()) {
return true;
}
if (pts[0].fX == pts[1].fX) {
SkScalar x = matrix.getScaleX() * pts[0].fX + matrix.getTranslateX();
return !is_int(x + 0.5f);
}
if (pts[0].fY == pts[1].fY) {
SkScalar y = matrix.getScaleY() * pts[0].fY + matrix.getTranslateY();
return !is_int(y + 0.5f);
}
}
return true;
}
void SkGpuDevice::drawPoints(const SkDraw& draw, SkCanvas::PointMode mode,
size_t count, const SkPoint pts[], const SkPaint& paint) {
ASSERT_SINGLE_OWNER
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPoints", fContext.get());
CHECK_SHOULD_DRAW(draw);
SkScalar width = paint.getStrokeWidth();
if (width < 0) {
return;
}
if (paint.getPathEffect() && 2 == count && SkCanvas::kLines_PointMode == mode) {
GrStyle style(paint, SkPaint::kStroke_Style);
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), paint, *draw.fMatrix,
&grPaint)) {
return;
}
SkPath path;
path.setIsVolatile(true);
path.moveTo(pts[0]);
path.lineTo(pts[1]);
fRenderTargetContext->drawPath(fClip, grPaint, *draw.fMatrix, path, style);
return;
}
SkScalar scales[2];
bool isHairline = (0 == width) || (1 == width && draw.fMatrix->getMinMaxScales(scales) &&
SkScalarNearlyEqual(scales[0], 1.f) &&
SkScalarNearlyEqual(scales[1], 1.f));
// we only handle non-antialiased hairlines and paints without path effects or mask filters,
// else we let the SkDraw call our drawPath()
if (!isHairline || paint.getPathEffect() || paint.getMaskFilter() ||
(paint.isAntiAlias() && needs_antialiasing(mode, count, pts, *draw.fMatrix))) {
draw.drawPoints(mode, count, pts, paint, true);
return;
}
GrPrimitiveType primitiveType = gPointMode2PrimitiveType[mode];
const SkMatrix* viewMatrix = draw.fMatrix;
#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
// This offsetting in device space matches the expectations of the Android framework for non-AA
// points and lines.
SkMatrix tempMatrix;
if (GrIsPrimTypeLines(primitiveType) || kPoints_GrPrimitiveType == primitiveType) {
tempMatrix = *viewMatrix;
static const SkScalar kOffset = 0.063f; // Just greater than 1/16.
tempMatrix.postTranslate(kOffset, kOffset);
viewMatrix = &tempMatrix;
}
#endif
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), paint, *viewMatrix,
&grPaint)) {
return;
}
fRenderTargetContext->drawVertices(fClip,
grPaint,
*viewMatrix,
primitiveType,
SkToS32(count),
(SkPoint*)pts,
nullptr,
nullptr,
nullptr,
0);
}
///////////////////////////////////////////////////////////////////////////////
void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect, const SkPaint& paint) {
ASSERT_SINGLE_OWNER
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawRect", fContext.get());
CHECK_SHOULD_DRAW(draw);
// A couple reasons we might need to call drawPath.
if (paint.getMaskFilter() || paint.getPathEffect()) {
SkPath path;
path.setIsVolatile(true);
path.addRect(rect);
GrBlurUtils::drawPathWithMaskFilter(fContext.get(), fRenderTargetContext.get(),
fClip, path, paint,
*draw.fMatrix, nullptr,
draw.fRC->getBounds(), true);
return;
}
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), paint, *draw.fMatrix,
&grPaint)) {
return;
}
GrStyle style(paint);
fRenderTargetContext->drawRect(fClip, grPaint, *draw.fMatrix, rect, &style);
}
///////////////////////////////////////////////////////////////////////////////
void SkGpuDevice::drawRRect(const SkDraw& draw, const SkRRect& rrect,
const SkPaint& paint) {
ASSERT_SINGLE_OWNER
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawRRect", fContext.get());
CHECK_SHOULD_DRAW(draw);
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), paint, *draw.fMatrix,
&grPaint)) {
return;
}
SkMaskFilter* mf = paint.getMaskFilter();
if (mf && mf->asFragmentProcessor(nullptr, nullptr, *draw.fMatrix)) {
mf = nullptr; // already handled in SkPaintToGrPaint
}
GrStyle style(paint);
if (mf) {
// try to hit the fast path for drawing filtered round rects
SkRRect devRRect;
if (rrect.transform(*draw.fMatrix, &devRRect)) {
if (devRRect.allCornersCircular()) {
SkRect maskRect;
if (mf->canFilterMaskGPU(devRRect, draw.fRC->getBounds(),
*draw.fMatrix, &maskRect)) {
SkIRect finalIRect;
maskRect.roundOut(&finalIRect);
if (draw.fRC->quickReject(finalIRect)) {
// clipped out
return;
}
if (mf->directFilterRRectMaskGPU(fContext.get(), fRenderTargetContext.get(),
&grPaint, fClip, *draw.fMatrix,
style.strokeRec(), rrect, devRRect)) {
return;
}
}
}
}
}
if (mf || style.pathEffect()) {
// The only mask filter the native rrect drawing code could've handle was taken
// care of above.
// A path effect will presumably transform this rrect into something else.
SkPath path;
path.setIsVolatile(true);
path.addRRect(rrect);
GrBlurUtils::drawPathWithMaskFilter(fContext.get(), fRenderTargetContext.get(),
fClip, path, paint,
*draw.fMatrix, nullptr,
draw.fRC->getBounds(), true);
return;
}
SkASSERT(!style.pathEffect());
fRenderTargetContext->drawRRect(fClip, grPaint, *draw.fMatrix, rrect, style);
}
void SkGpuDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer,
const SkRRect& inner, const SkPaint& paint) {
ASSERT_SINGLE_OWNER
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawDRRect", fContext.get());
CHECK_SHOULD_DRAW(draw);
if (outer.isEmpty()) {
return;
}
if (inner.isEmpty()) {
return this->drawRRect(draw, outer, paint);
}
SkStrokeRec stroke(paint);
if (stroke.isFillStyle() && !paint.getMaskFilter() && !paint.getPathEffect()) {
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), paint, *draw.fMatrix,
&grPaint)) {
return;
}
fRenderTargetContext->drawDRRect(fClip, grPaint, *draw.fMatrix, outer, inner);
return;
}
SkPath path;
path.setIsVolatile(true);
path.addRRect(outer);
path.addRRect(inner);
path.setFillType(SkPath::kEvenOdd_FillType);
GrBlurUtils::drawPathWithMaskFilter(fContext.get(), fRenderTargetContext.get(),
fClip, path, paint,
*draw.fMatrix, nullptr,
draw.fRC->getBounds(), true);
}
/////////////////////////////////////////////////////////////////////////////
void SkGpuDevice::drawRegion(const SkDraw& draw, const SkRegion& region, const SkPaint& paint) {
if (paint.getMaskFilter()) {
SkPath path;
region.getBoundaryPath(&path);
return this->drawPath(draw, path, paint, nullptr, false);
}
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), paint, *draw.fMatrix,
&grPaint)) {
return;
}
fRenderTargetContext->drawRegion(fClip, grPaint, *draw.fMatrix, region, GrStyle(paint));
}
void SkGpuDevice::drawOval(const SkDraw& draw, const SkRect& oval, const SkPaint& paint) {
ASSERT_SINGLE_OWNER
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawOval", fContext.get());
CHECK_SHOULD_DRAW(draw);
// Presumably the path effect warps this to something other than an oval
if (paint.getPathEffect()) {
SkPath path;
path.setIsVolatile(true);
path.addOval(oval);
this->drawPath(draw, path, paint, nullptr, true);
return;
}
if (paint.getMaskFilter()) {
// The RRect path can handle special case blurring
SkRRect rr = SkRRect::MakeOval(oval);
return this->drawRRect(draw, rr, paint);
}
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), paint, *draw.fMatrix,
&grPaint)) {
return;
}
fRenderTargetContext->drawOval(fClip, grPaint, *draw.fMatrix, oval, GrStyle(paint));
}
void SkGpuDevice::drawArc(const SkDraw& draw, const SkRect& oval, SkScalar startAngle,
SkScalar sweepAngle, bool useCenter, const SkPaint& paint) {
ASSERT_SINGLE_OWNER
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawArc", fContext.get());
CHECK_SHOULD_DRAW(draw);
if (paint.getMaskFilter()) {
this->INHERITED::drawArc(draw, oval, startAngle, sweepAngle, useCenter, paint);
return;
}
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), paint, *draw.fMatrix,
&grPaint)) {
return;
}
fRenderTargetContext->drawArc(fClip, grPaint, *draw.fMatrix, oval, startAngle, sweepAngle,
useCenter, GrStyle(paint));
}
#include "SkMaskFilter.h"
///////////////////////////////////////////////////////////////////////////////
void SkGpuDevice::drawStrokedLine(const SkPoint points[2],
const SkDraw& draw,
const SkPaint& origPaint) {
ASSERT_SINGLE_OWNER
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawStrokedLine", fContext.get());
CHECK_SHOULD_DRAW(draw);
// Adding support for round capping would require a
// GrRenderTargetContext::fillRRectWithLocalMatrix entry point
SkASSERT(SkPaint::kRound_Cap != origPaint.getStrokeCap());
SkASSERT(SkPaint::kStroke_Style == origPaint.getStyle());
SkASSERT(!origPaint.getPathEffect());
SkASSERT(!origPaint.getMaskFilter());
const SkScalar halfWidth = 0.5f * origPaint.getStrokeWidth();
SkASSERT(halfWidth > 0);
SkVector v = points[1] - points[0];
SkScalar length = SkPoint::Normalize(&v);
if (!length) {
v.fX = 1.0f;
v.fY = 0.0f;
}
SkPaint newPaint(origPaint);
newPaint.setStyle(SkPaint::kFill_Style);
SkScalar xtraLength = 0.0f;
if (SkPaint::kButt_Cap != origPaint.getStrokeCap()) {
xtraLength = halfWidth;
}
SkPoint mid = points[0] + points[1];
mid.scale(0.5f);
SkRect rect = SkRect::MakeLTRB(mid.fX-halfWidth, mid.fY - 0.5f*length - xtraLength,
mid.fX+halfWidth, mid.fY + 0.5f*length + xtraLength);
SkMatrix m;
m.setSinCos(v.fX, -v.fY, mid.fX, mid.fY);
SkMatrix local = m;
m.postConcat(*draw.fMatrix);
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), newPaint, m, &grPaint)) {
return;
}
fRenderTargetContext->fillRectWithLocalMatrix(fClip, grPaint, m, rect, local);
}
void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath,
const SkPaint& paint, const SkMatrix* prePathMatrix,
bool pathIsMutable) {
ASSERT_SINGLE_OWNER
if (!origSrcPath.isInverseFillType() && !paint.getPathEffect() && !prePathMatrix) {
SkPoint points[2];
if (SkPaint::kStroke_Style == paint.getStyle() && paint.getStrokeWidth() > 0 &&
!paint.getMaskFilter() && SkPaint::kRound_Cap != paint.getStrokeCap() &&
draw.fMatrix->preservesRightAngles() && origSrcPath.isLine(points)) {
// Path-based stroking looks better for thin rects
SkScalar strokeWidth = draw.fMatrix->getMaxScale() * paint.getStrokeWidth();
if (strokeWidth >= 1.0f) {
// Round capping support is currently disabled b.c. it would require
// a RRect batch that takes a localMatrix.
this->drawStrokedLine(points, draw, paint);
return;
}
}
bool isClosed;
SkRect rect;
if (origSrcPath.isRect(&rect, &isClosed) && isClosed) {
this->drawRect(draw, rect, paint);
return;
}
if (origSrcPath.isOval(&rect)) {
this->drawOval(draw, rect, paint);
return;
}
SkRRect rrect;
if (origSrcPath.isRRect(&rrect)) {
this->drawRRect(draw, rrect, paint);
return;
}
}
CHECK_SHOULD_DRAW(draw);
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPath", fContext.get());
GrBlurUtils::drawPathWithMaskFilter(fContext.get(), fRenderTargetContext.get(),
fClip, origSrcPath, paint,
*draw.fMatrix, prePathMatrix,
draw.fRC->getBounds(), pathIsMutable);
}
static const int kBmpSmallTileSize = 1 << 10;
static inline int get_tile_count(const SkIRect& srcRect, int tileSize) {
int tilesX = (srcRect.fRight / tileSize) - (srcRect.fLeft / tileSize) + 1;
int tilesY = (srcRect.fBottom / tileSize) - (srcRect.fTop / tileSize) + 1;
return tilesX * tilesY;
}
static int determine_tile_size(const SkIRect& src, int maxTileSize) {
if (maxTileSize <= kBmpSmallTileSize) {
return maxTileSize;
}
size_t maxTileTotalTileSize = get_tile_count(src, maxTileSize);
size_t smallTotalTileSize = get_tile_count(src, kBmpSmallTileSize);
maxTileTotalTileSize *= maxTileSize * maxTileSize;
smallTotalTileSize *= kBmpSmallTileSize * kBmpSmallTileSize;
if (maxTileTotalTileSize > 2 * smallTotalTileSize) {
return kBmpSmallTileSize;
} else {
return maxTileSize;
}
}
// Given a bitmap, an optional src rect, and a context with a clip and matrix determine what
// pixels from the bitmap are necessary.
static void determine_clipped_src_rect(int width, int height,
const GrClip& clip,
const SkMatrix& viewMatrix,
const SkMatrix& srcToDstRect,
const SkISize& imageSize,
const SkRect* srcRectPtr,
SkIRect* clippedSrcIRect) {
clip.getConservativeBounds(width, height, clippedSrcIRect, nullptr);
SkMatrix inv = SkMatrix::Concat(viewMatrix, srcToDstRect);
if (!inv.invert(&inv)) {
clippedSrcIRect->setEmpty();
return;
}
SkRect clippedSrcRect = SkRect::Make(*clippedSrcIRect);
inv.mapRect(&clippedSrcRect);
if (srcRectPtr) {
if (!clippedSrcRect.intersect(*srcRectPtr)) {
clippedSrcIRect->setEmpty();
return;
}
}
clippedSrcRect.roundOut(clippedSrcIRect);
SkIRect bmpBounds = SkIRect::MakeSize(imageSize);
if (!clippedSrcIRect->intersect(bmpBounds)) {
clippedSrcIRect->setEmpty();
}
}
bool SkGpuDevice::shouldTileImageID(uint32_t imageID, const SkIRect& imageRect,
const SkMatrix& viewMatrix,
const SkMatrix& srcToDstRect,
const GrSamplerParams& params,
const SkRect* srcRectPtr,
int maxTileSize,
int* tileSize,
SkIRect* clippedSubset) const {
ASSERT_SINGLE_OWNER
// if it's larger than the max tile size, then we have no choice but tiling.
if (imageRect.width() > maxTileSize || imageRect.height() > maxTileSize) {
determine_clipped_src_rect(fRenderTargetContext->width(), fRenderTargetContext->height(),
fClip, viewMatrix, srcToDstRect, imageRect.size(), srcRectPtr,
clippedSubset);
*tileSize = determine_tile_size(*clippedSubset, maxTileSize);
return true;
}
// If the image would only produce 4 tiles of the smaller size, don't bother tiling it.
const size_t area = imageRect.width() * imageRect.height();
if (area < 4 * kBmpSmallTileSize * kBmpSmallTileSize) {
return false;
}
// At this point we know we could do the draw by uploading the entire bitmap
// as a texture. However, if the texture would be large compared to the
// cache size and we don't require most of it for this draw then tile to
// reduce the amount of upload and cache spill.
// assumption here is that sw bitmap size is a good proxy for its size as
// a texture
size_t bmpSize = area * sizeof(SkPMColor); // assume 32bit pixels
size_t cacheSize;
fContext->getResourceCacheLimits(nullptr, &cacheSize);
if (bmpSize < cacheSize / 2) {
return false;
}
// Figure out how much of the src we will need based on the src rect and clipping. Reject if
// tiling memory savings would be < 50%.
determine_clipped_src_rect(fRenderTargetContext->width(), fRenderTargetContext->height(), fClip,
viewMatrix, srcToDstRect, imageRect.size(), srcRectPtr,
clippedSubset);
*tileSize = kBmpSmallTileSize; // already know whole bitmap fits in one max sized tile.
size_t usedTileBytes = get_tile_count(*clippedSubset, kBmpSmallTileSize) *
kBmpSmallTileSize * kBmpSmallTileSize;
return usedTileBytes < 2 * bmpSize;
}
bool SkGpuDevice::shouldTileImage(const SkImage* image, const SkRect* srcRectPtr,
SkCanvas::SrcRectConstraint constraint, SkFilterQuality quality,
const SkMatrix& viewMatrix,
const SkMatrix& srcToDstRect) const {
ASSERT_SINGLE_OWNER
// if image is explictly texture backed then just use the texture
if (as_IB(image)->peekTexture()) {
return false;
}
GrSamplerParams params;
bool doBicubic;
GrSamplerParams::FilterMode textureFilterMode =
GrSkFilterQualityToGrFilterMode(quality, viewMatrix, srcToDstRect, &doBicubic);
int tileFilterPad;
if (doBicubic) {
tileFilterPad = GrBicubicEffect::kFilterTexelPad;
} else if (GrSamplerParams::kNone_FilterMode == textureFilterMode) {
tileFilterPad = 0;
} else {
tileFilterPad = 1;
}
params.setFilterMode(textureFilterMode);
int maxTileSize = fContext->caps()->maxTileSize() - 2 * tileFilterPad;
// these are output, which we safely ignore, as we just want to know the predicate
int outTileSize;
SkIRect outClippedSrcRect;
return this->shouldTileImageID(image->unique(), image->bounds(), viewMatrix, srcToDstRect,
params, srcRectPtr, maxTileSize, &outTileSize,
&outClippedSrcRect);
}
void SkGpuDevice::drawBitmap(const SkDraw& origDraw,
const SkBitmap& bitmap,
const SkMatrix& m,
const SkPaint& paint) {
ASSERT_SINGLE_OWNER
CHECK_SHOULD_DRAW(origDraw);
SkMatrix viewMatrix;
viewMatrix.setConcat(*origDraw.fMatrix, m);
int maxTileSize = fContext->caps()->maxTileSize();
// The tile code path doesn't currently support AA, so if the paint asked for aa and we could
// draw untiled, then we bypass checking for tiling purely for optimization reasons.
bool drawAA = !fRenderTargetContext->isUnifiedMultisampled() &&
paint.isAntiAlias() &&
bitmap.width() <= maxTileSize &&
bitmap.height() <= maxTileSize;
bool skipTileCheck = drawAA || paint.getMaskFilter();
if (!skipTileCheck) {
SkRect srcRect = SkRect::MakeIWH(bitmap.width(), bitmap.height());
int tileSize;
SkIRect clippedSrcRect;
GrSamplerParams params;
bool doBicubic;
GrSamplerParams::FilterMode textureFilterMode =
GrSkFilterQualityToGrFilterMode(paint.getFilterQuality(), viewMatrix, SkMatrix::I(),
&doBicubic);
int tileFilterPad;
if (doBicubic) {
tileFilterPad = GrBicubicEffect::kFilterTexelPad;
} else if (GrSamplerParams::kNone_FilterMode == textureFilterMode) {
tileFilterPad = 0;
} else {
tileFilterPad = 1;
}
params.setFilterMode(textureFilterMode);
int maxTileSizeForFilter = fContext->caps()->maxTileSize() - 2 * tileFilterPad;
if (this->shouldTileImageID(bitmap.getGenerationID(), bitmap.getSubset(), viewMatrix,
SkMatrix::I(), params, &srcRect, maxTileSizeForFilter,
&tileSize, &clippedSrcRect)) {
this->drawTiledBitmap(bitmap, viewMatrix, SkMatrix::I(), srcRect, clippedSrcRect,
params, paint, SkCanvas::kStrict_SrcRectConstraint, tileSize,
doBicubic);
return;
}
}
GrBitmapTextureMaker maker(fContext.get(), bitmap);
this->drawTextureProducer(&maker, nullptr, nullptr, SkCanvas::kStrict_SrcRectConstraint,
viewMatrix, fClip, paint);
}
// This method outsets 'iRect' by 'outset' all around and then clamps its extents to
// 'clamp'. 'offset' is adjusted to remain positioned over the top-left corner
// of 'iRect' for all possible outsets/clamps.
static inline void clamped_outset_with_offset(SkIRect* iRect,
int outset,
SkPoint* offset,
const SkIRect& clamp) {
iRect->outset(outset, outset);
int leftClampDelta = clamp.fLeft - iRect->fLeft;
if (leftClampDelta > 0) {
offset->fX -= outset - leftClampDelta;
iRect->fLeft = clamp.fLeft;
} else {
offset->fX -= outset;
}
int topClampDelta = clamp.fTop - iRect->fTop;
if (topClampDelta > 0) {
offset->fY -= outset - topClampDelta;
iRect->fTop = clamp.fTop;
} else {
offset->fY -= outset;
}
if (iRect->fRight > clamp.fRight) {
iRect->fRight = clamp.fRight;
}
if (iRect->fBottom > clamp.fBottom) {
iRect->fBottom = clamp.fBottom;
}
}
// Break 'bitmap' into several tiles to draw it since it has already
// been determined to be too large to fit in VRAM
void SkGpuDevice::drawTiledBitmap(const SkBitmap& bitmap,
const SkMatrix& viewMatrix,
const SkMatrix& dstMatrix,
const SkRect& srcRect,
const SkIRect& clippedSrcIRect,
const GrSamplerParams& params,
const SkPaint& origPaint,
SkCanvas::SrcRectConstraint constraint,
int tileSize,
bool bicubic) {
ASSERT_SINGLE_OWNER
// This is the funnel for all paths that draw tiled bitmaps/images. Log histogram entries.
SK_HISTOGRAM_BOOLEAN("DrawTiled", true);
LogDrawScaleFactor(viewMatrix, origPaint.getFilterQuality());
// The following pixel lock is technically redundant, but it is desirable
// to lock outside of the tile loop to prevent redecoding the whole image
// at each tile in cases where 'bitmap' holds an SkDiscardablePixelRef that
// is larger than the limit of the discardable memory pool.
SkAutoLockPixels alp(bitmap);
const SkPaint* paint = &origPaint;
SkPaint tempPaint;
if (origPaint.isAntiAlias() && !fRenderTargetContext->isUnifiedMultisampled()) {
// Drop antialiasing to avoid seams at tile boundaries.
tempPaint = origPaint;
tempPaint.setAntiAlias(false);
paint = &tempPaint;
}
SkRect clippedSrcRect = SkRect::Make(clippedSrcIRect);
int nx = bitmap.width() / tileSize;
int ny = bitmap.height() / tileSize;
for (int x = 0; x <= nx; x++) {
for (int y = 0; y <= ny; y++) {
SkRect tileR;
tileR.set(SkIntToScalar(x * tileSize),
SkIntToScalar(y * tileSize),
SkIntToScalar((x + 1) * tileSize),
SkIntToScalar((y + 1) * tileSize));
if (!SkRect::Intersects(tileR, clippedSrcRect)) {
continue;
}
if (!tileR.intersect(srcRect)) {
continue;
}
SkIRect iTileR;
tileR.roundOut(&iTileR);
SkVector offset = SkPoint::Make(SkIntToScalar(iTileR.fLeft),
SkIntToScalar(iTileR.fTop));
SkRect rectToDraw = SkRect::MakeXYWH(offset.fX, offset.fY,
tileR.width(), tileR.height());
dstMatrix.mapRect(&rectToDraw);
if (GrSamplerParams::kNone_FilterMode != params.filterMode() || bicubic) {
SkIRect iClampRect;
if (SkCanvas::kFast_SrcRectConstraint == constraint) {
// In bleed mode we want to always expand the tile on all edges
// but stay within the bitmap bounds
iClampRect = SkIRect::MakeWH(bitmap.width(), bitmap.height());
} else {
// In texture-domain/clamp mode we only want to expand the
// tile on edges interior to "srcRect" (i.e., we want to
// not bleed across the original clamped edges)
srcRect.roundOut(&iClampRect);
}
int outset = bicubic ? GrBicubicEffect::kFilterTexelPad : 1;
clamped_outset_with_offset(&iTileR, outset, &offset, iClampRect);
}
SkBitmap tmpB;
if (bitmap.extractSubset(&tmpB, iTileR)) {
// now offset it to make it "local" to our tmp bitmap
tileR.offset(-offset.fX, -offset.fY);
GrSamplerParams paramsTemp = params;
// de-optimized this determination
bool needsTextureDomain = true;
this->drawBitmapTile(tmpB,
viewMatrix,
rectToDraw,
tileR,
paramsTemp,
*paint,
constraint,
bicubic,
needsTextureDomain);
}
}
}
}
void SkGpuDevice::drawBitmapTile(const SkBitmap& bitmap,
const SkMatrix& viewMatrix,
const SkRect& dstRect,
const SkRect& srcRect,
const GrSamplerParams& params,
const SkPaint& paint,
SkCanvas::SrcRectConstraint constraint,
bool bicubic,
bool needsTextureDomain) {
// We should have already handled bitmaps larger than the max texture size.
SkASSERT(bitmap.width() <= fContext->caps()->maxTextureSize() &&
bitmap.height() <= fContext->caps()->maxTextureSize());
// We should be respecting the max tile size by the time we get here.
SkASSERT(bitmap.width() <= fContext->caps()->maxTileSize() &&
bitmap.height() <= fContext->caps()->maxTileSize());
sk_sp<GrTexture> texture = GrMakeCachedBitmapTexture(
fContext.get(), bitmap, params, fRenderTargetContext->colorMode());
if (nullptr == texture) {
return;
}
sk_sp<GrColorSpaceXform> colorSpaceXform =
GrColorSpaceXform::Make(bitmap.colorSpace(), fRenderTargetContext->getColorSpace());
SkScalar iw = 1.f / texture->width();
SkScalar ih = 1.f / texture->height();
SkMatrix texMatrix;
// Compute a matrix that maps the rect we will draw to the src rect.
texMatrix.setRectToRect(dstRect, srcRect, SkMatrix::kFill_ScaleToFit);
texMatrix.postScale(iw, ih);
// Construct a GrPaint by setting the bitmap texture as the first effect and then configuring
// the rest from the SkPaint.
sk_sp<GrFragmentProcessor> fp;
if (needsTextureDomain && (SkCanvas::kStrict_SrcRectConstraint == constraint)) {
// Use a constrained texture domain to avoid color bleeding
SkRect domain;
if (srcRect.width() > SK_Scalar1) {
domain.fLeft = (srcRect.fLeft + 0.5f) * iw;
domain.fRight = (srcRect.fRight - 0.5f) * iw;
} else {
domain.fLeft = domain.fRight = srcRect.centerX() * iw;
}
if (srcRect.height() > SK_Scalar1) {
domain.fTop = (srcRect.fTop + 0.5f) * ih;
domain.fBottom = (srcRect.fBottom - 0.5f) * ih;
} else {
domain.fTop = domain.fBottom = srcRect.centerY() * ih;
}
if (bicubic) {
fp = GrBicubicEffect::Make(texture.get(), std::move(colorSpaceXform), texMatrix,
domain);
} else {
fp = GrTextureDomainEffect::Make(texture.get(), std::move(colorSpaceXform), texMatrix,
domain, GrTextureDomain::kClamp_Mode,
params.filterMode());
}
} else if (bicubic) {
SkASSERT(GrSamplerParams::kNone_FilterMode == params.filterMode());
SkShader::TileMode tileModes[2] = { params.getTileModeX(), params.getTileModeY() };
fp = GrBicubicEffect::Make(texture.get(), std::move(colorSpaceXform), texMatrix, tileModes);
} else {
fp = GrSimpleTextureEffect::Make(texture.get(), std::move(colorSpaceXform), texMatrix, params);
}
GrPaint grPaint;
if (!SkPaintToGrPaintWithTexture(this->context(), fRenderTargetContext.get(), paint, viewMatrix,
std::move(fp), kAlpha_8_SkColorType == bitmap.colorType(),
&grPaint)) {
return;
}
fRenderTargetContext->drawRect(fClip, grPaint, viewMatrix, dstRect);
}
void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap,
int left, int top, const SkPaint& paint) {
ASSERT_SINGLE_OWNER
CHECK_SHOULD_DRAW(draw);
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawSprite", fContext.get());
if (fContext->abandoned()) {
return;
}
sk_sp<GrTexture> texture;
{
SkAutoLockPixels alp(bitmap, true);
if (!bitmap.readyToDraw()) {
return;
}
// draw sprite neither filters nor tiles.
texture.reset(
GrRefCachedBitmapTexture(fContext.get(), bitmap, GrSamplerParams::ClampNoFilter(),
SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware));
if (!texture) {
return;
}
}
SkIRect srcRect = SkIRect::MakeXYWH(bitmap.pixelRefOrigin().fX,
bitmap.pixelRefOrigin().fY,
bitmap.width(),
bitmap.height());
sk_sp<SkSpecialImage> srcImg(SkSpecialImage::MakeFromGpu(srcRect,
bitmap.getGenerationID(),
std::move(texture),
sk_ref_sp(bitmap.colorSpace()),
&this->surfaceProps()));
this->drawSpecial(draw, srcImg.get(), left, top, paint);
}
void SkGpuDevice::drawSpecial(const SkDraw& draw,
SkSpecialImage* special1,
int left, int top,
const SkPaint& paint) {
ASSERT_SINGLE_OWNER
CHECK_SHOULD_DRAW(draw);
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawSpecial", fContext.get());
SkIPoint offset = { 0, 0 };
sk_sp<SkSpecialImage> result;
if (paint.getImageFilter()) {
result = this->filterTexture(draw, special1, left, top,
&offset,
paint.getImageFilter());
if (!result) {
return;
}
} else {
result = sk_ref_sp(special1);
}
SkASSERT(result->isTextureBacked());
sk_sp<GrTexture> texture = result->asTextureRef(fContext.get());
if (!texture) {
return;
}
SkPaint tmpUnfiltered(paint);
tmpUnfiltered.setImageFilter(nullptr);
sk_sp<GrColorSpaceXform> colorSpaceXform =
GrColorSpaceXform::Make(result->getColorSpace(), fRenderTargetContext->getColorSpace());
GrPaint grPaint;
sk_sp<GrFragmentProcessor> fp(GrSimpleTextureEffect::Make(texture.get(),
std::move(colorSpaceXform),
SkMatrix::I()));
if (GrPixelConfigIsAlphaOnly(texture->config())) {
fp = GrFragmentProcessor::MulOutputByInputUnpremulColor(std::move(fp));
} else {
fp = GrFragmentProcessor::MulOutputByInputAlpha(std::move(fp));
}
if (!SkPaintToGrPaintReplaceShader(this->context(), fRenderTargetContext.get(), tmpUnfiltered,
std::move(fp), &grPaint)) {
return;
}
const SkIRect& subset = result->subset();
fRenderTargetContext->fillRectToRect(fClip,
grPaint,
SkMatrix::I(),
SkRect::Make(SkIRect::MakeXYWH(left + offset.fX,
top + offset.fY,
subset.width(),
subset.height())),
SkRect::MakeXYWH(
SkIntToScalar(subset.fLeft) / texture->width(),
SkIntToScalar(subset.fTop) / texture->height(),
SkIntToScalar(subset.width()) / texture->width(),
SkIntToScalar(subset.height()) / texture->height()));
}
void SkGpuDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
const SkRect* src, const SkRect& origDst,
const SkPaint& paint, SkCanvas::SrcRectConstraint constraint) {
ASSERT_SINGLE_OWNER
CHECK_SHOULD_DRAW(draw);
// The src rect is inferred to be the bmp bounds if not provided. Otherwise, the src rect must
// be clipped to the bmp bounds. To determine tiling parameters we need the filter mode which
// in turn requires knowing the src-to-dst mapping. If the src was clipped to the bmp bounds
// then we use the src-to-dst mapping to compute a new clipped dst rect.
const SkRect* dst = &origDst;
const SkRect bmpBounds = SkRect::MakeIWH(bitmap.width(), bitmap.height());
// Compute matrix from the two rectangles
if (!src) {
src = &bmpBounds;
}
SkMatrix srcToDstMatrix;
if (!srcToDstMatrix.setRectToRect(*src, *dst, SkMatrix::kFill_ScaleToFit)) {
return;
}
SkRect tmpSrc, tmpDst;
if (src != &bmpBounds) {
if (!bmpBounds.contains(*src)) {
tmpSrc = *src;
if (!tmpSrc.intersect(bmpBounds)) {
return; // nothing to draw
}
src = &tmpSrc;
srcToDstMatrix.mapRect(&tmpDst, *src);
dst = &tmpDst;
}
}
int maxTileSize = fContext->caps()->maxTileSize();
// The tile code path doesn't currently support AA, so if the paint asked for aa and we could
// draw untiled, then we bypass checking for tiling purely for optimization reasons.
bool drawAA = !fRenderTargetContext->isUnifiedMultisampled() &&
paint.isAntiAlias() &&
bitmap.width() <= maxTileSize &&
bitmap.height() <= maxTileSize;
bool skipTileCheck = drawAA || paint.getMaskFilter();
if (!skipTileCheck) {
int tileSize;
SkIRect clippedSrcRect;
GrSamplerParams params;
bool doBicubic;
GrSamplerParams::FilterMode textureFilterMode =
GrSkFilterQualityToGrFilterMode(paint.getFilterQuality(), *draw.fMatrix, srcToDstMatrix,
&doBicubic);
int tileFilterPad;
if (doBicubic) {
tileFilterPad = GrBicubicEffect::kFilterTexelPad;
} else if (GrSamplerParams::kNone_FilterMode == textureFilterMode) {
tileFilterPad = 0;
} else {
tileFilterPad = 1;
}
params.setFilterMode(textureFilterMode);
int maxTileSizeForFilter = fContext->caps()->maxTileSize() - 2 * tileFilterPad;
if (this->shouldTileImageID(bitmap.getGenerationID(), bitmap.getSubset(), *draw.fMatrix,
srcToDstMatrix, params, src, maxTileSizeForFilter, &tileSize,
&clippedSrcRect)) {
this->drawTiledBitmap(bitmap, *draw.fMatrix, srcToDstMatrix, *src, clippedSrcRect,
params, paint, constraint, tileSize, doBicubic);
return;
}
}
GrBitmapTextureMaker maker(fContext.get(), bitmap);
this->drawTextureProducer(&maker, src, dst, constraint, *draw.fMatrix, fClip, paint);
}
sk_sp<SkSpecialImage> SkGpuDevice::makeSpecial(const SkBitmap& bitmap) {
SkAutoLockPixels alp(bitmap, true);
if (!bitmap.readyToDraw()) {
return nullptr;
}
sk_sp<GrTexture> texture =
GrMakeCachedBitmapTexture(fContext.get(), bitmap, GrSamplerParams::ClampNoFilter(),
SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware);
if (!texture) {
return nullptr;
}
return SkSpecialImage::MakeFromGpu(bitmap.bounds(),
bitmap.getGenerationID(),
texture,
sk_ref_sp(bitmap.colorSpace()),
&this->surfaceProps());
}
sk_sp<SkSpecialImage> SkGpuDevice::makeSpecial(const SkImage* image) {
SkPixmap pm;
if (image->isTextureBacked()) {
GrTexture* texture = as_IB(image)->peekTexture();
return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(image->width(), image->height()),
image->uniqueID(),
sk_ref_sp(texture),
sk_ref_sp(as_IB(image)->onImageInfo().colorSpace()),
&this->surfaceProps());
} else if (image->peekPixels(&pm)) {
SkBitmap bm;
bm.installPixels(pm);
return this->makeSpecial(bm);
} else {
return nullptr;
}
}
sk_sp<SkSpecialImage> SkGpuDevice::snapSpecial() {
sk_sp<GrTexture> texture(this->accessRenderTargetContext()->asTexture());
if (!texture) {
// When the device doesn't have a texture, we create a temporary texture.
// TODO: we should actually only copy the portion of the source needed to apply the image
// filter
texture.reset(fContext->textureProvider()->createTexture(
this->accessRenderTargetContext()->desc(), SkBudgeted::kYes));
if (!texture) {
return nullptr;
}
if (!fContext->copySurface(texture.get(),
this->accessRenderTargetContext()->accessRenderTarget())) {
return nullptr;
}
}
const SkImageInfo ii = this->imageInfo();
const SkIRect srcRect = SkIRect::MakeWH(ii.width(), ii.height());
return SkSpecialImage::MakeFromGpu(srcRect,
kNeedNewImageUniqueID_SpecialImage,
std::move(texture),
sk_ref_sp(ii.colorSpace()),
&this->surfaceProps());
}
void SkGpuDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device,
int left, int top, const SkPaint& paint) {
SkASSERT(!paint.getImageFilter());
ASSERT_SINGLE_OWNER
// clear of the source device must occur before CHECK_SHOULD_DRAW
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawDevice", fContext.get());
// drawDevice is defined to be in device coords.
CHECK_SHOULD_DRAW(draw);
SkGpuDevice* dev = static_cast<SkGpuDevice*>(device);
sk_sp<SkSpecialImage> srcImg(dev->snapSpecial());
if (!srcImg) {
return;
}
this->drawSpecial(draw, srcImg.get(), left, top, paint);
}
void SkGpuDevice::drawImage(const SkDraw& draw, const SkImage* image, SkScalar x, SkScalar y,
const SkPaint& paint) {
ASSERT_SINGLE_OWNER
SkMatrix viewMatrix = *draw.fMatrix;
viewMatrix.preTranslate(x, y);
uint32_t pinnedUniqueID;
if (sk_sp<GrTexture> tex = as_IB(image)->refPinnedTexture(&pinnedUniqueID)) {
CHECK_SHOULD_DRAW(draw);
GrTextureAdjuster adjuster(tex.get(), image->alphaType(), image->bounds(), pinnedUniqueID,
as_IB(image)->onImageInfo().colorSpace());
this->drawTextureProducer(&adjuster, nullptr, nullptr, SkCanvas::kFast_SrcRectConstraint,
viewMatrix, fClip, paint);
return;
} else {
SkBitmap bm;
if (this->shouldTileImage(image, nullptr, SkCanvas::kFast_SrcRectConstraint,
paint.getFilterQuality(), *draw.fMatrix, SkMatrix::I())) {
// only support tiling as bitmap at the moment, so force raster-version
if (!as_IB(image)->getROPixels(&bm, fRenderTargetContext->colorMode())) {
return;
}
this->drawBitmap(draw, bm, SkMatrix::MakeTrans(x, y), paint);
} else if (SkImageCacherator* cacher = as_IB(image)->peekCacherator()) {
CHECK_SHOULD_DRAW(draw);
GrImageTextureMaker maker(fContext.get(), cacher, image, SkImage::kAllow_CachingHint);
this->drawTextureProducer(&maker, nullptr, nullptr, SkCanvas::kFast_SrcRectConstraint,
viewMatrix, fClip, paint);
} else if (as_IB(image)->getROPixels(&bm, fRenderTargetContext->colorMode())) {
this->drawBitmap(draw, bm, SkMatrix::MakeTrans(x, y), paint);
}
}
}
void SkGpuDevice::drawImageRect(const SkDraw& draw, const SkImage* image, const SkRect* src,
const SkRect& dst, const SkPaint& paint,
SkCanvas::SrcRectConstraint constraint) {
ASSERT_SINGLE_OWNER
uint32_t pinnedUniqueID;
if (sk_sp<GrTexture> tex = as_IB(image)->refPinnedTexture(&pinnedUniqueID)) {
CHECK_SHOULD_DRAW(draw);
GrTextureAdjuster adjuster(tex.get(), image->alphaType(), image->bounds(), pinnedUniqueID,
as_IB(image)->onImageInfo().colorSpace());
this->drawTextureProducer(&adjuster, src, &dst, constraint, *draw.fMatrix, fClip, paint);
return;
}
SkBitmap bm;
SkMatrix srcToDstRect;
srcToDstRect.setRectToRect((src ? *src : SkRect::MakeIWH(image->width(), image->height())),
dst, SkMatrix::kFill_ScaleToFit);
if (this->shouldTileImage(image, src, constraint, paint.getFilterQuality(), *draw.fMatrix,
srcToDstRect)) {
// only support tiling as bitmap at the moment, so force raster-version
if (!as_IB(image)->getROPixels(&bm, fRenderTargetContext->colorMode())) {
return;
}
this->drawBitmapRect(draw, bm, src, dst, paint, constraint);
} else if (SkImageCacherator* cacher = as_IB(image)->peekCacherator()) {
CHECK_SHOULD_DRAW(draw);
GrImageTextureMaker maker(fContext.get(), cacher, image, SkImage::kAllow_CachingHint);
this->drawTextureProducer(&maker, src, &dst, constraint, *draw.fMatrix, fClip, paint);
} else if (as_IB(image)->getROPixels(&bm, fRenderTargetContext->colorMode())) {
this->drawBitmapRect(draw, bm, src, dst, paint, constraint);
}
}
void SkGpuDevice::drawProducerNine(const SkDraw& draw, GrTextureProducer* producer,
const SkIRect& center, const SkRect& dst, const SkPaint& paint) {
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawProducerNine", fContext.get());
CHECK_SHOULD_DRAW(draw);
bool useFallback = paint.getMaskFilter() || paint.isAntiAlias() ||
fRenderTargetContext->isUnifiedMultisampled();
bool doBicubic;
GrSamplerParams::FilterMode textureFilterMode =
GrSkFilterQualityToGrFilterMode(paint.getFilterQuality(), *draw.fMatrix, SkMatrix::I(),
&doBicubic);
if (useFallback || doBicubic || GrSamplerParams::kNone_FilterMode != textureFilterMode) {
SkLatticeIter iter(producer->width(), producer->height(), center, dst);
SkRect srcR, dstR;
while (iter.next(&srcR, &dstR)) {
this->drawTextureProducer(producer, &srcR, &dstR, SkCanvas::kStrict_SrcRectConstraint,
*draw.fMatrix, fClip, paint);
}
return;
}
static const GrSamplerParams::FilterMode kMode = GrSamplerParams::kNone_FilterMode;
sk_sp<GrFragmentProcessor> fp(
producer->createFragmentProcessor(SkMatrix::I(),
SkRect::MakeIWH(producer->width(), producer->height()),
GrTextureProducer::kNo_FilterConstraint, true,
&kMode, fRenderTargetContext->getColorSpace(),
fRenderTargetContext->colorMode()));
GrPaint grPaint;
if (!SkPaintToGrPaintWithTexture(this->context(), fRenderTargetContext.get(), paint,
*draw.fMatrix, std::move(fp), producer->isAlphaOnly(),
&grPaint)) {
return;
}
std::unique_ptr<SkLatticeIter> iter(
new SkLatticeIter(producer->width(), producer->height(), center, dst));
fRenderTargetContext->drawImageLattice(fClip, grPaint, *draw.fMatrix, producer->width(),
producer->height(), std::move(iter), dst);
}
void SkGpuDevice::drawImageNine(const SkDraw& draw, const SkImage* image,
const SkIRect& center, const SkRect& dst, const SkPaint& paint) {
ASSERT_SINGLE_OWNER
uint32_t pinnedUniqueID;
if (sk_sp<GrTexture> tex = as_IB(image)->refPinnedTexture(&pinnedUniqueID)) {
CHECK_SHOULD_DRAW(draw);
GrTextureAdjuster adjuster(tex.get(), image->alphaType(), image->bounds(), pinnedUniqueID,
as_IB(image)->onImageInfo().colorSpace());
this->drawProducerNine(draw, &adjuster, center, dst, paint);
} else {
SkBitmap bm;
if (SkImageCacherator* cacher = as_IB(image)->peekCacherator()) {
GrImageTextureMaker maker(fContext.get(), cacher, image, SkImage::kAllow_CachingHint);
this->drawProducerNine(draw, &maker, center, dst, paint);
} else if (as_IB(image)->getROPixels(&bm, fRenderTargetContext->colorMode())) {
this->drawBitmapNine(draw, bm, center, dst, paint);
}
}
}
void SkGpuDevice::drawBitmapNine(const SkDraw& draw, const SkBitmap& bitmap, const SkIRect& center,
const SkRect& dst, const SkPaint& paint) {
ASSERT_SINGLE_OWNER
GrBitmapTextureMaker maker(fContext.get(), bitmap);
this->drawProducerNine(draw, &maker, center, dst, paint);
}
void SkGpuDevice::drawProducerLattice(const SkDraw& draw, GrTextureProducer* producer,
const SkCanvas::Lattice& lattice, const SkRect& dst,
const SkPaint& paint) {
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawProducerLattice", fContext.get());
CHECK_SHOULD_DRAW(draw);
static const GrSamplerParams::FilterMode kMode = GrSamplerParams::kNone_FilterMode;
sk_sp<GrFragmentProcessor> fp(
producer->createFragmentProcessor(SkMatrix::I(),
SkRect::MakeIWH(producer->width(), producer->height()),
GrTextureProducer::kNo_FilterConstraint, true,
&kMode, fRenderTargetContext->getColorSpace(),
fRenderTargetContext->colorMode()));
GrPaint grPaint;
if (!SkPaintToGrPaintWithTexture(this->context(), fRenderTargetContext.get(), paint,
*draw.fMatrix, std::move(fp), producer->isAlphaOnly(),
&grPaint)) {
return;
}
std::unique_ptr<SkLatticeIter> iter(
new SkLatticeIter(lattice, dst));
fRenderTargetContext->drawImageLattice(fClip, grPaint, *draw.fMatrix, producer->width(),
producer->height(), std::move(iter), dst);
}
void SkGpuDevice::drawImageLattice(const SkDraw& draw, const SkImage* image,
const SkCanvas::Lattice& lattice, const SkRect& dst,
const SkPaint& paint) {
ASSERT_SINGLE_OWNER
uint32_t pinnedUniqueID;
if (sk_sp<GrTexture> tex = as_IB(image)->refPinnedTexture(&pinnedUniqueID)) {
CHECK_SHOULD_DRAW(draw);
GrTextureAdjuster adjuster(tex.get(), image->alphaType(), image->bounds(), pinnedUniqueID,
as_IB(image)->onImageInfo().colorSpace());
this->drawProducerLattice(draw, &adjuster, lattice, dst, paint);
} else {
SkBitmap bm;
if (SkImageCacherator* cacher = as_IB(image)->peekCacherator()) {
GrImageTextureMaker maker(fContext.get(), cacher, image, SkImage::kAllow_CachingHint);
this->drawProducerLattice(draw, &maker, lattice, dst, paint);
} else if (as_IB(image)->getROPixels(&bm, fRenderTargetContext->colorMode())) {
this->drawBitmapLattice(draw, bm, lattice, dst, paint);
}
}
}
void SkGpuDevice::drawBitmapLattice(const SkDraw& draw, const SkBitmap& bitmap,
const SkCanvas::Lattice& lattice, const SkRect& dst,
const SkPaint& paint) {
ASSERT_SINGLE_OWNER
GrBitmapTextureMaker maker(fContext.get(), bitmap);
this->drawProducerLattice(draw, &maker, lattice, dst, paint);
}
///////////////////////////////////////////////////////////////////////////////
// must be in SkCanvas::VertexMode order
static const GrPrimitiveType gVertexMode2PrimitiveType[] = {
kTriangles_GrPrimitiveType,
kTriangleStrip_GrPrimitiveType,
kTriangleFan_GrPrimitiveType,
};
void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode,
int vertexCount, const SkPoint vertices[],
const SkPoint texs[], const SkColor colors[],
SkBlendMode bmode,
const uint16_t indices[], int indexCount,
const SkPaint& paint) {
ASSERT_SINGLE_OWNER
CHECK_SHOULD_DRAW(draw);
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawVertices", fContext.get());
// If both textures and vertex-colors are nullptr, strokes hairlines with the paint's color.
if ((nullptr == texs || nullptr == paint.getShader()) && nullptr == colors) {
texs = nullptr;
SkPaint copy(paint);
copy.setStyle(SkPaint::kStroke_Style);
copy.setStrokeWidth(0);
GrPaint grPaint;
// we ignore the shader if texs is null.
if (!SkPaintToGrPaintNoShader(this->context(), fRenderTargetContext.get(), copy,
&grPaint)) {
return;
}
int triangleCount = 0;
int n = (nullptr == indices) ? vertexCount : indexCount;
switch (vmode) {
case SkCanvas::kTriangles_VertexMode:
triangleCount = n / 3;
break;
case SkCanvas::kTriangleStrip_VertexMode:
case SkCanvas::kTriangleFan_VertexMode:
triangleCount = n - 2;
break;
}
VertState state(vertexCount, indices, indexCount);
VertState::Proc vertProc = state.chooseProc(vmode);
//number of indices for lines per triangle with kLines
indexCount = triangleCount * 6;
std::unique_ptr<uint16_t[]> lineIndices(new uint16_t[indexCount]);
int i = 0;
while (vertProc(&state)) {
lineIndices[i] = state.f0;
lineIndices[i + 1] = state.f1;
lineIndices[i + 2] = state.f1;
lineIndices[i + 3] = state.f2;
lineIndices[i + 4] = state.f2;
lineIndices[i + 5] = state.f0;
i += 6;
}
fRenderTargetContext->drawVertices(fClip,
grPaint,
*draw.fMatrix,
kLines_GrPrimitiveType,
vertexCount,
vertices,
texs,
colors,
lineIndices.get(),
indexCount);
return;
}
GrPrimitiveType primType = gVertexMode2PrimitiveType[vmode];
SkAutoSTMalloc<128, GrColor> convertedColors(0);
if (colors) {
// need to convert byte order and from non-PM to PM. TODO: Keep unpremul until after
// interpolation.
convertedColors.reset(vertexCount);
for (int i = 0; i < vertexCount; ++i) {
convertedColors[i] = SkColorToPremulGrColor(colors[i]);
}
colors = convertedColors.get();
}
GrPaint grPaint;
if (texs && paint.getShader()) {
if (colors) {
// When there are texs and colors the shader and colors are combined using bmode.
if (!SkPaintToGrPaintWithXfermode(this->context(), fRenderTargetContext.get(), paint,
*draw.fMatrix, bmode, false, &grPaint)) {
return;
}
} else {
// We have a shader, but no colors to blend it against.
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), paint, *draw.fMatrix,
&grPaint)) {
return;
}
}
} else {
if (colors) {
// We have colors, but either have no shader or no texture coords (which implies that
// we should ignore the shader).
if (!SkPaintToGrPaintWithPrimitiveColor(this->context(), fRenderTargetContext.get(),
paint, &grPaint)) {
return;
}
} else {
// No colors and no shaders. Just draw with the paint color.
if (!SkPaintToGrPaintNoShader(this->context(), fRenderTargetContext.get(), paint,
&grPaint)) {
return;
}
}
}
fRenderTargetContext->drawVertices(fClip,
grPaint,
*draw.fMatrix,
primType,
vertexCount,
vertices,
texs,
colors,
indices,
indexCount);
}
///////////////////////////////////////////////////////////////////////////////
void SkGpuDevice::drawAtlas(const SkDraw& draw, const SkImage* atlas, const SkRSXform xform[],
const SkRect texRect[], const SkColor colors[], int count,
SkBlendMode mode, const SkPaint& paint) {
ASSERT_SINGLE_OWNER
if (paint.isAntiAlias()) {
this->INHERITED::drawAtlas(draw, atlas, xform, texRect, colors, count, mode, paint);
return;
}
CHECK_SHOULD_DRAW(draw);
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawText", fContext.get());
SkPaint p(paint);
p.setShader(atlas->makeShader(SkShader::kClamp_TileMode, SkShader::kClamp_TileMode));
GrPaint grPaint;
if (colors) {
if (!SkPaintToGrPaintWithXfermode(this->context(), fRenderTargetContext.get(), p,
*draw.fMatrix, (SkBlendMode)mode, true, &grPaint)) {
return;
}
} else {
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), p, *draw.fMatrix,
&grPaint)) {
return;
}
}
SkDEBUGCODE(this->validate();)
fRenderTargetContext->drawAtlas(fClip, grPaint, *draw.fMatrix, count, xform, texRect, colors);
}
///////////////////////////////////////////////////////////////////////////////
void SkGpuDevice::drawText(const SkDraw& draw, const void* text,
size_t byteLength, SkScalar x, SkScalar y,
const SkPaint& paint) {
ASSERT_SINGLE_OWNER
CHECK_SHOULD_DRAW(draw);
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawText", fContext.get());
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), paint, *draw.fMatrix,
&grPaint)) {
return;
}
SkDEBUGCODE(this->validate();)
fRenderTargetContext->drawText(fClip, grPaint, paint, *draw.fMatrix,
(const char *)text, byteLength, x, y, draw.fRC->getBounds());
}
void SkGpuDevice::drawPosText(const SkDraw& draw, const void* text, size_t byteLength,
const SkScalar pos[], int scalarsPerPos,
const SkPoint& offset, const SkPaint& paint) {
ASSERT_SINGLE_OWNER
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPosText", fContext.get());
CHECK_SHOULD_DRAW(draw);
GrPaint grPaint;
if (!SkPaintToGrPaint(this->context(), fRenderTargetContext.get(), paint, *draw.fMatrix,
&grPaint)) {
return;
}
SkDEBUGCODE(this->validate();)
fRenderTargetContext->drawPosText(fClip, grPaint, paint, *draw.fMatrix,
(const char *)text, byteLength, pos, scalarsPerPos, offset,
draw.fRC->getBounds());
}
void SkGpuDevice::drawTextBlob(const SkDraw& draw, const SkTextBlob* blob, SkScalar x, SkScalar y,
const SkPaint& paint, SkDrawFilter* drawFilter) {
ASSERT_SINGLE_OWNER
GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawTextBlob", fContext.get());
CHECK_SHOULD_DRAW(draw);
SkDEBUGCODE(this->validate();)
fRenderTargetContext->drawTextBlob(fClip, paint, *draw.fMatrix,
blob, x, y, drawFilter, draw.fRC->getBounds());
}
///////////////////////////////////////////////////////////////////////////////
bool SkGpuDevice::onShouldDisableLCD(const SkPaint& paint) const {
return GrTextUtils::ShouldDisableLCD(paint);
}
void SkGpuDevice::flush() {
ASSERT_SINGLE_OWNER
fRenderTargetContext->prepareForExternalIO();
}
///////////////////////////////////////////////////////////////////////////////
SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint*) {
ASSERT_SINGLE_OWNER
SkSurfaceProps props(this->surfaceProps().flags(), cinfo.fPixelGeometry);
// layers are never drawn in repeat modes, so we can request an approx
// match and ignore any padding.
SkBackingFit fit = kNever_TileUsage == cinfo.fTileUsage ? SkBackingFit::kApprox
: SkBackingFit::kExact;
sk_sp<GrRenderTargetContext> rtc(fContext->makeRenderTargetContext(
fit,
cinfo.fInfo.width(), cinfo.fInfo.height(),
fRenderTargetContext->config(),
sk_ref_sp(fRenderTargetContext->getColorSpace()),
fRenderTargetContext->desc().fSampleCnt,
kDefault_GrSurfaceOrigin,
&props));
if (!rtc) {
return nullptr;
}
// Skia's convention is to only clear a device if it is non-opaque.
InitContents init = cinfo.fInfo.isOpaque() ? kUninit_InitContents : kClear_InitContents;
return SkGpuDevice::Make(fContext.get(), std::move(rtc),
cinfo.fInfo.width(), cinfo.fInfo.height(), init).release();
}
sk_sp<SkSurface> SkGpuDevice::makeSurface(const SkImageInfo& info, const SkSurfaceProps& props) {
ASSERT_SINGLE_OWNER
// TODO: Change the signature of newSurface to take a budgeted parameter.
static const SkBudgeted kBudgeted = SkBudgeted::kNo;
return SkSurface::MakeRenderTarget(fContext.get(), kBudgeted, info,
fRenderTargetContext->desc().fSampleCnt,
fRenderTargetContext->origin(), &props);
}
SkImageFilterCache* SkGpuDevice::getImageFilterCache() {
ASSERT_SINGLE_OWNER
// We always return a transient cache, so it is freed after each
// filter traversal.
return SkImageFilterCache::Create(SkImageFilterCache::kDefaultTransientSize);
}
#endif
|
////////////////////////////////////////////////////////////////
// Header
#include "Gugu/Common.h"
#include "Gugu/Editor/Panel/BasePanel.h"
////////////////////////////////////////////////////////////////
// Includes
#include <imgui.h>
////////////////////////////////////////////////////////////////
// File Implementation
namespace gugu {
BasePanel::BasePanel()
: m_title("Panel Title")
{
}
BasePanel::~BasePanel()
{
}
} //namespace gugu
|
#include "core_include/api.h"
#include "core_include/rect.h"
#include "core_include/cmd_target.h"
#include "core_include/resource.h"
#include "core_include/wnd.h"
#include "core_include/surface.h"
#include "core_include/bitmap.h"
#include "core_include/word.h"
#include "../gui_include/button.h"
#include "../gui_include/my_resource.h"
#include "../gui_include/list_box.h"
#include <string.h>
#define ITEM_HEIGHT 45
void c_list_box::pre_create_wnd()
{
m_style = GL_ATTR_VISIBLE | GL_ATTR_FOCUS | ALIGN_HCENTER | ALIGN_VCENTER;
memset(m_item_array, 0, sizeof(m_item_array));
m_item_total = 0;
m_selected_item = 0;
m_font_type = c_my_resource::get_font(FONT_DEFAULT);
m_font_color = c_my_resource::get_color(COLOR_WND_FONT);
}
void c_list_box::on_focus()
{
m_status = STATUS_FOCUSED;
on_paint();
}
void c_list_box::on_kill_focus()
{
m_status = STATUS_NORMAL;
on_paint();
}
void c_list_box::on_paint()
{
c_rect rect, empty_rect;
get_screen_rect(rect);
empty_rect.Empty();
switch(m_status)
{
case STATUS_NORMAL:
if (m_z_order > m_parent->get_z_order())
{
m_surface->set_frame_layer(empty_rect, m_z_order);
m_z_order = m_parent->get_z_order();
}
fill_rect(rect, c_my_resource::get_color(COLOR_WND_NORMAL));
break;
case STATUS_FOCUSED:
if (m_z_order > m_parent->get_z_order())
{
m_surface->set_frame_layer(empty_rect, m_z_order);
m_z_order = m_parent->get_z_order();
}
fill_rect(rect, c_my_resource::get_color(COLOR_WND_FOCUS));
break;
case STATUS_PUSHED:
fill_rect(rect, c_my_resource::get_color(COLOR_WND_PUSHED));
draw_rect(rect, c_my_resource::get_color(COLOR_WND_BORDER), 2);
c_word::draw_string_in_rect(m_surface, m_z_order, m_item_array[m_selected_item], rect, m_font_type, GL_RGB(2, 124, 165), GL_ARGB(0, 0, 0, 0), ALIGN_HCENTER | ALIGN_VCENTER);
//draw list
if (m_item_total > 0)
{
if (m_z_order == m_parent->get_z_order())
{
m_z_order++;
}
m_surface->set_frame_layer(m_list_screen_rect, m_z_order);
show_list();
return;
}
break;
default:
ASSERT(FALSE);
break;
}
c_word::draw_string_in_rect(m_surface, m_z_order, m_item_array[m_selected_item], rect, m_font_type, m_font_color, GL_ARGB(0, 0, 0, 0), ALIGN_HCENTER | ALIGN_VCENTER);
if (m_item_total)
{
c_word::draw_string_in_rect(m_surface, m_z_order, m_item_array[m_selected_item], rect, m_font_type, m_font_color, GL_ARGB(0, 0, 0, 0), m_style);
}
}
void c_list_box::on_touch_down(int x, int y)
{
if (m_wnd_rect.PtInRect(x, y) )
{//click base
if (STATUS_NORMAL == m_status)
{
get_parent()->set_focus(this);
}
}
else if (m_list_wnd_rect.PtInRect(x, y))
{//click extend list
c_wnd::on_touch_down(x, y);
}
else
{
if (STATUS_PUSHED == m_status)
{
m_status = STATUS_FOCUSED;
on_paint();
notify_parent(GL_LIST_CONFIRM, get_id(), 0);
}
}
}
void c_list_box::on_touch_up(int x, int y)
{
if (STATUS_FOCUSED == m_status)
{
m_status = STATUS_PUSHED;
on_paint();
notify_parent(GL_LIST_SELECT, get_id(), 0);
}
else if (STATUS_PUSHED == m_status)
{
if (m_wnd_rect.PtInRect(x, y))
{//click base
m_status = STATUS_FOCUSED;
on_paint();
}
else if (m_list_wnd_rect.PtInRect(x, y))
{//click extend list
m_status = STATUS_FOCUSED;
select_item((y - m_list_wnd_rect.m_top) / ITEM_HEIGHT);
on_paint();
notify_parent(GL_LIST_CONFIRM, get_id(), 0);
}
else
{
c_wnd::on_touch_up(x, y);
}
}
}
void c_list_box::update_list_size()
{
m_list_wnd_rect = m_wnd_rect;
m_list_wnd_rect.m_top = m_wnd_rect.m_bottom + 1;
m_list_wnd_rect.m_bottom = m_list_wnd_rect.m_top + m_item_total * ITEM_HEIGHT;
get_screen_rect(m_list_screen_rect);
m_list_screen_rect.m_top = m_list_screen_rect.m_bottom + 1;
m_list_screen_rect.m_bottom = m_list_screen_rect.m_top + m_item_total * ITEM_HEIGHT;
}
void c_list_box::show_list()
{
fill_rect(m_list_screen_rect, GL_RGB(17, 17, 17));
//draw all items
c_rect tmp_rect;
for (int i = 0; i < m_item_total; i++)
{
tmp_rect.m_left = m_list_screen_rect.m_left;
tmp_rect.m_right = m_list_screen_rect.m_right;
tmp_rect.m_top = m_list_screen_rect.m_top + i * ITEM_HEIGHT;
tmp_rect.m_bottom = tmp_rect.m_top + ITEM_HEIGHT;
c_word::draw_string_in_rect(m_surface, m_z_order, m_item_array[i], tmp_rect, m_font_type, m_font_color, GL_ARGB(0, 0, 0, 0), ALIGN_HCENTER | ALIGN_VCENTER);
draw_hline(tmp_rect.m_left, tmp_rect.m_right, tmp_rect.m_bottom, GL_RGB(99, 108, 124));
}
//draw selected item
tmp_rect.m_left = m_list_screen_rect.m_left;
tmp_rect.m_right = m_list_screen_rect.m_right;
tmp_rect.m_top = m_list_screen_rect.m_top + m_selected_item * ITEM_HEIGHT;
tmp_rect.m_bottom = tmp_rect.m_top + ITEM_HEIGHT;
fill_rect(tmp_rect, c_my_resource::get_color(COLOR_WND_FOCUS));
c_word::draw_string_in_rect(m_surface, m_z_order, m_item_array[m_selected_item], tmp_rect, m_font_type, m_font_color, GL_ARGB(0, 0, 0, 0), ALIGN_HCENTER | ALIGN_VCENTER);
}
int c_list_box::add_item(char* str)
{
if (m_item_total >= MAX_ITEM_NUM)
{
ASSERT(FALSE);
return -1;
}
m_item_array[m_item_total++] = str;
update_list_size();
return 0;
}
void c_list_box::clear_item()
{
m_selected_item = m_item_total = 0;
memset(m_item_array, 0, sizeof(m_item_array));
update_list_size();
}
void c_list_box::select_item(short index)
{
if (index < 0 || index >= m_item_total)
{
ASSERT(FALSE);
}
m_selected_item = index;
}
|
/*
* Copyright 2019 Xilinx Inc.
*
* 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 "./medicalsegmentation_imp.hpp"
#include <fstream>
#include <iostream>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <vitis/ai/env_config.hpp>
#include <vitis/ai/profiling.hpp>
using namespace std;
namespace vitis {
namespace ai {
DEF_ENV_PARAM(ENABLE_SEG_DEBUG, "0");
MedicalSegmentationImp::MedicalSegmentationImp(const std::string &model_name,
bool need_preprocess)
: vitis::ai::TConfigurableDpuTask<MedicalSegmentation>(model_name,
need_preprocess),
processor_{vitis::ai::MedicalSegmentationPostProcess::create(
configurable_dpu_task_->getInputTensor()[0],
configurable_dpu_task_->getOutputTensor()[0],
configurable_dpu_task_->getConfig())} {}
MedicalSegmentationImp::~MedicalSegmentationImp() {}
MedicalSegmentationResult MedicalSegmentationImp::run(
const cv::Mat &input_img) {
cv::Mat img;
auto size = cv::Size(getInputWidth(), getInputHeight());
if (size != input_img.size()) {
cv::resize(input_img, img, size, 0, 0, cv::INTER_LINEAR);
} else {
img = input_img;
}
__TIC__(SEG_total)
__TIC__(SEG_setimg)
configurable_dpu_task_->setInputImageBGR(img);
__TOC__(SEG_setimg)
__TIC__(SEG_dpu)
configurable_dpu_task_->run(0);
__TOC__(SEG_dpu)
__TIC__(SEG_post)
auto results = processor_->medicalsegmentation_post_process();
__TOC__(SEG_post)
__TOC__(SEG_total)
return results[0];
}
std::vector<MedicalSegmentationResult> MedicalSegmentationImp::run(
const std::vector<cv::Mat> &input_img) {
auto size = cv::Size(getInputWidth(), getInputHeight());
auto batch_size = get_input_batch();
std::vector<cv::Mat> vimg(batch_size);
for (auto i = 0ul; i < batch_size; i++) {
if (size != input_img[i].size()) {
cv::resize(input_img[i], vimg[i], size, 0, 0, cv::INTER_LINEAR);
} else {
vimg[i] = input_img[i];
}
}
__TIC__(SEG_total)
__TIC__(SEG_setimg)
configurable_dpu_task_->setInputImageBGR(vimg);
__TOC__(SEG_setimg)
__TIC__(SEG_dpu)
configurable_dpu_task_->run(0);
__TOC__(SEG_dpu)
__TIC__(SEG_post)
auto results = processor_->medicalsegmentation_post_process();
__TOC__(SEG_post)
__TOC__(SEG_total)
return results;
}
} // namespace ai
} // namespace vitis
|
/*
CSL 201 Lab Assignment #2
----------------------------------
----------------------------------
Question: Write a program (C / C++) to apply the concepts of stacks and queues for addressing 5 different types of queries.
----------------------------------
----------------------------------
These 5 queries are denoted by S, Q, I, E, and P and these query type identifiers correspond
to -
S: Performing Stack operations,
Q: Performing Queue operations,
I: Converting Infix expression to equivalent postfix expression,
E: Evaluating infix expression value and
P: Computing stack Permutation, respectively.
----------------------------------
----------------------------------
The first line of the input contains an integer T denoting the number of queries. Then there follows T lines, each line correspond to a query and query type is identified with the first character in that line which could be either S, Q, I, E, or P.
Query type identifier is then followed by parameters specific to that query. These parameters would be single-space separated.
---------------------------------
---------------------------------
Developed by:
Raghav Sharma
2015EEB1071
---------------------------------
---------------------------------
Submitted on:
27th September, 2017
*/
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <algorithm>
using namespace std;
struct Node{
int data;
struct Node *next;
}*head, *end;
struct Node *createNewNode(int x){
struct Node *newptr = new Node;
newptr->data = x;
newptr->next = NULL;
return newptr;
}
// stack operations
void push(int x){
struct Node *newptr = createNewNode(x);
newptr->next = head;
head = newptr;
}
void pop(){
struct Node *temp = head;
head = head->next;
free(temp);
}
int checkIfValid_Stack(string A){
int check1 = 0;
int check2 = 0;
int i, limit;
limit = 0;
for(i = 0; A[i] != '\0'; i++){
if(A[i] == '#'){
check1 = 1;
break;
}
}
limit = i;
for(i = 1; i < limit; i++){
if('0' <= A[i] && A[i] <= '9' || A[i] == 'P' || A[i] == 'F' || A[i] == 'E' || A[i] == 'N' || A[i] == ' ' || A[i] == '-')
check2 = 1;
else{
check2 = 0;
break;
}
}
return check1*check2;
}
// queue operations
void enqueue(int x){
struct Node *newptr = createNewNode(x);
if(head == NULL && end == NULL){
head = end = newptr;
return;
}
else{
end->next = newptr;
end = newptr;
}
}
void dequeue(){
struct Node *temp = head;
head = head->next;
free(temp);
}
int checkIfValid_Queue(string A){
int check1 = 0;
int check2 = 0;
int i, limit;
limit = 0;
for(i = 0; A[i] != '\0'; i++){
if(A[i] == '#'){
check1 = 1;
break;
}
}
limit = i;
for(i = 1; i < limit; i++){
if('0' <= A[i] && A[i] <= '9' || A[i] == 'D' || A[i] == 'F' || A[i] == 'E' || A[i] == 'N' || A[i] == ' ' || A[i] == '-')
check2 = 1;
else{
check2 = 0;
break;
}
}
return check1*check2;
}
// functions for both stack and queue
int totalNumberOfElements(struct Node *head){
int ans = 0;
while(head != NULL){
head = head->next;
ans++;
}
return ans;
}
void display(struct Node *head){
while(head != NULL){
cout << head->data << " ";
head = head->next;
}
cout << "\n";
}
// functions for infix to postfix conversion
// function to return precedence order of various operators
int precedence(char ch){
// 'a' refers to '<<'
// 'b' refers to '>>'
// 'c' refers to '<='
// 'd' refers to '>='
// 'e' refers to '=='
// 'f' refers to '!='
switch(ch){
case '|':
return 1;
case '^':
return 2;
case '&':
return 3;
case 'e':
case 'f':
return 4;
case '<':
case 'c':
case 'd':
case '>':
return 5;
case 'a':
case 'b':
return 6;
case '+':
case '-':
return 7;
case '*':
case '/':
case '%':
return 8;
}
return -1;
}
int checkIfValid_Infix(string A){
head = NULL;
int check1, check2, i, j, limit, x, check3, multiplier, check4, numberOfOperators, numberOfOperands, num[4];
char op;
check1 = 0;
check2 = 1;
check3 = 1;
check4 = 0;
numberOfOperators = numberOfOperands = 0;
multiplier = 1;
for(i = 0; A[i] != '\0'; i++){
if(A[i] == '#'){
check1 = 1;
break;
}
}
limit = i;
for(i = 0; i < limit; i++){
int x = 1;
if('0' <= A[i] && A[i] <= '9'){
int index = 0;
int number = 0;
if(A[i-1] == '-')
x = -1;
else
x = 1;
while('0' <= A[i] && A[i] <= '9'){
num[index] = A[i] - '0';
index++;
i++;
}
for(j = 0; j < index; j++)
number += num[j]*pow(10, index - j - 1);
number = number*x;
push(number);
}
numberOfOperands = totalNumberOfElements(head);
}
for(i = 1; i < limit; i++){
if(A[i] == '<' && A[i+1] == '<'){
if(multiplier != -1){
check3 = 0;
break;
}
multiplier *= -1;
op = 'a';
numberOfOperators++;
i++;
}
else if(A[i] == '>' && A[i+1] == '>'){
if(multiplier != -1){
check3 = 0;
break;
}
multiplier *= -1;
op = 'b';
numberOfOperators++;
i++;
}
else if(A[i] == '<' && A[i+1] == '='){
if(multiplier != -1){
check3 = 0;
break;
}
multiplier *= -1;
op = 'c';
numberOfOperators++;
i++;
}
else if(A[i] == '>' && A[i+1] == '='){
if(multiplier != -1){
check3 = 0;
break;
}
multiplier *= -1;
op = 'd';
numberOfOperators++;
i++;
}
else if(A[i] == '=' && A[i+1] == '='){
if(multiplier != -1){
check3 = 0;
break;
}
multiplier *= -1;
op = 'e';
numberOfOperators++;
i++;
}
else if(A[i] == '!' && A[i] == '='){
if(multiplier != -1){
check3 = 0;
break;
}
multiplier *= -1;
op = 'f';
numberOfOperators++;
i++;
}
else if(A[i] == ' ')
continue;
else if('0' <= A[i] && A[i] <= '9'){
if(multiplier != 1){
check3 = 0;
break;
}
else{
multiplier *= -1;
while('0' <= A[i] && A[i] <= '9')
i++;
i--;
continue;
}
}
else{
op = A[i];
numberOfOperators++;
if(multiplier != -1){
check3 = 0;
break;
}
else
multiplier *= -1;
}
if(precedence(op) == -1){
check2 = 0;
break;
}
}
if(numberOfOperands - 1 == numberOfOperators)
check4 = 1;
return check1*check2*check3*check4;
}
// function for infix evaluation
int peek(struct Node *head){
if(head != NULL)
return head->data;
}
// functions for finding stack permutations
int isEmpty(struct Node *head){
return(head == NULL);
}
void swap(int permutation[], int x, int y){
int temp;
temp = permutation[x];
permutation[x] = permutation[y];
permutation[y] = temp;
}
int findCeil(int permutation[], int x, int l, int h){
int ceilIndex = l;
int i;
for(i = l+1; i <= h; i++){
if(permutation[i] > x && permutation[i] < permutation[ceilIndex])
ceilIndex = i;
}
return ceilIndex;
}
void reverse(int permutation[], int l, int h){
while(l < h){
swap(permutation, l, h);
l++;
h--;
}
}
// returns 1 if given stack permutation is possible
int checkIfStackPermutation(int permutation[], int size){
head = NULL;
int buffer[size], i, beg1, beg2, num, topElement;
for(i = 0; i < size; i++)
buffer[i] = i + 1;
// beg1 is associated with buffer[], original array
// beg2 is associated with permutation[], array to be checked
beg1 = 0;
beg2 = 0;
while(beg1 < size){
num = buffer[beg1];
beg1++;
if(num == permutation[beg2]){
beg2++;
while(!isEmpty(head)){
topElement = peek(head);
if(topElement == permutation[beg2]){
pop();
beg2++;
}
else
break;
}
}
else
push(num);
}
if(isEmpty(head) && beg2 == size)
return 1;
else
return 0;
}
void sortedPermutations(int permutation[], int size, int k){
int i, check, count, buffer[size];
count = 0;
// print permutations one by one
bool isFinished = false;
while(!isFinished){
check = checkIfStackPermutation(permutation, size);
if(check == 1){
count++;
if(count == k){
for(i = 0; i < size; i++)
buffer[i] = permutation[i];
}
}
// find the rightmost character which is smaller than its character
for(i = size - 2; i >= 0; i--){
if(permutation[i] < permutation[i+1])
break;
}
// if there is no such integer, all are sorted in decreasing order
if(i == -1)
isFinished = true;
else{
// find the ceil of 'first integer'
// it is the smallest integer greater than it
int ceilIndex = findCeil(permutation, permutation[i], i+1, size-1);
// swap first and second integers
swap(permutation, i, ceilIndex);
// reverse the subarray on right of 'first integer'
reverse(permutation, i+1, size-1);
}
}
if(count >= k){
cout << count++ << " ";
for(i = 0; i < size; i++)
cout << buffer[i] << " ";
cout << "\n";
}
else{
cout << "Error\n";
}
}
int main(){
int T;
cin >> T;
while(T--){
string A;
// to remove buffer in getline function
cin >> ws;
getline(cin, A);
// stack operations
if(A[0] == 'S'){
int i, j, x, num[4], index, number, check;
head = NULL;
check = checkIfValid_Stack(A);
if(check == 1){
for(i = 1; A[i] != '#'; i++){
x = 1;
if('0' <= A[i] && A[i] <= '9'){
index = 0;
number = 0;
if(A[i-1] == '-')
x = -1;
else
x = 1;
while('0' <= A[i] && A[i] <= '9'){
num[index] = A[i] - '0';
index++;
i++;
}
for(j = 0; j < index; j++)
number += num[j]*pow(10, index - j - 1);
number = number*x;
push(number);
}
if(A[i] == 'P')
pop();
}
cout << totalNumberOfElements(head) << " ";
display(head);
}
else
cout << "Error\n";
}// end of stack implementation
else if(A[0] == 'Q'){
int i, j, index, number, check, x, num[4];
head = NULL;
end = NULL;
check = checkIfValid_Queue(A);
if(check == 1){
for(i = 1; A[i] != '\0'; i++){
if('0' <= A[i] && A[i] <= '9'){
index = 0;
number = 0;
if(A[i-1] == '-')
x = -1;
else
x = 1;
while('0' <= A[i] && A[i] <= '9'){
num[index] = A[i] - '0';
index++;
i++;
}
for(j = 0; j < index; j++)
number += num[j]*pow(10, index - j - 1);
number = number*x;
enqueue(number);
}
if(A[i] == 'D')
dequeue();
}
cout << totalNumberOfElements(head) << " ";
display(head);
}
else{
cout << "Error\n";
}
}// end of queue implementation
else if(A[0] == 'I'){
int check, x, top, i, index, j, number, num[4];
char stackOperators[25], op, ch;
top = -1;
check = checkIfValid_Infix(A);
if(check == 1){
for(i = 1; A[i] != '#'; i++){
if('0' <= A[i] && A[i] <= '9'){
index = 0;
number = 0;
if(A[i-1] == '-')
x = -1;
else
x = 1;
while('0' <= A[i] && A[i] <= '9'){
num[index] = A[i] - '0';
index++;
i++;
}
for(j = 0; j < index; j++)
number += num[j]*pow(10, index - j - 1);
i--;
number = number*x;
cout << number << " ";
}
else{
if(top >= 0)
ch = stackOperators[top];
else
ch = 'x';
if(A[i] == '<' && A[i+1] == '<'){
op = 'a';
i++;
}
else if(A[i] == '>' && A[i+1] == '>'){
op = 'b';
i++;
}
else if(A[i] == '<' && A[i+1] == '='){
op = 'c';
i++;
}
else if(A[i] == '>' && A[i+1] == '='){
op = 'd';
i++;
}
else if(A[i] == '=' && A[i+1] == '='){
op = 'e';
i++;
}
else if(A[i] == '!' && A[i] == '='){
op = 'f';
i++;
}
else if(A[i] == ' ')
continue;
else
op = A[i];
if(top == -1 || precedence(op) >= precedence(ch)){
top++;
stackOperators[top] = op;
}
else{
while(precedence(op) < precedence(ch) && top >= 0){
if(ch == 'a'){
cout << "<<" << " ";
top--;
}
else if(ch == 'b'){
cout << ">>" << " ";
top--;
}
else if(ch == 'c'){
cout << "<=" << " ";
top--;
}
else if(ch == 'd'){
cout << ">=" << " ";
top--;
}
else if(ch == 'e'){
cout << "==" << " ";
top--;
}
else if(ch == 'f'){
cout << "!=" << " ";
top--;
}
else{
cout << ch << " ";
top--;
}
if(top >= 0)
ch = stackOperators[top];
else
ch = 'x';
}
top++;
stackOperators[top] = op;
}
}
}
while(top >= 0){
ch = stackOperators[top];
if(ch == 'a'){
cout << "<<" << " ";
top--;
}
else if(ch == 'b'){
cout << ">>" << " ";
top--;
}
else if(ch == 'c'){
cout << "<=" << " ";
top--;
}
else if(ch == 'd'){
cout << ">=" << " ";
top--;
}
else if(ch == 'e'){
cout << "==" << " ";
top--;
}
else if(ch == 'f'){
cout << "!=" << " ";
top--;
}
else{
cout << ch << " ";
top--;
}
}
cout << "\n";
}
else if(check == 0){
cout << "Error\n";
}
}// end of infix to postfix
else if(A[0] == 'E'){
head = NULL;
int check, x, top, i, index, j, number, num[4], operand1, operand2;
char stackOperators[25], op, ch;
top = -1;
check = checkIfValid_Infix(A);
if(check == 1){
for(i = 1; A[i] != '#'; i++){
if('0' <= A[i] && A[i] <= '9'){
index = 0;
number = 0;
if(A[i-1] == '-')
x = -1;
else
x = 1;
while('0' <= A[i] && A[i] <= '9'){
num[index] = A[i] - '0';
index++;
i++;
}
for(j = 0; j < index; j++)
number += num[j]*pow(10, index - j - 1);
i--;
number = number*x;
push(number);
}
else{
if(top >= 0)
ch = stackOperators[top];
else
ch = 'x';
if(A[i] == '<' && A[i+1] == '<'){
op = 'a';
i++;
}
else if(A[i] == '>' && A[i+1] == '>'){
op = 'b';
i++;
}
else if(A[i] == '<' && A[i+1] == '='){
op = 'c';
i++;
}
else if(A[i] == '>' && A[i+1] == '='){
op = 'd';
i++;
}
else if(A[i] == '=' && A[i+1] == '='){
op = 'e';
i++;
}
else if(A[i] == '!' && A[i] == '='){
op = 'f';
i++;
}
else if(A[i] == ' ')
continue;
else
op = A[i];
if(top == -1 || precedence(op) >= precedence(ch)){
top++;
stackOperators[top] = op;
}
else{
while(precedence(op) < precedence(ch) && top >= 0){
if(ch == 'a'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 << operand2;
push(operand1);
}
else if(ch == 'b'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 >> operand2;
push(operand1);
}
else if(ch == 'c'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 <= operand2;
push(operand1);
}
else if(ch == 'd'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 >= operand2;
push(operand1);
}
else if(ch == 'e'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 == operand2;
push(operand1);
}
else if(ch == 'f'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 != operand2;
push(operand1);
}
else if(ch == '+'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 + operand2;
push(operand1);
}
else if(ch == '-'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 - operand2;
push(operand1);
}
else if(ch == '/'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 / operand2;
push(operand1);
}
else if(ch == '%'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 % operand2;
push(operand1);
}
else if(ch == '&'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 & operand2;
push(operand1);
}
else if(ch == '^'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 ^ operand2;
push(operand1);
}
else if(ch == '|'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 | operand2;
push(operand1);
}
else if(ch == '>'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 > operand2;
push(operand1);
}
else if(ch == '<'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 < operand2;
push(operand1);
}
else if(ch == '*'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 * operand2;
push(operand1);
}
if(top >= 0)
ch = stackOperators[top];
else
ch = 'x';
}
top++;
stackOperators[top] = op;
}
}
}
while(top >= 0){
ch = stackOperators[top];
if(ch == 'a'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 << operand2;
push(operand1);
}
else if(ch == 'b'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 >> operand2;
push(operand1);
}
else if(ch == 'c'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 <= operand2;
push(operand1);
}
else if(ch == 'd'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 >= operand2;
push(operand1);
}
else if(ch == 'e'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 == operand2;
push(operand1);
}
else if(ch == 'f'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 != operand2;
push(operand1);
}
else if(ch == '+'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 + operand2;
push(operand1);
}
else if(ch == '-'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 - operand2;
push(operand1);
}
else if(ch == '/'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 / operand2;
push(operand1);
}
else if(ch == '%'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 % operand2;
push(operand1);
}
else if(ch == '&'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 & operand2;
push(operand1);
}
else if(ch == '^'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 ^ operand2;
push(operand1);
}
else if(ch == '|'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 | operand2;
push(operand1);
}
else if(ch == '>'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 > operand2;
push(operand1);
}
else if(ch == '<'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 < operand2;
push(operand1);
}
else if(ch == '*'){
top--;
operand2 = peek(head);
pop();
operand1 = peek(head);
pop();
operand1 = operand1 * operand2;
push(operand1);
}
}
cout << peek(head) << "\n";
pop();
}
else{
cout << "Error\n";
}
}// end of evaluate infix
else if(A[0] == 'P'){
head = NULL;
int i, num[15], index, j, serial;
long long int number, size, k;
serial = -1;
for(i = 1; A[i] != '\0'; i++){
if(A[i] == ' ')
continue;
if('0' <= A[i] && A[i] <= '9'){
index = 0;
number = 0;
serial ++;
while('0' <= A[i] && A[i] <= '9'){
num[index] = A[i] - '0';
index++;
i++;
}
for(j = 0; j < index; j++)
number += num[j]*pow(10, index - j - 1);
i--;
if(serial == 0)
size = number;
else if(serial == 1)
k = number;
}
}
int permutation[size];
for(i = 0; i < size; i++)
permutation[i] = i + 1;
sortedPermutations(permutation, size, k);
}// end of stack permutations
else{
cout << "Error\n";
}
}// end of while loop
return 0;
}
|
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** As a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qpaintdevicewindow_p.h"
#include <QtGui/QGuiApplication>
#include <QtGui/QScreen>
QT_BEGIN_NAMESPACE
/*!
\class QPaintDeviceWindow
\inmodule QtGui
\since 5.4
\brief Convenience subclass of QWindow that is also a QPaintDevice.
QPaintDeviceWindow is like a regular QWindow, with the added functionality
of being a paint device too. Whenever the content needs to be updated,
the virtual paintEvent() function is called. Subclasses, that reimplement
this function, can then simply open a QPainter on the window.
\note This class cannot directly be used in applications. It rather serves
as a base for subclasses like QOpenGLWindow.
\sa QOpenGLWindow
*/
/*!
Marks the entire window as dirty and schedules a repaint.
\note Subsequent calls to this function before the next paint
event will get ignored.
\note For non-exposed windows the update is deferred until the
window becomes exposed again.
*/
void QPaintDeviceWindow::update()
{
update(QRect(QPoint(0,0), size()));
}
/*!
Marks the \a rect of the window as dirty and schedules a repaint.
\note Subsequent calls to this function before the next paint
event will get ignored, but \a rect is added to the region to update.
\note For non-exposed windows the update is deferred until the
window becomes exposed again.
*/
void QPaintDeviceWindow::update(const QRect &rect)
{
Q_D(QPaintDeviceWindow);
d->dirtyRegion += rect;
if (isExposed())
requestUpdate();
}
/*!
Marks the \a region of the window as dirty and schedules a repaint.
\note Subsequent calls to this function before the next paint
event will get ignored, but \a region is added to the region to update.
\note For non-exposed windows the update is deferred until the
window becomes exposed again.
*/
void QPaintDeviceWindow::update(const QRegion ®ion)
{
Q_D(QPaintDeviceWindow);
d->dirtyRegion += region;
if (isExposed())
requestUpdate();
}
/*!
Handles paint events passed in the \a event parameter.
The default implementation does nothing. Reimplement this function to
perform painting. If necessary, the dirty area is retrievable from
the \a event.
*/
void QPaintDeviceWindow::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event);
// Do nothing
}
/*!
\internal
*/
int QPaintDeviceWindow::metric(PaintDeviceMetric metric) const
{
QScreen *screen = this->screen();
if (!screen && QGuiApplication::primaryScreen())
screen = QGuiApplication::primaryScreen();
switch (metric) {
case PdmWidth:
return width();
case PdmWidthMM:
if (screen)
return width() * screen->physicalSize().width() / screen->geometry().width();
break;
case PdmHeight:
return height();
case PdmHeightMM:
if (screen)
return height() * screen->physicalSize().height() / screen->geometry().height();
break;
case PdmDpiX:
if (screen)
return qRound(screen->logicalDotsPerInchX());
break;
case PdmDpiY:
if (screen)
return qRound(screen->logicalDotsPerInchY());
break;
case PdmPhysicalDpiX:
if (screen)
return qRound(screen->physicalDotsPerInchX());
break;
case PdmPhysicalDpiY:
if (screen)
return qRound(screen->physicalDotsPerInchY());
break;
case PdmDevicePixelRatio:
if (screen)
return screen->devicePixelRatio();
break;
default:
break;
}
return QPaintDevice::metric(metric);
}
/*!
\internal
*/
void QPaintDeviceWindow::exposeEvent(QExposeEvent *exposeEvent)
{
Q_UNUSED(exposeEvent);
Q_D(QPaintDeviceWindow);
if (isExposed()) {
d->markWindowAsDirty();
// Do not rely on exposeEvent->region() as it has some issues for the
// time being, namely that it is sometimes in local coordinates,
// sometimes relative to the parent, depending on the platform plugin.
// We require local coords here.
d->doFlush(QRect(QPoint(0, 0), size()));
} else if (!d->dirtyRegion.isEmpty()) {
// Updates while non-exposed were ignored. Schedule an update now.
requestUpdate();
}
}
/*!
\internal
*/
bool QPaintDeviceWindow::event(QEvent *event)
{
Q_D(QPaintDeviceWindow);
if (event->type() == QEvent::UpdateRequest) {
if (handle()) // platform window may be gone when the window is closed during app exit
d->handleUpdateEvent();
return true;
}
return QWindow::event(event);
}
/*!
\internal
*/
QPaintDeviceWindow::QPaintDeviceWindow(QPaintDeviceWindowPrivate &dd, QWindow *parent)
: QWindow(dd, parent)
{
}
/*!
\internal
*/
QPaintEngine *QPaintDeviceWindow::paintEngine() const
{
return 0;
}
QT_END_NAMESPACE
|
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from proj.djinni
#pragma once
#include "djinni_support.hpp"
#include "ezored/systemservices/CustomerSystemService.hpp"
namespace djinni_generated {
class EZRSystemServicesCustomerSystemService final : ::djinni::JniInterface<::ezored::systemservices::CustomerSystemService, EZRSystemServicesCustomerSystemService> {
public:
using CppType = std::shared_ptr<::ezored::systemservices::CustomerSystemService>;
using CppOptType = std::shared_ptr<::ezored::systemservices::CustomerSystemService>;
using JniType = jobject;
using Boxed = EZRSystemServicesCustomerSystemService;
~EZRSystemServicesCustomerSystemService();
static CppType toCpp(JNIEnv* jniEnv, JniType j) { return ::djinni::JniClass<EZRSystemServicesCustomerSystemService>::get()._fromJava(jniEnv, j); }
static ::djinni::LocalRef<JniType> fromCppOpt(JNIEnv* jniEnv, const CppOptType& c) { return {jniEnv, ::djinni::JniClass<EZRSystemServicesCustomerSystemService>::get()._toJava(jniEnv, c)}; }
static ::djinni::LocalRef<JniType> fromCpp(JNIEnv* jniEnv, const CppType& c) { return fromCppOpt(jniEnv, c); }
private:
EZRSystemServicesCustomerSystemService();
friend ::djinni::JniClass<EZRSystemServicesCustomerSystemService>;
friend ::djinni::JniInterface<::ezored::systemservices::CustomerSystemService, EZRSystemServicesCustomerSystemService>;
};
} // namespace djinni_generated
|
/*
-- MAGMA (version 1.6.1) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date January 2015
@precisions normal z -> s d c
*/
/* includes, system */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
#include <cublas.h>
#include <quark.h>
/* includes, project */
#include "flops.h"
#include "magma.h"
#include "magma_lapack.h"
#include "testings.h"
/* Flops formula */
#define PRECISION_z
#if defined(PRECISION_z) || defined(PRECISION_c)
#define FLOPS(m, n) ( 6. * FMULS_GETRF(m, n) + 2. * FADDS_GETRF(m, n) )
#else
#define FLOPS(m, n) ( FMULS_GETRF(m, n) + FADDS_GETRF(m, n) )
#endif
double get_LU_error(magma_int_t M, magma_int_t N,
cuDoubleComplex *A, magma_int_t lda,
cuDoubleComplex *LU, magma_int_t *IPIV)
{
magma_int_t min_mn = min(M,N), intONE = 1, i, j;
lapackf77_zlaswp( &N, A, &lda, &intONE, &min_mn, IPIV, &intONE);
cuDoubleComplex *L = (cuDoubleComplex *) calloc (M*min_mn, sizeof(cuDoubleComplex));
cuDoubleComplex *U = (cuDoubleComplex *) calloc (min_mn*N, sizeof(cuDoubleComplex));
double *work = (double *) calloc (M+1, sizeof(cuDoubleComplex));
memset( L, 0, M*min_mn*sizeof(cuDoubleComplex) );
memset( U, 0, min_mn*N*sizeof(cuDoubleComplex) );
lapackf77_zlacpy( MagmaLowerStr, &M, &min_mn, LU, &lda, L, &M );
lapackf77_zlacpy( MagmaUpperStr, &min_mn, &N, LU, &lda, U, &min_mn );
for(j=0; j<min_mn; j++)
L[j+j*M] = MAGMA_Z_MAKE( 1., 0. );
double matnorm = lapackf77_zlange("f", &M, &N, A, &lda, work);
cuDoubleComplex alpha = MAGMA_Z_ONE;
cuDoubleComplex beta = MAGMA_Z_ZERO;
blasf77_zgemm("N", "N", &M, &N, &min_mn,
&alpha, L, &M, U, &min_mn, &beta, LU, &lda);
for( j = 0; j < N; j++ ) {
for( i = 0; i < M; i++ ) {
MAGMA_Z_OP_NEG( LU[i+j*lda], LU[i+j*lda], A[i+j*lda]);
}
}
double residual = lapackf77_zlange("f", &M, &N, LU, &lda, work);
free(L);
free(work);
return residual / (matnorm * N);
}
/* ////////////////////////////////////////////////////////////////////////////
-- Testing zgetrf_mc
*/
int main( int argc, char** argv)
{
cuDoubleComplex *h_A, *h_A2;
magma_int_t *ipiv;
double flops, gpu_perf, cpu_perf, cpu2_perf;
magma_timestr_t start, end;
/* Matrix size */
magma_int_t N=0, n2, lda, M=0;
magma_int_t size[10] = {1024,2048,3072,4032,5184,6016,7040,8064,9088,10112};
magma_int_t i, j, info[1];
magma_int_t ione = 1;
magma_int_t ISEED[4] = {0,0,0,1};
magma_int_t num_cores = 4;
magma_int_t num_gpus = 0;
magma_int_t EN_BEE = -1;
magma_int_t loop = argc;
if (argc != 1){
for(i = 1; i<argc; i++){
if (strcmp("-N", argv[i])==0)
N = atoi(argv[++i]);
else if (strcmp("-M", argv[i])==0)
M = atoi(argv[++i]);
else if (strcmp("-C", argv[i])==0)
num_cores = atoi(argv[++i]);
else if (strcmp("-b", argv[i])==0)
EN_BEE = atoi(argv[++i]);
}
if ((M>0 && N>0) || (M==0 && N==0)) {
printf(" testing_zgetrf_mc -M %d -N %d -b %d -C %d\n\n",
M, N, EN_BEE, num_cores);
if (M==0 && N==0) {
M = N = size[9];
loop = 1;
}
} else {
printf("\nUsage: \n");
printf(" Make sure you set the number of BLAS threads to 1, e.g.,\n");
printf(" > setenv MKL_NUM_THREADS 1\n");
printf(" > testing_zgetrf_mc -M %d -N %d -C 4 -b 128\n\n", 1024, 1024);
exit(1);
}
} else {
printf("\nUsage: \n");
printf(" Make sure you set the number of BLAS threads to 1, e.g.,\n");
printf(" > setenv MKL_NUM_THREADS 1\n");
printf(" > testing_zgetrf_mc -M %d -N %d -C 4 -b 128\n\n", 1024, 1024);
M = N = size[9];
}
n2 = M * N;
magma_int_t min_mn = min(M, N);
/* Allocate host memory for the matrix */
TESTING_MALLOC( h_A2, cuDoubleComplex, n2 );
TESTING_MALLOC( h_A , cuDoubleComplex, n2 );
TESTING_MALLOC( ipiv, magma_int_t , min_mn);
/* Initialize MAGMA hardware context, seeting how many CPU cores
and how many GPUs to be used in the consequent computations */
magma_context *context;
context = magma_init(NULL, NULL, 0, num_cores, num_gpus, argc, argv);
printf("\n\n");
printf(" M N GFlop/s ||PA-LU|| / (||A||*N)\n");
printf("========================================================\n");
for(i=0; i<10; i++){
if (loop == 1) {
M = N = min_mn = size[i];
n2 = M*N;
}
flops = FLOPS( (double)M, (double)N ) / 1000000;
/* Initialize the matrix */
lapackf77_zlarnv( &ione, ISEED, &n2, h_A2 );
lapackf77_zlacpy( MagmaUpperLowerStr, &M, &N, h_A2, &M, h_A, &M );
/* =====================================================================
Performs operation using multi-core
=================================================================== */
start = get_current_time();
magma_zgetrf_mc(context, &M, &N, h_A2, &M, ipiv, info);
end = get_current_time();
if (info[0] < 0)
printf("Argument %d of magma_sgeqrf_mc had an illegal value.\n", -info[0]);
cpu2_perf = flops / GetTimerValue(start, end);
double error = get_LU_error(M, N, h_A, M, h_A2, ipiv);
printf("%5d %5d %6.2f %e\n",
M, N, cpu2_perf, error);
if (loop != 1)
break;
}
/* Memory clean up */
TESTING_FREE( h_A2 );
TESTING_FREE( h_A );
TESTING_FREE( ipiv );
/* Shut down the MAGMA context */
magma_finalize(context);
}
|
//
// Created by barto on 03.11.18.
//
#include "BruteForce.h"
#include <cmath>
BruteForce::BruteForce(std::shared_ptr<TravellingSalesmanProblem> TSP) : Algorithm(std::move(TSP)) {}
BruteForce::~BruteForce() = default;
std::string BruteForce::showInfoBeforeRunning() {
numberOfCities = TSP->getNumberOfCities();
if (numberOfCities < 2) {
throw std::runtime_error("Macierz miast jest pusta, bądź zawiera tylko jedno miasto!");
}
std::string output;
output += "Ilość permutacji: ";
output += std::to_string(static_cast<unsigned long>(round(std::tgamma(numberOfCities))));
/**
* number of permutations -> (n-1)!; gamma(n) = (n-1)!
*
* gets the number of cities, calculates gamma function (explained above), result is stored as a double,
* rounds to int, the result of rounding is still the double, casts into int and coverts that int to string :D
* don't kill me, my future self xD
*
*/
output += "\n";
return output;
}
std::string BruteForce::run() {
prepareToRun();
startTime = std::chrono::high_resolution_clock::now();
enumerateSolutions(startVertex);
endTime = std::chrono::high_resolution_clock::now();
return generateOutput();
}
void BruteForce::prepareToRun() {
Algorithm::prepareToRun();
visitedVertices.clear();
visitedVertices.resize(numberOfCities);
}
void BruteForce::enumerateSolutions(int vertex) {
currentRoute.push_back(vertex);
visitedVertices[vertex] = true;
if (currentRoute.size() < numberOfCities) {
takeCareOfNode(vertex);
} else { // currentRoute.size() == numberOfCities
takeCareOfLeaf(vertex);
}
visitedVertices[vertex] = false;
currentRoute.pop_back();
}
void BruteForce::takeCareOfNode(int currentVertex) {
for (int i = 0; i < numberOfCities; ++i) {
if (!visitedVertices[i]) {
int distanceToNext = TSP->getDistance(currentVertex, i);
if (distanceToNext < 0) {
continue;
}
currentDistance += distanceToNext;
enumerateSolutions(i);
currentDistance -= distanceToNext;
}
}
}
void BruteForce::takeCareOfLeaf(int currentVertex) {
numberOfChecks++;
int distanceToNext = TSP->getDistance(currentVertex, startVertex);
if (distanceToNext < 0) {
return;
}
currentDistance += distanceToNext;
if (currentDistance < bestDistance) {
bestDistance = currentDistance;
bestRoute = currentRoute;
}
currentDistance -= distanceToNext;
}
std::string BruteForce::generateOutput() {
std::string output;
output += "Ilość sprawdzonych permutacji: ";
output += std::to_string(numberOfChecks);
output += "\n";
output += "Długość pracy algorytmu: ";
auto duration = std::chrono::duration_cast<std::chrono::microseconds>(endTime - startTime).count();
output += std::to_string(duration);
output += "µs";
output += "\n";
if (bestRoute.empty()) {
output += "Nie znaleziono żadnej trasy!\n";
} else {
output += "Najlepsza droga: ";
for (auto city : bestRoute) {
output += std::to_string(city);
output += " - ";
}
output += std::to_string(bestRoute[0]);
output += "\n";
output += "Długość najlepszej drogi: ";
output += std::to_string(bestDistance);
output += "\n";
}
return output;
}
|
/*************************************************************************/
/* binder_common.hpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* 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. */
/*************************************************************************/
#ifndef GODOT_CPP_BINDER_COMMON_HPP
#define GODOT_CPP_BINDER_COMMON_HPP
#include <godot/gdnative_interface.h>
#include <godot_cpp/core/method_ptrcall.hpp>
#include <godot_cpp/core/type_info.hpp>
#include <array>
#include <vector>
namespace godot {
#define VARIANT_ENUM_CAST(m_class, m_enum) \
namespace godot { \
MAKE_ENUM_TYPE_INFO(m_class, m_enum) \
template <> \
struct VariantCaster<m_class::m_enum> { \
static _FORCE_INLINE_ m_class::m_enum cast(const Variant &p_variant) { \
return (m_class::m_enum)p_variant.operator int64_t(); \
} \
}; \
template <> \
struct PtrToArg<m_class::m_enum> { \
_FORCE_INLINE_ static m_class::m_enum convert(const void *p_ptr) { \
return m_class::m_enum(*reinterpret_cast<const int64_t *>(p_ptr)); \
} \
typedef int64_t EncodeT; \
_FORCE_INLINE_ static void encode(m_class::m_enum p_val, const void *p_ptr) { \
*(int64_t *)p_ptr = p_val; \
} \
}; \
}
template <class T>
struct VariantCaster {
static _FORCE_INLINE_ T cast(const Variant &p_variant) {
return p_variant;
}
};
template <class T>
struct VariantCaster<T &> {
static _FORCE_INLINE_ T cast(const Variant &p_variant) {
return p_variant;
}
};
template <class T>
struct VariantCaster<const T &> {
static _FORCE_INLINE_ T cast(const Variant &p_variant) {
return p_variant;
}
};
template <typename T>
struct VariantObjectClassChecker {
static _FORCE_INLINE_ bool check(const Variant &p_variant) {
return true;
}
};
template <typename T>
class Ref;
template <typename T>
struct VariantObjectClassChecker<const Ref<T> &> {
static _FORCE_INLINE_ bool check(const Variant &p_variant) {
Object *obj = p_variant;
const Ref<T> node = p_variant;
return node.ptr() || !obj;
}
};
template <class T>
struct VariantCasterAndValidate {
static _FORCE_INLINE_ T cast(const Variant **p_args, uint32_t p_arg_idx, GDNativeCallError &r_error) {
GDNativeVariantType argtype = GetTypeInfo<T>::VARIANT_TYPE;
if (!internal::gdn_interface->variant_can_convert_strict(static_cast<GDNativeVariantType>(p_args[p_arg_idx]->get_type()), argtype) ||
!VariantObjectClassChecker<T>::check(p_args[p_arg_idx])) {
r_error.error = GDNATIVE_CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = p_arg_idx;
r_error.expected = argtype;
}
return VariantCaster<T>::cast(*p_args[p_arg_idx]);
}
};
template <class T>
struct VariantCasterAndValidate<T &> {
static _FORCE_INLINE_ T cast(const Variant **p_args, uint32_t p_arg_idx, GDNativeCallError &r_error) {
GDNativeVariantType argtype = GetTypeInfo<T>::VARIANT_TYPE;
if (!internal::gdn_interface->variant_can_convert_strict(static_cast<GDNativeVariantType>(p_args[p_arg_idx]->get_type()), argtype) ||
!VariantObjectClassChecker<T>::check(p_args[p_arg_idx])) {
r_error.error = GDNATIVE_CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = p_arg_idx;
r_error.expected = argtype;
}
return VariantCaster<T>::cast(*p_args[p_arg_idx]);
}
};
template <class T>
struct VariantCasterAndValidate<const T &> {
static _FORCE_INLINE_ T cast(const Variant **p_args, uint32_t p_arg_idx, GDNativeCallError &r_error) {
GDNativeVariantType argtype = GetTypeInfo<T>::VARIANT_TYPE;
if (!internal::gdn_interface->variant_can_convert_strict(static_cast<GDNativeVariantType>(p_args[p_arg_idx]->get_type()), argtype) ||
!VariantObjectClassChecker<T>::check(p_args[p_arg_idx])) {
r_error.error = GDNATIVE_CALL_ERROR_INVALID_ARGUMENT;
r_error.argument = p_arg_idx;
r_error.expected = argtype;
}
return VariantCaster<T>::cast(*p_args[p_arg_idx]);
}
};
template <class T, class... P, size_t... Is>
void call_with_ptr_args_helper(T *p_instance, void (T::*p_method)(P...), const GDNativeTypePtr *p_args, IndexSequence<Is...>) {
(p_instance->*p_method)(PtrToArg<P>::convert(p_args[Is])...);
}
template <class T, class... P, size_t... Is>
void call_with_ptr_argsc_helper(T *p_instance, void (T::*p_method)(P...) const, const GDNativeTypePtr *p_args, IndexSequence<Is...>) {
(p_instance->*p_method)(PtrToArg<P>::convert(p_args[Is])...);
}
template <class T, class R, class... P, size_t... Is>
void call_with_ptr_args_ret_helper(T *p_instance, R (T::*p_method)(P...), const GDNativeTypePtr *p_args, void *r_ret, IndexSequence<Is...>) {
PtrToArg<R>::encode((p_instance->*p_method)(PtrToArg<P>::convert(p_args[Is])...), r_ret);
}
template <class T, class R, class... P, size_t... Is>
void call_with_ptr_args_retc_helper(T *p_instance, R (T::*p_method)(P...) const, const GDNativeTypePtr *p_args, void *r_ret, IndexSequence<Is...>) {
PtrToArg<R>::encode((p_instance->*p_method)(PtrToArg<P>::convert(p_args[Is])...), r_ret);
}
template <class T, class... P>
void call_with_ptr_args(T *p_instance, void (T::*p_method)(P...), const GDNativeTypePtr *p_args, void * /*ret*/) {
call_with_ptr_args_helper<T, P...>(p_instance, p_method, p_args, BuildIndexSequence<sizeof...(P)>{});
}
template <class T, class... P>
void call_with_ptr_args(T *p_instance, void (T::*p_method)(P...) const, const GDNativeTypePtr *p_args, void * /*ret*/) {
call_with_ptr_argsc_helper<T, P...>(p_instance, p_method, p_args, BuildIndexSequence<sizeof...(P)>{});
}
template <class T, class R, class... P>
void call_with_ptr_args(T *p_instance, R (T::*p_method)(P...), const GDNativeTypePtr *p_args, void *r_ret) {
call_with_ptr_args_ret_helper<T, R, P...>(p_instance, p_method, p_args, r_ret, BuildIndexSequence<sizeof...(P)>{});
}
template <class T, class R, class... P>
void call_with_ptr_args(T *p_instance, R (T::*p_method)(P...) const, const GDNativeTypePtr *p_args, void *r_ret) {
call_with_ptr_args_retc_helper<T, R, P...>(p_instance, p_method, p_args, r_ret, BuildIndexSequence<sizeof...(P)>{});
}
template <class T, class... P, size_t... Is>
void call_with_variant_args_helper(T *p_instance, void (T::*p_method)(P...), const Variant **p_args, GDNativeCallError &r_error, IndexSequence<Is...>) {
r_error.error = GDNATIVE_CALL_OK;
#ifdef DEBUG_METHODS_ENABLED
(p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...);
#else
(p_instance->*p_method)(VariantCaster<P>::cast(*p_args[Is])...);
#endif
(void)(p_args); // Avoid warning.
}
template <class T, class... P, size_t... Is>
void call_with_variant_argsc_helper(T *p_instance, void (T::*p_method)(P...) const, const Variant **p_args, GDNativeCallError &r_error, IndexSequence<Is...>) {
r_error.error = GDNATIVE_CALL_OK;
#ifdef DEBUG_METHODS_ENABLED
(p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...);
#else
(p_instance->*p_method)(VariantCaster<P>::cast(*p_args[Is])...);
#endif
(void)(p_args); // Avoid warning.
}
template <class T, class R, class... P, size_t... Is>
void call_with_variant_args_ret_helper(T *p_instance, R (T::*p_method)(P...), const Variant **p_args, Variant &r_ret, GDNativeCallError &r_error, IndexSequence<Is...>) {
r_error.error = GDNATIVE_CALL_OK;
#ifdef DEBUG_METHODS_ENABLED
r_ret = (p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...);
#else
r_ret = (p_instance->*p_method)(VariantCaster<P>::cast(*p_args[Is])...);
#endif
}
template <class T, class R, class... P, size_t... Is>
void call_with_variant_args_retc_helper(T *p_instance, R (T::*p_method)(P...) const, const Variant **p_args, Variant &r_ret, GDNativeCallError &r_error, IndexSequence<Is...>) {
r_error.error = GDNATIVE_CALL_OK;
#ifdef DEBUG_METHODS_ENABLED
r_ret = (p_instance->*p_method)(VariantCasterAndValidate<P>::cast(p_args, Is, r_error)...);
#else
r_ret = (p_instance->*p_method)(VariantCaster<P>::cast(*p_args[Is])...);
#endif
(void)p_args;
}
template <class T, class... P>
void call_with_variant_args_dv(T *p_instance, void (T::*p_method)(P...), const GDNativeVariantPtr *p_args, int p_argcount, GDNativeCallError &r_error, const std::vector<Variant> &default_values) {
#ifdef DEBUG_ENABLED
if ((size_t)p_argcount > sizeof...(P)) {
r_error.error = GDNATIVE_CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = (int32_t)sizeof...(P);
return;
}
#endif
int32_t missing = (int32_t)sizeof...(P) - (int32_t)p_argcount;
int32_t dvs = (int32_t)default_values.size();
#ifdef DEBUG_ENABLED
if (missing > dvs) {
r_error.error = GDNATIVE_CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = (int32_t)sizeof...(P);
return;
}
#endif
Variant args[sizeof...(P) == 0 ? 1 : sizeof...(P)]; // Avoid zero sized array.
std::array<const Variant *, sizeof...(P)> argsp;
for (int32_t i = 0; i < (int32_t)sizeof...(P); i++) {
if (i < p_argcount) {
args[i] = Variant(p_args[i]);
} else {
args[i] = default_values[i - p_argcount + (dvs - missing)];
}
argsp[i] = &args[i];
}
call_with_variant_args_helper(p_instance, p_method, argsp.data(), r_error, BuildIndexSequence<sizeof...(P)>{});
}
template <class T, class... P>
void call_with_variant_argsc_dv(T *p_instance, void (T::*p_method)(P...) const, const GDNativeVariantPtr *p_args, int p_argcount, GDNativeCallError &r_error, const std::vector<Variant> &default_values) {
#ifdef DEBUG_ENABLED
if ((size_t)p_argcount > sizeof...(P)) {
r_error.error = GDNATIVE_CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = (int32_t)sizeof...(P);
return;
}
#endif
int32_t missing = (int32_t)sizeof...(P) - (int32_t)p_argcount;
int32_t dvs = (int32_t)default_values.size();
#ifdef DEBUG_ENABLED
if (missing > dvs) {
r_error.error = GDNATIVE_CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = (int32_t)sizeof...(P);
return;
}
#endif
Variant args[sizeof...(P) == 0 ? 1 : sizeof...(P)]; // Avoid zero sized array.
std::array<const Variant *, sizeof...(P)> argsp;
for (int32_t i = 0; i < (int32_t)sizeof...(P); i++) {
if (i < p_argcount) {
args[i] = Variant(p_args[i]);
} else {
args[i] = default_values[i - p_argcount + (dvs - missing)];
}
argsp[i] = &args[i];
}
call_with_variant_argsc_helper(p_instance, p_method, argsp.data(), r_error, BuildIndexSequence<sizeof...(P)>{});
}
template <class T, class R, class... P>
void call_with_variant_args_ret_dv(T *p_instance, R (T::*p_method)(P...), const GDNativeVariantPtr *p_args, int p_argcount, Variant &r_ret, GDNativeCallError &r_error, const std::vector<Variant> &default_values) {
#ifdef DEBUG_ENABLED
if ((size_t)p_argcount > sizeof...(P)) {
r_error.error = GDNATIVE_CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = (int32_t)sizeof...(P);
return;
}
#endif
int32_t missing = (int32_t)sizeof...(P) - (int32_t)p_argcount;
int32_t dvs = (int32_t)default_values.size();
#ifdef DEBUG_ENABLED
if (missing > dvs) {
r_error.error = GDNATIVE_CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = (int32_t)sizeof...(P);
return;
}
#endif
Variant args[sizeof...(P) == 0 ? 1 : sizeof...(P)]; // Avoid zero sized array.
std::array<const Variant *, sizeof...(P)> argsp;
for (int32_t i = 0; i < (int32_t)sizeof...(P); i++) {
if (i < p_argcount) {
args[i] = Variant(p_args[i]);
} else {
args[i] = default_values[i - p_argcount + (dvs - missing)];
}
argsp[i] = &args[i];
}
call_with_variant_args_ret_helper(p_instance, p_method, argsp.data(), r_ret, r_error, BuildIndexSequence<sizeof...(P)>{});
}
template <class T, class R, class... P>
void call_with_variant_args_retc_dv(T *p_instance, R (T::*p_method)(P...) const, const GDNativeVariantPtr *p_args, int p_argcount, Variant &r_ret, GDNativeCallError &r_error, const std::vector<Variant> &default_values) {
#ifdef DEBUG_ENABLED
if ((size_t)p_argcount > sizeof...(P)) {
r_error.error = GDNATIVE_CALL_ERROR_TOO_MANY_ARGUMENTS;
r_error.argument = (int32_t)sizeof...(P);
return;
}
#endif
int32_t missing = (int32_t)sizeof...(P) - (int32_t)p_argcount;
int32_t dvs = (int32_t)default_values.size();
#ifdef DEBUG_ENABLED
if (missing > dvs) {
r_error.error = GDNATIVE_CALL_ERROR_TOO_FEW_ARGUMENTS;
r_error.argument = (int32_t)sizeof...(P);
return;
}
#endif
Variant args[sizeof...(P) == 0 ? 1 : sizeof...(P)]; // Avoid zero sized array.
std::array<const Variant *, sizeof...(P)> argsp;
for (int32_t i = 0; i < (int32_t)sizeof...(P); i++) {
if (i < p_argcount) {
args[i] = Variant(p_args[i]);
} else {
args[i] = default_values[i - p_argcount + (dvs - missing)];
}
argsp[i] = &args[i];
}
call_with_variant_args_retc_helper(p_instance, p_method, argsp.data(), r_ret, r_error, BuildIndexSequence<sizeof...(P)>{});
}
// GCC raises "parameter 'p_args' set but not used" when P = {},
// it's not clever enough to treat other P values as making this branch valid.
#if defined(DEBUG_METHODS_ENABLED) && defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
#endif
template <class Q>
void call_get_argument_type_helper(int p_arg, int &index, GDNativeVariantType &type) {
if (p_arg == index) {
type = GetTypeInfo<Q>::VARIANT_TYPE;
}
index++;
}
template <class... P>
GDNativeVariantType call_get_argument_type(int p_arg) {
GDNativeVariantType type = GDNATIVE_VARIANT_TYPE_NIL;
int index = 0;
// I think rocket science is simpler than modern C++.
using expand_type = int[];
expand_type a{ 0, (call_get_argument_type_helper<P>(p_arg, index, type), 0)... };
(void)a; // Suppress (valid, but unavoidable) -Wunused-variable warning.
(void)index; // Suppress GCC warning.
return type;
}
template <class Q>
void call_get_argument_type_info_helper(int p_arg, int &index, GDNativePropertyInfo &info) {
if (p_arg == index) {
info = GetTypeInfo<Q>::get_class_info();
}
index++;
}
template <class... P>
void call_get_argument_type_info(int p_arg, GDNativePropertyInfo &info) {
int index = 0;
// I think rocket science is simpler than modern C++.
using expand_type = int[];
expand_type a{ 0, (call_get_argument_type_info_helper<P>(p_arg, index, info), 0)... };
(void)a; // Suppress (valid, but unavoidable) -Wunused-variable warning.
(void)index; // Suppress GCC warning.
}
template <class Q>
void call_get_argument_metadata_helper(int p_arg, int &index, GDNativeExtensionClassMethodArgumentMetadata &md) {
if (p_arg == index) {
md = GetTypeInfo<Q>::METADATA;
}
index++;
}
template <class... P>
GDNativeExtensionClassMethodArgumentMetadata call_get_argument_metadata(int p_arg) {
GDNativeExtensionClassMethodArgumentMetadata md = GDNATIVE_EXTENSION_METHOD_ARGUMENT_METADATA_NONE;
int index = 0;
// I think rocket science is simpler than modern C++.
using expand_type = int[];
expand_type a{ 0, (call_get_argument_metadata_helper<P>(p_arg, index, md), 0)... };
(void)a; // Suppress (valid, but unavoidable) -Wunused-variable warning.
(void)index;
return md;
}
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
} // namespace godot
#endif // ! GODOT_CPP_BINDER_COMMON_HPP
|
#include <vtkCellData.h>
#include <vtkWorldPointPicker.h>
#include <vtkPropPicker.h>
#include <vtkPlatonicSolidSource.h>
#include <vtkLoopSubdivisionFilter.h>
#include <vtkTriangle.h>
#include <vtkTransform.h>
#if VTK_MAJOR_VERSION==6 || (VTK_MAJOR_VERSION==5 && VTK_MINOR_VERSION>4)
#include <vtkHardwareSelector.h>
#include <vtkSelectionNode.h>
#else
#include <vtkVisibleCellSelector.h>
#endif
#include <vtkSelection.h>
#include <vtkCellArray.h>
#include <vtkTransformFilter.h>
#include <vtkCamera.h>
#include <vtkActor.h>
#include <vtkPolyDataMapper.h>
#include <vtkPointPicker.h>
#include <vtkPLYReader.h>
#include <vtkWindowToImageFilter.h>
#include <vtkPNGWriter.h>
#include "vtkProperty.h"
#include <cv.h>
#include <highgui.h>
#include <sstream>
#include <fstream>
#include <render_views_tesselated_sphere_mod.h>
Eigen::Matrix3f RenderViewsTesselatedSphere::getRotMatAroundVector(const Eigen::Vector3f &v, double degrees){
Eigen::Vector3f vnorm = v.normalized();
double theta = degrees/180.0 * 3.14159265359;
Eigen::Matrix3f rot_mat;
double cost = cos(theta);
double sint = sin(theta);
double vx = vnorm[0];
double vy = vnorm[1];
double vz = vnorm[2];
rot_mat(0, 0) = cost + pow(vx,2)*(1-cost);
rot_mat(0, 1) = vx*vy*(1-cost) - vz*sint;
rot_mat(0, 2) = vx*vz*(1-cost) + vy*sint;
rot_mat(1, 0) = vy*vx*(1-cost) + vz*sint;
rot_mat(1, 1) = cost + pow(vy,2)*(1-cost);
rot_mat(1, 2) = vy*vz*(1-cost) - vx*sint;
rot_mat(2, 0) = vz*vx*(1-cost) - vy*sint;
rot_mat(2, 1) = vz*vy*(1-cost) + vx*sint;
rot_mat(2, 2) = cost + pow(vz,2)*(1-cost);
return rot_mat;
}
void RenderViewsTesselatedSphere::save_rendering(const vtkSmartPointer<vtkRenderWindow> &render_win,
const vtkSmartPointer<vtkRenderer> &renderer,
vtkSmartPointer<vtkCamera> &cam,
int fcounter)
{
//write rgb png
vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter = vtkSmartPointer<vtkWindowToImageFilter>::New();
windowToImageFilter->SetInput(render_win);
windowToImageFilter->SetMagnification(1);
windowToImageFilter->SetInputBufferTypeToRGB();
// if there are problems with rendering, try
// to commenting out the line below
windowToImageFilter->ReadFrontBufferOff();
vtkSmartPointer<vtkPNGWriter> writer = vtkSmartPointer<vtkPNGWriter>::New();
std::stringstream fname;
fname << outFolder_ << "/rgb" << fcounter << ".png";
writer->SetFileName(fname.str().c_str());
writer->SetInputConnection(windowToImageFilter->GetOutputPort());
writer->Write();
//write depth png
render_win->GetZbufferData (0, 0, resolutionX_ - 1, resolutionY_ - 1, &(depthbuf_[0]));
double z_near, z_far;
cam->GetClippingRange(z_near, z_far);
cv::Mat depthimg = cv::Mat::zeros(480, 640, CV_16U);
for (int x = 0; x < resolutionX_; x++)
{
for (int y = 0; y < resolutionY_; y++)
{
float value = depthbuf_[y * resolutionX_ + x];
if (value != 1.0)
{
double depth = -1 * ((z_far * z_near) / (value * (z_far - z_near) - z_far));
depthimg.at < int16_t > (y, x) = (int16_t) (depth * 1000.0);
}
}
}
cv::flip(depthimg, depthimg, 0);
fname.str("");
fname << outFolder_ << "/depth" << fcounter << ".png";
cv::imwrite(fname.str(), depthimg);
//write surface normals
std::vector<unsigned short> depthvec;
depthvec.assign((unsigned short*)depthimg.datastart, (unsigned short*)depthimg.dataend);
std::vector<float> normals;
surface_normals_gpu::generate_normals(depthvec, depthimg.cols, depthimg.rows, 575.0f, normals);
//surface_normals_gpu::generate_normals(depthvec, depthimg.cols, depthimg.rows, getRenderFocalLength(), normals);
fname.str("");
fname << outFolder_ << "/surface_normals" << fcounter << ".bin";
std::ofstream snout(fname.str().c_str(), std::ios::out | std::ios::binary);
snout.write(reinterpret_cast<const char*>(&normals[0]), normals.size()*sizeof(float));
snout.close();
//write pose
fname.str("");
fname << outFolder_ << "/pose" << fcounter << ".txt";
ofstream fpose(fname.str().c_str());
for(int i=0; i<4; ++i){
for(int j=0; j<4; ++j){
fpose << cam->GetViewTransformMatrix()->GetElement(i, j);
if(j!=3) fpose << " ";
}
fpose << endl;
}
fpose.close();
}
void RenderViewsTesselatedSphere::generateViews() {
//read PLY
vtkSmartPointer<vtkPLYReader> reader = vtkSmartPointer<vtkPLYReader>::New();
reader->SetFileName (plyFileName_.c_str());
vtkSmartPointer<vtkPolyData> vtkpolydata = reader->GetOutput();
vtkpolydata->Update();
//calculate center of object
double CoM[3];
vtkIdType npts_com = 0, *ptIds_com = NULL;
vtkSmartPointer<vtkCellArray> cells_com = vtkpolydata->GetPolys ();
double center[3], p1_com[3], p2_com[3], p3_com[3], area_com, totalArea_com = 0;
double comx = 0, comy = 0, comz = 0;
for (cells_com->InitTraversal (); cells_com->GetNextCell (npts_com, ptIds_com);)
{
vtkpolydata->GetPoint (ptIds_com[0], p1_com);
vtkpolydata->GetPoint (ptIds_com[1], p2_com);
vtkpolydata->GetPoint (ptIds_com[2], p3_com);
vtkTriangle::TriangleCenter (p1_com, p2_com, p3_com, center);
area_com = vtkTriangle::TriangleArea (p1_com, p2_com, p3_com);
comx += center[0] * area_com;
comy += center[1] * area_com;
comz += center[2] * area_com;
totalArea_com += area_com;
}
if(render_around_0_) {
CoM[0] = CoM[1] = CoM[2] = 0.0;
}
else {
CoM[0] = comx / totalArea_com;
CoM[1] = comy / totalArea_com;
CoM[2] = comz / totalArea_com;
}
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New ();
mapper->SetInputConnection (reader->GetOutputPort());
mapper->Update ();
//Calculate radius according to mesh bounds
double bb[6];
mapper->GetBounds (bb);
double ms = (std::max) ((std::fabs) (bb[0] - bb[1]),
(std::max) ((std::fabs) (bb[2] - bb[3]), (std::fabs) (bb[4] - bb[5])));
//radius_sphere_ = ms * 2.0;
//xtion initial distance from the object
if(object_radius_ < 0) {
radius_sphere_ = ms + start_height_;
}
else {
radius_sphere_ = object_radius_ + start_height_;
}
//create icosahedron
vtkSmartPointer<vtkPlatonicSolidSource> ico = vtkSmartPointer<vtkPlatonicSolidSource>::New ();
ico->SetSolidTypeToIcosahedron ();
ico->Update ();
//tesselate cells from icosahedron
vtkSmartPointer<vtkLoopSubdivisionFilter> subdivide = vtkSmartPointer<vtkLoopSubdivisionFilter>::New ();
subdivide->SetNumberOfSubdivisions (tesselation_level_);
subdivide->SetInputConnection (ico->GetOutputPort ());
#if VTK_MAJOR_VERSION>=6
subdivide->Update();
#endif
// Get camera positions
vtkPolyData *sphere = subdivide->GetOutput ();
#if VTK_MAJOR_VERSION<6
sphere->Update ();
#endif
std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > cam_positions;
if (!use_vertices_)
{
vtkSmartPointer<vtkCellArray> cells_sphere = sphere->GetPolys ();
//cam_positions.resize (sphere->GetNumberOfPolys ());
size_t i=0;
for (cells_sphere->InitTraversal (); cells_sphere->GetNextCell (npts_com, ptIds_com);)
{
sphere->GetPoint (ptIds_com[0], p1_com);
sphere->GetPoint (ptIds_com[1], p2_com);
sphere->GetPoint (ptIds_com[2], p3_com);
vtkTriangle::TriangleCenter (p1_com, p2_com, p3_com, center);
//cam_positions[i] = Eigen::Vector3f (float (center[0]), float (center[1]), float (center[2]));
if( (above_z_ && center[2] >= 0) || (below_z_ && center[2] <= 0) || (!above_z_ && !below_z_) )
cam_positions.push_back(Eigen::Vector3f (float (center[0]), float (center[1]), float (center[2])) );
i++;
}
}
else
{
//cam_positions.resize (sphere->GetNumberOfPoints ());
for (int i = 0; i < sphere->GetNumberOfPoints (); i++)
{
double cam_pos[3];
sphere->GetPoint (i, cam_pos);
//cam_positions[i] = Eigen::Vector3f (float (cam_pos[0]), float (cam_pos[1]), float (cam_pos[2]));
if( (above_z_ && cam_pos[2] >= 0) || (below_z_ && cam_pos[2] <= 0) || (!above_z_ && !below_z_) )
//if(!above_z_ || (above_z_ && cam_pos[2] >= 0) )
cam_positions.push_back( Eigen::Vector3f (float (cam_pos[0]), float (cam_pos[1]), float (cam_pos[2])) );
}
}
std::cout << "Total number of viewpoints: " <<
cam_positions.size() * inPlaceCamRotations_ * heights_ * lightings_ << std::endl;
//create renderer and window
vtkSmartPointer<vtkRenderWindow> render_win = vtkSmartPointer<vtkRenderWindow>::New ();
vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New ();
render_win->AddRenderer (renderer);
render_win->SetSize (resolutionX_, resolutionY_);
renderer->SetBackground (1.0, 1.0, 1.0);
vtkSmartPointer<vtkActor> actor_view = vtkSmartPointer<vtkActor>::New ();
actor_view->SetMapper (mapper);
renderer->AddActor (actor_view);
//create camera
vtkSmartPointer<vtkCamera> cam = vtkSmartPointer<vtkCamera>::New ();
cam->SetViewAngle (view_angle_);
cam->SetFocalPoint (CoM[0], CoM[1], CoM[2]);
double cam_pos[3];
int fcounter = 0;
for (size_t i = 0; i < cam_positions.size (); i++)
{
for(int cur_height=0; cur_height<heights_; ++cur_height){
cam_pos[0] = cam_positions[i][0];
cam_pos[1] = cam_positions[i][1];
cam_pos[2] = cam_positions[i][2];
Eigen::Vector3f cam_pos_3f (static_cast<float> (cam_pos[0]),
static_cast<float> (cam_pos[1]), static_cast<float> (cam_pos[2]));
cam_pos_3f = cam_pos_3f.normalized ();
for (int k = 0; k < 3; k++)
{
cam_pos[k] = cam_pos_3f[k] * (radius_sphere_ + cur_height*height_step_);
}
//Get various CameraViewUp vectors in each location
//Get first vector randomly
Eigen::Vector3f CamViewUp;
if(std::fabs(cam_pos[2]) > 0.00001){
CamViewUp << 1, 1, (- cam_pos[0] - cam_pos[1]) / cam_pos[2];
}
else if(std::fabs(cam_pos[1]) > 0.00001){
CamViewUp << 1, (-cam_pos[0] - cam_pos[2]) / cam_pos[1] ,1;
}
else{
CamViewUp << 0, 1, 0;
}
CamViewUp = CamViewUp.normalized();
Eigen::Matrix3f rotMat = getRotMatAroundVector(cam_pos_3f, 360.0/(double)inPlaceCamRotations_);
for(int k=0; k<3; ++k)
cam_pos[k] += CoM[k];
cam->SetPosition (cam_pos);
//cam->Modified ();
for(int r = 0; r < inPlaceCamRotations_; ++r){
cam->SetViewUp (CamViewUp[0], CamViewUp[1], CamViewUp[2]);
cam->Modified ();
renderer->SetActiveCamera (cam);
for(int light = 0; light < lightings_; ++light){
actor_view->GetProperty()->SetAmbient(light * 0.1);
render_win->Render ();
save_rendering(render_win, renderer, cam, fcounter++);
std::cout << "Rendering viewpoint: " << fcounter << "\r";
}
CamViewUp = rotMat * CamViewUp;
}
}
}
}
|
// Copyright (c) 2019 The CounosH Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/util/blockfilter.h>
#include <chainparams.h>
#include <validation.h>
bool ComputeFilter(BlockFilterType filter_type, const CBlockIndex* block_index, BlockFilter& filter)
{
CBlock block;
if (!ReadBlockFromDisk(block, block_index->GetBlockPos(), Params().GetConsensus())) {
return false;
}
CBlockUndo block_undo;
if (block_index->nHeight > 0 && !UndoReadFromDisk(block_undo, block_index)) {
return false;
}
filter = BlockFilter(filter_type, block, block_undo);
return true;
}
|
#pragma once
#include "SFEPanel.hpp"
#include "imgui_plot.h"
namespace sfe {
class SFEPanelPlot : public SFEPanel {
public:
virtual bool Init() override;
virtual void Update() override;
virtual void Exit() override;
virtual void OnMessage(const SFEMessage& msg) override;
private:
std::vector<float> _y_data;
std::vector<float> _x_data;
int _max_display_sz = 2048;
};
} // namespace sfe
|
//
// Copyright 2016 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
/// \file simpleLightingContext.cpp
#include "pxr/imaging/glf/glew.h"
#include "pxr/imaging/glf/simpleLightingContext.h"
#include "pxr/imaging/glf/bindingMap.h"
#include "pxr/imaging/glf/contextCaps.h"
#include "pxr/imaging/glf/diagnostic.h"
#include "pxr/imaging/glf/simpleLight.h"
#include "pxr/imaging/glf/simpleMaterial.h"
#include "pxr/imaging/glf/uniformBlock.h"
#include "pxr/base/arch/pragmas.h"
#include "pxr/base/tf/stringUtils.h"
#include "pxr/base/tf/staticData.h"
#include "pxr/base/tf/staticTokens.h"
#include <algorithm>
#include <iostream>
#include <string>
PXR_NAMESPACE_OPEN_SCOPE
TF_DEFINE_PRIVATE_TOKENS(
_tokens,
((lightingUB, "Lighting"))
((shadowUB, "Shadow"))
((bindlessShadowUB, "BindlessShadowSamplers"))
((materialUB, "Material"))
((shadowSampler, "shadowTexture"))
((shadowCompareSampler, "shadowCompareTexture"))
);
// XXX:
// currently max number of lights are limited to 16 by
// GL_MAX_VARYING_VECTORS for having the varying attribute
// out vec2 FshadowFilterWidth[NUM_LIGHTS];
// which is defined in simpleLighting.glslfx.
static const int _maxLightsUsed = 16;
/* static */
GlfSimpleLightingContextRefPtr
GlfSimpleLightingContext::New()
{
return TfCreateRefPtr(new This());
}
GlfSimpleLightingContext::GlfSimpleLightingContext() :
_shadows(TfCreateRefPtr(new GlfSimpleShadowArray())),
_worldToViewMatrix(1.0),
_projectionMatrix(1.0),
_sceneAmbient(0.01, 0.01, 0.01, 1.0),
_useLighting(false),
_useShadows(false),
_useColorMaterialDiffuse(false),
_lightingUniformBlockValid(false),
_shadowUniformBlockValid(false),
_materialUniformBlockValid(false)
{
}
GlfSimpleLightingContext::~GlfSimpleLightingContext()
{
}
void
GlfSimpleLightingContext::SetLights(GlfSimpleLightVector const & lights)
{
_lights = lights;
_lightingUniformBlockValid = false;
_shadowUniformBlockValid = false;
int numLights = GetNumLightsUsed();
_useShadows = false;
for (int i = 0;i < numLights; ++i) {
if (_lights[i].HasShadow()) {
_useShadows = true;
break;
}
}
}
GlfSimpleLightVector &
GlfSimpleLightingContext::GetLights()
{
return _lights;
}
int
GlfSimpleLightingContext::GetNumLightsUsed() const
{
return std::min((int)_lights.size(), _maxLightsUsed);
}
int
GlfSimpleLightingContext::ComputeNumShadowsUsed() const
{
int numShadows = 0;
for (auto const& light : _lights) {
if (light.HasShadow() && numShadows <= light.GetShadowIndexEnd()) {
numShadows = light.GetShadowIndexEnd() + 1;
}
}
return numShadows;
}
void
GlfSimpleLightingContext::SetShadows(GlfSimpleShadowArrayRefPtr const & shadows)
{
_shadows = shadows;
_shadowUniformBlockValid = false;
}
GlfSimpleShadowArrayRefPtr const &
GlfSimpleLightingContext::GetShadows()
{
return _shadows;
}
void
GlfSimpleLightingContext::SetMaterial(GlfSimpleMaterial const & material)
{
if (_material != material) {
_material = material;
_materialUniformBlockValid = false;
}
}
GlfSimpleMaterial const &
GlfSimpleLightingContext::GetMaterial() const
{
return _material;
}
void
GlfSimpleLightingContext::SetSceneAmbient(GfVec4f const & sceneAmbient)
{
if (_sceneAmbient != sceneAmbient) {
_sceneAmbient = sceneAmbient;
_materialUniformBlockValid = false;
}
}
GfVec4f const &
GlfSimpleLightingContext::GetSceneAmbient() const
{
return _sceneAmbient;
}
void
GlfSimpleLightingContext::SetCamera(GfMatrix4d const &worldToViewMatrix,
GfMatrix4d const &projectionMatrix)
{
if (_worldToViewMatrix != worldToViewMatrix) {
_worldToViewMatrix = worldToViewMatrix;
_lightingUniformBlockValid = false;
_shadowUniformBlockValid = false;
}
_projectionMatrix = projectionMatrix;
}
void
GlfSimpleLightingContext::SetUseLighting(bool val)
{
if (_useLighting != val) {
_useLighting = val;
_lightingUniformBlockValid = false;
}
}
bool
GlfSimpleLightingContext::GetUseLighting() const
{
return _useLighting;
}
bool
GlfSimpleLightingContext::GetUseShadows() const
{
return _useShadows;
}
void
GlfSimpleLightingContext::SetUseColorMaterialDiffuse(bool val)
{
if (_useColorMaterialDiffuse != val) {
_lightingUniformBlockValid = false;
_useColorMaterialDiffuse = val;
}
}
bool
GlfSimpleLightingContext::GetUseColorMaterialDiffuse() const
{
return _useColorMaterialDiffuse;
}
void
GlfSimpleLightingContext::InitUniformBlockBindings(
GlfBindingMapPtr const &bindingMap) const
{
// populate uniform bindings (XXX: need better API)
bindingMap->GetUniformBinding(_tokens->lightingUB);
bindingMap->GetUniformBinding(_tokens->shadowUB);
bindingMap->GetUniformBinding(_tokens->materialUB);
if (GlfSimpleShadowArray::GetBindlessShadowMapsEnabled()) {
bindingMap->GetUniformBinding(_tokens->bindlessShadowUB);
}
}
void
GlfSimpleLightingContext::InitSamplerUnitBindings(
GlfBindingMapPtr const &bindingMap) const
{
if (!GlfSimpleShadowArray::GetBindlessShadowMapsEnabled()) {
bindingMap->GetSamplerUnit(_tokens->shadowSampler);
bindingMap->GetSamplerUnit(_tokens->shadowCompareSampler);
}
}
inline void
setVec3(float *dst, GfVec3f const & vec)
{
dst[0] = vec[0];
dst[1] = vec[1];
dst[2] = vec[2];
}
inline static void
setVec4(float *dst, GfVec4f const &vec)
{
dst[0] = vec[0];
dst[1] = vec[1];
dst[2] = vec[2];
dst[3] = vec[3];
}
inline static void
setMatrix(float *dst, GfMatrix4d const & mat)
{
for (int i = 0; i < 4; ++i)
for (int j = 0; j < 4; ++j)
dst[i*4+j] = (float)mat[i][j];
}
void
GlfSimpleLightingContext::BindUniformBlocks(GlfBindingMapPtr const &bindingMap)
{
GLF_GROUP_FUNCTION();
if (!_lightingUniformBlock)
_lightingUniformBlock = GlfUniformBlock::New("_lightingUniformBlock");
if (!_shadowUniformBlock)
_shadowUniformBlock = GlfUniformBlock::New("_shadowUniformBlock");
if (!_materialUniformBlock)
_materialUniformBlock = GlfUniformBlock::New("_materialUniformBlock");
const bool usingBindlessShadowMaps =
GlfSimpleShadowArray::GetBindlessShadowMapsEnabled();
if (usingBindlessShadowMaps && !_bindlessShadowlUniformBlock) {
_bindlessShadowlUniformBlock =
GlfUniformBlock::New("_bindlessShadowUniformBlock");
}
bool shadowExists = false;
if ((!_lightingUniformBlockValid ||
!_shadowUniformBlockValid) && _lights.size() > 0) {
int numLights = GetNumLightsUsed();
int numShadows = ComputeNumShadowsUsed();
// 16byte aligned
struct LightSource {
float position[4];
float ambient[4];
float diffuse[4];
float specular[4];
float spotDirection[4];
float spotCutoff;
float spotFalloff;
float padding[2];
float attenuation[4];
float worldToLightTransform[16];
int32_t shadowIndexStart;
int32_t shadowIndexEnd;
int32_t hasShadow;
int32_t isIndirectLight;
};
struct Lighting {
int32_t useLighting;
int32_t useColorMaterialDiffuse;
int32_t padding[2];
ARCH_PRAGMA_PUSH
ARCH_PRAGMA_ZERO_SIZED_STRUCT
LightSource lightSource[0];
ARCH_PRAGMA_POP
};
// 16byte aligned
struct ShadowMatrix {
float viewToShadowMatrix[16];
float shadowToViewMatrix[16];
float blur;
float bias;
float padding[2];
};
struct Shadow {
ARCH_PRAGMA_PUSH
ARCH_PRAGMA_ZERO_SIZED_STRUCT
ShadowMatrix shadow[0];
ARCH_PRAGMA_POP
};
// Use a uniform buffer block for the array of 64bit bindless handles.
//
// glf/shaders/simpleLighting.glslfx uses a uvec2 array instead of
// uint64_t.
// Note that uint64_t has different padding rules depending on the
// layout: std140 results in 128bit alignment, while shared (default)
// results in 64bit alignment.
struct PaddedHandle {
uint64_t handle;
//uint64_t padding; // Skip padding since we don't need it.
};
struct BindlessShadowSamplers {
ARCH_PRAGMA_PUSH
ARCH_PRAGMA_ZERO_SIZED_STRUCT
PaddedHandle shadowCompareTextures[0];
ARCH_PRAGMA_POP
};
size_t lightingSize = sizeof(Lighting) + sizeof(LightSource) * numLights;
size_t shadowSize = sizeof(ShadowMatrix) * numShadows;
Lighting *lightingData = (Lighting *)alloca(lightingSize);
Shadow *shadowData = (Shadow *)alloca(shadowSize);
memset(shadowData, 0, shadowSize);
memset(lightingData, 0, lightingSize);
BindlessShadowSamplers *bindlessHandlesData = nullptr;
size_t bindlessHandlesSize = 0;
if (usingBindlessShadowMaps) {
bindlessHandlesSize = sizeof(PaddedHandle) * numShadows;
bindlessHandlesData =
(BindlessShadowSamplers*)alloca(bindlessHandlesSize);
memset(bindlessHandlesData, 0, bindlessHandlesSize);
}
GfMatrix4d viewToWorldMatrix = _worldToViewMatrix.GetInverse();
lightingData->useLighting = _useLighting;
lightingData->useColorMaterialDiffuse = _useColorMaterialDiffuse;
for (int i = 0; _useLighting && i < numLights; ++i) {
GlfSimpleLight const &light = _lights[i];
setVec4(lightingData->lightSource[i].position,
light.GetPosition() * _worldToViewMatrix);
setVec4(lightingData->lightSource[i].diffuse, light.GetDiffuse());
setVec4(lightingData->lightSource[i].ambient, light.GetAmbient());
setVec4(lightingData->lightSource[i].specular, light.GetSpecular());
setVec3(lightingData->lightSource[i].spotDirection,
_worldToViewMatrix.TransformDir(light.GetSpotDirection()));
setVec3(lightingData->lightSource[i].attenuation,
light.GetAttenuation());
lightingData->lightSource[i].spotCutoff = light.GetSpotCutoff();
lightingData->lightSource[i].spotFalloff = light.GetSpotFalloff();
setMatrix(lightingData->lightSource[i].worldToLightTransform,
light.GetTransform().GetInverse());
lightingData->lightSource[i].hasShadow = light.HasShadow();
lightingData->lightSource[i].isIndirectLight = light.IsDomeLight();
if (lightingData->lightSource[i].hasShadow) {
int shadowIndexStart = light.GetShadowIndexStart();
lightingData->lightSource[i].shadowIndexStart =
shadowIndexStart;
int shadowIndexEnd = light.GetShadowIndexEnd();
lightingData->lightSource[i].shadowIndexEnd = shadowIndexEnd;
for (int shadowIndex = shadowIndexStart;
shadowIndex <= shadowIndexEnd; ++shadowIndex) {
GfMatrix4d viewToShadowMatrix = viewToWorldMatrix *
_shadows->GetWorldToShadowMatrix(shadowIndex);
GfMatrix4d shadowToViewMatrix =
viewToShadowMatrix.GetInverse();
shadowData->shadow[shadowIndex].bias = light.GetShadowBias();
shadowData->shadow[shadowIndex].blur = light.GetShadowBlur();
setMatrix(
shadowData->shadow[shadowIndex].viewToShadowMatrix,
viewToShadowMatrix);
setMatrix(
shadowData->shadow[shadowIndex].shadowToViewMatrix,
shadowToViewMatrix);
}
shadowExists = true;
}
}
_lightingUniformBlock->Update(lightingData, lightingSize);
_lightingUniformBlockValid = true;
if (shadowExists) {
_shadowUniformBlock->Update(shadowData, shadowSize);
_shadowUniformBlockValid = true;
if (usingBindlessShadowMaps) {
std::vector<uint64_t> const& shadowMapHandles =
_shadows->GetBindlessShadowMapHandles();
for (size_t i = 0; i < shadowMapHandles.size(); i++) {
bindlessHandlesData->shadowCompareTextures[i].handle
= shadowMapHandles[i];
}
_bindlessShadowlUniformBlock->Update(
bindlessHandlesData, bindlessHandlesSize);
}
}
}
_lightingUniformBlock->Bind(bindingMap, _tokens->lightingUB);
if (shadowExists) {
_shadowUniformBlock->Bind(bindingMap, _tokens->shadowUB);
if (usingBindlessShadowMaps) {
_bindlessShadowlUniformBlock->Bind(
bindingMap, _tokens->bindlessShadowUB);
}
}
if (!_materialUniformBlockValid) {
// has to be matched with the definition of simpleLightingShader.glslfx
struct Material {
float ambient[4];
float diffuse[4];
float specular[4];
float emission[4];
float sceneColor[4]; // XXX: should be separated?
float shininess;
float padding[3];
} materialData;
memset(&materialData, 0, sizeof(materialData));
setVec4(materialData.ambient, _material.GetAmbient());
setVec4(materialData.diffuse, _material.GetDiffuse());
setVec4(materialData.specular, _material.GetSpecular());
setVec4(materialData.emission, _material.GetEmission());
materialData.shininess = _material.GetShininess();
setVec4(materialData.sceneColor, _sceneAmbient);
_materialUniformBlock->Update(&materialData, sizeof(materialData));
_materialUniformBlockValid = true;
}
_materialUniformBlock->Bind(bindingMap, _tokens->materialUB);
}
void
GlfSimpleLightingContext::BindSamplers(GlfBindingMapPtr const &bindingMap)
{
if (GlfSimpleShadowArray::GetBindlessShadowMapsEnabled()) {
// Bindless shadow maps are made resident on creation.
return;
}
int shadowSampler = bindingMap->GetSamplerUnit(_tokens->shadowSampler);
int shadowCompareSampler = bindingMap->GetSamplerUnit(_tokens->shadowCompareSampler);
glActiveTexture(GL_TEXTURE0 + shadowSampler);
glBindTexture(GL_TEXTURE_2D_ARRAY, _shadows->GetShadowMapTexture());
glBindSampler(shadowSampler, _shadows->GetShadowMapDepthSampler());
glActiveTexture(GL_TEXTURE0 + shadowCompareSampler);
glBindTexture(GL_TEXTURE_2D_ARRAY, _shadows->GetShadowMapTexture());
glBindSampler(shadowCompareSampler, _shadows->GetShadowMapCompareSampler());
glActiveTexture(GL_TEXTURE0);
}
void
GlfSimpleLightingContext::UnbindSamplers(GlfBindingMapPtr const &bindingMap)
{
if (GlfSimpleShadowArray::GetBindlessShadowMapsEnabled()) {
// We leave the bindless shadow maps as always resident.
return;
}
int shadowSampler = bindingMap->GetSamplerUnit(_tokens->shadowSampler);
int shadowCompareSampler = bindingMap->GetSamplerUnit(_tokens->shadowCompareSampler);
glActiveTexture(GL_TEXTURE0 + shadowSampler);
glBindTexture(GL_TEXTURE_2D_ARRAY, 0);
glBindSampler(shadowSampler, 0);
glActiveTexture(GL_TEXTURE0 + shadowCompareSampler);
glBindTexture(GL_TEXTURE_2D_ARRAY, 0);
glBindSampler(shadowCompareSampler, 0);
glActiveTexture(GL_TEXTURE0);
}
void
GlfSimpleLightingContext::SetStateFromOpenGL()
{
// import classic GL light's parameters into shaded lights
SetUseLighting(glIsEnabled(GL_LIGHTING) == GL_TRUE);
GfMatrix4d worldToViewMatrix;
glGetDoublev(GL_MODELVIEW_MATRIX, worldToViewMatrix.GetArray());
GfMatrix4d viewToWorldMatrix = worldToViewMatrix.GetInverse();
GLint nLights = 0;
glGetIntegerv(GL_MAX_LIGHTS, &nLights);
GlfSimpleLightVector lights;
lights.reserve(nLights);
GlfSimpleLight light;
for(int i = 0; i < nLights; ++i)
{
int lightName = GL_LIGHT0 + i;
if (glIsEnabled(lightName)) {
GLfloat position[4], color[4];
glGetLightfv(lightName, GL_POSITION, position);
light.SetPosition(GfVec4f(position)*viewToWorldMatrix);
glGetLightfv(lightName, GL_AMBIENT, color);
light.SetAmbient(GfVec4f(color));
glGetLightfv(lightName, GL_DIFFUSE, color);
light.SetDiffuse(GfVec4f(color));
glGetLightfv(lightName, GL_SPECULAR, color);
light.SetSpecular(GfVec4f(color));
GLfloat spotDirection[3];
glGetLightfv(lightName, GL_SPOT_DIRECTION, spotDirection);
light.SetSpotDirection(
viewToWorldMatrix.TransformDir(GfVec3f(spotDirection)));
GLfloat floatValue;
glGetLightfv(lightName, GL_SPOT_CUTOFF, &floatValue);
light.SetSpotCutoff(floatValue);
glGetLightfv(lightName, GL_SPOT_EXPONENT, &floatValue);
light.SetSpotFalloff(floatValue);
GfVec3f attenuation;
glGetLightfv(lightName, GL_CONSTANT_ATTENUATION, &floatValue);
attenuation[0] = floatValue;
glGetLightfv(lightName, GL_LINEAR_ATTENUATION, &floatValue);
attenuation[1] = floatValue;
glGetLightfv(lightName, GL_QUADRATIC_ATTENUATION, &floatValue);
attenuation[2] = floatValue;
light.SetAttenuation(attenuation);
lights.push_back(light);
}
}
SetLights(lights);
GlfSimpleMaterial material;
GLfloat color[4], shininess;
glGetMaterialfv(GL_FRONT, GL_AMBIENT, color);
material.SetAmbient(GfVec4f(color));
glGetMaterialfv(GL_FRONT, GL_DIFFUSE, color);
material.SetDiffuse(GfVec4f(color));
glGetMaterialfv(GL_FRONT, GL_SPECULAR, color);
material.SetSpecular(GfVec4f(color));
glGetMaterialfv(GL_FRONT, GL_EMISSION, color);
material.SetEmission(GfVec4f(color));
glGetMaterialfv(GL_FRONT, GL_SHININESS, &shininess);
// clamp to 0.0001, since pow(0,0) is undefined in GLSL.
shininess = std::max(0.0001f, shininess);
material.SetShininess(shininess);
SetMaterial(material);
GfVec4f sceneAmbient;
glGetFloatv(GL_LIGHT_MODEL_AMBIENT, &sceneAmbient[0]);
SetSceneAmbient(sceneAmbient);
}
PXR_NAMESPACE_CLOSE_SCOPE
|
/*
* Copyright (c) 2018 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2025-05-25
*
* On the date above, in accordance with the Business Source License, use
* of this software will be governed by version 2 or later of the General
* Public License.
*/
#pragma once
#include <algorithm>
#include <chrono>
#include <map>
#include <memory>
#include <maxscale/backend.hh>
#include <maxscale/modutil.hh>
#include <maxscale/response_stat.hh>
using Endpoints = std::vector<mxs::Endpoint*>;
namespace maxscale
{
/** Move this somewhere else */
template<typename Smart>
std::vector<typename Smart::pointer> sptr_vec_to_ptr_vec(const std::vector<Smart>& sVec)
{
std::vector<typename Smart::pointer> pVec;
std::for_each(sVec.begin(), sVec.end(), [&pVec](const Smart& smart) {
pVec.push_back(smart.get());
});
return pVec;
}
typedef std::map<uint32_t, uint32_t> BackendHandleMap; /** Internal ID to external ID */
class RWBackend;
// All interfacing is now handled via RWBackend*.
using PRWBackends = std::vector<RWBackend*>;
// Internal storage for a class containing RWBackend:s.
using SRWBackends = std::vector<std::unique_ptr<RWBackend>>;
class RWBackend : public mxs::Backend
{
RWBackend(const RWBackend&);
RWBackend& operator=(const RWBackend&);
public:
static SRWBackends from_endpoints(const Endpoints& endpoints);
RWBackend(mxs::Endpoint* endpoint);
virtual ~RWBackend() = default;
void add_ps_handle(uint32_t id, uint32_t handle);
uint32_t get_ps_handle(uint32_t id) const;
bool execute_session_command();
bool continue_session_command(GWBUF* buffer);
void select_started() override;
void select_finished() override;
/**
* Write a query to the backend
*
* This function handles the replacement of the prepared statement IDs from
* the internal ID to the server specific one. Trailing parts of large
* packets should use RWBackend::continue_write.
*
* @param buffer Buffer to write
* @param type Whether a response is expected
*
* @return True if writing was successful
*/
bool write(GWBUF* buffer, response_type type = EXPECT_RESPONSE);
void close(close_type type = CLOSE_NORMAL);
maxbase::TimePoint last_write() const
{
return m_last_write;
}
void sync_averages();
private:
BackendHandleMap m_ps_handles; /**< Internal ID to backend PS handle mapping */
ResponseStat m_response_stat;
bool m_large_query = false;
maxbase::TimePoint m_last_write;
};
}
|
#include "Halide.h"
using namespace Halide;
using namespace Halide::Internal;
#define internal_assert _halide_user_assert
void check_is_sio(const Expr &e) {
Expr simpler = simplify(e);
const Call *call = simpler.as<Call>();
if (!(call && call->is_intrinsic(Call::signed_integer_overflow))) {
std::cerr
<< "\nSimplification failure:\n"
<< "Input: " << e << "\n"
<< "Output: " << simpler << "\n"
<< "Expected output: signed_integer_overflow(n)\n";
abort();
}
}
void check(const Expr &a, const Expr &b) {
Expr simpler = simplify(a);
if (!equal(simpler, b)) {
std::cerr
<< "\nSimplification failure:\n"
<< "Input: " << a << "\n"
<< "Output: " << simpler << "\n"
<< "Expected output: " << b << "\n";
abort();
}
}
void check(const Stmt &a, const Stmt &b) {
Stmt simpler = simplify(a);
if (!equal(simpler, b)) {
std::cerr
<< "\nSimplification failure:\n"
<< "Input:\n"
<< a << "\n"
<< "Output:\n"
<< simpler << "\n"
<< "Expected output:\n"
<< b << "\n";
abort();
}
}
void check_in_bounds(const Expr &a, const Expr &b, const Scope<Interval> &bi) {
Expr simpler = simplify(a, true, bi);
if (!equal(simpler, b)) {
std::cerr
<< "\nSimplification failure:\n"
<< "Input: " << a << "\n"
<< "Output: " << simpler << "\n"
<< "Expected output: " << b << "\n";
abort();
}
}
// Helper functions to use in the tests below
Expr interleave_vectors(const std::vector<Expr> &e) {
return Shuffle::make_interleave(e);
}
Expr concat_vectors(const std::vector<Expr> &e) {
return Shuffle::make_concat(e);
}
Expr slice(const Expr &e, int begin, int stride, int w) {
return Shuffle::make_slice(e, begin, stride, w);
}
Expr ramp(const Expr &base, const Expr &stride, int w) {
return Ramp::make(base, stride, w);
}
Expr broadcast(const Expr &base, int w) {
return Broadcast::make(base, w);
}
void check_casts() {
Expr x = Var("x"), y = Var("y");
check(cast(Int(32), cast(Int(32), x)), x);
check(cast(Float(32), 3), 3.0f);
check(cast(Int(32), 5.0f), 5);
check(cast(Int(32), cast(Int(8), 3)), 3);
check(cast(Int(32), cast(Int(8), 1232)), -48);
// Check redundant casts
check(cast(Float(32), cast(Float(64), x)), cast(Float(32), x));
check(cast(Int(16), cast(Int(32), x)), cast(Int(16), x));
check(cast(Int(16), cast(UInt(32), x)), cast(Int(16), x));
check(cast(UInt(16), cast(Int(32), x)), cast(UInt(16), x));
check(cast(UInt(16), cast(UInt(32), x)), cast(UInt(16), x));
// Check evaluation of constant expressions involving casts
check(cast(UInt(16), 53) + cast(UInt(16), 87), make_const(UInt(16), 140));
check(cast(Int(8), 127) + cast(Int(8), 1), make_const(Int(8), -128));
check(cast(UInt(16), -1) - cast(UInt(16), 1), make_const(UInt(16), 65534));
check(cast(Int(16), 4) * cast(Int(16), -5), make_const(Int(16), -20));
check(cast(Int(16), 16) / cast(Int(16), 4), make_const(Int(16), 4));
check(cast(Int(16), 23) % cast(Int(16), 5), make_const(Int(16), 3));
check(min(cast(Int(16), 30000), cast(Int(16), -123)), make_const(Int(16), -123));
check(max(cast(Int(16), 30000), cast(Int(16), 65000)), make_const(Int(16), 30000));
check(cast(UInt(16), -1) == cast(UInt(16), 65535), const_true());
check(cast(UInt(16), 65) == cast(UInt(16), 66), const_false());
check(cast(UInt(16), -1) < cast(UInt(16), 65535), const_false());
check(cast(UInt(16), 65) < cast(UInt(16), 66), const_true());
check(cast(UInt(16), 123.4f), make_const(UInt(16), 123));
check(cast(Float(32), cast(UInt(16), 123456.0f)), 57920.0f);
// Specific checks for 32 bit unsigned expressions - ensure simplifications are actually unsigned.
// 4000000000 (4 billion) is less than 2^32 but more than 2^31. As an int, it is negative.
check(cast(UInt(32), (int)4000000000UL) + cast(UInt(32), 5), make_const(UInt(32), (int)4000000005UL));
check(cast(UInt(32), (int)4000000000UL) - cast(UInt(32), 5), make_const(UInt(32), (int)3999999995UL));
check(cast(UInt(32), (int)4000000000UL) / cast(UInt(32), 5), make_const(UInt(32), 800000000));
check(cast(UInt(32), 800000000) * cast(UInt(32), 5), make_const(UInt(32), (int)4000000000UL));
check(cast(UInt(32), (int)4000000023UL) % cast(UInt(32), 100), make_const(UInt(32), 23));
check(min(cast(UInt(32), (int)4000000023UL), cast(UInt(32), 1000)), make_const(UInt(32), (int)1000));
check(max(cast(UInt(32), (int)4000000023UL), cast(UInt(32), 1000)), make_const(UInt(32), (int)4000000023UL));
check(cast(UInt(32), (int)4000000023UL) < cast(UInt(32), 1000), const_false());
check(cast(UInt(32), (int)4000000023UL) == cast(UInt(32), 1000), const_false());
check(cast(Float(64), 0.5f), Expr(0.5));
check((x - cast(Float(64), 0.5f)) * (x - cast(Float(64), 0.5f)),
(x + Expr(-0.5)) * (x + Expr(-0.5)));
check(cast(Int(64, 3), ramp(5.5f, 2.0f, 3)),
cast(Int(64, 3), ramp(5.5f, 2.0f, 3)));
check(cast(Int(64, 3), ramp(x, 2, 3)),
ramp(cast(Int(64), x), cast(Int(64), 2), 3));
// We do not currently expect cancellations to occur through casts
// check(cast(Int(64), x + 1) - cast(Int(64), x), cast(Int(64), 1));
// check(cast(Int(64), 1 + x) - cast(Int(64), x), cast(Int(64), 1));
// But only when overflow is undefined for the type
check(cast(UInt(8), x + 1) - cast(UInt(8), x),
cast(UInt(8), x + 1) - cast(UInt(8), x));
// Check that chains of widening casts don't lose the distinction
// between zero-extending and sign-extending.
check(cast(UInt(64), cast(UInt(32), cast(Int(8), -1))),
UIntImm::make(UInt(64), 0xffffffffULL));
// It's a good idea to pull widening casts outside of shuffles
// when the shuffle reduces the lane count (e.g. a slice_vector).
Expr some_vector = ramp(y, 2, 8) * ramp(x, 1, 8);
check(slice(cast(UInt(64, 8), some_vector), 2, 1, 3),
cast(UInt(64, 3), slice(some_vector, 2, 1, 3)));
std::vector<int> indices(18);
for (int i = 0; i < 18; i++) {
indices[i] = i & 3;
}
check(Shuffle::make({cast(UInt(64, 8), some_vector)}, indices),
Shuffle::make({cast(UInt(64, 8), some_vector)}, indices));
}
void check_algebra() {
Expr x = Var("x"), y = Var("y"), z = Var("z"), w = Var("w"), v = Var("v");
Expr xf = cast<float>(x);
Expr yf = cast<float>(y);
Expr t = const_true(), f = const_false();
check(3 + x, x + 3);
check(x + 0, x);
check(0 + x, x);
check(Expr(ramp(x, 2, 3)) + Expr(ramp(y, 4, 3)), ramp(x + y, 6, 3));
check(Expr(broadcast(4.0f, 5)) + Expr(ramp(3.25f, 4.5f, 5)), ramp(7.25f, 4.5f, 5));
check(Expr(ramp(3.25f, 4.5f, 5)) + Expr(broadcast(4.0f, 5)), ramp(7.25f, 4.5f, 5));
check(Expr(broadcast(3, 3)) + Expr(broadcast(1, 3)), broadcast(4, 3));
check((x + 3) + 4, x + 7);
check(4 + (3 + x), x + 7);
check((x + 3) + y, (x + y) + 3);
check(y + (x + 3), (x + y) + 3);
check((3 - x) + x, 3);
check(x + (3 - x), 3);
check(x * y + x * z, (y + z) * x);
check(x * y + z * x, (y + z) * x);
check(y * x + x * z, (y + z) * x);
check(y * x + z * x, (y + z) * x);
check(x - 0, x);
check((x / y) - (x / y), 0);
check(x - 2, x + (-2));
check(Expr(ramp(x, 2, 3)) - Expr(ramp(y, 4, 3)), ramp(x - y, -2, 3));
check(Expr(broadcast(4.0f, 5)) - Expr(ramp(3.25f, 4.5f, 5)), ramp(0.75f, -4.5f, 5));
check(Expr(ramp(3.25f, 4.5f, 5)) - Expr(broadcast(4.0f, 5)), ramp(-0.75f, 4.5f, 5));
check(Expr(broadcast(3, 3)) - Expr(broadcast(1, 3)), broadcast(2, 3));
check((x + y) - x, y);
check((x + y) - y, x);
check(x - (x + y), 0 - y);
check(x - (y + x), 0 - y);
check((x + 3) - 2, x + 1);
check((x + 3) - y, (x - y) + 3);
check((x - 3) - y, (x - y) + (-3));
check(x - (y - 2), (x - y) + 2);
check(3 - (y - 2), 5 - y);
check(x - (0 - y), x + y);
check(x + (0 - y), x - y);
check((0 - x) + y, y - x);
check(x * y - x * z, (y - z) * x);
check(x * y - z * x, (y - z) * x);
check(y * x - x * z, (y - z) * x);
check(y * x - z * x, (y - z) * x);
check((x * 8) - (y * 4), (x * 2 - y) * 4);
check((x * 4) - (y * 8), (x - y * 2) * 4);
check((x * 2) % 6, (x % 3) * 2);
check(x - (x / 8) * 8, x % 8);
check((x / 8) * 8 - x, -(x % 8));
check((x / 8) * 8 < x + y, 0 < x % 8 + y);
check((x / 8) * 8 < x - y, y < x % 8);
check((x / 8) * 8 < x, x % 8 != 0);
check(((x + 3) / 8) * 8 < x + y, 3 < (x + 3) % 8 + y);
check(((x + 3) / 8) * 8 < x - y, y < (x + 3) % 8 + (-3));
check(((x + 3) / 8) * 8 < x, 3 < (x + 3) % 8);
check(x * 0, 0);
check(0 * x, 0);
check(x * 1, x);
check(1 * x, x);
check(Expr(2.0f) * 4.0f, 8.0f);
check(Expr(2) * 4, 8);
check((3 * x) * 4, x * 12);
check(4 * (3 + x), x * 4 + 12);
check(Expr(broadcast(4.0f, 5)) * Expr(ramp(3.0f, 4.0f, 5)), ramp(12.0f, 16.0f, 5));
check(Expr(ramp(3.0f, 4.0f, 5)) * Expr(broadcast(2.0f, 5)), ramp(6.0f, 8.0f, 5));
check(Expr(broadcast(3, 3)) * Expr(broadcast(2, 3)), broadcast(6, 3));
check(x * y + x, (y + 1) * x);
check(x * y - x, (y + -1) * x);
check(x + x * y, (y + 1) * x);
check(x - x * y, (1 - y) * x);
check(x * y + y, (x + 1) * y);
check(x * y - y, (x + -1) * y);
check(y + x * y, (x + 1) * y);
check(y - x * y, (1 - x) * y);
check(0 / max(x, 1), 0);
check(x / 1, x);
check(max(x, 1) / (max(x, 1)), 1);
check(min(x, -1) / (min(x, -1)), 1);
check((x * 2 + 1) / (x * 2 + 1), 1);
check((-1) / (x * 2 + 1), select(x < 0, 1, -1));
check(Expr(7) / 3, 2);
check(Expr(6.0f) / 2.0f, 3.0f);
check((x / 3) / 4, x / 12);
check((x * 4) / 2, x * 2);
check((x * 2) / 4, x / 2);
check((x * (-4)) / 2, x * (-2));
check((x * 4 + y) / 2, y / 2 + x * 2);
check((y + x * 4) / 2, y / 2 + x * 2);
check((x * 2 - y) / 2, (0 - y) / 2 + x);
check((x * -2 - y) / 2, (0 - y) / 2 - x);
check((y - x * 4) / 2, y / 2 - x * 2);
check((x + 3) / 2 + 7, (x + 17) / 2);
check((x / 2 + 3) / 5, (x + 6) / 10);
check((x + (y + 3) / 5) + 5, (y + 28) / 5 + x);
check((x + 8) / 2, x / 2 + 4);
check((x - y) * -2, (y - x) * 2);
check((xf - yf) * -2.0f, (yf - xf) * 2.0f);
check(x * 3 + y * 9, (y * 3 + x) * 3);
check(x * 9 + y * 3, (x * 3 + y) * 3);
// Pull terms that are a multiple of the divisor out of a ternary expression
check(((x * 4 + y) + z) / 2, (y + z) / 2 + x * 2);
check(((x * 4 - y) + z) / 2, (z - y) / 2 + x * 2);
check(((x * 4 + y) - z) / 2, (y - z) / 2 + x * 2);
check(((x * 2 - y) - z) / 2, (0 - y - z) / 2 + x);
check(((x * -2 - y) - z) / 2, (0 - y - z) / 2 - x);
check((x + (y * 4 + z)) / 2, (x + z) / 2 + y * 2);
check(((x + y * 4) + z) / 2, (x + z) / 2 + y * 2);
check((x + (y * 4 - z)) / 2, (x - z) / 2 + y * 2);
check((x - (y * 4 + z)) / 2, (x - z) / 2 + y * -2);
check((x - (y * 4 - z)) / 2, (x + z) / 2 - y * 2);
// Pull out the gcd of the numerator and divisor
check((x * 3 + 5) / 9, (x + 1) / 3);
// Cancellations in integer divisions.
check((7 * y) / 7, y);
check((y * 7) / 7, y);
check((7 * y + z) / 7, z / 7 + y);
check((y * 7 + z) / 7, z / 7 + y);
check((z + 7 * y) / 7, z / 7 + y);
check((z + y * 7) / 7, z / 7 + y);
check((7 * y - z) / 7, (-z) / 7 + y);
check((y * 7 - z) / 7, (-z) / 7 + y);
check((z - 7 * y) / 7, z / 7 - y);
check((z - y * 7) / 7, z / 7 - y);
check((7 + y) / 7, y / 7 + 1);
check((y + 7) / 7, y / 7 + 1);
check((7 - y) / 7, (-y) / 7 + 1);
check((y - 7) / 7, y / 7 + (-1));
check(((7 + y) + z) / 7, (y + z) / 7 + 1);
check(((y + 7) + z) / 7, (y + z) / 7 + 1);
check((y + (7 + z)) / 7, (y + z) / 7 + 1);
check((y + (z + 7)) / 7, (y + z) / 7 + 1);
check(xf / 4.0f, xf * 0.25f);
// Some quaternary rules with cancellations
check((x + y) - (y + z), x - z);
check((x + y) - (y + z), x - z);
check((y + x) - (y + z), x - z);
check((y + x) - (y + z), x - z);
check((x - y) - (z - y), x - z);
check((y - z) - (y - x), x - z);
check(((x + y) + z) - x, y + z);
check(((x + y) + z) - y, x + z);
check((x + (y + z)) - y, x + z);
check((x + (y + z)) - z, x + y);
check((x * 8) % 4, 0);
check((x * 8 + y) % 4, y % 4);
check((y + 8) % 4, y % 4);
check((y + x * 8) % 4, y % 4);
check((y * 16 - 13) % 2, 1);
check((x * y) % 1, 0);
check((y * 16 - 13) % 2, 1);
check((y - 8) % 4, y % 4);
check((y - x * 8) % 4, y % 4);
check((x * 8 - y) % 4, (-y) % 4);
// Check an optimization important for fusing dimensions
check((x / 3) * 3 + x % 3, x);
check(x % 3 + (x / 3) * 3, x);
check(((x / 3) * 3 + y) + x % 3, x + y);
check(((x / 3) + y) * 3 + x % 3, y * 3 + x);
check((x % 3 + y) + (x / 3) * 3, x + y);
check((y + x % 3) + (x / 3) * 3, x + y);
check((y + (x / 3 * 3)) + x % 3, x + y);
check((y + (x / 3)) * 3 + x % 3, y * 3 + x);
check(x / 2 + x % 2, (x + 1) / 2);
check(x % 2 + x / 2, (x + 1) / 2);
check(((x + 1) / 2) * 2 - x, x % 2);
check(((x + 2) / 3) * 3 - x, (-x) % 3);
check(x - ((x + 1) / 2) * 2, ((x + 1) % 2 + -1));
check(x - ((x + 2) / 3) * 3, ((x + 2) % 3 + -2));
check((x % 2 + 4) / 2, 2);
check((x % 2 + 5) / 2, x % 2 + 2);
// Almost-cancellations through integer divisions. These rules all
// deduplicate x and wrap it in a modulo operator, neutering it
// for the purposes of bounds inference. Patterns below look
// confusing, but were brute-force tested.
check((x + 17) / 3 - (x + 7) / 3, ((x + 1) % 3 + 10) / 3);
check((x + 17) / 3 - (x + y) / 3, (19 - y - (x + 2) % 3) / 3);
check((x + y) / 3 - (x + 7) / 3, ((x + 1) % 3 + y + -7) / 3);
check(x / 3 - (x + y) / 3, (2 - y - x % 3) / 3);
check((x + y) / 3 - x / 3, (x % 3 + y) / 3);
check(x / 3 - (x + 7) / 3, (-5 - x % 3) / 3);
check((x + 17) / 3 - x / 3, (x % 3 + 17) / 3);
check((x + 17) / 3 - (x - y) / 3, (y - (x + 2) % 3 + 19) / 3);
check((x - y) / 3 - (x + 7) / 3, ((x + 1) % 3 - y + (-7)) / 3);
check(x / 3 - (x - y) / 3, (y - x % 3 + 2) / 3);
check((x - y) / 3 - x / 3, (x % 3 - y) / 3);
// Check some specific expressions involving div and mod
check(Expr(23) / 4, Expr(5));
check(Expr(-23) / 4, Expr(-6));
check(Expr(-23) / -4, Expr(6));
check(Expr(23) / -4, Expr(-5));
check(Expr(-2000000000) / 1000000001, Expr(-2));
check(Expr(23) % 4, Expr(3));
check(Expr(-23) % 4, Expr(1));
check(Expr(-23) % -4, Expr(1));
check(Expr(23) % -4, Expr(3));
check(Expr(-2000000000) % 1000000001, Expr(2));
check(Expr(3) + Expr(8), 11);
check(Expr(3.25f) + Expr(7.75f), 11.0f);
check(Expr(7) % 2, 1);
check(Expr(7.25f) % 2.0f, 1.25f);
check(Expr(-7.25f) % 2.0f, 0.75f);
check(Expr(-7.25f) % -2.0f, -1.25f);
check(Expr(7.25f) % -2.0f, -0.75f);
check(2 * x + (2 * x + y) / 5, (x * 12 + y) / 5);
check(x + (x - y) / 4, (x * 5 - y) / 4);
check((x + z) + (y + (x + z)) / 3, ((x + z) * 4 + y) / 3);
check(x + ((y + w) - x) / 2, ((w + y) + x) / 2);
check((x + y) / 3 + x, (x * 4 + y) / 3);
check((x - y) / 4 + x, (x * 5 - y) / 4);
check((y + x) / 3 + x, (x * 4 + y) / 3);
check((y - x) / 3 + x, (x * 2 + y) / 3);
check(1 + (1 + y) / 2, (y + 3) / 2);
check((y + 1) / 2 + 1, (y + 3) / 2);
check((0 - y) / 5 + 1, (0 - y) / 5 + 1);
check(x - (x + y) / 3, (x * 2 - y + 2) / 3);
check((w + x) - ((w + x) - y * z) / 3, ((w + x) * 2 + y * z + 2) / 3);
check(x - (y + x) / 2, (x - y + 1) / 2);
check(x - (y - x) / 6, (x * 7 - y + 5) / 6);
check(x - (x + y) / -3, x - (x + y) / -3);
check((w + x) - ((w + x) - y * z) / -3, (w + x) - ((w + x) - y * z) / -3);
check(x - (y + x) / -2, x - (x + y) / -2);
check(x - (y - x) / -6, x - (y - x) / -6);
check((x + y) / 3 - x, (x * -2 + y) / 3);
check((x * y - w) / 4 - x * y, (x * y * (-3) - w) / 4);
check((y + x) / 5 - x, (x * -4 + y) / 5);
check((y - x) / 6 - x, (y - x * 7) / 6);
check(1 - (1 + y) / 2 - 1, (0 - y) / 2);
check(1 - (-y + 1) / 2 - 1, y / 2);
check(1 - (0 - y) / 5, (y + 9) / 5);
// Div/mod can't make things larger
check(5 / x < 6, const_true());
check(5 / x > -6, const_true());
check(5 / x < 5, 5 / x < 5);
check(5 / x > -5, -5 < 5 / x);
check(5 % x < 6, const_true());
check(5 % x < 5, 5 % x < 5);
check(5 % x >= 0, const_true());
check(5 % x > 0, 0 < 5 % x);
// Test case with most negative 32-bit number, as constant to check that it is not negated.
check(((x * (int32_t)0x80000000) + (z * (int32_t)0x80000000 + y)),
((x * (int32_t)0x80000000) + (z * (int32_t)0x80000000 + y)));
// Use a require with no error message to test chains of reasoning
auto require = [](Expr cond, Expr val) {
return Internal::Call::make(val.type(),
Internal::Call::require,
{cond, val, 0},
Internal::Call::PureIntrinsic);
};
check(require(2 < x && x < 4, x),
require(2 < x && x < 4, 3));
check(require(2 < x && x < 5 && x % 4 == 0, x),
require(2 < x && x < 5 && x % 4 == 0, 4));
check(require(x % 4 == 3, x % 2),
require(x % 4 == 3, 1));
// Check modulo of expressions that are not-obviously a multiple of something
check(max(min(x * 8, 32), y * 16) % 4 == 0, const_true());
check(select(x > 4, x * 9 + 1, y * 6 - 2) % 3 == 1, const_true());
check(max(32, x * 4) % 16 < 13, const_true()); // After the %16 the max value is 12, not 15, due to alignment
Expr complex_cond = ((10 < y) && (y % 17 == 4) && (y < 30) && (x == y * 16 + 3));
// The condition is enough to imply that y == 21, x == 339
check(require(complex_cond, select(x % 2 == 0, 1237, y)),
require(complex_cond, 21));
}
void check_vectors() {
Expr x = Var("x"), y = Var("y"), z = Var("z");
check(Expr(broadcast(y, 4)) / Expr(broadcast(x, 4)),
Expr(broadcast(y / x, 4)));
check(Expr(ramp(x, 4, 4)) / 2, ramp(x / 2, 2, 4));
check(Expr(ramp(x, -4, 7)) / 2, ramp(x / 2, -2, 7));
check(Expr(ramp(x, 4, 5)) / -2, ramp(x / -2, -2, 5));
check(Expr(ramp(x, -8, 5)) / -2, ramp(x / -2, 4, 5));
check(Expr(ramp(4 * x, 1, 4)) / 4, broadcast(x, 4));
check(Expr(ramp(x * 4, 1, 3)) / 4, broadcast(x, 3));
check(Expr(ramp(x * 8, 2, 4)) / 8, broadcast(x, 4));
check(Expr(ramp(x * 8, 3, 3)) / 8, broadcast(x, 3));
check(Expr(ramp(0, 1, 8)) % 16, Expr(ramp(0, 1, 8)));
check(Expr(ramp(8, 1, 8)) % 16, Expr(ramp(8, 1, 8)));
check(Expr(ramp(9, 1, 8)) % 16, Expr(ramp(9, 1, 8)) % 16);
check(Expr(ramp(16, 1, 8)) % 16, Expr(ramp(0, 1, 8)));
check(Expr(ramp(0, 1, 8)) % 8, Expr(ramp(0, 1, 8)));
check(Expr(ramp(x * 8 + 17, 1, 4)) % 8, Expr(ramp(1, 1, 4)));
check(Expr(ramp(x * 8 + 17, 1, 8)) % 8, Expr(ramp(1, 1, 8) % 8));
check(Expr(broadcast(x, 4)) % Expr(broadcast(y, 4)),
Expr(broadcast(x % y, 4)));
check(Expr(ramp(x, 2, 4)) % (broadcast(2, 4)),
broadcast(x % 2, 4));
check(Expr(ramp(2 * x + 1, 4, 4)) % (broadcast(2, 4)),
broadcast(1, 4));
check(max(broadcast(24, 2), broadcast(x, 2) % ramp(-8, -33, 2)),
max(broadcast(x, 2) % ramp(-8, -33, 2), broadcast(24, 2)));
check(max(broadcast(41, 2), broadcast(x, 2) % ramp(-8, -33, 2)),
broadcast(41, 2));
check(ramp(0, 1, 4) == broadcast(2, 4),
ramp(-2, 1, 4) == broadcast(0, 4));
// Any linear combination of simple ramps and broadcasts should
// reduce to a single ramp or broadcast.
std::mt19937 rng(0);
for (int i = 0; i < 50; i++) {
std::vector<Expr> leaves =
{ramp(x, 1, 4),
ramp(x, y, 4),
ramp(z, x, 4),
broadcast(x, 4),
broadcast(y, 4),
broadcast(z, 4)};
while (leaves.size() > 1) {
int idx1 = rng() % (int)leaves.size();
int idx2 = 0;
do {
idx2 = rng() % (int)leaves.size();
} while (idx2 == idx1);
switch (rng() % 4) {
case 0:
leaves[idx1] += leaves[idx2];
break;
case 1:
leaves[idx1] -= leaves[idx2];
break;
case 2:
leaves[idx1] += (int)(rng() % 8) * leaves[idx2];
break;
case 3:
leaves[idx1] -= (int)(rng() % 8) * leaves[idx2];
break;
}
std::swap(leaves[idx2], leaves.back());
leaves.pop_back();
}
Expr simpler = simplify(leaves[0]);
if (!simpler.as<Ramp>() && !simpler.as<Broadcast>()) {
std::cerr << "A linear combination of ramps and broadcasts should be a single ramp or broadcast:\n"
<< simpler << "\n";
abort();
}
}
{
Expr test = select(ramp(const_true(), const_true(), 2),
ramp(const_false(), const_true(), 2),
broadcast(const_false(), 2)) ==
broadcast(const_false(), 2);
Expr expected = !(ramp(const_true(), const_true(), 2) &&
ramp(const_false(), const_true(), 2));
check(test, expected);
}
{
Expr test = select(ramp(const_true(), const_true(), 2),
broadcast(const_true(), 2),
ramp(const_false(), const_true(), 2)) ==
broadcast(const_false(), 2);
Expr expected = !(ramp(const_true(), const_true(), 2) ||
ramp(const_false(), const_true(), 2));
check(test, expected);
}
// Collapse some vector interleaves
check(interleave_vectors({ramp(x, 2, 4), ramp(x + 1, 2, 4)}), ramp(x, 1, 8));
check(interleave_vectors({ramp(x, 4, 4), ramp(x + 2, 4, 4)}), ramp(x, 2, 8));
check(interleave_vectors({ramp(x - y, 2 * y, 4), ramp(x, 2 * y, 4)}), ramp(x - y, y, 8));
check(interleave_vectors({ramp(x, 3, 4), ramp(x + 1, 3, 4), ramp(x + 2, 3, 4)}), ramp(x, 1, 12));
{
Expr vec = ramp(x, 1, 16);
check(interleave_vectors({slice(vec, 0, 2, 8), slice(vec, 1, 2, 8)}), vec);
check(interleave_vectors({slice(vec, 0, 4, 4), slice(vec, 1, 4, 4), slice(vec, 2, 4, 4), slice(vec, 3, 4, 4)}), vec);
}
// Collapse some vector concats
check(concat_vectors({ramp(x, 2, 4), ramp(x + 8, 2, 4)}), ramp(x, 2, 8));
check(concat_vectors({ramp(x, 3, 2), ramp(x + 6, 3, 2), ramp(x + 12, 3, 2)}), ramp(x, 3, 6));
// Now some ones that can't work
{
Expr e = interleave_vectors({ramp(x, 2, 4), ramp(x, 2, 4)});
check(e, e);
e = interleave_vectors({ramp(x, 2, 4), ramp(x + 2, 2, 4)});
check(e, e);
e = interleave_vectors({ramp(x, 3, 4), ramp(x + 1, 3, 4)});
check(e, e);
e = interleave_vectors({ramp(x, 2, 4), ramp(y + 1, 2, 4)});
check(e, e);
e = interleave_vectors({ramp(x, 2, 4), ramp(x + 1, 3, 4)});
check(e, e);
e = concat_vectors({ramp(x, 1, 4), ramp(x + 4, 2, 4)});
check(e, e);
e = concat_vectors({ramp(x, 1, 4), ramp(x + 8, 1, 4)});
check(e, e);
e = concat_vectors({ramp(x, 1, 4), ramp(y + 4, 1, 4)});
check(e, e);
}
// Now check that an interleave of some collapsible loads collapses into a single dense load
{
Expr load1 = Load::make(Float(32, 4), "buf", ramp(x, 2, 4), Buffer<>(), Parameter(), const_true(4), ModulusRemainder());
Expr load2 = Load::make(Float(32, 4), "buf", ramp(x + 1, 2, 4), Buffer<>(), Parameter(), const_true(4), ModulusRemainder());
Expr load12 = Load::make(Float(32, 8), "buf", ramp(x, 1, 8), Buffer<>(), Parameter(), const_true(8), ModulusRemainder());
check(interleave_vectors({load1, load2}), load12);
// They don't collapse in the other order
Expr e = interleave_vectors({load2, load1});
check(e, e);
// Or if the buffers are different
Expr load3 = Load::make(Float(32, 4), "buf2", ramp(x + 1, 2, 4), Buffer<>(), Parameter(), const_true(4), ModulusRemainder());
e = interleave_vectors({load1, load3});
check(e, e);
}
// Check that concatenated loads of adjacent scalars collapse into a vector load.
{
int lanes = 4;
std::vector<Expr> loads;
for (int i = 0; i < lanes; i++) {
loads.push_back(Load::make(Float(32), "buf", 4 * x + i, Buffer<>(), Parameter(), const_true(), ModulusRemainder()));
}
check(concat_vectors(loads), Load::make(Float(32, lanes), "buf", ramp(x * 4, 1, lanes), Buffer<>(), Parameter(), const_true(lanes), ModulusRemainder(4, 0)));
}
// Check that concatenated loads of adjacent vectors collapse into a vector load, with appropriate alignment.
{
int lanes = 4;
int vectors = 4;
std::vector<Expr> loads;
for (int i = 0; i < vectors; i++) {
loads.push_back(Load::make(Float(32, lanes), "buf", ramp(i * lanes, 1, lanes), Buffer<>(), Parameter(), const_true(lanes), ModulusRemainder(4, 0)));
}
check(concat_vectors(loads), Load::make(Float(32, lanes * vectors), "buf", ramp(0, 1, lanes * vectors), Buffer<>(), Parameter(), const_true(vectors * lanes), ModulusRemainder(0, 0)));
}
{
// A predicated store with a provably-false predicate.
Expr pred = ramp(x * y + x * z, 2, 8) > 2;
Expr index = ramp(x + y, 1, 8);
Expr value = Load::make(index.type(), "f", index, Buffer<>(), Parameter(), const_true(index.type().lanes()), ModulusRemainder());
Stmt stmt = Store::make("f", value, index, Parameter(), pred, ModulusRemainder());
check(stmt, Evaluate::make(0));
}
Expr bool_vector = Variable::make(Bool(4), "bool_vector");
Expr int_vector = Variable::make(Int(32, 4), "int_vector");
check(VectorReduce::make(VectorReduce::And, Broadcast::make(bool_vector, 4), 1),
VectorReduce::make(VectorReduce::And, bool_vector, 1));
check(VectorReduce::make(VectorReduce::Or, Broadcast::make(bool_vector, 4), 2),
VectorReduce::make(VectorReduce::Or, bool_vector, 2));
check(VectorReduce::make(VectorReduce::Min, Broadcast::make(int_vector, 4), 4),
int_vector);
check(VectorReduce::make(VectorReduce::Max, Broadcast::make(int_vector, 4), 8),
VectorReduce::make(VectorReduce::Max, Broadcast::make(int_vector, 4), 8));
}
void check_bounds() {
Expr x = Var("x"), y = Var("y"), z = Var("z"), w = Var("w");
check(min(Expr(7), 3), 3);
check(min(Expr(4.25f), 1.25f), 1.25f);
check(min(broadcast(x, 4), broadcast(y, 4)),
broadcast(min(x, y), 4));
check(min(x, x + 3), x);
check(min(x + 4, x), x);
check(min(x - 1, x + 2), x + (-1));
check(min(7, min(x, 3)), min(x, 3));
check(min(min(x, y), x), min(x, y));
check(min(min(x, y), y), min(x, y));
check(min(x, min(x, y)), min(x, y));
check(min(y, min(x, y)), min(x, y));
check(min(min(x, y) + 1, x), min(y + 1, x));
check(min(min(x, y) - (-1), x), min(y + 1, x));
check(min(min(x, y) + (-1), x), min(x, y) + (-1));
check(min(min(x, y) - 1, x), min(x, y) + (-1));
check(min(min(y, x) + 1, x), min(y + 1, x));
check(min(min(y, x) - (-1), x), min(y + 1, x));
check(min(min(y, x) + (-1), x), min(x, y) + (-1));
check(min(min(y, x) - 1, x), min(x, y) + (-1));
check(max(max(x, y) - 1, x), max(y + (-1), x));
check(max(max(x, y) + (-1), x), max(y + (-1), x));
check(max(max(x, y) + 1, x), max(x, y) + 1);
check(max(max(x, y) - (-1), x), max(x, y) + 1);
check(max(max(y, x) - 1, x), max(y + (-1), x));
check(max(max(y, x) + (-1), x), max(y + (-1), x));
check(max(max(y, x) + 1, x), max(x, y) + 1);
check(max(max(y, x) - (-1), x), max(x, y) + 1);
check(min(x, min(x, y) + 1), min(y + 1, x));
check(min(x, min(x, y) - (-1)), min(y + 1, x));
check(min(x, min(x, y) + (-1)), min(x, y) + (-1));
check(min(x, min(x, y) - 1), min(x, y) + (-1));
check(min(x, min(y, x) + 1), min(y + 1, x));
check(min(x, min(y, x) - (-1)), min(y + 1, x));
check(min(x, min(y, x) + (-1)), min(x, y) + (-1));
check(min(x, min(y, x) - 1), min(x, y) + (-1));
check(max(x, max(x, y) - 1), max(y + (-1), x));
check(max(x, max(x, y) + (-1)), max(y + (-1), x));
check(max(x, max(x, y) + 1), max(x, y) + 1);
check(max(x, max(x, y) - (-1)), max(x, y) + 1);
check(max(x, max(y, x) - 1), max(y + (-1), x));
check(max(x, max(y, x) + (-1)), max(y + (-1), x));
check(max(x, max(y, x) + 1), max(x, y) + 1);
check(max(x, max(y, x) - (-1)), max(x, y) + 1);
check(max(Expr(7), 3), 7);
check(max(Expr(4.25f), 1.25f), 4.25f);
check(max(broadcast(x, 4), broadcast(y, 4)),
broadcast(max(x, y), 4));
check(max(x, x + 3), x + 3);
check(max(x + 4, x), x + 4);
check(max(x - 1, x + 2), x + 2);
check(max(7, max(x, 3)), max(x, 7));
check(max(max(x, y), x), max(x, y));
check(max(max(x, y), y), max(x, y));
check(max(x, max(x, y)), max(x, y));
check(max(y, max(x, y)), max(x, y));
// Check that simplifier can recognise instances where the extremes of the
// datatype appear as constants in comparisons, Min and Max expressions.
// The result of min/max with extreme is known to be either the extreme or
// the other expression. The result of < or > comparison is known to be true or false.
check(x <= Int(32).max(), const_true());
check(cast(Int(16), x) >= Int(16).min(), const_true());
check(x < Int(32).min(), const_false());
check(min(cast(UInt(16), x), cast(UInt(16), 65535)), cast(UInt(16), x));
check(min(x, Int(32).max()), x);
check(min(Int(32).min(), x), Int(32).min());
check(max(cast(Int(8), x), cast(Int(8), -128)), cast(Int(8), x));
check(max(x, Int(32).min()), x);
check(max(x, Int(32).max()), Int(32).max());
// Check that non-extremes do not lead to incorrect simplification
check(max(cast(Int(8), x), cast(Int(8), -127)), max(cast(Int(8), x), make_const(Int(8), -127)));
// Some quaternary rules with cancellations
check((x + y) - (y + z), x - z);
check((x + y) - (y + z), x - z);
check((y + x) - (y + z), x - z);
check((y + x) - (y + z), x - z);
check((x - y) - (z - y), x - z);
check((y - z) - (y - x), x - z);
check((x + 3) / 4 - (x + 2) / 4, ((x + 2) % 4 + 1) / 4);
check(min(x + y, y + z), min(x, z) + y);
check(min(y + x, y + z), min(x, z) + y);
check(min(x + y, y + z), min(x, z) + y);
check(min(y + x, y + z), min(x, z) + y);
check(min(x, y) - min(y, x), 0);
check(max(x, y) - max(y, x), 0);
check(min(123 - x, 1 - x), 1 - x);
check(max(123 - x, 1 - x), 123 - x);
check(min(x * 43, y * 43), min(x, y) * 43);
check(max(x * 43, y * 43), max(x, y) * 43);
check(min(x * -43, y * -43), max(x, y) * -43);
check(max(x * -43, y * -43), min(x, y) * -43);
check(min(min(x, 4), y), min(min(x, y), 4));
check(max(max(x, 4), y), max(max(x, y), 4));
check(min(x * 8, 24), min(x, 3) * 8);
check(max(x * 8, 24), max(x, 3) * 8);
check(min(x * -8, 24), max(x, -3) * -8);
check(max(x * -8, 24), min(x, -3) * -8);
check(min(clamp(x, -10, 14), clamp(y, -10, 14)), clamp(min(x, y), -10, 14));
check(min(x / 4, y / 4), min(x, y) / 4);
check(max(x / 4, y / 4), max(x, y) / 4);
check(min(x / (-4), y / (-4)), max(x, y) / (-4));
check(max(x / (-4), y / (-4)), min(x, y) / (-4));
check(min(x / 4 + 2, y / 4), min(x + 8, y) / 4);
check(max(x / 4 + 2, y / 4), max(x + 8, y) / 4);
check(min(x / 4, y / 4 + 2), min(y + 8, x) / 4);
check(max(x / 4, y / 4 + 2), max(y + 8, x) / 4);
check(min(x / (-4) + 2, y / (-4)), max(x + -8, y) / (-4));
check(max(x / (-4) + 2, y / (-4)), min(x + -8, y) / (-4));
check(min(x / (-4), y / (-4) + 2), max(y + -8, x) / (-4));
check(max(x / (-4), y / (-4) + 2), min(y + -8, x) / (-4));
check(min(x * 4 + 8, y * 4), min(x + 2, y) * 4);
check(max(x * 4 + 8, y * 4), max(x + 2, y) * 4);
check(min(x * 4, y * 4 + 8), min(y + 2, x) * 4);
check(max(x * 4, y * 4 + 8), max(y + 2, x) * 4);
check(min(x * (-4) + 8, y * (-4)), max(x + -2, y) * (-4));
check(max(x * (-4) + 8, y * (-4)), min(x + -2, y) * (-4));
check(min(x * (-4), y * (-4) + 8), max(y + -2, x) * (-4));
check(max(x * (-4), y * (-4) + 8), min(y + -2, x) * (-4));
// Min and max of clamped expressions
check(min(clamp(x + 1, y, z), clamp(x - 1, y, z)), clamp(x + (-1), y, z));
check(max(clamp(x + 1, y, z), clamp(x - 1, y, z)), clamp(x + 1, y, z));
// Additions that cancel a term inside a min or max
check(x + min(y - x, z), min(x + z, y));
check(x + max(y - x, z), max(x + z, y));
check(min(y + (-2), z) + 2, min(z + 2, y));
check(max(y + (-2), z) + 2, max(z + 2, y));
// Min/Max distributive law
check(max(max(x, y), max(x, z)), max(max(y, z), x));
check(min(max(x, y), max(x, z)), max(min(y, z), x));
check(min(min(x, y), min(x, z)), min(min(y, z), x));
check(max(min(x, y), min(x, z)), min(max(y, z), x));
// Mins of expressions and rounded up versions of them
check(min(((x + 7) / 8) * 8, x), x);
check(min(x, ((x + 7) / 8) * 8), x);
check(max(((x + 7) / 8) * 8, x), ((x + 7) / 8) * 8);
check(max(x, ((x + 7) / 8) * 8), ((x + 7) / 8) * 8);
// And rounded down...
check(max((x / 8) * 8, x), x);
check(max(x, (x / 8) * 8), x);
check(min((x / 8) * 8, x), (x / 8) * 8);
check(min(x, (x / 8) * 8), (x / 8) * 8);
// "likely" marks which side of a containing min/max/select is the
// one to optimize for, so if the min/max/select gets simplified
// away, the likely should be stripped too.
check(min(x, likely(x)), x);
check(min(likely(x), x), x);
check(max(x, likely(x)), x);
check(max(likely(x), x), x);
check(select(x > y, likely(x), x), x);
check(select(x > y, x, likely(x)), x);
// Check constant-bounds reasoning works through likelies
check(min(4, likely(5)), 4);
check(min(7, likely(5)), 5);
check(max(4, likely(5)), 5);
check(max(7, likely(5)), 7);
check(select(x < y, x + y, x), select(x < y, y, 0) + x);
check(select(x < y, x, x + y), select(x < y, 0, y) + x);
check(min(x + 1, y) - min(x, y - 1), 1);
check(max(x + 1, y) - max(x, y - 1), 1);
check(min(x + 1, y) - min(y - 1, x), 1);
check(max(x + 1, y) - max(y - 1, x), 1);
// min and max on constant ramp v broadcast
check(max(ramp(0, 1, 8), 0), ramp(0, 1, 8));
check(min(ramp(0, 1, 8), 7), ramp(0, 1, 8));
check(max(ramp(0, 1, 8), 7), broadcast(7, 8));
check(min(ramp(0, 1, 8), 0), broadcast(0, 8));
check(min(ramp(0, 1, 8), 4), min(ramp(0, 1, 8), 4));
check(max(ramp(7, -1, 8), 0), ramp(7, -1, 8));
check(min(ramp(7, -1, 8), 7), ramp(7, -1, 8));
check(max(ramp(7, -1, 8), 7), broadcast(7, 8));
check(min(ramp(7, -1, 8), 0), broadcast(0, 8));
check(min(ramp(7, -1, 8), 4), min(ramp(7, -1, 8), 4));
check(max(0, ramp(0, 1, 8)), ramp(0, 1, 8));
check(min(7, ramp(0, 1, 8)), ramp(0, 1, 8));
check(min(8 - x, 2), 8 - max(x, 6));
check(max(3, 77 - x), 77 - min(x, 74));
check(min(max(8 - x, 0), 8), 8 - max(min(x, 8), 0));
check(x - min(x, 2), max(x, 2) + -2);
check(x - max(x, 2), min(x, 2) + -2);
check(min(x, 2) - x, 2 - max(x, 2));
check(max(x, 2) - x, 2 - min(x, 2));
check(x - min(2, x), max(x, 2) + -2);
check(x - max(2, x), min(x, 2) + -2);
check(min(2, x) - x, 2 - max(x, 2));
check(max(2, x) - x, 2 - min(x, 2));
check(max(min(x, y), x), x);
check(max(min(x, y), y), y);
check(min(max(x, y), x), x);
check(min(max(x, y), y), y);
check(max(min(x, y), x) + y, x + y);
check(max(min(max(x, y), z), y), max(min(x, z), y));
check(max(min(z, max(x, y)), y), max(min(x, z), y));
check(max(y, min(max(x, y), z)), max(min(x, z), y));
check(max(y, min(z, max(x, y))), max(min(x, z), y));
check(max(min(max(y, x), z), y), max(min(x, z), y));
check(max(min(z, max(y, x)), y), max(min(x, z), y));
check(max(y, min(max(y, x), z)), max(min(x, z), y));
check(max(y, min(z, max(y, x))), max(min(x, z), y));
check(min(max(min(x, y), z), y), min(max(x, z), y));
check(min(max(z, min(x, y)), y), min(max(x, z), y));
check(min(y, max(min(x, y), z)), min(max(x, z), y));
check(min(y, max(z, min(x, y))), min(max(x, z), y));
check(min(max(min(y, x), z), y), min(max(x, z), y));
check(min(max(z, min(y, x)), y), min(max(x, z), y));
check(min(y, max(min(y, x), z)), min(max(x, z), y));
check(min(y, max(z, min(y, x))), min(max(x, z), y));
check(max(min(x, 5), 1) == 1, x <= 1);
check(max(min(x, 5), 1) == 3, x == 3);
check(max(min(x, 5), 1) == 5, 5 <= x);
check(min((x * 32 + y) * 4, x * 128 + 127), min(y * 4, 127) + x * 128);
check(min((x * 32 + y) * 4, x * 128 + 4), (min(y, 1) + x * 32) * 4);
check(min((y + x * 32) * 4, x * 128 + 127), min(y * 4, 127) + x * 128);
check(min((y + x * 32) * 4, x * 128 + 4), (min(y, 1) + x * 32) * 4);
check(max((x * 32 + y) * 4, x * 128 + 127), max(y * 4, 127) + x * 128);
check(max((x * 32 + y) * 4, x * 128 + 4), (max(y, 1) + x * 32) * 4);
check(max((y + x * 32) * 4, x * 128 + 127), max(y * 4, 127) + x * 128);
check(max((y + x * 32) * 4, x * 128 + 4), (max(y, 1) + x * 32) * 4);
check((min(x + y, z) + w) - x, min(z - x, y) + w);
check(min((x + y) + w, z) - x, min(z - x, w + y));
check(min(min(x + z, y), w) - x, min(min(w, y) - x, z));
check(min(min(y, x + z), w) - x, min(min(w, y) - x, z));
// Two- and three-deep cancellations into min/max nodes
check((x - min(z, (x + y))), (0 - min(z - x, y)));
check((x - min(z, (y + x))), (0 - min(z - x, y)));
check((x - min((x + y), z)), (0 - min(z - x, y)));
check((x - min((y + x), z)), (0 - min(z - x, y)));
check((x - min(y, (w + (x + z)))), (0 - min((y - x), (w + z))));
check((x - min(y, (w + (z + x)))), (0 - min((y - x), (w + z))));
check((x - min(y, ((x + z) + w))), (0 - min((y - x), (w + z))));
check((x - min(y, ((z + x) + w))), (0 - min((y - x), (w + z))));
check((x - min((w + (x + z)), y)), (0 - min((y - x), (w + z))));
check((x - min((w + (z + x)), y)), (0 - min((y - x), (w + z))));
check((x - min(((x + z) + w), y)), (0 - min((y - x), (w + z))));
check((x - min(((z + x) + w), y)), (0 - min((y - x), (w + z))));
check(min(x + y, z) - x, min(z - x, y));
check(min(y + x, z) - x, min(z - x, y));
check(min(z, x + y) - x, min(z - x, y));
check(min(z, y + x) - x, min(z - x, y));
check((min(x, (w + (y + z))) - z), min(x - z, w + y));
check((min(x, (w + (z + y))) - z), min(x - z, w + y));
check((min(x, ((y + z) + w)) - z), min(x - z, w + y));
check((min(x, ((z + y) + w)) - z), min(x - z, w + y));
check((min((w + (y + z)), x) - z), min(x - z, w + y));
check((min((w + (z + y)), x) - z), min(x - z, w + y));
check((min(((y + z) + w), x) - z), min(x - z, w + y));
check((min(((z + y) + w), x) - z), min(x - z, w + y));
check((x - max(z, (x + y))), (0 - max(z - x, y)));
check((x - max(z, (y + x))), (0 - max(z - x, y)));
check((x - max((x + y), z)), (0 - max(z - x, y)));
check((x - max((y + x), z)), (0 - max(z - x, y)));
check((x - max(y, (w + (x + z)))), (0 - max((y - x), (w + z))));
check((x - max(y, (w + (z + x)))), (0 - max((y - x), (w + z))));
check((x - max(y, ((x + z) + w))), (0 - max((y - x), (w + z))));
check((x - max(y, ((z + x) + w))), (0 - max((y - x), (w + z))));
check((x - max((w + (x + z)), y)), (0 - max((y - x), (w + z))));
check((x - max((w + (z + x)), y)), (0 - max((y - x), (w + z))));
check((x - max(((x + z) + w), y)), (0 - max((y - x), (w + z))));
check((x - max(((z + x) + w), y)), (0 - max((y - x), (w + z))));
check(max(x + y, z) - x, max(z - x, y));
check(max(y + x, z) - x, max(z - x, y));
check(max(z, x + y) - x, max(z - x, y));
check(max(z, y + x) - x, max(z - x, y));
check((max(x, (w + (y + z))) - z), max(x - z, w + y));
check((max(x, (w + (z + y))) - z), max(x - z, w + y));
check((max(x, ((y + z) + w)) - z), max(x - z, w + y));
check((max(x, ((z + y) + w)) - z), max(x - z, w + y));
check((max((w + (y + z)), x) - z), max(x - z, w + y));
check((max((w + (z + y)), x) - z), max(x - z, w + y));
check((max(((y + z) + w), x) - z), max(x - z, w + y));
check((max(((z + y) + w), x) - z), max(x - z, w + y));
check(min((x + y) * 7 + z, w) - x * 7, min(w - x * 7, y * 7 + z));
check(min((y + x) * 7 + z, w) - x * 7, min(w - x * 7, y * 7 + z));
check(min(x * 12 + y, z) / 4 - x * 3, min(z - x * 12, y) / 4);
check(min(z, x * 12 + y) / 4 - x * 3, min(z - x * 12, y) / 4);
check((min(x * 12 + y, z) + w) / 4 - x * 3, (min(z - x * 12, y) + w) / 4);
check((min(z, x * 12 + y) + w) / 4 - x * 3, (min(z - x * 12, y) + w) / 4);
check(min((min(((y + 5) / 2), x) * 2), y + 3), min(x * 2, y + 3));
check(min((min(((y + 1) / 3), x) * 3) + 1, y), min(x * 3 + 1, y));
{
Expr one = 1;
Expr three = 3;
Expr four = 4;
Expr five = 5;
Expr v1 = Variable::make(Int(32), "x");
Expr v2 = Variable::make(Int(32), "y");
// Bound: [-4, 4]
Expr clamped = min(max(v1, -four), four);
// min(v, 4) where v=[-4, 4] -> v
check(min(clamped, four), simplify(clamped));
// min(v, 5) where v=[-4, 4] -> v
check(min(clamped, five), simplify(clamped));
// min(v, 3) where v=[-4, 4] -> min(v, 3)
check(min(clamped, three), simplify(min(clamped, three)));
// min(v, -5) where v=[-4, 4] -> -5
check(min(clamped, -five), simplify(-five));
// max(v, 4) where v=[-4, 4] -> 4
check(max(clamped, four), simplify(four));
// max(v, 5) where v=[-4, 4] -> 5
check(max(clamped, five), simplify(five));
// max(v, 3) where v=[-4, 4] -> max(v, 3)
check(max(clamped, three), simplify(max(clamped, three)));
// max(v, -5) where v=[-4, 4] -> v
check(max(clamped, -five), simplify(clamped));
// max(min(v, 5), -5) where v=[-4, 4] -> v
check(max(min(clamped, five), -five), simplify(clamped));
// max(min(v, 5), 5) where v=[-4, 4] -> 5
check(max(min(clamped, five), five), simplify(five));
// max(min(v, -5), -5) where v=[-4, 4] -> -5
check(max(min(clamped, -five), -five), simplify(-five));
// max(min(v, -5), 5) where v=[-4, 4] -> 5
check(max(min(clamped, -five), five), simplify(five));
// min(v + 1, 4) where v=[-4, 4] -> min(v + 1, 4)
check(min(clamped + one, four), simplify(min(clamped + one, four)));
// min(v + 1, 5) where v=[-4, 4] -> v + 1
check(min(clamped + one, five), simplify(clamped + one));
// min(v + 1, -4) where v=[-4, 4] -> -4
check(min(clamped + one, -four), simplify(-four));
// max(min(v + 1, 4), -4) where v=[-4, 4] -> min(v + 1, 4)
check(max(min(clamped + one, four), -four), simplify(min(clamped + one, four)));
// max(v + 1, 4) where v=[-4, 4] -> max(v + 1, 4)
check(max(clamped + one, four), simplify(max(clamped + one, four)));
// max(v + 1, 5) where v=[-4, 4] -> 5
check(max(clamped + one, five), simplify(five));
// max(v + 1, -4) where v=[-4, 4] -> -v + 1
check(max(clamped + one, -four), simplify(clamped + one));
// min(max(v + 1, -4), 4) where v=[-4, 4] -> min(v + 1, 4)
check(min(max(clamped + one, -four), four), simplify(min(clamped + one, four)));
Expr t1 = clamp(v1, one, four);
Expr t2 = clamp(v1, -five, -four);
check(min(max(min(v2, t1), t2), five), simplify(max(min(t1, v2), t2)));
}
{
Expr xv = Variable::make(Int(16).with_lanes(64), "x");
Expr yv = Variable::make(Int(16).with_lanes(64), "y");
Expr zv = Variable::make(Int(16).with_lanes(64), "z");
// min(min(x, broadcast(y, n)), broadcast(z, n))) -> min(x, broadcast(min(y, z), n))
check(min(min(xv, broadcast(y, 64)), broadcast(z, 64)), min(xv, broadcast(min(y, z), 64)));
// min(min(broadcast(x, n), y), broadcast(z, n))) -> min(y, broadcast(min(x, z), n))
check(min(min(broadcast(x, 64), yv), broadcast(z, 64)), min(yv, broadcast(min(x, z), 64)));
// min(broadcast(x, n), min(y, broadcast(z, n)))) -> min(y, broadcast(min(x, z), n))
check(min(broadcast(x, 64), min(yv, broadcast(z, 64))), min(yv, broadcast(min(x, z), 64)));
// min(broadcast(x, n), min(broadcast(y, n), z))) -> min(z, broadcast(min(x, y), n))
check(min(broadcast(x, 64), min(broadcast(y, 64), zv)), min(zv, broadcast(min(x, y), 64)));
// max(max(x, broadcast(y, n)), broadcast(z, n))) -> max(x, broadcast(max(y, z), n))
check(max(max(xv, broadcast(y, 64)), broadcast(z, 64)), max(xv, broadcast(max(y, z), 64)));
// max(max(broadcast(x, n), y), broadcast(z, n))) -> max(y, broadcast(max(x, z), n))
check(max(max(broadcast(x, 64), yv), broadcast(z, 64)), max(yv, broadcast(max(x, z), 64)));
// max(broadcast(x, n), max(y, broadcast(z, n)))) -> max(y, broadcast(max(x, z), n))
check(max(broadcast(x, 64), max(yv, broadcast(z, 64))), max(yv, broadcast(max(x, z), 64)));
// max(broadcast(x, n), max(broadcast(y, n), z))) -> max(z, broadcast(max(x, y), n))
check(max(broadcast(x, 64), max(broadcast(y, 64), zv)), max(zv, broadcast(max(x, y), 64)));
}
// Pull out common addition term inside min/max
check(min((x + y) + z, x + w), min(y + z, w) + x);
check(min((y + x) + z, x + w), min(y + z, w) + x);
check(min(x + y, (x + z) + w), min(w + z, y) + x);
check(min(x + y, (z + x) + w), min(w + z, y) + x);
check(min(x + (y + z), y + w), min(x + z, w) + y);
check(min(x + (z + y), y + w), min(x + z, w) + y);
check(min(x + y, z + (x + w)), min(w + z, y) + x);
check(min(x + y, z + (w + x)), min(w + z, y) + x);
check(min(x + y / 2 + 13, x + (0 - y) / 2), min(0 - y, y + 26) / 2 + x);
check(max((x + y) + z, x + w), max(y + z, w) + x);
check(max((y + x) + z, x + w), max(y + z, w) + x);
check(max(x + y, (x + z) + w), max(w + z, y) + x);
check(max(x + y, (z + x) + w), max(w + z, y) + x);
check(max(x + (y + z), y + w), max(x + z, w) + y);
check(max(x + (z + y), y + w), max(x + z, w) + y);
check(max(x + y, z + (x + w)), max(w + z, y) + x);
check(max(x + y, z + (w + x)), max(w + z, y) + x);
// Check min(x, y)*max(x, y) gets simplified into x*y
check(min(x, y) * max(x, y), x * y);
check(min(x, y) * max(y, x), x * y);
check(max(x, y) * min(x, y), x * y);
check(max(y, x) * min(x, y), x * y);
// Check min(x, y) + max(x, y) gets simplified into x + y
check(min(x, y) + max(x, y), x + y);
check(min(x, y) + max(y, x), x + y);
check(max(x, y) + min(x, y), x + y);
check(max(y, x) + min(x, y), x + y);
// Check max(min(x, y), max(x, y)) gets simplified into max(x, y)
check(max(min(x, y), max(x, y)), max(x, y));
check(max(min(x, y), max(y, x)), max(x, y));
check(max(max(x, y), min(x, y)), max(x, y));
check(max(max(y, x), min(x, y)), max(x, y));
// Check min(max(x, y), min(x, y)) gets simplified into min(x, y)
check(min(max(x, y), min(x, y)), min(x, y));
check(min(max(x, y), min(y, x)), min(x, y));
check(min(min(x, y), max(x, y)), min(x, y));
check(min(min(x, y), max(y, x)), min(x, y));
// Check if we can simplify away comparison on vector types considering bounds.
Scope<Interval> bounds_info;
bounds_info.push("x", Interval(0, 4));
check_in_bounds(ramp(x, 1, 4) < broadcast(0, 4), const_false(4), bounds_info);
check_in_bounds(ramp(x, 1, 4) < broadcast(8, 4), const_true(4), bounds_info);
check_in_bounds(ramp(x, -1, 4) < broadcast(-4, 4), const_false(4), bounds_info);
check_in_bounds(ramp(x, -1, 4) < broadcast(5, 4), const_true(4), bounds_info);
check_in_bounds(min(ramp(x, 1, 4), broadcast(0, 4)), broadcast(0, 4), bounds_info);
check_in_bounds(min(ramp(x, 1, 4), broadcast(8, 4)), ramp(x, 1, 4), bounds_info);
check_in_bounds(min(ramp(x, -1, 4), broadcast(-4, 4)), broadcast(-4, 4), bounds_info);
check_in_bounds(min(ramp(x, -1, 4), broadcast(5, 4)), ramp(x, -1, 4), bounds_info);
check_in_bounds(max(ramp(x, 1, 4), broadcast(0, 4)), ramp(x, 1, 4), bounds_info);
check_in_bounds(max(ramp(x, 1, 4), broadcast(8, 4)), broadcast(8, 4), bounds_info);
check_in_bounds(max(ramp(x, -1, 4), broadcast(-4, 4)), ramp(x, -1, 4), bounds_info);
check_in_bounds(max(ramp(x, -1, 4), broadcast(5, 4)), broadcast(5, 4), bounds_info);
check(min(x, 63) - min(x, 3), clamp(x, 3, 63) + (-3));
check(min(x, 3) - min(x, 63), 3 - clamp(x, 3, 63));
check(min(63, x) - min(x, 3), clamp(x, 3, 63) + (-3));
check(min(x, 3) - min(63, x), 3 - clamp(x, 3, 63));
// This used to throw the simplifier into a loop
simplify((min((min(((x * 64) + y), (z + -63)) + 31), min((((x * 64) + y) + 63), z)) -
min((min((((x * 64) + y) + 63), z) + -31), (min(((x * 64) + y), (z + -63)) + 32))));
check(min(x * 4 + 63, y) - min(x * 4, y - 3), clamp(y - x * 4, 3, 63));
check(min(y, x * 4 + 63) - min(x * 4, y - 3), clamp(y - x * 4, 3, 63));
check(min(x * 4, y - 3) - min(x * 4 + 63, y), clamp(x * 4 - y, -63, -3));
check(min(x * 4, y - 3) - min(y, x * 4 + 63), clamp(x * 4 - y, -63, -3));
check(max(x, 63) - max(x, 3), 63 - clamp(x, 3, 63));
check(max(63, x) - max(3, x), 63 - clamp(x, 3, 63));
check(max(x, 3) - max(x, 63), clamp(x, 3, 63) + -63);
check(max(3, x) - max(x, 63), clamp(x, 3, 63) + -63);
check(max(x * 4 + 63, y) - max(x * 4, y - 3), clamp(x * 4 - y, -63, -3) + 66);
check(max(x * 4 + 63, y) - max(y - 3, x * 4), clamp(x * 4 - y, -63, -3) + 66);
check(max(x * 4, y - 3) - max(x * 4 + 63, y), clamp(y - x * 4, 3, 63) + -66);
check(max(y - 3, x * 4) - max(x * 4 + 63, y), clamp(y - x * 4, 3, 63) + -66);
}
void check_boolean() {
Expr x = Var("x"), y = Var("y"), z = Var("z"), w = Var("w");
Expr xf = cast<float>(x);
Expr yf = cast<float>(y);
Expr t = const_true(), f = const_false();
Expr b1 = Variable::make(Bool(), "b1");
Expr b2 = Variable::make(Bool(), "b2");
check(x == x, t);
check(x == (x + 1), f);
check(x - 2 == y + 3, x == y + 5);
check(x + y == y + z, x == z);
check(y + x == y + z, x == z);
check(x + y == z + y, x == z);
check(y + x == z + y, x == z);
check((y + x) * 17 == (z + y) * 17, x == z);
check(x * 0 == y * 0, t);
check(x == x + y, y == 0);
check(x + y == x, y == 0);
check(100 - x == 99 - y, y == x + (-1));
check(x < x, f);
check(x < (x + 1), t);
check(x - 2 < y + 3, x < y + 5);
check(x + y < y + z, x < z);
check(y + x < y + z, x < z);
check(x + y < z + y, x < z);
check(y + x < z + y, x < z);
check((y + x) * 17 < (z + y) * 17, x < z);
check(x * 0 < y * 0, f);
check(x < x + y, 0 < y);
check(x + y < x, y < 0);
check(select(x < 3, 2, 2), 2);
check(select(x < (x + 1), 9, 2), 9);
check(select(x > (x + 1), 9, 2), 2);
// Selects of comparisons should always become selects of LT or selects of EQ
check(select(x != 5, 2, 3), select(x == 5, 3, 2));
check(select(x >= 5, 2, 3), select(x < 5, 3, 2));
check(select(x <= 5, 2, 3), select(5 < x, 3, 2));
check(select(x > 5, 2, 3), select(5 < x, 2, 3));
check(select(x > 5, 2, 3) + select(x > 5, 6, 2), select(5 < x, 8, 5));
check(select(x > 5, 8, 3) - select(x > 5, 6, 2), select(5 < x, 2, 1));
check(select(x < 5, select(x < 5, 0, 1), 2), select(x < 5, 0, 2));
check(select(x < 5, 0, select(x < 5, 1, 2)), select(x < 5, 0, 2));
check(max(select((x == -1), 1, x), 6), max(x, 6));
check(max(select((x == -1), 1, x), x), select((x == -1), 1, x));
check(max(select((x == 17), 1, x), x), x);
check(min(select((x == 1), -1, x), -6), min(x, -6));
check(min(select((x == 1), -1, x), x), select((x == 1), -1, x));
check(min(select((x == -17), -1, x), x), x);
check((1 - xf) * 6 < 3, 0.5f < xf);
check(!f, t);
check(!t, f);
check(!(x < y), y <= x);
check(!(x > y), x <= y);
check(!(x >= y), x < y);
check(!(x <= y), y < x);
check(!(x == y), x != y);
check(!(x != y), x == y);
check(!(!(x == 0)), x == 0);
check(!Expr(broadcast(x > y, 4)),
broadcast(x <= y, 4));
check(b1 || !b1, t);
check(!b1 || b1, t);
check(b1 && !b1, f);
check(!b1 && b1, f);
check(b1 && b1, b1);
check(b1 || b1, b1);
check(broadcast(b1, 4) || broadcast(!b1, 4), broadcast(t, 4));
check(broadcast(!b1, 4) || broadcast(b1, 4), broadcast(t, 4));
check(broadcast(b1, 4) && broadcast(!b1, 4), broadcast(f, 4));
check(broadcast(!b1, 4) && broadcast(b1, 4), broadcast(f, 4));
check(broadcast(b1, 4) && broadcast(b1, 4), broadcast(b1, 4));
check(broadcast(b1, 4) || broadcast(b1, 4), broadcast(b1, 4));
check((x == 1) && (x != 2), (x == 1));
check((x != 1) && (x == 2), (x == 2));
check((x == 1) && (x != 1), f);
check((x != 1) && (x == 1), f);
check((x == 1) || (x != 2), (x != 2));
check((x != 1) || (x == 2), (x != 1));
check((x == 1) || (x != 1), t);
check((x != 1) || (x == 1), t);
check(x < 20 || x > 19, t);
check(x > 19 || x < 20, t);
check(x < 20 || x > 20, x < 20 || 20 < x);
check(x > 20 || x < 20, 20 < x || x < 20);
check(x < 20 && x > 19, f);
check(x > 19 && x < 20, f);
check(x < 20 && x > 18, x < 20 && 18 < x);
check(x > 18 && x < 20, 18 < x && x < 20);
check(x < y + 1 && x < y + 2 && x < y, x < y);
check(x < y + 1 && x < y - 2 && x < y, x < y + (-2));
check(x < y + 1 && x < y + z && x < y, x < min(z, 0) + y);
check(x < y + 1 || x < y + 2 || x < y, x < y + 2);
check(x < y + 1 || x < y - 2 || x < y, x < y + 1);
check(x < y + 1 || x < y + z || x < y, x < max(z, 1) + y);
check(x <= 20 || x > 19, t);
check(x > 19 || x <= 20, t);
check(x <= 18 || x > 20, x <= 18 || 20 < x);
check(x > 20 || x <= 18, x <= 18 || 20 < x);
check(x <= 18 && x > 19, f);
check(x > 19 && x <= 18, f);
check(x <= 20 && x > 19, x <= 20 && 19 < x);
check(x > 19 && x <= 20, x <= 20 && 19 < x);
check(x < 20 || x >= 19, t);
check(x >= 19 || x < 20, t);
check(x < 18 || x >= 20, 20 <= x || x < 18);
check(x >= 20 || x < 18, 20 <= x || x < 18);
check(x < 18 && x >= 19, f);
check(x >= 19 && x < 18, f);
check(x < 20 && x >= 19, 19 <= x && x < 20);
check(x >= 19 && x < 20, 19 <= x && x < 20);
check(x <= 20 || x >= 21, t);
check(x >= 21 || x <= 20, t);
check(x <= 18 || x >= 20, x <= 18 || 20 <= x);
check(x >= 20 || x <= 18, 20 <= x || x <= 18);
check(x <= 18 && x >= 19, f);
check(x >= 19 && x <= 18, f);
check(x <= 20 && x >= 20, x <= 20 && 20 <= x);
check(x >= 20 && x <= 20, 20 <= x && x <= 20);
check(min(x, 20) < min(x, 19), const_false());
check(min(x, 23) < min(x, 18) - 3, const_false());
check(max(x, 19) > max(x, 20), const_false());
check(max(x, 18) > max(x, 23) + 3, const_false());
// check for substitution patterns
check((b1 == t) && (b1 && b2), b1 && b2);
check((b1 && b2) && (b1 == t), b1 && b2);
check(t && (x < 0), x < 0);
check(f && (x < 0), f);
check(t || (x < 0), t);
check(f || (x < 0), x < 0);
check(x == y || y != x, t);
check(x == y || x != y, t);
check(x == y && x != y, f);
check(x == y && y != x, f);
check(x < y || x >= y, t);
check(x <= y || x > y, t);
check(x < y && x >= y, f);
check(x <= y && x > y, f);
check(x <= max(x, y), t);
check(x < min(x, y), f);
check(min(x, y) <= x, t);
check(max(x, y) < x, f);
check(max(x, y) <= y, x <= y);
check(min(x, y) >= y, y <= x);
check(max(x, y) < min(y, z), f);
check(max(x, y) < min(z, y), f);
check(max(y, x) < min(y, z), f);
check(max(y, x) < min(z, y), f);
check(max(x, y) >= min(y, z), t);
check(max(x, y) >= min(z, y), t);
check(max(y, x) >= min(y, z), t);
check(max(y, x) >= min(z, y), t);
check(min(z, y) < min(x, y), z < min(x, y));
check(min(z, y) < min(y, x), z < min(x, y));
check(min(y, z) < min(x, y), z < min(x, y));
check(min(y, z) < min(y, x), z < min(x, y));
check(min(z, y) < min(x, y + 5), min(y, z) < x);
check(min(z, y) < min(y + 5, x), min(y, z) < x);
check(min(z, y - 5) < min(x, y), min(y + (-5), z) < x);
check(min(z, y - 5) < min(y, x), min(y + (-5), z) < x);
check(max(z, y) < max(x, y), max(y, z) < x);
check(max(z, y) < max(y, x), max(y, z) < x);
check(max(y, z) < max(x, y), max(y, z) < x);
check(max(y, z) < max(y, x), max(y, z) < x);
check(max(z, y) < max(x, y - 5), max(y, z) < x);
check(max(z, y) < max(y - 5, x), max(y, z) < x);
check(max(z, y + 5) < max(x, y), max(y + 5, z) < x);
check(max(z, y + 5) < max(y, x), max(y + 5, z) < x);
check((1 < y) && (2 < y), 2 < y);
check(x * 5 < 4, x < 1);
check(x * 5 < 5, x < 1);
check(x * 5 < 6, x < 2);
check(x * 5 <= 4, x <= 0);
check(x * 5 <= 5, x <= 1);
check(x * 5 <= 6, x <= 1);
check(x * 5 > 4, 0 < x);
check(x * 5 > 5, 1 < x);
check(x * 5 > 6, 1 < x);
check(x * 5 >= 4, 1 <= x);
check(x * 5 >= 5, 1 <= x);
check(x * 5 >= 6, 2 <= x);
check(x / 4 < 3, x < 12);
check(3 < x / 4, 15 < x);
check(4 - x <= 0, 4 <= x);
check((x / 8) * 8 < x - 8, f);
check((x / 8) * 8 < x - 9, f);
check((x / 8) * 8 < x - 7, f);
check((x / 8) * 8 < x - 6, 6 < x % 8);
check(ramp(x * 4, 1, 4) < broadcast(y * 4, 4), broadcast(x < y, 4));
check(ramp(x * 8, 1, 4) < broadcast(y * 8, 4), broadcast(x < y, 4));
check(ramp(x * 8 + 1, 1, 4) < broadcast(y * 8, 4), broadcast(x < y, 4));
check(ramp(x * 8 + 4, 1, 4) < broadcast(y * 8, 4), broadcast(x < y, 4));
check(ramp(x * 8 + 8, 1, 4) < broadcast(y * 8, 4), broadcast(x < y + (-1), 4));
check(ramp(x * 8 + 5, 1, 4) < broadcast(y * 8, 4), ramp(x * 8 + 5, 1, 4) < broadcast(y * 8, 4));
check(ramp(x * 8 - 1, 1, 4) < broadcast(y * 8, 4), ramp(x * 8 + (-1), 1, 4) < broadcast(y * 8, 4));
check(ramp(x * 8, 1, 4) < broadcast(y * 4, 4), broadcast(x * 2 < y, 4));
check(ramp(x * 8, 2, 4) < broadcast(y * 8, 4), broadcast(x < y, 4));
check(ramp(x * 8 + 1, 2, 4) < broadcast(y * 8, 4), broadcast(x < y, 4));
check(ramp(x * 8 + 2, 2, 4) < broadcast(y * 8, 4), ramp(x * 8 + 2, 2, 4) < broadcast(y * 8, 4));
check(ramp(x * 8, 3, 4) < broadcast(y * 8, 4), ramp(x * 8, 3, 4) < broadcast(y * 8, 4));
check(select(ramp((x / 16) * 16, 1, 8) < broadcast((y / 8) * 8, 8), broadcast(1, 8), broadcast(3, 8)),
select((x / 16) * 2 < y / 8, broadcast(1, 8), broadcast(3, 8)));
check(ramp(x * 8, -1, 4) < broadcast(y * 8, 4), ramp(x * 8, -1, 4) < broadcast(y * 8, 4));
check(ramp(x * 8 + 1, -1, 4) < broadcast(y * 8, 4), ramp(x * 8 + 1, -1, 4) < broadcast(y * 8, 4));
check(ramp(x * 8 + 4, -1, 4) < broadcast(y * 8, 4), broadcast(x < y, 4));
check(ramp(x * 8 + 8, -1, 4) < broadcast(y * 8, 4), ramp(x * 8 + 8, -1, 4) < broadcast(y * 8, 4));
check(ramp(x * 8 + 5, -1, 4) < broadcast(y * 8, 4), broadcast(x < y, 4));
check(ramp(x * 8 - 1, -1, 4) < broadcast(y * 8, 4), broadcast(x < y + 1, 4));
// Check anded conditions apply to the then case only
check(IfThenElse::make(x == 4 && y == 5,
Evaluate::make(z + x + y),
Evaluate::make(z + x - y)),
IfThenElse::make(x == 4 && y == 5,
Evaluate::make(z + 9),
Evaluate::make(x + z - y)));
// Check ored conditions apply to the else case only
check(IfThenElse::make(b1 || b2,
Evaluate::make(select(b1, x + 3, y + 4) + select(b2, x + 5, y + 7)),
Evaluate::make(select(b1, x + 3, y + 8) - select(b2, x + 5, y + 7))),
IfThenElse::make(b1 || b2,
Evaluate::make(select(b1, x + 3, y + 4) + select(b2, x + 5, y + 7)),
Evaluate::make(1)));
// Check single conditions apply to both cases of an ifthenelse
check(IfThenElse::make(b1,
Evaluate::make(select(b1, x, y)),
Evaluate::make(select(b1, z, w))),
IfThenElse::make(b1,
Evaluate::make(x),
Evaluate::make(w)));
check(IfThenElse::make(x < y,
IfThenElse::make(x < y, Evaluate::make(y), Evaluate::make(x)),
Evaluate::make(x)),
IfThenElse::make(x < y,
Evaluate::make(y),
Evaluate::make(x)));
check(Block::make(IfThenElse::make(x < y, Evaluate::make(x + 1), Evaluate::make(x + 2)),
IfThenElse::make(x < y, Evaluate::make(x + 3), Evaluate::make(x + 4))),
IfThenElse::make(x < y,
Block::make(Evaluate::make(x + 1), Evaluate::make(x + 3)),
Block::make(Evaluate::make(x + 2), Evaluate::make(x + 4))));
check(Block::make(IfThenElse::make(x < y, Evaluate::make(x + 1)),
IfThenElse::make(x < y, Evaluate::make(x + 2))),
IfThenElse::make(x < y, Block::make(Evaluate::make(x + 1), Evaluate::make(x + 2))));
check(Block::make({IfThenElse::make(x < y, Evaluate::make(x + 1), Evaluate::make(x + 2)),
IfThenElse::make(x < y, Evaluate::make(x + 3), Evaluate::make(x + 4)),
Evaluate::make(x + 5)}),
Block::make(IfThenElse::make(x < y,
Block::make(Evaluate::make(x + 1), Evaluate::make(x + 3)),
Block::make(Evaluate::make(x + 2), Evaluate::make(x + 4))),
Evaluate::make(x + 5)));
check(Block::make({IfThenElse::make(x < y, Evaluate::make(x + 1)),
IfThenElse::make(x < y, Evaluate::make(x + 2)),
IfThenElse::make(x < y, Evaluate::make(x + 3)),
Evaluate::make(x + 4)}),
Block::make(IfThenElse::make(x < y, Block::make({Evaluate::make(x + 1), Evaluate::make(x + 2), Evaluate::make(x + 3)})),
Evaluate::make(x + 4)));
check(Block::make({IfThenElse::make(x < y, Evaluate::make(x + 1)),
IfThenElse::make(x < y, Evaluate::make(x + 2)),
Evaluate::make(x + 3)}),
Block::make(IfThenElse::make(x < y, Block::make(Evaluate::make(x + 1), Evaluate::make(x + 2))),
Evaluate::make(x + 3)));
check(Block::make(IfThenElse::make(x < y, Evaluate::make(x + 1), Evaluate::make(x + 2)),
IfThenElse::make(x < y, Evaluate::make(x + 3))),
IfThenElse::make(x < y,
Block::make(Evaluate::make(x + 1), Evaluate::make(x + 3)),
Evaluate::make(x + 2)));
check(Block::make(IfThenElse::make(x < y, Evaluate::make(x + 1)),
IfThenElse::make(x < y, Evaluate::make(x + 2), Evaluate::make(x + 3))),
IfThenElse::make(x < y,
Block::make(Evaluate::make(x + 1), Evaluate::make(x + 2)),
Evaluate::make(x + 3)));
// The construct
// if (var == expr) then a else b;
// was being simplified incorrectly, but *only* if var was of type Bool.
Stmt then_clause = AssertStmt::make(b2, Expr(22));
Stmt else_clause = AssertStmt::make(b2, Expr(33));
check(IfThenElse::make(b1 == b2, then_clause, else_clause),
IfThenElse::make(b1 == b2, then_clause, else_clause));
// Check common statements are pulled out of ifs.
check(IfThenElse::make(x < y, Evaluate::make(x + 1), Evaluate::make(x + 1)),
Evaluate::make(x + 1));
check(IfThenElse::make(x < y,
Block::make(Evaluate::make(x + 1), Evaluate::make(x + 2)),
Block::make(Evaluate::make(x + 1), Evaluate::make(x + 3))),
Block::make(Evaluate::make(x + 1),
IfThenElse::make(x < y, Evaluate::make(x + 2), Evaluate::make(x + 3))));
check(IfThenElse::make(x < y,
Block::make(Evaluate::make(x + 1), Evaluate::make(x + 2)),
Block::make(Evaluate::make(x + 3), Evaluate::make(x + 2))),
Block::make(IfThenElse::make(x < y, Evaluate::make(x + 1), Evaluate::make(x + 3)),
Evaluate::make(x + 2)));
check(IfThenElse::make(x < y,
Block::make(Evaluate::make(x + 1), Evaluate::make(x + 2)),
Evaluate::make(x + 2)),
Block::make(IfThenElse::make(x < y, Evaluate::make(x + 1)),
Evaluate::make(x + 2)));
check(IfThenElse::make(x < y,
Block::make(Evaluate::make(x + 1), Evaluate::make(x + 2)),
Evaluate::make(x + 1)),
Block::make(Evaluate::make(x + 1),
IfThenElse::make(x < y, Evaluate::make(x + 2))));
check(IfThenElse::make(x < y,
Evaluate::make(x + 1),
Block::make(Evaluate::make(x + 1), Evaluate::make(x + 2))),
Block::make(Evaluate::make(x + 1),
IfThenElse::make(x < y, Evaluate::make(0), Evaluate::make(x + 2))));
check(IfThenElse::make(x < y,
Evaluate::make(x + 2),
Block::make(Evaluate::make(x + 1), Evaluate::make(x + 2))),
Block::make(IfThenElse::make(x < y, Evaluate::make(0), Evaluate::make(x + 1)),
Evaluate::make(x + 2)));
// A for loop is also an if statement that the extent is greater than zero
Stmt body = AssertStmt::make(y == z, y);
Stmt loop = For::make("t", 0, x, ForType::Serial, DeviceAPI::None, body);
check(IfThenElse::make(0 < x, loop), loop);
// A for loop where the extent is exactly one is just the body
check(IfThenElse::make(x == 1, loop), IfThenElse::make(x == 1, body));
// A for loop where the extent is at most one can just be an if statement
check(IfThenElse::make(y % 2 == x, loop), IfThenElse::make(y % 2 == x, IfThenElse::make(0 < x, body)));
// Check we can learn from bounds on variables
check(IfThenElse::make(x < 5, Evaluate::make(min(x, 17))),
IfThenElse::make(x < 5, Evaluate::make(x)));
check(IfThenElse::make(x < min(y, 5), Evaluate::make(min(x, 17))),
IfThenElse::make(x < min(y, 5), Evaluate::make(x)));
check(IfThenElse::make(5 < x, Evaluate::make(max(x, 2))),
IfThenElse::make(5 < x, Evaluate::make(x)));
check(IfThenElse::make(max(y, 5) < x, Evaluate::make(max(x, 2))),
IfThenElse::make(max(y, 5) < x, Evaluate::make(x)));
check(IfThenElse::make(x <= 5, Evaluate::make(min(x, 17))),
IfThenElse::make(x <= 5, Evaluate::make(x)));
check(IfThenElse::make(x <= min(y, 5), Evaluate::make(min(x, 17))),
IfThenElse::make(x <= min(y, 5), Evaluate::make(x)));
check(IfThenElse::make(5 <= x, Evaluate::make(max(x, 2))),
IfThenElse::make(5 <= x, Evaluate::make(x)));
check(IfThenElse::make(max(y, 5) <= x, Evaluate::make(max(x, 2))),
IfThenElse::make(max(y, 5) <= x, Evaluate::make(x)));
// Concretely, this lets us skip some redundant assertions
check(Block::make(AssertStmt::make(max(y, 3) < x, x),
AssertStmt::make(0 < x, x)),
Block::make(AssertStmt::make(max(y, 3) < x, x),
Evaluate::make(0)));
// Check it works transitively
check(IfThenElse::make(0 < x,
IfThenElse::make(x < y,
IfThenElse::make(y < z,
Evaluate::make(z == 2)))),
// z can't possibly be two, because x is at least one, so y
// is at least two, so z must be at least three.
Evaluate::make(const_false()));
// Simplifications of selects
check(select(x == 3, 5, 7) + 7, select(x == 3, 12, 14));
check(select(x == 3, 5, 7) - 7, select(x == 3, -2, 0));
check(select(x == 3, 5, y) - y, select(x == 3, 5 - y, 0));
check(select(x == 3, y, 5) - y, select(x == 3, 0, 5 - y));
check(y - select(x == 3, 5, y), select(x == 3, y + (-5), 0));
check(y - select(x == 3, y, 5), select(x == 3, 0, y + (-5)));
check(select(x == 3, 5, 7) == 7, x != 3);
check(select(x == 3, z, y) == z, (x == 3) || (y == z));
check(select(x == 3, 4, 2) == 0, const_false());
check(select(x == 3, y, 2) == 4, (x == 3) && (y == 4));
check(select(x == 3, 2, y) == 4, (x != 3) && (y == 4));
check(min(select(x == 2, y * 3, 8), select(x == 2, y + 8, y * 7)),
select(x == 2, min(y * 3, y + 8), min(y * 7, 8)));
check(max(select(x == 2, y * 3, 8), select(x == 2, y + 8, y * 7)),
select(x == 2, max(y * 3, y + 8), max(y * 7, 8)));
Expr cond = (x * x == 16);
check(select(cond, x + 1, x + 5), select(cond, 1, 5) + x);
check(select(cond, x + y, x + z), select(cond, y, z) + x);
check(select(cond, y + x, x + z), select(cond, y, z) + x);
check(select(cond, y + x, z + x), select(cond, y, z) + x);
check(select(cond, x + y, z + x), select(cond, y, z) + x);
check(select(cond, x * 2, x * 5), select(cond, 2, 5) * x);
check(select(cond, x * y, x * z), select(cond, y, z) * x);
check(select(cond, y * x, x * z), select(cond, y, z) * x);
check(select(cond, y * x, z * x), select(cond, y, z) * x);
check(select(cond, x * y, z * x), select(cond, y, z) * x);
check(select(cond, x - y, x - z), x - select(cond, y, z));
check(select(cond, y - x, z - x), select(cond, y, z) - x);
check(select(cond, x + y, x - z), select(cond, y, 0 - z) + x);
check(select(cond, y + x, x - z), select(cond, y, 0 - z) + x);
check(select(cond, x - z, x + y), select(cond, 0 - z, y) + x);
check(select(cond, x - z, y + x), select(cond, 0 - z, y) + x);
check(select(cond, x / y, z / y), select(cond, x, z) / y);
check(select(cond, x % y, z % y), select(cond, x, z) % y);
{
Expr b[12];
for (int i = 0; i < 12; i++) {
b[i] = Variable::make(Bool(), unique_name('b'));
}
// Some rules that collapse selects
check(select(b[0], x, select(b[1], x, y)),
select(b[0] || b[1], x, y));
check(select(b[0], x, select(b[1], y, x)),
select(!b[1] || b[0], x, y));
check(select(b[0], select(b[1], x, y), x),
select(!b[1] && b[0], y, x));
check(select(b[0], select(b[1], y, x), x),
select(b[0] && b[1], y, x));
// Ternary boolean expressions in two variables
check(b[0] || (b[0] && b[1]), b[0]);
check((b[0] && b[1]) || b[0], b[0]);
check(b[0] && (b[0] || b[1]), b[0]);
check((b[0] || b[1]) && b[0], b[0]);
check(b[0] && (b[0] && b[1]), b[0] && b[1]);
check((b[0] && b[1]) && b[0], b[0] && b[1]);
check(b[0] || (b[0] || b[1]), b[0] || b[1]);
check((b[0] || b[1]) || b[0], b[0] || b[1]);
// A nasty unsimplified boolean Expr seen in the wild
Expr nasty = ((((((((((((((((((((((((((((((((((((((((((((b[0] && b[1]) || (b[2] && b[1])) || b[0]) || b[2]) || b[0]) || b[2]) && ((b[0] && b[6]) || (b[2] && b[6]))) || b[0]) || b[2]) || b[0]) || b[2]) && ((b[0] && b[3]) || (b[2] && b[3]))) || b[0]) || b[2]) || b[0]) || b[2]) && ((b[0] && b[7]) || (b[2] && b[7]))) || b[0]) || b[2]) || b[0]) || b[2]) && ((b[0] && b[4]) || (b[2] && b[4]))) || b[0]) || b[2]) || b[0]) || b[2]) && ((b[0] && b[8]) || (b[2] && b[8]))) || b[0]) || b[2]) || b[0]) || b[2]) && ((b[0] && b[5]) || (b[2] && b[5]))) || b[0]) || b[2]) || b[0]) || b[2]) && ((b[0] && b[10]) || (b[2] && b[10]))) || b[0]) || b[2]) || b[0]) || b[2]) && ((b[0] && b[9]) || (b[2] && b[9]))) || b[0]) || b[2]);
check(nasty, b[0] || b[2]);
}
{
// verify that likely(const-bool) is *not* simplified.
check(likely(t), likely(t));
check(likely(f), likely(f));
// verify that !likely(e) -> likely(!e)
check(!likely(t), likely(f));
check(!likely(f), likely(t));
check(!likely(x == 2), likely(x != 2));
// can_prove(likely(const-true)) = true
// can_prove(!likely(const-false)) = true
internal_assert(can_prove(likely(t)));
internal_assert(can_prove(!likely(f)));
// unprovable cases
internal_assert(!can_prove(likely(f)));
internal_assert(!can_prove(!likely(t)));
internal_assert(!can_prove(!likely(x == 2)));
}
}
void check_math() {
Var x = Var("x");
check(Halide::sqrt(4.0f), 2.0f);
check(Halide::log(0.5f + 0.5f), 0.0f);
check(Halide::exp(Halide::log(2.0f)), 2.0f);
check(Halide::pow(4.0f, 0.5f), 2.0f);
check(Halide::round(1000.0f * Halide::pow(Halide::exp(1.0f), Halide::log(10.0f))), 10000.0f);
check(Halide::floor(0.98f), 0.0f);
check(Halide::ceil(0.98f), 1.0f);
check(Halide::round(0.6f), 1.0f);
check(Halide::round(-0.5f), 0.0f);
check(Halide::trunc(-1.6f), -1.0f);
check(Halide::floor(round(x)), round(x));
check(Halide::ceil(ceil(x)), ceil(x));
}
void check_overflow() {
Expr overflowing[] = {
make_const(Int(32), 0x7fffffff) + 1,
make_const(Int(32), 0x7ffffff0) + 16,
(make_const(Int(32), 0x7fffffff) +
make_const(Int(32), 0x7fffffff)),
make_const(Int(32), 0x08000000) * 16,
(make_const(Int(32), 0x00ffffff) *
make_const(Int(32), 0x00ffffff)),
make_const(Int(32), 0x80000000) - 1,
0 - make_const(Int(32), 0x80000000),
make_const(Int(64), (int64_t)0x7fffffffffffffffLL) + 1,
make_const(Int(64), (int64_t)0x7ffffffffffffff0LL) + 16,
(make_const(Int(64), (int64_t)0x7fffffffffffffffLL) +
make_const(Int(64), (int64_t)0x7fffffffffffffffLL)),
make_const(Int(64), (int64_t)0x0800000000000000LL) * 16,
(make_const(Int(64), (int64_t)0x00ffffffffffffffLL) *
make_const(Int(64), (int64_t)0x00ffffffffffffffLL)),
make_const(Int(64), (int64_t)0x8000000000000000LL) - 1,
0 - make_const(Int(64), (int64_t)0x8000000000000000LL),
};
Expr not_overflowing[] = {
make_const(Int(32), 0x7ffffffe) + 1,
make_const(Int(32), 0x7fffffef) + 16,
make_const(Int(32), 0x07ffffff) * 2,
(make_const(Int(32), 0x0000ffff) *
make_const(Int(32), 0x00008000)),
make_const(Int(32), 0x80000001) - 1,
0 - make_const(Int(32), 0x7fffffff),
make_const(Int(64), (int64_t)0x7ffffffffffffffeLL) + 1,
make_const(Int(64), (int64_t)0x7fffffffffffffefLL) + 16,
make_const(Int(64), (int64_t)0x07ffffffffffffffLL) * 16,
(make_const(Int(64), (int64_t)0x00000000ffffffffLL) *
make_const(Int(64), (int64_t)0x0000000080000000LL)),
make_const(Int(64), (int64_t)0x8000000000000001LL) - 1,
0 - make_const(Int(64), (int64_t)0x7fffffffffffffffLL),
};
for (Expr e : overflowing) {
internal_assert(!is_const(simplify(e)))
<< "Overflowing expression should not have simplified: " << e << "\n";
}
for (Expr e : not_overflowing) {
internal_assert(is_const(simplify(e)))
<< "Non-everflowing expression should have simplified: " << e << "\n";
}
// We also risk 64-bit overflow when computing the constant bounds of subexpressions
Expr x = Variable::make(halide_type_of<int64_t>(), "x");
Expr y = Variable::make(halide_type_of<int64_t>(), "y");
Expr zero = make_const(Int(64), 0);
Expr two_32 = make_const(Int(64), (int64_t)1 << 32);
Expr neg_two_32 = make_const(Int(64), -((int64_t)1 << 32));
Expr min_64 = make_const(Int(64), INT64_MIN);
Expr max_64 = make_const(Int(64), INT64_MAX);
for (int x_pos = 0; x_pos <= 1; x_pos++) {
for (int y_pos = 0; y_pos <= 1; y_pos++) {
// Mul
{
Scope<Interval> scope;
if (x_pos) {
scope.push("x", {zero, two_32});
} else {
scope.push("x", {neg_two_32, zero});
}
if (y_pos) {
scope.push("y", {zero, two_32});
} else {
scope.push("y", {neg_two_32, zero});
}
if (x_pos == y_pos) {
internal_assert(!is_const(simplify((x * y) < two_32, true, scope)));
} else {
internal_assert(!is_const(simplify((x * y) > neg_two_32, true, scope)));
}
}
// Add/Sub
{
Scope<Interval> scope;
if (x_pos) {
scope.push("x", {zero, max_64});
} else {
scope.push("x", {min_64, zero});
}
if (y_pos) {
scope.push("y", {zero, max_64});
} else {
scope.push("y", {min_64, zero});
}
if (x_pos && y_pos) {
internal_assert(!is_const(simplify((x + y) < two_32, true, scope)));
} else if (x_pos && !y_pos) {
internal_assert(!is_const(simplify((x - y) < two_32, true, scope)));
} else if (!x_pos && y_pos) {
internal_assert(!is_const(simplify((x - y) > neg_two_32, true, scope)));
} else {
internal_assert(!is_const(simplify((x + y) > neg_two_32, true, scope)));
}
}
}
}
}
template<typename T>
void check_clz(uint64_t value, uint64_t result) {
Expr x = Variable::make(halide_type_of<T>(), "x");
check(Let::make("x", cast<T>(Expr(value)), count_leading_zeros(x)), cast<T>(Expr(result)));
}
template<typename T>
void check_ctz(uint64_t value, uint64_t result) {
Expr x = Variable::make(halide_type_of<T>(), "x");
check(Let::make("x", cast<T>(Expr(value)), count_trailing_zeros(x)), cast<T>(Expr(result)));
}
template<typename T>
void check_popcount(uint64_t value, uint64_t result) {
Expr x = Variable::make(halide_type_of<T>(), "x");
check(Let::make("x", cast<T>(Expr(value)), popcount(x)), cast<T>(Expr(result)));
}
void check_bitwise() {
Expr x = Var("x");
// Check bitshift operations
check(cast(Int(16), x) << 10, cast(Int(16), x) * 1024);
check(cast(Int(16), x) >> 10, cast(Int(16), x) / 1024);
// Shift by negative amount is a shift in the opposite direction
check(cast(Int(16), x) << -10, cast(Int(16), x) / 1024);
check(cast(Int(16), x) >> -10, cast(Int(16), x) * 1024);
// Shift by >= type size is an overflow
check_is_sio(cast(Int(16), x) << 20);
check_is_sio(cast(Int(16), x) >> 20);
// Check bitwise_and. (Added as result of a bug.)
// TODO: more coverage of bitwise_and and bitwise_or.
check(cast(UInt(32), x) & Expr((uint32_t)0xaaaaaaaa),
cast(UInt(32), x) & Expr((uint32_t)0xaaaaaaaa));
// Check constant-folding of bitwise ops (and indirectly, reinterpret)
check(Let::make(x.as<Variable>()->name, 5, (((~x) & 3) | 16) ^ 33), ((~5 & 3) | 16) ^ 33);
check(Let::make(x.as<Variable>()->name, 5, (((~cast<uint8_t>(x)) & 3) | 16) ^ 33), make_const(UInt(8), ((~5 & 3) | 16) ^ 33));
check_clz<int8_t>(10, 4);
check_clz<int16_t>(10, 12);
check_clz<int32_t>(10, 28);
check_clz<int64_t>(10, 60);
check_clz<uint8_t>(10, 4);
check_clz<uint16_t>(10, 12);
check_clz<uint32_t>(10, 28);
check_clz<uint64_t>(10, 60);
check_clz<uint64_t>(10ULL << 32, 28);
check_ctz<int8_t>(64, 6);
check_ctz<int16_t>(64, 6);
check_ctz<int32_t>(64, 6);
check_ctz<int64_t>(64, 6);
check_ctz<uint8_t>(64, 6);
check_ctz<uint16_t>(64, 6);
check_ctz<uint32_t>(64, 6);
check_ctz<uint64_t>(64, 6);
check_ctz<uint64_t>(64ULL << 32, 38);
check_popcount<int8_t>(0xa5, 4);
check_popcount<int16_t>(0xa5a5, 8);
check_popcount<int32_t>(0xa5a5a5a5, 16);
check_popcount<int64_t>(0xa5a5a5a5a5a5a5a5, 32);
check_popcount<uint8_t>(0xa5, 4);
check_popcount<uint16_t>(0xa5a5, 8);
check_popcount<uint32_t>(0xa5a5a5a5, 16);
check_popcount<uint64_t>(0xa5a5a5a5a5a5a5a5, 32);
}
void check_lets() {
Expr x = Var("x"), y = Var("y");
Expr v = Variable::make(Int(32, 4), "v");
Expr a = Variable::make(Int(32), "a");
Expr b = Variable::make(Int(32), "b");
// Check constants get pushed inwards
check(Let::make("x", 3, x + 4), 7);
// Check ramps in lets get pushed inwards
check(Let::make("v", ramp(x * 2 + 7, 3, 4), v + Expr(broadcast(2, 4))),
ramp(x * 2 + 9, 3, 4));
// Check broadcasts in lets get pushed inwards
check(Let::make("v", broadcast(x, 4), v + Expr(broadcast(2, 4))),
broadcast(x + 2, 4));
// Check that dead lets get stripped
check(Let::make("x", 3 * y * y * y, 4), 4);
check(Let::make("a", 3 * y * y * y, Let::make("b", 4 * a * a * a, b - b)), 0);
check(Let::make("a", b / 2, a - a), 0);
check(Let::make("a", b / 2 + (x + y) * 64, a - a), 0);
check(Let::make("x", 3 * y * y * y, x - x), 0);
check(Let::make("x", 0, 0), 0);
// Check that lets inside an evaluate node get lifted
check(Evaluate::make(Let::make("x", Call::make(Int(32), "dummy", {3, x, 4}, Call::Extern), Let::make("y", 10, x + y + 2))),
LetStmt::make("x", Call::make(Int(32), "dummy", {3, x, 4}, Call::Extern), Evaluate::make(x + 12)));
}
void check_inv(Expr before) {
Expr after = simplify(before);
internal_assert(before.same_as(after))
<< "Expressions should be equal by value and by identity: "
<< " Before: " << before << "\n"
<< " After: " << after << "\n";
}
void check_invariant() {
// Check a bunch of expressions *don't* simplify. These should try
// and then fail to match every single rule (which should trigger
// fuzz testing of each as a side effect). The final expression
// should be exactly the same object as the input.
for (Type t : {UInt(1), UInt(8), UInt(16), UInt(32), UInt(64),
Int(8), Int(16), Int(32), Int(64),
Float(32), Float(64)}) {
Expr x = Variable::make(t, "x");
Expr y = Variable::make(t, "y");
Expr z = Variable::make(t, "z");
Expr w = Variable::make(t, "w");
check_inv(x + y);
check_inv(x - y);
check_inv(x % y);
check_inv(x * y);
check_inv(x / y);
check_inv(min(x, y));
check_inv(max(x, y));
check_inv(x == y);
check_inv(x != y);
check_inv(x < y);
check_inv(x <= y);
if (t.is_bool()) {
check_inv(x && y);
check_inv(x || y);
check_inv(!x);
}
check_inv(select(x == y, z, w));
}
}
int main(int argc, char **argv) {
check_invariant();
check_casts();
check_algebra();
check_vectors();
check_bounds();
check_math();
check_boolean();
check_overflow();
check_bitwise();
check_lets();
// Miscellaneous cases that don't fit into one of the categories above.
Expr x = Var("x"), y = Var("y");
// Check that constant args to a stringify get combined
check(Call::make(type_of<const char *>(), Call::stringify, {3, std::string(" "), 4}, Call::Intrinsic),
std::string("3 4"));
check(Call::make(type_of<const char *>(), Call::stringify, {3, x, 4, std::string(", "), 3.4f}, Call::Intrinsic),
Call::make(type_of<const char *>(), Call::stringify, {std::string("3"), x, std::string("4, 3.400000")}, Call::Intrinsic));
{
// Check that contiguous prefetch call get collapsed
Expr base = Variable::make(Handle(), "buf");
check(Call::make(Int(32), Call::prefetch, {base, x, 4, 1, 64, 4, min(x + y, 128), 256}, Call::Intrinsic),
Call::make(Int(32), Call::prefetch, {base, x, min(x + y, 128) * 256, 1}, Call::Intrinsic));
}
// This expression is a good stress-test. It caused exponential
// slowdown at one point in time, and constant folding leading to
// overflow at another.
{
Expr e = x;
for (int i = 0; i < 100; i++) {
e = max(e, 1) / 2;
}
check(e, e);
}
// This expression used to cause infinite recursion.
check(Broadcast::make(-16, 2) < (ramp(Cast::make(UInt(16), 7), Cast::make(UInt(16), 11), 2) - Broadcast::make(1, 2)),
Broadcast::make(-15, 2) < (ramp(make_const(UInt(16), 7), make_const(UInt(16), 11), 2)));
{
// Verify that integer types passed to min() and max() are coerced to match
// Exprs, rather than being promoted to int first. (TODO: This doesn't really
// belong in the test for Simplify, but IROperator has no test unit of its own.)
Expr one = cast<uint16_t>(1);
const int two = 2; // note that type is int, not uint16_t
Expr r1, r2, r3;
r1 = min(one, two);
internal_assert(r1.type() == halide_type_of<uint16_t>());
r2 = min(one, two, one);
internal_assert(r2.type() == halide_type_of<uint16_t>());
// Explicitly passing 'two' as an Expr, rather than an int, will defeat this logic.
r3 = min(one, Expr(two), one);
internal_assert(r3.type() == halide_type_of<int>());
r1 = max(one, two);
internal_assert(r1.type() == halide_type_of<uint16_t>());
r2 = max(one, two, one);
internal_assert(r2.type() == halide_type_of<uint16_t>());
// Explicitly passing 'two' as an Expr, rather than an int, will defeat this logic.
r3 = max(one, Expr(two), one);
internal_assert(r3.type() == halide_type_of<int>());
}
{
Expr x = Variable::make(UInt(32), "x");
Expr y = Variable::make(UInt(32), "y");
// This is used to get simplified into broadcast(x - y, 2) which is
// incorrect when there is overflow.
Expr e = simplify(max(ramp(x, y, 2), broadcast(x, 2)) - max(broadcast(y, 2), ramp(y, y, 2)));
Expr expected = max(ramp(x, y, 2), broadcast(x, 2)) - max(ramp(y, y, 2), broadcast(y, 2));
check(e, expected);
}
// Check that provably-true require() expressions are simplified away
{
Expr result(42);
check(require(Expr(1) > Expr(0), result, "error"), result);
check(require(x == x, result, "error"), result);
}
// Check that is_nan() returns a boolean result for constant inputs
{
check(Halide::is_nan(cast<float16_t>(Expr(0.f))), const_false());
check(Halide::is_nan(Expr(0.f)), const_false());
check(Halide::is_nan(Expr(0.0)), const_false());
check(Halide::is_nan(Expr(cast<float16_t>(std::nanf("1")))), const_true());
check(Halide::is_nan(Expr(std::nanf("1"))), const_true());
check(Halide::is_nan(Expr(std::nan("1"))), const_true());
}
// Check that is_inf() returns a boolean result for constant inputs
{
constexpr float inf32 = std::numeric_limits<float>::infinity();
constexpr double inf64 = std::numeric_limits<double>::infinity();
check(Halide::is_inf(cast<float16_t>(Expr(0.f))), const_false());
check(Halide::is_inf(Expr(0.f)), const_false());
check(Halide::is_inf(Expr(0.0)), const_false());
check(Halide::is_inf(Expr(cast<float16_t>(inf32))), const_true());
check(Halide::is_inf(Expr(inf32)), const_true());
check(Halide::is_inf(Expr(inf64)), const_true());
check(Halide::is_inf(Expr(cast<float16_t>(-inf32))), const_true());
check(Halide::is_inf(Expr(-inf32)), const_true());
check(Halide::is_inf(Expr(-inf64)), const_true());
}
// Check that is_finite() returns a boolean result for constant inputs
{
constexpr float inf32 = std::numeric_limits<float>::infinity();
constexpr double inf64 = std::numeric_limits<double>::infinity();
check(Halide::is_finite(cast<float16_t>(Expr(0.f))), const_true());
check(Halide::is_finite(Expr(0.f)), const_true());
check(Halide::is_finite(Expr(0.0)), const_true());
check(Halide::is_finite(Expr(cast<float16_t>(std::nanf("1")))), const_false());
check(Halide::is_finite(Expr(std::nanf("1"))), const_false());
check(Halide::is_finite(Expr(std::nan("1"))), const_false());
check(Halide::is_finite(Expr(cast<float16_t>(inf32))), const_false());
check(Halide::is_finite(Expr(inf32)), const_false());
check(Halide::is_finite(Expr(inf64)), const_false());
check(Halide::is_finite(Expr(cast<float16_t>(-inf32))), const_false());
check(Halide::is_finite(Expr(-inf32)), const_false());
check(Halide::is_finite(Expr(-inf64)), const_false());
}
{
using ConciseCasts::i32;
// Wrap all in i32() to ensure C++ won't optimize our multiplies away at compiletime
Expr e = max(max(max(i32(-1074233344) * i32(-32767), i32(-32783) * i32(32783)), i32(32767) * i32(-32767)), i32(1074200561) * i32(32783)) / i32(64);
Expr e2 = e / i32(2);
check_is_sio(e2);
}
{
using ConciseCasts::i16;
const Expr a = Expr(std::numeric_limits<int16_t>::lowest());
const Expr b = Expr(std::numeric_limits<int16_t>::max());
check(a >> 14, i16(-2));
check(a << 14, i16(0));
check(a >> 15, i16(-1));
check(a << 15, i16(0));
check(b >> 14, i16(1));
check(b << 14, i16(-16384));
check(b >> 15, i16(0));
check(b << 15, i16(-32768));
}
{
using ConciseCasts::u16;
const Expr a = Expr(std::numeric_limits<uint16_t>::lowest());
const Expr b = Expr(std::numeric_limits<uint16_t>::max());
check(a >> 15, u16(0));
check(b >> 15, u16(1));
check(a << 15, u16(0));
check(b << 15, Expr((uint16_t)0x8000));
}
{
using ConciseCasts::i64;
const Expr a = Expr(std::numeric_limits<int64_t>::lowest());
const Expr b = Expr(std::numeric_limits<int64_t>::max());
check(a >> 62, i64(-2));
check_is_sio(a << 62);
check(a >> 63, i64(-1));
check(a << 63, i64(0));
check(b >> 62, i64(1));
check_is_sio(b << 62);
check(b >> 63, i64(0));
check(b << 63, Expr(std::numeric_limits<int64_t>::lowest()));
}
{
using ConciseCasts::u64;
const Expr a = Expr(std::numeric_limits<uint64_t>::lowest());
const Expr b = Expr(std::numeric_limits<uint64_t>::max());
check(a >> 63, u64(0));
check(b >> 63, u64(1));
check(a << 63, u64(0));
check(b << 63, Expr((uint64_t)0x8000000000000000ULL));
}
// Check a bounds-related fuzz tester failure found in issue https://github.com/halide/Halide/issues/3764
check(Let::make("b", 105, 336 / max(cast<int32_t>(cast<int16_t>(Variable::make(Int(32), "b"))), 38) + 29), 32);
printf("Success!\n");
return 0;
}
|
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2008 Andreas Gaida
Copyright (C) 2008 Ralph Schreyer
Copyright (C) 2008 Klaus Spanderen
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it
under the terms of the QuantLib license. You should have received a
copy of the license along with this program; if not, please email
<quantlib-dev@lists.sf.net>. The license is also available online at
<http://quantlib.org/license.shtml>.
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 license for more details.
*/
#include <ql/methods/finitedifferences/meshers/fdmmesher.hpp>
#include <ql/methods/finitedifferences/operators/fdmlinearoplayout.hpp>
#include <ql/methods/finitedifferences/operators/ninepointlinearop.hpp>
namespace QuantLib {
NinePointLinearOp::NinePointLinearOp(
Size d0, Size d1,
const ext::shared_ptr<FdmMesher>& mesher)
: d0_(d0), d1_(d1),
i00_(new Size[mesher->layout()->size()]),
i10_(new Size[mesher->layout()->size()]),
i20_(new Size[mesher->layout()->size()]),
i01_(new Size[mesher->layout()->size()]),
i21_(new Size[mesher->layout()->size()]),
i02_(new Size[mesher->layout()->size()]),
i12_(new Size[mesher->layout()->size()]),
i22_(new Size[mesher->layout()->size()]),
a00_(new Real[mesher->layout()->size()]),
a10_(new Real[mesher->layout()->size()]),
a20_(new Real[mesher->layout()->size()]),
a01_(new Real[mesher->layout()->size()]),
a11_(new Real[mesher->layout()->size()]),
a21_(new Real[mesher->layout()->size()]),
a02_(new Real[mesher->layout()->size()]),
a12_(new Real[mesher->layout()->size()]),
a22_(new Real[mesher->layout()->size()]),
mesher_(mesher) {
QL_REQUIRE( d0_ != d1_
&& d0_ < mesher->layout()->dim().size()
&& d1_ < mesher->layout()->dim().size(),
"inconsistent derivative directions");
const ext::shared_ptr<FdmLinearOpLayout> layout = mesher->layout();
const FdmLinearOpIterator endIter = layout->end();
for (FdmLinearOpIterator iter = layout->begin(); iter!=endIter; ++iter) {
const Size i = iter.index();
i10_[i] = layout->neighbourhood(iter, d1_, -1);
i01_[i] = layout->neighbourhood(iter, d0_, -1);
i21_[i] = layout->neighbourhood(iter, d0_, 1);
i12_[i] = layout->neighbourhood(iter, d1_, 1);
i00_[i] = layout->neighbourhood(iter, d0_, -1, d1_, -1);
i20_[i] = layout->neighbourhood(iter, d0_, 1, d1_, -1);
i02_[i] = layout->neighbourhood(iter, d0_, -1, d1_, 1);
i22_[i] = layout->neighbourhood(iter, d0_, 1, d1_, 1);
}
}
NinePointLinearOp::NinePointLinearOp(const NinePointLinearOp& m)
: i00_(new Size[m.mesher_->layout()->size()]),
i10_(new Size[m.mesher_->layout()->size()]),
i20_(new Size[m.mesher_->layout()->size()]),
i01_(new Size[m.mesher_->layout()->size()]),
i21_(new Size[m.mesher_->layout()->size()]),
i02_(new Size[m.mesher_->layout()->size()]),
i12_(new Size[m.mesher_->layout()->size()]),
i22_(new Size[m.mesher_->layout()->size()]),
a00_(new Real[m.mesher_->layout()->size()]),
a10_(new Real[m.mesher_->layout()->size()]),
a20_(new Real[m.mesher_->layout()->size()]),
a01_(new Real[m.mesher_->layout()->size()]),
a11_(new Real[m.mesher_->layout()->size()]),
a21_(new Real[m.mesher_->layout()->size()]),
a02_(new Real[m.mesher_->layout()->size()]),
a12_(new Real[m.mesher_->layout()->size()]),
a22_(new Real[m.mesher_->layout()->size()]),
mesher_(m.mesher_) {
const Size size = mesher_->layout()->size();
std::copy(m.i00_.get(), m.i00_.get()+size, i00_.get());
std::copy(m.i10_.get(), m.i10_.get()+size, i10_.get());
std::copy(m.i20_.get(), m.i20_.get()+size, i20_.get());
std::copy(m.i01_.get(), m.i01_.get()+size, i01_.get());
std::copy(m.i21_.get(), m.i21_.get()+size, i21_.get());
std::copy(m.i02_.get(), m.i02_.get()+size, i02_.get());
std::copy(m.i12_.get(), m.i12_.get()+size, i12_.get());
std::copy(m.i22_.get(), m.i22_.get()+size, i22_.get());
std::copy(m.a00_.get(), m.a00_.get()+size, a00_.get());
std::copy(m.a10_.get(), m.a10_.get()+size, a10_.get());
std::copy(m.a20_.get(), m.a20_.get()+size, a20_.get());
std::copy(m.a01_.get(), m.a01_.get()+size, a01_.get());
std::copy(m.a11_.get(), m.a11_.get()+size, a11_.get());
std::copy(m.a21_.get(), m.a21_.get()+size, a21_.get());
std::copy(m.a02_.get(), m.a02_.get()+size, a02_.get());
std::copy(m.a12_.get(), m.a12_.get()+size, a12_.get());
std::copy(m.a22_.get(), m.a22_.get()+size, a22_.get());
}
#ifdef QL_USE_DISPOSABLE
NinePointLinearOp::NinePointLinearOp(
const Disposable<NinePointLinearOp>& from) {
swap(const_cast<Disposable<NinePointLinearOp>&>(from));
}
NinePointLinearOp& NinePointLinearOp::operator=(
const Disposable<NinePointLinearOp>& m) {
swap(const_cast<Disposable<NinePointLinearOp>&>(m));
return *this;
}
#endif
Disposable<Array> NinePointLinearOp::apply(const Array& u)
const {
const ext::shared_ptr<FdmLinearOpLayout> index=mesher_->layout();
QL_REQUIRE(u.size() == index->size(),"inconsistent length of r "
<< u.size() << " vs " << index->size());
Array retVal(u.size());
// direct access to make the following code faster.
const Real *a00(a00_.get()), *a01(a01_.get()), *a02(a02_.get());
const Real *a10(a10_.get()), *a11(a11_.get()), *a12(a12_.get());
const Real *a20(a20_.get()), *a21(a21_.get()), *a22(a22_.get());
const Size *i00(i00_.get()), *i01(i01_.get()), *i02(i02_.get());
const Size *i10(i10_.get()), *i12(i12_.get());
const Size *i20(i20_.get()), *i21(i21_.get()), *i22(i22_.get());
//#pragma omp parallel for
for (Size i=0; i < retVal.size(); ++i) {
retVal[i] = a00[i]*u[i00[i]]
+ a01[i]*u[i01[i]]
+ a02[i]*u[i02[i]]
+ a10[i]*u[i10[i]]
+ a11[i]*u[i]
+ a12[i]*u[i12[i]]
+ a20[i]*u[i20[i]]
+ a21[i]*u[i21[i]]
+ a22[i]*u[i22[i]];
}
return retVal;
}
#if !defined(QL_NO_UBLAS_SUPPORT)
Disposable<SparseMatrix> NinePointLinearOp::toMatrix() const {
const ext::shared_ptr<FdmLinearOpLayout> index = mesher_->layout();
const Size n = index->size();
SparseMatrix retVal(n, n, 9*n);
for (Size i=0; i < index->size(); ++i) {
retVal(i, i00_[i]) += a00_[i];
retVal(i, i01_[i]) += a01_[i];
retVal(i, i02_[i]) += a02_[i];
retVal(i, i10_[i]) += a10_[i];
retVal(i, i ) += a11_[i];
retVal(i, i12_[i]) += a12_[i];
retVal(i, i20_[i]) += a20_[i];
retVal(i, i21_[i]) += a21_[i];
retVal(i, i22_[i]) += a22_[i];
}
return retVal;
}
#endif
Disposable<NinePointLinearOp>
NinePointLinearOp::mult(const Array & u) const {
NinePointLinearOp retVal(d0_, d1_, mesher_);
const Size size = mesher_->layout()->size();
//#pragma omp parallel for
for (Size i=0; i < size; ++i) {
const Real s = u[i];
retVal.a11_[i]=a11_[i]*s; retVal.a00_[i]=a00_[i]*s;
retVal.a01_[i]=a01_[i]*s; retVal.a02_[i]=a02_[i]*s;
retVal.a10_[i]=a10_[i]*s; retVal.a20_[i]=a20_[i]*s;
retVal.a21_[i]=a21_[i]*s; retVal.a12_[i]=a12_[i]*s;
retVal.a22_[i]=a22_[i]*s;
}
return retVal;
}
void NinePointLinearOp::swap(NinePointLinearOp& m) {
std::swap(d0_, m.d0_);
std::swap(d1_, m.d1_);
i00_.swap(m.i00_); i10_.swap(m.i10_); i20_.swap(m.i20_);
i01_.swap(m.i01_); i21_.swap(m.i21_); i02_.swap(m.i02_);
i12_.swap(m.i12_); i22_.swap(m.i22_);
a00_.swap(m.a00_); a10_.swap(m.a10_); a20_.swap(m.a20_);
a01_.swap(m.a01_); a21_.swap(m.a21_); a02_.swap(m.a02_);
a12_.swap(m.a12_); a22_.swap(m.a22_); a11_.swap(m.a11_);
std::swap(mesher_, m.mesher_);
}
}
|
//
// Created by Raffaele Montella on 13/01/22.
//
#ifndef FAIRWIND_MAINPAGE_HPP
#define FAIRWIND_MAINPAGE_HPP
#include <QWidget>
#include <FairWindSdk/FairWindSDK.hpp>
#include <FairWindSdk/IFairWindApp.hpp>
#include <FairWindSdk/PageBase.hpp>
#include "WebView.hpp"
namespace it::gov::guardiacostiera::gc1530 {
QT_BEGIN_NAMESPACE
namespace Ui { class MainPage; }
QT_END_NAMESPACE
class MainPage : public fairwind::apps::PageBase {
Q_OBJECT
public:
explicit MainPage(QWidget *parent = nullptr, fairwind::apps::FairWindApp *fairWindApp = nullptr);
~MainPage();
public slots:
void toolButton_home_clicked();
private:
Ui::MainPage *ui;
WebView *m_webView = nullptr;
};
} // it::gov::guardiacostiera::gc1530
#endif //FAIRWIND_MAINPAGE_HPP
|
#include <map>
#include "ManualWaypointController.h"
#include <angles/angles.h> // for hypot()
ManualWaypointController::ManualWaypointController() {}
ManualWaypointController::~ManualWaypointController() {}
void ManualWaypointController::Reset() {
waypoints.clear();
num_waypoints = 0;
cleared_waypoints.clear();
}
bool ManualWaypointController::HasWork() {
//cout<<"Manual waypoint has work..."<<!waypoints.empty()<<endl;
return !waypoints.empty();
}
bool ManualWaypointController::ShouldInterrupt() {
//cout<<"manualwaypoint controller should interrupt...";
bool interrupt = false;
// If the size of the manual waypoint list has changed, then interrupt.
if(num_waypoints != waypoints.size() && !waypoints.empty()) {
interrupt = true;
num_waypoints = waypoints.size();
}
cout<<interrupt<<endl;
return interrupt;
}
Result ManualWaypointController::DoWork() {
cout<<"ManualWaypointController::DoWork()"<<endl;
Result result;
result.type = waypoint;
result.wpts.waypoints.push_back(waypoints.begin()->second);
result.PIDMode = FAST_PID;
return result;
}
void ManualWaypointController::SetCurrentLocation(Point currentLocation)
{
this->currentLocation = currentLocation;
if(!waypoints.empty()) {
std::map<int, Point>::iterator first = waypoints.begin();
if(hypot(first->second.x-currentLocation.x,
first->second.y-currentLocation.y)
< waypoint_tolerance) {
cleared_waypoints.push_back(first->first);
waypoints.erase(first);
}
}
}
void ManualWaypointController::ProcessData()
{
}
CPFAState ManualWaypointController::GetCPFAState()
{
return cpfa_state;
}
void ManualWaypointController::SetCPFAState(CPFAState state) {
cpfa_state = state;
result.cpfa_state = state;
}
void ManualWaypointController::AddManualWaypoint(Point wpt, int id)
{
waypoints[id] = wpt;
}
void ManualWaypointController::RemoveManualWaypoint(int id)
{
waypoints.erase(id);
}
std::vector<int> ManualWaypointController::ReachedWaypoints() {
std::vector<int> cleared = cleared_waypoints;
cleared_waypoints.clear();
return cleared;
}
|
#include <iostream>
#include "./dic/DIC.hpp"
using namespace std;
int main(int argc, char *argv[])
{
auto parser = DICParameters(argc, argv);
auto parameters = parser.GetParameters();
auto executor = Executor(¶meters);
executor.FindResult();
return EXIT_SUCCESS;
}
|
/*
EOS
Copyright 2010-201x held jointly by LANS/LANL, LBNL, and PNNL.
Amanzi is released under the three-clause BSD License.
The terms of use and "as is" disclaimer for this license are
provided in the top-level COPYRIGHT file.
Author: Ethan Coon (ecoon@lanl.gov)
Saturated vapor pressure for vapor over water or ice, Sonntag (1990)
*/
#include <cmath>
#include "errors.hh"
#include "H2O_SaturatedVaporPressure.hh"
namespace Amanzi {
namespace AmanziEOS {
H2O_SaturatedVaporPressure::H2O_SaturatedVaporPressure(
Teuchos::ParameterList& plist)
: plist_(plist),
ka0_(16.635764),
ka_(-6096.9385),
kb_(-2.7111933e-2),
kc_(1.673952e-5),
kd_(2.433502) {};
double H2O_SaturatedVaporPressure::Pressure(double T)
{
ierr_ = 0;
if (T < 100.0 || T > 373.0) {
ierr_ = 1;
std::stringstream ss;
ss << "invalid T = " << T;
error_msg_ = ss.str();
return 0.0;
} else {
return 100.0 * exp(ka0_ + ka_/T + (kb_ + kc_*T) * T + kd_*log(T));
}
}
double H2O_SaturatedVaporPressure::DPressureDT(double T)
{
ierr_ = 0;
if (T < 100.0 || T > 373.0) {
ierr_ = 1;
std::stringstream ss;
ss << "invalid T = " << T;
error_msg_ = ss.str();
return 0.0;
} else {
return Pressure(T) * (-ka_/(T * T) + kb_ + 2 * kc_ * T + kd_ / T);
}
}
} // namespace AmanziEOS
} // namespace Amanzi
|
#include "../Common.h"
#include "BuildOrderQueue.h"
BuildOrderQueue::BuildOrderQueue()
: highestPriority(0),
lowestPriority(0),
defaultPrioritySpacing(10),
numSkippedItems(0)
{
}
void BuildOrderQueue::clearAll()
{
// clear the queue
queue.clear();
// reset the priorities
highestPriority = 0;
lowestPriority = 0;
}
BuildOrderItem<PRIORITY_TYPE> & BuildOrderQueue::getHighestPriorityItem()
{
// reset the number of skipped items to zero
numSkippedItems = 0;
// the queue will be sorted with the highest priority at the back
return queue.back();
}
BuildOrderItem<PRIORITY_TYPE> & BuildOrderQueue::getNextHighestPriorityItem()
{
assert(queue.size() - 1 - numSkippedItems >= 0);
// the queue will be sorted with the highest priority at the back
return queue[queue.size() - 1 - numSkippedItems];
}
void BuildOrderQueue::skipItem()
{
// make sure we can skip
assert(canSkipItem());
// skip it
numSkippedItems++;
}
bool BuildOrderQueue::canSkipItem() {
// does the queue have more elements
bool bigEnough = queue.size() > (size_t)(1 + numSkippedItems);
if (!bigEnough)
{
return false;
}
// is the current highest priority item not blocking a skip
bool highestNotBlocking = !queue[queue.size() - 1 - numSkippedItems].blocking;
// this tells us if we can skip
return highestNotBlocking;
}
void BuildOrderQueue::queueItem(BuildOrderItem<PRIORITY_TYPE> b)
{
// if the queue is empty, set the highest and lowest priorities
if (queue.empty())
{
highestPriority = b.priority;
lowestPriority = b.priority;
}
// push the item into the queue
if (b.priority <= lowestPriority)
{
queue.push_front(b);
}
else
{
queue.push_back(b);
}
// if the item is somewhere in the middle, we have to sort again
if ((queue.size() > 1) && (b.priority < highestPriority) && (b.priority > lowestPriority))
{
// sort the list in ascending order, putting highest priority at the top
std::sort(queue.begin(), queue.end());
}
// update the highest or lowest if it is beaten
highestPriority = (b.priority > highestPriority) ? b.priority : highestPriority;
lowestPriority = (b.priority < lowestPriority) ? b.priority : lowestPriority;
}
void BuildOrderQueue::queueAsHighestPriority(MetaType m, bool blocking)
{
// the new priority will be higher
PRIORITY_TYPE newPriority = highestPriority + defaultPrioritySpacing;
// queue the item
queueItem(BuildOrderItem<PRIORITY_TYPE>(m, newPriority, blocking));
}
void BuildOrderQueue::queueAsLowestPriority(MetaType m, bool blocking)
{
// the new priority will be higher
int newPriority = lowestPriority - defaultPrioritySpacing;
// queue the item
queueItem(BuildOrderItem<PRIORITY_TYPE>(m, newPriority, blocking));
}
void BuildOrderQueue::removeHighestPriorityItem()
{
// remove the back element of the vector
queue.pop_back();
// if the list is not empty, set the highest accordingly
highestPriority = queue.empty() ? 0 : queue.back().priority;
lowestPriority = queue.empty() ? 0 : lowestPriority;
}
void BuildOrderQueue::removeCurrentHighestPriorityItem()
{
// remove the back element of the vector
queue.erase(queue.begin() + queue.size() - 1 - numSkippedItems);
//assert((int)(queue.size()) < size);
// if the list is not empty, set the highest accordingly
highestPriority = queue.empty() ? 0 : queue.back().priority;
lowestPriority = queue.empty() ? 0 : lowestPriority;
}
size_t BuildOrderQueue::size()
{
return queue.size();
}
bool BuildOrderQueue::isEmpty()
{
return (queue.size() == 0);
}
BuildOrderItem<PRIORITY_TYPE> BuildOrderQueue::operator [] (int i)
{
return queue[i];
}
void BuildOrderQueue::drawQueueInformation(int x, int y) {
//x = x + 25;
std::string prefix = "\x04";
//if (Options::Debug::DRAW_UALBERTABOT_DEBUG) BWAPI::Broodwar->drawTextScreen(x, y, "\x04Priority Queue Information:");
//if (Options::Debug::DRAW_UALBERTABOT_DEBUG) BWAPI::Broodwar->drawTextScreen(x, y+20, "\x04UNIT NAME");
size_t reps = queue.size() < 10 ? queue.size() : 10;
// for each unit in the queue
for (size_t i(0); i<reps; i++) {
prefix = "\x04";
if (Options::Debug::DRAW_UALBERTABOT_DEBUG) BWAPI::Broodwar->drawTextScreen(x, y+(i*10), "%s%s", prefix.c_str(), queue[queue.size() - 1 - i].metaType.getName().c_str());
}
}
|
#pragma once
#include <glm/glm.hpp>
#include <map>
#include <vector>
#include <Video/DebugDrawing.hpp>
#include "../linking.hpp"
namespace Component {
class Mesh;
}
namespace Video {
class RenderSurface;
}
/// Debug drawing facilities.
class DebugDrawingManager {
friend class Hub;
public:
/// Add a point to the world.
/**
* @param position World position of the point.
* @param color Color of the point.
* @param size Size of the point.
* @param duration How long the point should stay in the world (in seconds).
* @param depthTesting Whether to enable depth testing.
*/
ENGINE_API void AddPoint(const glm::vec3& position, const glm::vec3& color, float size, float duration = 0.f, bool depthTesting = true);
/// Add a line to the world.
/**
* @param startPosition Position of the start point of the line.
* @param endPosition Position of the end point of the line.
* @param color Color of the line.
* @param width The width of the line.
* @param duration How long the line should stay in the world (in seconds).
* @param depthTesting Whether to enable depth testing.
*/
ENGINE_API void AddLine(const glm::vec3& startPosition, const glm::vec3& endPosition, const glm::vec3& color, float width = 1.f, float duration = 0.f, bool depthTesting = true);
/// Add a cuboid to the world.
/**
* @param dimensions The dimensions of the cuboid.
* @param matrix Matrix used to transform the cuboid.
* @param color Color of the lines.
* @param lineWidth The width of the lines used to draw the box.
* @param duration How long the box should stay in the world (in seconds).
* @param depthTesting Whether to enable depth testing.
*/
ENGINE_API void AddCuboid(const glm::vec3& dimensions, const glm::mat4& matrix, const glm::vec3& color, float lineWidth = 1.f, float duration = 0.f, bool depthTesting = true);
/// Add a plane to the world.
/**
* @param position Center position of the plane.
* @param normal Plane normal.
* @param size Size.
* @param color Color of the lines.
* @param lineWidth The width of the lines used to draw the plane.
* @param duration How long the plane should stay in the world (in seconds).
* @param depthTesting Whether to enable depth testing.
*/
ENGINE_API void AddPlane(const glm::vec3& position, const glm::vec3& normal, const glm::vec2& size, const glm::vec3& color, float lineWidth = 1.f, float duration = 0.f, bool depthTesting = true);
/// Add a circle to the world.
/**
* @param position Center position of the circle.
* @param normal Circle normal.
* @param radius Radius.
* @param color Color of the lines.
* @param lineWidth The width of the lines used to draw the circle.
* @param duration How long the circle should stay in the world (in seconds).
* @param depthTesting Whether to enable depth testing.
*/
ENGINE_API void AddCircle(const glm::vec3& position, const glm::vec3& normal, float radius, const glm::vec3& color, float lineWidth = 1.f, float duration = 0.f, bool depthTesting = true);
/// Add a sphere to the world.
/**
* @param position The position of the sphere.
* @param radius The radius of the sphere.
* @param color Color of the lines.
* @param lineWidth The width of the lines used to draw the sphere.
* @param duration How long the sphere should stay in the world (in seconds).
* @param depthTesting Whether to enable depth testing.
*/
ENGINE_API void AddSphere(const glm::vec3& position, float radius, const glm::vec3& color, float lineWidth = 1.f, float duration = 0.f, bool depthTesting = true);
/// Add a cylinder to the world.
/**
* @param radius The radius of the cylinder.
* @param length The length of the cylinder.
* @param matrix Matrix used to transform the cylinder.
* @param color Color of the lines.
* @param lineWidth The width of the lines used to draw the cylinder.
* @param duration How long the cylinder should stay in the world (in seconds).
* @param depthTesting Whether to enable depth testing.
*/
ENGINE_API void AddCylinder(float radius, float length, const glm::mat4& matrix, const glm::vec3& color, float lineWidth = 1.f, float duration = 0.f, bool depthTesting = true);
/// Add a cone to the world.
/**
* @param radius The radius of the cone.
* @param height The height of the cone.
* @param matrix Matrix to transform the cone with.
* @param color Color of the lines.
* @param lineWidth The width of the lines used to draw the cone.
* @param duration How long the cone should stay in the world (in seconds).
* @param depthTesting Whether to enable depth testing.
*/
ENGINE_API void AddCone(float radius, float height, const glm::mat4& matrix, const glm::vec3& color, float lineWidth = 1.f, float duration = 0.f, bool depthTesting = true);
/// Add a mesh to the world.
/**
* @param id The entity's UID.
* @param meshComponent The mesh component.
* @param matrix Matrix to transform the mesh with.
* @param color Color of the lines.
* @param wireFrame Whether to wireframe the mesh.
* @param duration How long the mesh should stay in the world (in seconds).
* @param depthTesting Whether to enable depth testing.
*/
ENGINE_API void AddMesh(unsigned int id, Component::Mesh* meshComponent, const glm::mat4& matrix, const glm::vec3& color, bool wireFrame = true, float duration = 0.f, bool depthTesting = true);
/// Update the debug geometry.
/**
* @param deltaTime Time since last frame (in seconds).
*/
ENGINE_API void Update(float deltaTime);
/// Render the debug primitives.
/**
* @param viewMatrix The camera's view matrix.
* @param projectionMatrix The camera's projection matrix.
* @param renderSurface %RenderSurface to render to.
*/
ENGINE_API void Render(const glm::mat4& viewMatrix, const glm::mat4& projectionMatrix, Video::RenderSurface* renderSurface);
private:
DebugDrawingManager();
~DebugDrawingManager();
DebugDrawingManager(DebugDrawingManager const&) = delete;
void operator=(DebugDrawingManager const&) = delete;
std::vector<Video::DebugDrawing::Point> points;
std::vector<Video::DebugDrawing::Line> lines;
std::vector<Video::DebugDrawing::Cuboid> cuboids;
std::vector<Video::DebugDrawing::Plane> planes;
std::vector<Video::DebugDrawing::Circle> circles;
std::vector<Video::DebugDrawing::Sphere> spheres;
std::vector<Video::DebugDrawing::Cylinder> cylinders;
std::vector<Video::DebugDrawing::Cone> cones;
std::map<unsigned int, Video::DebugDrawing::Mesh> meshMap;
Video::DebugDrawing* debugDrawing;
};
|
#include "PrepareStatement.h"
namespace hsql {
// PrepareStatement
PrepareStatement::PrepareStatement() : SQLStatement(kStmtPrepare), name(nullptr), query(nullptr) {}
PrepareStatement::~PrepareStatement() {
free(name);
free(query);
}
} // namespace hsql
|
//
// Created by chaoqi on 2021/12/4.
//
#ifndef PRACTISE_CPLUSPLUS_NET_CELL_SERVER_HPP
#define PRACTISE_CPLUSPLUS_NET_CELL_SERVER_HPP
#include "cell_net_utils.hpp"
#include "i_net_event.hpp"
class CellServer
{
public:
CellServer(SOCKET sock = INVALID_SOCKET)
{
_sock = sock;
_clients.clear();
_clients_buff.clear();
}
~CellServer()
{
_sock = INVALID_SOCKET;
_clients.clear();
_clients_buff.clear();
}
void set_net_obj(std::shared_ptr<INetEvent*> p)
{
_parent = p;
}
size_t get_client_count()
{
return _clients.size() + _clients_buff.size();
}
void add_client(std::shared_ptr<TcpClientS> client)
{
std::lock_guard<std::mutex> lg(_mutex);
_clients_buff.push_back(client);
}
void start()
{
_pthread = std::make_shared<std::thread>(std::mem_fun(&CellServer::on_run), this);
_pthread->detach();
}
void on_run()
{
while (is_run()) {
//把新客户端加入处理队列
if (!_clients_buff.empty()) {
std::lock_guard<std::mutex> lg(_mutex);
for (auto client : _clients_buff) {
_clients.push_back(client);
}
_clients_buff.clear();
}
if (_clients.empty()) {
std::this_thread::sleep_for(1ms);
continue;
}
fd_set read_fds;
fd_set write_fds;
timeval timeout;
timeout.tv_sec = 1;
timeout.tv_usec = 0;
FD_ZERO(&read_fds);
FD_ZERO(&write_fds);
SOCKET max_socket = _clients[0]->sock_fd();
for (auto itr = _clients.begin(); itr != _clients.end(); ++itr) {
SOCKET cur_fd = (*itr)->sock_fd();
FD_SET(cur_fd, &read_fds);
FD_SET (cur_fd, &write_fds);
if (max_socket < cur_fd)
{
max_socket = cur_fd;
}
}
int nfds = select(max_socket+1, &read_fds, &write_fds, nullptr, &timeout);
if (nfds < 0) {
printf("CellServer select return < 0, break\n");
return;
}
handle_recv(read_fds);
//handle_write(write_fds);
}
}
int recv_data(std::shared_ptr<TcpClientS> clientS)
{
char buf[4096] = {};
int len = recv(clientS->sock_fd(), (char*)buf, 4096, 0);
//printf("len:%d\n", len);
if (len <= 0) {
printf("<%d> recv_data error\n", (int)clientS->sock_fd());
return -1;
}
uint32_t last_pos = clientS->get_last_recv_pos();
if (last_pos + len > clientS->capacity()) {
printf("<%d> out of buffer error\n", (int)clientS->sock_fd());
return -1;
}
//
memcpy(clientS->buf() + last_pos, buf, len);
clientS->set_last_recv_pos(last_pos + len);
while (clientS->get_last_recv_pos() >= sizeof(DataHeader)) {
DataHeader* header = (DataHeader*)clientS->buf();
if (clientS->get_last_recv_pos() >= header->data_length) {
uint32_t msg_len = header->data_length;
uint32_t left_msg_len = clientS->get_last_recv_pos() - msg_len;
on_net_msg(clientS, header);
if (left_msg_len > 0) {
memcpy(clientS->buf(), clientS->buf() + msg_len, left_msg_len);
}
clientS->set_last_recv_pos(left_msg_len);
} else {
break;
}
}
return 0;
}
void handle_recv(const fd_set& read_fds)
{
for (auto itr = _clients.begin(); itr != _clients.end();) {
auto client = *itr;
if (FD_ISSET(client->sock_fd(), &read_fds)) {
FD_CLR(client->sock_fd(), &read_fds);
if (recv_data(client) < 0) {
if (_parent) {
(*_parent)->on_user_leave(client);
}
close_socket(client->sock_fd());
itr = _clients.erase(itr);
continue;
}
}
++itr;
}
}
int on_net_msg(std::shared_ptr<TcpClientS> clientS, DataHeader* header)
{
_msg_count++;
// if (_parent) {
// (*_parent)->on_net_message(clientS);
// }
switch (header->cmd) {
case CMD_LOGIN:
{
Login* login = (Login*)header;
//printf("user login name:%s, pwd:%s\n", login->user_name, login->user_pwd);
//msg_count++;
LoginResult loginResult;
loginResult.code = 0;
send_data(clientS->sock_fd(), &loginResult);
}
break;
case CMD_LOGOUT:
{
Logout* logout = (Logout*)header;
//printf("user logout name:%s\n", logout->user_name);
//msg_count++;
LogoutResult logoutResult;
logoutResult.code = 0;
send_data(clientS->sock_fd(), &logoutResult);
}
break;
default:
{
printf("unknown command\n");
}
}
//printf("handle msg count %d\n", msg_count);
return 0;
}
bool is_run()
{
return _sock != INVALID_SOCKET;
}
int send_data(SOCKET sock, DataHeader* header)
{
if (is_run() && sock != INVALID_SOCKET && header)
{
return send(sock, (const char*)header, header->data_length, 0);
}
return SOCKET_ERROR;
}
void send2all(DataHeader* header)
{
for (auto itr = _clients.begin(); itr != _clients.end(); ++itr)
{
send_data((*itr)->sock_fd(), header);
}
}
int get_msg_count()
{
return (int)_msg_count;
}
void reset_msg_count()
{
_msg_count = 0;
}
private:
SOCKET _sock = INVALID_SOCKET;
//当前工作的客户端
std::vector<std::shared_ptr<TcpClientS>> _clients;
//新加入的客户端
std::vector<std::shared_ptr<TcpClientS>> _clients_buff;
//锁定新加入的客户端
std::mutex _mutex;
//工作子线程
std::shared_ptr<std::thread> _pthread = nullptr;
std::shared_ptr<INetEvent*> _parent = nullptr;
std::atomic_int32_t _msg_count{0};
};
#endif //PRACTISE_CPLUSPLUS_NET_CELL_SERVER_HPP
|
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
#include "scheduling/cluster-membership-mgr.h"
#include <boost/algorithm/string/join.hpp>
#include <gutil/strings/split.h>
#include <gutil/strings/stringpiece.h>
#include "common/logging.h"
#include "common/names.h"
#include "runtime/exec-env.h"
#include "service/impala-server.h"
#include "util/metrics.h"
#include "util/string-parser.h"
#include "util/test-info.h"
DECLARE_int32(num_expected_executors);
DECLARE_string(expected_executor_group_sets);
namespace {
using namespace impala;
/// Looks for an executor group with name 'name' in 'executor_groups' and returns it. If
/// the group doesn't exist yet, it creates a new one and inserts it into
/// 'executor_groups'.
ExecutorGroup* FindOrInsertExecutorGroup(const ExecutorGroupDescPB& group,
ClusterMembershipMgr::ExecutorGroups* executor_groups) {
auto it = executor_groups->find(group.name());
if (it != executor_groups->end()) {
DCHECK_EQ(group.name(), it->second.name());
return &it->second;
}
bool inserted;
tie(it, inserted) = executor_groups->emplace(group.name(), ExecutorGroup(group));
DCHECK(inserted);
return &it->second;
}
}
namespace impala {
static const string EMPTY_GROUP_NAME("empty group (using coordinator only)");
static const string LIVE_EXEC_GROUP_KEY("cluster-membership.executor-groups.total");
static const string HEALTHY_EXEC_GROUP_KEY(
"cluster-membership.executor-groups.total-healthy");
static const string TOTAL_BACKENDS_KEY("cluster-membership.backends.total");
// Per group set metrics
static const string LIVE_EXEC_GROUP_KEY_FORMAT(
"cluster-membership.group-set.executor-groups.total.$0");
static const string HEALTHY_EXEC_GROUP_KEY_FORMAT(
"cluster-membership.group-set.executor-groups.total-healthy.$0");
static const string TOTAL_BACKENDS_KEY_FORMAT(
"cluster-membership.group-set.backends.total.$0");
ClusterMembershipMgr::ClusterMembershipMgr(
string local_backend_id, StatestoreSubscriber* subscriber, MetricGroup* metrics)
: empty_exec_group_(EMPTY_GROUP_NAME),
current_membership_(std::make_shared<const Snapshot>()),
statestore_subscriber_(subscriber),
local_backend_id_(move(local_backend_id)) {
Status status = PopulateExpectedExecGroupSets(expected_exec_group_sets_);
if(!status.ok()) {
LOG(FATAL) << "Error populating expected executor group sets: " << status;
}
InitMetrics(metrics);
// Register the metric update function as a callback.
RegisterUpdateCallbackFn([this](
ClusterMembershipMgr::SnapshotPtr snapshot) { this->UpdateMetrics(snapshot); });
}
void ClusterMembershipMgr::InitMetrics(MetricGroup* metrics) {
DCHECK(metrics != nullptr);
MetricGroup* metric_grp = metrics->GetOrCreateChildGroup("cluster-membership");
aggregated_group_set_metrics_.total_live_executor_groups_ =
metric_grp->AddCounter(LIVE_EXEC_GROUP_KEY, 0);
aggregated_group_set_metrics_.total_healthy_executor_groups_ =
metric_grp->AddCounter(HEALTHY_EXEC_GROUP_KEY, 0);
aggregated_group_set_metrics_.total_backends_ =
metric_grp->AddCounter(TOTAL_BACKENDS_KEY, 0);
for (auto& set : expected_exec_group_sets_) {
GroupSetMetrics grp_set_metrics;
grp_set_metrics.total_live_executor_groups_ =
metric_grp->AddCounter(LIVE_EXEC_GROUP_KEY_FORMAT, 0, set.exec_group_name_prefix);
grp_set_metrics.total_healthy_executor_groups_ = metric_grp->AddCounter(
HEALTHY_EXEC_GROUP_KEY_FORMAT, 0, set.exec_group_name_prefix);
grp_set_metrics.total_backends_ =
metric_grp->AddCounter(TOTAL_BACKENDS_KEY_FORMAT, 0, set.exec_group_name_prefix);
per_group_set_metrics_.insert({set.exec_group_name_prefix, grp_set_metrics});
}
}
Status ClusterMembershipMgr::Init() {
LOG(INFO) << "Starting cluster membership manager";
if (statestore_subscriber_ == nullptr) {
DCHECK(TestInfo::is_test());
return Status::OK();
}
// Register with the statestore
StatestoreSubscriber::UpdateCallback cb =
bind<void>(mem_fn(&ClusterMembershipMgr::UpdateMembership), this, _1, _2);
Status status = statestore_subscriber_->AddTopic(
Statestore::IMPALA_MEMBERSHIP_TOPIC, /* is_transient=*/ true,
/* populate_min_subscriber_topic_version=*/ false,
/* filter_prefix= */"", cb);
if (!status.ok()) {
status.AddDetail("Scheduler failed to register membership topic");
return status;
}
return Status::OK();
}
void ClusterMembershipMgr::SetLocalBeDescFn(BackendDescriptorPtrFn fn) {
lock_guard<mutex> l(callback_fn_lock_);
DCHECK(fn);
DCHECK(!local_be_desc_fn_);
local_be_desc_fn_ = std::move(fn);
}
void ClusterMembershipMgr::RegisterUpdateCallbackFn(UpdateCallbackFn fn) {
lock_guard<mutex> l(callback_fn_lock_);
DCHECK(fn);
update_callback_fns_.push_back(std::move(fn));
}
ClusterMembershipMgr::SnapshotPtr ClusterMembershipMgr::GetSnapshot() const {
lock_guard<mutex> l(current_membership_lock_);
DCHECK(current_membership_.get() != nullptr);
SnapshotPtr state = current_membership_;
return state;
}
void ClusterMembershipMgr::UpdateMembership(
const StatestoreSubscriber::TopicDeltaMap& incoming_topic_deltas,
vector<TTopicDelta>* subscriber_topic_updates) {
lock_guard<mutex> l(update_membership_lock_);
// First look to see if the topic we're interested in has an update.
StatestoreSubscriber::TopicDeltaMap::const_iterator topic =
incoming_topic_deltas.find(Statestore::IMPALA_MEMBERSHIP_TOPIC);
// Ignore spurious messages.
if (topic == incoming_topic_deltas.end()) return;
const TTopicDelta& update = topic->second;
// If the update transmitted by the statestore is an empty delta, we don't need to
// process it.
bool no_ss_update = update.is_delta && update.topic_entries.empty();
// Check if the local backend is up and needs updating.
const Snapshot* base_snapshot = recovering_membership_.get();
if (base_snapshot == nullptr) base_snapshot = current_membership_.get();
DCHECK(base_snapshot != nullptr);
BeDescSharedPtr local_be_desc = GetLocalBackendDescriptor();
bool needs_local_be_update = NeedsLocalBackendUpdate(*base_snapshot, local_be_desc);
// We consider the statestore to be recovering from a connection failure until its post
// recovery grace period has elapsed.
bool ss_is_recovering = statestore_subscriber_ != nullptr
&& statestore_subscriber_->IsInPostRecoveryGracePeriod();
// If we are tracking a recovering membership but the statestore is out of recovery, we
// will need to send the current membership to the impala server.
bool update_local_server = recovering_membership_.get() != nullptr && !ss_is_recovering;
// Check if there are any executors that can be removed from the blacklist.
bool needs_blacklist_maintenance = base_snapshot->executor_blacklist.NeedsMaintenance();
// If there's no statestore update, the local backend descriptor has no changes, we
// don't need to update the local server, and the blacklist doesn't need to be updated,
// then we can skip processing altogether and avoid making a copy of the state.
if (no_ss_update && !needs_local_be_update && !update_local_server
&& !needs_blacklist_maintenance) {
return;
}
if (!no_ss_update) VLOG(1) << "Processing statestore update";
if (needs_local_be_update) VLOG(1) << "Local backend membership needs update";
if (update_local_server) VLOG(1) << "Local impala server needs update";
if (needs_blacklist_maintenance) VLOG(1) << "Removing executors from the blacklist";
if (ss_is_recovering) {
VLOG(1) << "Statestore subscriber is in post-recovery grace period";
}
// By now we know that we need to renew the snapshot. Construct a new state based on the
// type of the update we received.
std::shared_ptr<Snapshot> new_state;
if (!update.is_delta) {
VLOG(1) << "Received full membership update";
// Full topic transmit, create fresh state.
new_state = std::make_shared<Snapshot>();
} else {
VLOG(1) << "Received delta membership update";
if (recovering_membership_.get() != nullptr) {
// The recovering membership is never exposed to clients and therefore requires no
// copying.
new_state = recovering_membership_;
} else {
// Make a copy of the current membership. This is the only function calling SetState
// and thus no lock is needed for read access.
new_state = std::make_shared<Snapshot>(*current_membership_);
}
}
if (local_be_desc.get() != nullptr) new_state->local_be_desc = local_be_desc;
new_state->version += 1;
// Process removed, new, and updated entries from the topic update and apply the changes
// to the new backend map and executor groups.
BackendIdMap* new_backend_map = &(new_state->current_backends);
ExecutorGroups* new_executor_groups = &(new_state->executor_groups);
ExecutorBlacklist* new_blacklist = &(new_state->executor_blacklist);
for (const TTopicItem& item : update.topic_entries) {
// Deleted item
if (item.deleted) {
if (new_backend_map->find(item.key) != new_backend_map->end()) {
const BackendDescriptorPB& be_desc = (*new_backend_map)[item.key];
bool blacklisted = new_blacklist->FindAndRemove(be_desc)
== ExecutorBlacklist::State::BLACKLISTED;
if (blacklisted) {
VLOG(1) << "Removing backend " << item.key << " from blacklist (deleted)";
DCHECK(!IsBackendInExecutorGroups(be_desc, *new_executor_groups));
}
// If the backend was quiescing or was previously blacklisted, it will already
// have been removed from 'executor_groups'.
if (be_desc.is_executor() && !be_desc.is_quiescing() && !blacklisted) {
for (const auto& group : be_desc.executor_groups()) {
VLOG(1) << "Removing backend " << item.key << " from group "
<< group.DebugString() << " (deleted)";
FindOrInsertExecutorGroup(
group, new_executor_groups)->RemoveExecutor(be_desc);
}
}
new_backend_map->erase(item.key);
}
continue;
}
// New or existing item
BackendDescriptorPB be_desc;
bool success = be_desc.ParseFromString(item.value);
if (!success) {
LOG_EVERY_N(WARNING, 30) << "Error deserializing membership topic item with key: "
<< item.key;
continue;
}
if (be_desc.ip_address().empty()) {
// Each backend resolves its own IP address and transmits it inside its backend
// descriptor as part of the statestore update. If it is empty, then either that
// code has been changed, or someone else is sending malformed packets.
LOG_EVERY_N(WARNING, 30) << "Ignoring subscription request with empty IP address "
<< "from subscriber: " << be_desc.address();
continue;
}
if (item.key == local_backend_id_) {
if (local_be_desc.get() == nullptr) {
LOG_EVERY_N(WARNING, 30) << "Another host registered itself with the local "
<< "backend id (" << item.key << "), but the local backend has not started "
<< "yet. The offending address is: " << be_desc.address();
} else if (be_desc.address() != local_be_desc->address()) {
// Someone else has registered this subscriber ID with a different address. We
// will try to re-register (i.e. overwrite their subscription), but there is
// likely a configuration problem.
LOG_EVERY_N(WARNING, 30) << "Duplicate subscriber registration from address: "
<< be_desc.address() << " (we are: " << local_be_desc->address()
<< ", backend id: " << item.key << ")";
}
// We will always set the local backend explicitly below, so we ignore it here.
continue;
}
auto it = new_backend_map->find(item.key);
if (it != new_backend_map->end()) {
// Update
BackendDescriptorPB& existing = it->second;
// Once a backend starts quiescing, it must stay in the quiescing state until it
// has been deleted from the cluster membership. Once a node starts quiescing, it
// can never transfer back to a running state.
if (existing.is_quiescing()) DCHECK(be_desc.is_quiescing());
// If the node starts quiescing
if (be_desc.is_quiescing() && !existing.is_quiescing() && existing.is_executor()) {
// If the backend starts quiescing and it is present in the blacklist, remove it
// from the blacklist. If the backend is present in the blacklist, there is no
// need to remove it from the executor group because it has already been removed
bool blacklisted = new_blacklist->FindAndRemove(be_desc)
== ExecutorBlacklist::State::BLACKLISTED;
if (blacklisted) {
VLOG(1) << "Removing backend " << item.key << " from blacklist (quiescing)";
DCHECK(!IsBackendInExecutorGroups(be_desc, *new_executor_groups));
} else {
// Executor needs to be removed from its groups
for (const auto& group : be_desc.executor_groups()) {
VLOG(1) << "Removing backend " << item.key << " from group "
<< group.DebugString() << " (quiescing)";
FindOrInsertExecutorGroup(group, new_executor_groups)
->RemoveExecutor(be_desc);
}
}
}
existing = be_desc;
} else {
// Create
new_backend_map->insert(make_pair(item.key, be_desc));
if (!be_desc.is_quiescing() && be_desc.is_executor()) {
for (const auto& group : be_desc.executor_groups()) {
VLOG(1) << "Adding backend " << item.key << " to group " << group.DebugString();
FindOrInsertExecutorGroup(group, new_executor_groups)->AddExecutor(be_desc);
}
}
// Since this backend is new, it cannot already be on the blacklist or probation.
DCHECK_EQ(new_blacklist->FindAndRemove(be_desc),
ExecutorBlacklist::State::NOT_BLACKLISTED);
}
DCHECK(CheckConsistency(*new_backend_map, *new_executor_groups, *new_blacklist));
}
if (needs_blacklist_maintenance) {
// Add any backends that were removed from the blacklist and put on probation back
// into 'executor_groups'.
std::list<BackendDescriptorPB> probation_list;
new_blacklist->Maintenance(&probation_list);
for (const BackendDescriptorPB& be_desc : probation_list) {
for (const auto& group : be_desc.executor_groups()) {
VLOG(1) << "Adding backend " << be_desc.address() << " to group "
<< group.DebugString() << " (passed blacklist timeout)";
FindOrInsertExecutorGroup(group, new_executor_groups)->AddExecutor(be_desc);
}
}
DCHECK(CheckConsistency(*new_backend_map, *new_executor_groups, *new_blacklist));
}
// Update the local backend descriptor if required. We need to re-check new_state here
// in case it was reset to empty above.
if (NeedsLocalBackendUpdate(*new_state, local_be_desc)) {
// We need to update both the new membership state and the statestore
(*new_backend_map)[local_backend_id_] = *local_be_desc;
for (const auto& group : local_be_desc->executor_groups()) {
if (local_be_desc->is_quiescing()) {
VLOG(1) << "Removing local backend from group " << group.DebugString();
FindOrInsertExecutorGroup(
group, new_executor_groups)->RemoveExecutor(*local_be_desc);
} else if (local_be_desc->is_executor()) {
VLOG(1) << "Adding local backend to group " << group.DebugString();
FindOrInsertExecutorGroup(
group, new_executor_groups)->AddExecutor(*local_be_desc);
}
}
AddLocalBackendToStatestore(*local_be_desc, subscriber_topic_updates);
DCHECK(CheckConsistency(*new_backend_map, *new_executor_groups, *new_blacklist));
}
// Don't send updates or update the current membership if the statestore is in its
// post-recovery grace period.
if (ss_is_recovering) {
recovering_membership_ = new_state;
return;
}
// Atomically update the respective membership snapshot and update metrics.
SetState(new_state);
// Send notifications to all callbacks registered to receive updates.
NotifyListeners(new_state);
recovering_membership_.reset();
}
void ClusterMembershipMgr::BlacklistExecutor(
const UniqueIdPB& backend_id, const Status& cause) {
DCHECK(!cause.ok());
if (!ExecutorBlacklist::BlacklistingEnabled()) return;
lock_guard<mutex> l(update_membership_lock_);
// Look up the descriptor in the current snapshot.
auto it = current_membership_->current_backends.find(PrintId(backend_id));
if (it == current_membership_->current_backends.end()) {
LOG(INFO) << "Did not blacklist " << PrintId(backend_id)
<< " because it was already removed from the cluster membership.";
return;
}
const BackendDescriptorPB& be_desc = it->second;
// Don't blacklist the local executor. Some queries may have root fragments that must be
// scheduled on the coordinator and will always fail if its blacklisted.
if (be_desc.ip_address() == current_membership_->local_be_desc->ip_address()
&& be_desc.address().port()
== current_membership_->local_be_desc->address().port()) {
return;
}
bool recovering = recovering_membership_.get() != nullptr;
const Snapshot* base_snapshot;
if (recovering) {
base_snapshot = recovering_membership_.get();
} else {
base_snapshot = current_membership_.get();
}
DCHECK(base_snapshot != nullptr);
// Check the Snapshot that we'll be updating to see if the backend is present, to avoid
// copying the Snapshot if it isn't.
bool exists = false;
for (const auto& group : be_desc.executor_groups()) {
auto it = base_snapshot->executor_groups.find(group.name());
if (it != base_snapshot->executor_groups.end()
&& it->second.LookUpBackendDesc(be_desc.address()) != nullptr) {
exists = true;
break;
}
}
if (!exists) {
// This backend does not exist in 'executor_groups', eg. because it was removed by
// a statestore update before the coordinator decided to blacklist it or because
// it is quiescing.
return;
}
LOG(INFO) << "Blacklisting " << be_desc.address() << ": " << cause;
std::shared_ptr<Snapshot> new_state;
if (recovering) {
// If the statestore is currently recovering, we can apply the blacklisting to
// 'recovering_membership_', which doesn't need to be copied.
new_state = recovering_membership_;
} else {
new_state = std::make_shared<Snapshot>(*current_membership_);
}
ExecutorGroups* new_executor_groups = &(new_state->executor_groups);
for (const auto& group : be_desc.executor_groups()) {
VLOG(1) << "Removing backend " << be_desc.address() << " from group "
<< group.DebugString() << " (blacklisted)";
FindOrInsertExecutorGroup(group, new_executor_groups)->RemoveExecutor(be_desc);
}
ExecutorBlacklist* new_blacklist = &(new_state->executor_blacklist);
new_blacklist->Blacklist(be_desc, cause);
// We'll call SetState() with 'recovering_membership_' once the statestore is no longer
// in recovery.
if (recovering) return;
// Note that we don't call the update functions here but only update metrics:
// - The update sent to the impala server is used to cancel queries on backends that
// are no longer present in 'current_backends', but we don't remove the executor from
// 'current_backends' here, since it always reflects the full statestore membership.
// This avoids cancelling queries that may still be running successfully, eg. if the
// backend is still up but got blacklisted due to a flaky network. If the backend
// really is down, we'll still cancel the queries when the statestore removes it from
// the membership.
// - The update sent to the admission controller is used to maintain a metric for each
// group having at least 1 executor that keeps track of the queries running on it. We
// can defer that to the statestore update and avoid unnecessary metric deletions due
// to flaky backends being blacklisted.
// - The update sent to frontend is used to notify the planner, but the executors the
// planner schedules things on is just a hint and the Scheduler will still see the
// updated membership and choose non-blacklisted executors regardless of what the
// planner says, so its fine to wait until the next topic update to notify the fe.
SetState(new_state);
UpdateMetrics(new_state);
}
void ClusterMembershipMgr::AddLocalBackendToStatestore(
const BackendDescriptorPB& local_be_desc,
vector<TTopicDelta>* subscriber_topic_updates) {
VLOG(1) << "Sending local backend to statestore";
subscriber_topic_updates->emplace_back(TTopicDelta());
TTopicDelta& update = subscriber_topic_updates->back();
update.topic_name = Statestore::IMPALA_MEMBERSHIP_TOPIC;
update.topic_entries.emplace_back(TTopicItem());
// Setting this flag allows us to pass the resulting topic update to other
// ClusterMembershipMgr instances in tests unmodified.
update.is_delta = true;
TTopicItem& item = update.topic_entries.back();
item.key = local_backend_id_;
bool success = local_be_desc.SerializeToString(&item.value);
if (!success) {
LOG(FATAL) << "Failed to serialize Impala backend descriptor for statestore topic.";
subscriber_topic_updates->pop_back();
return;
}
}
ClusterMembershipMgr::BeDescSharedPtr ClusterMembershipMgr::GetLocalBackendDescriptor() {
lock_guard<mutex> l(callback_fn_lock_);
return local_be_desc_fn_ ? local_be_desc_fn_() : nullptr;
}
void ClusterMembershipMgr::NotifyListeners(SnapshotPtr snapshot) {
lock_guard<mutex> l(callback_fn_lock_);
for (auto fn : update_callback_fns_) fn(snapshot);
}
void ClusterMembershipMgr::SetState(const SnapshotPtr& new_state) {
lock_guard<mutex> l(current_membership_lock_);
DCHECK(new_state.get() != nullptr);
current_membership_ = new_state;
}
bool ClusterMembershipMgr::NeedsLocalBackendUpdate(const Snapshot& state,
const BeDescSharedPtr& local_be_desc) {
if (local_be_desc.get() == nullptr) return false;
if (state.local_be_desc.get() == nullptr) return true;
auto it = state.current_backends.find(local_backend_id_);
if (it == state.current_backends.end()) return true;
return it->second.is_quiescing() != local_be_desc->is_quiescing();
}
bool ClusterMembershipMgr::CheckConsistency(const BackendIdMap& current_backends,
const ExecutorGroups& executor_groups, const ExecutorBlacklist& executor_blacklist) {
// Build a map of all backend descriptors
std::unordered_map<NetworkAddressPB, BackendDescriptorPB> address_to_backend;
for (const auto& it : current_backends) {
address_to_backend.emplace(it.second.address(), it.second);
}
// Check groups against the map
for (const auto& group_it : executor_groups) {
const string& group_name = group_it.first;
const ExecutorGroup& group = group_it.second;
ExecutorGroup::Executors backends = group.GetAllExecutorDescriptors();
for (const BackendDescriptorPB& group_be : backends) {
if (!group_be.is_executor()) {
LOG(WARNING) << "Backend " << group_be.DebugString() << " in group " << group_name
<< " is not an executor";
return false;
}
if (group_be.is_quiescing()) {
LOG(WARNING) << "Backend " << group_be.DebugString() << " in group " << group_name
<< " is quiescing";
return false;
}
auto current_be_it = address_to_backend.find(group_be.address());
if (current_be_it == address_to_backend.end()) {
LOG(WARNING) << "Backend " << group_be.DebugString() << " is in group "
<< group_name << " but not in current set of backends";
return false;
}
if (current_be_it->second.is_quiescing() != group_be.is_quiescing()) {
LOG(WARNING) << "Backend " << group_be.DebugString() << " in group " << group_name
<< " differs from backend in current set of backends: is_quiescing ("
<< current_be_it->second.is_quiescing() << " != " << group_be.is_quiescing()
<< ")";
return false;
}
if (current_be_it->second.is_executor() != group_be.is_executor()) {
LOG(WARNING) << "Backend " << group_be.DebugString() << " in group " << group_name
<< " differs from backend in current set of backends: is_executor ("
<< current_be_it->second.is_executor() << " != " << group_be.is_executor()
<< ")";
return false;
}
if (executor_blacklist.IsBlacklisted(group_be)) {
LOG(WARNING) << "Backend " << group_be.DebugString() << " in group " << group_name
<< " is blacklisted.";
return false;
}
}
}
return true;
}
void ClusterMembershipMgr::UpdateMetrics(const SnapshotPtr& new_state){
int64_t total_live_executor_groups = 0;
int64_t healthy_executor_groups = 0;
for (const auto& group_it : new_state->executor_groups) {
const ExecutorGroup& group = group_it.second;
if (group.IsHealthy()) {
++healthy_executor_groups;
++total_live_executor_groups;
} else if (group.NumHosts() > 0) {
++total_live_executor_groups;
}
}
DCHECK_GE(total_live_executor_groups, healthy_executor_groups);
aggregated_group_set_metrics_.total_live_executor_groups_->SetValue(
total_live_executor_groups);
aggregated_group_set_metrics_.total_healthy_executor_groups_->SetValue(
healthy_executor_groups);
aggregated_group_set_metrics_.total_backends_->SetValue(
new_state->current_backends.size());
for (auto& set : expected_exec_group_sets_) {
int total_backends = 0;
int64_t total_live_exec_groups = 0;
int64_t healthy_exec_groups = 0;
StringPiece prefix(set.exec_group_name_prefix);
for (const auto& group_it : new_state->executor_groups) {
StringPiece name(group_it.first);
if (!name.starts_with(prefix)) continue;
const ExecutorGroup& group = group_it.second;
if (group.IsHealthy()) {
++healthy_exec_groups;
}
if (group.NumHosts() > 0) {
++total_live_exec_groups;
total_backends += group.NumExecutors();
}
}
auto& grp_metrics = per_group_set_metrics_[set.exec_group_name_prefix];
grp_metrics.total_live_executor_groups_->SetValue(total_live_exec_groups);
grp_metrics.total_healthy_executor_groups_->SetValue(healthy_exec_groups);
grp_metrics.total_backends_->SetValue(total_backends);
}
}
bool ClusterMembershipMgr::IsBackendInExecutorGroups(
const BackendDescriptorPB& be_desc, const ExecutorGroups& executor_groups) {
for (const auto& executor_group : executor_groups) {
if (executor_group.second.LookUpBackendDesc(be_desc.address()) != nullptr) {
return true;
}
}
return false;
}
/// For the default executor group, we assume that local reads are preferred and will
/// include the hostnames and IP addresses in the update to the frontend. For non-default
/// executor groups, we assume that we will read data remotely and will only send the
/// number of executors in the largest healthy group. When expected exec group sets are
/// specified we apply the aforementioned steps for each group set.
void PopulateExecutorMembershipRequest(ClusterMembershipMgr::SnapshotPtr& snapshot,
const vector<TExecutorGroupSet>& expected_exec_group_sets,
TUpdateExecutorMembershipRequest& update_req) {
vector<TExecutorGroupSet> exec_group_sets;
auto default_it =
snapshot->executor_groups.find(ImpalaServer::DEFAULT_EXECUTOR_GROUP_NAME);
if (default_it != snapshot->executor_groups.end()) {
exec_group_sets.emplace_back();
exec_group_sets.back().__set_expected_num_executors(FLAGS_num_expected_executors);
const ExecutorGroup* group = &(default_it->second);
for (const auto& backend : group->GetAllExecutorDescriptors()) {
if (backend.is_executor()) {
update_req.hostnames.insert(backend.address().hostname());
update_req.ip_addresses.insert(backend.ip_address());
exec_group_sets.back().curr_num_executors++;
}
}
} else {
if (expected_exec_group_sets.empty()) {
// Add a default exec group set if no expected group sets were specified.
exec_group_sets.emplace_back();
exec_group_sets.back().__set_expected_num_executors(FLAGS_num_expected_executors);
} else {
exec_group_sets.insert(exec_group_sets.begin(), expected_exec_group_sets.begin(),
expected_exec_group_sets.end());
}
int matching_exec_groups_found = 0;
for (auto& set : exec_group_sets) {
int max_num_executors = -1;
StringPiece prefix(set.exec_group_name_prefix);
DCHECK(!prefix.empty() || exec_group_sets.size() == 1)
<< "An empty group set prefix can only exist if no executor group sets are "
"specified";
for (const auto& it : snapshot->executor_groups) {
StringPiece name(it.first);
if (!prefix.empty() && !name.starts_with(prefix)) continue;
matching_exec_groups_found++;
if (!it.second.IsHealthy()) continue;
int num_executors = it.second.NumExecutors();
if (num_executors > max_num_executors) {
max_num_executors = num_executors;
set.curr_num_executors = num_executors;
}
}
}
if (matching_exec_groups_found != snapshot->executor_groups.size()) {
vector<string> group_sets;
for (const auto& set : exec_group_sets) {
group_sets.push_back(set.exec_group_name_prefix);
}
vector<string> group_names;
for (const auto& it : snapshot->executor_groups) {
group_names.push_back(it.first);
}
LOG(WARNING) << "Some executor groups either do not match expected group sets or "
"match to more than one set. Expected group sets: "
<< boost::algorithm::join(group_sets, ",") << " Current executor groups: "
<< boost::algorithm::join(group_names, ",");
}
}
update_req.__set_exec_group_sets(exec_group_sets);
}
Status ClusterMembershipMgr::PopulateExpectedExecGroupSets(
std::vector<TExecutorGroupSet>& expected_exec_group_sets) {
expected_exec_group_sets.clear();
std::unordered_set<string> parsed_group_prefixes;
vector<StringPiece> groups;
groups = strings::Split(FLAGS_expected_executor_group_sets, ",", strings::SkipEmpty());
if (groups.empty()) return Status::OK();
// Name and expected group size are separated by ':'.
for (const StringPiece& group : groups) {
int colon_idx = group.find_first_of(':');
string group_prefix = group.substr(0, colon_idx).as_string();
if (group_prefix.empty()) {
return Status(Substitute(
"Executor group set prefix cannot be empty for input: $0", group.ToString()));
}
if (parsed_group_prefixes.find(group_prefix) != parsed_group_prefixes.end()) {
return Status(Substitute(
"Executor group set prefix specified multiple times: $0", group.ToString()));
}
if (colon_idx != StringPiece::npos) {
StringParser::ParseResult result;
int64_t expected_num_executors = StringParser::StringToInt<int64_t>(
group.data() + colon_idx + 1, group.length() - colon_idx - 1, &result);
if (result != StringParser::PARSE_SUCCESS) {
return Status(
Substitute("Failed to parse expected executor group set size for input: $0",
group.ToString()));
}
expected_exec_group_sets.emplace_back();
expected_exec_group_sets.back().__set_exec_group_name_prefix(group_prefix);
expected_exec_group_sets.back().__set_expected_num_executors(
expected_num_executors);
parsed_group_prefixes.insert(group_prefix);
} else {
return Status(
Substitute("Invalid executor group set format: $0", group.ToString()));
}
}
// sort by increasing order expected group size.
sort(expected_exec_group_sets.begin(), expected_exec_group_sets.end(),
[](const TExecutorGroupSet& first, const TExecutorGroupSet& second) {
return first.expected_num_executors < second.expected_num_executors;
});
return Status::OK();
}
} // end namespace impala
|
#include <nano/boost/process/child.hpp>
#include <nano/lib/signal_manager.hpp>
#include <nano/lib/threading.hpp>
#include <nano/lib/tlsconfig.hpp>
#include <nano/lib/utility.hpp>
#include <nano/nano_node/daemon.hpp>
#include <nano/node/cli.hpp>
#include <nano/node/daemonconfig.hpp>
#include <nano/node/ipc/ipc_server.hpp>
#include <nano/node/json_handler.hpp>
#include <nano/node/node.hpp>
#include <nano/node/openclwork.hpp>
#include <nano/rpc/rpc.hpp>
#include <boost/format.hpp>
#include <csignal>
#include <iostream>
namespace
{
void nano_abort_signal_handler (int signum)
{
// remove `signum` from signal handling when under Windows
#ifdef _WIN32
std::signal (signum, SIG_DFL);
#endif
// create some debugging log files
nano::dump_crash_stacktrace ();
nano::create_load_memory_address_files ();
// re-raise signal to call the default handler and exit
raise (signum);
}
void install_abort_signal_handler ()
{
// We catch signal SIGSEGV and SIGABRT not via the signal manager because we want these signal handlers
// to be executed in the stack of the code that caused the signal, so we can dump the stacktrace.
#ifdef _WIN32
std::signal (SIGSEGV, nano_abort_signal_handler);
std::signal (SIGABRT, nano_abort_signal_handler);
#else
struct sigaction sa = {};
sa.sa_handler = nano_abort_signal_handler;
sigemptyset (&sa.sa_mask);
sa.sa_flags = SA_RESETHAND;
sigaction (SIGSEGV, &sa, NULL);
sigaction (SIGABRT, &sa, NULL);
#endif
}
volatile sig_atomic_t sig_int_or_term = 0;
constexpr std::size_t OPEN_FILE_DESCRIPTORS_LIMIT = 16384;
}
static void load_and_set_bandwidth_params (std::shared_ptr<nano::node> const & node, boost::filesystem::path const & data_path, nano::node_flags const & flags)
{
nano::daemon_config config{ data_path, node->network_params };
auto error = nano::read_node_config_toml (data_path, config, flags.config_overrides);
if (!error)
{
error = nano::flags_config_conflicts (flags, config.node);
if (!error)
{
node->set_bandwidth_params (config.node.bandwidth_limit, config.node.bandwidth_limit_burst_ratio);
}
}
}
void nano_daemon::daemon::run (boost::filesystem::path const & data_path, nano::node_flags const & flags)
{
install_abort_signal_handler ();
boost::filesystem::create_directories (data_path);
boost::system::error_code error_chmod;
nano::set_secure_perm_directory (data_path, error_chmod);
std::unique_ptr<nano::thread_runner> runner;
nano::network_params network_params{ nano::network_constants::active_network };
nano::daemon_config config{ data_path, network_params };
auto error = nano::read_node_config_toml (data_path, config, flags.config_overrides);
nano::set_use_memory_pools (config.node.use_memory_pools);
if (!error)
{
error = nano::flags_config_conflicts (flags, config.node);
}
if (!error)
{
config.node.logging.init (data_path);
nano::logger_mt logger{ config.node.logging.min_time_between_log_output };
auto tls_config (std::make_shared<nano::tls_config> ());
error = nano::read_tls_config_toml (data_path, *tls_config, logger);
if (error)
{
std::cerr << error.get_message () << std::endl;
std::exit (1);
}
else
{
config.node.websocket_config.tls_config = tls_config;
}
boost::asio::io_context io_ctx;
auto opencl (nano::opencl_work::create (config.opencl_enable, config.opencl, logger, config.node.network_params.work));
nano::work_pool opencl_work (config.node.network_params.network, config.node.work_threads, config.node.pow_sleep_interval, opencl ? [&opencl] (nano::work_version const version_a, nano::root const & root_a, uint64_t difficulty_a, std::atomic<int> & ticket_a) {
return opencl->generate_work (version_a, root_a, difficulty_a, ticket_a);
}
: std::function<boost::optional<uint64_t> (nano::work_version const, nano::root const &, uint64_t, std::atomic<int> &)> (nullptr));
try
{
// This avoid a blank prompt during any node initialization delays
auto initialization_text = "Starting up Nano node...";
std::cout << initialization_text << std::endl;
logger.always_log (initialization_text);
nano::set_file_descriptor_limit (OPEN_FILE_DESCRIPTORS_LIMIT);
auto const file_descriptor_limit = nano::get_file_descriptor_limit ();
if (file_descriptor_limit < OPEN_FILE_DESCRIPTORS_LIMIT)
{
logger.always_log (boost::format ("WARNING: open file descriptors limit is %1%, lower than the %2% recommended. Node was unable to change it.") % file_descriptor_limit % OPEN_FILE_DESCRIPTORS_LIMIT);
}
else
{
logger.always_log (boost::format ("Open file descriptors limit is %1%") % file_descriptor_limit);
}
auto node (std::make_shared<nano::node> (io_ctx, data_path, config.node, opencl_work, flags));
if (!node->init_error ())
{
auto network_label = node->network_params.network.get_current_network_as_string ();
std::cout << "Network: " << network_label << ", version: " << NANO_VERSION_STRING << "\n"
<< "Path: " << node->application_path.string () << "\n"
<< "Build Info: " << BUILD_INFO << "\n"
<< "Database backend: " << node->store.vendor_get () << std::endl;
auto voting (node->wallets.reps ().voting);
if (voting > 1)
{
std::cout << "Voting with more than one representative can limit performance: " << voting << " representatives are configured" << std::endl;
}
node->start ();
nano::ipc::ipc_server ipc_server (*node, config.rpc);
std::unique_ptr<boost::process::child> rpc_process;
std::unique_ptr<boost::process::child> nano_pow_server_process;
/*if (config.pow_server.enable)
{
if (!boost::filesystem::exists (config.pow_server.pow_server_path))
{
std::cerr << std::string ("nano_pow_server is configured to start as a child process, however the file cannot be found at: ") + config.pow_server.pow_server_path << std::endl;
std::exit (1);
}
nano_pow_server_process = std::make_unique<boost::process::child> (config.pow_server.pow_server_path, "--config_path", data_path / "config-nano-pow-server.toml");
}*/
std::unique_ptr<nano::rpc> rpc;
std::unique_ptr<nano::rpc_handler_interface> rpc_handler;
if (config.rpc_enable)
{
if (!config.rpc.child_process.enable)
{
// Launch rpc in-process
nano::rpc_config rpc_config{ config.node.network_params.network };
auto error = nano::read_rpc_config_toml (data_path, rpc_config, flags.rpc_config_overrides);
if (error)
{
std::cout << error.get_message () << std::endl;
std::exit (1);
}
rpc_config.tls_config = tls_config;
rpc_handler = std::make_unique<nano::inprocess_rpc_handler> (*node, ipc_server, config.rpc, [&ipc_server, &workers = node->workers, &io_ctx] () {
ipc_server.stop ();
workers.add_timed_task (std::chrono::steady_clock::now () + std::chrono::seconds (3), [&io_ctx] () {
io_ctx.stop ();
});
});
rpc = nano::get_rpc (io_ctx, rpc_config, *rpc_handler);
rpc->start ();
}
else
{
// Spawn a child rpc process
if (!boost::filesystem::exists (config.rpc.child_process.rpc_path))
{
throw std::runtime_error (std::string ("RPC is configured to spawn a new process however the file cannot be found at: ") + config.rpc.child_process.rpc_path);
}
auto network = node->network_params.network.get_current_network_as_string ();
rpc_process = std::make_unique<boost::process::child> (config.rpc.child_process.rpc_path, "--daemon", "--data_path", data_path, "--network", network);
}
}
debug_assert (!nano::signal_handler_impl);
nano::signal_handler_impl = [&io_ctx] () {
io_ctx.stop ();
sig_int_or_term = 1;
};
nano::signal_manager sigman;
// keep trapping Ctrl-C to avoid a second Ctrl-C interrupting tasks started by the first
sigman.register_signal_handler (SIGINT, &nano::signal_handler, true);
// sigterm is less likely to come in bunches so only trap it once
sigman.register_signal_handler (SIGTERM, &nano::signal_handler, false);
#ifndef _WIN32
// on sighup we should reload the bandwidth parameters
std::function<void (int)> sighup_signal_handler ([&node, &data_path, &flags] (int signum) {
debug_assert (signum == SIGHUP);
load_and_set_bandwidth_params (node, data_path, flags);
});
sigman.register_signal_handler (SIGHUP, sighup_signal_handler, true);
#endif
runner = std::make_unique<nano::thread_runner> (io_ctx, node->config.io_threads);
runner->join ();
if (sig_int_or_term == 1)
{
ipc_server.stop ();
node->stop ();
if (rpc)
{
rpc->stop ();
}
}
if (rpc_process)
{
rpc_process->wait ();
}
}
else
{
std::cerr << "Error initializing node\n";
}
}
catch (std::runtime_error const & e)
{
std::cerr << "Error while running node (" << e.what () << ")\n";
}
}
else
{
std::cerr << "Error deserializing config: " << error.get_message () << std::endl;
}
}
|
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
class Person {
public:
// Строки не передаются по ссылке намерено, вместо этого используется функция
// move(). В некоторых ситуациях она позволяет избежать излишнего копирования.
explicit Person(string name, string type = "Person")
: type_(move(type)),
name_(move(name)) {}
virtual void Walk(const string& destination) const {
PrintAction("walks to", destination);
}
// [[nodiscard]] означает, что НЕЛЬЗЯ вызвать этот метод не использовав
// возвращаемое функцией значение.
[[nodiscard]]
string Name() const { return name_; }
[[nodiscard]]
string Type() const { return type_; }
protected:
// Все классы выводили почти однотипные фразы, я решил обобщить их, таким
// образом уменьшив повторения кода.
void PrintAction(const string& action, const string& detail = "") const {
cout << type_ << ": " << name_ << " " << action;
if (!detail.empty()) {
cout << ": " << detail;
}
cout << endl;
}
const string type_;
string name_;
};
class Student : public Person {
public:
Student(string name, string favourite_song)
: Person(move(name), "Student"),
favourite_song_(move(favourite_song)) {}
void Learn() const { PrintAction("learns"); }
void Walk(const string& destination) const override {
// Студент во время прогулки поет свою любимую песню,
// по этому пришлось переопределить для него этот метод
Person::Walk(destination);
SingSong();
}
void SingSong() const { PrintAction("sings a song", favourite_song_); }
private:
string favourite_song_;
};
class Teacher : public Person {
public:
Teacher(string name, string subject)
: Person(move(name), "Teacher"),
subject_(move(subject)) {}
void Teach() const { PrintAction("teaches", subject_); }
// Teacher имеет метод Walk(), т.к. наследует его от класса Person
private:
string subject_;
};
class Policeman : public Person {
public:
explicit Policeman(string name)
: Person(move(name), "Policeman") {}
void Check(const Person& p) const {
PrintAction("checks " + p.Type() + ". " + p.Type() + "'s name is",
p.Name());
}
// Policeman имеет метод Walk(), т.к. наследует его от класса Person
};
void VisitPlaces(const Person& person, const vector<string>& places) {
for (const auto& p : places) {
person.Walk(p);
}
}
int main() {
Teacher t("Jim", "Math");
Student s("Ann", "We will rock you");
Policeman p("Bob");
VisitPlaces(t, {"Moscow", "London"});
p.Check(s);
VisitPlaces(s, {"Moscow", "London"});
}
|
#include "CurveskelModel.h"
#include "CurveskelQForEach.h"
#include "StarlabException.h"
using namespace std;
using namespace CurveskelTypes;
CurveskelModel::CurveskelModel(QString path, QString name) : Model(path,name){}
void CurveskelModel::updateBoundingBox(){
Vector3VertexProperty vcoord = get_vertex_property<Vector3>(VCOORD);
_bbox.setNull();
foreach(Vertex v, this->vertices())
_bbox = _bbox.merged( Eigen::AlignedBox3d( Eigen::Vector3d(vcoord[v]) ) );
}
CurveskelForEachEdgeHelper CurveskelModel::edges(){
return CurveskelForEachEdgeHelper(this);
}
std::set<Vertex> CurveskelModel::junctions()
{
std::set<Vertex> j;
foreach(Vertex v, this->vertices())
if(this->valence(v) > 2)
j.insert(v);
return j;
}
CurveskelForEachVertexHelper CurveskelModel::vertices(){
return CurveskelForEachVertexHelper(this);
}
std::set<Vertex> CurveskelTypes::CurveskelModel::adjacent_set( Vertex v )
{
std::set<Vertex> adj;
Edge_around_vertex e(this, v), eend = e;
while(!e.end())
{
(v == this->vertex(e, 0)) ? adj.insert(this->vertex(e, 1)) : adj.insert(this->vertex(e, 0));
++e;
}
return adj;
}
Vertex CurveskelTypes::CurveskelModel::other_vertex( Edge e, Vertex v )
{
return (v == this->vertex(e, 0)) ? this->vertex(e, 1) : this->vertex(e, 0);
}
// Explicit Template Instantiation
template class WingedgeMesh <double, CurveskelTypes::SkelVector<double,3> >;
|
#include "AudioController.hpp"
namespace crunch
{
AudioController::AudioController()
{
}
} //namespace crunch
|
/* <editor-fold desc="MIT License">
Copyright(c) 2018 Robert Osfield
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.
</editor-fold> */
#include <vsg/threading/OperationQueue.h>
using namespace vsg;
OperationQueue::OperationQueue(ref_ptr<Active> in_active) :
_active(in_active)
{
}
ref_ptr<Operation> OperationQueue::take()
{
std::unique_lock lock(_mutex);
if (_queue.empty()) return {};
ref_ptr<Operation> operation = _queue.front();
_queue.erase(_queue.begin());
return operation;
}
ref_ptr<Operation> OperationQueue::take_when_avilable()
{
std::chrono::duration waitDuration = std::chrono::milliseconds(100);
std::unique_lock lock(_mutex);
// wait to the conditional variable signals that an operation has been added
while (_queue.empty() && *_active)
{
//std::cout<<"Waiting on condition variable"<<std::endl;
_cv.wait_for(lock, waitDuration);
}
// if the threads we are associated with should no longer running go for a quick exit and return nothing.
if (!*_active)
{
return {};
}
// remove and return the head of the queue
ref_ptr<Operation> operation = _queue.front();
_queue.erase(_queue.begin());
return operation;
}
|
/**
* Copyright (C) 2013 10gen Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, the copyright holders give permission to link the
* code of portions of this program with the OpenSSL library under certain
* conditions as described in each individual source file and distribute
* linked combinations including the program with the OpenSSL library. You
* must comply with the GNU Affero General Public License in all respects for
* all of the code used other than as permitted herein. If you modify file(s)
* with this exception, you may extend this exception to your version of the
* file(s), but you are not obligated to do so. If you do not wish to do so,
* delete this exception statement from your version. If you delete this
* exception statement from all source files in the program, then also delete
* it in the license file.
*/
#include "mongo/db/audit.h"
#if !PERCONA_AUDIT_ENABLED
void mongo::audit::logAuthentication(Client* client,
StringData mechanism,
const UserName& user,
ErrorCodes::Error result) {}
void mongo::audit::logCommandAuthzCheck(Client* client,
const OpMsgRequest& cmdObj,
const CommandInterface& command,
ErrorCodes::Error result) {}
void mongo::audit::logDeleteAuthzCheck(Client* client,
const NamespaceString& ns,
const BSONObj& pattern,
ErrorCodes::Error result) {}
void mongo::audit::logGetMoreAuthzCheck(Client* client,
const NamespaceString& ns,
long long cursorId,
ErrorCodes::Error result) {}
void mongo::audit::logInsertAuthzCheck(Client* client,
const NamespaceString& ns,
const BSONObj& insertedObj,
ErrorCodes::Error result) {}
void mongo::audit::logKillCursorsAuthzCheck(Client* client,
const NamespaceString& ns,
long long cursorId,
ErrorCodes::Error result) {}
void mongo::audit::logQueryAuthzCheck(Client* client,
const NamespaceString& ns,
const BSONObj& query,
ErrorCodes::Error result) {}
void mongo::audit::logUpdateAuthzCheck(Client* client,
const NamespaceString& ns,
const BSONObj& query,
const BSONObj& updateObj,
bool isUpsert,
bool isMulti,
ErrorCodes::Error result) {}
void mongo::audit::logCreateUser(Client* client,
const UserName& username,
bool password,
const BSONObj* customData,
const std::vector<RoleName>& roles,
const boost::optional<BSONArray>& restrictions) {}
void mongo::audit::logDropUser(Client* client, const UserName& username) {}
void mongo::audit::logDropAllUsersFromDatabase(Client* client, StringData dbname) {}
void mongo::audit::logUpdateUser(Client* client,
const UserName& username,
bool password,
const BSONObj* customData,
const std::vector<RoleName>* roles,
const boost::optional<BSONArray>& restrictions) {}
void mongo::audit::logGrantRolesToUser(Client* client,
const UserName& username,
const std::vector<RoleName>& roles) {}
void mongo::audit::logRevokeRolesFromUser(Client* client,
const UserName& username,
const std::vector<RoleName>& roles) {}
void mongo::audit::logCreateRole(Client* client,
const RoleName& role,
const std::vector<RoleName>& roles,
const PrivilegeVector& privileges,
const boost::optional<BSONArray>& restrictions) {}
void mongo::audit::logUpdateRole(Client* client,
const RoleName& role,
const std::vector<RoleName>* roles,
const PrivilegeVector* privileges,
const boost::optional<BSONArray>& restrictions) {}
void mongo::audit::logDropRole(Client* client, const RoleName& role) {}
void mongo::audit::logDropAllRolesFromDatabase(Client* client, StringData dbname) {}
void mongo::audit::logGrantRolesToRole(Client* client,
const RoleName& role,
const std::vector<RoleName>& roles) {}
void mongo::audit::logRevokeRolesFromRole(Client* client,
const RoleName& role,
const std::vector<RoleName>& roles) {}
void mongo::audit::logGrantPrivilegesToRole(Client* client,
const RoleName& role,
const PrivilegeVector& privileges) {}
void mongo::audit::logRevokePrivilegesFromRole(Client* client,
const RoleName& role,
const PrivilegeVector& privileges) {}
void mongo::audit::logReplSetReconfig(Client* client,
const BSONObj* oldConfig,
const BSONObj* newConfig) {}
void mongo::audit::logApplicationMessage(Client* client, StringData msg) {}
void mongo::audit::logShutdown(Client* client) {}
void mongo::audit::logCreateIndex(Client* client,
const BSONObj* indexSpec,
StringData indexname,
StringData nsname) {}
void mongo::audit::logCreateCollection(Client* client, StringData nsname) {}
void mongo::audit::logCreateDatabase(Client* client, StringData dbname) {}
void mongo::audit::logDropIndex(Client* client, StringData indexname, StringData nsname) {}
void mongo::audit::logDropCollection(Client* client, StringData nsname) {}
void mongo::audit::logDropDatabase(Client* client, StringData dbname) {}
void mongo::audit::logRenameCollection(Client* client, StringData source, StringData target) {}
void mongo::audit::logEnableSharding(Client* client, StringData dbname) {}
void mongo::audit::logAddShard(Client* client,
StringData name,
const std::string& servers,
long long maxSize) {}
void mongo::audit::logRemoveShard(Client* client, StringData shardname) {}
void mongo::audit::logShardCollection(Client* client,
StringData ns,
const BSONObj& keyPattern,
bool unique) {}
void mongo::audit::writeImpersonatedUsersToMetadata(OperationContext* opCtx,
BSONObjBuilder* metadata) {}
#endif
|
/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "modules/audio_processing/audio_buffer.h"
#include <string.h>
#include <cstdint>
#include "common_audio/channel_buffer.h"
#include "common_audio/include/audio_util.h"
#include "common_audio/resampler/push_sinc_resampler.h"
#include "modules/audio_processing/splitting_filter.h"
#include "rtc_base/checks.h"
namespace webrtc {
namespace {
constexpr size_t kSamplesPer32kHzChannel = 320;
constexpr size_t kSamplesPer48kHzChannel = 480;
constexpr size_t kMaxSamplesPerChannel = AudioBuffer::kMaxSampleRate / 100;
size_t NumBandsFromFramesPerChannel(size_t num_frames) {
if (num_frames == kSamplesPer32kHzChannel) {
return 2;
}
if (num_frames == kSamplesPer48kHzChannel) {
return 3;
}
return 1;
}
} // namespace
AudioBuffer::AudioBuffer(size_t input_rate,
size_t input_num_channels,
size_t buffer_rate,
size_t buffer_num_channels,
size_t output_rate,
size_t output_num_channels)
: AudioBuffer(static_cast<int>(input_rate) / 100,
input_num_channels,
static_cast<int>(buffer_rate) / 100,
buffer_num_channels,
static_cast<int>(output_rate) / 100) {}
AudioBuffer::AudioBuffer(size_t input_num_frames,
size_t input_num_channels,
size_t buffer_num_frames,
size_t buffer_num_channels,
size_t output_num_frames)
: input_num_frames_(input_num_frames),
input_num_channels_(input_num_channels),
buffer_num_frames_(buffer_num_frames),
buffer_num_channels_(buffer_num_channels),
output_num_frames_(output_num_frames),
output_num_channels_(0),
num_channels_(buffer_num_channels),
num_bands_(NumBandsFromFramesPerChannel(buffer_num_frames_)),
num_split_frames_(rtc::CheckedDivExact(buffer_num_frames_, num_bands_)),
data_(
new ChannelBuffer<float>(buffer_num_frames_, buffer_num_channels_)) {
RTC_DCHECK_GT(input_num_frames_, 0);
RTC_DCHECK_GT(buffer_num_frames_, 0);
RTC_DCHECK_GT(output_num_frames_, 0);
RTC_DCHECK_GT(input_num_channels_, 0);
RTC_DCHECK_GT(buffer_num_channels_, 0);
RTC_DCHECK_LE(buffer_num_channels_, input_num_channels_);
const bool input_resampling_needed = input_num_frames_ != buffer_num_frames_;
const bool output_resampling_needed =
output_num_frames_ != buffer_num_frames_;
if (input_resampling_needed) {
for (size_t i = 0; i < buffer_num_channels_; ++i) {
input_resamplers_.push_back(std::unique_ptr<PushSincResampler>(
new PushSincResampler(input_num_frames_, buffer_num_frames_)));
}
}
if (output_resampling_needed) {
for (size_t i = 0; i < buffer_num_channels_; ++i) {
output_resamplers_.push_back(std::unique_ptr<PushSincResampler>(
new PushSincResampler(buffer_num_frames_, output_num_frames_)));
}
}
if (num_bands_ > 1) {
split_data_.reset(new ChannelBuffer<float>(
buffer_num_frames_, buffer_num_channels_, num_bands_));
splitting_filter_.reset(new SplittingFilter(
buffer_num_channels_, num_bands_, buffer_num_frames_));
}
}
AudioBuffer::~AudioBuffer() {}
void AudioBuffer::set_downmixing_to_specific_channel(size_t channel) {
downmix_by_averaging_ = false;
RTC_DCHECK_GT(input_num_channels_, channel);
channel_for_downmixing_ = std::min(channel, input_num_channels_ - 1);
}
void AudioBuffer::set_downmixing_by_averaging() {
downmix_by_averaging_ = true;
}
void AudioBuffer::CopyFrom(const float* const* stacked_data,
const StreamConfig& stream_config) {
RTC_DCHECK_EQ(stream_config.num_frames(), input_num_frames_);
RTC_DCHECK_EQ(stream_config.num_channels(), input_num_channels_);
RestoreNumChannels();
const bool downmix_needed = input_num_channels_ > 1 && num_channels_ == 1;
const bool resampling_needed = input_num_frames_ != buffer_num_frames_;
if (downmix_needed) {
RTC_DCHECK_GE(kMaxSamplesPerChannel, input_num_frames_);
std::array<float, kMaxSamplesPerChannel> downmix;
if (downmix_by_averaging_) {
const float kOneByNumChannels = 1.f / input_num_channels_;
for (size_t i = 0; i < input_num_frames_; ++i) {
float value = stacked_data[0][i];
for (size_t j = 1; j < input_num_channels_; ++j) {
value += stacked_data[j][i];
}
downmix[i] = value * kOneByNumChannels;
}
}
const float* downmixed_data = downmix_by_averaging_
? downmix.data()
: stacked_data[channel_for_downmixing_];
if (resampling_needed) {
input_resamplers_[0]->Resample(downmixed_data, input_num_frames_,
data_->channels()[0], buffer_num_frames_);
}
const float* data_to_convert =
resampling_needed ? data_->channels()[0] : downmixed_data;
FloatToFloatS16(data_to_convert, buffer_num_frames_, data_->channels()[0]);
} else {
if (resampling_needed) {
for (size_t i = 0; i < num_channels_; ++i) {
input_resamplers_[i]->Resample(stacked_data[i], input_num_frames_,
data_->channels()[i],
buffer_num_frames_);
FloatToFloatS16(data_->channels()[i], buffer_num_frames_,
data_->channels()[i]);
}
} else {
for (size_t i = 0; i < num_channels_; ++i) {
FloatToFloatS16(stacked_data[i], buffer_num_frames_,
data_->channels()[i]);
}
}
}
}
void AudioBuffer::CopyTo(const StreamConfig& stream_config,
float* const* stacked_data) {
RTC_DCHECK_EQ(stream_config.num_frames(), output_num_frames_);
const bool resampling_needed = output_num_frames_ != buffer_num_frames_;
if (resampling_needed) {
for (size_t i = 0; i < num_channels_; ++i) {
FloatS16ToFloat(data_->channels()[i], buffer_num_frames_,
data_->channels()[i]);
output_resamplers_[i]->Resample(data_->channels()[i], buffer_num_frames_,
stacked_data[i], output_num_frames_);
}
} else {
for (size_t i = 0; i < num_channels_; ++i) {
FloatS16ToFloat(data_->channels()[i], buffer_num_frames_,
stacked_data[i]);
}
}
for (size_t i = num_channels_; i < stream_config.num_channels(); ++i) {
memcpy(stacked_data[i], stacked_data[0],
output_num_frames_ * sizeof(**stacked_data));
}
}
void AudioBuffer::CopyTo(AudioBuffer* buffer) const {
RTC_DCHECK_EQ(buffer->num_frames(), output_num_frames_);
const bool resampling_needed = output_num_frames_ != buffer_num_frames_;
if (resampling_needed) {
for (size_t i = 0; i < num_channels_; ++i) {
output_resamplers_[i]->Resample(data_->channels()[i], buffer_num_frames_,
buffer->channels()[i],
buffer->num_frames());
}
} else {
for (size_t i = 0; i < num_channels_; ++i) {
memcpy(buffer->channels()[i], data_->channels()[i],
buffer_num_frames_ * sizeof(**buffer->channels()));
}
}
for (size_t i = num_channels_; i < buffer->num_channels(); ++i) {
memcpy(buffer->channels()[i], buffer->channels()[0],
output_num_frames_ * sizeof(**buffer->channels()));
}
}
void AudioBuffer::RestoreNumChannels() {
num_channels_ = buffer_num_channels_;
data_->set_num_channels(buffer_num_channels_);
if (split_data_.get()) {
split_data_->set_num_channels(buffer_num_channels_);
}
}
void AudioBuffer::set_num_channels(size_t num_channels) {
RTC_DCHECK_GE(buffer_num_channels_, num_channels);
num_channels_ = num_channels;
data_->set_num_channels(num_channels);
if (split_data_.get()) {
split_data_->set_num_channels(num_channels);
}
}
// The resampler is only for supporting 48kHz to 16kHz in the reverse stream.
void AudioBuffer::CopyFrom(const int16_t* const interleaved_data,
const StreamConfig& stream_config) {
RTC_DCHECK_EQ(stream_config.num_channels(), input_num_channels_);
RTC_DCHECK_EQ(stream_config.num_frames(), input_num_frames_);
RestoreNumChannels();
const bool resampling_required = input_num_frames_ != buffer_num_frames_;
const int16_t* interleaved = interleaved_data;
if (num_channels_ == 1) {
if (input_num_channels_ == 1) {
if (resampling_required) {
std::array<float, kMaxSamplesPerChannel> float_buffer;
S16ToFloatS16(interleaved, input_num_frames_, float_buffer.data());
input_resamplers_[0]->Resample(float_buffer.data(), input_num_frames_,
data_->channels()[0],
buffer_num_frames_);
} else {
S16ToFloatS16(interleaved, input_num_frames_, data_->channels()[0]);
}
} else {
std::array<float, kMaxSamplesPerChannel> float_buffer;
float* downmixed_data =
resampling_required ? float_buffer.data() : data_->channels()[0];
if (downmix_by_averaging_) {
for (size_t j = 0, k = 0; j < input_num_frames_; ++j) {
int32_t sum = 0;
for (size_t i = 0; i < input_num_channels_; ++i, ++k) {
sum += interleaved[k];
}
downmixed_data[j] = sum / static_cast<int16_t>(input_num_channels_);
}
} else {
for (size_t j = 0, k = channel_for_downmixing_; j < input_num_frames_;
++j, k += input_num_channels_) {
downmixed_data[j] = interleaved[k];
}
}
if (resampling_required) {
input_resamplers_[0]->Resample(downmixed_data, input_num_frames_,
data_->channels()[0],
buffer_num_frames_);
}
}
} else {
auto deinterleave_channel = [](size_t channel, size_t num_channels,
size_t samples_per_channel, const int16_t* x,
float* y) {
for (size_t j = 0, k = channel; j < samples_per_channel;
++j, k += num_channels) {
y[j] = x[k];
}
};
if (resampling_required) {
std::array<float, kMaxSamplesPerChannel> float_buffer;
for (size_t i = 0; i < num_channels_; ++i) {
deinterleave_channel(i, num_channels_, input_num_frames_, interleaved,
float_buffer.data());
input_resamplers_[i]->Resample(float_buffer.data(), input_num_frames_,
data_->channels()[i],
buffer_num_frames_);
}
} else {
for (size_t i = 0; i < num_channels_; ++i) {
deinterleave_channel(i, num_channels_, input_num_frames_, interleaved,
data_->channels()[i]);
}
}
}
}
void AudioBuffer::CopyTo(const StreamConfig& stream_config,
int16_t* const interleaved_data) {
const size_t config_num_channels = stream_config.num_channels();
RTC_DCHECK(config_num_channels == num_channels_ || num_channels_ == 1);
RTC_DCHECK_EQ(stream_config.num_frames(), output_num_frames_);
const bool resampling_required = buffer_num_frames_ != output_num_frames_;
int16_t* interleaved = interleaved_data;
if (num_channels_ == 1) {
std::array<float, kMaxSamplesPerChannel> float_buffer;
if (resampling_required) {
output_resamplers_[0]->Resample(data_->channels()[0], buffer_num_frames_,
float_buffer.data(), output_num_frames_);
}
const float* deinterleaved =
resampling_required ? float_buffer.data() : data_->channels()[0];
if (config_num_channels == 1) {
for (size_t j = 0; j < output_num_frames_; ++j) {
interleaved[j] = FloatS16ToS16(deinterleaved[j]);
}
} else {
for (size_t i = 0, k = 0; i < output_num_frames_; ++i) {
float tmp = FloatS16ToS16(deinterleaved[i]);
for (size_t j = 0; j < config_num_channels; ++j, ++k) {
interleaved[k] = tmp;
}
}
}
} else {
auto interleave_channel = [](size_t channel, size_t num_channels,
size_t samples_per_channel, const float* x,
int16_t* y) {
for (size_t k = 0, j = channel; k < samples_per_channel;
++k, j += num_channels) {
y[j] = FloatS16ToS16(x[k]);
}
};
if (resampling_required) {
for (size_t i = 0; i < num_channels_; ++i) {
std::array<float, kMaxSamplesPerChannel> float_buffer;
output_resamplers_[i]->Resample(data_->channels()[i],
buffer_num_frames_, float_buffer.data(),
output_num_frames_);
interleave_channel(i, config_num_channels, output_num_frames_,
float_buffer.data(), interleaved);
}
} else {
for (size_t i = 0; i < num_channels_; ++i) {
interleave_channel(i, config_num_channels, output_num_frames_,
data_->channels()[i], interleaved);
}
}
for (size_t i = num_channels_; i < config_num_channels; ++i) {
for (size_t j = 0, k = i, n = num_channels_; j < output_num_frames_;
++j, k += config_num_channels, n += config_num_channels) {
interleaved[k] = interleaved[n];
}
}
}
}
void AudioBuffer::SplitIntoFrequencyBands() {
splitting_filter_->Analysis(data_.get(), split_data_.get());
}
void AudioBuffer::MergeFrequencyBands() {
splitting_filter_->Synthesis(split_data_.get(), data_.get());
}
void AudioBuffer::ExportSplitChannelData(
size_t channel,
int16_t* const* split_band_data) const {
for (size_t k = 0; k < num_bands(); ++k) {
const float* band_data = split_bands_const(channel)[k];
RTC_DCHECK(split_band_data[k]);
RTC_DCHECK(band_data);
for (size_t i = 0; i < num_frames_per_band(); ++i) {
split_band_data[k][i] = FloatS16ToS16(band_data[i]);
}
}
}
void AudioBuffer::ImportSplitChannelData(
size_t channel,
const int16_t* const* split_band_data) {
for (size_t k = 0; k < num_bands(); ++k) {
float* band_data = split_bands(channel)[k];
RTC_DCHECK(split_band_data[k]);
RTC_DCHECK(band_data);
for (size_t i = 0; i < num_frames_per_band(); ++i) {
band_data[i] = split_band_data[k][i];
}
}
}
} // namespace webrtc
|
#include "huaweicloud/frs/v2/model/ActionsList.h"
namespace HuaweiCloud {
namespace Sdk {
namespace Frs {
namespace V2 {
namespace Model {
ActionsList::ActionsList()
{
confidence_ = 0.0;
confidenceIsSet_ = false;
action_ = 0;
actionIsSet_ = false;
}
ActionsList::~ActionsList() = default;
void ActionsList::validate()
{
}
web::json::value ActionsList::toJson() const
{
web::json::value val = web::json::value::object();
if(confidenceIsSet_) {
val[utility::conversions::to_string_t("confidence")] = ModelBase::toJson(confidence_);
}
if(actionIsSet_) {
val[utility::conversions::to_string_t("action")] = ModelBase::toJson(action_);
}
return val;
}
bool ActionsList::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t("confidence"))) {
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("confidence"));
if(!fieldValue.is_null())
{
double refVal;
ok &= ModelBase::fromJson(fieldValue, refVal);
setConfidence(refVal);
}
}
if(val.has_field(utility::conversions::to_string_t("action"))) {
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t("action"));
if(!fieldValue.is_null())
{
int32_t refVal;
ok &= ModelBase::fromJson(fieldValue, refVal);
setAction(refVal);
}
}
return ok;
}
double ActionsList::getConfidence() const
{
return confidence_;
}
void ActionsList::setConfidence(double value)
{
confidence_ = value;
confidenceIsSet_ = true;
}
bool ActionsList::confidenceIsSet() const
{
return confidenceIsSet_;
}
void ActionsList::unsetconfidence()
{
confidenceIsSet_ = false;
}
int32_t ActionsList::getAction() const
{
return action_;
}
void ActionsList::setAction(int32_t value)
{
action_ = value;
actionIsSet_ = true;
}
bool ActionsList::actionIsSet() const
{
return actionIsSet_;
}
void ActionsList::unsetaction()
{
actionIsSet_ = false;
}
}
}
}
}
}
|
#include "P4ReopenCommand.hpp"
#include "../Utils/StringUtil.hpp"
#include "../Utils/PathUtil.hpp"
#include <sstream>
namespace VersionControl
{
static const char* g_Reopened = "- reopened; change";
P4ReopenCommand::P4ReopenCommand(const std::string &changelist) :
P4Command("reopened"),
m_changelist(changelist)
{
}
bool P4ReopenCommand::Run(P4Task &task)
{
CommandArgs myArgs;
myArgs.emplace_back("-c");
if(m_changelist.empty())
{
myArgs.emplace_back("Default");
}
else
{
myArgs.emplace_back(m_changelist);
}
std::copy(m_customArgs.begin(), m_customArgs.end(), std::back_inserter(myArgs));
for(auto &path : m_paths)
{
myArgs.emplace_back(path);
}
return task.runP4Command("reopen", myArgs, this);
}
void P4ReopenCommand::OutputInfo(char level, const char *data)
{
std::stringstream stream(data);
std::string line;
while(std::getline(stream, line))
{
std::string depotFilename = PathUtil::parsePathFromString(line);
m_reopenedFiles[depotFilename] = MessageToAddResult(line);
}
}
P4ReopenResult P4ReopenCommand::MessageToAddResult(const std::string &message)
{
if(StringUtil::Contains(message, g_Reopened))
return P4ReopenResult::Reopened;
else
{
printf("Failed to parse P4ReopenResult from %s\n", message.c_str());
return P4ReopenResult::Failed;
}
}
}
|
/*
* This source file is part of RmlUi, the HTML/CSS Interface Middleware
*
* For the latest information, see http://github.com/mikke89/RmlUi
*
* Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
* Copyright (c) 2019 The RmlUi Team, and contributors
*
* 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.
*
*/
namespace Rml {
namespace Core {
template < typename PoolType >
Pool< PoolType >::Pool(int _chunk_size, bool _grow)
{
chunk_size = 0;
grow = _grow;
num_allocated_objects = 0;
pool = nullptr;
first_allocated_node = nullptr;
first_free_node = nullptr;
if (_chunk_size > 0)
Initialise(_chunk_size, _grow);
}
template < typename PoolType >
Pool< PoolType >::~Pool()
{
PoolChunk* chunk = pool;
while (chunk)
{
PoolChunk* next_chunk = chunk->next;
delete[] chunk->chunk;
delete chunk;
chunk = next_chunk;
}
}
// Initialises the pool to a given size.
template < typename PoolType >
void Pool< PoolType >::Initialise(int _chunk_size, bool _grow)
{
// Should resize the pool here ... ?
if (chunk_size > 0)
return;
if (_chunk_size <= 0)
return;
grow = _grow;
chunk_size = _chunk_size;
pool = nullptr;
// Create the initial chunk.
CreateChunk();
}
// Returns the head of the linked list of allocated objects.
template < typename PoolType >
typename Pool< PoolType >::Iterator Pool< PoolType >::Begin()
{
return typename Pool< PoolType >::Iterator(first_allocated_node);
}
// Attempts to allocate a deallocated object in the memory pool.
template<typename PoolType>
template<typename ...Args>
inline PoolType* Pool<PoolType>::AllocateAndConstruct(Args&&... args)
{
// We can't allocate a new object if the deallocated list is empty.
if (first_free_node == nullptr)
{
// Attempt to grow the pool first.
if (grow)
{
CreateChunk();
if (first_free_node == nullptr)
return nullptr;
}
else
return nullptr;
}
// We're about to allocate an object.
++num_allocated_objects;
// This one!
PoolNode* allocated_object = first_free_node;
// Remove the newly allocated object from the list of deallocated objects.
first_free_node = first_free_node->next;
if (first_free_node != nullptr)
first_free_node->previous = nullptr;
// Add the newly allocated object to the head of the list of allocated objects.
if (first_allocated_node != nullptr)
{
allocated_object->previous = nullptr;
allocated_object->next = first_allocated_node;
first_allocated_node->previous = allocated_object;
}
else
{
// This object is the only allocated object.
allocated_object->previous = nullptr;
allocated_object->next = nullptr;
}
first_allocated_node = allocated_object;
return new (allocated_object->object) PoolType(std::forward<Args>(args)...);
}
// Deallocates the object pointed to by the given iterator.
template < typename PoolType >
void Pool< PoolType >::DestroyAndDeallocate(Iterator& iterator)
{
// We're about to deallocate an object.
--num_allocated_objects;
PoolNode* object = iterator.node;
reinterpret_cast<PoolType*>(object->object)->~PoolType();
// Get the previous and next pointers now, because they will be overwritten
// before we're finished.
PoolNode* previous_object = object->previous;
PoolNode* next_object = object->next;
if (previous_object != nullptr)
previous_object->next = next_object;
else
{
RMLUI_ASSERT(first_allocated_node == object);
first_allocated_node = next_object;
}
if (next_object != nullptr)
next_object->previous = previous_object;
// Insert the freed node at the beginning of the free object list.
if (first_free_node == nullptr)
{
object->previous = nullptr;
object->next = nullptr;
}
else
{
object->previous = nullptr;
object->next = first_free_node;
}
first_free_node = object;
// Increment the iterator, so it points to the next active object.
iterator.node = next_object;
}
// Deallocates the given object.
template < typename PoolType >
void Pool< PoolType >::DestroyAndDeallocate(PoolType* object)
{
// This assumes the object has the same address as the node, which will be
// true as long as the struct definition does not change.
Iterator iterator((PoolNode*) object);
DestroyAndDeallocate(iterator);
}
// Returns the number of objects in the pool.
template < typename PoolType >
int Pool< PoolType >::GetSize() const
{
return chunk_size * GetNumChunks();
}
/// Returns the number of object chunks in the pool.
template < typename PoolType >
int Pool< PoolType >::GetNumChunks() const
{
int num_chunks = 0;
PoolChunk* chunk = pool;
while (chunk != nullptr)
{
++num_chunks;
chunk = chunk->next;
}
return num_chunks;
}
// Returns the number of allocated objects in the pool.
template < typename PoolType >
int Pool< PoolType >::GetNumAllocatedObjects() const
{
return num_allocated_objects;
}
// Creates a new pool chunk and appends its nodes to the beginning of the free list.
template < typename PoolType >
void Pool< PoolType >::CreateChunk()
{
if (chunk_size <= 0)
return;
// Create the new chunk and mark it as the first chunk.
PoolChunk* new_chunk = new PoolChunk();
new_chunk->next = pool;
pool = new_chunk;
// Create chunk's pool nodes.
new_chunk->chunk = new PoolNode[chunk_size];
// Initialise the linked list.
for (int i = 0; i < chunk_size; i++)
{
if (i == 0)
new_chunk->chunk[i].previous = nullptr ;
else
new_chunk->chunk[i].previous = &new_chunk->chunk[i - 1];
if (i == chunk_size - 1)
new_chunk->chunk[i].next = first_free_node;
else
new_chunk->chunk[i].next = &new_chunk->chunk[i + 1];
}
first_free_node = new_chunk->chunk;
}
}
}
|
/*
* Copyright (c) 2020, NVIDIA CORPORATION. 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 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.
*/
namespace fastertransformer
{
unsigned char fused_multihead_attention_v2_fp16_256_64_kernel_sm80_cubin[] = {
0x7f, 0x45, 0x4c, 0x46, 0x02, 0x01, 0x01, 0x33, 0x07, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xbe, 0x00, 0x6e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x50, 0x05, 0x50, 0x00, 0x40, 0x00, 0x38, 0x00, 0x00, 0x00, 0x40, 0x00,
0x0f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x02, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x45, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xb0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x4f, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x89, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x09, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xe4, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x58, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x27, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x11, 0x00, 0x00, 0xa8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x01, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0xf1, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xa4, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xeb, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfa, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc8, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x8c, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0xfc, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x2b, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x30, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x05, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x07, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x09, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0a, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0b, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0d, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x12, 0x10, 0x07, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x74, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x4d, 0x01, 0x00, 0x00, 0x12, 0x10, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x78, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f,
0x66, 0x72, 0x61, 0x6d, 0x65, 0x00, 0x2e, 0x6e, 0x76, 0x2e, 0x69, 0x6e,
0x66, 0x6f, 0x00, 0x2e, 0x6e, 0x76, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e,
0x66, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x68,
0x65, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f,
0x6e, 0x5f, 0x76, 0x32, 0x5f, 0x66, 0x70, 0x31, 0x36, 0x5f, 0x32, 0x35,
0x36, 0x5f, 0x36, 0x34, 0x5f, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f,
0x73, 0x6d, 0x38, 0x30, 0x5f, 0x6e, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x00,
0x2e, 0x6e, 0x76, 0x2e, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x66, 0x75, 0x73,
0x65, 0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x68, 0x65, 0x61, 0x64,
0x5f, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76,
0x32, 0x5f, 0x66, 0x70, 0x31, 0x36, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x36,
0x34, 0x5f, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x6d, 0x38,
0x30, 0x00, 0x2e, 0x6e, 0x76, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61,
0x6e, 0x74, 0x30, 0x2e, 0x66, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x75,
0x6c, 0x74, 0x69, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65,
0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x32, 0x5f, 0x66, 0x70, 0x31,
0x36, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x36, 0x34, 0x5f, 0x6b, 0x65, 0x72,
0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x6d, 0x38, 0x30, 0x5f, 0x6e, 0x6f, 0x6c,
0x6f, 0x6f, 0x70, 0x00, 0x2e, 0x6e, 0x76, 0x2e, 0x63, 0x6f, 0x6e, 0x73,
0x74, 0x61, 0x6e, 0x74, 0x30, 0x2e, 0x66, 0x75, 0x73, 0x65, 0x64, 0x5f,
0x6d, 0x75, 0x6c, 0x74, 0x69, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x61, 0x74,
0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x32, 0x5f, 0x66,
0x70, 0x31, 0x36, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x36, 0x34, 0x5f, 0x6b,
0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x6d, 0x38, 0x30, 0x00, 0x2e,
0x74, 0x65, 0x78, 0x74, 0x2e, 0x66, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d,
0x75, 0x6c, 0x74, 0x69, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74,
0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x32, 0x5f, 0x66, 0x70,
0x31, 0x36, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x36, 0x34, 0x5f, 0x6b, 0x65,
0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x6d, 0x38, 0x30, 0x5f, 0x6e, 0x6f,
0x6c, 0x6f, 0x6f, 0x70, 0x00, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x66,
0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x68, 0x65,
0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x76, 0x32, 0x5f, 0x66, 0x70, 0x31, 0x36, 0x5f, 0x32, 0x35, 0x36,
0x5f, 0x36, 0x34, 0x5f, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x73,
0x6d, 0x38, 0x30, 0x00, 0x2e, 0x6e, 0x76, 0x2e, 0x73, 0x68, 0x61, 0x72,
0x65, 0x64, 0x2e, 0x66, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6e,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x32, 0x5f, 0x66, 0x70, 0x31, 0x36,
0x5f, 0x32, 0x35, 0x36, 0x5f, 0x36, 0x34, 0x5f, 0x6b, 0x65, 0x72, 0x6e,
0x65, 0x6c, 0x5f, 0x73, 0x6d, 0x38, 0x30, 0x5f, 0x6e, 0x6f, 0x6c, 0x6f,
0x6f, 0x70, 0x00, 0x2e, 0x6e, 0x76, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65,
0x64, 0x2e, 0x66, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74,
0x69, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x32, 0x5f, 0x66, 0x70, 0x31, 0x36, 0x5f,
0x32, 0x35, 0x36, 0x5f, 0x36, 0x34, 0x5f, 0x6b, 0x65, 0x72, 0x6e, 0x65,
0x6c, 0x5f, 0x73, 0x6d, 0x38, 0x30, 0x00, 0x2e, 0x72, 0x65, 0x6c, 0x61,
0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65,
0x00, 0x2e, 0x73, 0x79, 0x6d, 0x74, 0x61, 0x62, 0x00, 0x2e, 0x73, 0x68,
0x73, 0x74, 0x72, 0x74, 0x61, 0x62, 0x00, 0x2e, 0x73, 0x74, 0x72, 0x74,
0x61, 0x62, 0x00, 0x00, 0x00, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f,
0x66, 0x72, 0x61, 0x6d, 0x65, 0x00, 0x2e, 0x6e, 0x76, 0x2e, 0x63, 0x6f,
0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x30, 0x2e, 0x66, 0x75, 0x73, 0x65,
0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x68, 0x65, 0x61, 0x64, 0x5f,
0x61, 0x74, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x32,
0x5f, 0x66, 0x70, 0x31, 0x36, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x36, 0x34,
0x5f, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x6d, 0x38, 0x30,
0x00, 0x2e, 0x6e, 0x76, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e,
0x74, 0x30, 0x2e, 0x66, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x75, 0x6c,
0x74, 0x69, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6e,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x32, 0x5f, 0x66, 0x70, 0x31, 0x36,
0x5f, 0x32, 0x35, 0x36, 0x5f, 0x36, 0x34, 0x5f, 0x6b, 0x65, 0x72, 0x6e,
0x65, 0x6c, 0x5f, 0x73, 0x6d, 0x38, 0x30, 0x5f, 0x6e, 0x6f, 0x6c, 0x6f,
0x6f, 0x70, 0x00, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x66, 0x75, 0x73,
0x65, 0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x68, 0x65, 0x61, 0x64,
0x5f, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76,
0x32, 0x5f, 0x66, 0x70, 0x31, 0x36, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x36,
0x34, 0x5f, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x6d, 0x38,
0x30, 0x00, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x66, 0x75, 0x73, 0x65,
0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x68, 0x65, 0x61, 0x64, 0x5f,
0x61, 0x74, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x32,
0x5f, 0x66, 0x70, 0x31, 0x36, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x36, 0x34,
0x5f, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x6d, 0x38, 0x30,
0x5f, 0x6e, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x00, 0x66, 0x75, 0x73, 0x65,
0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x68, 0x65, 0x61, 0x64, 0x5f,
0x61, 0x74, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x32,
0x5f, 0x66, 0x70, 0x31, 0x36, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x36, 0x34,
0x5f, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x6d, 0x38, 0x30,
0x00, 0x66, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69,
0x68, 0x65, 0x61, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x74, 0x69,
0x6f, 0x6e, 0x5f, 0x76, 0x32, 0x5f, 0x66, 0x70, 0x31, 0x36, 0x5f, 0x32,
0x35, 0x36, 0x5f, 0x36, 0x34, 0x5f, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c,
0x5f, 0x73, 0x6d, 0x38, 0x30, 0x5f, 0x6e, 0x6f, 0x6c, 0x6f, 0x6f, 0x70,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x24, 0x76, 0x01, 0xff, 0x00, 0x0a, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xce, 0x0f, 0x00, 0x19, 0x79, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x26, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x24, 0x74, 0x97, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0xb9, 0x7a, 0x04, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00,
0x00, 0xc6, 0x0f, 0x00, 0x25, 0x76, 0x02, 0x02, 0x00, 0x6c, 0x00, 0x00,
0x97, 0x02, 0x8e, 0x07, 0x00, 0xce, 0x2f, 0x00, 0x81, 0x79, 0x85, 0x02,
0x04, 0x04, 0x00, 0x00, 0x00, 0x19, 0x1e, 0x0c, 0x00, 0xa8, 0x0e, 0x00,
0x81, 0x79, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x19, 0x1e, 0x0c,
0x00, 0xa4, 0x0e, 0x00, 0x0c, 0x72, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00,
0x70, 0x52, 0xf0, 0x03, 0x00, 0xda, 0x4f, 0x00, 0x4d, 0x89, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xea, 0x0f, 0x00,
0x19, 0x79, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x24, 0x78, 0x85, 0x85, 0x01, 0x00, 0x00, 0x00,
0x00, 0x0a, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x80, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x76, 0x1b, 0xff, 0x00, 0x5e, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x19, 0x79, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x25, 0x00, 0x00, 0x00, 0xa6, 0x0e, 0x00, 0x24, 0x78, 0x17, 0x1b,
0x20, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x19, 0x79, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00,
0x00, 0xe2, 0x0e, 0x00, 0x19, 0x78, 0x87, 0xff, 0x1f, 0x00, 0x00, 0x00,
0x84, 0x14, 0x01, 0x00, 0x00, 0xc8, 0x2f, 0x00, 0x11, 0x72, 0x03, 0x87,
0x84, 0x00, 0x00, 0x00, 0xff, 0x18, 0x8f, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7a, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x07, 0x02, 0x8e, 0x07,
0x00, 0xe4, 0x4f, 0x00, 0x24, 0x74, 0x00, 0xff, 0x05, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0x94, 0xff,
0x03, 0x00, 0x00, 0x00, 0x03, 0x14, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x19, 0x78, 0x06, 0x02, 0x07, 0x00, 0x00, 0x00, 0xff, 0x06, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x19, 0x78, 0x0a, 0xff, 0x1f, 0x00, 0x00, 0x00,
0x94, 0x14, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x25, 0x7a, 0x04, 0x94,
0x00, 0x5e, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x12, 0x78, 0x0b, 0x03, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xc4, 0x0f, 0x00, 0x19, 0x78, 0x03, 0xff, 0x1f, 0x00, 0x00, 0x00,
0x03, 0x14, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7a, 0x09, 0x0a,
0x00, 0x5e, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x19, 0x78, 0x07, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x06, 0x14, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x24, 0x78, 0x0b, 0x84, 0x01, 0x00, 0x00, 0x00,
0x0b, 0x0a, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x08, 0x03,
0x94, 0x00, 0x00, 0x00, 0xff, 0x18, 0x8f, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7a, 0x09, 0x94, 0x00, 0x5f, 0x00, 0x00, 0x09, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x04, 0x19, 0x76, 0x19, 0x1b, 0x00, 0x5f, 0x00, 0x00,
0x00, 0x02, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x25, 0x7a, 0x06, 0x94,
0x00, 0x62, 0x00, 0x00, 0x06, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x19, 0x78, 0x11, 0x0b, 0x04, 0x00, 0x00, 0x00, 0xff, 0x06, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x12, 0x78, 0x0d, 0x08, 0xf8, 0xff, 0xff, 0x0f,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x05, 0x05,
0x01, 0x00, 0x00, 0x00, 0x09, 0x02, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x24, 0x78, 0x09, 0x02, 0x03, 0x00, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x72, 0x13, 0x11, 0x06, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xf3, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7a, 0x0f, 0x0a,
0x00, 0x62, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x25, 0x78, 0x02, 0x09, 0x80, 0x00, 0x00, 0x00, 0x04, 0x02, 0x8e, 0x07,
0x00, 0xc8, 0x0f, 0x00, 0x24, 0x78, 0x06, 0x94, 0x01, 0x00, 0x00, 0x00,
0x0d, 0x0a, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x04, 0x10, 0x7a, 0x0d, 0x13,
0x00, 0x5c, 0x00, 0x00, 0xff, 0xe0, 0xf5, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7a, 0x0c, 0x94, 0x00, 0x63, 0x00, 0x00, 0x0f, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0x0f, 0xff, 0x1f, 0x00, 0x00, 0x00,
0x11, 0x14, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x72, 0x12, 0x02,
0x11, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf1, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x12, 0x72, 0x0b, 0x06, 0x0b, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x72, 0x06, 0x03, 0x0f, 0x00, 0x00, 0x00,
0xff, 0xe4, 0x7f, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0c, 0x78, 0x00, 0x15,
0x01, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x03, 0x00, 0xe2, 0x8f, 0x00,
0x24, 0x78, 0x86, 0x94, 0x08, 0x00, 0x00, 0x00, 0x0b, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x72, 0x0c, 0x0f, 0x07, 0x00, 0x00, 0x00,
0x0c, 0xe4, 0xff, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x10, 0x7a, 0x0e, 0x12,
0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x7a, 0x0a, 0x0c, 0x00, 0x5d, 0x00, 0x00, 0xff, 0xe4, 0x7f, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x19, 0x78, 0x93, 0x86, 0x04, 0x00, 0x00, 0x00,
0xff, 0x06, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x10, 0x06,
0x00, 0x59, 0x00, 0x00, 0xff, 0xe4, 0xff, 0x00, 0x00, 0xc6, 0x0f, 0x00,
0x47, 0x89, 0x00, 0x00, 0xb0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xea, 0x0f, 0x00, 0x12, 0x78, 0x14, 0x15, 0x03, 0x00, 0x00, 0x00,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x76, 0x07, 0xff,
0x00, 0x62, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x82, 0x7c, 0x04, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x14,
0xff, 0x00, 0x00, 0x00, 0x70, 0x52, 0xf0, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x08, 0x07, 0x20, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x04, 0x19, 0x76, 0x0b, 0x07, 0x00, 0x63, 0x00, 0x00,
0x00, 0x02, 0x01, 0x00, 0x00, 0xd6, 0x0f, 0x00, 0x47, 0x89, 0x00, 0x00,
0x60, 0x02, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xea, 0x0f, 0x00,
0x0c, 0x78, 0x00, 0x14, 0x01, 0x00, 0x00, 0x00, 0x70, 0x52, 0xf0, 0x03,
0x00, 0xda, 0x0f, 0x00, 0x47, 0x89, 0x00, 0x00, 0x30, 0x01, 0x00, 0x00,
0x00, 0x00, 0x80, 0x03, 0x00, 0xea, 0x0f, 0x00, 0x0c, 0x78, 0x00, 0x14,
0x02, 0x00, 0x00, 0x00, 0x70, 0x52, 0xf0, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x82, 0x78, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x02, 0xff,
0xff, 0x00, 0x00, 0x00, 0x85, 0x00, 0x8e, 0x07, 0x00, 0xd4, 0x0f, 0x00,
0x47, 0x89, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xea, 0x0f, 0x00, 0x10, 0x7a, 0x0e, 0x12, 0x00, 0x58, 0x00, 0x00,
0x17, 0xe0, 0x91, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x82, 0x78, 0x04, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x7a, 0x0d, 0x13, 0x00, 0x5c, 0x00, 0x00, 0x08, 0xe0, 0xb5, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x78, 0x02, 0x85, 0xe0, 0xff, 0xff, 0xff,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x78, 0x00, 0x94,
0x20, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x7a, 0x10, 0x06, 0x00, 0x59, 0x00, 0x00, 0x19, 0x24, 0x7e, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x0a, 0x0c, 0x00, 0x5d, 0x00, 0x00,
0x0b, 0x64, 0x7e, 0x01, 0x00, 0xce, 0x0f, 0x00, 0x10, 0x72, 0x0e, 0x0e,
0x17, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf1, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x72, 0x0d, 0x0d, 0x08, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07,
0x00, 0xc4, 0x0f, 0x00, 0x10, 0x78, 0x02, 0x02, 0xe0, 0xff, 0xff, 0xff,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x10, 0x10,
0x01, 0x00, 0x00, 0x00, 0x19, 0x06, 0x0e, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x78, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x72, 0x0a, 0x0a, 0x0b, 0x00, 0x00, 0x00,
0xff, 0xe4, 0xff, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x47, 0x79, 0x00, 0x00,
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xcc, 0x0f, 0x00,
0x24, 0x72, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x94, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x82, 0x7c, 0x04, 0x00, 0x3f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x02, 0xff,
0xff, 0x00, 0x00, 0x00, 0x85, 0x00, 0x8e, 0x07, 0x00, 0xd8, 0x0f, 0x00,
0x10, 0x72, 0x0d, 0x0d, 0x08, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x90, 0x78, 0x04, 0x04, 0x01, 0x00, 0x00, 0x00,
0x3f, 0xe0, 0xff, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x72, 0x0e, 0x0e,
0x17, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf1, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x78, 0x07, 0x02, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x0a, 0x0a, 0x01, 0x00, 0x00, 0x00,
0x0b, 0x06, 0x8e, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x72, 0x10, 0x10,
0x19, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x7f, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x72, 0x02, 0xff, 0xff, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x06, 0x00, 0x20, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x96, 0xff,
0xff, 0x00, 0x00, 0x00, 0x07, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x72, 0x03, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x95, 0xff, 0xff, 0x00, 0x00, 0x00,
0x0e, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x72, 0x92, 0xff, 0xff, 0x00, 0x00, 0x00, 0x10, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x47, 0x79, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x03, 0x00, 0xcc, 0x0f, 0x00, 0x24, 0x72, 0x06, 0xff,
0xff, 0x00, 0x00, 0x00, 0x94, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x72, 0x07, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x95, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x72, 0x96, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xc4, 0x0f, 0x00, 0x24, 0x72, 0x92, 0xff, 0xff, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xce, 0x0f, 0x00, 0x0c, 0x78, 0x00, 0x15,
0x04, 0x00, 0x00, 0x00, 0x70, 0x60, 0xf0, 0x03, 0x00, 0xda, 0x0f, 0x00,
0x47, 0x89, 0x00, 0x00, 0xb0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xea, 0x0f, 0x00, 0x10, 0x7c, 0x02, 0x15, 0x04, 0x00, 0x00, 0x80,
0xff, 0xe0, 0xff, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x03, 0xff,
0xff, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x72, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf5, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
0x06, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x78, 0x00, 0x02,
0x0c, 0x00, 0x00, 0x00, 0x70, 0x42, 0xf2, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x72, 0x96, 0xff, 0xff, 0x00, 0x00, 0x00, 0x07, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x72, 0x0a, 0x17, 0x17, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xf1, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x06, 0x0b,
0x01, 0x00, 0x00, 0x00, 0x0b, 0x06, 0x0e, 0x01, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x72, 0x07, 0x08, 0x08, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf7, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x72, 0x08, 0x0a, 0x0a, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xf5, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x0b, 0x19,
0x01, 0x00, 0x00, 0x00, 0x19, 0x06, 0x0e, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x72, 0x02, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x06, 0x06, 0x01, 0x00, 0x00, 0x00,
0x06, 0x06, 0x8e, 0x01, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x95, 0x00,
0x0e, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x0b, 0x0b, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x06, 0x0e, 0x01,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x92, 0x00, 0x10, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x1c, 0x78, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x70, 0xf0, 0xf0, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x47, 0x99, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xd8, 0x0f, 0x00, 0x1c, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x70, 0xe1, 0xf0, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x78, 0x0a, 0x15,
0xf4, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xd6, 0x0f, 0x00,
0x90, 0x78, 0x04, 0x04, 0x10, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0xff, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x72, 0x95, 0x08, 0x95, 0x00, 0x00, 0x00,
0x08, 0xe0, 0xa3, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x72, 0x02, 0x07,
0x02, 0x00, 0x00, 0x00, 0x07, 0xe0, 0xc7, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x72, 0x92, 0x0b, 0x92, 0x00, 0x00, 0x00, 0x0b, 0x44, 0xfe, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x0a, 0x04, 0x00, 0x00, 0x00,
0x70, 0x32, 0xf2, 0x0b, 0x00, 0xc4, 0x0f, 0x00, 0x10, 0x72, 0x03, 0x06,
0x03, 0x00, 0x00, 0x00, 0x06, 0x84, 0xfe, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x72, 0x95, 0x08, 0x95, 0x00, 0x00, 0x00, 0x08, 0xe0, 0xb5, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x72, 0x02, 0x07, 0x02, 0x00, 0x00, 0x00,
0x07, 0xe0, 0xd9, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x78, 0x96, 0x96,
0x00, 0xfe, 0xff, 0xff, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x78, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x72, 0x92, 0x0b, 0x92, 0x00, 0x00, 0x00,
0x0b, 0x64, 0x7e, 0x01, 0x00, 0xc4, 0x0f, 0x00, 0x10, 0x72, 0x03, 0x06,
0x03, 0x00, 0x00, 0x00, 0x06, 0xa4, 0x7e, 0x02, 0x00, 0xe2, 0x0f, 0x00,
0x47, 0x99, 0x00, 0x00, 0x30, 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0x03,
0x00, 0xec, 0x0f, 0x00, 0x10, 0x7c, 0x0a, 0x15, 0x04, 0x00, 0x00, 0x80,
0xff, 0xe0, 0xff, 0x0f, 0x00, 0xc8, 0x0f, 0x00, 0x0c, 0x78, 0x00, 0x0a,
0x04, 0x00, 0x00, 0x00, 0x70, 0x42, 0xf2, 0x03, 0x00, 0xda, 0x0f, 0x00,
0x47, 0x99, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xea, 0x0f, 0x00, 0x10, 0x72, 0x95, 0x08, 0x95, 0x00, 0x00, 0x00,
0x08, 0xe0, 0xa3, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x90, 0x78, 0x04, 0x04,
0x08, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0xff, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x72, 0x02, 0x07, 0x02, 0x00, 0x00, 0x00, 0x07, 0xe0, 0xc7, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x1c, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x70, 0xe1, 0xf0, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x78, 0x96, 0x96,
0x00, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x78, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x72, 0x92, 0x0b, 0x92, 0x00, 0x00, 0x00,
0x0b, 0x44, 0xfe, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x10, 0x72, 0x03, 0x06,
0x03, 0x00, 0x00, 0x00, 0x06, 0x84, 0xfe, 0x01, 0x00, 0xce, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0x15, 0x04, 0x00, 0x00, 0x00, 0x70, 0x46, 0x70, 0x08,
0x00, 0xda, 0x0f, 0x00, 0x47, 0x89, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x03, 0x00, 0xea, 0x0f, 0x00, 0x10, 0x72, 0x02, 0x07,
0x02, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x72, 0x95, 0x08, 0x95, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf1, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x78, 0x96, 0x96, 0x80, 0xff, 0xff, 0xff,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x03, 0x06,
0x01, 0x00, 0x00, 0x00, 0x03, 0x06, 0x8e, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x72, 0x92, 0x0b, 0x92, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x7f, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x78, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x47, 0x79, 0x00, 0x00,
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xcc, 0x0f, 0x00,
0x24, 0x72, 0x02, 0xff, 0xff, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x03, 0x00, 0x0a, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x95, 0xff,
0xff, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x72, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x92, 0xff, 0xff, 0x00, 0x00, 0x00,
0x10, 0x00, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00, 0x24, 0x72, 0x96, 0xff,
0xff, 0x00, 0x00, 0x00, 0x85, 0x00, 0x8e, 0x07, 0x00, 0xce, 0x0f, 0x00,
0x10, 0x78, 0x09, 0x09, 0x01, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x98, 0x1b, 0x10, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x17, 0x78, 0x0c, 0x85,
0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x07, 0x94, 0x20, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04, 0x25, 0x78, 0x04, 0x09,
0x80, 0x00, 0x00, 0x00, 0x04, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7a, 0x15, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x09, 0x94,
0x40, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x05, 0x78, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x0b, 0x94, 0x50, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04, 0x24, 0x78, 0x0d, 0x15,
0xf0, 0x00, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x72, 0x10, 0x11, 0x04, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf1, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x13, 0x15, 0x70, 0x00, 0x00, 0x00,
0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x09,
0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xfa, 0x03, 0x00, 0xe2, 0x0f, 0x08,
0x05, 0x78, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x0b, 0x0c, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf8, 0x03, 0x00, 0xe2, 0x0f, 0x08, 0x24, 0x78, 0x11, 0x05,
0x01, 0x00, 0x00, 0x00, 0x0f, 0x06, 0x0e, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x72, 0x00, 0x07, 0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x03,
0x00, 0xe2, 0x0f, 0x08, 0x24, 0x78, 0x0f, 0x15, 0xe0, 0x00, 0x00, 0x00,
0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x07, 0x94,
0x30, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x25, 0x78, 0x04, 0x1b, 0xf0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x14, 0x19, 0x76, 0x97, 0x1b, 0x00, 0x5f, 0x00, 0x00,
0x97, 0x02, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x3c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x72, 0x00, 0x07, 0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xfc, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x06, 0x1b, 0xe0, 0x00, 0x00, 0x00,
0x10, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x14, 0x10, 0x78, 0x99, 0x94,
0x10, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x8a, 0x04, 0x00, 0x58, 0x00, 0x00,
0xff, 0xe0, 0xf3, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x08, 0x1b,
0xd0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0xb9, 0x7a, 0x04, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x8b, 0x05,
0x00, 0x59, 0x00, 0x00, 0x0d, 0xe4, 0xff, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x25, 0x78, 0x04, 0x1b, 0xc0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x88, 0x06, 0x00, 0x58, 0x00, 0x00,
0xff, 0xe0, 0xf5, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x3a, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x7a, 0x90, 0x08, 0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x0d, 0x15, 0xd0, 0x00, 0x00, 0x00,
0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x89, 0x07,
0x00, 0x59, 0x00, 0x00, 0x0f, 0xe4, 0x7f, 0x01, 0x00, 0xe2, 0x0f, 0x00,
0x25, 0x78, 0x06, 0x1b, 0xb0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x8e, 0x04, 0x00, 0x58, 0x00, 0x00,
0xff, 0xe0, 0xf5, 0x07, 0x00, 0xc4, 0x0f, 0x00, 0x10, 0x7a, 0x91, 0x09,
0x00, 0x59, 0x00, 0x00, 0x0d, 0xe4, 0xff, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x0f, 0x15, 0xc0, 0x00, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x25, 0x78, 0x0a, 0x1b, 0xa0, 0x00, 0x00, 0x00,
0x10, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x8c, 0x06,
0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x7a, 0x8f, 0x05, 0x00, 0x59, 0x00, 0x00, 0x0f, 0xe4, 0x7f, 0x01,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x09, 0x15, 0xb0, 0x00, 0x00, 0x00,
0xff, 0x02, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x04, 0x24, 0x78, 0x0d, 0x15,
0xa0, 0x00, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x7a, 0x82, 0x0a, 0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf5, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x04, 0x1b, 0x90, 0x00, 0x00, 0x00,
0x10, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x8d, 0x07,
0x00, 0x59, 0x00, 0x00, 0x09, 0xe4, 0xff, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x10, 0x7a, 0x83, 0x0b, 0x00, 0x59, 0x00, 0x00, 0x0d, 0xe4, 0x7f, 0x01,
0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x06, 0x1b, 0x70, 0x00, 0x00, 0x00,
0x10, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x14, 0x10, 0x78, 0x0d, 0x94,
0x60, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x7a, 0x42, 0x04, 0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x08, 0x1b, 0x60, 0x00, 0x00, 0x00,
0x10, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x10, 0x0c, 0x72, 0x00, 0x0d,
0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf6, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x7a, 0x06, 0x06, 0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf5, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x0f, 0x15, 0x90, 0x00, 0x00, 0x00,
0xff, 0x02, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x25, 0x78, 0x0a, 0x1b,
0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x7a, 0x07, 0x07, 0x00, 0x59, 0x00, 0x00, 0x13, 0xe4, 0x7f, 0x01,
0x00, 0xc4, 0x0f, 0x00, 0x10, 0x7a, 0x43, 0x05, 0x00, 0x59, 0x00, 0x00,
0x0f, 0xe4, 0xff, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x0d, 0x15,
0x60, 0x00, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x7a, 0x08, 0x08, 0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x04, 0x1b, 0x30, 0x00, 0x00, 0x00,
0x10, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x0a, 0x0a,
0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf5, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x7a, 0x09, 0x09, 0x00, 0x59, 0x00, 0x00, 0x0d, 0xe4, 0xff, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x0f, 0x15, 0x50, 0x00, 0x00, 0x00,
0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x18, 0x1b,
0x10, 0x00, 0x00, 0x00, 0xff, 0x38, 0x82, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x0d, 0x15, 0x30, 0x00, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07,
0x00, 0xc6, 0x0f, 0x00, 0x10, 0x7a, 0x0b, 0x0b, 0x00, 0x59, 0x00, 0x00,
0x0f, 0xe4, 0x7f, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x11, 0x72, 0x1a, 0x1b,
0x11, 0x00, 0x00, 0x00, 0x15, 0x3c, 0x8f, 0x00, 0x00, 0xe4, 0x0f, 0x1c,
0x11, 0x72, 0x14, 0x1b, 0x10, 0x00, 0x00, 0x00, 0xff, 0x30, 0x84, 0x07,
0x00, 0xe4, 0x0f, 0x04, 0x10, 0x7a, 0x0e, 0x04, 0x00, 0x58, 0x00, 0x00,
0xff, 0xe0, 0xf3, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x11, 0x72, 0x15, 0x1b,
0x11, 0x00, 0x00, 0x00, 0x15, 0x34, 0x0f, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x7a, 0x0f, 0x05, 0x00, 0x59, 0x00, 0x00, 0x0d, 0xe4, 0xff, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x10, 0x7a, 0x12, 0x10, 0x00, 0x58, 0x00, 0x00,
0x98, 0xe0, 0xa3, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x78, 0x0d, 0x94,
0x70, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x7a, 0x13, 0x11, 0x00, 0x59, 0x00, 0x00, 0x97, 0x44, 0xfe, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x16, 0x10, 0x00, 0x58, 0x00, 0x00,
0x17, 0xe0, 0xa3, 0x07, 0x00, 0xc8, 0x0f, 0x00, 0x10, 0x7a, 0x17, 0x11,
0x00, 0x59, 0x00, 0x00, 0x19, 0x44, 0xfe, 0x00, 0x00, 0xe4, 0x0f, 0x04,
0x10, 0x7a, 0x10, 0x10, 0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x14, 0x14, 0x00, 0x58, 0x00, 0x00,
0xff, 0xe0, 0xf5, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x11, 0x11,
0x00, 0x59, 0x00, 0x00, 0xff, 0xe4, 0xff, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x7a, 0x15, 0x15, 0x00, 0x59, 0x00, 0x00, 0xff, 0xe4, 0x7f, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x04, 0x18, 0x00, 0x58, 0x00, 0x00,
0xff, 0xe0, 0xf3, 0x07, 0x00, 0xc4, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x94,
0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf4, 0x03, 0x00, 0xe4, 0x0f, 0x08,
0x10, 0x7a, 0x05, 0x1a, 0x00, 0x59, 0x00, 0x00, 0xff, 0xe4, 0xff, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x99, 0x0c, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf2, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x74, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x36, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xc8, 0x0f, 0x00, 0x81, 0xa9, 0x7c, 0x10, 0x04, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xa8, 0x02, 0x00, 0x81, 0xa9, 0x3c, 0x10,
0x04, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00,
0x0c, 0x72, 0x00, 0x0d, 0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf4, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x78, 0x0d, 0x94, 0x80, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x81, 0x99, 0x78, 0x12,
0x04, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x08, 0x00,
0x05, 0x78, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x81, 0x99, 0x38, 0x12,
0x04, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x08, 0x00,
0x0c, 0x72, 0x00, 0x0d, 0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf2, 0x03,
0x00, 0xe2, 0x0f, 0x08, 0x05, 0x78, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x0d, 0x94,
0x90, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x05, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x81, 0x89, 0x74, 0x16,
0x04, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00,
0x05, 0x78, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x81, 0x89, 0x34, 0x16,
0x04, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00,
0x0c, 0x72, 0x00, 0x0d, 0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x0d, 0x94,
0xa0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xe9, 0x70, 0x0e, 0x04, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00, 0x05, 0x78, 0x28, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x81, 0xe9, 0x30, 0x0e, 0x04, 0x80, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00, 0x0c, 0x72, 0x00, 0x0d,
0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xfc, 0x03, 0x00, 0xe2, 0x0f, 0x08,
0x05, 0x78, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x0d, 0x94, 0xb0, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04, 0x05, 0x78, 0x66, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xd9, 0x6c, 0x14, 0x04, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00, 0x05, 0x78, 0x62, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x81, 0xd9, 0x2c, 0x14, 0x04, 0x80, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00, 0x0c, 0x72, 0x00, 0x0d,
0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xfa, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x0d, 0x94, 0xc0, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x20, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xc9, 0x68, 0x0a, 0x04, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00, 0x05, 0x78, 0x5c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x81, 0xc9, 0x28, 0x0a, 0x04, 0x80, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00, 0x0c, 0x72, 0x00, 0x0d,
0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf8, 0x03, 0x00, 0xe2, 0x0f, 0x08,
0x05, 0x78, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x0d, 0x94, 0xd0, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x1e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xb9, 0x64, 0x08, 0x04, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x08, 0x00, 0x05, 0x78, 0x5a, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x81, 0xb9, 0x24, 0x08, 0x04, 0x80, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x08, 0x00, 0x0c, 0x72, 0x00, 0x0d,
0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf6, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x52, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x48, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x46, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x81, 0xa9, 0x60, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0xe2, 0x08, 0x00, 0x05, 0x78, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x1a, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x81, 0xa9, 0x20, 0x06, 0x04, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0xe2, 0x08, 0x00, 0x10, 0x78, 0x0b, 0x94, 0xe0, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x2f, 0x00, 0x05, 0x78, 0x14, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xb9, 0x48, 0x90, 0x04, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x0e, 0x00, 0x05, 0x78, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x72, 0x00, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf4, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x01, 0x81, 0x99, 0x5c, 0x04,
0x04, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x28, 0x03, 0x00,
0x81, 0x99, 0x1c, 0x04, 0x04, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0x22, 0x03, 0x00, 0x24, 0x72, 0x81, 0xff, 0xff, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xc6, 0x0f, 0x00, 0x81, 0x89, 0x58, 0x42,
0x04, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x28, 0x03, 0x00,
0x81, 0x89, 0x18, 0x42, 0x04, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0x28, 0x03, 0x00, 0x81, 0xe9, 0x54, 0x82, 0x04, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x22, 0x03, 0x00, 0x10, 0x78, 0x07, 0x94,
0xf0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xc6, 0x0f, 0x00,
0x81, 0xe9, 0x14, 0x82, 0x04, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0x22, 0x03, 0x00, 0x0c, 0x72, 0x00, 0x07, 0x0c, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf2, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x05, 0x78, 0x0c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xc9, 0x4c, 0x8e, 0x04, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x24, 0x03, 0x00, 0x05, 0x78, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x2f, 0x00,
0x05, 0x78, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x0a, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xd9, 0x50, 0x8c, 0x04, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x22, 0x03, 0x00, 0x05, 0x78, 0x42, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xc6, 0x0f, 0x00,
0x81, 0xa9, 0x44, 0x88, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0x28, 0x03, 0x00, 0x81, 0xd9, 0x10, 0x8c, 0x04, 0x80, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x22, 0x03, 0x00, 0x05, 0x78, 0x82, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xc6, 0x0f, 0x00,
0x81, 0xc9, 0x0c, 0x8e, 0x04, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0x28, 0x03, 0x00, 0x81, 0xb9, 0x04, 0x90, 0x04, 0x80, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x28, 0x0f, 0x00, 0x81, 0xa9, 0x08, 0x88,
0x04, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x28, 0x03, 0x00,
0x81, 0x99, 0x40, 0x8a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0x28, 0x03, 0x00, 0x81, 0x99, 0x80, 0x8a, 0x04, 0x80, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x24, 0x03, 0x00, 0x17, 0x78, 0x8c, 0x96,
0x20, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x03, 0x00, 0xc8, 0x2f, 0x00,
0x0c, 0x72, 0x00, 0x94, 0x8c, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x03,
0x00, 0xe4, 0x0f, 0x08, 0x0c, 0x72, 0x00, 0x99, 0x8c, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf2, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x72, 0x88, 0x95,
0x98, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf5, 0x07, 0x00, 0xc8, 0x0f, 0x00,
0x10, 0x72, 0x89, 0x92, 0x97, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x7f, 0x01,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x8a, 0xff, 0xff, 0x00, 0x00, 0x00,
0x95, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x72, 0x8b, 0xff,
0xff, 0x00, 0x00, 0x00, 0x92, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x12, 0x78, 0x8d, 0x84, 0x60, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x04, 0x12, 0x78, 0x8e, 0x84, 0x07, 0x00, 0x00, 0x00,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0xae, 0x7f, 0x93, 0x8a,
0x00, 0x00, 0x00, 0x00, 0x44, 0x1c, 0x14, 0x0c, 0x00, 0xe2, 0x03, 0x00,
0x19, 0x78, 0x8f, 0xff, 0x03, 0x00, 0x00, 0x00, 0x84, 0x16, 0x01, 0x00,
0x00, 0xc6, 0x0f, 0x00, 0xae, 0x7f, 0x93, 0x88, 0x00, 0x00, 0x80, 0x00,
0x44, 0x1c, 0x94, 0x0c, 0x00, 0xe8, 0x03, 0x00, 0xaf, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0e, 0x00,
0x11, 0x72, 0x8d, 0x8d, 0x8e, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x8f, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x12, 0x78, 0x8c, 0x84, 0x10, 0x00, 0x00, 0x00,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x1a, 0x78, 0x8f, 0x8f,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x11, 0x72, 0x8c, 0x8c, 0x8d, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x8f, 0x07,
0x00, 0xc4, 0x0f, 0x00, 0x12, 0x78, 0x8f, 0x8f, 0x07, 0x00, 0x00, 0x00,
0x84, 0x78, 0x8e, 0x07, 0x00, 0xc8, 0x0f, 0x00, 0x11, 0x72, 0x8c, 0x8c,
0x8f, 0x00, 0x00, 0x00, 0xff, 0x18, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x86, 0x7c, 0x00, 0x20, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x4f, 0x00, 0x88, 0x73, 0x00, 0x86, 0x3c, 0x00, 0xa0, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x8f, 0x00, 0x88, 0x73, 0x00, 0x86,
0x78, 0x00, 0x28, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x86, 0x34, 0x00, 0xb0, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86, 0x74, 0x00, 0x30, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86,
0x70, 0x00, 0x38, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x86, 0x38, 0x00, 0xa8, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86, 0x6c, 0x00, 0x40, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86,
0x30, 0x00, 0xb8, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x86, 0x2c, 0x00, 0xc0, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86, 0x68, 0x00, 0x48, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86,
0x28, 0x00, 0xc8, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x86, 0x64, 0x00, 0x50, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86, 0x24, 0x00, 0xd0, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86,
0x48, 0x00, 0x88, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x05, 0x00,
0x88, 0x73, 0x00, 0x86, 0x60, 0x00, 0x58, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86, 0x5c, 0x00, 0x60, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x01, 0x88, 0x73, 0x00, 0x86,
0x58, 0x00, 0x68, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x86, 0x20, 0x00, 0xd8, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x48, 0x84, 0x10, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x4f, 0x04, 0x12, 0x78, 0x4b, 0x84,
0x0f, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x8e, 0x07, 0x00, 0xc8, 0x0f, 0x00,
0x12, 0x78, 0x35, 0x48, 0x70, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xc8, 0x0f, 0x00, 0x12, 0x78, 0x4a, 0x35, 0x10, 0x00, 0x00, 0x00,
0x84, 0x78, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86,
0x4c, 0x00, 0x80, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x05, 0x00,
0x24, 0x78, 0x24, 0x4b, 0x80, 0x00, 0x00, 0x00, 0x4a, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86, 0x54, 0x00, 0x70, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86,
0x50, 0x00, 0x78, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x86, 0x44, 0x00, 0x90, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86, 0x1c, 0x00, 0xe0, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86,
0x18, 0x00, 0xe8, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x86, 0x14, 0x00, 0xf0, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86, 0x10, 0x00, 0xf8, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0x4c, 0x8c,
0x04, 0x00, 0x00, 0x00, 0xff, 0x06, 0x00, 0x00, 0x00, 0xc6, 0x4f, 0x00,
0x88, 0x73, 0x00, 0x86, 0x0c, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86, 0x04, 0x00, 0x08, 0x01,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86,
0x08, 0x00, 0x10, 0x01, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x86, 0x40, 0x00, 0x98, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x86, 0x80, 0x00, 0x18, 0x01,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x1a, 0x79, 0x00, 0x00,
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x0f, 0x00,
0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xec, 0x0f, 0x00, 0x3b, 0x78, 0x14, 0x24, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x3b, 0x78, 0x34, 0x4c,
0x00, 0x00, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa8, 0x0e, 0x00,
0x3b, 0x78, 0x10, 0x24, 0x00, 0x00, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0xe8, 0x0e, 0x00, 0x3b, 0x78, 0x0c, 0x4c, 0x00, 0x00, 0x20, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x28, 0x0f, 0x00, 0x3b, 0x78, 0x04, 0x4c,
0x00, 0x00, 0x60, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x0e, 0x00,
0x3b, 0x78, 0x38, 0x4c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x05, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x42, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x3c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x2c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x48, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x44, 0x4c,
0x20, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x12, 0x78, 0x4d, 0x24, 0x20, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07,
0x00, 0xc6, 0x0f, 0x00, 0x3b, 0x78, 0x1c, 0x44, 0x00, 0x00, 0x20, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x3b, 0x78, 0x18, 0x4d,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x3c, 0x72, 0x40, 0x14, 0x34, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x4f, 0x08, 0x3c, 0x72, 0x48, 0x10, 0x34, 0x00, 0x00, 0x00,
0x48, 0x08, 0x00, 0x00, 0x00, 0xee, 0x8b, 0x00, 0x05, 0x78, 0x34, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x02,
0x3c, 0x72, 0x3e, 0x14, 0x36, 0x00, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x20, 0x14, 0x0c, 0x00, 0x00, 0x00,
0x20, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x05, 0x3c, 0x72, 0x42, 0x14,
0x0e, 0x00, 0x00, 0x00, 0x42, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x3c, 0x14, 0x04, 0x00, 0x00, 0x00, 0x3c, 0x08, 0x00, 0x00,
0x00, 0x70, 0x2f, 0x04, 0x3c, 0x72, 0x2e, 0x14, 0x06, 0x00, 0x00, 0x00,
0x2e, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x28, 0x14,
0x38, 0x00, 0x00, 0x00, 0x28, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x2c, 0x14, 0x3a, 0x00, 0x00, 0x00, 0x2c, 0x08, 0x00, 0x00,
0x00, 0x64, 0x0b, 0x00, 0x3b, 0x78, 0x14, 0x44, 0x00, 0x00, 0x40, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x6c, 0x0e, 0x02, 0x3c, 0x72, 0x32, 0x10,
0x0c, 0x00, 0x00, 0x00, 0x32, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x2a, 0x10, 0x0e, 0x00, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x00,
0x00, 0x64, 0x0b, 0x04, 0x3b, 0x78, 0x0c, 0x44, 0x00, 0x00, 0x60, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0xac, 0x0e, 0x02, 0x3c, 0x72, 0x36, 0x10,
0x36, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0xe4, 0x0b, 0x04,
0x3b, 0x78, 0x08, 0x44, 0x00, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x2c, 0x07, 0x02, 0x3c, 0x72, 0x30, 0x10, 0x04, 0x00, 0x00, 0x00,
0x30, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x34, 0x10,
0x06, 0x00, 0x00, 0x00, 0x34, 0x08, 0x00, 0x00, 0x00, 0x64, 0x0b, 0x00,
0x3b, 0x78, 0x04, 0x4d, 0x00, 0x00, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x02, 0x05, 0x78, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x46, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x19, 0x79, 0x5d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x68, 0x0e, 0x00, 0x3c, 0x72, 0x38, 0x10, 0x38, 0x00, 0x00, 0x00,
0x22, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x46, 0x10,
0x3a, 0x00, 0x00, 0x00, 0x46, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0b, 0x00,
0x12, 0x78, 0x4e, 0x4c, 0x40, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07,
0x00, 0xc4, 0x0f, 0x00, 0x12, 0x78, 0x4f, 0x24, 0x40, 0x00, 0x00, 0x00,
0xff, 0x3c, 0x8e, 0x07, 0x00, 0xc6, 0x0f, 0x00, 0x3b, 0x78, 0x24, 0x4e,
0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x3c, 0x72, 0x44, 0x18, 0x1c, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00,
0x00, 0x64, 0x8b, 0x04, 0x3b, 0x78, 0x10, 0x4f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0xe8, 0x0e, 0x02, 0x3b, 0x78, 0x20, 0x4e,
0x00, 0x00, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xe4, 0x0e, 0x00,
0x3c, 0x72, 0x42, 0x18, 0x1e, 0x00, 0x00, 0x00, 0x42, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x40, 0x18, 0x14, 0x00, 0x00, 0x00,
0x40, 0x08, 0x00, 0x00, 0x00, 0x70, 0x2f, 0x04, 0x3c, 0x72, 0x3e, 0x18,
0x16, 0x00, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x3c, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x3c, 0x08, 0x00, 0x00,
0x00, 0x70, 0x4f, 0x04, 0x3c, 0x72, 0x2e, 0x18, 0x0e, 0x00, 0x00, 0x00,
0x2e, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x28, 0x18,
0x08, 0x00, 0x00, 0x00, 0x28, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x05,
0x3c, 0x72, 0x2c, 0x18, 0x0a, 0x00, 0x00, 0x00, 0x2c, 0x08, 0x00, 0x00,
0x00, 0x64, 0x0b, 0x00, 0x3b, 0x78, 0x18, 0x4e, 0x00, 0x00, 0x80, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x02, 0x3c, 0x72, 0x32, 0x04,
0x1c, 0x00, 0x00, 0x00, 0x32, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x2a, 0x04, 0x1e, 0x00, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x00,
0x00, 0xe4, 0x0b, 0x04, 0x3b, 0x78, 0x1c, 0x4e, 0x00, 0x00, 0x60, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x6c, 0x0e, 0x02, 0x3c, 0x72, 0x30, 0x04,
0x0c, 0x00, 0x00, 0x00, 0x30, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x34, 0x04, 0x0e, 0x00, 0x00, 0x00, 0x34, 0x08, 0x00, 0x00,
0x00, 0xe4, 0x0b, 0x04, 0x3b, 0x78, 0x0c, 0x4f, 0x00, 0x00, 0x08, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0xac, 0x0e, 0x02, 0x3c, 0x72, 0x3a, 0x04,
0x14, 0x00, 0x00, 0x00, 0x48, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x36, 0x04, 0x16, 0x00, 0x00, 0x00, 0x36, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x38, 0x04, 0x08, 0x00, 0x00, 0x00,
0x38, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x46, 0x04,
0x0a, 0x00, 0x00, 0x00, 0x46, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0b, 0x00,
0x24, 0x78, 0x04, 0x5d, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x06, 0x12, 0x78, 0x05, 0x5d, 0x0f, 0x00, 0x00, 0x00,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xc8, 0x0f, 0x00, 0x12, 0x78, 0x04, 0x04,
0x70, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x8e, 0x07, 0x00, 0xc8, 0x0f, 0x00,
0x12, 0x78, 0x04, 0x04, 0x10, 0x00, 0x00, 0x00, 0x5d, 0x78, 0x8e, 0x07,
0x00, 0xca, 0x0f, 0x00, 0x24, 0x78, 0x04, 0x05, 0x80, 0x00, 0x00, 0x00,
0x04, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x4c, 0x4c,
0x60, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xc8, 0x0f, 0x00,
0x12, 0x78, 0x48, 0x04, 0x60, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x3b, 0x78, 0x14, 0x4c, 0x00, 0x00, 0x40, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x3b, 0x78, 0x08, 0x48,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x28, 0x0f, 0x00,
0x3b, 0x78, 0x04, 0x48, 0x00, 0x00, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0xa2, 0x0e, 0x00, 0x3c, 0x72, 0x44, 0x10, 0x24, 0x00, 0x00, 0x00,
0x44, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x8f, 0x04, 0x3c, 0x72, 0x42, 0x10,
0x26, 0x00, 0x00, 0x00, 0x42, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x40, 0x10, 0x20, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x3e, 0x10, 0x22, 0x00, 0x00, 0x00,
0x3e, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x3c, 0x10,
0x1c, 0x00, 0x00, 0x00, 0x3c, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x2f, 0x04,
0x3c, 0x72, 0x2e, 0x10, 0x1e, 0x00, 0x00, 0x00, 0x2e, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x28, 0x10, 0x18, 0x00, 0x00, 0x00,
0x28, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x2c, 0x10,
0x1a, 0x00, 0x00, 0x00, 0x2c, 0x08, 0x00, 0x00, 0x00, 0xe4, 0x0b, 0x00,
0x3b, 0x78, 0x10, 0x4c, 0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x6c, 0x0e, 0x02, 0x3c, 0x72, 0x3a, 0x0c, 0x20, 0x00, 0x00, 0x00,
0x3a, 0x08, 0x00, 0x00, 0x00, 0x70, 0x4f, 0x04, 0x3c, 0x72, 0x36, 0x0c,
0x22, 0x00, 0x00, 0x00, 0x36, 0x08, 0x00, 0x00, 0x00, 0x64, 0x0b, 0x04,
0x3b, 0x78, 0x20, 0x4c, 0x00, 0x00, 0x60, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0xac, 0x0e, 0x02, 0x3c, 0x72, 0x32, 0x0c, 0x24, 0x00, 0x00, 0x00,
0x32, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x2a, 0x0c,
0x26, 0x00, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x30, 0x0c, 0x1c, 0x00, 0x00, 0x00, 0x30, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x34, 0x0c, 0x1e, 0x00, 0x00, 0x00,
0x34, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x38, 0x0c,
0x18, 0x00, 0x00, 0x00, 0x38, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x46, 0x0c, 0x1a, 0x00, 0x00, 0x00, 0x46, 0x08, 0x00, 0x00,
0x00, 0xe4, 0x0b, 0x00, 0x3b, 0x78, 0x0c, 0x4c, 0x00, 0x00, 0x80, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0xec, 0x0e, 0x02, 0x3c, 0x72, 0x40, 0x08,
0x14, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x09,
0x3c, 0x72, 0x3a, 0x04, 0x14, 0x00, 0x00, 0x00, 0x3a, 0x08, 0x00, 0x00,
0x00, 0x6e, 0x0b, 0x00, 0x11, 0x72, 0x15, 0x87, 0x84, 0x00, 0x00, 0x00,
0xff, 0x28, 0x8f, 0x07, 0x00, 0xe2, 0x0f, 0x02, 0x3c, 0x72, 0x3e, 0x08,
0x16, 0x00, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x12, 0x78, 0x14, 0x84, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xc4, 0x0f, 0x00, 0x11, 0x72, 0x87, 0x87, 0x84, 0x00, 0x00, 0x00,
0xff, 0x38, 0x8f, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x11, 0x72, 0x4b, 0x14,
0x4b, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x8f, 0x07, 0x00, 0xc6, 0x0f, 0x00,
0x3c, 0x72, 0x36, 0x04, 0x16, 0x00, 0x00, 0x00, 0x36, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0b, 0x00, 0x12, 0x78, 0x14, 0x5d, 0x03, 0x00, 0x00, 0x00,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xcc, 0x0f, 0x00, 0x12, 0x78, 0x17, 0x15,
0xe0, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x02,
0x3c, 0x72, 0x44, 0x08, 0x10, 0x00, 0x00, 0x00, 0x44, 0x08, 0x00, 0x00,
0x00, 0x66, 0x2f, 0x00, 0x10, 0x72, 0x84, 0x17, 0x84, 0x00, 0x00, 0x00,
0xff, 0xe1, 0xff, 0x07, 0x00, 0xca, 0x0f, 0x00, 0x3c, 0x72, 0x32, 0x04,
0x10, 0x00, 0x00, 0x00, 0x32, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x19, 0x78, 0x17, 0xff, 0x01, 0x00, 0x00, 0x00, 0x5d, 0x16, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x18, 0x14, 0x02, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xcc, 0x0f, 0x00, 0x3c, 0x72, 0x42, 0x08,
0x12, 0x00, 0x00, 0x00, 0x42, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x12, 0x78, 0x17, 0x17, 0xf0, 0xff, 0xff, 0x7f, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xce, 0x0f, 0x00, 0x3c, 0x72, 0x2a, 0x04, 0x12, 0x00, 0x00, 0x00,
0x2a, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x00, 0x3c, 0x72, 0x2e, 0x08,
0x22, 0x00, 0x00, 0x00, 0x2e, 0x08, 0x00, 0x00, 0x00, 0x70, 0x4f, 0x08,
0x3c, 0x72, 0x34, 0x04, 0x22, 0x00, 0x00, 0x00, 0x34, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0f, 0x00, 0x10, 0x78, 0x1a, 0x18, 0x01, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xc4, 0x0f, 0x00, 0x10, 0x78, 0x19, 0x17,
0x40, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xca, 0x0f, 0x00,
0x3c, 0x72, 0x3c, 0x08, 0x20, 0x00, 0x00, 0x00, 0x3c, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0f, 0x00, 0x32, 0x7a, 0x40, 0x40, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x0f, 0x00, 0x3c, 0x72, 0x30, 0x04,
0x20, 0x00, 0x00, 0x00, 0x30, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x32, 0x7a, 0x41, 0x41, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x1b, 0x17, 0x80, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04, 0x32, 0x7a, 0x3a, 0x3a,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x78, 0x1d, 0x17, 0xc0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x3b, 0x3b, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x48, 0x1a,
0x01, 0x00, 0x00, 0x00, 0x19, 0x02, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x3c, 0x72, 0x2c, 0x08, 0x0e, 0x00, 0x00, 0x00, 0x2c, 0x08, 0x00, 0x00,
0x00, 0x62, 0x8f, 0x00, 0x30, 0x72, 0x58, 0xff, 0x40, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xce, 0x0f, 0x00, 0x3c, 0x72, 0x46, 0x04,
0x0e, 0x00, 0x00, 0x00, 0x46, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x30, 0x72, 0x5e, 0xff, 0x41, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x50, 0x1a, 0x01, 0x00, 0x00, 0x00,
0x1b, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x48,
0x85, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf4, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x52, 0x1a, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x1c, 0x18, 0x08, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xc6, 0x0f, 0x00, 0x3c, 0x72, 0x28, 0x08,
0x0c, 0x00, 0x00, 0x00, 0x28, 0x08, 0x00, 0x00, 0x00, 0x64, 0x0b, 0x08,
0x32, 0x7a, 0x44, 0x44, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x02, 0x10, 0x78, 0x18, 0x18, 0x09, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x45, 0x45,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x1e, 0x17, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x32, 0x32, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x0b, 0xff,
0x3a, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3c, 0x72, 0x38, 0x04, 0x0c, 0x00, 0x00, 0x00, 0x38, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0b, 0x00, 0x30, 0x72, 0x09, 0xff, 0x3b, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x32, 0x7a, 0x33, 0x33,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x19, 0x78, 0x16, 0xff, 0x05, 0x00, 0x00, 0x00, 0x15, 0x14, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x32, 0x7a, 0x42, 0x42, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x58, 0x58,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe2, 0x0f, 0x00,
0x32, 0x7a, 0x43, 0x43, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x5e, 0x5e, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x05, 0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x2a, 0x2a,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x0b, 0x0b, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x05,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x2b, 0x2b, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x09, 0x09,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x6b, 0xff, 0x44, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0x15, 0xff, 0x1f, 0x00, 0x00, 0x00,
0x15, 0x14, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x64, 0xff,
0x45, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x72, 0x00, 0x50, 0x85, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf2, 0x03,
0x00, 0xe2, 0x0f, 0x08, 0x30, 0x72, 0x50, 0xff, 0x33, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x52,
0x85, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf4, 0x03, 0x00, 0xe2, 0x0f, 0x08,
0x30, 0x72, 0x52, 0xff, 0x32, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x72, 0x26, 0x17, 0x18, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x2e, 0x2e,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x54, 0x18, 0x01, 0x00, 0x00, 0x00, 0x1b, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x2f, 0x2f, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x1e,
0x85, 0x00, 0x00, 0x00, 0x70, 0x62, 0xfa, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x32, 0x7a, 0x34, 0x34, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x32, 0x7a, 0x35, 0x35, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x14, 0x14,
0x17, 0x00, 0x00, 0x00, 0xff, 0x08, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x5b, 0xff, 0x42, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x15, 0x15, 0x16, 0x00, 0x00, 0x00,
0xff, 0x10, 0x8f, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x63, 0xff,
0x43, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0xb9, 0x7a, 0x04, 0x00, 0xc0, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x53, 0xff, 0x2a, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0x5c, 0xff,
0x1f, 0x00, 0x00, 0x00, 0x5d, 0x14, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x51, 0xff, 0x2b, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x72, 0x4e, 0x18, 0x19, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x42, 0xff,
0x42, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x72, 0x00, 0x26, 0x85, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x03,
0x00, 0xe2, 0x0f, 0x08, 0x30, 0x72, 0x43, 0xff, 0x43, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x6b, 0x6b,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x06, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x2a, 0xff, 0x2a, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x64, 0x64, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x06, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x2b, 0xff,
0x2b, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x52, 0x52, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x06,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x3e, 0x3e, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x50, 0x50,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x06, 0x00, 0xe2, 0x0f, 0x00,
0x32, 0x7a, 0x3f, 0x3f, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0x87, 0xff, 0x02, 0x00, 0x00, 0x00,
0x87, 0x16, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x36, 0x36,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x19, 0x78, 0x0f, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x84, 0x14, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x37, 0x37, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x92, 0x78, 0x04, 0x04,
0xff, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x32, 0x7a, 0x3c, 0x3c, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x54, 0x85, 0x00, 0x00, 0x00,
0x70, 0x62, 0xfa, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x3d, 0x3d,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x78, 0x08, 0x14, 0x40, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x30, 0x30, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x32, 0x7a, 0x31, 0x31,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0x72, 0xff, 0x2e, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x79, 0xff, 0x2f, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x7c, 0xff,
0x34, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0x76, 0xff, 0x35, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x15, 0x15, 0xfc, 0xff, 0xff, 0x3f,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x4c, 0x1c,
0x01, 0x00, 0x00, 0x00, 0x19, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x11, 0x72, 0x04, 0x5c, 0x5d, 0x00, 0x00, 0x00, 0xff, 0x28, 0x8f, 0x07,
0x00, 0xe2, 0x0f, 0x02, 0x30, 0x72, 0x5a, 0xff, 0x3e, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x4e,
0x85, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf6, 0x03, 0x00, 0xe2, 0x0f, 0x08,
0x30, 0x72, 0x62, 0xff, 0x3f, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x6d, 0x42, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x04, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x4e, 0xff,
0x36, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x65, 0x43, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x04,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x4d, 0xff, 0x37, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x55, 0x2a,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x04, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x81, 0xff, 0x3c, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x54, 0x2b, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x04, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x73, 0xff,
0x3d, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x12, 0x78, 0x87, 0x87, 0xe0, 0xff, 0xff, 0x0f, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x67, 0xff, 0x30, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x0a, 0x0f,
0x84, 0x00, 0x00, 0x00, 0xff, 0x10, 0x8f, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x66, 0xff, 0x31, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x08, 0x85, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf0, 0x03, 0x00, 0xe2, 0x0f, 0x08, 0x30, 0x72, 0x3e, 0xff,
0x3e, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x72, 0x72, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x06,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x3f, 0xff, 0x3f, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x79, 0x79,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x06, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x36, 0xff, 0x36, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x7c, 0x7c, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x06, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x37, 0xff,
0x37, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x76, 0x76, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x06,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x2c, 0x2c, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0xff,
0x04, 0x00, 0x00, 0x00, 0x70, 0x52, 0xfa, 0x0b, 0x00, 0xe2, 0x0f, 0x00,
0x32, 0x7a, 0x2d, 0x2d, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x24, 0x17, 0x01, 0x00, 0x00, 0x00,
0x1c, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x46, 0x46,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x15, 0x16, 0x01, 0x00, 0x00, 0x00, 0x15, 0x0a, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x08, 0x47, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x4c,
0x85, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf8, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x4a, 0x4b, 0x80, 0x00, 0x00, 0x00, 0x4a, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x04, 0x04, 0xe0, 0xff, 0xff, 0xff,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00, 0x10, 0x72, 0x1a, 0x1c,
0x1b, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x72, 0x18, 0x18, 0x1d, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x11, 0x72, 0x0a, 0x0a, 0x87, 0x00, 0x00, 0x00,
0xff, 0xf2, 0x8f, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x7f, 0xff,
0x2c, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x81, 0x81, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x04,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x6a, 0xff, 0x2d, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x73, 0x73,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x04, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x60, 0xff, 0x46, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x67, 0x67, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x04, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x5f, 0xff,
0x08, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x66, 0x66, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x04,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x8b, 0xff, 0x2e, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x5a, 0x5a,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x75, 0xff, 0x2f, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x62, 0x62, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x05, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x69, 0xff,
0x34, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x4e, 0x4e, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x68, 0xff, 0x35, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x4d, 0x4d,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05, 0x00, 0xe2, 0x0f, 0x00,
0x32, 0x7a, 0x28, 0x28, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x59, 0x3e, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x06, 0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x29, 0x29,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x61, 0x3f, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x06,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x38, 0x38, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x4f, 0x36,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x06, 0x00, 0xe2, 0x0f, 0x00,
0x32, 0x7a, 0x39, 0x39, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x4c, 0x37, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x06, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x1c, 0x1c,
0x01, 0x00, 0x00, 0x00, 0x1d, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x78, 0x0e, 0x14, 0x80, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x04, 0x24, 0x78, 0x05, 0x5d, 0x01, 0x00, 0x00, 0x00,
0x04, 0x0a, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x14,
0x85, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf2, 0x03, 0x00, 0xc4, 0x0f, 0x00,
0x0c, 0x72, 0x00, 0x24, 0x85, 0x00, 0x00, 0x00, 0x70, 0x62, 0xfc, 0x03,
0x00, 0xe4, 0x0f, 0x08, 0x0c, 0x72, 0x00, 0x1a, 0x85, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf6, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x11, 0x72, 0x87, 0x0a,
0x15, 0x00, 0x00, 0x00, 0xff, 0x10, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x19, 0x78, 0x88, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x84, 0x14, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x12, 0x78, 0x48, 0x4a, 0x40, 0x00, 0x00, 0x00,
0xff, 0x3c, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x04, 0x12, 0x78, 0x49, 0x4a,
0x60, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x6c, 0xff, 0x44, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x18, 0x85, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf8, 0x03, 0x00, 0xe2, 0x0f, 0x08, 0x30, 0x72, 0x7b, 0xff,
0x45, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x78, 0x14, 0x14, 0xc0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x89, 0xff, 0x32, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x0a, 0x4a,
0x20, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x77, 0xff, 0x33, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x5b, 0x5b, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xa5, 0xff,
0x40, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x63, 0x63, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x7d, 0xff, 0x41, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x53, 0x53,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x8f, 0xff, 0x3a, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x51, 0x51, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x71, 0xff,
0x3b, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x7f, 0x7f, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x06,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xa3, 0xff, 0x3c, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x6a, 0x6a,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x06, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x99, 0xff, 0x3d, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x60, 0x60, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x06, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x91, 0xff,
0x30, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x5f, 0x5f, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x06,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x70, 0xff, 0x31, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x8b, 0x8b,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0xa1, 0xff, 0x28, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x08, 0x78, 0x75, 0x75, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x05, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x8d, 0xff,
0x28, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x69, 0x69, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x9b, 0xff, 0x29, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x08, 0x78, 0x68, 0x68,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x9d, 0xff, 0x29, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x1c, 0x85, 0x00, 0x00, 0x00,
0x70, 0x62, 0xfc, 0x03, 0x00, 0xe2, 0x0f, 0x08, 0x30, 0x72, 0x93, 0xff,
0x38, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x0c, 0x72, 0x00, 0x0e, 0x85, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf8, 0x03,
0x00, 0xe2, 0x0f, 0x08, 0x30, 0x72, 0x95, 0xff, 0x38, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x14,
0x85, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf6, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x6f, 0xff, 0x39, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x11, 0x72, 0x88, 0x88, 0x05, 0x00, 0x00, 0x00,
0xff, 0x10, 0x8f, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x6e, 0xff,
0x39, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3b, 0x78, 0x34, 0x4a, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x42, 0x00, 0x00,
0x00, 0xa2, 0x02, 0x00, 0x30, 0x72, 0x74, 0xff, 0x2c, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x30, 0x72, 0x9f, 0xff,
0x2d, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3b, 0x78, 0x24, 0x4a, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x42, 0x00, 0x00,
0x00, 0xe2, 0x02, 0x00, 0x30, 0x72, 0x97, 0xff, 0x46, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x08, 0xff,
0x08, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3b, 0x78, 0x44, 0x4a, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x42, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x12, 0x78, 0x88, 0x88, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xc6, 0x0f, 0x00, 0x3b, 0x78, 0x14, 0x4a,
0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x11, 0x78, 0x87, 0x87, 0x00, 0x20, 0x00, 0x00, 0xff, 0x10, 0x8e, 0x07,
0x00, 0xc6, 0x0f, 0x00, 0x3b, 0x78, 0x40, 0x0a, 0x00, 0x00, 0xa0, 0x00,
0x00, 0x42, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x08, 0x78, 0x6c, 0x6c,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x04, 0x00, 0xc6, 0x0f, 0x00,
0x3b, 0x78, 0x30, 0x0a, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x42, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x08, 0x78, 0x7b, 0x7b, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x04, 0x00, 0xc6, 0x0f, 0x00, 0x3b, 0x78, 0x20, 0x0a,
0x00, 0x00, 0xe0, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x08, 0x78, 0x89, 0x89, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x04,
0x00, 0xc6, 0x0f, 0x00, 0x3b, 0x78, 0x10, 0x0a, 0x00, 0x00, 0x00, 0x01,
0x00, 0x42, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x08, 0x78, 0x77, 0x77,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x04, 0x00, 0xc6, 0x0f, 0x00,
0x3b, 0x78, 0x3c, 0x48, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x42, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x08, 0x78, 0xa5, 0xa5, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x04, 0x00, 0xc6, 0x0f, 0x00, 0x3b, 0x78, 0x2c, 0x48,
0x00, 0x00, 0xc0, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x08, 0x78, 0x7d, 0x7d, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x04,
0x00, 0xc6, 0x0f, 0x00, 0x3b, 0x78, 0x1c, 0x48, 0x00, 0x00, 0xe0, 0x00,
0x00, 0x42, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x08, 0x78, 0x8f, 0x8f,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x04, 0x00, 0xc6, 0x0f, 0x00,
0x3b, 0x78, 0x0c, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x08, 0x78, 0x71, 0x71, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x04, 0x00, 0xc6, 0x0f, 0x00, 0x3b, 0x78, 0x38, 0x49,
0x00, 0x00, 0xa0, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x08, 0x78, 0xa3, 0xa3, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x06,
0x00, 0xc6, 0x0f, 0x00, 0x3b, 0x78, 0x28, 0x49, 0x00, 0x00, 0xc0, 0x00,
0x00, 0x42, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x08, 0x78, 0x99, 0x99,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x06, 0x00, 0xc6, 0x0f, 0x00,
0x3b, 0x78, 0x18, 0x49, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x42, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x08, 0x78, 0x91, 0x91, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x06, 0x00, 0xc6, 0x0f, 0x00, 0x3b, 0x78, 0x04, 0x49,
0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x08, 0x78, 0x70, 0x70, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x06,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0xa1, 0xa1, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x05, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0x9b, 0x9b,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x78, 0x93, 0x93, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0x6f, 0x6f, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x05, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0x8d, 0x8d,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x05, 0x00, 0xc4, 0x0f, 0x00,
0x08, 0x78, 0x9d, 0x9d, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x05,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0x95, 0x95, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x05, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0x6e, 0x6e,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x78, 0x74, 0x74, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0x9f, 0x9f, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0x97, 0x97,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x08, 0x78, 0x78, 0x08, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x47, 0xd9, 0x00, 0x00, 0xb0, 0x10, 0x00, 0x00,
0x00, 0x00, 0x80, 0x03, 0x00, 0xec, 0x0f, 0x00, 0x24, 0x74, 0x08, 0xff,
0x00, 0x00, 0xfe, 0x42, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0xcf, 0x00,
0x82, 0x78, 0x04, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x4a, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x2f, 0x00, 0x02, 0x78, 0xa2, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x7a, 0x08, 0x08, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x78, 0x56, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xa4, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x78, 0x9e, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x78, 0x08, 0x08, 0x00, 0x00, 0xfe, 0x42,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x78, 0x94, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x74, 0x57, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x78, 0x84, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x48, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x0b, 0x78, 0x00, 0x08, 0x00, 0x00, 0x80, 0xff, 0x00, 0xd0, 0xf1, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xa0, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00, 0x24, 0x74, 0x96, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x74, 0x98, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x92, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x86, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x74, 0x83, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x82, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x47, 0x89, 0x00, 0x00,
0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xec, 0x0f, 0x00,
0x21, 0x72, 0x6c, 0x6c, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x6b, 0x6b, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x5b, 0x5b,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x6d, 0x6d, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0xa5, 0xa5, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x58, 0x58,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x59, 0x59, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x5a, 0x5a, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0xa3, 0xa3,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x81, 0x81, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x8b, 0x8b, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x72, 0x72,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0xa1, 0xa1, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x8d, 0x8d, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x74, 0x74,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x7f, 0x7f, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0x6c, 0x6c, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0x6b, 0x6b,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x78, 0x5b, 0x5b, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xa2, 0x00, 0x6c, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x02, 0x00, 0x20, 0x78, 0x6d, 0x6d,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x4a, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x02, 0x00, 0x20, 0x78, 0xa5, 0xa5, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xa4, 0x00,
0x5b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x58, 0x58, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x57, 0x00, 0x6d, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x59, 0x59,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x56, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x5a, 0x5a, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x48, 0x00,
0x58, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0xa3, 0xa3, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xa0, 0x00, 0x59, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x81, 0x81,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x9e, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x8b, 0x8b, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x96, 0x00,
0xa3, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x72, 0x72, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x98, 0x00, 0x81, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0xa1, 0xa1,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x94, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x8d, 0x8d, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x92, 0x00,
0x72, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x74, 0x74, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x86, 0x00, 0xa1, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x7f, 0x7f,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x84, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x08, 0x73, 0x83, 0x00, 0x74, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x64, 0x02, 0x00, 0x08, 0x73, 0x82, 0x00,
0x7f, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x66, 0x02, 0x00,
0x02, 0x7c, 0x59, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0xef, 0x00, 0x24, 0x7e, 0x5b, 0xff, 0x04, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x8d, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0x8b, 0xff, 0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x5a, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x9c, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0x8e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x9a, 0xff, 0x04, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x81, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0x58, 0xff, 0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x7e, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x90, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xc4, 0x0f, 0x00,
0x24, 0x7e, 0x8c, 0xff, 0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x7e, 0x8a, 0xff, 0x04, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x7e, 0x80, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x7e, 0x7f, 0xff, 0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x47, 0x89, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
0x00, 0x00, 0x80, 0x03, 0x00, 0xec, 0x0f, 0x00, 0x21, 0x72, 0x7b, 0x7b,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x64, 0x64, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x63, 0x63, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x65, 0x65,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x7d, 0x7d, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x5e, 0x5e, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x61, 0x61,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x62, 0x62, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x99, 0x99, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x73, 0x73,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x75, 0x75, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x79, 0x79, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x9b, 0x9b,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x9d, 0x9d, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x9f, 0x9f, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x6a, 0x6a,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x78, 0x7b, 0x7b, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0x64, 0x64, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0x63, 0x63,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x59, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x02, 0x00, 0x20, 0x78, 0x65, 0x65, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x5b, 0x00,
0x64, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x02, 0x00,
0x20, 0x78, 0x7d, 0x7d, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x8b, 0x00, 0x63, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x5e, 0x5e,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x8d, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x61, 0x61, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x9c, 0x00,
0x7d, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x62, 0x62, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x9a, 0x00, 0x5e, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x99, 0x99,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x5a, 0x00, 0x61, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x73, 0x73, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x58, 0x00,
0x62, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x75, 0x75, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x90, 0x00, 0x99, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x79, 0x79,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x8e, 0x00, 0x73, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x9b, 0x9b, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x8c, 0x00,
0x75, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x9d, 0x9d, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x8a, 0x00, 0x79, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x9f, 0x9f,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x81, 0x00, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x6a, 0x6a, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x80, 0x00,
0x9d, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x08, 0x73, 0x7f, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x64, 0x02, 0x00, 0x08, 0x73, 0x7e, 0x00, 0x6a, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x66, 0x02, 0x00, 0x24, 0x7e, 0x7b, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0xef, 0x00,
0x02, 0x7c, 0x7a, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x7d, 0xff, 0x04, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x74, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0x79, 0xff, 0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x6d, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x75, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0x6a, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x73, 0xff, 0x04, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x63, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0x72, 0xff, 0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xc4, 0x0f, 0x00, 0x24, 0x7e, 0x6c, 0xff, 0x04, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x7e, 0x6b, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x7e, 0x65, 0xff, 0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x7e, 0x64, 0xff, 0x04, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x7e, 0x62, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x47, 0x89, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xec, 0x0f, 0x00, 0x21, 0x72, 0x89, 0x89, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x52, 0x52,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x72, 0x53, 0x53, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x55, 0x55, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x8f, 0x8f,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x0b, 0x0b, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x4f, 0x4f, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x4e, 0x4e,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x72, 0x91, 0x91, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x67, 0x67, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x69, 0x69,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x7c, 0x7c, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x93, 0x93, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x95, 0x95,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x72, 0x97, 0x97, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x60, 0x60, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0x89, 0x89,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x78, 0x52, 0x52, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0x53, 0x53, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x7b, 0x00,
0x89, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x02, 0x00,
0x20, 0x78, 0x55, 0x55, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x7d, 0x00, 0x52, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x02, 0x00, 0x20, 0x78, 0x8f, 0x8f,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x7a, 0x00, 0x53, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x0b, 0x0b, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x79, 0x00,
0x55, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x4f, 0x4f, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x75, 0x00, 0x8f, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x4e, 0x4e,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x74, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x91, 0x91, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x73, 0x00,
0x4f, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x67, 0x67, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x72, 0x00, 0x4e, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x69, 0x69,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x6d, 0x00, 0x91, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x7c, 0x7c, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x6c, 0x00,
0x67, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x93, 0x93, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x6b, 0x00, 0x69, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x95, 0x95,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x6a, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x97, 0x97, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x65, 0x00,
0x93, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x60, 0x60, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x64, 0x00, 0x95, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x08, 0x73, 0x63, 0x00,
0x97, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x64, 0x02, 0x00,
0x08, 0x73, 0x62, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x66, 0x02, 0x00, 0x24, 0x74, 0x7c, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0xef, 0x00, 0x47, 0x89, 0x00, 0x00,
0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xec, 0x0f, 0x00,
0x21, 0x72, 0x66, 0x66, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x77, 0x77, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x71, 0x71,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x70, 0x70, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x76, 0x76, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x6f, 0x6f,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x6e, 0x6e, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x78, 0x78, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x50, 0x50,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x51, 0x51, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x54, 0x54, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x09, 0x09,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x4c, 0x4c, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x72, 0x4d, 0x4d, 0x08, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x0a, 0x68,
0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x72, 0x08, 0x5f, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0x68, 0x66, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0x7c, 0x77,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x78, 0x71, 0x71, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0x69, 0x70, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x68, 0x00,
0x68, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x78, 0x66, 0x76, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x7c, 0x00, 0x7c, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x20, 0x78, 0x61, 0x6f,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x71, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0e, 0x00, 0x20, 0x78, 0x60, 0x6e, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x69, 0x00,
0x69, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x78, 0x5f, 0x78, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x66, 0x00, 0x66, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x20, 0x78, 0x50, 0x50,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x61, 0x00, 0x61, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x78, 0x51, 0x51, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x60, 0x00,
0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x78, 0x54, 0x54, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x78, 0x00, 0x50, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x09, 0x09,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x77, 0x00, 0x51, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x4c, 0x4c, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x76, 0x00,
0x54, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x4d, 0x4d, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x70, 0x00, 0x09, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x0a, 0x0a,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x6f, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x08, 0x08, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x6e, 0x00,
0x4d, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x08, 0x73, 0x67, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x08, 0x73, 0x5f, 0x00, 0x5f, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x08, 0x73, 0x5e, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x47, 0x79, 0x00, 0x00, 0x50, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xca, 0x0f, 0x00, 0x02, 0x7c, 0x78, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x77, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0x71, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x76, 0xff, 0x04, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x6e, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0x70, 0xff, 0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x67, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x6f, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0x60, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x69, 0xff, 0x04, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xc4, 0x0f, 0x00, 0x24, 0x7e, 0x68, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x7e, 0x66, 0xff, 0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x7e, 0x61, 0xff, 0x04, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x7e, 0x5f, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x7e, 0x5e, 0xff, 0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x47, 0x79, 0x00, 0x00, 0x50, 0x1b, 0x00, 0x00,
0x00, 0x00, 0x80, 0x03, 0x00, 0xcc, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x6c,
0x6b, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe2, 0xcf, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x7b, 0x64, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x08, 0x72, 0x08, 0x6c, 0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x89,
0x52, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0x0f, 0x00, 0x08, 0x72, 0x0a, 0x7b, 0x64, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xe2, 0x2f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x77, 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x08,
0x5b, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0x0f, 0x00, 0x08, 0x72, 0x56, 0x89, 0x52, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x0a, 0x63, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x9e, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x72, 0x7a, 0x77,
0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x74, 0xa4, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x72, 0x08, 0x08, 0x5b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x96, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x56, 0x53, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x94, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x72, 0x0a, 0x0a,
0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x74, 0x92, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x7a, 0x51, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf7, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x9c, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x08, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x8e, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x72, 0x56, 0x56,
0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x74, 0x8a, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x0a, 0x65, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x82, 0x78, 0x04, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x72, 0x57, 0x7a, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x08, 0x08, 0x6d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x56,
0x55, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x0a, 0x0a, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x57, 0x54, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x08,
0xa5, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x56, 0x56, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x0a, 0x7d, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x7a, 0x57,
0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x57, 0x08, 0xa5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x56, 0x8f, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x83, 0x0a,
0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x7a, 0x71, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03,
0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x57, 0x58, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x56, 0x56,
0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x83, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x7a, 0x7a, 0x71, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x08, 0x57,
0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x56, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x0a, 0x83, 0x5e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x7a,
0x09, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x08, 0x59, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x56, 0x56, 0x0b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x0a,
0x61, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x7a, 0x7a, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x57, 0x08, 0x59, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x56,
0x4f, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x83, 0x0a, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x7a, 0x4c, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x57,
0x5a, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x56, 0x56, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x83, 0x62, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x7a, 0x7a,
0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x08, 0x57, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x56, 0x4e, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x0a, 0x83,
0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x7a, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03,
0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x08, 0xa3, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x56, 0x56,
0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x0a, 0x99, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x57, 0x7a, 0x4d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x08, 0x08,
0xa3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x56, 0x91, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x0a, 0x0a, 0x99, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x57,
0x70, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x0c,
0x0b, 0x72, 0x00, 0x08, 0x81, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x56, 0x56, 0x91, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x0a,
0x73, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x57, 0x57, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x08, 0x08, 0x81, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x56,
0x67, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x0a, 0x0a, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x57, 0x66, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x08,
0x8b, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x56, 0x56, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x0a, 0x75, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x7a, 0x57,
0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x57, 0x08, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x56, 0x69, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x0a, 0x0a,
0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x57, 0x72, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x7a, 0x68, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x83, 0x56,
0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x0a, 0x79, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x08, 0x57, 0x72, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x7a, 0x7a,
0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x83, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x0a, 0x0a, 0x79, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x08,
0xa1, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x7a, 0x76, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x56, 0x83, 0x7c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x0a,
0x9b, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x08, 0x08, 0xa1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x7a, 0x7a, 0x76, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x56,
0x93, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x0a, 0x0a, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x08, 0x8d, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x7a,
0x6f, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x56, 0x56, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x0a, 0x9d, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x57, 0x08,
0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x83, 0x7a, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x56, 0x95, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x0a, 0x0a,
0x9d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x57, 0x74, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x83, 0x6e, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x56, 0x56,
0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x0a, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x08, 0x57, 0x74, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x7a, 0x83,
0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x56, 0x97, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x57, 0x0a, 0x9f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x08,
0x7f, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x7a, 0x78, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x83, 0x56, 0x97, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x57,
0x6a, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x08, 0x08, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x7a, 0x7a, 0x78, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x83,
0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x89, 0x7f, 0x0a, 0x08, 0x00, 0x1f, 0x20, 0x0c, 0x00, 0x00, 0x0e, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x08, 0x72, 0x57, 0x57, 0x6a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x7a,
0x5f, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x0c,
0x08, 0x72, 0x83, 0x83, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0xe2, 0x0f, 0x00, 0x89, 0x7f, 0x56, 0x57, 0x00, 0x1f, 0x20, 0x0c,
0x00, 0x00, 0x0e, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x08, 0x72, 0x7a, 0x7a,
0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xc4, 0x0f, 0x00,
0x02, 0x78, 0xa2, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x89, 0x7f, 0x7e, 0x83, 0x00, 0x1f, 0x20, 0x0c,
0x00, 0x00, 0x0e, 0x00, 0x00, 0xe2, 0x0e, 0x00, 0x02, 0x78, 0xa0, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x02, 0x78, 0x98, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x89, 0x7f, 0x80, 0x7a, 0x00, 0x1f, 0x20, 0x0c,
0x00, 0x00, 0x0e, 0x00, 0x00, 0x22, 0x0f, 0x00, 0x02, 0x78, 0x86, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x02, 0x78, 0x9a, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x02, 0x78, 0x90, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x02, 0x78, 0x8c, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x08, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xc8, 0x2f, 0x00, 0x08, 0x72, 0x0a, 0x08, 0x0a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x57,
0x56, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x4f, 0x00,
0x0b, 0x72, 0x00, 0x83, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03,
0x00, 0xe4, 0x8f, 0x00, 0x08, 0x72, 0x56, 0x57, 0x56, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x7a,
0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03, 0x00, 0xe2, 0x0f, 0x01,
0x89, 0x7f, 0x57, 0x0a, 0x00, 0x1f, 0x40, 0x0c, 0x00, 0x00, 0x0e, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x08, 0x72, 0x7e, 0x83, 0x7e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x82, 0x7a,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe2, 0x0f, 0x00,
0x89, 0x7f, 0x83, 0x56, 0x00, 0x1f, 0x40, 0x0c, 0x00, 0x00, 0x0e, 0x00,
0x00, 0xa8, 0x0e, 0x00, 0x89, 0x7f, 0x80, 0x7e, 0x00, 0x1f, 0x40, 0x0c,
0x00, 0x00, 0x0e, 0x00, 0x00, 0xe8, 0x0e, 0x00, 0x89, 0x7f, 0x84, 0x82,
0x00, 0x1f, 0x40, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x22, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x0a, 0x57, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xc4, 0x2f, 0x00, 0x0b, 0x72, 0x00, 0x56, 0x83, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x4f, 0x00, 0x08, 0x72, 0x08, 0x0a,
0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x12, 0x78, 0xff, 0x5d, 0x03, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x80, 0x07,
0x00, 0xe4, 0x0f, 0x04, 0x08, 0x72, 0x7a, 0x56, 0x83, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x56, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x78, 0x00, 0x5d, 0x1f, 0x00, 0x00, 0x00, 0x70, 0x42, 0xf2, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x83, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x7e,
0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xc4, 0x8f, 0x00,
0x0b, 0x72, 0x00, 0x82, 0x84, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03,
0x00, 0xe4, 0x0f, 0x01, 0x08, 0x72, 0x80, 0x7e, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x7e, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x72, 0x84, 0x82, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0xe2, 0x0f, 0x00, 0x88, 0x83, 0x00, 0x87, 0x08, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x78, 0x82, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc6, 0x0f, 0x00,
0x88, 0x83, 0x00, 0x87, 0x7a, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x83, 0x00, 0x87, 0x80, 0x00, 0x01, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x83, 0x00, 0x87,
0x84, 0x80, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xec, 0x0f, 0x00, 0x84, 0x99, 0x48, 0x5d, 0x00, 0x00, 0x20, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x24, 0x74, 0x80, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x24, 0x74, 0x84, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x4a,
0x4b, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x2f, 0x00,
0x0b, 0x72, 0x00, 0x48, 0x49, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x0a, 0x4a, 0x4b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x4a, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x72, 0x57, 0x48, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x0c, 0x78, 0x00, 0x5d, 0x20, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf2, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x57,
0x0a, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xc8, 0x0f, 0x00,
0x08, 0x72, 0x08, 0x57, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x02, 0x78, 0x57, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xca, 0x0f, 0x00, 0x88, 0x93, 0x00, 0x5d,
0x08, 0x00, 0x20, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xec, 0x0f, 0x00, 0x84, 0x79, 0x48, 0x88, 0x00, 0x00, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x84, 0x79, 0x7a, 0x88,
0x00, 0x20, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00,
0x0b, 0x78, 0x00, 0x48, 0x00, 0x00, 0x80, 0xff, 0x00, 0xd0, 0xf1, 0x03,
0x00, 0xc4, 0x2f, 0x00, 0x0b, 0x78, 0x00, 0x7a, 0x00, 0x00, 0x80, 0xff,
0x00, 0xd0, 0xf3, 0x03, 0x00, 0xd6, 0x4f, 0x00, 0x21, 0x02, 0x6c, 0x6c,
0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x02, 0x5a, 0x5a, 0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x6c, 0x6c, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x5a, 0x5a,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x03, 0xa2, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x02, 0x00, 0x21, 0x12, 0x61, 0x61, 0x7a, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x9e, 0x00,
0x5a, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x06, 0x00,
0x21, 0x02, 0x6b, 0x6b, 0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x20, 0x18, 0x61, 0x61, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x02, 0x5b, 0x5b,
0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x02, 0x6d, 0x6d, 0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0xa5, 0xa5, 0x48, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x58, 0x58,
0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x02, 0x59, 0x59, 0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x84, 0x79, 0x6c, 0x88, 0x00, 0x40, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x2e, 0x00, 0x21, 0x02, 0xa3, 0xa3,
0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x24, 0x74, 0x5a, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x8f, 0x00, 0x21, 0x02, 0x81, 0x81, 0x48, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x8b, 0x8b,
0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x08, 0x13, 0x5a, 0x00, 0x61, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x06, 0x00, 0x21, 0x02, 0x72, 0x72, 0x48, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0xa1, 0xa1,
0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x02, 0x8d, 0x8d, 0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x02, 0x74, 0x74, 0x48, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x7f, 0x7f,
0x48, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x74, 0x48, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x6b, 0x6b, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x5b, 0x5b,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x84, 0x79, 0x61, 0x88, 0x00, 0x60, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x8e, 0x00, 0x20, 0x08, 0x6d, 0x6d, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x4a, 0x00,
0x6b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x08, 0x00,
0x20, 0x08, 0xa5, 0xa5, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xa4, 0x00, 0x5b, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x20, 0x08, 0x58, 0x58,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0x57, 0x00, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x08, 0x59, 0x59, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x56, 0x00,
0xa5, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x08, 0xa3, 0xa3, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x48, 0x00, 0x58, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x20, 0x08, 0x81, 0x81,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0xa0, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x08, 0x8b, 0x8b, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x96, 0x00,
0xa3, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00,
0x20, 0x08, 0x72, 0x72, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x98, 0x00, 0x81, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x04, 0x00, 0x20, 0x08, 0xa1, 0xa1,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0x94, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x04, 0x00, 0x20, 0x08, 0x8d, 0x8d, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x92, 0x00,
0x72, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0e, 0x00,
0x20, 0x08, 0x74, 0x74, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x86, 0x00, 0xa1, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0e, 0x00, 0x20, 0x08, 0x7f, 0x7f,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0x84, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0e, 0x00, 0x08, 0x03, 0x83, 0x00, 0x74, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0e, 0x00, 0x21, 0x12, 0x7b, 0x7b,
0x7a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x08, 0x03, 0x82, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x06, 0x00, 0x21, 0x12, 0x64, 0x64, 0x7a, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x0b, 0x78, 0x00, 0x6c,
0x00, 0x00, 0x80, 0xff, 0x00, 0xd0, 0xf1, 0x03, 0x00, 0xe2, 0x2f, 0x00,
0x21, 0x12, 0x63, 0x63, 0x7a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x6b, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x01, 0x21, 0x12, 0x65, 0x65,
0x7a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x02, 0x78, 0x81, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x4f, 0x00, 0x21, 0x12, 0x7d, 0x7d, 0x7a, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x8b, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x21, 0x12, 0x5e, 0x5e, 0x7a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x6d, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x21, 0x12, 0x62, 0x62,
0x7a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x12, 0x99, 0x99, 0x7a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x12, 0x73, 0x73, 0x7a, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x7f, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x8f, 0x00,
0x21, 0x12, 0x75, 0x75, 0x7a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x12, 0x79, 0x79, 0x7a, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x12, 0x9b, 0x9b,
0x7a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x12, 0x9d, 0x9d, 0x7a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x12, 0x9f, 0x9f, 0x7a, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x12, 0x6a, 0x6a,
0x7a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x78, 0x7a, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x59, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x5b, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x74, 0x8d, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x58, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00, 0x20, 0x18, 0x7b, 0x7b,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x18, 0x64, 0x64, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x18, 0x63, 0x63, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x59, 0x00,
0x7b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x02, 0x00,
0x20, 0x18, 0x65, 0x65, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x5b, 0x00, 0x64, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0e, 0x00, 0x20, 0x18, 0x7d, 0x7d,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0x8b, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x18, 0x5e, 0x5e, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x8d, 0x00,
0x65, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x18, 0x62, 0x62, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x9c, 0x00, 0x7d, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x20, 0x18, 0x99, 0x99,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0x9a, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x18, 0x73, 0x73, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x58, 0x00,
0x62, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x18, 0x75, 0x75, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x90, 0x00, 0x99, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x20, 0x18, 0x79, 0x79,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0x8e, 0x00, 0x73, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x08, 0x00, 0x20, 0x18, 0x9b, 0x9b, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x8c, 0x00,
0x75, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x04, 0x00,
0x20, 0x18, 0x9d, 0x9d, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x8a, 0x00, 0x79, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x06, 0x00, 0x20, 0x18, 0x9f, 0x9f,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0x81, 0x00, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0e, 0x00, 0x20, 0x18, 0x6a, 0x6a, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x80, 0x00,
0x9d, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0e, 0x00,
0x08, 0x13, 0x7f, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0e, 0x00, 0x21, 0x02, 0x67, 0x67, 0x6c, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x08, 0x13, 0x7e, 0x00,
0x6a, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0e, 0x00,
0x0b, 0x78, 0x00, 0x61, 0x00, 0x00, 0x80, 0xff, 0x00, 0xd0, 0xf3, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x21, 0x02, 0x69, 0x69, 0x6c, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x7b, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x2f, 0x00,
0x21, 0x02, 0x89, 0x89, 0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x73, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x01, 0x21, 0x02, 0x52, 0x52,
0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x02, 0x78, 0x75, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x4f, 0x00, 0x21, 0x02, 0x53, 0x53, 0x6c, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x65, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x21, 0x02, 0x55, 0x55, 0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x63, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x21, 0x02, 0x8f, 0x8f,
0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x02, 0x0b, 0x0b, 0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x4f, 0x4f, 0x6c, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x4e, 0x4e,
0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x02, 0x91, 0x91, 0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x7c, 0x7c, 0x6c, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x93, 0x93,
0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x02, 0x95, 0x95, 0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x97, 0x97, 0x6c, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x60, 0x60,
0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x74, 0x6c, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x74, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x79, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xc4, 0x8f, 0x00,
0x20, 0x08, 0x67, 0x67, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x69, 0x69, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x0b, 0x0b,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0x6c, 0x00, 0x67, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x02, 0x00, 0x20, 0x08, 0x55, 0x55, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x6b, 0x00,
0x69, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x06, 0x00,
0x24, 0x74, 0x62, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x74, 0x00, 0x0b, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x08, 0x00, 0x20, 0x08, 0x60, 0x60,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0x79, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x04, 0x00, 0x24, 0x74, 0x7d, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00, 0x24, 0x74, 0x72, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0x62, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x04, 0x00, 0x21, 0x12, 0x5e, 0x71, 0x61, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x71, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x08, 0x89, 0x89, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x53, 0x53, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x12, 0x67, 0x09,
0x61, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x2f, 0x10,
0x08, 0x03, 0x7b, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x21, 0x12, 0x69, 0x4c, 0x61, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x8f, 0x10, 0x08, 0x03, 0x7a, 0x00,
0x53, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x06, 0x00,
0x21, 0x12, 0x09, 0x70, 0x61, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x12, 0x0b, 0x6f, 0x61, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x11, 0x02, 0x78, 0x6f, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x08, 0x52, 0x52, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x4f, 0x4f, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x4e, 0x4e,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0x7d, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x08, 0x00, 0x24, 0x74, 0x6a, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x73, 0x00,
0x4f, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x21, 0x12, 0x55, 0x51, 0x61, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x4f, 0x00, 0x08, 0x03, 0x72, 0x00, 0x4e, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x04, 0x00, 0x24, 0x74, 0x70, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x12, 0x51, 0x5f, 0x61, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x20, 0x08, 0x7c, 0x7c, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x18, 0x5e, 0x5e,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x18, 0x5f, 0x67, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x6a, 0x00, 0x7c, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x60, 0x69,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0x71, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x21, 0x12, 0x53, 0x50, 0x61, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x8f, 0x10, 0x08, 0x13, 0x70, 0x00,
0x5f, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x06, 0x00,
0x21, 0x12, 0x89, 0x4d, 0x61, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x08, 0x13, 0x6f, 0x00, 0x60, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x06, 0x00, 0x21, 0x12, 0x52, 0x77,
0x61, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x11,
0x02, 0x78, 0x77, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x21, 0x12, 0x54, 0x54, 0x61, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x69, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x21, 0x12, 0x4c, 0x66, 0x61, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x67, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x21, 0x12, 0x4e, 0x68,
0x61, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x4f, 0x00,
0x21, 0x12, 0x50, 0x76, 0x61, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x7c, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x2f, 0x00, 0x21, 0x12, 0x4d, 0x6e,
0x61, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x12, 0x4f, 0x78, 0x61, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x78, 0x61, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x64, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x78, 0x5f, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x8f, 0x00, 0x24, 0x74, 0x78, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x76, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x24, 0x74, 0x6e, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x68, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x66, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x74, 0x60, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x5e, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x8f, 0x8f,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x20, 0x08, 0x91, 0x91, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x93, 0x93, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x75, 0x00,
0x8f, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x02, 0x00,
0x20, 0x08, 0x95, 0x95, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x6d, 0x00, 0x91, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x02, 0x00, 0x20, 0x08, 0x97, 0x97,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0x65, 0x00, 0x93, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x52, 0x52, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x64, 0x00,
0x95, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x18, 0x53, 0x53, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x63, 0x00, 0x97, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x55, 0x55,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0x7c, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x54, 0x54, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x78, 0x00,
0x53, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x18, 0x89, 0x89, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x77, 0x00, 0x55, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x09, 0x09,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0x76, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x4c, 0x4c, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x6e, 0x00,
0x89, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x18, 0x4e, 0x4e, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x69, 0x00, 0x09, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x50, 0x50,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0x68, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x0b, 0x0b, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x67, 0x00,
0x4e, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x18, 0x4d, 0x4d, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x66, 0x00, 0x50, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x4f, 0x4f,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x51, 0x51, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x60, 0x00,
0x4d, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x08, 0x13, 0x5f, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x64, 0x02, 0x00, 0x08, 0x13, 0x5e, 0x00, 0x51, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x1d, 0x7b, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00,
0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xec, 0x0f, 0x00, 0x21, 0x72, 0x4d, 0xff, 0xa2, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0xef, 0x00, 0x12, 0x78, 0xff, 0x5d,
0x03, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x80, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x21, 0x72, 0x4c, 0xff, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x78, 0x00, 0x5d, 0x1f, 0x00, 0x00, 0x00,
0x70, 0x42, 0xf2, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x21, 0x72, 0x4d, 0x4d,
0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0x0f, 0x00, 0x21, 0x72, 0x4f, 0x4c, 0x57, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x21, 0x72, 0x4d, 0x4d, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00, 0x21, 0x72, 0x4f, 0x4f,
0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0x0f, 0x00, 0x21, 0x72, 0x4d, 0x4d, 0x48, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x21, 0x72, 0x4f, 0x4f, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00, 0x21, 0x72, 0x4d, 0x4d,
0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0x0f, 0x00, 0x21, 0x72, 0x4f, 0x4f, 0x94, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x21, 0x72, 0x4d, 0x4d, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x5c, 0x5c, 0x5d, 0x00, 0x00, 0x00,
0xff, 0x18, 0x8f, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x21, 0x72, 0x4c, 0x4f,
0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x4d, 0x4d, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x4f, 0x4c, 0x83, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x4c, 0x4d,
0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x4f, 0x4f, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x4e, 0xff, 0x59, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x50, 0xff,
0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x52, 0xff, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x54, 0xff, 0x7a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x51, 0xff,
0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x53, 0xff, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x4c, 0x4c, 0x4f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x4d, 0x4e,
0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x4f, 0x50, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x52, 0x52, 0x7d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x54, 0x54,
0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x4e, 0x51, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x50, 0x53, 0x76, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x4d, 0x4d,
0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x4f, 0x4f, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x51, 0x52, 0x75, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x53, 0x54,
0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x55, 0x4e, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x89, 0x50, 0x6f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x4d, 0x4d,
0x9a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x4f, 0x4f, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x4e, 0x51, 0x74, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x50, 0x53,
0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x52, 0x55, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x54, 0x89, 0x6e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x4d, 0x4d,
0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x4f, 0x4f, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x51, 0x4e, 0x6d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x53, 0x50,
0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x55, 0x52, 0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x89, 0x54, 0x67, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x4e, 0x4d,
0x8e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x50, 0x4f, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x52, 0x51, 0x6c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x54, 0x53,
0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x55, 0x55, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x89, 0x89, 0x66, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x4d, 0x4e,
0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x4f, 0x50, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x51, 0x52, 0x65, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x53, 0x54,
0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x55, 0x55, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x89, 0x89, 0x5f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x4d, 0x4d,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x4e, 0x4f, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x51, 0x51, 0x64, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x89, 0x7f, 0x4f, 0x4c,
0x00, 0x1f, 0x20, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x21, 0x72, 0x50, 0x53, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x55, 0x55, 0x60, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x72, 0x52, 0x89,
0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x4d, 0x4d, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x50, 0x51, 0x50, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x52, 0x55,
0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x89, 0x7f, 0x4e, 0x4d, 0x00, 0x1f, 0x20, 0x0c, 0x00, 0x00, 0x0e, 0x00,
0x00, 0xa8, 0x0e, 0x00, 0x89, 0x7f, 0x51, 0x50, 0x00, 0x1f, 0x20, 0x0c,
0x00, 0x00, 0x0e, 0x00, 0x00, 0xe8, 0x0e, 0x00, 0x89, 0x7f, 0x53, 0x52,
0x00, 0x1f, 0x20, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x22, 0x0f, 0x00,
0x21, 0x72, 0x4f, 0x4c, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc4, 0x2f, 0x00, 0x21, 0x72, 0x54, 0x4d, 0x4e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc6, 0x4f, 0x00, 0x89, 0x7f, 0x4e, 0x4f,
0x00, 0x1f, 0x40, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x21, 0x72, 0x55, 0x50, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc6, 0x8f, 0x00, 0x89, 0x7f, 0x51, 0x54, 0x00, 0x1f, 0x40, 0x0c,
0x00, 0x00, 0x0e, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x21, 0x72, 0x89, 0x52,
0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc6, 0x0f, 0x01,
0x89, 0x7f, 0x53, 0x55, 0x00, 0x1f, 0x40, 0x0c, 0x00, 0x00, 0x0e, 0x00,
0x00, 0xe8, 0x0e, 0x00, 0x89, 0x7f, 0x8f, 0x89, 0x00, 0x1f, 0x40, 0x0c,
0x00, 0x00, 0x0e, 0x00, 0x00, 0x22, 0x0f, 0x00, 0x21, 0x82, 0x4c, 0x4f,
0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x2f, 0x00,
0x21, 0x82, 0x4e, 0x54, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc6, 0x4f, 0x00, 0x88, 0x83, 0x00, 0x87, 0x4c, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x21, 0x82, 0x50, 0x55,
0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc6, 0x8f, 0x00,
0x88, 0x83, 0x00, 0x87, 0x4e, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x21, 0x82, 0x52, 0x89,
0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x01,
0x88, 0x83, 0x00, 0x87, 0x50, 0x00, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x89, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xc6, 0x0f, 0x00, 0x88, 0x83, 0x00, 0x87,
0x52, 0x80, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xec, 0x0f, 0x00, 0x84, 0x99, 0x08, 0x5d, 0x00, 0x00, 0x20, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x1d, 0x7b, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00,
0x0c, 0x78, 0x00, 0x5d, 0x20, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x87, 0xff, 0x04, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x52, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x92, 0x49, 0x00, 0x09, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x2f, 0x00, 0x24, 0x92, 0x4b, 0xff,
0xff, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x8e, 0x07, 0x00, 0xd0, 0x0f, 0x00,
0x21, 0x82, 0x08, 0x08, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x82, 0x4b, 0x0a, 0x4b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc8, 0x0f, 0x00, 0x21, 0x82, 0x08, 0x08,
0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xca, 0x0f, 0x00,
0x88, 0x83, 0x00, 0x5d, 0x08, 0x00, 0x20, 0x00, 0x00, 0x48, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00, 0x84, 0x79, 0x0b, 0x88,
0x00, 0x20, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x0e, 0x00,
0x84, 0x79, 0x09, 0x88, 0x00, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x0e, 0x00, 0x0b, 0x72, 0x00, 0x0b, 0xff, 0x00, 0x00, 0x00,
0x00, 0x50, 0xf3, 0x03, 0x00, 0xc4, 0x2f, 0x00, 0x0b, 0x72, 0x00, 0x09,
0xff, 0x00, 0x00, 0x00, 0x00, 0x50, 0xf1, 0x03, 0x00, 0xd6, 0x4f, 0x00,
0x08, 0x13, 0x87, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
0x00, 0x64, 0x0e, 0x00, 0x08, 0x03, 0x89, 0x00, 0x09, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00, 0x20, 0x72, 0x5b, 0x87,
0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x2f, 0x04,
0x20, 0x72, 0x4c, 0x87, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0x8d, 0x87, 0x8d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0x4e, 0x87,
0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0x09, 0x5b, 0x4c, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x4f, 0x00, 0x20, 0x72, 0x4a, 0x89, 0x4a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xc4, 0x8f, 0x00, 0x20, 0x72, 0x49, 0x89,
0xa2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0x0b, 0x8d, 0x4e, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x0a, 0x89, 0x57, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04, 0x05, 0x78, 0x4e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x72, 0x4b, 0x89, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x04, 0x3e, 0x72, 0x08, 0x4a, 0x49, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x5b, 0x89,
0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04,
0x05, 0x78, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x56, 0x89, 0x56, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04, 0x3e, 0x72, 0x0a, 0x0a,
0x4b, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x72, 0x9e, 0x89, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x48, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0x5b, 0x5b, 0x56, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x8b, 0x89, 0xa0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x56, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x72, 0x58, 0x87, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x04, 0x3c, 0x72, 0x54, 0x08, 0x44, 0x00, 0x00, 0x00,
0x54, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x04, 0x20, 0x72, 0x8d, 0x87,
0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04,
0x3e, 0x72, 0x5a, 0x9e, 0x8b, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x59, 0x87, 0x9a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04, 0x84, 0x79, 0x8b, 0x88,
0x00, 0x60, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x72, 0x9c, 0x87, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x04, 0x3e, 0x72, 0x58, 0x58, 0x8d, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x90, 0x87,
0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x84, 0x79, 0x8d, 0x88, 0x00, 0x40, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x0e, 0x00, 0x3c, 0x72, 0x52, 0x08, 0x46, 0x00, 0x00, 0x00,
0x52, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x04, 0x3e, 0x72, 0x59, 0x59,
0x9c, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x72, 0x91, 0x87, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00, 0x3c, 0x72, 0x50, 0x08,
0x40, 0x00, 0x00, 0x00, 0x50, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x20, 0x72, 0x96, 0x89, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x04, 0xaf, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0e, 0x00, 0x20, 0x72, 0x8f, 0x89,
0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x20, 0x72, 0x7e, 0x87, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0x7f, 0x87, 0x7f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x4e, 0x08,
0x42, 0x00, 0x00, 0x00, 0x4e, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x20, 0x72, 0x86, 0x89, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0x83, 0x89, 0x83, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xca, 0x0f, 0x00, 0x3c, 0x72, 0x4c, 0x08,
0x3c, 0x00, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x4a, 0x08, 0x3e, 0x00, 0x00, 0x00, 0x4a, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x8b, 0xff, 0x00, 0x00, 0x00,
0x00, 0x50, 0xf3, 0x03, 0x00, 0xe4, 0x2f, 0x00, 0x0b, 0x72, 0x00, 0x8d,
0xff, 0x00, 0x00, 0x00, 0x00, 0x50, 0xf1, 0x03, 0x00, 0xca, 0x4f, 0x00,
0x3c, 0x72, 0x48, 0x08, 0x38, 0x00, 0x00, 0x00, 0x48, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x56, 0x08, 0x3a, 0x00, 0x00, 0x00,
0x56, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0b, 0x00, 0x02, 0x72, 0x08, 0x00,
0x5b, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x02,
0x24, 0x72, 0x0a, 0xff, 0xff, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x09, 0x00, 0x59, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x0b, 0xff,
0xff, 0x00, 0x00, 0x00, 0x58, 0x00, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x20, 0x72, 0x59, 0x87, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0x58, 0x87, 0x8a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x72, 0x5b, 0x89,
0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04,
0x3c, 0x72, 0x54, 0x08, 0x34, 0x00, 0x00, 0x00, 0x54, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0f, 0x00, 0x20, 0x72, 0x5a, 0x89, 0x92, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3e, 0x72, 0x59, 0x59,
0x90, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x3e, 0x72, 0x58, 0x58, 0x91, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x3e, 0x72, 0x5b, 0x5b, 0x96, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x3c, 0x72, 0x52, 0x08,
0x36, 0x00, 0x00, 0x00, 0x52, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x3e, 0x72, 0x5a, 0x5a, 0x8f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xce, 0x0f, 0x00, 0x3c, 0x72, 0x50, 0x08, 0x30, 0x00, 0x00, 0x00,
0x50, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x4e, 0x08,
0x32, 0x00, 0x00, 0x00, 0x4e, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x4c, 0x08, 0x2c, 0x00, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x4a, 0x08, 0x2e, 0x00, 0x00, 0x00,
0x4a, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x48, 0x08,
0x28, 0x00, 0x00, 0x00, 0x48, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x56, 0x08, 0x2a, 0x00, 0x00, 0x00, 0x56, 0x08, 0x00, 0x00,
0x00, 0x6e, 0x0b, 0x00, 0x02, 0x72, 0x09, 0x00, 0x59, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x02, 0x24, 0x72, 0x0b, 0xff,
0xff, 0x00, 0x00, 0x00, 0x58, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x72, 0x08, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x59, 0x87, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x20, 0x72, 0x58, 0x87,
0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x72, 0x0a, 0xff, 0xff, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x72, 0x5b, 0x89, 0x84, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3e, 0x72, 0x59, 0x59,
0x58, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x72, 0x5a, 0x89, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x3e, 0x72, 0x58, 0x7e, 0x7f, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x7f, 0xff,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0x7e, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x54, 0x08, 0x24, 0x00, 0x00, 0x00,
0x54, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00, 0x3e, 0x72, 0x5b, 0x5b,
0x86, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x3e, 0x72, 0x5a, 0x5a, 0x83, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x7f, 0x00, 0x8b, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x08, 0x03, 0x7e, 0x00,
0x8d, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00,
0x0c, 0x72, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x3c, 0x72, 0x52, 0x08, 0x26, 0x00, 0x00, 0x00,
0x52, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x50, 0x08,
0x20, 0x00, 0x00, 0x00, 0x50, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x20, 0x72, 0x78, 0x7f, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xc4, 0x2f, 0x00, 0x20, 0x72, 0x7d, 0x7e, 0x7d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xca, 0x4f, 0x00, 0x3c, 0x72, 0x4e, 0x08,
0x22, 0x00, 0x00, 0x00, 0x4e, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x04,
0x20, 0x72, 0x79, 0x7e, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0x7a, 0x7e, 0x7a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0x76, 0x7f,
0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04,
0x20, 0x72, 0x77, 0x7f, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x04, 0x3c, 0x72, 0x4c, 0x08, 0x1c, 0x00, 0x00, 0x00,
0x4c, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00, 0x20, 0x72, 0x75, 0x7e,
0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x72, 0x71, 0x7f, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x20, 0x72, 0x6a, 0x7e, 0x6a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0x6b, 0x7e,
0x6b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04,
0x3c, 0x72, 0x4a, 0x08, 0x1e, 0x00, 0x00, 0x00, 0x4a, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0f, 0x04, 0x20, 0x72, 0x68, 0x7f, 0x68, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0x69, 0x7f,
0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04,
0x20, 0x72, 0x66, 0x7f, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0x67, 0x7f, 0x67, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x48, 0x08,
0x18, 0x00, 0x00, 0x00, 0x48, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x20, 0x72, 0x64, 0x7e, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x20, 0x72, 0x65, 0x7e, 0x65, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0x62, 0x7e,
0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04,
0x20, 0x72, 0x63, 0x7e, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x56, 0x08, 0x1a, 0x00, 0x00, 0x00,
0x56, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0b, 0x00, 0x20, 0x72, 0x60, 0x7f,
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04,
0x3e, 0x72, 0x64, 0x64, 0x65, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x61, 0x7f, 0x61, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04, 0x3e, 0x72, 0x62, 0x62,
0x63, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x72, 0x5e, 0x7f, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x24, 0x72, 0x08, 0xff, 0xff, 0x00, 0x00, 0x00,
0x5b, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x02, 0x02, 0x72, 0x0a, 0x00,
0x5a, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x72, 0x09, 0xff, 0xff, 0x00, 0x00, 0x00, 0x59, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x0b, 0x00, 0x58, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x58, 0x7e,
0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0x60, 0x60, 0x61, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x59, 0x7f, 0x7c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0x5f, 0x7f,
0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x3c, 0x72, 0x54, 0x08, 0x14, 0x00, 0x00, 0x00, 0x54, 0x08, 0x00, 0x00,
0x00, 0xe6, 0x0f, 0x00, 0x3e, 0x72, 0x5e, 0x5e, 0x5f, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xca, 0x0f, 0x00, 0x3c, 0x72, 0x52, 0x08,
0x16, 0x00, 0x00, 0x00, 0x52, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x50, 0x08, 0x10, 0x00, 0x00, 0x00, 0x50, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x4e, 0x08, 0x12, 0x00, 0x00, 0x00,
0x4e, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x4c, 0x08,
0x0c, 0x00, 0x00, 0x00, 0x4c, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x4a, 0x08, 0x0e, 0x00, 0x00, 0x00, 0x4a, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x48, 0x08, 0x04, 0x00, 0x00, 0x00,
0x48, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x56, 0x08,
0x06, 0x00, 0x00, 0x00, 0x56, 0x08, 0x00, 0x00, 0x00, 0xee, 0x0b, 0x00,
0x3e, 0x72, 0x08, 0x7d, 0x58, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xc4, 0x0f, 0x02, 0x3e, 0x72, 0x09, 0x78, 0x59, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x3e, 0x72, 0x0a, 0x79,
0x7a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x3e, 0x72, 0x0b, 0x76, 0x77, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xce, 0x0f, 0x00, 0x3c, 0x72, 0x58, 0x08,
0x44, 0x00, 0x00, 0x00, 0x58, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0b, 0x00,
0x05, 0x78, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x02, 0x05, 0x78, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xcc, 0x0f, 0x00, 0x3c, 0x72, 0x46, 0x08,
0x46, 0x00, 0x00, 0x00, 0x44, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x38, 0x08, 0x38, 0x00, 0x00, 0x00, 0x5a, 0x08, 0x00, 0x00,
0x00, 0xee, 0x0b, 0x04, 0x20, 0x72, 0x5a, 0x7f, 0x70, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x06, 0x3c, 0x72, 0x40, 0x08,
0x40, 0x00, 0x00, 0x00, 0x44, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x20, 0x72, 0x70, 0x7f, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x20, 0x72, 0x5b, 0x7e, 0x72, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3e, 0x72, 0x5a, 0x5a,
0x71, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x72, 0x72, 0x7e, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xc6, 0x0f, 0x00, 0x3c, 0x72, 0x42, 0x08, 0x42, 0x00, 0x00, 0x00,
0x44, 0x08, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x3e, 0x72, 0x5b, 0x5b,
0x72, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x3c, 0x72, 0x3c, 0x08, 0x3c, 0x00, 0x00, 0x00, 0x44, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x3e, 0x08, 0x3e, 0x00, 0x00, 0x00,
0x44, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0b, 0x00, 0x20, 0x72, 0x45, 0x7f,
0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xc4, 0x0f, 0x02,
0x05, 0x78, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x44, 0x7e, 0x74, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x3e, 0x72, 0x45, 0x45,
0x70, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x0f, 0x00,
0x3e, 0x72, 0x44, 0x44, 0x75, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x6e, 0x08, 0x3a, 0x00, 0x00, 0x00,
0x6e, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0b, 0x00, 0x02, 0x72, 0x08, 0x00,
0x44, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x02,
0x24, 0x72, 0x0a, 0xff, 0xff, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x09, 0x00, 0x5a, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x0b, 0xff,
0xff, 0x00, 0x00, 0x00, 0x45, 0x00, 0x8e, 0x07, 0x00, 0xce, 0x0f, 0x00,
0x3c, 0x72, 0x58, 0x08, 0x34, 0x00, 0x00, 0x00, 0x58, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x46, 0x08, 0x36, 0x00, 0x00, 0x00,
0x46, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x40, 0x08,
0x30, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x3c, 0x08, 0x2c, 0x00, 0x00, 0x00, 0x3c, 0x08, 0x00, 0x00,
0x00, 0x6e, 0x0b, 0x04, 0x20, 0x72, 0x2d, 0x7e, 0x6c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x06, 0x3c, 0x72, 0x42, 0x08,
0x32, 0x00, 0x00, 0x00, 0x42, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x20, 0x72, 0x2c, 0x7e, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xca, 0x0f, 0x00, 0x3e, 0x72, 0x2d, 0x2d, 0x2c, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x3c, 0x72, 0x3e, 0x08,
0x2e, 0x00, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x3e, 0x72, 0x2c, 0x6a, 0x6b, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xce, 0x0f, 0x00, 0x3c, 0x72, 0x38, 0x08, 0x28, 0x00, 0x00, 0x00,
0x38, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0b, 0x04, 0x3e, 0x72, 0x29, 0x68,
0x69, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x02,
0x3c, 0x72, 0x6e, 0x08, 0x2a, 0x00, 0x00, 0x00, 0x6e, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0b, 0x00, 0x3e, 0x72, 0x28, 0x66, 0x67, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00, 0x02, 0x72, 0x08, 0x00,
0x2d, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x02,
0x24, 0x72, 0x0a, 0xff, 0xff, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x09, 0x00, 0x29, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x0b, 0xff,
0xff, 0x00, 0x00, 0x00, 0x28, 0x00, 0x8e, 0x07, 0x00, 0xce, 0x0f, 0x00,
0x3c, 0x72, 0x58, 0x08, 0x24, 0x00, 0x00, 0x00, 0x58, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x46, 0x08, 0x26, 0x00, 0x00, 0x00,
0x46, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x40, 0x08,
0x20, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x3c, 0x08, 0x1c, 0x00, 0x00, 0x00, 0x3c, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x42, 0x08, 0x22, 0x00, 0x00, 0x00,
0x42, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x3e, 0x08,
0x1e, 0x00, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x38, 0x08, 0x18, 0x00, 0x00, 0x00, 0x38, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x6e, 0x08, 0x1a, 0x00, 0x00, 0x00,
0x6e, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0b, 0x00, 0x02, 0x72, 0x08, 0x00,
0x64, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x02,
0x24, 0x72, 0x0a, 0xff, 0xff, 0x00, 0x00, 0x00, 0x62, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x09, 0x00, 0x60, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x0b, 0xff,
0xff, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x8e, 0x07, 0x00, 0xce, 0x0f, 0x00,
0x3c, 0x72, 0x58, 0x08, 0x14, 0x00, 0x00, 0x00, 0x58, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x46, 0x08, 0x16, 0x00, 0x00, 0x00,
0x46, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x40, 0x08,
0x10, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x3c, 0x08, 0x0c, 0x00, 0x00, 0x00, 0x3c, 0x08, 0x00, 0x00,
0x00, 0xee, 0x0b, 0x04, 0x12, 0x78, 0x0c, 0x5c, 0xf8, 0xff, 0xff, 0xff,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x02, 0x3c, 0x72, 0x42, 0x08,
0x12, 0x00, 0x00, 0x00, 0x42, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x19, 0x78, 0x5c, 0xff, 0x03, 0x00, 0x00, 0x00, 0x5c, 0x14, 0x01, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x10, 0x72, 0x0d, 0x0c, 0x5d, 0x00, 0x00, 0x00,
0xff, 0xe1, 0xff, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x11, 0x78, 0x0c, 0x5d,
0x00, 0x20, 0x00, 0x00, 0xff, 0x10, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x04,
0x12, 0x78, 0x5d, 0x5d, 0x1c, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x3e, 0x08, 0x0e, 0x00, 0x00, 0x00,
0x3e, 0x08, 0x00, 0x00, 0x00, 0x68, 0x0f, 0x00, 0x24, 0x78, 0x0c, 0x5d,
0x80, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x8e, 0x07, 0x00, 0xc8, 0x0f, 0x00,
0x3c, 0x72, 0x38, 0x08, 0x04, 0x00, 0x00, 0x00, 0x38, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0b, 0x00, 0x88, 0x73, 0x00, 0x0c, 0x54, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x1c, 0x0c,
0x70, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xc6, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x0c, 0x55, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x12, 0x78, 0x04, 0x0d, 0x07, 0x00, 0x00, 0x00,
0x5c, 0x78, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x02, 0x3c, 0x72, 0x6e, 0x08,
0x06, 0x00, 0x00, 0x00, 0x6e, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0b, 0x00,
0x11, 0x78, 0x05, 0x5c, 0x00, 0x20, 0x00, 0x00, 0xff, 0x48, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x0c, 0x58, 0x00, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe6, 0x0f, 0x00, 0x11, 0x72, 0x24, 0x04,
0x05, 0x00, 0x00, 0x00, 0xff, 0x20, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x0c, 0x59, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x04, 0x0c, 0x10, 0x00, 0x00, 0x00,
0xff, 0x3c, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00, 0x12, 0x78, 0x05, 0x0c,
0x20, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x04,
0x12, 0x78, 0x06, 0x0c, 0x30, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x06, 0x88, 0x73, 0x00, 0x04, 0x52, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x07, 0x0c,
0x40, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xc6, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x04, 0x53, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x04, 0x46, 0x00, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x04,
0x47, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x03, 0x00,
0x88, 0x73, 0x00, 0x05, 0x50, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x05, 0x51, 0x00, 0x10, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x05,
0x40, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x05, 0x41, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x05, 0x00, 0x88, 0x73, 0x00, 0x06, 0x4e, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x06,
0x4f, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x12, 0x78, 0x04, 0x0c, 0x50, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07,
0x00, 0xc6, 0x2f, 0x00, 0x88, 0x73, 0x00, 0x06, 0x42, 0x00, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x06,
0x43, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x07, 0x4d, 0x00, 0x10, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x05, 0x0c,
0x60, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xc6, 0x4f, 0x00,
0x88, 0x73, 0x00, 0x07, 0x3c, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x07, 0x3d, 0x00, 0x30, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x04,
0x4a, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x04, 0x4b, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x04, 0x3e, 0x00, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x04,
0x3f, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x05, 0x48, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x05, 0x49, 0x00, 0x10, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x05,
0x38, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x05, 0x39, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x1c, 0x56, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x1c,
0x57, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x1c, 0x6e, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x1c, 0x6f, 0x00, 0x30, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x1d, 0x7b, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00,
0x84, 0x79, 0x18, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
0x00, 0xa8, 0x02, 0x00, 0x84, 0x79, 0x14, 0x24, 0x00, 0x80, 0x00, 0x00,
0x00, 0x0c, 0x00, 0x00, 0x00, 0xe8, 0x02, 0x00, 0x84, 0x79, 0x10, 0x24,
0x00, 0x00, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00,
0x84, 0x79, 0x0c, 0x24, 0x00, 0x80, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00,
0x00, 0x68, 0x02, 0x00, 0x84, 0x79, 0x08, 0x24, 0x00, 0x00, 0x20, 0x00,
0x00, 0x0c, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x84, 0x79, 0x04, 0x24,
0x00, 0x80, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x4d, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xea, 0x0f, 0x00, 0x84, 0x79, 0x1c, 0x24, 0x00, 0x00, 0x21, 0x00,
0x00, 0x0c, 0x00, 0x00, 0x00, 0xa2, 0x06, 0x00, 0x10, 0x78, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x14, 0x18, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0xcf, 0x00, 0xb9, 0x7a, 0x04, 0x00, 0x00, 0x46, 0x00, 0x00,
0x00, 0x0a, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x84, 0x79, 0x20, 0x24,
0x00, 0x80, 0x21, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00,
0x30, 0x72, 0x15, 0x19, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x72, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf0, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x16, 0x1a,
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x30, 0x72, 0x17, 0x1b, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x14, 0x14, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x2f, 0x00, 0x30, 0x72, 0x15, 0x15,
0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0x16, 0x16, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x17, 0x17, 0x13, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x0c, 0x14,
0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x30, 0x72, 0x0d, 0x15, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x0e, 0x16, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x0f, 0x17,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0x0f, 0x00,
0x86, 0x79, 0x00, 0x02, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x1d, 0x10, 0x0c,
0x00, 0xe2, 0x05, 0x00, 0x4d, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x03, 0x00, 0xea, 0x0f, 0x00, 0x24, 0x76, 0x0d, 0xff,
0x00, 0x62, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x4f, 0x00,
0x30, 0x72, 0x0e, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7a, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x05, 0x09,
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0xb9, 0x7a, 0x04, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x0f, 0x0a, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x02, 0x0d,
0x02, 0x00, 0x00, 0x00, 0xff, 0x20, 0x80, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x30, 0x72, 0x07, 0x0b, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x10, 0x0e, 0x1c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x03, 0x0d,
0x03, 0x00, 0x00, 0x00, 0x00, 0x24, 0x0f, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x05, 0x05, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x30, 0x72, 0x11, 0x0f, 0x1e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x07, 0x07,
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0x20, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x8f, 0x00, 0x30, 0x72, 0x21, 0x05, 0x21, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x22, 0x11,
0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0x23, 0x07, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xca, 0x0f, 0x00, 0x86, 0x79, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00,
0x04, 0x1d, 0x10, 0x0c, 0x00, 0xe2, 0x0f, 0x00, 0x4d, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xea, 0x0f, 0x00,
0x47, 0x79, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0x03,
0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x24, 0x76, 0x01, 0xff,
0x00, 0x0a, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xce, 0x0f, 0x00,
0xc3, 0x79, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x82, 0x78, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0xb9, 0x7a, 0x04, 0x00,
0x00, 0x6c, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0xa5, 0x72, 0x04, 0x06, 0x09, 0x00, 0x00, 0x00, 0x04, 0x02, 0x8e, 0x0f,
0x00, 0xcc, 0x2f, 0x00, 0x24, 0x7e, 0x02, 0xff, 0x04, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x03, 0x00,
0x05, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0x04, 0xff, 0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x7e, 0x05, 0xff, 0x05, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0xb9, 0x7a, 0x04, 0x00,
0x00, 0x46, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x81, 0x79, 0x02, 0x02, 0x04, 0x04, 0x00, 0x00, 0x00, 0x19, 0x1e, 0x0c,
0x00, 0xa8, 0x0e, 0x00, 0x81, 0x79, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00,
0x00, 0x19, 0x1e, 0x0c, 0x00, 0xe2, 0x0e, 0x00, 0xc2, 0x73, 0x04, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x70, 0x4e, 0x00,
0xc2, 0x73, 0x05, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00,
0x00, 0x64, 0x8e, 0x00, 0x8c, 0x72, 0x00, 0x04, 0x05, 0x00, 0x00, 0x00,
0x70, 0x52, 0xf0, 0x0b, 0x00, 0xcc, 0x2f, 0x00, 0x1c, 0x78, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0xf0, 0xf0, 0x03, 0x00, 0xda, 0x0f, 0x00,
0x4d, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xea, 0x0f, 0x00, 0x19, 0x79, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0xc3, 0x79, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00,
0xb9, 0x7a, 0x07, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x76, 0x25, 0xff, 0x00, 0x5e, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x90, 0x72, 0x04, 0x04,
0x05, 0x00, 0x00, 0x80, 0x3f, 0xe0, 0xff, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7a, 0x23, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0xb9, 0x7a, 0x0d, 0x00, 0x00, 0x5e, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x7c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x8c, 0x78, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x70, 0x12, 0xf0, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x0b, 0x23,
0x30, 0x00, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x99, 0x78, 0x0a, 0x0d, 0x04, 0x00, 0x00, 0x00, 0x3f, 0x06, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x0d, 0x23, 0x50, 0x00, 0x00, 0x00,
0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x04, 0x82, 0x78, 0x0c, 0x00,
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x13, 0x23, 0x60, 0x00, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x04, 0xb9, 0x7a, 0x0e, 0x00, 0x00, 0x46, 0x00, 0x00,
0x00, 0x0a, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x19, 0x23,
0x90, 0x00, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x24, 0x78, 0x1b, 0x23, 0xa0, 0x00, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0xac, 0xff, 0x1f, 0x00, 0x00, 0x00,
0x03, 0x14, 0x01, 0x00, 0x00, 0xe2, 0x2f, 0x00, 0xa4, 0x72, 0x06, 0x05,
0x07, 0x00, 0x00, 0x00, 0x06, 0x02, 0x8e, 0x0f, 0x00, 0xe2, 0x4f, 0x00,
0x24, 0x7e, 0x8f, 0xff, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x99, 0x78, 0x11, 0x0d, 0x05, 0x00, 0x00, 0x00,
0x3f, 0x06, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x00, 0xac,
0x03, 0x00, 0x00, 0x00, 0xff, 0x18, 0x8f, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0xa4, 0x78, 0x07, 0x06, 0x03, 0x00, 0x00, 0x00, 0x3f, 0x02, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0xb9, 0x7a, 0x05, 0x00,
0x00, 0x5f, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x19, 0x78, 0xa9, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x14, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x90, 0x78, 0x08, 0x07, 0x01, 0x00, 0x00, 0x00,
0x3f, 0xe0, 0xff, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0xae, 0x00,
0xf8, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x99, 0x72, 0x0b, 0x0d, 0x09, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0xaa, 0xff, 0x1f, 0x00, 0x00, 0x00,
0xa9, 0x14, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x25, 0x7a, 0x88, 0xa9,
0x00, 0x5e, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x10, 0x78, 0x06, 0xa9, 0x30, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x04, 0x05, 0x78, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x0a, 0xa9,
0x50, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7a, 0x02, 0xaa, 0x00, 0x5e, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0xae, 0x03,
0x01, 0x00, 0x00, 0x00, 0xae, 0x0a, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x99, 0x72, 0x0d, 0x0d, 0x0c, 0x00, 0x00, 0x00, 0x05, 0x02, 0x01, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7a, 0x05, 0xa9, 0x00, 0x5f, 0x00, 0x00,
0x02, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x04, 0x10, 0x78, 0x02, 0xa9,
0x20, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0x8e, 0xff, 0x0b, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0xba, 0xae, 0x04, 0x00, 0x00, 0x00,
0xff, 0x06, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x7a, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x72, 0x89, 0x89, 0x05, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0x05, 0xff, 0x08, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0xbb, 0xff,
0x1f, 0x00, 0x00, 0x00, 0xba, 0x14, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x87, 0x78, 0x08, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x04, 0x05,
0x80, 0x00, 0x00, 0x00, 0x88, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xc6, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x06, 0x08, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf6, 0x0b, 0x00, 0xe4, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x0a,
0x08, 0x00, 0x00, 0x00, 0x70, 0x62, 0xfc, 0x0b, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x72, 0x16, 0xba, 0x04, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf1, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x02, 0x08, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf4, 0x0b, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x78, 0x02, 0xa9,
0x40, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x17, 0x05, 0x01, 0x00, 0x00, 0x00, 0xbb, 0x06, 0x0e, 0x00,
0x00, 0xc6, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x02, 0x08, 0x00, 0x00, 0x00,
0x70, 0x62, 0xfa, 0x0b, 0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x04, 0x25,
0x30, 0x00, 0x00, 0x00, 0x16, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x78, 0x02, 0xa9, 0x10, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xc6, 0x0f, 0x00, 0x25, 0x78, 0x06, 0x25, 0x50, 0x00, 0x00, 0x00,
0x16, 0x00, 0x8e, 0x07, 0x00, 0xc6, 0x0f, 0x00, 0x10, 0x7a, 0x0e, 0x04,
0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf1, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x25, 0x78, 0x08, 0x25, 0x60, 0x00, 0x00, 0x00, 0x16, 0x00, 0x8e, 0x07,
0x00, 0xc6, 0x0f, 0x00, 0x10, 0x7a, 0x0f, 0x05, 0x00, 0x59, 0x00, 0x00,
0x0b, 0xe4, 0x7f, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x04, 0x25,
0x70, 0x00, 0x00, 0x00, 0x16, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x14,
0x10, 0x7a, 0x10, 0x06, 0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x12, 0x08, 0x00, 0x58, 0x00, 0x00,
0xff, 0xe0, 0xf9, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x0a, 0x25,
0xb0, 0x00, 0x00, 0x00, 0x16, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x7a, 0x11, 0x07, 0x00, 0x59, 0x00, 0x00, 0x0d, 0xe4, 0xff, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x14, 0x04, 0x00, 0x58, 0x00, 0x00,
0xff, 0xe0, 0xf1, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x06, 0x25,
0x90, 0x00, 0x00, 0x00, 0x16, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x7a, 0x13, 0x09, 0x00, 0x59, 0x00, 0x00, 0x13, 0xe4, 0x7f, 0x02,
0x00, 0xc6, 0x0f, 0x00, 0x24, 0x78, 0x0d, 0x23, 0x70, 0x00, 0x00, 0x00,
0xff, 0x02, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x25, 0x78, 0x08, 0x25,
0xa0, 0x00, 0x00, 0x00, 0x16, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x7a, 0x04, 0x06, 0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x15, 0x05, 0x00, 0x59, 0x00, 0x00,
0x0d, 0xe4, 0x7f, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x0c, 0x25,
0xc0, 0x00, 0x00, 0x00, 0x16, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x7a, 0x05, 0x07, 0x00, 0x59, 0x00, 0x00, 0x19, 0xe4, 0xff, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x08, 0x08, 0x00, 0x58, 0x00, 0x00,
0xff, 0xe0, 0xf9, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x19, 0x23,
0xc0, 0x00, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x10, 0x7a, 0x0a, 0x0a, 0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf1, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x07, 0x23, 0xb0, 0x00, 0x00, 0x00,
0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x40, 0x0c,
0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x10, 0x7a, 0x09, 0x09, 0x00, 0x59, 0x00, 0x00, 0x1b, 0xe4, 0x7f, 0x02,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x41, 0x0d, 0x00, 0x59, 0x00, 0x00,
0x19, 0xe4, 0xff, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x0c, 0x16,
0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf3, 0x07, 0x00, 0xe4, 0x0f, 0x04,
0x10, 0x7a, 0x0b, 0x0b, 0x00, 0x59, 0x00, 0x00, 0x07, 0xe4, 0x7f, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x0d, 0x17, 0x00, 0x59, 0x00, 0x00,
0xff, 0xe4, 0xff, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x06, 0x16,
0x00, 0x58, 0x00, 0x00, 0x8f, 0xe0, 0xc3, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0xa9, 0x08, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x0b,
0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0x07, 0x17, 0x00, 0x59, 0x00, 0x00,
0x8e, 0x84, 0xfe, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x02,
0x08, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf2, 0x0b, 0x00, 0xe2, 0x0f, 0x00,
0x25, 0x78, 0x18, 0x25, 0xd0, 0x00, 0x00, 0x00, 0x16, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x14, 0x02, 0x7c, 0x1d, 0x00, 0x11, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x74, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x25, 0x78, 0x1a, 0x25, 0xe0, 0x00, 0x00, 0x00, 0x16, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x34, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x81, 0x89, 0x7c, 0x0c, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0xa2, 0x02, 0x00, 0x24, 0x7e, 0x27, 0xff, 0x0d, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xc6, 0x0f, 0x00, 0x81, 0x89, 0x3c, 0x0c,
0x0e, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00,
0x24, 0x78, 0x1f, 0x23, 0xd0, 0x00, 0x00, 0x00, 0xff, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x04, 0x05, 0x78, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x70, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x81, 0x99, 0x78, 0x06, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0xe2, 0x08, 0x00, 0x24, 0x78, 0x21, 0x23, 0xe0, 0x00, 0x00, 0x00,
0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x72, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x81, 0x99, 0x38, 0x06, 0x0e, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0xe2, 0x08, 0x00, 0x10, 0x7a, 0x42, 0x18, 0x00, 0x58, 0x00, 0x00,
0xff, 0xe0, 0xf3, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x30, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x43, 0x19,
0x00, 0x59, 0x00, 0x00, 0x1f, 0xe4, 0xff, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x1c, 0xa9,
0x60, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x10, 0x7a, 0x0c, 0x16, 0x00, 0x58, 0x00, 0x00, 0x1d, 0xe0, 0xc1, 0x07,
0x00, 0xe2, 0x2f, 0x00, 0x81, 0xb9, 0x70, 0x0e, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00, 0x10, 0x78, 0x1d, 0xa9,
0x70, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x10, 0x7a, 0x0d, 0x17, 0x00, 0x59, 0x00, 0x00, 0x27, 0x84, 0x7e, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xb9, 0x30, 0x0e, 0x0e, 0x80, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00, 0x10, 0x7a, 0x86, 0x1a,
0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf9, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x25, 0x78, 0x06, 0x25, 0xf0, 0x00, 0x00, 0x00, 0x16, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x01, 0x0c, 0x7c, 0x00, 0x1d, 0x08, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf2, 0x0b, 0x00, 0xe2, 0x0f, 0x00, 0x81, 0xa9, 0x74, 0x0c,
0x0e, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x08, 0x00,
0x10, 0x7a, 0x87, 0x1b, 0x00, 0x59, 0x00, 0x00, 0x21, 0xe4, 0x7f, 0x02,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x1d, 0x23, 0xf0, 0x00, 0x00, 0x00,
0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x2e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x81, 0xa9, 0x34, 0x0c, 0x0e, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0xe2, 0x08, 0x00, 0x10, 0x7a, 0x84, 0x06, 0x00, 0x58, 0x00, 0x00,
0xff, 0xe0, 0xf9, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x68, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x11, 0x72, 0x1a, 0x25, 0x16, 0x00, 0x00, 0x00, 0xff, 0x30, 0x84, 0x07,
0x00, 0xe2, 0x0f, 0x0c, 0x05, 0x78, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x16, 0x25,
0x16, 0x00, 0x00, 0x00, 0xff, 0x38, 0x86, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x85, 0x07, 0x00, 0x59, 0x00, 0x00,
0x1d, 0xe4, 0x7f, 0x02, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x2a, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x11, 0x72, 0x1b, 0x25, 0x17, 0x00, 0x00, 0x00, 0x23, 0x34, 0x0f, 0x01,
0x00, 0xe2, 0x0f, 0x1c, 0x05, 0x78, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x06, 0x1a,
0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf9, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x1c, 0x08, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf0, 0x0b, 0x00, 0xe2, 0x0f, 0x00, 0x81, 0xe9, 0x68, 0x10,
0x0e, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0xe2, 0x02, 0x00,
0x11, 0x72, 0x17, 0x25, 0x17, 0x00, 0x00, 0x00, 0x23, 0x3c, 0x8f, 0x01,
0x00, 0xc4, 0x0f, 0x00, 0x05, 0x78, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x07, 0x1b,
0x00, 0x59, 0x00, 0x00, 0xff, 0xe4, 0x7f, 0x02, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x62, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x19, 0xa9,
0x90, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x81, 0xd9, 0x6c, 0x06, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0xe2, 0x02, 0x00, 0x10, 0x78, 0x0c, 0xa9, 0xa0, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x05, 0x05, 0x78, 0x5c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x78, 0x18, 0xa9, 0x80, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xd9, 0x2c, 0x06, 0x0e, 0x80, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x22, 0x03, 0x00, 0x05, 0x78, 0x5e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x19,
0x08, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf6, 0x0b, 0x00, 0xe2, 0x0f, 0x00,
0x81, 0xe9, 0x28, 0x10, 0x0e, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0x22, 0x03, 0x00, 0x0c, 0x7c, 0x00, 0x0c, 0x08, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf8, 0x0b, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x58, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0x18, 0x08, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf4, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0x89, 0x64, 0x12, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x22, 0x03, 0x00, 0x10, 0x78, 0x0c, 0xa9,
0xb0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x81, 0x89, 0x24, 0x12,
0x0e, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x22, 0x03, 0x00,
0x05, 0x78, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x0c,
0x08, 0x00, 0x00, 0x00, 0x70, 0x62, 0xfa, 0x0b, 0x00, 0xe2, 0x0f, 0x00,
0x81, 0x99, 0x60, 0x14, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0x22, 0x03, 0x00, 0x05, 0x78, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xc6, 0x0f, 0x00, 0x81, 0x99, 0x20, 0x14,
0x0e, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x24, 0x03, 0x00,
0x10, 0x78, 0x06, 0xa9, 0xc0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe4, 0x2f, 0x04, 0x81, 0xb9, 0x58, 0x04, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x22, 0x03, 0x00, 0x10, 0x78, 0x07, 0xa9,
0xd0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0x06, 0x08, 0x00, 0x00, 0x00, 0x70, 0x62, 0xfc, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xb9, 0x18, 0x04, 0x0e, 0x80, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x22, 0x03, 0x00, 0x10, 0x7a, 0x06, 0x16,
0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf1, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0x07, 0x08, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf2, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xc9, 0x54, 0x08, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x22, 0x03, 0x00, 0x10, 0x7a, 0x07, 0x17,
0x00, 0x59, 0x00, 0x00, 0xff, 0xe4, 0x7f, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x10, 0x78, 0x0c, 0xa9, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xc6, 0x0f, 0x00, 0x81, 0xa9, 0x5c, 0x06, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x22, 0x03, 0x00, 0x05, 0x78, 0x14, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x52, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x4c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xa9, 0x1c, 0x06, 0x0e, 0x80, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x24, 0x03, 0x00, 0x05, 0x78, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x2f, 0x00,
0x0c, 0x7c, 0x00, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x81, 0xc9, 0x14, 0x08, 0x0e, 0x80, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x22, 0x03, 0x00, 0x10, 0x78, 0x0c, 0xa9,
0xf0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xc6, 0x0f, 0x00,
0x81, 0xd9, 0x50, 0x0a, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0x22, 0x03, 0x00, 0x0c, 0x7c, 0x00, 0x0c, 0x08, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf4, 0x0b, 0x00, 0xc6, 0x0f, 0x00, 0x81, 0xd9, 0x10, 0x0a,
0x0e, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x28, 0x03, 0x00,
0x81, 0xe9, 0x4c, 0x40, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0x22, 0x03, 0x00, 0x05, 0x78, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x48, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xc6, 0x2f, 0x00, 0x81, 0xe9, 0x04, 0x40,
0x0e, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x28, 0x03, 0x00,
0x81, 0x99, 0x48, 0x42, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0x22, 0x03, 0x00, 0x05, 0x78, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x44, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x0e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x81, 0x99, 0x08, 0x42, 0x0e, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c,
0x00, 0x28, 0x03, 0x00, 0x81, 0x89, 0x44, 0x86, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x28, 0x03, 0x00, 0x81, 0x89, 0x0c, 0x86,
0x0e, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x24, 0x03, 0x00,
0x05, 0x78, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x2f, 0x00, 0x05, 0x78, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xc8, 0x0f, 0x00, 0x81, 0xa9, 0x40, 0x84, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x28, 0x03, 0x00, 0x81, 0xa9, 0x80, 0x84,
0x0e, 0x80, 0x00, 0x00, 0x00, 0x1d, 0x1e, 0x0c, 0x00, 0x22, 0x03, 0x00,
0x12, 0x78, 0x8a, 0x03, 0x07, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x04, 0x12, 0x78, 0x8b, 0x03, 0x60, 0x00, 0x00, 0x00,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x19, 0x78, 0x8c, 0xff,
0x03, 0x00, 0x00, 0x00, 0x03, 0x16, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0x8d, 0xff, 0x07, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00,
0x00, 0x14, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x11, 0x72, 0x8b, 0x8b,
0x8a, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x8f, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x12, 0x78, 0x8a, 0x03, 0x10, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x1a, 0x78, 0x8c, 0x8c, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x25, 0x78, 0x88, 0x8d,
0x80, 0x00, 0x00, 0x00, 0x88, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x11, 0x72, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0xff, 0x18, 0x8f, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x8c, 0x78, 0x00, 0x04, 0x20, 0x00, 0x00, 0x00,
0x70, 0x12, 0xf0, 0x0b, 0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x8a, 0x8a,
0x8b, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x8f, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x12, 0x78, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x0f, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x87, 0x78, 0x05, 0x04, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x72, 0xbe, 0x88,
0xba, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf1, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x12, 0x78, 0x85, 0x8c, 0x07, 0x00, 0x00, 0x00, 0x03, 0x78, 0x8e, 0x07,
0x00, 0xc8, 0x2f, 0x00, 0x11, 0x72, 0x8a, 0x8a, 0x85, 0x00, 0x00, 0x00,
0xff, 0x18, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x72, 0x85, 0xa9,
0x00, 0x00, 0x00, 0x80, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x84, 0x03, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x78, 0x8b, 0x89, 0x01, 0x00, 0x00, 0x00,
0xbb, 0x06, 0x0e, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x72, 0x00, 0x85,
0xae, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0xa9, 0x05, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x0b,
0x00, 0xe4, 0x0f, 0x04, 0x0c, 0x7c, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf2, 0x0b, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x78, 0x89, 0xa9,
0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x12, 0x78, 0x88, 0x84, 0x70, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xc4, 0x0f, 0x00, 0x10, 0x7a, 0x84, 0x8f, 0x00, 0x58, 0x00, 0x00,
0xbe, 0xe0, 0xc7, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0xbe, 0xbe,
0x00, 0x58, 0x00, 0x00, 0xff, 0xe0, 0xf5, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x12, 0x78, 0x86, 0x03, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x04, 0x12, 0x78, 0x87, 0x03, 0xe0, 0x00, 0x00, 0x00,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x7a, 0xbf, 0x8b,
0x00, 0x59, 0x00, 0x00, 0xff, 0xe4, 0x7f, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x19, 0x78, 0xa8, 0x89, 0x04, 0x00, 0x00, 0x00, 0xff, 0x06, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x8c, 0x78, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf0, 0x0b, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0x85, 0x8e,
0x00, 0x59, 0x00, 0x00, 0x8b, 0x84, 0xfe, 0x01, 0x00, 0xc4, 0x0f, 0x00,
0x11, 0x72, 0x00, 0x87, 0x86, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x8f, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0xae, 0x7f, 0xa8, 0xbe, 0x00, 0x00, 0x00, 0x00,
0x4e, 0x1c, 0x14, 0x0c, 0x00, 0xe2, 0x03, 0x00, 0x12, 0x78, 0x87, 0x88,
0x10, 0x00, 0x00, 0x00, 0x03, 0x78, 0x8e, 0x07, 0x00, 0xc6, 0x0f, 0x00,
0xae, 0x7f, 0xa8, 0x84, 0x00, 0x00, 0x80, 0x00, 0x4e, 0x1c, 0x94, 0x0c,
0x00, 0xe2, 0x03, 0x00, 0x1c, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0xf0, 0xf0, 0x03, 0x00, 0xc6, 0x0f, 0x00, 0xaf, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x0e, 0x00,
0x24, 0x78, 0xab, 0x00, 0x80, 0x00, 0x00, 0x00, 0x87, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x00, 0x86, 0x87, 0x00, 0x00, 0x00,
0xff, 0x38, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x82, 0x7c, 0x05, 0x00,
0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x89, 0x7c, 0x00, 0x20, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x4f, 0x00, 0x88, 0x73, 0x00, 0x89, 0x3c, 0x00, 0xa0, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x8f, 0x00, 0x88, 0x73, 0x00, 0x89,
0x78, 0x00, 0x28, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x89, 0x38, 0x00, 0xa8, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89, 0x70, 0x00, 0x38, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89,
0x30, 0x00, 0xb8, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x89, 0x74, 0x00, 0x30, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89, 0x34, 0x00, 0xb0, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89,
0x68, 0x00, 0x48, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x89, 0x6c, 0x00, 0x40, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89, 0x2c, 0x00, 0xc0, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x01, 0x88, 0x73, 0x00, 0x89,
0x28, 0x00, 0xc8, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x89, 0x64, 0x00, 0x50, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89, 0x24, 0x00, 0xd0, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89,
0x60, 0x00, 0x58, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x89, 0x20, 0x00, 0xd8, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89, 0x58, 0x00, 0x68, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89,
0x18, 0x00, 0xe8, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x89, 0x54, 0x00, 0x70, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89, 0x5c, 0x00, 0x60, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89,
0x1c, 0x00, 0xe0, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x89, 0x14, 0x00, 0xf0, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89, 0x10, 0x00, 0xf8, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x05, 0x00, 0x88, 0x73, 0x00, 0x89,
0x50, 0x00, 0x78, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x89, 0x4c, 0x00, 0x80, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89, 0x04, 0x00, 0x00, 0x01,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x07, 0x00, 0x88, 0x73, 0x00, 0x89,
0x48, 0x00, 0x88, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x10, 0x8a, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xc6, 0x4f, 0x00, 0x88, 0x73, 0x00, 0x89, 0x08, 0x00, 0x08, 0x01,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe2, 0x05, 0x00, 0x12, 0x78, 0x11, 0xab,
0x20, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x04,
0x12, 0x78, 0x12, 0xab, 0x40, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89, 0x44, 0x00, 0x90, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x89,
0x0c, 0x00, 0x10, 0x01, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x12, 0x78, 0x04, 0x10, 0x20, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07,
0x00, 0xe4, 0x8f, 0x04, 0x12, 0x78, 0x05, 0x10, 0x40, 0x00, 0x00, 0x00,
0xff, 0x3c, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00, 0x12, 0x78, 0x06, 0x10,
0x60, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x89, 0x40, 0x00, 0x98, 0x00, 0x00, 0xcc, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x08, 0xab, 0x60, 0x00, 0x00, 0x00,
0xff, 0x3c, 0x8e, 0x07, 0x00, 0xc6, 0x4f, 0x00, 0x88, 0x73, 0x00, 0x89,
0x80, 0x00, 0x18, 0x01, 0x00, 0xcc, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x1a, 0x79, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc8, 0x0f, 0x00, 0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00, 0x3b, 0x78, 0x94, 0x04,
0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xe8, 0x04, 0x00,
0x3b, 0x78, 0x90, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0xa8, 0x04, 0x00, 0x3b, 0x78, 0x8c, 0x04, 0x00, 0x00, 0x60, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0xa8, 0x04, 0x00, 0x3b, 0x78, 0x88, 0x04,
0x00, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa8, 0x04, 0x00,
0x3b, 0x78, 0x84, 0x05, 0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x68, 0x22, 0x00, 0x3b, 0x78, 0x80, 0x05, 0x00, 0x00, 0x40, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x7c, 0x05,
0x00, 0x00, 0x60, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00,
0x3b, 0x78, 0x78, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x74, 0x06, 0x00, 0x00, 0x20, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x70, 0x06,
0x00, 0x00, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00,
0x3b, 0x78, 0x6c, 0x06, 0x00, 0x00, 0x60, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x68, 0x06, 0x00, 0x00, 0x80, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0xa4, 0x10,
0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00,
0x3b, 0x78, 0xa0, 0x10, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x9c, 0x10, 0x00, 0x00, 0x60, 0x00,
0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x98, 0x10,
0x00, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00,
0x3b, 0x78, 0x64, 0xab, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x42, 0x00, 0x00,
0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x54, 0xab, 0x00, 0x00, 0xc0, 0x00,
0x00, 0x42, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x44, 0xab,
0x00, 0x00, 0xe0, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00,
0x3b, 0x78, 0x34, 0xab, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x00,
0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x60, 0x11, 0x00, 0x00, 0xa0, 0x00,
0x00, 0x42, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x50, 0x11,
0x00, 0x00, 0xc0, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00,
0x3b, 0x78, 0x40, 0x11, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x42, 0x00, 0x00,
0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x30, 0x11, 0x00, 0x00, 0x00, 0x01,
0x00, 0x42, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x5c, 0x12,
0x00, 0x00, 0xa0, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00,
0x3b, 0x78, 0x4c, 0x12, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x42, 0x00, 0x00,
0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x3c, 0x12, 0x00, 0x00, 0xe0, 0x00,
0x00, 0x42, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x2c, 0x12,
0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00,
0x3b, 0x78, 0x58, 0x08, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x42, 0x00, 0x00,
0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x48, 0x08, 0x00, 0x00, 0xc0, 0x00,
0x00, 0x42, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x38, 0x08,
0x00, 0x00, 0xe0, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x68, 0x02, 0x00,
0x3b, 0x78, 0x28, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x42, 0x00, 0x00,
0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x04, 0x00, 0x05, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x08, 0x00, 0x68, 0x02, 0x00, 0x3b, 0x78, 0x0c, 0x00,
0x05, 0x00, 0x08, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x62, 0x02, 0x00,
0x4d, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xea, 0x0f, 0x00, 0x02, 0x78, 0x08, 0x00, 0x00, 0x00, 0xfe, 0x42,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0xef, 0x00, 0x99, 0x78, 0x06, 0x06,
0x07, 0x00, 0x00, 0x00, 0x3f, 0x06, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x12, 0x78, 0x09, 0xae, 0x07, 0x00, 0x00, 0x00, 0xa9, 0x78, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7a, 0xaa, 0xaa, 0x00, 0x62, 0x00, 0x00,
0xff, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x11, 0x78, 0xbc, 0xa9,
0x00, 0x20, 0x00, 0x00, 0xff, 0x48, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x20, 0x7a, 0x08, 0x08, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x99, 0x78, 0x07, 0x3f, 0x1f, 0x00, 0x00, 0x00,
0x06, 0x14, 0x01, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7a, 0x13, 0xa9,
0x00, 0x63, 0x00, 0x00, 0xaa, 0x02, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x90, 0x72, 0x0a, 0x11, 0x0a, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0xf1, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x78, 0x12, 0x08, 0x00, 0x00, 0xfe, 0x42,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0x08, 0xac,
0x03, 0x00, 0x00, 0x00, 0xff, 0x28, 0x8f, 0x07, 0x00, 0xe2, 0x0f, 0x0c,
0x24, 0x78, 0xbc, 0x09, 0x10, 0x00, 0x00, 0x00, 0xbc, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0xac, 0xac, 0x03, 0x00, 0x00, 0x00,
0xff, 0x38, 0x8f, 0x07, 0x00, 0xe2, 0x0f, 0x08, 0xc2, 0x73, 0x0e, 0x12,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xa2, 0x02, 0x00,
0x19, 0x78, 0x10, 0xff, 0x05, 0x00, 0x00, 0x00, 0x08, 0x14, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x24, 0x7e, 0x09, 0xff, 0x07, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0x0b, 0xff,
0x1f, 0x00, 0x00, 0x00, 0x08, 0x14, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0xb9, 0x7a, 0x12, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x0a, 0x08, 0xe0, 0xff, 0xff, 0xff,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0xb9, 0x7a, 0x08, 0x00,
0x00, 0x63, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x11, 0x72, 0x0b, 0x0b, 0x10, 0x00, 0x00, 0x00, 0xff, 0x10, 0x8f, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x82, 0x7c, 0x0f, 0x00, 0x3f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x72, 0x0a, 0x0a,
0x03, 0x00, 0x00, 0x00, 0xff, 0xe1, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x82, 0x7c, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x11, 0x0b, 0xfc, 0xff, 0xff, 0x3f,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x99, 0x72, 0x0c, 0x12,
0x0c, 0x00, 0x00, 0x00, 0x08, 0x02, 0x01, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x19, 0x78, 0x0b, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x0a, 0x14, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x90, 0x72, 0x0b, 0x0d, 0x0b, 0x00, 0x00, 0x00,
0x3f, 0xe4, 0x7f, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x19, 0x78, 0xac, 0xff,
0x02, 0x00, 0x00, 0x00, 0xac, 0x16, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x11, 0x10, 0x01, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x08, 0x00, 0x06, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x82, 0x7c, 0x06, 0x00,
0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x11, 0x72, 0x0b, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0xff, 0x10, 0x8f, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x99, 0x72, 0x09, 0x12, 0x09, 0x00, 0x00, 0x00,
0x08, 0x02, 0x01, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0xac, 0xac,
0xe0, 0xff, 0xff, 0x3f, 0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x25, 0x7a, 0x08, 0xa9, 0x00, 0x62, 0x00, 0x00, 0x08, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0xbd, 0x00, 0xbf, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x11, 0x72, 0xac, 0x0b,
0xac, 0x00, 0x00, 0x00, 0xff, 0xf2, 0x8f, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x24, 0x72, 0xbf, 0xff, 0xff, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0xc0, 0x0b, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x10, 0x72, 0x0a, 0x09,
0x13, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x78, 0x11, 0xac, 0x04, 0x00, 0x00, 0x00, 0x11, 0x02, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7a, 0xba, 0x08, 0x00, 0x5c, 0x00, 0x00,
0xba, 0xe0, 0x91, 0x07, 0x00, 0xc8, 0x0f, 0x00, 0x10, 0x7a, 0xbb, 0x0a,
0x00, 0x5d, 0x00, 0x00, 0xbb, 0x24, 0x7e, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x11, 0x78, 0xc1, 0x11, 0x00, 0x20, 0x00, 0x00, 0xff, 0x10, 0x8e, 0x07,
0x00, 0xce, 0x6f, 0x00, 0x05, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x1e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x18, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0xb6, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x12, 0x78, 0x10, 0x00, 0x20, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x04, 0x3c, 0x72, 0x20, 0x04, 0xa4, 0x00, 0x00, 0x00,
0x20, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x4f, 0x04, 0x05, 0x78, 0xb4, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0xb2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3b, 0x78, 0x08, 0x10,
0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x62, 0x2e, 0x00,
0x05, 0x78, 0xae, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0xaa, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3c, 0x72, 0x1e, 0x04, 0xa6, 0x00, 0x00, 0x00, 0x1e, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0xb8, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x12, 0x78, 0xc2, 0x00, 0x40, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x04, 0xb9, 0x7a, 0x08, 0x00, 0xc0, 0x6e, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0xc3, 0x00,
0x60, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x92, 0x78, 0x08, 0x08, 0xff, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x8e, 0x0f,
0x00, 0xc4, 0x0f, 0x00, 0x3c, 0x72, 0x1c, 0x04, 0xa0, 0x00, 0x00, 0x00,
0x1c, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x1a, 0x04,
0xa2, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x18, 0x04, 0x9c, 0x00, 0x00, 0x00, 0x18, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x16, 0x04, 0x9e, 0x00, 0x00, 0x00,
0x16, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x14, 0x04,
0x98, 0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0xb6, 0x04, 0x9a, 0x00, 0x00, 0x00, 0xb6, 0x08, 0x00, 0x00,
0x00, 0x64, 0x0b, 0x08, 0x3b, 0x78, 0x04, 0x10, 0x05, 0x00, 0x08, 0x00,
0x00, 0x02, 0x00, 0x08, 0x00, 0xa8, 0x0e, 0x02, 0x3b, 0x78, 0x10, 0xc2,
0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0xe4, 0x8e, 0x00,
0x3c, 0x72, 0xb8, 0x0c, 0x9a, 0x00, 0x00, 0x00, 0xb8, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0xb4, 0x0c, 0xa4, 0x00, 0x00, 0x00,
0xb4, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0xb2, 0x0c,
0xa6, 0x00, 0x00, 0x00, 0xb2, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0xb0, 0x0c, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0xae, 0x0c, 0xa2, 0x00, 0x00, 0x00,
0xae, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0xac, 0x0c,
0x9c, 0x00, 0x00, 0x00, 0xac, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0xaa, 0x0c, 0x9e, 0x00, 0x00, 0x00, 0xaa, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x22, 0x0c, 0x98, 0x00, 0x00, 0x00,
0x22, 0x08, 0x00, 0x00, 0x00, 0x64, 0x0b, 0x00, 0x3b, 0x78, 0x0c, 0xc2,
0x05, 0x00, 0x08, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x2c, 0x0f, 0x02,
0x3c, 0x72, 0xb6, 0x08, 0x8a, 0x00, 0x00, 0x00, 0xb6, 0x08, 0x00, 0x00,
0x00, 0x70, 0x2f, 0x08, 0x3c, 0x72, 0xb8, 0x04, 0x8a, 0x00, 0x00, 0x00,
0xb8, 0x08, 0x00, 0x00, 0x00, 0x70, 0x4f, 0x00, 0x3c, 0x72, 0x20, 0x08,
0x94, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x1e, 0x08, 0x96, 0x00, 0x00, 0x00, 0x1e, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x1c, 0x08, 0x90, 0x00, 0x00, 0x00,
0x1c, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x1a, 0x08,
0x92, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x18, 0x08, 0x8c, 0x00, 0x00, 0x00, 0x18, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x16, 0x08, 0x8e, 0x00, 0x00, 0x00,
0x16, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x14, 0x08,
0x88, 0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x00, 0x00, 0x64, 0x0b, 0x00,
0x3b, 0x78, 0x08, 0xc3, 0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08,
0x00, 0x6c, 0x0e, 0x02, 0x3c, 0x72, 0xb4, 0x04, 0x94, 0x00, 0x00, 0x00,
0xb4, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0xb2, 0x04,
0x96, 0x00, 0x00, 0x00, 0xb2, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0xb0, 0x04, 0x90, 0x00, 0x00, 0x00, 0xb0, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0xae, 0x04, 0x92, 0x00, 0x00, 0x00,
0xae, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0xac, 0x04,
0x8c, 0x00, 0x00, 0x00, 0xac, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0xaa, 0x04, 0x8e, 0x00, 0x00, 0x00, 0xaa, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x22, 0x04, 0x88, 0x00, 0x00, 0x00,
0x22, 0x08, 0x00, 0x00, 0x00, 0x64, 0x0b, 0x00, 0x3b, 0x78, 0x04, 0xc3,
0x05, 0x00, 0x08, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0xac, 0x0e, 0x02,
0x3c, 0x72, 0xb6, 0x10, 0x7a, 0x00, 0x00, 0x00, 0xb6, 0x08, 0x00, 0x00,
0x00, 0x70, 0x8f, 0x08, 0x3c, 0x72, 0xb8, 0x0c, 0x7a, 0x00, 0x00, 0x00,
0xb8, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x01, 0x3c, 0x72, 0x14, 0x10,
0x78, 0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x08,
0x3c, 0x72, 0x22, 0x0c, 0x78, 0x00, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x00, 0x3c, 0x72, 0x20, 0x10, 0x84, 0x00, 0x00, 0x00,
0x20, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x1e, 0x10,
0x86, 0x00, 0x00, 0x00, 0x1e, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x1c, 0x10, 0x80, 0x00, 0x00, 0x00, 0x1c, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x1a, 0x10, 0x82, 0x00, 0x00, 0x00,
0x1a, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x18, 0x10,
0x7c, 0x00, 0x00, 0x00, 0x18, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x16, 0x10, 0x7e, 0x00, 0x00, 0x00, 0x16, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x08, 0x3c, 0x72, 0xaa, 0x0c, 0x7e, 0x00, 0x00, 0x00,
0xaa, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0xb4, 0x0c,
0x84, 0x00, 0x00, 0x00, 0xb4, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0xb2, 0x0c, 0x86, 0x00, 0x00, 0x00, 0xb2, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0xb0, 0x0c, 0x80, 0x00, 0x00, 0x00,
0xb0, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0xae, 0x0c,
0x82, 0x00, 0x00, 0x00, 0xae, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0xac, 0x0c, 0x7c, 0x00, 0x00, 0x00, 0xac, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x00, 0x3c, 0x72, 0xb6, 0x08, 0x6a, 0x00, 0x00, 0x00,
0xb6, 0x08, 0x00, 0x00, 0x00, 0x70, 0x2f, 0x0a, 0x3c, 0x72, 0xb8, 0x04,
0x6a, 0x00, 0x00, 0x00, 0xb8, 0x08, 0x00, 0x00, 0x00, 0x70, 0x4f, 0x00,
0x3c, 0x72, 0x14, 0x08, 0x68, 0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x08, 0x3c, 0x72, 0x22, 0x04, 0x68, 0x00, 0x00, 0x00,
0x22, 0x08, 0x00, 0x00, 0x00, 0x64, 0x0f, 0x00, 0x32, 0x7a, 0xb6, 0xb6,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x02,
0x32, 0x7a, 0xb7, 0xb7, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc6, 0x0f, 0x00, 0x30, 0x72, 0x11, 0xff, 0xb6, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x3c, 0x72, 0x20, 0x08,
0x74, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x04,
0x32, 0x7a, 0xb8, 0xb8, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x32, 0x7a, 0xb9, 0xb9, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0xd7, 0xff,
0xb6, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0xe4, 0xff, 0xb8, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x1e, 0x08, 0x76, 0x00, 0x00, 0x00,
0x1e, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00, 0x32, 0x7a, 0x14, 0x14,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x32, 0x7a, 0x15, 0x15, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0xd1, 0xff, 0xb7, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0xc2, 0xff,
0x14, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3c, 0x72, 0x1c, 0x08, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0f, 0x00, 0x32, 0x7a, 0x22, 0x22, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x32, 0x7a, 0x23, 0x23,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0x0d, 0xff, 0x15, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x30, 0x72, 0x14, 0xff, 0x14, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x1a, 0x08,
0x72, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x04,
0x30, 0x72, 0x10, 0xff, 0x15, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x32, 0x7a, 0x20, 0x20, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x02, 0x32, 0x7a, 0x21, 0x21,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0xd0, 0xff, 0xb9, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x18, 0x08, 0x6c, 0x00, 0x00, 0x00,
0x18, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00, 0x32, 0x7a, 0x1e, 0x1e,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x32, 0x7a, 0x1f, 0x1f, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0xd5, 0xff, 0x20, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0xcd, 0xff,
0x1e, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3c, 0x72, 0x16, 0x08, 0x6e, 0x00, 0x00, 0x00, 0x16, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0b, 0x00, 0x32, 0x7a, 0x1c, 0x1c, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x32, 0x7a, 0x1d, 0x1d,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0xcf, 0xff, 0x21, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x19, 0x78, 0x08, 0xff, 0x01, 0x00, 0x00, 0x00,
0x03, 0x16, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x02, 0x3c, 0x72, 0xaa, 0x04,
0x6e, 0x00, 0x00, 0x00, 0xaa, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x04,
0x12, 0x78, 0x09, 0x03, 0x03, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x1b, 0x1b, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x08, 0x08,
0xf0, 0xff, 0xff, 0x7f, 0xff, 0xc0, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x32, 0x7a, 0x1a, 0x1a, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0xc9, 0xff, 0x1c, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x11, 0x72, 0xc4, 0x09,
0x08, 0x00, 0x00, 0x00, 0xff, 0x08, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x3c, 0x72, 0xb4, 0x04, 0x74, 0x00, 0x00, 0x00, 0xb4, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x18, 0x18, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x10, 0x78, 0x0a, 0xc4,
0xc0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x32, 0x7a, 0x19, 0x19, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x08, 0xc4, 0xc8, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xc7, 0xff,
0x18, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x0c, 0x7c, 0x00, 0x0a, 0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf8, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0xb2, 0x04, 0x76, 0x00, 0x00, 0x00,
0xb2, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x04, 0x30, 0x72, 0x0a, 0xff,
0xb7, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf4, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0x16, 0x16, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x09, 0xc4,
0xc1, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x32, 0x7a, 0x17, 0x17, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x11, 0x11, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x05, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x18, 0xff,
0x18, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3c, 0x72, 0xb0, 0x04, 0x70, 0x00, 0x00, 0x00, 0xb0, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0f, 0x04, 0x08, 0x78, 0x0a, 0x0a, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x05, 0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0xaa, 0xaa,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x02,
0x0c, 0x7c, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf6, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x09, 0xff, 0x22, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x08, 0xc4,
0x48, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x32, 0x7a, 0xab, 0xab, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0xc2, 0xc2, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x05, 0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0xae, 0x04,
0x72, 0x00, 0x00, 0x00, 0xae, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x04,
0x08, 0x78, 0x0d, 0x0d, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xc3, 0xff, 0x16, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x0b, 0xc4,
0x41, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x0c, 0xff, 0xaa, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x10, 0x10, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x06, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x16, 0xff,
0x16, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x09, 0x09, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x06,
0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0xac, 0x04, 0x6c, 0x00, 0x00, 0x00,
0xac, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0b, 0x00, 0x10, 0x78, 0x0e, 0xc4,
0x40, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x30, 0x72, 0x0f, 0xff, 0xaa, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x12, 0xc4, 0x09, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04, 0x30, 0x72, 0xaa, 0xff,
0x19, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x10, 0x78, 0x15, 0xc4, 0x08, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x04, 0x30, 0x72, 0xc5, 0xff, 0x19, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x04, 0xc4,
0x89, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x06,
0x30, 0x72, 0xce, 0xff, 0x1b, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x05, 0xc4, 0x88, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04, 0x32, 0x7a, 0xb0, 0xb0,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x78, 0x06, 0xc4, 0x81, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0xb1, 0xb1, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x04,
0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xfa, 0x0b, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x04, 0xff, 0xb9, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x05, 0x04, 0x00, 0x00, 0x00,
0x70, 0x62, 0xfc, 0x0b, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x05, 0xff,
0xb8, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0x06, 0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0xaf, 0xaf, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x07, 0xc4,
0x80, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x32, 0x7a, 0xae, 0xae, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0x06, 0xc4, 0x49, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0xb5, 0xb5,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x05, 0x05, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x05,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0xac, 0xac, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x04, 0x04,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe2, 0x0f, 0x00,
0x32, 0x7a, 0xad, 0xad, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x07, 0x04, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf2, 0x0b, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x07, 0xff,
0x22, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0x06, 0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf4, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x06, 0xff, 0x23, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0xc3, 0xc3,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x06, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x22, 0xff, 0x17, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x07, 0x07, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x05, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x13, 0xff,
0xac, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x06, 0x06, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xc6, 0xff, 0xaf, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x08,
0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf6, 0x0b, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x08, 0xff, 0x23, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x23, 0x14, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x06, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x14, 0xff,
0x17, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x0c, 0x0c, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x06,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xd4, 0xff, 0xb0, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x08, 0x08,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x06, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0xc8, 0xff, 0xb1, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x0b, 0x04, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf8, 0x0b, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x0b, 0xff,
0xab, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x14, 0x14, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x06,
0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0xb2, 0xb2, 0x00, 0x68, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x17, 0x16,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x16, 0xff, 0xac, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x0b, 0x0b, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x06, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xac, 0xff,
0xaf, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0x0e, 0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xfa, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x0e, 0xff, 0xab, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x22, 0x22,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x32, 0x7a, 0xb3, 0xb3, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x0f, 0x0f, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x32, 0x7a, 0xb4, 0xb4,
0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0x0e, 0x0e, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xcb, 0xff, 0x1c, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x12,
0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xfc, 0x0b, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x12, 0xff, 0xad, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0xc7, 0xc7, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x04, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xd2, 0xff,
0xb0, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0xaa, 0xaa, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x04,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x1c, 0xff, 0x1f, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x13, 0x13,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x04, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0xde, 0xff, 0xb2, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x12, 0x12, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x04, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xb0, 0xff,
0xb3, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0x15, 0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x15, 0xff, 0xad, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x78, 0xab, 0xc4,
0x01, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0xad, 0xff, 0x1a, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x19, 0x18, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x04, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x18, 0xff,
0x1b, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0xc5, 0xc5, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x04,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x1e, 0xff, 0x1e, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x16, 0x16,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x04, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x1f, 0xff, 0x1f, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x15, 0x15, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x04, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xb2, 0xff,
0xb2, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0xab, 0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf2, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xab, 0xff, 0x1a, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x1b, 0x18,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x1a, 0xff, 0xae, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x08, 0x78, 0x18, 0xac, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x05, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xae, 0xff,
0xae, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x78, 0xac, 0xc4, 0xc9, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xb3, 0xff, 0xb3, 0x00, 0x00, 0x20,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0xad, 0xad,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0x20, 0xff, 0x20, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0x1a, 0x1a, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x05, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x21, 0xff,
0x21, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0xc4, 0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf4, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xe2, 0xff, 0xb4, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x08, 0x78, 0xaf, 0xab,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0xeb, 0xff, 0xb4, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0xce, 0xce, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x05, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x78, 0xc4, 0xae,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0xae, 0xff, 0xb5, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0xab, 0xc6, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x05, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xc6, 0xff,
0xb1, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x7c, 0x00, 0xac, 0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf6, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0xac, 0xff, 0x1d, 0x00, 0x00, 0x30,
0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0xc9, 0xc9,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x06, 0x00, 0xe2, 0x0f, 0x00,
0x30, 0x72, 0xb1, 0xff, 0xb5, 0x00, 0x00, 0x30, 0x00, 0x49, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x78, 0xd4, 0xd4, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x06, 0x00, 0xe2, 0x0f, 0x00, 0x30, 0x72, 0x1d, 0xff,
0x1d, 0x00, 0x00, 0x20, 0x00, 0x49, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x78, 0xb5, 0xac, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x06,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x78, 0xb8, 0xc8, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x06, 0x00, 0xe4, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0xff,
0x08, 0x00, 0x00, 0x00, 0x70, 0x52, 0xf8, 0x0b, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x78, 0xb7, 0x1c, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0xcb, 0xcb, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x06, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0x1d, 0x1d,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x06, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x78, 0xd2, 0xd2, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x06,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x78, 0xb6, 0xc6, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x06, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0xcd, 0xcd,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x78, 0xde, 0xde, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0xb4, 0xb0, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0xd3, 0x1e,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x04, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x78, 0xb9, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x04,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x78, 0xe0, 0xb2, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x04, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0xb3, 0xb3,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x04, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x78, 0xd5, 0xd5, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x04,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0xcf, 0xcf, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x04, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0xe2, 0xe2,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x04, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x78, 0xb1, 0xb1, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x04,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x78, 0xec, 0x20, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x05, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0xea, 0x21,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x05, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x78, 0xeb, 0xeb, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x05,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0x1c, 0xae, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x00, 0x05, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0xd7, 0xd7,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x78, 0xd1, 0xd1, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x78, 0xe4, 0xe4, 0x00, 0x00, 0x80, 0xff,
0x00, 0x00, 0x80, 0x05, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x78, 0xd0, 0xd0,
0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x80, 0x05, 0x00, 0xe2, 0x0f, 0x00,
0x47, 0xc9, 0x00, 0x00, 0x90, 0x10, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xec, 0x0f, 0x00, 0x24, 0x7e, 0x1e, 0xff, 0x0e, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x82, 0x78, 0x08, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x78, 0xc6, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xc8, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x78, 0xca, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x74, 0xcc, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x0b, 0x78, 0x00, 0x1e, 0x00, 0x00, 0x80, 0xff,
0x00, 0xd0, 0xf1, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xd8, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x78, 0xd6, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xdc, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x78, 0xda, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x74, 0xb0, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x78, 0xae, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xe6, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x78, 0xac, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x20, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x78, 0x1e, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0x1f, 0xff, 0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x78, 0xb2, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xe8, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x47, 0x89, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
0x00, 0x00, 0x80, 0x03, 0x00, 0xec, 0x0f, 0x00, 0x21, 0x7e, 0xec, 0xec,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0xd5, 0xd5, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x7e, 0xd3, 0xd3, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xcd, 0xcd,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0xcb, 0xcb, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xc9, 0xc9, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xaf, 0xaf,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0xad, 0xad, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x7e, 0x19, 0x19, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xc7, 0xc7,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0x17, 0x17, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xc3, 0xc3, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x23, 0x23,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0xc2, 0xc2, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xc4, 0x0f, 0x00, 0x21, 0x7e, 0x11, 0x11, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xd7, 0xd7,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x78, 0xec, 0xec, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0xd5, 0xd5, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0xd3, 0xd3,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0xe8, 0x00, 0xec, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x02, 0x00, 0x20, 0x78, 0xcd, 0xcd, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xb2, 0x00,
0xd5, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x02, 0x00,
0x20, 0x78, 0xcb, 0xcb, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x20, 0x00, 0xd3, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0xc9, 0xc9,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x1e, 0x00, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0xaf, 0xaf, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xe6, 0x00,
0xcb, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0xad, 0xad, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xac, 0x00, 0xc9, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x19, 0x19,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0xb0, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0xc7, 0xc7, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xae, 0x00,
0xad, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x17, 0x17, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xdc, 0x00, 0x19, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0xc3, 0xc3,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0xda, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x23, 0x23, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xd8, 0x00,
0x17, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0xc2, 0xc2, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xd6, 0x00, 0xc3, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x11, 0x11,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0xcc, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0xd7, 0xd7, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xca, 0x00,
0xc2, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x08, 0x73, 0xc8, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x64, 0x02, 0x00, 0x08, 0x73, 0xc6, 0x00, 0xd7, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x66, 0x02, 0x00, 0x02, 0x7c, 0x11, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0xef, 0x00,
0x24, 0x7e, 0x23, 0xff, 0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xe9, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xe7, 0xff,
0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0xaf, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xad, 0xff, 0x08, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xdd, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0xdb, 0xff, 0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xd9, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xd7, 0xff,
0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0xcd, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xcb, 0xff, 0x08, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xc9, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0x19, 0xff, 0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x17, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xc7, 0xff,
0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x47, 0x89, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xec, 0x0f, 0x00, 0x21, 0x7e, 0xea, 0xea, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xcf, 0xcf,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x7e, 0xb9, 0xb9, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xb7, 0xb7, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x1d, 0x1d,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0xb5, 0xb5, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xce, 0xce, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x1b, 0x1b,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x7e, 0xc5, 0xc5, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xaa, 0xaa, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x22, 0x22,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0x14, 0x14, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x10, 0x10, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x0d, 0x0d,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x7e, 0x0a, 0x0a, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xd1, 0xd1, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0xea, 0xea,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x78, 0xcf, 0xcf, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0xb9, 0xb9, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x1f, 0x00,
0xea, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x02, 0x00,
0x20, 0x78, 0xb7, 0xb7, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x21, 0x00, 0xcf, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x02, 0x00, 0x20, 0x78, 0x1d, 0x1d,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x11, 0x00, 0xb9, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0xb5, 0xb5, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x23, 0x00,
0xb7, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0xce, 0xce, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xe9, 0x00, 0x1d, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x1b, 0x1b,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0xe7, 0x00, 0xb5, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0xc5, 0xc5, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xaf, 0x00,
0xce, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0xaa, 0xaa, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xad, 0x00, 0x1b, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x22, 0x22,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0xdd, 0x00, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x14, 0x14, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xdb, 0x00,
0xaa, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x10, 0x10, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xd9, 0x00, 0x22, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x0d, 0x0d,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0xd7, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x0a, 0x0a, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xcd, 0x00,
0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0xd1, 0xd1, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xcb, 0x00, 0x0d, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x08, 0x73, 0xc9, 0x00,
0x0a, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x64, 0x02, 0x00,
0x08, 0x73, 0xc7, 0x00, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x66, 0x02, 0x00, 0x02, 0x7c, 0x1d, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0xef, 0x00, 0x24, 0x7e, 0x1b, 0xff,
0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0xe5, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xe3, 0xff, 0x08, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xe1, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0xdf, 0xff, 0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xd5, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xd3, 0xff,
0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0xd1, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xcf, 0xff, 0x08, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xc3, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0xb9, 0xff, 0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xb7, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xb5, 0xff,
0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x47, 0x89, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xec, 0x0f, 0x00, 0x21, 0x7e, 0xeb, 0xeb, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xe2, 0xe2,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x7e, 0xe0, 0xe0, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xde, 0xde, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xd2, 0xd2,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0xd4, 0xd4, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xc4, 0xc4, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x1a, 0x1a,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x7e, 0x16, 0x16, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x13, 0x13, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x0f, 0x0f,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0x0c, 0x0c, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x09, 0x09, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x07, 0x07,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x7e, 0x05, 0x05, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xe4, 0xe4, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0xeb, 0xeb,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x78, 0xe2, 0xe2, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0xe0, 0xe0, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x19, 0x00,
0xeb, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x02, 0x00,
0x20, 0x78, 0xde, 0xde, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x17, 0x00, 0xe2, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x02, 0x00, 0x20, 0x78, 0xd2, 0xd2,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x1d, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0xd4, 0xd4, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x1b, 0x00,
0xde, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0xc4, 0xc4, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xe5, 0x00, 0xd2, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x1a, 0x1a,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0xe3, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x16, 0x16, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xe1, 0x00,
0xc4, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x13, 0x13, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xdf, 0x00, 0x1a, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x0f, 0x0f,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0xd5, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x0c, 0x0c, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xd3, 0x00,
0x13, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0x09, 0x09, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xd1, 0x00, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x07, 0x07,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0xcf, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x78, 0x05, 0x05, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xc3, 0x00,
0x09, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x78, 0xe4, 0xe4, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xb9, 0x00, 0x07, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x08, 0x73, 0xb7, 0x00,
0x05, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x64, 0x02, 0x00,
0x08, 0x73, 0xb5, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x66, 0x02, 0x00, 0x02, 0x78, 0x16, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0xef, 0x00, 0x47, 0x89, 0x00, 0x00,
0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xec, 0x0f, 0x00,
0x21, 0x7e, 0xb8, 0xb8, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x1c, 0x1c, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x7e, 0xb4, 0xb4,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0xb6, 0xb6, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xd0, 0xd0,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0xb1, 0xb1, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0xb3, 0xb3, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x7e, 0xab, 0xab,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0x15, 0x15, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x12, 0x12, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x0e, 0x0e,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0x0b, 0x0b, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x7e, 0x08, 0x08, 0x0e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x08, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x7e, 0x06, 0x06,
0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x7e, 0x04, 0x04, 0x0e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x08,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0xe2, 0xb8, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0x16, 0x1c,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x78, 0xb4, 0xb4, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x78, 0xe4, 0xb6, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xe2, 0x00,
0xe2, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x78, 0xde, 0x18, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x1c, 0x00, 0xb4, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00, 0x20, 0x78, 0xb8, 0xd0,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x16, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x78, 0xb1, 0xb1, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xe4, 0x00,
0xe4, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x78, 0xb3, 0xb3, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xde, 0x00, 0xde, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x20, 0x78, 0xab, 0xab,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0x18, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x04, 0x00, 0x20, 0x78, 0x15, 0x15, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0x1a, 0x00,
0xb3, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x04, 0x00,
0x20, 0x78, 0x12, 0x12, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xe0, 0x00, 0xab, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x04, 0x00, 0x20, 0x78, 0x0e, 0x0e,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0xd4, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x04, 0x00, 0x20, 0x78, 0x0b, 0x0b, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xd2, 0x00,
0x12, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x04, 0x00,
0x20, 0x78, 0x08, 0x08, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xd0, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x04, 0x00, 0x20, 0x78, 0x06, 0x06,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x73, 0xce, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x04, 0x00, 0x20, 0x78, 0x04, 0x04, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x73, 0xc2, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x04, 0x00,
0x08, 0x73, 0xb6, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x04, 0x00, 0x08, 0x73, 0xb8, 0x00, 0xb8, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x08, 0x73, 0xb4, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x04, 0x00,
0x47, 0x79, 0x00, 0x00, 0x40, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03,
0x00, 0xca, 0x0f, 0x00, 0x24, 0x7e, 0x18, 0xff, 0x08, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x1a, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0x1c, 0xff, 0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xe4, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xe2, 0xff,
0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0xe0, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xde, 0xff, 0x08, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xd4, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0xd2, 0xff, 0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xd0, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xce, 0xff,
0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0xc2, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xb6, 0xff, 0x08, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xb4, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0xb8, 0xff, 0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x47, 0x79, 0x00, 0x00, 0x40, 0x1b, 0x00, 0x00,
0x00, 0x00, 0x80, 0x03, 0x00, 0xcc, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0xec,
0xd5, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0xea, 0xcf, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0xeb, 0xe2, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00, 0x08, 0x72, 0x1e, 0xec,
0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0x0f, 0x00, 0x08, 0x72, 0x20, 0xea, 0xcf, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x08, 0x72, 0x1f, 0xeb, 0xe2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1c,
0xb1, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1e, 0xd3, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf1, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x20, 0xb9, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xda, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1f,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xe2, 0x0f, 0x0c,
0x24, 0x74, 0xd6, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x72, 0xac, 0x1c, 0xb1, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x01, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xca, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x72, 0x1e, 0x1e, 0xd3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xc6, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x72, 0x20, 0x20,
0xb9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x74, 0xe7, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x72, 0x1f, 0x1f, 0xe0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xe3, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0xac, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xdf, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1e,
0xcd, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x82, 0x78, 0x08, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x20, 0xb7, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1f,
0xde, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x0c,
0x08, 0x72, 0x21, 0xac, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x1e, 0x1e, 0xcd, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x20, 0x20,
0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x1f, 0x1f, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x21, 0xb4, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf7, 0x03, 0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1e,
0xcb, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x20, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1f, 0xd2, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0xd9, 0x21,
0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x1e, 0x1e, 0xcb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x20, 0x20, 0x1d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x21, 0x1f,
0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0xd9, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1e, 0xc9, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x20,
0xb5, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x21, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0xd9, 0xd9, 0xb6, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x01, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x1e, 0x1e,
0xc9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x1f, 0x20, 0xb5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x21, 0x21, 0xd4, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0xd9,
0xb8, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x1e, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1f, 0xce, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x21,
0xc4, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0xac, 0xd9, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x1e, 0x1e, 0xaf, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x20, 0x1f,
0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x21, 0x21, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0xac, 0xab, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf7, 0x03, 0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1e,
0xad, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x20, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x21, 0x1a, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x1f, 0xac,
0xab, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x1e, 0x1e, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x20, 0x20, 0x1b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x21, 0x21,
0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x1f, 0x18, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1e, 0x19, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x20,
0xc5, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x21, 0x16, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0xac, 0x1f, 0x18, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x01, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x1e, 0x1e,
0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x1f, 0x20, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x20, 0x21, 0x16, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0xac,
0x15, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x1e, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1f, 0xaa, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x20,
0x13, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x21, 0xac, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x1e, 0x1e, 0xc7, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x1f, 0x1f,
0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x20, 0x20, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x21, 0x12, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf7, 0x03, 0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1e,
0x17, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x1f, 0x22, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x20, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x21, 0x21,
0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x1e, 0x1e, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x1f, 0x1f, 0x22, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0xd9, 0x20,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x21, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1e, 0xc3, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1f,
0x14, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0xd9, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x20, 0x21, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x01, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x1e, 0x1e,
0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x21, 0x1f, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0xac, 0xd9, 0x0c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x20,
0x0b, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x1e, 0x23, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x21, 0x10, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0xac,
0x09, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0xd9, 0x20, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x1f, 0x1e, 0x23, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x20, 0x21,
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0xac, 0xac, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1f, 0xc2, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf1, 0x03, 0x00, 0xc4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0xd9,
0x08, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x20, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0xac, 0x07, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf5, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x1e, 0x1f,
0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0xd9, 0xd9, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x1f, 0x20, 0x0d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0xac, 0xac,
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x1e, 0x11, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0xd9, 0x06, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1f,
0x0a, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0xac, 0x05, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x1e, 0x1e, 0x11, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0xd9, 0xd9,
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x20, 0x1f, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x1f, 0xac, 0x05, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1e,
0xd7, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0xd9, 0x04, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1f, 0xe4, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf5, 0x03, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x1e, 0x1e,
0xd7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0xd9, 0xd9, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0x1f, 0x1f, 0xe4, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe2, 0x0f, 0x00, 0x89, 0x7f, 0x21, 0x1e,
0x00, 0x1f, 0x20, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x0b, 0x72, 0x00, 0x20, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03,
0x00, 0xe4, 0x0f, 0x0c, 0x0b, 0x72, 0x00, 0xd9, 0xd0, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf7, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x89, 0x7f, 0xac, 0x1f,
0x00, 0x1f, 0x20, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xa2, 0x0e, 0x00,
0x08, 0x72, 0x20, 0x20, 0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0xd9, 0xd9, 0xd0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x02, 0x78, 0xd8, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x89, 0x7f, 0xdb, 0x20, 0x00, 0x1f, 0x20, 0x0c, 0x00, 0x00, 0x0e, 0x00,
0x00, 0xe2, 0x0e, 0x00, 0x02, 0x78, 0xdc, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x02, 0x78, 0xe8, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x89, 0x7f, 0xae, 0xd9, 0x00, 0x1f, 0x20, 0x0c, 0x00, 0x00, 0x0e, 0x00,
0x00, 0x22, 0x0f, 0x00, 0x02, 0x78, 0xe6, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x02, 0x78, 0xcc, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x02, 0x78, 0xc8, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x02, 0x78, 0xe9, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x02, 0x78, 0xdd, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x1e, 0x21, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xe4, 0x2f, 0x00, 0x02, 0x78, 0xe5, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1f,
0xac, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03, 0x00, 0xc4, 0x4f, 0x00,
0x08, 0x72, 0x21, 0x1e, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x08, 0x72, 0xac, 0x1f, 0xac, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x20,
0xdb, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf3, 0x03, 0x00, 0xe2, 0x8f, 0x0c,
0x89, 0x7f, 0x1e, 0x21, 0x00, 0x1f, 0x40, 0x0c, 0x00, 0x00, 0x0e, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x02, 0x78, 0xe1, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0xd9,
0xae, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03, 0x00, 0xe2, 0x0f, 0x01,
0x89, 0x7f, 0x1f, 0xac, 0x00, 0x1f, 0x40, 0x0c, 0x00, 0x00, 0x0e, 0x00,
0x00, 0xa2, 0x0e, 0x00, 0x08, 0x72, 0xdb, 0x20, 0xdb, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0xae, 0xd9,
0xae, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xc6, 0x0f, 0x00,
0x89, 0x7f, 0x20, 0xdb, 0x00, 0x1f, 0x40, 0x0c, 0x00, 0x00, 0x0e, 0x00,
0x00, 0xe8, 0x0e, 0x00, 0x89, 0x7f, 0xd9, 0xae, 0x00, 0x1f, 0x40, 0x0c,
0x00, 0x00, 0x0e, 0x00, 0x00, 0x22, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x21,
0x1e, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03, 0x00, 0xe4, 0x2f, 0x0c,
0x0b, 0x72, 0x00, 0xac, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf5, 0x03,
0x00, 0xe4, 0x4f, 0x00, 0x08, 0x72, 0x1e, 0x21, 0x1e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0x21, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x12, 0x78, 0xff, 0x03, 0x03, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x80, 0x07,
0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0xb0, 0xac, 0x1f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xac, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x78, 0x00, 0x03, 0x20, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf4, 0x03,
0x00, 0xe4, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0xdb, 0x20, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xe4, 0x8f, 0x0c, 0x0b, 0x72, 0x00, 0xae,
0xd9, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf7, 0x03, 0x00, 0xe4, 0x0f, 0x0d,
0x08, 0x72, 0x20, 0xdb, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xdb, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x72, 0xb2, 0xae,
0xd9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe2, 0x0f, 0x00,
0x88, 0x83, 0x00, 0xc1, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xae, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x78, 0xd9, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x88, 0x83, 0x00, 0xc1, 0x20, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x83, 0x00, 0xc1, 0xb0, 0x00, 0x01, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x83, 0x00, 0xc1,
0xb2, 0x80, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xec, 0x0f, 0x00, 0x84, 0xa9, 0x24, 0x03, 0x00, 0x00, 0x20, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x02, 0x78, 0x20, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x02, 0x78, 0xb0, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x74, 0xb2, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x1d, 0x7b, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x24, 0x25, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf1, 0x03,
0x00, 0xe4, 0x2f, 0x00, 0x0b, 0x72, 0x00, 0x26, 0x27, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf3, 0x03, 0x00, 0xc4, 0x0f, 0x00, 0x08, 0x72, 0x1f, 0x24,
0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x08, 0x72, 0x26, 0x26, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0xc8, 0x0f, 0x00, 0x0b, 0x72, 0x00, 0x1f, 0x26, 0x00, 0x00, 0x00,
0x00, 0x40, 0xf1, 0x03, 0x00, 0xc8, 0x0f, 0x00, 0x08, 0x72, 0x24, 0x1f,
0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x02, 0x78, 0x1f, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xc6, 0x0f, 0x00, 0x88, 0xa3, 0x00, 0x03, 0x24, 0x00, 0x20, 0x00,
0x00, 0x48, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x1d, 0x7b, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00,
0x84, 0x79, 0x1e, 0xc0, 0x00, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x68, 0x0e, 0x00, 0x84, 0x79, 0xee, 0xc0, 0x00, 0x20, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x0b, 0x78, 0x00, 0x1e,
0x00, 0x00, 0x80, 0xff, 0x00, 0xd0, 0xf1, 0x03, 0x00, 0xc4, 0x2f, 0x00,
0x0b, 0x78, 0x00, 0xee, 0x00, 0x00, 0x80, 0xff, 0x00, 0xd0, 0xf3, 0x03,
0x00, 0xd6, 0x4f, 0x00, 0x21, 0x02, 0x17, 0x17, 0x1e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x19, 0x19,
0x1e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x08, 0x17, 0x17, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x19, 0x19, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x08, 0x03, 0xd8, 0x00,
0x17, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x02, 0x00,
0x21, 0x12, 0x0d, 0x0d, 0xee, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xdc, 0x00, 0x19, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x06, 0x00, 0x21, 0x02, 0xec, 0xec,
0x1e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x02, 0xd5, 0xd5, 0x1e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0xd3, 0xd3, 0x1e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0xcd, 0xcd,
0x1e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x02, 0xcb, 0xcb, 0x1e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0xc9, 0xc9, 0x1e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0xaf, 0xaf,
0x1e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x84, 0x79, 0x17, 0xc0, 0x00, 0x40, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x2e, 0x00, 0x21, 0x02, 0xad, 0xad, 0x1e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x12, 0x19, 0x0a,
0xee, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x8f, 0x00,
0x20, 0x18, 0x0a, 0x0d, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x84, 0x79, 0x0d, 0xc0, 0x00, 0x60, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0e, 0x00, 0x21, 0x02, 0xc7, 0xc7,
0x1e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x02, 0xc3, 0xc3, 0x1e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x23, 0x23, 0x1e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0xc2, 0xc2,
0x1e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x02, 0x11, 0x11, 0x1e, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0xd7, 0xd7, 0x1e, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x1e, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x08, 0xec, 0xec, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0xd5, 0xd5, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0xd3, 0xd3,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0xe8, 0x00, 0xec, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x08, 0xcd, 0xcd, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xb2, 0x00,
0xd5, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x08, 0xcb, 0xcb, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x20, 0x00, 0xd3, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x20, 0x08, 0xc9, 0xc9,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0x1e, 0x00, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x08, 0xaf, 0xaf, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xe6, 0x00,
0xcb, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x08, 0xad, 0xad, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xac, 0x00, 0xc9, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x20, 0x08, 0xc7, 0xc7,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0xb0, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x08, 0x00, 0x20, 0x08, 0xc3, 0xc3, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xae, 0x00,
0xad, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x08, 0x23, 0x23, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xda, 0x00, 0xc7, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x20, 0x08, 0xc2, 0xc2,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0xd6, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x04, 0x00, 0x20, 0x08, 0x11, 0x11, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xcc, 0x00,
0x23, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00,
0x20, 0x08, 0xd7, 0xd7, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xca, 0x00, 0xc2, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0e, 0x00, 0x21, 0x12, 0xea, 0xea,
0xee, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x08, 0x03, 0xc8, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x06, 0x00, 0x21, 0x12, 0xcf, 0xcf, 0xee, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x08, 0x03, 0xc6, 0x00,
0xd7, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x06, 0x00,
0x21, 0x12, 0xb9, 0xb9, 0xee, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0xaf, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x01, 0x21, 0x12, 0xb7, 0xb7,
0xee, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x02, 0x78, 0xcd, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x21, 0x12, 0x1d, 0x1d, 0xee, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x0b, 0x78, 0x00, 0x17,
0x00, 0x00, 0x80, 0xff, 0x00, 0xd0, 0xf1, 0x03, 0x00, 0xe2, 0x2f, 0x00,
0x21, 0x12, 0xb5, 0xb5, 0xee, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0xc9, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x21, 0x12, 0xce, 0xce,
0xee, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x02, 0x78, 0xc3, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x4f, 0x00, 0x21, 0x12, 0x1b, 0x1b, 0xee, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0xd5, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x21, 0x12, 0xc5, 0xc5, 0xee, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x11, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x8f, 0x00, 0x21, 0x12, 0xaa, 0xaa,
0xee, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x02, 0x78, 0xc2, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x21, 0x12, 0x22, 0x22, 0xee, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x12, 0x14, 0x14,
0xee, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x12, 0x10, 0x10, 0xee, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x12, 0xd1, 0xd1, 0xee, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x23, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x74, 0xad, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0xd7, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00, 0x24, 0x74, 0xcb, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x74, 0xc7, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x18, 0xea, 0xea, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x18, 0xcf, 0xcf,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0xcb, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x18, 0xb9, 0xb9, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x1f, 0x00,
0xea, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00,
0x20, 0x18, 0xb7, 0xb7, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x21, 0x00, 0xcf, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0e, 0x00, 0x20, 0x18, 0x1d, 0x1d,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0x11, 0x00, 0xb9, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x18, 0xb5, 0xb5, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x23, 0x00,
0xb7, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x18, 0xce, 0xce, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0xe9, 0x00, 0x1d, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x08, 0x00, 0x20, 0x18, 0x1b, 0x1b,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0xe7, 0x00, 0xb5, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x18, 0xc5, 0xc5, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0xaf, 0x00,
0xce, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x18, 0xaa, 0xaa, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0xad, 0x00, 0x1b, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x20, 0x18, 0x22, 0x22,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0xdd, 0x00, 0xc5, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x18, 0x14, 0x14, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0xdb, 0x00,
0xaa, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x18, 0x10, 0x10, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0xd9, 0x00, 0x22, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x20, 0x18, 0x19, 0x19,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0xd7, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0e, 0x00, 0x20, 0x18, 0xd1, 0xd1, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0xcd, 0x00,
0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x08, 0x13, 0xc9, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x21, 0x02, 0xe2, 0xe2, 0x17, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x08, 0x13, 0xc7, 0x00,
0xd1, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x04, 0x00,
0x0b, 0x78, 0x00, 0x0d, 0x00, 0x00, 0x80, 0xff, 0x00, 0xd0, 0xf3, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x21, 0x02, 0xe4, 0xe4, 0x17, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x1d, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x01,
0x21, 0x02, 0xeb, 0xeb, 0x17, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0xb7, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x21, 0x02, 0xe0, 0xe0,
0x17, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x02, 0xde, 0xde, 0x17, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0xd2, 0xd2, 0x17, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0xd4, 0xd4,
0x17, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x02, 0xc4, 0xc4, 0x17, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x19, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x2f, 0x00, 0x21, 0x02, 0x1a, 0x1a,
0x17, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x02, 0x78, 0xd1, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x4f, 0x00, 0x21, 0x02, 0x16, 0x16, 0x17, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x02, 0x13, 0x13,
0x17, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x02, 0x0f, 0x0f, 0x17, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x0c, 0x0c, 0x17, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x09, 0x09,
0x17, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10,
0x21, 0x02, 0x07, 0x07, 0x17, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x02, 0x05, 0x05, 0x17, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x24, 0x74, 0x17, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x74, 0xb5, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0xe2, 0xe2, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0xe4, 0xe4,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x12, 0xb4, 0xb4, 0x0d, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x08, 0x03, 0x17, 0x00, 0xe2, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x02, 0x00, 0x21, 0x12, 0xb6, 0xb6,
0x0d, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x08, 0x03, 0xb5, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x08, 0x00, 0x21, 0x12, 0xb8, 0xb8, 0x0d, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x20, 0x08, 0x09, 0x09,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x12, 0x0a, 0x1c, 0x0d, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0x1b, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xc3, 0x00,
0x09, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00,
0x24, 0x74, 0x1c, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0xe0, 0xe0, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0xde, 0xde,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x24, 0x74, 0xe2, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x2f, 0x00, 0x02, 0x78, 0xe4, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x01, 0x20, 0x08, 0xd2, 0xd2,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0x1d, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x08, 0xd4, 0xd4, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0x1b, 0x00,
0xde, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x08, 0x1a, 0x1a, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xe5, 0x00, 0xd2, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x20, 0x08, 0x16, 0x16,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0xe3, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x08, 0x00, 0x20, 0x18, 0xb4, 0xb4, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xdf, 0x00,
0x1a, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x04, 0x00,
0x20, 0x18, 0xb6, 0xb6, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xd5, 0x00, 0x16, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x06, 0x00, 0x20, 0x18, 0xb8, 0xb8,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0x1c, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x06, 0x00, 0x21, 0x12, 0xb1, 0xb1, 0x0d, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x08, 0x13, 0xe4, 0x00,
0xb6, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x06, 0x00,
0x21, 0x12, 0xb3, 0xb3, 0x0d, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x08, 0x13, 0xe2, 0x00, 0xb8, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x06, 0x00, 0x21, 0x12, 0xab, 0xab,
0x0d, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x02, 0x78, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x2f, 0x00, 0x21, 0x12, 0x09, 0x18, 0x0d, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x21, 0x12, 0x15, 0x15,
0x0d, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x02, 0x78, 0xd4, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x01, 0x21, 0x12, 0x12, 0x12, 0x0d, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x1a, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x4f, 0x00,
0x21, 0x12, 0x0e, 0x0e, 0x0d, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x10, 0x02, 0x78, 0x16, 0x00, 0x00, 0x00, 0x80, 0x3f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x8f, 0x00, 0x21, 0x12, 0x0b, 0x0b,
0x0d, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x10,
0x02, 0x78, 0xb4, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x21, 0x12, 0x08, 0x08, 0x0d, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x10, 0x21, 0x12, 0x06, 0x06,
0x0d, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x12, 0x04, 0x04, 0x0d, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x10, 0x21, 0x12, 0x0d, 0xd0, 0x0d, 0x00, 0x00, 0x80,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x78, 0xd0, 0x00,
0x00, 0x00, 0x80, 0x3f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x74, 0xd3, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0xcf, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0xb9, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x74, 0x18, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xc4, 0x0f, 0x00, 0x24, 0x74, 0xde, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0xd2, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x24, 0x74, 0xce, 0xff, 0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0xb6, 0xff, 0x00, 0x00, 0x80, 0x3f,
0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00, 0x24, 0x74, 0xb8, 0xff,
0x00, 0x00, 0x80, 0x3f, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x08, 0xeb, 0xeb, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x20, 0x08, 0xc4, 0xc4, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x08, 0x13, 0x13,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0x19, 0x00, 0xeb, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xa2, 0x02, 0x00, 0x20, 0x08, 0x0f, 0x0f, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xe1, 0x00,
0xc4, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x02, 0x00,
0x20, 0x08, 0x0c, 0x0c, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xd3, 0x00, 0x13, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x08, 0x07, 0x07,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0xd1, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x08, 0x05, 0x05, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xcf, 0x00,
0x0c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x18, 0x0a, 0x0a, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x03, 0xb9, 0x00, 0x07, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0xb1, 0xb1,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x03, 0xb7, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0xb3, 0xb3, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x16, 0x00,
0x0a, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x18, 0xab, 0xab, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0x18, 0x00, 0xb1, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x09, 0x09,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0x1a, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x15, 0x15, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0xe0, 0x00,
0xab, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x18, 0x12, 0x12, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0xde, 0x00, 0x09, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x0e, 0x0e,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0xd4, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x0b, 0x0b, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0xd2, 0x00,
0x12, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x18, 0x08, 0x08, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0xd0, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x06, 0x06,
0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0xce, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x20, 0x18, 0x04, 0x04, 0x3b, 0xaa, 0xb8, 0x3f,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0xc2, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00,
0x20, 0x18, 0x0d, 0x0d, 0x3b, 0xaa, 0xb8, 0x3f, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x08, 0x13, 0xb6, 0x00, 0x06, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x02, 0x00, 0x08, 0x13, 0xb4, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x64, 0x02, 0x00,
0x08, 0x13, 0xb8, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x62, 0x02, 0x00, 0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00, 0x1d, 0x7b, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00,
0x21, 0x72, 0x07, 0xff, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0xef, 0x00, 0x12, 0x78, 0xff, 0x03, 0x03, 0x00, 0x00, 0x00,
0xff, 0xc0, 0x80, 0x07, 0x00, 0xe2, 0x0f, 0x04, 0x21, 0x72, 0x06, 0xff,
0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0c, 0x78, 0x00, 0x03, 0x20, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf2, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x21, 0x72, 0x05, 0xff, 0xe8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x21, 0x72, 0x04, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00, 0x21, 0x72, 0x08, 0xff,
0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0x0f, 0x00, 0x21, 0x72, 0x0a, 0xff, 0x1d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x21, 0x72, 0x09, 0xff, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00, 0x21, 0x72, 0x0b, 0xff,
0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xcc, 0x0f, 0x00, 0x21, 0x72, 0x07, 0x07, 0x1e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00,
0x21, 0x72, 0x06, 0x06, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0f, 0x00, 0x21, 0x72, 0x05, 0x05,
0xb2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x7c, 0xc5, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08,
0x00, 0xe2, 0x0f, 0x00, 0x21, 0x72, 0x04, 0x04, 0x21, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x90, 0x78, 0x0f, 0x0f,
0x20, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0xff, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x21, 0x72, 0x08, 0x08, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0xb3, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x21, 0x72, 0x0a, 0x0a,
0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x8c, 0x78, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x70, 0x42, 0xf0, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x21, 0x72, 0x09, 0x09, 0x18, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x14, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x21, 0x72, 0x0b, 0x0b, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x12, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x21, 0x72, 0x07, 0x07,
0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x72, 0x06, 0x06, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x05, 0x05, 0xe6, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x04, 0x04,
0xe9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x08, 0x08, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x0a, 0x0a, 0xe1, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x09, 0x09,
0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x72, 0x0b, 0x0b, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x07, 0x07, 0xae, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x06, 0x06,
0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x05, 0x05, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x04, 0x04, 0xe7, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x08, 0x08,
0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x72, 0x0a, 0x0a, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x09, 0x09, 0xe2, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x0b, 0x0b,
0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x07, 0x07, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x06, 0x06, 0xd9, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x05, 0x05,
0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x72, 0x04, 0x04, 0xdd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x08, 0x08, 0xd5, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x0c, 0x0a,
0xd1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x09, 0x09, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x0b, 0x0b, 0xd0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x07, 0x07,
0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x72, 0x06, 0x06, 0xd7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x05, 0x05, 0xda, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x04, 0x04,
0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x0a, 0x08, 0xd3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x0c, 0x0c, 0xcf, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x09, 0x09,
0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x72, 0x0b, 0x0b, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x07, 0x07, 0xc8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x06, 0x06,
0xc9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x05, 0x05, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x08, 0x04, 0xcd, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x0a, 0x0a,
0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x72, 0x0c, 0x0c, 0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x0d, 0x09, 0xc2, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x0b, 0x0b,
0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x04, 0x07, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x07, 0x06, 0xc7, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x05, 0x05,
0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x72, 0x08, 0x08, 0xcb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x0a, 0x0a, 0xb9, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x09, 0x0c,
0xb5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x21, 0x72, 0x0d, 0x0d, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x06, 0x0b, 0xb8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x04, 0x05,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x21, 0x72, 0x07, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x21, 0x72, 0x09, 0x0a, 0x09, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x89, 0x7f, 0x05, 0x04,
0x00, 0x1f, 0x20, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x21, 0x72, 0x06, 0x0d, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x24, 0x7e, 0xc4, 0xff, 0x08, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x89, 0x7f, 0x08, 0x07,
0x00, 0x1f, 0x20, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xa8, 0x0e, 0x00,
0x89, 0x7f, 0x0c, 0x09, 0x00, 0x1f, 0x20, 0x0c, 0x00, 0x00, 0x0e, 0x00,
0x00, 0xe8, 0x0e, 0x00, 0x89, 0x7f, 0x0b, 0x06, 0x00, 0x1f, 0x20, 0x0c,
0x00, 0x00, 0x0e, 0x00, 0x00, 0x22, 0x0f, 0x00, 0x21, 0x72, 0x05, 0x04,
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x2f, 0x00,
0x21, 0x72, 0x0a, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc6, 0x4f, 0x00, 0x89, 0x7f, 0x08, 0x05, 0x00, 0x1f, 0x40, 0x0c,
0x00, 0x00, 0x0e, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x21, 0x72, 0x0c, 0x09,
0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xe4, 0x8f, 0x00,
0x21, 0x72, 0x0e, 0x06, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc6, 0x0f, 0x01, 0x89, 0x7f, 0x0d, 0x0c, 0x00, 0x1f, 0x40, 0x0c,
0x00, 0x00, 0x0e, 0x00, 0x00, 0xa8, 0x0e, 0x00, 0x89, 0x7f, 0x0b, 0x0a,
0x00, 0x1f, 0x40, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xe8, 0x0e, 0x00,
0x89, 0x7f, 0x0f, 0x0e, 0x00, 0x1f, 0x40, 0x0c, 0x00, 0x00, 0x0e, 0x00,
0x00, 0x22, 0x0f, 0x00, 0x21, 0x72, 0x08, 0x05, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xca, 0x2f, 0x00, 0x88, 0x83, 0x00, 0xc1,
0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x21, 0x72, 0x06, 0x0c, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xe4, 0x4f, 0x00, 0x21, 0x72, 0x04, 0x0a, 0x0b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc6, 0x8f, 0x00, 0x88, 0x83, 0x00, 0xc1,
0x06, 0x00, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x21, 0x72, 0x10, 0x0e, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xc6, 0x0f, 0x01, 0x88, 0x83, 0x00, 0xc1, 0x04, 0x80, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x83, 0x00, 0xc1,
0x10, 0x80, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xec, 0x0f, 0x00, 0x84, 0x99, 0x24, 0x03, 0x00, 0x00, 0x20, 0x00,
0x00, 0xcc, 0x00, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x1d, 0x7b, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00,
0x0c, 0x78, 0x00, 0x03, 0x1f, 0x00, 0x00, 0x00, 0x70, 0x42, 0xf0, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x21, 0x72, 0x05, 0x25, 0x24, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0xc4, 0x2f, 0x00, 0x21, 0x72, 0x26, 0x27,
0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xc8, 0x0f, 0x00,
0x21, 0x72, 0x24, 0x26, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0xcc, 0x0f, 0x00, 0x88, 0x83, 0x00, 0x03, 0x24, 0x00, 0x20, 0x00,
0x00, 0x48, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x1d, 0x7b, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00,
0x84, 0x79, 0x05, 0xc0, 0x00, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0x68, 0x0e, 0x00, 0x84, 0x79, 0x06, 0xc0, 0x00, 0x20, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x0b, 0x72, 0x00, 0x05,
0xff, 0x00, 0x00, 0x00, 0x00, 0x50, 0xf1, 0x03, 0x00, 0xc4, 0x2f, 0x00,
0x0b, 0x72, 0x00, 0x06, 0xff, 0x00, 0x00, 0x00, 0x00, 0x50, 0xf3, 0x03,
0x00, 0xd6, 0x4f, 0x00, 0x08, 0x03, 0xc5, 0x00, 0x05, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x1c, 0x78, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0xf0, 0xf0, 0x03, 0x00, 0xe2, 0x0f, 0x00,
0x08, 0x13, 0xc4, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
0x00, 0xa2, 0x0e, 0x00, 0x20, 0x72, 0x04, 0xc5, 0xe8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x2f, 0x04, 0x20, 0x72, 0x07, 0xc5,
0xb2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04,
0x20, 0x72, 0x20, 0xc5, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x72, 0x08, 0xc4, 0x1f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x4f, 0x04, 0x3e, 0x72, 0x04, 0x07,
0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x72, 0x07, 0xc5, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x84, 0x79, 0x1f, 0xc0, 0x00, 0x60, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00, 0x20, 0x72, 0x21, 0xc4,
0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x20, 0x72, 0x11, 0xc4, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x04, 0x84, 0x79, 0x1e, 0xc0, 0x00, 0x40, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x20, 0x72, 0x0a, 0xc4,
0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0x06, 0x07, 0x20, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x7e, 0xb2, 0xff, 0x08, 0x00, 0x00, 0x00,
0xff, 0x00, 0x8e, 0x0f, 0x00, 0xe2, 0x0f, 0x00, 0x3e, 0x72, 0x05, 0x21,
0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x3e, 0x72, 0x07, 0x0a, 0x11, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x1d, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00, 0x47, 0x09, 0x00, 0x00,
0x60, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xea, 0x0f, 0x00,
0x90, 0x78, 0x07, 0x07, 0xe0, 0xff, 0xff, 0xff, 0x3f, 0xe0, 0xff, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7c, 0x0a, 0xbe, 0x11, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xf5, 0x0f, 0x00, 0xe2, 0x0f, 0x04, 0x8c, 0x78, 0x00, 0x06,
0xff, 0x0f, 0x00, 0x00, 0x70, 0x42, 0xf0, 0x0b, 0x00, 0xe2, 0x0f, 0x00,
0x10, 0x7c, 0x08, 0xbe, 0x0a, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xf7, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x8c, 0x78, 0x00, 0x07, 0x20, 0x00, 0x00, 0x00,
0x70, 0x12, 0xf2, 0x0b, 0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7c, 0x0b, 0xbd,
0x0d, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x7f, 0x09, 0x00, 0xe2, 0x0f, 0x04,
0x90, 0x78, 0x08, 0x06, 0x00, 0xf0, 0xff, 0xff, 0x3f, 0xe0, 0xff, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x10, 0x7c, 0x09, 0xbd, 0x0b, 0x00, 0x00, 0x00,
0xff, 0xe4, 0xff, 0x09, 0x00, 0xe2, 0x0f, 0x00, 0x87, 0x78, 0x10, 0x07,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x72, 0xbe, 0xff, 0xff, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0xb9, 0x7a, 0x14, 0x00, 0x00, 0x46, 0x00, 0x00,
0x00, 0x0a, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0xbd, 0x00,
0x0b, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x90, 0x88, 0x08, 0x06, 0x00, 0x10, 0x00, 0x00, 0x3f, 0xe0, 0xff, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0xa9, 0x10, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf0, 0x0b, 0x00, 0xe4, 0x0f, 0x00, 0x0c, 0x7c, 0x00, 0x02,
0x10, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf2, 0x0b, 0x00, 0xc6, 0x0f, 0x00,
0x10, 0x7c, 0x0d, 0xa8, 0x08, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x82, 0x7c, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x00, 0xce, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0xae, 0x7f, 0x0d, 0x0a,
0x00, 0x00, 0x00, 0x00, 0x54, 0x1c, 0x14, 0x0c, 0x00, 0xe8, 0x07, 0x00,
0xae, 0x7f, 0x0d, 0x08, 0x00, 0x00, 0x80, 0x00, 0x54, 0x1c, 0x94, 0x0c,
0x00, 0xe4, 0x07, 0x00, 0x0b, 0x72, 0x00, 0x1f, 0xff, 0x00, 0x00, 0x00,
0x00, 0x50, 0xf3, 0x03, 0x00, 0xe2, 0x2f, 0x00, 0x05, 0x78, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x0b, 0x72, 0x00, 0x1e, 0xff, 0x00, 0x00, 0x00, 0x00, 0x50, 0xf1, 0x03,
0x00, 0xe2, 0x4f, 0x00, 0x05, 0x78, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x0c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x8f, 0x00,
0x05, 0x78, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x13, 0xff,
0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0xeb, 0xc5,
0xae, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04,
0x3c, 0x72, 0x14, 0x04, 0x64, 0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0f, 0x04, 0x20, 0x72, 0xb1, 0xc5, 0xe6, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04, 0x08, 0x13, 0xb3, 0x00,
0x1f, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x62, 0x0e, 0x00,
0x20, 0x72, 0xac, 0xc5, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x04, 0x08, 0x03, 0xb2, 0x00, 0x1e, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x00, 0xa2, 0x0e, 0x00, 0x20, 0x72, 0xe9, 0xc4,
0xe9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04,
0xaf, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x22, 0x0e, 0x00, 0x20, 0x72, 0xae, 0xc4, 0xe7, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x12, 0x04,
0x66, 0x00, 0x00, 0x00, 0x12, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x04,
0x20, 0x72, 0xb0, 0xc5, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x3e, 0x72, 0xb1, 0xac, 0xb1, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0xe6, 0xc4,
0xaf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0xaf, 0xae, 0xe9, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0xe7, 0xc4, 0xad, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04, 0x3e, 0x72, 0xb0, 0xeb,
0xb0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x72, 0xdd, 0xc4, 0xdd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x04, 0x3c, 0x72, 0x10, 0x04, 0x60, 0x00, 0x00, 0x00,
0x10, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x04, 0x20, 0x72, 0xd9, 0xc4,
0xd9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0xae, 0xe7, 0xe6, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x20, 0xb3, 0x16, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x2f, 0x00, 0x0c, 0x7c, 0x00, 0xbf,
0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x0b, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x72, 0x1f, 0xb3, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x04, 0x45, 0x79, 0x00, 0x00, 0xa0, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x80, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x18, 0xb3,
0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04,
0x3c, 0x72, 0x0e, 0x04, 0x62, 0x00, 0x00, 0x00, 0x0e, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0f, 0x00, 0x20, 0x72, 0x21, 0xb3, 0x1c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x20, 0x72, 0x16, 0xb2,
0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x4f, 0x04,
0x3e, 0x72, 0x19, 0x1f, 0x20, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x17, 0xb2, 0x17, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04, 0x3e, 0x72, 0x18, 0x21,
0x18, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x72, 0x1d, 0xb2, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x04, 0x05, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0x1a, 0xb2,
0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0x17, 0x17, 0x16, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x0c, 0x04,
0x5c, 0x00, 0x00, 0x00, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x20, 0x72, 0xe7, 0xb3, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x3e, 0x72, 0x16, 0x1a, 0x1d, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0xe1, 0xb2,
0xe1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04,
0x05, 0x78, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0xde, 0xb2,
0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x3c, 0x72, 0x0a, 0x04, 0x5e, 0x00, 0x00, 0x00, 0x0a, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0f, 0x04, 0x20, 0x72, 0xe2, 0xb3, 0xe2, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x72, 0xda, 0xc5,
0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x72, 0xd2, 0xb3, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x72, 0xd1, 0xb2, 0xd1, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x08, 0x04,
0x58, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x20, 0x72, 0xca, 0xc5, 0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x72, 0xc9, 0xc4, 0xc9, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xc4, 0x0f, 0x00, 0x20, 0x72, 0xb6, 0xb3,
0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x72, 0xb7, 0xb2, 0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0xaa, 0x04, 0x5a, 0x00, 0x00, 0x00,
0xaa, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0b, 0x00, 0x02, 0x72, 0x05, 0x00,
0x19, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x02,
0x24, 0x72, 0x07, 0xff, 0xff, 0x00, 0x00, 0x00, 0x18, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x04, 0x00, 0x17, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x06, 0xff,
0xff, 0x00, 0x00, 0x00, 0x16, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x05, 0x78, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0x01, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x05, 0x78, 0xac, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xc8, 0x0f, 0x00,
0x3c, 0x72, 0x22, 0x04, 0x64, 0x00, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x20, 0x04, 0x66, 0x00, 0x00, 0x00,
0x20, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x1e, 0x04,
0x60, 0x00, 0x00, 0x00, 0x1e, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x1c, 0x04, 0x62, 0x00, 0x00, 0x00, 0x1c, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x1a, 0x04, 0x5c, 0x00, 0x00, 0x00,
0x1a, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x18, 0x04,
0x5e, 0x00, 0x00, 0x00, 0x18, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x16, 0x04, 0x58, 0x00, 0x00, 0x00, 0x16, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0xac, 0x04, 0x5a, 0x00, 0x00, 0x00,
0xac, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0b, 0x00, 0x24, 0x72, 0x06, 0xff,
0xff, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x02,
0x02, 0x72, 0x05, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x07, 0xff, 0xff, 0x00, 0x00, 0x00,
0xae, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x04, 0x00,
0xb1, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x20, 0x72, 0xb0, 0xb3, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x20, 0x72, 0xaf, 0xb2, 0xe5, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0xae, 0xb2,
0xe3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0xb0, 0xe7, 0xb0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0xb1, 0xb3, 0xe4, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x14, 0x04,
0x54, 0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x00, 0x00, 0x64, 0x0f, 0x00,
0x3e, 0x72, 0xaf, 0xae, 0xaf, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x3e, 0x72, 0xae, 0xde, 0xe1, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x3e, 0x72, 0xb1, 0xe2,
0xb1, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x3c, 0x72, 0x12, 0x04, 0x56, 0x00, 0x00, 0x00, 0x12, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x10, 0x04, 0x50, 0x00, 0x00, 0x00,
0x10, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x0e, 0x04,
0x52, 0x00, 0x00, 0x00, 0x0e, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x0c, 0x04, 0x4c, 0x00, 0x00, 0x00, 0x0c, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x0a, 0x04, 0x4e, 0x00, 0x00, 0x00,
0x0a, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x08, 0x04,
0x48, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0xaa, 0x04, 0x4a, 0x00, 0x00, 0x00, 0xaa, 0x08, 0x00, 0x00,
0x00, 0x6e, 0x0b, 0x00, 0x24, 0x72, 0x07, 0xff, 0xff, 0x00, 0x00, 0x00,
0xb0, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x02, 0x02, 0x72, 0x04, 0x00,
0xaf, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x72, 0x06, 0xff, 0xff, 0x00, 0x00, 0x00, 0xae, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x05, 0x00, 0xb1, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0xb0, 0xc5,
0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x20, 0x72, 0xaf, 0xc5, 0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x72, 0xae, 0xc4, 0xdb, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0xd6, 0xc4,
0xd7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0xb0, 0xaf, 0xb0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0xb1, 0xc5, 0xdc, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3e, 0x72, 0xaf, 0xae,
0xdd, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3c, 0x72, 0x22, 0x04, 0x54, 0x00, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0f, 0x00, 0x3e, 0x72, 0xae, 0xd6, 0xd9, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0xd7, 0xb3,
0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0xb1, 0xda, 0xb1, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0xce, 0xb2, 0xcf, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xc8, 0x0f, 0x00, 0x3c, 0x72, 0x20, 0x04,
0x56, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x1e, 0x04, 0x50, 0x00, 0x00, 0x00, 0x1e, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x1c, 0x04, 0x52, 0x00, 0x00, 0x00,
0x1c, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x1a, 0x04,
0x4c, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x18, 0x04, 0x4e, 0x00, 0x00, 0x00, 0x18, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x16, 0x04, 0x48, 0x00, 0x00, 0x00,
0x16, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0xac, 0x04,
0x4a, 0x00, 0x00, 0x00, 0xac, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0b, 0x00,
0x02, 0x72, 0x05, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x02, 0x24, 0x72, 0x07, 0xff, 0xff, 0x00, 0x00, 0x00,
0xae, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x04, 0x00,
0xb1, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x72, 0x06, 0xff, 0xff, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x8e, 0x07,
0x00, 0xc4, 0x0f, 0x00, 0x20, 0x72, 0xaf, 0xb2, 0xd5, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0xae, 0xb2,
0xd3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x20, 0x72, 0xb1, 0xb3, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x04, 0x3c, 0x72, 0x14, 0x04, 0x44, 0x00, 0x00, 0x00,
0x14, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00, 0x20, 0x72, 0xb0, 0xb3,
0xd0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0xaf, 0xae, 0xaf, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x3e, 0x72, 0xb1, 0xd2, 0xb1, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x3e, 0x72, 0xb0, 0xd7,
0xb0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x3e, 0x72, 0xae, 0xce, 0xd1, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x12, 0x04, 0x46, 0x00, 0x00, 0x00,
0x12, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x10, 0x04,
0x40, 0x00, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x0e, 0x04, 0x42, 0x00, 0x00, 0x00, 0x0e, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x0c, 0x04, 0x3c, 0x00, 0x00, 0x00,
0x0c, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x0a, 0x04,
0x3e, 0x00, 0x00, 0x00, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04,
0x3c, 0x72, 0x08, 0x04, 0x38, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0xaa, 0x04, 0x3a, 0x00, 0x00, 0x00,
0xaa, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0b, 0x00, 0x02, 0x72, 0x05, 0x00,
0xb1, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x02,
0x24, 0x72, 0x07, 0xff, 0xff, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x04, 0x00, 0xaf, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x06, 0xff,
0xff, 0x00, 0x00, 0x00, 0xae, 0x00, 0x8e, 0x07, 0x00, 0xc4, 0x0f, 0x00,
0x20, 0x72, 0xb1, 0xc5, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0xb0, 0xc5, 0xc8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0xaf, 0xc4,
0xcd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0xb1, 0xca, 0xb1, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0xae, 0xc4, 0xcb, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04, 0x3c, 0x72, 0x22, 0x04,
0x44, 0x00, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00, 0x00, 0x62, 0x0f, 0x00,
0x20, 0x72, 0xc5, 0xc5, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x20, 0x72, 0xc4, 0xc4, 0xc7, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3e, 0x72, 0xaf, 0xae,
0xaf, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x3e, 0x72, 0xb0, 0xc5, 0xb0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x3e, 0x72, 0xae, 0xc4, 0xc9, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x20, 0x04,
0x46, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x1e, 0x04, 0x40, 0x00, 0x00, 0x00, 0x1e, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x1c, 0x04, 0x42, 0x00, 0x00, 0x00,
0x1c, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x1a, 0x04,
0x3c, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x18, 0x04, 0x3e, 0x00, 0x00, 0x00, 0x18, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x16, 0x04, 0x38, 0x00, 0x00, 0x00,
0x16, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0xac, 0x04,
0x3a, 0x00, 0x00, 0x00, 0xac, 0x08, 0x00, 0x00, 0x00, 0xee, 0x0b, 0x00,
0x02, 0x72, 0x04, 0x00, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x02, 0x24, 0x72, 0x06, 0xff, 0xff, 0x00, 0x00, 0x00,
0xb0, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x72, 0x05, 0x00,
0xaf, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x72, 0x07, 0xff, 0xff, 0x00, 0x00, 0x00, 0xae, 0x00, 0x8e, 0x07,
0x00, 0xc4, 0x0f, 0x00, 0x20, 0x72, 0xb1, 0xb3, 0xc2, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04, 0x20, 0x72, 0xb0, 0xb3,
0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x04,
0x20, 0x72, 0xaf, 0xb2, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x3e, 0x72, 0xb1, 0xb6, 0xb1, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x20, 0x72, 0xae, 0xb2,
0xb9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x04,
0x3c, 0x72, 0x14, 0x04, 0x34, 0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x00,
0x00, 0x62, 0x0f, 0x00, 0x20, 0x72, 0xb3, 0xb3, 0xb8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x41, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x20, 0x72, 0xb2, 0xb2,
0xb5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3e, 0x72, 0xaf, 0xae, 0xaf, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0xc4, 0x0f, 0x00, 0x3e, 0x72, 0xb0, 0xb3, 0xb0, 0x00, 0x00, 0x00,
0xff, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x3e, 0x72, 0xae, 0xb2,
0xb7, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x3c, 0x72, 0x12, 0x04, 0x36, 0x00, 0x00, 0x00, 0x12, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x10, 0x04, 0x30, 0x00, 0x00, 0x00,
0x10, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x0e, 0x04,
0x32, 0x00, 0x00, 0x00, 0x0e, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0x0c, 0x04, 0x2c, 0x00, 0x00, 0x00, 0x0c, 0x08, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x0a, 0x04, 0x2e, 0x00, 0x00, 0x00,
0x0a, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04, 0x3c, 0x72, 0x08, 0x04,
0x28, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x04,
0x3c, 0x72, 0xaa, 0x04, 0x2a, 0x00, 0x00, 0x00, 0xaa, 0x08, 0x00, 0x00,
0x00, 0xee, 0x0b, 0x00, 0x02, 0x72, 0x05, 0x00, 0xb1, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x02, 0x24, 0x72, 0x07, 0xff,
0xff, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00,
0x02, 0x72, 0x04, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x24, 0x72, 0x06, 0xff, 0xff, 0x00, 0x00, 0x00,
0xae, 0x00, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0xae, 0x03,
0x1c, 0x00, 0x00, 0x00, 0xff, 0xc0, 0x8e, 0x07, 0x00, 0xc8, 0x0f, 0x00,
0x11, 0x72, 0xb0, 0xae, 0x03, 0x00, 0x00, 0x00, 0xff, 0x28, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x00, 0x3c, 0x72, 0x22, 0x04, 0x34, 0x00, 0x00, 0x00,
0x22, 0x08, 0x00, 0x00, 0x00, 0x66, 0x0f, 0x04, 0x88, 0x73, 0x00, 0xb0,
0x14, 0x00, 0x20, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0xb0, 0x15, 0x00, 0x30, 0x00, 0x00, 0x48, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x3c, 0x72, 0x20, 0x04, 0x36, 0x00, 0x00, 0x00,
0x20, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x1e, 0x04,
0x30, 0x00, 0x00, 0x00, 0x1e, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0f, 0x04,
0x88, 0x73, 0x00, 0xb0, 0x22, 0x00, 0x40, 0x00, 0x00, 0x48, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x02, 0x3c, 0x72, 0x1c, 0x04, 0x32, 0x00, 0x00, 0x00,
0x1c, 0x08, 0x00, 0x00, 0x00, 0x66, 0x0f, 0x04, 0x88, 0x73, 0x00, 0xb0,
0x23, 0x00, 0x50, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0xea, 0x03, 0x00,
0x3c, 0x72, 0x1a, 0x04, 0x2c, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x00, 0x00,
0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0x18, 0x04, 0x2e, 0x00, 0x00, 0x00,
0x18, 0x08, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x04, 0x3c, 0x72, 0xae, 0x04,
0x28, 0x00, 0x00, 0x00, 0x16, 0x08, 0x00, 0x00, 0x00, 0x6e, 0x0b, 0x04,
0x24, 0x78, 0x16, 0xb0, 0x04, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x07,
0x00, 0xe2, 0x0f, 0x02, 0x3c, 0x72, 0xac, 0x04, 0x2a, 0x00, 0x00, 0x00,
0xac, 0x08, 0x00, 0x00, 0x00, 0x68, 0x0b, 0x00, 0x10, 0x78, 0x16, 0x16,
0x00, 0x20, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07, 0x00, 0xc8, 0x0f, 0x00,
0x12, 0x78, 0x04, 0x16, 0x10, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07,
0x00, 0xe4, 0x0f, 0x06, 0x12, 0x78, 0x05, 0x16, 0x20, 0x00, 0x00, 0x00,
0xff, 0x3c, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x04, 0x12, 0x78, 0x06, 0x16,
0x30, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xe2, 0x0f, 0x04,
0x88, 0x73, 0x00, 0x04, 0x12, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x07, 0x16, 0x40, 0x00, 0x00, 0x00,
0xff, 0x3c, 0x8e, 0x07, 0x00, 0xe4, 0x0f, 0x04, 0x12, 0x78, 0xb0, 0x16,
0x70, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xe2, 0x2f, 0x04,
0x88, 0x73, 0x00, 0x04, 0x13, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x04, 0x20, 0x00, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x04,
0x21, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x03, 0x00,
0x88, 0x73, 0x00, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x05, 0x11, 0x00, 0x10, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x05,
0x1e, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x05, 0x1f, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x05, 0x00, 0x88, 0x73, 0x00, 0x06, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x06,
0x0f, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00,
0x12, 0x78, 0x04, 0x16, 0x50, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07,
0x00, 0xc6, 0x2f, 0x00, 0x88, 0x73, 0x00, 0x06, 0x1c, 0x00, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x06,
0x1d, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x07, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x07, 0x0d, 0x00, 0x10, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x12, 0x78, 0x05, 0x16,
0x60, 0x00, 0x00, 0x00, 0xff, 0x3c, 0x8e, 0x07, 0x00, 0xc6, 0x4f, 0x00,
0x88, 0x73, 0x00, 0x07, 0x1a, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x07, 0x1b, 0x00, 0x30, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x04,
0x0a, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x04, 0x0b, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x04, 0x18, 0x00, 0x20, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x04,
0x19, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x05, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x05, 0x09, 0x00, 0x10, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0x05,
0xae, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0x05, 0xaf, 0x00, 0x30, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0xb0, 0xaa, 0x00, 0x00, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0xb0,
0xab, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x88, 0x73, 0x00, 0xb0, 0xac, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x88, 0x73, 0x00, 0xb0, 0xad, 0x00, 0x30, 0x00,
0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00, 0x1d, 0x7b, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00,
0x84, 0x79, 0x20, 0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
0x00, 0xe8, 0x0f, 0x00, 0x84, 0x79, 0x1c, 0xbc, 0x00, 0x80, 0x00, 0x00,
0x00, 0x0c, 0x00, 0x00, 0x00, 0x68, 0x0e, 0x00, 0x84, 0x79, 0x10, 0xbc,
0x00, 0x00, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xe8, 0x0f, 0x00,
0x84, 0x79, 0x04, 0xbc, 0x00, 0x80, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00,
0x00, 0xa8, 0x0e, 0x00, 0x84, 0x79, 0x18, 0xbc, 0x00, 0x00, 0x01, 0x00,
0x00, 0x0c, 0x00, 0x00, 0x00, 0xe8, 0x0e, 0x00, 0x84, 0x79, 0x08, 0xbc,
0x00, 0x00, 0x21, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x28, 0x0f, 0x00,
0x84, 0x79, 0x14, 0xbc, 0x00, 0x80, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00,
0x00, 0x28, 0x0f, 0x00, 0x84, 0x79, 0x0c, 0xbc, 0x00, 0x80, 0x21, 0x00,
0x00, 0x0c, 0x00, 0x00, 0x00, 0x22, 0x0f, 0x00, 0x30, 0x72, 0x1c, 0x20,
0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x2f, 0x00,
0x30, 0x72, 0x1d, 0x21, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x1e, 0x22, 0x1e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x1f, 0x23,
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0x04, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x4f, 0x00, 0x30, 0x72, 0x05, 0x11, 0x05, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x06, 0x12,
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x30, 0x72, 0x07, 0x13, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x1c, 0x1c, 0x18, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x8f, 0x00, 0x30, 0x72, 0x1d, 0x1d,
0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0x1e, 0x1e, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x1f, 0x1f, 0x1b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x04, 0x04,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x01,
0x30, 0x72, 0x05, 0x05, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x06, 0x06, 0x0a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x07, 0x07,
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0x14, 0x1c, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x15, 0x1d, 0x15, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x16, 0x1e,
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x0f, 0x00,
0x30, 0x72, 0x17, 0x1f, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x0c, 0x04, 0x0c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x0d, 0x05,
0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x0f, 0x00,
0x30, 0x72, 0x0e, 0x06, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe4, 0x0f, 0x00, 0x30, 0x72, 0x0f, 0x07, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x47, 0x09, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xec, 0x0f, 0x00,
0x10, 0x78, 0x04, 0xbf, 0x10, 0x00, 0x00, 0x00, 0xff, 0xe0, 0xff, 0x07,
0x00, 0xe2, 0x0f, 0x00, 0xb9, 0x7a, 0x14, 0x00, 0x00, 0x46, 0x00, 0x00,
0x00, 0x0a, 0x00, 0x00, 0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x05, 0x00,
0x12, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x86, 0x79, 0x00, 0xba, 0x14, 0x00, 0x00, 0x00, 0x14, 0x1d, 0x10, 0x0c,
0x00, 0xe2, 0x03, 0x00, 0x0c, 0x7c, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00,
0x70, 0x62, 0xf0, 0x0b, 0x00, 0xda, 0x0f, 0x00, 0x11, 0x82, 0x04, 0x05,
0xba, 0x00, 0x00, 0x00, 0xff, 0x20, 0x82, 0x07, 0x00, 0xc8, 0x0f, 0x00,
0x10, 0x8c, 0x05, 0xbb, 0x09, 0x00, 0x00, 0x00, 0xff, 0xe4, 0xff, 0x08,
0x00, 0xca, 0x0f, 0x00, 0x86, 0x89, 0x00, 0x04, 0x0c, 0x00, 0x00, 0x00,
0x14, 0x1d, 0x10, 0x0c, 0x00, 0xe8, 0x03, 0x00, 0x41, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xea, 0x0f, 0x00,
0x8c, 0x78, 0x00, 0x05, 0xff, 0x0f, 0x00, 0x00, 0x70, 0x42, 0xf0, 0x0b,
0x00, 0xe2, 0x0f, 0x00, 0x02, 0x7c, 0x08, 0x00, 0x0f, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00, 0x90, 0x78, 0x08, 0x05,
0x00, 0xf0, 0xff, 0xff, 0x3f, 0xe0, 0xff, 0x0f, 0x00, 0xe2, 0x0f, 0x00,
0x24, 0x7e, 0x09, 0xff, 0x12, 0x00, 0x00, 0x00, 0xff, 0x00, 0x8e, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x1a, 0x79, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x0f, 0x00, 0x1d, 0x7b, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x0f, 0x00,
0x90, 0x88, 0x08, 0x05, 0x00, 0x10, 0x00, 0x00, 0x3f, 0xe0, 0xff, 0x0f,
0x00, 0xe2, 0x0f, 0x00, 0x0c, 0x78, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00,
0x70, 0x12, 0xf4, 0x03, 0x00, 0xe2, 0x0f, 0x00, 0x8c, 0x72, 0x00, 0x0f,
0x04, 0x00, 0x00, 0x00, 0x70, 0x62, 0xf0, 0x0b, 0x00, 0xe2, 0x0f, 0x00,
0x11, 0x72, 0xba, 0x09, 0xba, 0x00, 0x00, 0x00, 0xff, 0x28, 0x80, 0x07,
0x00, 0xe4, 0x2f, 0x00, 0x10, 0x78, 0xbf, 0xbf, 0x20, 0x00, 0x00, 0x00,
0xff, 0xe0, 0xff, 0x07, 0x00, 0xc4, 0x0f, 0x00, 0x82, 0x7c, 0x05, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0xe2, 0x0f, 0x00,
0x1c, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf0, 0xf2, 0x03,
0x00, 0xe2, 0x0f, 0x00, 0x3b, 0x78, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x08, 0x00, 0xa2, 0x02, 0x00, 0x10, 0x7c, 0xbb, 0xbb,
0x0c, 0x00, 0x00, 0x00, 0xff, 0xe4, 0x7f, 0x08, 0x00, 0xc6, 0x0f, 0x00,
0x3b, 0x78, 0x0c, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x02, 0x00, 0x08,
0x00, 0xf0, 0x02, 0x00, 0x47, 0x99, 0x00, 0x00, 0x60, 0xa5, 0xff, 0xff,
0xff, 0xff, 0x03, 0x01, 0x00, 0xea, 0x0f, 0x00, 0x4d, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xea, 0x0f, 0x00,
0x47, 0x79, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0x03,
0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00,
0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x18, 0x79, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00,
0x04, 0x2f, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0xf1, 0x00, 0x00, 0x00,
0x04, 0x12, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x11, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x2f, 0x08, 0x00, 0x11, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00,
0x04, 0x12, 0x08, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x11, 0x08, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x35, 0x00, 0x00, 0x04, 0x0a, 0x08, 0x00, 0x0d, 0x00, 0x00, 0x00,
0x60, 0x01, 0x60, 0x00, 0x03, 0x19, 0x60, 0x00, 0x04, 0x17, 0x0c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x81, 0x01,
0x03, 0x1b, 0xff, 0x00, 0x04, 0x28, 0x80, 0x00, 0x30, 0x42, 0x00, 0x00,
0x50, 0x42, 0x00, 0x00, 0x70, 0x42, 0x00, 0x00, 0x90, 0x42, 0x00, 0x00,
0xb0, 0x42, 0x00, 0x00, 0xd0, 0x42, 0x00, 0x00, 0xf0, 0x42, 0x00, 0x00,
0x10, 0x43, 0x00, 0x00, 0x70, 0x4a, 0x00, 0x00, 0xb0, 0x4a, 0x00, 0x00,
0xe0, 0x4a, 0x00, 0x00, 0x10, 0x4b, 0x00, 0x00, 0xc0, 0x4b, 0x00, 0x00,
0xf0, 0x4b, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x10, 0x4c, 0x00, 0x00,
0xc0, 0x5d, 0x00, 0x00, 0xe0, 0x5d, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00,
0x20, 0x5e, 0x00, 0x00, 0x40, 0x5e, 0x00, 0x00, 0x60, 0x5e, 0x00, 0x00,
0x80, 0x5e, 0x00, 0x00, 0xa0, 0x5e, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00,
0x70, 0x62, 0x00, 0x00, 0x80, 0x62, 0x00, 0x00, 0x90, 0x62, 0x00, 0x00,
0xc0, 0x62, 0x00, 0x00, 0xe0, 0x62, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00,
0x10, 0x63, 0x00, 0x00, 0x04, 0x1c, 0x10, 0x00, 0x80, 0x00, 0x00, 0x00,
0x30, 0x75, 0x00, 0x00, 0x60, 0x76, 0x00, 0x00, 0x90, 0x77, 0x00, 0x00,
0x01, 0x04, 0x00, 0x00, 0x01, 0x35, 0x00, 0x00, 0x04, 0x0a, 0x08, 0x00,
0x0c, 0x00, 0x00, 0x00, 0x60, 0x01, 0x60, 0x00, 0x03, 0x19, 0x60, 0x00,
0x04, 0x17, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x81, 0x01, 0x03, 0x1b, 0xff, 0x00, 0x04, 0x28, 0x80, 0x00,
0xe0, 0x3b, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x20, 0x3c, 0x00, 0x00,
0x40, 0x3c, 0x00, 0x00, 0x60, 0x3c, 0x00, 0x00, 0x80, 0x3c, 0x00, 0x00,
0xa0, 0x3c, 0x00, 0x00, 0xc0, 0x3c, 0x00, 0x00, 0x10, 0x44, 0x00, 0x00,
0x40, 0x44, 0x00, 0x00, 0x80, 0x44, 0x00, 0x00, 0xb0, 0x44, 0x00, 0x00,
0x70, 0x45, 0x00, 0x00, 0xa0, 0x45, 0x00, 0x00, 0xd0, 0x45, 0x00, 0x00,
0xe0, 0x45, 0x00, 0x00, 0x60, 0x57, 0x00, 0x00, 0x80, 0x57, 0x00, 0x00,
0xa0, 0x57, 0x00, 0x00, 0xc0, 0x57, 0x00, 0x00, 0xe0, 0x57, 0x00, 0x00,
0x00, 0x58, 0x00, 0x00, 0x20, 0x58, 0x00, 0x00, 0x40, 0x58, 0x00, 0x00,
0x40, 0x5c, 0x00, 0x00, 0x70, 0x5c, 0x00, 0x00, 0x80, 0x5c, 0x00, 0x00,
0x90, 0x5c, 0x00, 0x00, 0xc0, 0x5c, 0x00, 0x00, 0xf0, 0x5c, 0x00, 0x00,
0x00, 0x5d, 0x00, 0x00, 0x10, 0x5d, 0x00, 0x00, 0x04, 0x1c, 0x0c, 0x00,
0x00, 0x01, 0x00, 0x00, 0x60, 0x16, 0x00, 0x00, 0xe0, 0x73, 0x00, 0x00,
0x04, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x04, 0x7c, 0xff, 0xff, 0xff, 0xff,
0x0f, 0x0c, 0x81, 0x80, 0x80, 0x28, 0x00, 0x08, 0xff, 0x81, 0x80, 0x28,
0x08, 0x81, 0x80, 0x80, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x70, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x81,
0x80, 0x80, 0x28, 0x00, 0x04, 0xe2, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x04, 0x7c,
0xff, 0xff, 0xff, 0xff, 0x0f, 0x0c, 0x81, 0x80, 0x80, 0x28, 0x00, 0x08,
0xff, 0x81, 0x80, 0x28, 0x08, 0x81, 0x80, 0x80, 0x28, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x30, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x74, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
0x00, 0x00, 0x0c, 0x81, 0x80, 0x80, 0x28, 0x00, 0x04, 0xf6, 0x1c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
unsigned int fused_multihead_attention_v2_fp16_256_64_kernel_sm80_cubin_len = 64864;
}
|
/******************************************************************************
*
* Project: OpenGIS Simple Features Reference Implementation
* Purpose: Different utility functions used in FileGDB OGR driver.
* Author: Ragi Yaser Burhum, ragi@burhum.com
* Paul Ramsey, pramsey at cleverelephant.ca
*
******************************************************************************
* Copyright (c) 2010, Ragi Yaser Burhum
* Copyright (c) 2011, Paul Ramsey <pramsey at cleverelephant.ca>
* Copyright (c) 2011-2014, Even Rouault <even dot rouault at mines-paris dot org>
*
* 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 "FGdbUtils.h"
#include <algorithm>
#include "ogr_api.h"
#include "ogrpgeogeometry.h"
CPL_CVSID("$Id$");
using std::string;
/*************************************************************************/
/* StringToWString() */
/*************************************************************************/
std::wstring StringToWString(const std::string& utf8string)
{
wchar_t* pszUTF16 = CPLRecodeToWChar( utf8string.c_str(), CPL_ENC_UTF8, CPL_ENC_UCS2);
std::wstring utf16string = pszUTF16;
CPLFree(pszUTF16);
return utf16string;
}
/*************************************************************************/
/* WStringToString() */
/*************************************************************************/
std::string WStringToString(const std::wstring& utf16string)
{
char* pszUTF8 = CPLRecodeFromWChar( utf16string.c_str(), CPL_ENC_UCS2, CPL_ENC_UTF8 );
std::string utf8string = pszUTF8;
CPLFree(pszUTF8);
return utf8string;
}
/*************************************************************************/
/* GDBErr() */
/*************************************************************************/
bool GDBErr(long int hr, std::string desc, CPLErr errType, const char* pszAddMsg)
{
std::wstring fgdb_error_desc_w;
fgdbError er;
er = FileGDBAPI::ErrorInfo::GetErrorDescription(static_cast<fgdbError>(hr), fgdb_error_desc_w);
if ( er == S_OK )
{
std::string fgdb_error_desc = WStringToString(fgdb_error_desc_w);
CPLError( errType, CPLE_AppDefined,
"%s (%s)%s", desc.c_str(), fgdb_error_desc.c_str(), pszAddMsg);
}
else
{
CPLError( errType, CPLE_AppDefined,
"Error (%ld): %s%s", hr, desc.c_str(), pszAddMsg);
}
// FIXME? EvenR: not sure if ClearErrors() is really necessary, but as it, it causes crashes in case of
// repeated errors
//FileGDBAPI::ErrorInfo::ClearErrors();
return false;
}
/*************************************************************************/
/* GDBDebug() */
/*************************************************************************/
bool GDBDebug(long int hr, std::string desc)
{
std::wstring fgdb_error_desc_w;
fgdbError er;
er = FileGDBAPI::ErrorInfo::GetErrorDescription(static_cast<fgdbError>(hr), fgdb_error_desc_w);
if ( er == S_OK )
{
std::string fgdb_error_desc = WStringToString(fgdb_error_desc_w);
CPLDebug("FGDB", "%s (%s)", desc.c_str(), fgdb_error_desc.c_str());
}
else
{
CPLDebug("FGDB", "%s", desc.c_str());
}
// FIXME? EvenR: not sure if ClearErrors() is really necessary, but as it, it causes crashes in case of
// repeated errors
//FileGDBAPI::ErrorInfo::ClearErrors();
return false;
}
/*************************************************************************/
/* GDBToOGRGeometry() */
/*************************************************************************/
bool GDBToOGRGeometry(string geoType, bool hasZ, bool hasM, OGRwkbGeometryType* pOut)
{
if (geoType == "esriGeometryPoint")
{
*pOut = wkbPoint;
}
else if (geoType == "esriGeometryMultipoint")
{
*pOut = wkbMultiPoint;
}
else if (geoType == "esriGeometryLine")
{
*pOut = wkbLineString;
}
else if (geoType == "esriGeometryPolyline")
{
*pOut = wkbMultiLineString;
}
else if (geoType == "esriGeometryPolygon" ||
geoType == "esriGeometryMultiPatch")
{
*pOut = wkbMultiPolygon; // no mapping to single polygon
}
else
{
CPLError( CE_Failure, CPLE_AppDefined,
"Cannot map esriGeometryType(%s) to OGRwkbGeometryType", geoType.c_str());
return false;
}
if( hasZ )
*pOut = wkbSetZ(*pOut);
if( hasM )
*pOut = wkbSetM(*pOut);
return true;
}
/*************************************************************************/
/* OGRGeometryToGDB() */
/*************************************************************************/
bool OGRGeometryToGDB(OGRwkbGeometryType ogrType, std::string *gdbType, bool *hasZ, bool *hasM)
{
*hasZ = wkbHasZ(ogrType);
*hasM = wkbHasM(ogrType);
switch (wkbFlatten(ogrType))
{
case wkbPoint:
{
*gdbType = "esriGeometryPoint";
break;
}
case wkbMultiPoint:
{
*gdbType = "esriGeometryMultipoint";
break;
}
case wkbLineString:
case wkbMultiLineString:
{
*gdbType = "esriGeometryPolyline";
break;
}
case wkbPolygon:
case wkbMultiPolygon:
{
*gdbType = "esriGeometryPolygon";
break;
}
default:
{
CPLError( CE_Failure, CPLE_AppDefined, "Cannot map OGRwkbGeometryType (%s) to ESRI type",
OGRGeometryTypeToName(ogrType));
return false;
}
}
return true;
}
/*************************************************************************/
/* GDBToOGRFieldType() */
/*************************************************************************/
// We could make this function far more robust by doing automatic coercion of
// types, and/or skipping fields we do not know. But, for our purposes. this
// works fine.
bool GDBToOGRFieldType(std::string gdbType, OGRFieldType* pOut, OGRFieldSubType* pSubType)
{
/*
ESRI types
esriFieldTypeSmallInteger = 0,
esriFieldTypeInteger = 1,
esriFieldTypeSingle = 2,
esriFieldTypeDouble = 3,
esriFieldTypeString = 4,
esriFieldTypeDate = 5,
esriFieldTypeOID = 6,
esriFieldTypeGeometry = 7,
esriFieldTypeBlob = 8,
esriFieldTypeRaster = 9,
esriFieldTypeGUID = 10,
esriFieldTypeGlobalID = 11,
esriFieldTypeXML = 12
*/
//OGR Types
// Desc Name GDB->OGR Mapped By Us?
/** Simple 32bit integer */// OFTInteger = 0, YES
/** List of 32bit integers */// OFTIntegerList = 1, NO
/** Double Precision floating point */// OFTReal = 2, YES
/** List of doubles */// OFTRealList = 3, NO
/** String of ASCII chars */// OFTString = 4, YES
/** Array of strings */// OFTStringList = 5, NO
/** deprecated */// OFTWideString = 6, NO
/** deprecated */// OFTWideStringList = 7, NO
/** Raw Binary data */// OFTBinary = 8, YES
/** Date */// OFTDate = 9, NO
/** Time */// OFTTime = 10, NO
/** Date and Time */// OFTDateTime = 11 YES
*pSubType = OFSTNone;
if (gdbType == "esriFieldTypeSmallInteger" )
{
*pSubType = OFSTInt16;
*pOut = OFTInteger;
return true;
}
else if (gdbType == "esriFieldTypeInteger")
{
*pOut = OFTInteger;
return true;
}
else if (gdbType == "esriFieldTypeSingle" )
{
*pSubType = OFSTFloat32;
*pOut = OFTReal;
return true;
}
else if (gdbType == "esriFieldTypeDouble")
{
*pOut = OFTReal;
return true;
}
else if (gdbType == "esriFieldTypeGUID" ||
gdbType == "esriFieldTypeGlobalID" ||
gdbType == "esriFieldTypeXML" ||
gdbType == "esriFieldTypeString")
{
*pOut = OFTString;
return true;
}
else if (gdbType == "esriFieldTypeDate")
{
*pOut = OFTDateTime;
return true;
}
else if (gdbType == "esriFieldTypeBlob")
{
*pOut = OFTBinary;
return true;
}
else
{
/* Intentionally fail at these
esriFieldTypeOID
esriFieldTypeGeometry
esriFieldTypeRaster
*/
CPLError( CE_Warning, CPLE_AppDefined, "%s", ("Cannot map field " + gdbType).c_str());
return false;
}
}
/*************************************************************************/
/* OGRToGDBFieldType() */
/*************************************************************************/
bool OGRToGDBFieldType(OGRFieldType ogrType, OGRFieldSubType eSubType, std::string* gdbType)
{
switch(ogrType)
{
case OFTInteger:
{
if( eSubType == OFSTInt16 )
*gdbType = "esriFieldTypeSmallInteger";
else
*gdbType = "esriFieldTypeInteger";
break;
}
case OFTReal:
case OFTInteger64:
{
if( eSubType == OFSTFloat32 )
*gdbType = "esriFieldTypeSingle";
else
*gdbType = "esriFieldTypeDouble";
break;
}
case OFTString:
{
*gdbType = "esriFieldTypeString";
break;
}
case OFTBinary:
{
*gdbType = "esriFieldTypeBlob";
break;
}
case OFTDate:
case OFTDateTime:
{
*gdbType = "esriFieldTypeDate";
break;
}
default:
{
CPLError( CE_Warning, CPLE_AppDefined,
"Cannot map OGR field type (%s)",
OGR_GetFieldTypeName(ogrType) );
return false;
}
}
return true;
}
/*************************************************************************/
/* GDBFieldTypeToWidthPrecision() */
/*************************************************************************/
bool GDBFieldTypeToWidthPrecision(std::string &gdbType, int *width, int *precision)
{
*precision = 0;
/* Width (Length in FileGDB terms) based on FileGDB_API/samples/XMLsamples/OneOfEachFieldType.xml */
/* Length is in bytes per doc of FileGDB_API/xmlResources/FileGDBAPI.xsd */
if(gdbType == "esriFieldTypeSmallInteger" )
{
*width = 2;
}
else if(gdbType == "esriFieldTypeInteger" )
{
*width = 4;
}
else if(gdbType == "esriFieldTypeSingle" )
{
*width = 4;
*precision = 5; // FIXME ?
}
else if(gdbType == "esriFieldTypeDouble" )
{
*width = 8;
*precision = 15; // FIXME ?
}
else if(gdbType == "esriFieldTypeString" ||
gdbType == "esriFieldTypeXML")
{
*width = atoi(CPLGetConfigOption("FGDB_STRING_WIDTH", "65536"));
}
else if(gdbType == "esriFieldTypeDate" )
{
*width = 8;
}
else if(gdbType == "esriFieldTypeOID" )
{
*width = 4;
}
else if(gdbType == "esriFieldTypeGUID" )
{
*width = 16;
}
else if(gdbType == "esriFieldTypeBlob" )
{
*width = 0;
}
else if(gdbType == "esriFieldTypeGlobalID" )
{
*width = 38;
}
else
{
CPLError( CE_Warning, CPLE_AppDefined,
"Cannot map ESRI field type (%s)", gdbType.c_str());
return false;
}
return true;
}
/*************************************************************************/
/* GDBFieldTypeToWidthPrecision() */
/*************************************************************************/
bool GDBGeometryToOGRGeometry(bool forceMulti, FileGDBAPI::ShapeBuffer* pGdbGeometry,
OGRSpatialReference* pOGRSR, OGRGeometry** ppOutGeometry)
{
OGRGeometry* pOGRGeometry = NULL;
OGRErr eErr = OGRCreateFromShapeBin( pGdbGeometry->shapeBuffer,
&pOGRGeometry,
static_cast<int>(pGdbGeometry->inUseLength));
//OGRErr eErr = OGRGeometryFactory::createFromWkb(pGdbGeometry->shapeBuffer, pOGRSR, &pOGRGeometry, pGdbGeometry->inUseLength );
if (eErr != OGRERR_NONE)
{
CPLError( CE_Failure, CPLE_AppDefined, "Failed attempting to import GDB WKB Geometry. OGRGeometryFactory err:%d", eErr);
return false;
}
if( pOGRGeometry != NULL )
{
// force geometries to multi if requested
// If it is a polygon, force to MultiPolygon since we always produce multipolygons
OGRwkbGeometryType eFlattenType = wkbFlatten(pOGRGeometry->getGeometryType());
if (eFlattenType == wkbPolygon)
{
pOGRGeometry = OGRGeometryFactory::forceToMultiPolygon(pOGRGeometry);
}
else if (eFlattenType == wkbCurvePolygon)
{
OGRMultiSurface* poMS = new OGRMultiSurface();
poMS->addGeometryDirectly( pOGRGeometry );
pOGRGeometry = poMS;
}
else if (forceMulti)
{
if (eFlattenType == wkbLineString)
{
pOGRGeometry = OGRGeometryFactory::forceToMultiLineString(pOGRGeometry);
}
else if (eFlattenType == wkbCompoundCurve)
{
OGRMultiCurve* poMC = new OGRMultiCurve();
poMC->addGeometryDirectly( pOGRGeometry );
pOGRGeometry = poMC;
}
else if (eFlattenType == wkbPoint)
{
pOGRGeometry = OGRGeometryFactory::forceToMultiPoint(pOGRGeometry);
}
}
if (pOGRGeometry)
pOGRGeometry->assignSpatialReference( pOGRSR );
}
*ppOutGeometry = pOGRGeometry;
return true;
}
/*************************************************************************/
/* GDBToOGRSpatialReference() */
/*************************************************************************/
bool GDBToOGRSpatialReference(const string & wkt, OGRSpatialReference** ppSR)
{
if (wkt.size() <= 0)
{
CPLError( CE_Warning, CPLE_AppDefined, "ESRI Spatial Reference is NULL");
return false;
}
*ppSR = new OGRSpatialReference(wkt.c_str());
OGRErr result = (*ppSR)->morphFromESRI();
if (result == OGRERR_NONE)
{
return true;
}
else
{
delete *ppSR;
*ppSR = NULL;
CPLError( CE_Failure, CPLE_AppDefined,
"Failed morphing from ESRI Geometry: %s", wkt.c_str());
return false;
}
}
/*************************************************************************/
/* FGDB_CPLAddXMLAttribute() */
/*************************************************************************/
/* Utility method for attributing nodes */
void FGDB_CPLAddXMLAttribute(CPLXMLNode* node, const char* attrname, const char* attrvalue)
{
if ( !node ) return;
CPLCreateXMLNode( CPLCreateXMLNode( node, CXT_Attribute, attrname ), CXT_Text, attrvalue );
}
/*************************************************************************/
/* FGDBLaunderName() */
/*************************************************************************/
std::string FGDBLaunderName(const std::string name)
{
std::string newName = name;
if ( newName[0]>='0' && newName[0]<='9' )
{
newName = "_" + newName;
}
for(size_t i=0; i < newName.size(); i++)
{
if ( !( newName[i] == '_' ||
( newName[i]>='0' && newName[i]<='9') ||
( newName[i]>='a' && newName[i]<='z') ||
( newName[i]>='A' && newName[i]<='Z') ))
{
newName[i] = '_';
}
}
return newName;
}
/*************************************************************************/
/* FGDBEscapeUnsupportedPrefixes() */
/*************************************************************************/
std::string FGDBEscapeUnsupportedPrefixes(const std::string className)
{
std::string newName = className;
// From ESRI docs
// Feature classes starting with these strings are unsupported.
static const char* const UNSUPPORTED_PREFIXES[] = {"sde_", "gdb_", "delta_", NULL};
for (int i = 0; UNSUPPORTED_PREFIXES[i] != NULL; i++)
{
if (newName.find(UNSUPPORTED_PREFIXES[i]) == 0)
{
newName = "_" + newName;
break;
}
}
return newName;
}
/*************************************************************************/
/* FGDBEscapeReservedKeywords() */
/*************************************************************************/
std::string FGDBEscapeReservedKeywords(const std::string name)
{
std::string newName = name;
std::string upperName = name;
std::transform(upperName.begin(), upperName.end(), upperName.begin(), ::toupper);
// From ESRI docs
static const char* const RESERVED_WORDS[] = {FGDB_OID_NAME, "ADD", "ALTER", "AND", "AS", "ASC", "BETWEEN",
"BY", "COLUMN", "CREATE", "DATE", "DELETE", "DESC",
"DROP", "EXISTS", "FOR", "FROM", "IN", "INSERT", "INTO",
"IS", "LIKE", "NOT", "NULL", "OR", "ORDER", "SELECT",
"SET", "TABLE", "UPDATE", "VALUES", "WHERE", NULL};
// Append an underscore to any FGDB reserved words used as field names
// This is the same behaviour ArcCatalog follows.
for (int i = 0; RESERVED_WORDS[i] != NULL; i++)
{
const char* w = RESERVED_WORDS[i];
if (upperName == w)
{
newName += '_';
break;
}
}
return newName;
}
|
//
// Student License - for use by students to meet course requirements and
// perform academic research at degree granting institutions only. Not
// for government, commercial, or other organizational use.
//
// eigHermitianStandard.cpp
//
// Code generation for function 'eigHermitianStandard'
//
// Include files
#include "eigHermitianStandard.h"
#include "anyNonFinite.h"
#include "eml_int_forloop_overflow_check.h"
#include "rt_nonfinite.h"
#include "topico_wrapper_rtwutil.h"
#include "topico_wrapper_types.h"
#include "xdhseqr.h"
#include "xnrm2.h"
#include "xzlarf.h"
#include <algorithm>
#include <cmath>
#include <cstring>
#include <sstream>
#include <stdexcept>
#include <string>
// Function Declarations
static void p_rtErrorWithMessageID(const char *aFcnName, int aLineNum);
// Function Definitions
static void p_rtErrorWithMessageID(const char *aFcnName, int aLineNum)
{
std::stringstream outStream;
outStream << "Matrix must be square.";
outStream << "\n";
((((outStream << "Error in ") << aFcnName) << " (line ") << aLineNum) << ")";
throw std::runtime_error(outStream.str());
}
namespace coder {
void eigHermitianStandard(const double A_data[], const int A_size[2],
double V_data[], int *V_size)
{
static rtRunTimeErrorInfo t_emlrtRTEI = {
18, // lineNo
15, // colNo
"schur", // fName
"/usr/local/MATLAB/R2021a/toolbox/eml/lib/matlab/matfun/schur.m" // pName
};
double T_data[36];
double work_data[6];
double tau_data[5];
int T_size[2];
int i;
int k;
int n;
T_size[0] = A_size[0];
T_size[1] = A_size[1];
i = A_size[0] * A_size[1];
if (0 <= i - 1) {
std::copy(&A_data[0], &A_data[i], &T_data[0]);
}
if (A_size[0] != A_size[1]) {
p_rtErrorWithMessageID(t_emlrtRTEI.fName, t_emlrtRTEI.lineNo);
}
if (internal::anyNonFinite(A_data, A_size)) {
T_size[0] = static_cast<signed char>(A_size[0]);
i = static_cast<signed char>(A_size[0]) *
static_cast<signed char>(A_size[1]);
for (int n_tmp = 0; n_tmp < i; n_tmp++) {
T_data[n_tmp] = rtNaN;
}
i = static_cast<signed char>(A_size[0]);
if (1 < static_cast<signed char>(A_size[0])) {
int knt;
int rowleft;
knt = 2;
if (static_cast<signed char>(A_size[0]) - 2 <
static_cast<signed char>(A_size[1]) - 1) {
rowleft = static_cast<signed char>(A_size[0]) - 1;
} else {
rowleft = static_cast<signed char>(A_size[1]);
}
for (k = 0; k < rowleft; k++) {
for (int b_i = knt; b_i <= i; b_i++) {
T_data[(b_i + T_size[0] * k) - 1] = 0.0;
}
knt++;
}
}
} else {
int b;
int b_i;
int knt;
int rowleft;
n = A_size[0];
i = static_cast<signed char>(A_size[0]);
if (0 <= i - 1) {
std::memset(&work_data[0], 0, i * sizeof(double));
}
b = A_size[0];
for (b_i = 0; b_i <= b - 2; b_i++) {
double alpha1;
double xnorm;
int alpha1_tmp;
int b_b;
int ic0;
int im1n_tmp;
int in;
int iv0;
int lastc;
int lastv;
int n_tmp;
im1n_tmp = b_i * n;
in = (b_i + 1) * n;
alpha1_tmp = (b_i + T_size[0] * b_i) + 1;
alpha1 = T_data[alpha1_tmp];
i = b_i + 3;
if (i >= n) {
i = n;
}
i += im1n_tmp;
n_tmp = (n - b_i) - 3;
tau_data[b_i] = 0.0;
if (n_tmp + 2 > 0) {
xnorm = internal::blas::xnrm2(n_tmp + 1, T_data, i);
if (xnorm != 0.0) {
double beta1;
beta1 = rt_hypotd_snf(alpha1, xnorm);
if (alpha1 >= 0.0) {
beta1 = -beta1;
}
if (std::abs(beta1) < 1.0020841800044864E-292) {
knt = 0;
rowleft = i + n_tmp;
do {
knt++;
for (k = i; k <= rowleft; k++) {
T_data[k - 1] *= 9.9792015476736E+291;
}
beta1 *= 9.9792015476736E+291;
alpha1 *= 9.9792015476736E+291;
} while (!(std::abs(beta1) >= 1.0020841800044864E-292));
xnorm = internal::blas::xnrm2(n_tmp + 1, T_data, i);
beta1 = rt_hypotd_snf(alpha1, xnorm);
if (alpha1 >= 0.0) {
beta1 = -beta1;
}
tau_data[b_i] = (beta1 - alpha1) / beta1;
xnorm = 1.0 / (alpha1 - beta1);
for (k = i; k <= rowleft; k++) {
T_data[k - 1] *= xnorm;
}
if ((1 <= knt) && (knt > 2147483646)) {
check_forloop_overflow_error();
}
for (k = 0; k < knt; k++) {
beta1 *= 1.0020841800044864E-292;
}
alpha1 = beta1;
} else {
tau_data[b_i] = (beta1 - alpha1) / beta1;
xnorm = 1.0 / (alpha1 - beta1);
b_b = i + n_tmp;
for (k = i; k <= b_b; k++) {
T_data[k - 1] *= xnorm;
}
alpha1 = beta1;
}
}
}
T_data[alpha1_tmp] = 1.0;
iv0 = (b_i + im1n_tmp) + 1;
ic0 = in + 1;
if (tau_data[b_i] != 0.0) {
bool exitg2;
lastv = n_tmp + 1;
i = iv0 + n_tmp;
while ((lastv + 1 > 0) && (T_data[i + 1] == 0.0)) {
lastv--;
i--;
}
lastc = n;
exitg2 = false;
while ((!exitg2) && (lastc > 0)) {
int exitg1;
rowleft = in + lastc;
k = rowleft;
do {
exitg1 = 0;
if ((n > 0) && (k <= rowleft + lastv * n)) {
if (T_data[k - 1] != 0.0) {
exitg1 = 1;
} else {
k += n;
}
} else {
lastc--;
exitg1 = 2;
}
} while (exitg1 == 0);
if (exitg1 == 1) {
exitg2 = true;
}
}
} else {
lastv = -1;
lastc = 0;
}
if (lastv + 1 > 0) {
if (lastc != 0) {
if (0 <= lastc - 1) {
std::memset(&work_data[0], 0, lastc * sizeof(double));
}
i = iv0;
n_tmp = (in + n * lastv) + 1;
for (rowleft = ic0; n < 0 ? rowleft >= n_tmp : rowleft <= n_tmp;
rowleft += n) {
b_b = (rowleft + lastc) - 1;
for (k = rowleft; k <= b_b; k++) {
knt = k - rowleft;
work_data[knt] += T_data[k - 1] * T_data[i];
}
i++;
}
}
if (!(-tau_data[b_i] == 0.0)) {
knt = in;
for (k = 0; k <= lastv; k++) {
n_tmp = iv0 + k;
if (T_data[n_tmp] != 0.0) {
xnorm = T_data[n_tmp] * -tau_data[b_i];
i = knt + 1;
b_b = lastc + knt;
if ((knt + 1 <= b_b) && (b_b > 2147483646)) {
check_forloop_overflow_error();
}
for (rowleft = i; rowleft <= b_b; rowleft++) {
T_data[rowleft - 1] += work_data[(rowleft - knt) - 1] * xnorm;
}
}
knt += n;
}
}
}
internal::reflapack::xzlarf((n - b_i) - 1, (n - b_i) - 1,
(b_i + im1n_tmp) + 2, tau_data[b_i], T_data,
(b_i + in) + 2, n, work_data);
T_data[alpha1_tmp] = alpha1;
}
internal::reflapack::eml_dlahqr(T_data, T_size);
i = T_size[0];
if (3 < T_size[0]) {
knt = 4;
if (T_size[0] - 4 < T_size[1] - 1) {
rowleft = T_size[0] - 3;
} else {
rowleft = T_size[1];
}
for (k = 0; k < rowleft; k++) {
for (b_i = knt; b_i <= i; b_i++) {
T_data[(b_i + T_size[0] * k) - 1] = 0.0;
}
knt++;
}
}
}
n = T_size[0];
*V_size = T_size[0];
for (k = 0; k < n; k++) {
V_data[k] = T_data[k + T_size[0] * k];
}
}
} // namespace coder
// End of code generation (eigHermitianStandard.cpp)
|
/**
* License text...
*/
#ifndef ADVMATH_H
#define ADVMATH_H
#include <cstdint>
#include <cmath>
#include <array>
#include "base.hpp"
namespace adf {
/**
* @brief
* @param
* @return
*/
template<class T>
inline T acosh(T p_arg)
{
return std::log(p_arg + std::sqrt(p_arg*p_arg-1));
}
/**
* @brief
* @param
* @param
* @return
*/
template<class T>
inline T arcsc(T p_eival, T p_eimod)
{
int i,L;
T A, B, BT, Y;
A = 1.;
B = p_eimod;
Y = 1.0/p_eival;
L = 0;
for(i=0; i<MAX_TERMS; i++)
{
BT = A * B;
A = A + B;
B = 2 * std::sqrt(BT);
Y = Y - BT / Y;
if(Y == 0){
Y = std::sqrt(BT)*ERR_SMALL;}
if(std::fabs(A-B)<(A*ERR_SMALL)){break;}
L = 2 * L;
if(Y < 0.){L++;}
}
if(Y < 0.){L++;}
return ((std::atan(A/Y) + ADF_PI * L) / A);
}
/**
* @brief
* @param
* @return
*/
template<class T>
inline T asinh(T p_arg)
{
return std::log(p_arg + std::sqrt(p_arg*p_arg+1));
}
/**
* @brief
* @param
* @param
* @param
* @param
* @param
* @param
* @return
*/
template<class T>
inline void ellip_funcs(T p_eival, T p_eimod, T &sn, T &cn, T &dn)
{
int16_t i, imax;
std::array<T, MAX_TERMS> A, B, C;
std::array<T, MAX_TERMS> P;
p_eimod=p_eimod*p_eimod;
A[0]=1;
B[0]=std::sqrt(1-p_eimod);
C[0]=std::sqrt(p_eimod);
for(i=1; i<MAX_TERMS; i++)
{
A[i]=(A[i-1]+B[i-1])/2;
B[i]=std::sqrt(A[i-1]*B[i-1]);
C[i]=(A[i-1]-B[i-1])/2;
if(C[i]<ERR_SMALL){
break;}
}
if(i == MAX_TERMS){
imax=i-1;}
else{
imax=i;}
P[imax]=std::pow(2,imax)*A[imax]*p_eival;
for(i=imax; i>0; i--)
{
P[i-1]=(std::asin(C[i]*std::sin(P[i])/A[i])+P[i])/2;
}
sn=std::sin(P[0]);
cn=std::cos(P[0]);
dn=std::sqrt(1-p_eimod*(sn*sn));
}
/**
* @brief Algorithm for calc complete elliptic integral of the first kinds using AGM process.
* Start with three initialization values \f$(a_0, b_0, c_0), where
* \f$(a_0 - 1, b_0 - \sqrt{1-k^2}, c_0 - k)
* and on the i-th iteration cycle, the value will be as follows:
* \f$(
* a_i = (a_{i-1} + b_{i-1})/2,
* b_i = \sqrt{a_{i-1} + b_{i-1}},
* c_i = (a_{i-1} - b_{i-1})/2
* )
* The cycle ends when \f$( a_N = b_N ) within some tolerance \f$( \varepsilon ).
* And then the value of the integral will be equal to:
* \f$(
* E=\frac{\pi}{2a_N}
* )
* See Satinder S. Sidhu. Elliptic integrals and functions.
* https://aip.scitation.org/doi/pdf/10.1063/1.168529
* @param p_eimod - equal to k - the elliptic modulus
* @return value of the complete elliptic integral of the first kinds
*/
template<class T>
T ellip_integral(T p_eimod)
{
int16_t i;
std::array<T, MAX_TERMS> A, B, C;
A[0]=1;
B[0]=std::sqrt(1-(p_eimod*p_eimod));
C[0]=p_eimod;
for(i=1; i<MAX_TERMS; i++)
{
A[i]=(A[i-1]+B[i-1])/2;
B[i]=std::sqrt(A[i-1]*B[i-1]);
C[i]=(A[i-1]-B[i-1])/2;
if(C[i]<ERR_SMALL){
break;}
}
return ADF_PI/(2*A[i]);
}
/**
* @brief Algorithm for calculate I_0 is the zeroth-order modified Bessel function of the first kind.
* Using in window functions finite impulse response filter design and spectral analysis.
* In general, when using the Kaiser-Bessel window function, the modified Bessel function is defined as:
* \f$(
* I_0(x) = \sum_{k=1}^{\infty} \bigg[ \frac{(\frac{x}{2})^k}{k!} \bigg]^{2}
* )
* See Rabiner L.R.-Theory and Application of Digital Signal Processing
* @param p_arg - the argument of Bessel function
* @return value of the modified Bessel function of the first kind
*/
template<class T>
T bessel_func_mod(T p_arg)
{
int32_t i, converge;
T Iold, Inew, J, K;
Iold=1.;
J=1.;
K=p_arg/2.;
converge=0;
for(i=1; i<MAX_TERMS; i++)
{
J *= K/i;
Inew = Iold+(J*J);
if((Inew-Iold)<ERR_SMALL){
converge=1;
break;}
Iold=Inew;
}
if(!converge){return 0.0;}
return Inew;
}
}
#endif // ADVMATH_H
|
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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.txt
*
* 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 itkFFTConvolutionImageFilter_hxx
#define itkFFTConvolutionImageFilter_hxx
#include "itkFFTConvolutionImageFilter.h"
#include "itkCastImageFilter.h"
#include "itkChangeInformationImageFilter.h"
#include "itkConstantPadImageFilter.h"
#include "itkCyclicShiftImageFilter.h"
#include "itkExtractImageFilter.h"
#include "itkImageBase.h"
#include "itkMultiplyImageFilter.h"
#include "itkNormalizeToConstantImageFilter.h"
#include "itkVnlFFTCommon.h"
namespace itk
{
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::FFTConvolutionImageFilter()
{
}
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
void
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::GenerateInputRequestedRegion()
{
// Request the largest possible region for both input images.
if ( this->GetInput() )
{
typename InputImageType::Pointer imagePtr =
const_cast< InputImageType * >( this->GetInput() );
imagePtr->SetRequestedRegionToLargestPossibleRegion();
}
if ( this->GetKernelImage() )
{
// Input kernel is an image, cast away the constness so we can set
// the requested region.
typename KernelImageType::Pointer kernelPtr =
const_cast< KernelImageType * >( this->GetKernelImage() );
kernelPtr->SetRequestedRegionToLargestPossibleRegion();
}
}
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
void
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::GenerateData()
{
// Create a process accumulator for tracking the progress of this minipipeline
ProgressAccumulator::Pointer progress = ProgressAccumulator::New();
progress->SetMiniPipelineFilter( this );
typename InputImageType::Pointer localInput = InputImageType::New();
localInput->Graft( this->GetInput() );
const KernelImageType* kernelImage = this->GetKernelImage();
InternalComplexImagePointerType input = ITK_NULLPTR;
InternalComplexImagePointerType kernel = ITK_NULLPTR;
this->PrepareInputs( localInput, kernelImage, input, kernel, progress, 0.7f );
typedef MultiplyImageFilter< InternalComplexImageType,
InternalComplexImageType,
InternalComplexImageType > MultiplyFilterType;
typename MultiplyFilterType::Pointer multiplyFilter = MultiplyFilterType::New();
multiplyFilter->SetInput1( input );
multiplyFilter->SetInput2( kernel );
multiplyFilter->ReleaseDataFlagOn();
progress->RegisterInternalFilter( multiplyFilter, 0.1 );
// Free up the memory for the prepared inputs
input = ITK_NULLPTR;
kernel = ITK_NULLPTR;
this->ProduceOutput( multiplyFilter->GetOutput(), progress, 0.2 );
}
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
void
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::PrepareInputs(const InputImageType * input,
const KernelImageType * kernel,
InternalComplexImagePointerType & preparedInput,
InternalComplexImagePointerType & preparedKernel,
ProgressAccumulator * progress, float progressWeight)
{
this->PrepareInput( input, preparedInput, progress, 0.5f * progressWeight );
this->PrepareKernel( kernel, preparedKernel, progress, 0.5f * progressWeight );
}
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
void
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::PrepareInput(const InputImageType * input,
InternalComplexImagePointerType & preparedInput,
ProgressAccumulator * progress,
float progressWeight)
{
InternalImagePointerType paddedInput;
this->PadInput( input, paddedInput, progress, 0.3f * progressWeight );
this->TransformPaddedInput( paddedInput, preparedInput, progress,
0.7f * progressWeight );
}
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
void
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::PadInput(const InputImageType * input,
InternalImagePointerType & paddedInput,
ProgressAccumulator * progress, float progressWeight)
{
// Pad the image
InputSizeType padSize = this->GetPadSize();
InputRegionType inputRegion = input->GetLargestPossibleRegion();
InputSizeType inputSize = inputRegion.GetSize();
typedef PadImageFilter< InputImageType, InputImageType > InputPadFilterType;
typename InputPadFilterType::Pointer inputPadder = InputPadFilterType::New();
inputPadder->SetBoundaryCondition( this->GetBoundaryCondition() );
InputSizeType inputLowerBound = this->GetPadLowerBound();
inputPadder->SetPadLowerBound( inputLowerBound );
InputSizeType inputUpperBound;
for (unsigned int i = 0; i < ImageDimension; ++i)
{
inputUpperBound[i] = (padSize[i] - inputSize[i]) / 2;
if ( ( padSize[i] - inputSize[i] ) % 2 == 1 )
{
inputUpperBound[i]++;
}
}
inputPadder->SetPadUpperBound( inputUpperBound );
inputPadder->SetNumberOfThreads( this->GetNumberOfThreads() );
inputPadder->SetInput( input );
inputPadder->ReleaseDataFlagOn();
progress->RegisterInternalFilter( inputPadder, 0.5f * progressWeight );
// We could avoid a separate cast here by setting the output type of
// the padder to the InternalImageType, but doing so complicates the
// definition of the boundary condition passed into this class and
// requires the InternalImageType to be exposed publicly.
typedef CastImageFilter< InputImageType, InternalImageType > InputCastFilterType;
typename InputCastFilterType::Pointer inputCaster = InputCastFilterType::New();
// See if we can avoid unnecessary casting and copying of memory
inputCaster->InPlaceOn();
inputCaster->SetNumberOfThreads( this->GetNumberOfThreads() );
inputCaster->SetInput( inputPadder->GetOutput() );
inputCaster->ReleaseDataFlagOn();
progress->RegisterInternalFilter( inputCaster, 0.5f * progressWeight );
inputCaster->Update();
paddedInput = inputCaster->GetOutput();
}
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
void
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::TransformPaddedInput(const InternalImageType * paddedInput,
InternalComplexImagePointerType & transformedInput,
ProgressAccumulator * progress, float progressWeight)
{
// Take the Fourier transform of the padded image.
typename FFTFilterType::Pointer imageFFTFilter = FFTFilterType::New();
imageFFTFilter->SetNumberOfThreads( this->GetNumberOfThreads() );
imageFFTFilter->SetInput( paddedInput );
imageFFTFilter->ReleaseDataFlagOn();
progress->RegisterInternalFilter( imageFFTFilter, progressWeight );
imageFFTFilter->Update();
transformedInput = imageFFTFilter->GetOutput();
transformedInput->DisconnectPipeline();
imageFFTFilter->SetInput( ITK_NULLPTR );
imageFFTFilter = ITK_NULLPTR;
}
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
void
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::PrepareKernel(const KernelImageType * kernel,
InternalComplexImagePointerType & preparedKernel,
ProgressAccumulator * progress, float progressWeight)
{
KernelRegionType kernelRegion = kernel->GetLargestPossibleRegion();
KernelSizeType kernelSize = kernelRegion.GetSize();
InputSizeType padSize = this->GetPadSize();
typename KernelImageType::SizeType kernelUpperBound;
for (unsigned int i = 0; i < ImageDimension; ++i)
{
kernelUpperBound[i] = padSize[i] - kernelSize[i];
}
InternalImagePointerType paddedKernelImage = ITK_NULLPTR;
float paddingWeight = 0.2f;
if ( this->GetNormalize() )
{
typedef NormalizeToConstantImageFilter< KernelImageType, InternalImageType >
NormalizeFilterType;
typename NormalizeFilterType::Pointer normalizeFilter = NormalizeFilterType::New();
normalizeFilter->SetConstant( NumericTraits< TInternalPrecision >::OneValue() );
normalizeFilter->SetNumberOfThreads( this->GetNumberOfThreads() );
normalizeFilter->SetInput( kernel );
normalizeFilter->ReleaseDataFlagOn();
progress->RegisterInternalFilter( normalizeFilter,
0.2f * paddingWeight * progressWeight );
// Pad the kernel image with zeros.
typedef ConstantPadImageFilter< InternalImageType, InternalImageType > KernelPadType;
typedef typename KernelPadType::Pointer KernelPadPointer;
KernelPadPointer kernelPadder = KernelPadType::New();
kernelPadder->SetConstant( NumericTraits< TInternalPrecision >::ZeroValue() );
kernelPadder->SetPadUpperBound( kernelUpperBound );
kernelPadder->SetNumberOfThreads( this->GetNumberOfThreads() );
kernelPadder->SetInput( normalizeFilter->GetOutput() );
kernelPadder->ReleaseDataFlagOn();
progress->RegisterInternalFilter( kernelPadder,
0.8f * paddingWeight * progressWeight );
paddedKernelImage = kernelPadder->GetOutput();
}
else
{
// Pad the kernel image with zeros.
typedef ConstantPadImageFilter< KernelImageType, InternalImageType > KernelPadType;
typedef typename KernelPadType::Pointer KernelPadPointer;
KernelPadPointer kernelPadder = KernelPadType::New();
kernelPadder->SetConstant( NumericTraits< TInternalPrecision >::ZeroValue() );
kernelPadder->SetPadUpperBound( kernelUpperBound );
kernelPadder->SetNumberOfThreads( this->GetNumberOfThreads() );
kernelPadder->SetInput( kernel );
kernelPadder->ReleaseDataFlagOn();
progress->RegisterInternalFilter( kernelPadder,
paddingWeight * progressWeight );
paddedKernelImage = kernelPadder->GetOutput();
}
// Shift the padded kernel image.
typedef CyclicShiftImageFilter< InternalImageType, InternalImageType > KernelShiftFilterType;
typename KernelShiftFilterType::Pointer kernelShifter = KernelShiftFilterType::New();
typename KernelShiftFilterType::OffsetType kernelShift;
for (unsigned int i = 0; i < ImageDimension; ++i)
{
kernelShift[i] = -(kernelSize[i] / 2);
}
kernelShifter->SetShift( kernelShift );
kernelShifter->SetNumberOfThreads( this->GetNumberOfThreads() );
kernelShifter->SetInput( paddedKernelImage );
kernelShifter->ReleaseDataFlagOn();
progress->RegisterInternalFilter( kernelShifter, 0.1f * progressWeight );
typename FFTFilterType::Pointer kernelFFTFilter = FFTFilterType::New();
kernelFFTFilter->SetNumberOfThreads( this->GetNumberOfThreads() );
kernelFFTFilter->SetInput( kernelShifter->GetOutput() );
progress->RegisterInternalFilter( kernelFFTFilter, 0.699f * progressWeight );
kernelFFTFilter->Update();
typedef ChangeInformationImageFilter< InternalComplexImageType > InfoFilterType;
typename InfoFilterType::Pointer kernelInfoFilter = InfoFilterType::New();
kernelInfoFilter->ChangeRegionOn();
typedef typename InfoFilterType::OutputImageOffsetValueType InfoOffsetValueType;
InputSizeType inputLowerBound = this->GetPadLowerBound();
InputIndexType inputIndex = this->GetInput()->GetLargestPossibleRegion().GetIndex();
KernelIndexType kernelIndex = kernel->GetLargestPossibleRegion().GetIndex();
InfoOffsetValueType kernelOffset[ImageDimension];
for (int i = 0; i < ImageDimension; ++i)
{
kernelOffset[i] = static_cast< InfoOffsetValueType >( inputIndex[i] - inputLowerBound[i] - kernelIndex[i] );
}
kernelInfoFilter->SetOutputOffset( kernelOffset );
kernelInfoFilter->SetNumberOfThreads( this->GetNumberOfThreads() );
kernelInfoFilter->SetInput( kernelFFTFilter->GetOutput() );
progress->RegisterInternalFilter( kernelInfoFilter, 0.001f * progressWeight );
kernelInfoFilter->Update();
preparedKernel = kernelInfoFilter->GetOutput();
}
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
void
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::ProduceOutput(InternalComplexImageType * paddedOutput,
ProgressAccumulator * progress,
float progressWeight)
{
typename IFFTFilterType::Pointer ifftFilter = IFFTFilterType::New();
ifftFilter->SetActualXDimensionIsOdd( this->GetXDimensionIsOdd() );
ifftFilter->SetNumberOfThreads( this->GetNumberOfThreads() );
ifftFilter->SetInput( paddedOutput );
ifftFilter->ReleaseDataFlagOn();
progress->RegisterInternalFilter( ifftFilter, 0.6f * progressWeight );
this->CropOutput( ifftFilter->GetOutput(), progress, 0.4f * progressWeight );
}
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
void
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::CropOutput(InternalImageType * paddedOutput,
ProgressAccumulator * progress,
float progressWeight)
{
// Allocate the output
this->AllocateOutputs();
// Now crop the output to the desired size.
typedef ExtractImageFilter< InternalImageType, OutputImageType > ExtractFilterType;
typename ExtractFilterType::Pointer extractFilter = ExtractFilterType::New();
extractFilter->InPlaceOn();
extractFilter->GraftOutput( this->GetOutput() );
// Set up the crop sizes.
if ( this->GetOutputRegionMode() == Self::SAME )
{
InputRegionType sameRegion = this->GetInput()->GetLargestPossibleRegion();
extractFilter->SetExtractionRegion( sameRegion );
}
else // OutputRegionMode == Self::VALID
{
extractFilter->SetExtractionRegion( this->GetValidRegion() );
}
// Graft the minipipeline output to this filter.
extractFilter->SetNumberOfThreads( this->GetNumberOfThreads() );
extractFilter->SetInput( paddedOutput );
extractFilter->GetOutput()->SetRequestedRegion( this->GetOutput()->GetRequestedRegion() );
progress->RegisterInternalFilter( extractFilter, progressWeight );
extractFilter->Update();
OutputImageType *extractedImage = extractFilter->GetOutput();
OutputImageType *output = this->GetOutput();
// Only manually copy the buffer via the pixel container.
// The output meta-data of the extract filter is not correct and
// different that the GenerateOutputInformation method. So just copy
// the buffer.
output->SetBufferedRegion(extractedImage->GetBufferedRegion());
output->SetPixelContainer(extractedImage->GetPixelContainer());
}
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
typename FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >::InputSizeType
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::GetPadLowerBound() const
{
typename InputImageType::ConstPointer inputImage = this->GetInput();
InputSizeType inputSize = inputImage->GetLargestPossibleRegion().GetSize();
InputSizeType padSize = this->GetPadSize();
InputSizeType inputLowerBound;
for (unsigned int i = 0; i < ImageDimension; ++i)
{
inputLowerBound[i] = (padSize[i] - inputSize[i]) / 2;
}
return inputLowerBound;
}
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
typename FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >::InputSizeType
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::GetPadSize() const
{
typename InputImageType::ConstPointer inputImage = this->GetInput();
InputSizeType inputSize = inputImage->GetLargestPossibleRegion().GetSize();
typename KernelImageType::ConstPointer kernelImage = this->GetKernelImage();
KernelSizeType kernelSize = kernelImage->GetLargestPossibleRegion().GetSize();
InputSizeType padSize;
for (unsigned int i = 0; i < ImageDimension; ++i)
{
padSize[i] = inputSize[i] + kernelSize[i];
// Use the valid sizes for VNL because they are fast sizes for
// both VNL and FFTW.
while ( !VnlFFTCommon::IsDimensionSizeLegal( padSize[i] ) )
{
padSize[i]++;
}
}
return padSize;
}
template< typename TInputImage, typename TKernelImage, typename TOutputImage, typename TInternalPrecision >
bool
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
::GetXDimensionIsOdd() const
{
InputSizeType padSize = this->GetPadSize();
return (padSize[0] % 2 != 0);
}
}
#endif
|
#include <iostream>
using namespace std;
int main (){
int amountCorrect = 0;
int correctAnswer;
int usersAnswer;
for( int i = 0; i < 5; i++) {
cout << "Enter the answer: " ;
cin >> correctAnswer;
cout << "enter your guess: ";
cin >> usersAnswer;
if (usersAnswer == correctAnswer) {
amountCorrect += 1;
cout << amountCorrect;
} else {
amountCorrect += 0;
}
}
cout << "Amount Correct = " << amountCorrect << endl;
}
|
// Generated
// -------------------------------------- names ----------------------------------------
extern const std::string FixBeginStringValue;
constexpr const char * const FixBeginStringInsertableTag = "8=" "FIX.4.4";
constexpr const unsigned FixBeginStringInsertableTagLength = 9;
extern const char * const FixAccount;
extern const char * const FixAvgPx;
extern const char * const FixBeginString;
extern const char * const FixBodyLength;
extern const char * const FixCheckSum;
extern const char * const FixClOrdID;
extern const char * const FixCumQty;
extern const char * const FixCurrency;
extern const char * const FixExecID;
extern const char * const FixExecInst;
extern const char * const FixLastPx;
extern const char * const FixLastQty;
extern const char * const FixMsgSeqNum;
extern const char * const FixMsgType;
extern const char * const FixOrderID;
extern const char * const FixOrderQty;
extern const char * const FixOrdStatus;
extern const char * const FixOrdType;
extern const char * const FixOrigClOrdID;
extern const char * const FixPrice;
extern const char * const FixSecurityID;
extern const char * const FixSenderCompID;
extern const char * const FixSendingTime;
extern const char * const FixSide;
extern const char * const FixSymbol;
extern const char * const FixTargetCompID;
extern const char * const FixText;
extern const char * const FixTimeInForce;
extern const char * const FixTransactTime;
extern const char * const FixStopPx;
extern const char * const FixOrdRejReason;
extern const char * const FixExecType;
extern const char * const FixLeavesQty;
extern const char * const FixSecurityType;
extern const char * const FixPriceType;
extern const char * const FixProduct;
extern const char * const FixQtyType;
extern const char * const FixNoLegs;
extern const char * const FixLegPositionEffect;
extern const char * const FixLegPrice;
extern const char * const FixLegSymbol;
extern const char * const FixLegSide;
extern const char * const FixLegLastPx;
extern const char * const FixLegRefID;
extern const char * const FixNoLegStipulations;
extern const char * const FixLegQty;
extern const char * const FixLegStipulationType;
extern const char * const FixLegStipulationValue;
extern const char * const FixNestedPartyID;
extern const char * const FixNestedPartyIDSource;
extern const char * const FixNestedPartyRole;
extern const char * const FixNoNestedPartyIDs;
extern const char * const FixNestedPartySubID;
extern const char * const FixNoNestedPartySubIDs;
extern const char * const FixNestedPartySubIDType;
// -------------------------------------- typedefs and enums ----------------------------------------
typedef Field< FixAccount, 1, STRING > FieldAccount;
typedef Field< FixAvgPx, 6, PRICE > FieldAvgPx;
typedef Field< FixBeginString, 8, STRING > FieldBeginString;
typedef Field< FixBodyLength, 9, LENGTH > FieldBodyLength;
typedef Field< FixCheckSum, 10, STRING > FieldCheckSum;
typedef Field< FixClOrdID, 11, STRING > FieldClOrdID;
typedef Field< FixCumQty, 14, QTY > FieldCumQty;
typedef Field< FixCurrency, 15, CURRENCY > FieldCurrency;
typedef Field< FixExecID, 17, STRING > FieldExecID;
typedef Field< FixExecInst, 18, MULTIPLEVALUESTRING > FieldExecInst;
typedef Field< FixLastPx, 31, PRICE > FieldLastPx;
typedef Field< FixLastQty, 32, QTY > FieldLastQty;
typedef Field< FixMsgSeqNum, 34, SEQNUM > FieldMsgSeqNum;
typedef Field< FixMsgType, 35, STRING > FieldMsgType;
typedef Field< FixOrderID, 37, STRING > FieldOrderID;
typedef Field< FixOrderQty, 38, QTY > FieldOrderQty;
typedef Field< FixOrdStatus, 39, CHAR > FieldOrdStatus;
typedef Field< FixOrdType, 40, CHAR > FieldOrdType;
typedef Field< FixOrigClOrdID, 41, STRING > FieldOrigClOrdID;
typedef Field< FixPrice, 44, PRICE > FieldPrice;
typedef Field< FixSecurityID, 48, STRING > FieldSecurityID;
typedef Field< FixSenderCompID, 49, STRING > FieldSenderCompID;
typedef Field< FixSendingTime, 52, UTCTIMESTAMP > FieldSendingTime;
typedef Field< FixSide, 54, CHAR > FieldSide;
typedef Field< FixSymbol, 55, STRING > FieldSymbol;
typedef Field< FixTargetCompID, 56, STRING > FieldTargetCompID;
typedef Field< FixText, 58, STRING > FieldText;
typedef Field< FixTimeInForce, 59, CHAR > FieldTimeInForce;
typedef Field< FixTransactTime, 60, UTCTIMESTAMP > FieldTransactTime;
typedef Field< FixStopPx, 99, PRICE > FieldStopPx;
typedef Field< FixOrdRejReason, 103, INT > FieldOrdRejReason;
typedef Field< FixExecType, 150, CHAR > FieldExecType;
typedef Field< FixLeavesQty, 151, QTY > FieldLeavesQty;
typedef Field< FixSecurityType, 167, STRING > FieldSecurityType;
typedef Field< FixPriceType, 423, INT > FieldPriceType;
typedef Field< FixProduct, 460, INT > FieldProduct;
typedef Field< FixQtyType, 854, INT > FieldQtyType;
typedef Field< FixNoLegs, 555, NUMINGROUP > FieldNoLegs;
typedef Field< FixLegPositionEffect, 564, CHAR > FieldLegPositionEffect;
typedef Field< FixLegPrice, 566, PRICE > FieldLegPrice;
typedef Field< FixLegSymbol, 600, STRING > FieldLegSymbol;
typedef Field< FixLegSide, 624, CHAR > FieldLegSide;
typedef Field< FixLegLastPx, 637, PRICE > FieldLegLastPx;
typedef Field< FixLegRefID, 654, STRING > FieldLegRefID;
typedef Field< FixNoLegStipulations, 683, NUMINGROUP > FieldNoLegStipulations;
typedef Field< FixLegQty, 687, QTY > FieldLegQty;
typedef Field< FixLegStipulationType, 688, STRING > FieldLegStipulationType;
typedef Field< FixLegStipulationValue, 689, STRING > FieldLegStipulationValue;
typedef Field< FixNestedPartyID, 524, STRING > FieldNestedPartyID;
typedef Field< FixNestedPartyIDSource, 525, CHAR > FieldNestedPartyIDSource;
typedef Field< FixNestedPartyRole, 538, INT > FieldNestedPartyRole;
typedef Field< FixNoNestedPartyIDs, 539, NUMINGROUP > FieldNoNestedPartyIDs;
typedef Field< FixNestedPartySubID, 545, STRING > FieldNestedPartySubID;
typedef Field< FixNoNestedPartySubIDs, 804, NUMINGROUP > FieldNoNestedPartySubIDs;
typedef Field< FixNestedPartySubIDType, 805, INT > FieldNestedPartySubIDType;
struct QtyTypeEnums final: FieldEnumsBase {
typedef FieldQtyType::ValueType ValueType;
typedef FieldEnum< ValueType > ItemType;
static const FieldEnumBase * items[];
static const FieldEnumMap itemByRaw;
static const QtyTypeEnums instance;
virtual const char * getFieldName() const override;
virtual const FieldEnumBase * getEnumByRaw( raw_enum_t raw ) const override;
virtual const FieldEnumMap & getEnumMapByRaw() const override;
virtual const FieldEnumBase * const * const getEnums() const override;
static const ItemType UNITS;
static const ItemType CONTRACTS;
};
struct ProductEnums final: FieldEnumsBase {
typedef FieldProduct::ValueType ValueType;
typedef FieldEnum< ValueType > ItemType;
static const FieldEnumBase * items[];
static const FieldEnumMap itemByRaw;
static const ProductEnums instance;
virtual const char * getFieldName() const override;
virtual const FieldEnumBase * getEnumByRaw( raw_enum_t raw ) const override;
virtual const FieldEnumMap & getEnumMapByRaw() const override;
virtual const FieldEnumBase * const * const getEnums() const override;
static const ItemType AGENCY;
static const ItemType COMMODITY;
static const ItemType CORPORATE;
static const ItemType CURRENCY;
static const ItemType EQUITY;
static const ItemType GOVERNMENT;
static const ItemType INDEX;
static const ItemType LOAN;
static const ItemType MONEYMARKET;
static const ItemType MORTGAGE;
static const ItemType MUNICIPAL;
static const ItemType OTHER;
static const ItemType FINANCING;
};
struct MsgTypeEnums final: FieldEnumsBase {
typedef FieldMsgType::ValueType ValueType;
typedef FieldEnum< ValueType > ItemType;
static const FieldEnumBase * items[];
static const FieldEnumMap itemByRaw;
static const MsgTypeEnums instance;
virtual const char * getFieldName() const override;
virtual const FieldEnumBase * getEnumByRaw( raw_enum_t raw ) const override;
virtual const FieldEnumMap & getEnumMapByRaw() const override;
virtual const FieldEnumBase * const * const getEnums() const override;
static const ItemType EXECUTION_REPORT;
static const ItemType ORDER_SINGLE;
};
struct OrdStatusEnums final: FieldEnumsBase {
typedef FieldOrdStatus::ValueType ValueType;
typedef FieldEnum< ValueType > ItemType;
static const FieldEnumBase * items[];
static const FieldEnumMap itemByRaw;
static const OrdStatusEnums instance;
virtual const char * getFieldName() const override;
virtual const FieldEnumBase * getEnumByRaw( raw_enum_t raw ) const override;
virtual const FieldEnumMap & getEnumMapByRaw() const override;
virtual const FieldEnumBase * const * const getEnums() const override;
static const ItemType NEW;
static const ItemType PARTIALLY_FILLED;
static const ItemType FILLED;
static const ItemType DONE_FOR_DAY;
static const ItemType CANCELED;
static const ItemType PENDING_CANCEL;
static const ItemType STOPPED;
static const ItemType REJECTED;
static const ItemType SUSPENDED;
static const ItemType PENDING_NEW;
static const ItemType CALCULATED;
static const ItemType EXPIRED;
static const ItemType ACCEPTED_FOR_BIDDING;
static const ItemType PENDING_REPLACE;
};
struct OrdTypeEnums final: FieldEnumsBase {
typedef FieldOrdType::ValueType ValueType;
typedef FieldEnum< ValueType > ItemType;
static const FieldEnumBase * items[];
static const FieldEnumMap itemByRaw;
static const OrdTypeEnums instance;
virtual const char * getFieldName() const override;
virtual const FieldEnumBase * getEnumByRaw( raw_enum_t raw ) const override;
virtual const FieldEnumMap & getEnumMapByRaw() const override;
virtual const FieldEnumBase * const * const getEnums() const override;
static const ItemType MARKET;
static const ItemType LIMIT;
static const ItemType STOP;
static const ItemType STOP_LIMIT;
static const ItemType WITH_OR_WITHOUT;
static const ItemType LIMIT_OR_BETTER;
static const ItemType LIMIT_WITH_OR_WITHOUT;
static const ItemType ON_BASIS;
static const ItemType PREVIOUSLY_QUOTED;
static const ItemType PREVIOUSLY_INDICATED;
static const ItemType FOREX;
static const ItemType FUNARI;
static const ItemType MARKET_IF_TOUCHED;
static const ItemType MARKET_WITH_LEFTOVER_AS_LIMIT;
static const ItemType PREVIOUS_FUND_VALUATION_POINT;
static const ItemType NEXT_FUND_VALUATION_POINT;
static const ItemType PEGGED;
};
struct SideEnums final: FieldEnumsBase {
typedef FieldSide::ValueType ValueType;
typedef FieldEnum< ValueType > ItemType;
static const FieldEnumBase * items[];
static const FieldEnumMap itemByRaw;
static const SideEnums instance;
virtual const char * getFieldName() const override;
virtual const FieldEnumBase * getEnumByRaw( raw_enum_t raw ) const override;
virtual const FieldEnumMap & getEnumMapByRaw() const override;
virtual const FieldEnumBase * const * const getEnums() const override;
static const ItemType BUY;
static const ItemType SELL;
};
struct TimeInForceEnums final: FieldEnumsBase {
typedef FieldTimeInForce::ValueType ValueType;
typedef FieldEnum< ValueType > ItemType;
static const FieldEnumBase * items[];
static const FieldEnumMap itemByRaw;
static const TimeInForceEnums instance;
virtual const char * getFieldName() const override;
virtual const FieldEnumBase * getEnumByRaw( raw_enum_t raw ) const override;
virtual const FieldEnumMap & getEnumMapByRaw() const override;
virtual const FieldEnumBase * const * const getEnums() const override;
static const ItemType DAY;
static const ItemType GOOD_TILL_CANCEL;
static const ItemType AT_THE_OPENING;
static const ItemType IMMEDIATE_OR_CANCEL;
static const ItemType FILL_OR_KILL;
static const ItemType GOOD_TILL_CROSSING;
static const ItemType GOOD_TILL_DATE;
static const ItemType AT_THE_CLOSE;
};
struct PriceTypeEnums final: FieldEnumsBase {
typedef FieldPriceType::ValueType ValueType;
typedef FieldEnum< ValueType > ItemType;
static const FieldEnumBase * items[];
static const FieldEnumMap itemByRaw;
static const PriceTypeEnums instance;
virtual const char * getFieldName() const override;
virtual const FieldEnumBase * getEnumByRaw( raw_enum_t raw ) const override;
virtual const FieldEnumMap & getEnumMapByRaw() const override;
virtual const FieldEnumBase * const * const getEnums() const override;
static const ItemType PERCENTAGE;
static const ItemType PER_UNIT;
static const ItemType FIXED_AMOUNT;
static const ItemType DISCOUNT_PERCENTAGE_POINTS_BELOW_PAR;
static const ItemType PREMIUM_PERCENTAGE_POINTS_OVER_PAR;
static const ItemType SPREAD;
static const ItemType TED_PRICE;
static const ItemType TED_YIELD;
static const ItemType YIELD;
static const ItemType FIXED_CABINET_TRADE_PRICE;
static const ItemType VARIABLE_CABINET_TRADE_PRICE;
};
struct SecurityTypeEnums final: FieldEnumsBase {
typedef FieldSecurityType::ValueType ValueType;
typedef FieldEnum< ValueType > ItemType;
static const FieldEnumBase * items[];
static const FieldEnumMap itemByRaw;
static const SecurityTypeEnums instance;
virtual const char * getFieldName() const override;
virtual const FieldEnumBase * getEnumByRaw( raw_enum_t raw ) const override;
virtual const FieldEnumMap & getEnumMapByRaw() const override;
virtual const FieldEnumBase * const * const getEnums() const override;
static const ItemType FUTURE;
static const ItemType OPTION;
static const ItemType EURO_SUPRANATIONAL_COUPONS;
static const ItemType FEDERAL_AGENCY_COUPON;
static const ItemType FEDERAL_AGENCY_DISCOUNT_NOTE;
static const ItemType PRIVATE_EXPORT_FUNDING;
static const ItemType USD_SUPRANATIONAL_COUPONS;
static const ItemType CORPORATE_BOND;
static const ItemType CORPORATE_PRIVATE_PLACEMENT;
static const ItemType CONVERTIBLE_BOND;
static const ItemType DUAL_CURRENCY;
static const ItemType EURO_CORPORATE_BOND;
static const ItemType INDEXED_LINKED;
static const ItemType STRUCTURED_NOTES;
static const ItemType YANKEE_CORPORATE_BOND;
static const ItemType FOREIGN_EXCHANGE_CONTRACT;
static const ItemType COMMON_STOCK;
static const ItemType PREFERRED_STOCK;
static const ItemType BRADY_BOND;
static const ItemType EURO_SOVEREIGNS;
static const ItemType US_TREASURY_BOND;
static const ItemType INTEREST_STRIP_FROM_ANY_BOND_OR_NOTE;
static const ItemType TREASURY_INFLATION_PROTECTED_SECURITIES;
static const ItemType PRINCIPAL_STRIP_OF_A_CALLABLE_BOND_OR_NOTE;
static const ItemType PRINCIPAL_STRIP_FROM_A_NON_CALLABLE_BOND_OR_NOTE;
static const ItemType US_TREASURY_NOTE_UST;
static const ItemType US_TREASURY_BILL_USTB;
static const ItemType US_TREASURY_NOTE_TNOTE;
static const ItemType US_TREASURY_BILL_TBILL;
static const ItemType REPURCHASE;
static const ItemType FORWARD;
static const ItemType BUY_SELLBACK;
static const ItemType SECURITIES_LOAN;
static const ItemType SECURITIES_PLEDGE;
static const ItemType TERM_LOAN;
static const ItemType REVOLVER_LOAN;
static const ItemType REVOLVER_TERM_LOAN;
static const ItemType BRIDGE_LOAN;
static const ItemType LETTER_OF_CREDIT;
static const ItemType SWING_LINE_FACILITY;
static const ItemType DEBTOR_IN_POSSESSION;
static const ItemType DEFAULTED;
static const ItemType WITHDRAWN;
static const ItemType REPLACED;
static const ItemType MATURED;
static const ItemType AMENDED_RESTATED;
static const ItemType RETIRED;
static const ItemType BANKERS_ACCEPTANCE;
static const ItemType BANK_NOTES;
static const ItemType BILL_OF_EXCHANGES;
static const ItemType CERTIFICATE_OF_DEPOSIT;
static const ItemType CALL_LOANS;
static const ItemType COMMERCIAL_PAPER;
static const ItemType DEPOSIT_NOTES;
static const ItemType EURO_CERTIFICATE_OF_DEPOSIT;
static const ItemType EURO_COMMERCIAL_PAPER;
static const ItemType LIQUIDITY_NOTE;
static const ItemType MEDIUM_TERM_NOTES;
static const ItemType OVERNIGHT;
static const ItemType PROMISSORY_NOTE;
static const ItemType PLAZOS_FIJOS;
static const ItemType SHORT_TERM_LOAN_NOTE;
static const ItemType TIME_DEPOSIT;
static const ItemType EXTENDED_COMM_NOTE;
static const ItemType YANKEE_CERTIFICATE_OF_DEPOSIT;
static const ItemType ASSET_BACKED_SECURITIES;
static const ItemType CORP_MORTGAGE_BACKED_SECURITIES;
static const ItemType COLLATERALIZED_MORTGAGE_OBLIGATION;
static const ItemType IOETTE_MORTGAGE;
static const ItemType MORTGAGE_BACKED_SECURITIES;
static const ItemType MORTGAGE_INTEREST_ONLY;
static const ItemType MORTGAGE_PRINCIPAL_ONLY;
static const ItemType MORTGAGE_PRIVATE_PLACEMENT;
static const ItemType MISCELLANEOUS_PASS_THROUGH;
static const ItemType PFANDBRIEFE;
static const ItemType TO_BE_ANNOUNCED;
static const ItemType OTHER_ANTICIPATION_NOTES_BAN_GAN_ETC;
static const ItemType CERTIFICATE_OF_OBLIGATION;
static const ItemType CERTIFICATE_OF_PARTICIPATION;
static const ItemType GENERAL_OBLIGATION_BONDS;
static const ItemType MANDATORY_TENDER;
static const ItemType REVENUE_ANTICIPATION_NOTE;
static const ItemType REVENUE_BONDS;
static const ItemType SPECIAL_ASSESSMENT;
static const ItemType SPECIAL_OBLIGATION;
static const ItemType SPECIAL_TAX;
static const ItemType TAX_ANTICIPATION_NOTE;
static const ItemType TAX_ALLOCATION;
static const ItemType TAX_EXEMPT_COMMERCIAL_PAPER;
static const ItemType TAX_REVENUE_ANTICIPATION_NOTE;
static const ItemType VARIABLE_RATE_DEMAND_NOTE;
static const ItemType WARRANT;
static const ItemType MUTUAL_FUND;
static const ItemType MULTI_LEG_INSTRUMENT;
static const ItemType NO_SECURITY_TYPE;
};
// -------------------------------------- convenience field namespace ----------------------------------------
namespace field
{
typedef FieldAccount Account;
typedef FieldAvgPx AvgPx;
typedef FieldBeginString BeginString;
typedef FieldBodyLength BodyLength;
typedef FieldCheckSum CheckSum;
typedef FieldClOrdID ClOrdID;
typedef FieldCumQty CumQty;
typedef FieldCurrency Currency;
typedef FieldExecID ExecID;
typedef FieldExecInst ExecInst;
typedef FieldLastPx LastPx;
typedef FieldLastQty LastQty;
typedef FieldMsgSeqNum MsgSeqNum;
typedef FieldMsgType MsgType;
typedef FieldOrderID OrderID;
typedef FieldOrderQty OrderQty;
typedef FieldOrdStatus OrdStatus;
typedef FieldOrdType OrdType;
typedef FieldOrigClOrdID OrigClOrdID;
typedef FieldPrice Price;
typedef FieldSecurityID SecurityID;
typedef FieldSenderCompID SenderCompID;
typedef FieldSendingTime SendingTime;
typedef FieldSide Side;
typedef FieldSymbol Symbol;
typedef FieldTargetCompID TargetCompID;
typedef FieldText Text;
typedef FieldTimeInForce TimeInForce;
typedef FieldTransactTime TransactTime;
typedef FieldStopPx StopPx;
typedef FieldOrdRejReason OrdRejReason;
typedef FieldExecType ExecType;
typedef FieldLeavesQty LeavesQty;
typedef FieldSecurityType SecurityType;
typedef FieldPriceType PriceType;
typedef FieldProduct Product;
typedef FieldQtyType QtyType;
typedef FieldNoLegs NoLegs;
typedef FieldLegPositionEffect LegPositionEffect;
typedef FieldLegPrice LegPrice;
typedef FieldLegSymbol LegSymbol;
typedef FieldLegSide LegSide;
typedef FieldLegLastPx LegLastPx;
typedef FieldLegRefID LegRefID;
typedef FieldNoLegStipulations NoLegStipulations;
typedef FieldLegQty LegQty;
typedef FieldLegStipulationType LegStipulationType;
typedef FieldLegStipulationValue LegStipulationValue;
typedef FieldNestedPartyID NestedPartyID;
typedef FieldNestedPartyIDSource NestedPartyIDSource;
typedef FieldNestedPartyRole NestedPartyRole;
typedef FieldNoNestedPartyIDs NoNestedPartyIDs;
typedef FieldNestedPartySubID NestedPartySubID;
typedef FieldNoNestedPartySubIDs NoNestedPartySubIDs;
typedef FieldNestedPartySubIDType NestedPartySubIDType;
}
constexpr raw_enum_t MsgTypeRaw__ = (raw_enum_t)0; // Header
constexpr raw_enum_t MsgTypeRaw_EXECUTION_REPORT = (raw_enum_t)'8';
constexpr raw_enum_t MsgTypeRaw_ORDER_SINGLE = (raw_enum_t)'D';
|
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
long long a, b;
cin >> a >> b;
cout << setiosflags(ios::fixed) << setprecision(3) << static_cast<double>(b) / a * 100 << "%" << endl;
return 0;
}
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Nautiluscoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "rpcserver.h"
#include "rpcclient.h"
#include "init.h"
#include "main.h"
#include "noui.h"
#include "ui_interface.h"
#include "util.h"
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
/* Introduction text for doxygen: */
/*! \mainpage Developer documentation
*
* \section intro_sec Introduction
*
* This is the developer documentation of the reference client for an experimental new digital currency called Nautiluscoin (http://www.bitcoin.org/),
* which enables instant payments to anyone, anywhere in the world. Nautiluscoin uses peer-to-peer technology to operate
* with no central authority: managing transactions and issuing money are carried out collectively by the network.
*
* The software is a community-driven open source project, released under the MIT license.
*
* \section Navigation
* Use the buttons <code>Namespaces</code>, <code>Classes</code> or <code>Files</code> at the top of the page to start navigating the code.
*/
static bool fDaemon;
void DetectShutdownThread(boost::thread_group* threadGroup)
{
bool fShutdown = ShutdownRequested();
// Tell the main threads to shutdown.
while (!fShutdown)
{
MilliSleep(200);
fShutdown = ShutdownRequested();
}
if (threadGroup)
{
threadGroup->interrupt_all();
threadGroup->join_all();
}
}
//////////////////////////////////////////////////////////////////////////////
//
// Start
//
bool AppInit(int argc, char* argv[])
{
boost::thread_group threadGroup;
boost::thread* detectShutdownThread = NULL;
bool fRet = false;
try
{
//
// Parameters
//
// If Qt is used, parameters/nautiluscoin.conf are parsed in qt/nautiluscoin.cpp's main()
ParseParameters(argc, argv);
if (!boost::filesystem::is_directory(GetDataDir(false)))
{
fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", mapArgs["-datadir"].c_str());
return false;
}
ReadConfigFile(mapArgs, mapMultiArgs);
// Check for -testnet or -regtest parameter (TestNet() calls are only valid after this clause)
if (!SelectParamsFromCommandLine()) {
fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n");
return false;
}
if (mapArgs.count("-?") || mapArgs.count("--help"))
{
// First part of help message is specific to nautiluscoind / RPC client
std::string strUsage = _("Nautiluscoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n\n" +
_("Usage:") + "\n" +
" nautiluscoind [options] " + _("Start Nautiluscoin server") + "\n" +
_("Usage (deprecated, use nautiluscoin-cli):") + "\n" +
" nautiluscoind [options] <command> [params] " + _("Send command to Nautiluscoin server") + "\n" +
" nautiluscoind [options] help " + _("List commands") + "\n" +
" nautiluscoind [options] help <command> " + _("Get help for a command") + "\n";
strUsage += "\n" + HelpMessage(HMM_NAUTILUSCOIND);
strUsage += "\n" + HelpMessageCli(false);
fprintf(stdout, "%s", strUsage.c_str());
return false;
}
// Command-line RPC
bool fCommandLine = false;
for (int i = 1; i < argc; i++)
if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "nautiluscoin:"))
fCommandLine = true;
if (fCommandLine)
{
int ret = CommandLineRPC(argc, argv);
exit(ret);
}
#ifndef WIN32
fDaemon = GetBoolArg("-daemon", false);
if (fDaemon)
{
fprintf(stdout, "Nautiluscoin server starting\n");
// Daemonize
pid_t pid = fork();
if (pid < 0)
{
fprintf(stderr, "Error: fork() returned %d errno %d\n", pid, errno);
return false;
}
if (pid > 0) // Parent process, pid is child process id
{
CreatePidFile(GetPidFile(), pid);
return true;
}
// Child process falls through to rest of initialization
pid_t sid = setsid();
if (sid < 0)
fprintf(stderr, "Error: setsid() returned %d errno %d\n", sid, errno);
}
#endif
SoftSetBoolArg("-server", true);
detectShutdownThread = new boost::thread(boost::bind(&DetectShutdownThread, &threadGroup));
fRet = AppInit2(threadGroup);
}
catch (std::exception& e) {
PrintExceptionContinue(&e, "AppInit()");
} catch (...) {
PrintExceptionContinue(NULL, "AppInit()");
}
if (!fRet)
{
if (detectShutdownThread)
detectShutdownThread->interrupt();
threadGroup.interrupt_all();
// threadGroup.join_all(); was left out intentionally here, because we didn't re-test all of
// the startup-failure cases to make sure they don't result in a hang due to some
// thread-blocking-waiting-for-another-thread-during-startup case
}
if (detectShutdownThread)
{
detectShutdownThread->join();
delete detectShutdownThread;
detectShutdownThread = NULL;
}
Shutdown();
return fRet;
}
int main(int argc, char* argv[])
{
bool fRet = false;
// Connect nautiluscoind signal handlers
noui_connect();
fRet = AppInit(argc, argv);
if (fRet && fDaemon)
return 0;
return (fRet ? 0 : 1);
}
|
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
//-----------------------------------------------------------------------------
// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: Apache-2.0
//-----------------------------------------------------------------------------
/*---------------------------------------------------------------------------*/
/* StackTrace.cc (C) 2000-2018 */
/* */
/* Pile d'appel. */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
#include "arccore/base/StackTrace.h"
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
namespace Arccore
{
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
//! Opérateur d'écriture d'une StackTrace
std::ostream& operator<<(std::ostream& o,const StackTrace& s)
{
o << s.toString();
return o;
}
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
} // End namespace Arccore
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
|
//////////////////////////////////////////////////////////////////////////////
//
// This file is the adaptation for Interprocess of boost/intrusive_ptr.hpp
//
// (C) Copyright Peter Dimov 2001, 2002
// (C) Copyright Ion Gaztanaga 2006-2012. 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)
//
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_INTERPROCESS_INTRUSIVE_PTR_HPP_INCLUDED
#define BOOST_INTERPROCESS_INTRUSIVE_PTR_HPP_INCLUDED
#if defined(_MSC_VER)
# pragma once
#endif
//!\file
//!Describes an intrusive ownership pointer.
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/assert.hpp>
#include <boost/interprocess/detail/utilities.hpp>
#include <boost/intrusive/pointer_traits.hpp>
#include <functional> // for std::less
#include <iosfwd> // for std::basic_ostream
namespace boost {
namespace interprocess {
//!The intrusive_ptr class template stores a pointer to an object
//!with an embedded reference count. intrusive_ptr is parameterized on
//!T (the type of the object pointed to) and VoidPointer(a void pointer type
//!that defines the type of pointer that intrusive_ptr will store).
//!intrusive_ptr<T, void *> defines a class with a T* member whereas
//!intrusive_ptr<T, offset_ptr<void> > defines a class with a offset_ptr<T> member.
//!Relies on unqualified calls to:
//!
//! void intrusive_ptr_add_ref(T * p);
//! void intrusive_ptr_release(T * p);
//!
//! with (p != 0)
//!
//!The object is responsible for destroying itself.
template<class T, class VoidPointer>
class intrusive_ptr
{
public:
//!Provides the type of the internal stored pointer.
typedef typename boost::intrusive::
pointer_traits<VoidPointer>::template
rebind_pointer<T>::type pointer;
//!Provides the type of the stored pointer.
typedef T element_type;
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
private:
typedef VoidPointer VP;
typedef intrusive_ptr this_type;
typedef pointer this_type::*unspecified_bool_type;
#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
public:
//!Constructor. Initializes internal pointer to 0.
//!Does not throw
intrusive_ptr(): m_ptr(0)
{}
//!Constructor. Copies pointer and if "p" is not zero and
//!"add_ref" is true calls intrusive_ptr_add_ref(to_raw_pointer(p)).
//!Does not throw
intrusive_ptr(const pointer &p, bool add_ref = true): m_ptr(p)
{
if(m_ptr != 0 && add_ref) intrusive_ptr_add_ref(ipcdetail::to_raw_pointer(m_ptr));
}
//!Copy constructor. Copies the internal pointer and if "p" is not
//!zero calls intrusive_ptr_add_ref(to_raw_pointer(p)). Does not throw
intrusive_ptr(intrusive_ptr const & rhs)
: m_ptr(rhs.m_ptr)
{
if(m_ptr != 0) intrusive_ptr_add_ref(ipcdetail::to_raw_pointer(m_ptr));
}
//!Constructor from related. Copies the internal pointer and if "p" is not
//!zero calls intrusive_ptr_add_ref(to_raw_pointer(p)). Does not throw
template<class U> intrusive_ptr
(intrusive_ptr<U, VP> const & rhs)
: m_ptr(rhs.get())
{
if(m_ptr != 0) intrusive_ptr_add_ref(ipcdetail::to_raw_pointer(m_ptr));
}
//!Destructor. If internal pointer is not 0, calls
//!intrusive_ptr_release(to_raw_pointer(m_ptr)). Does not throw
~intrusive_ptr()
{
if(m_ptr != 0) intrusive_ptr_release(ipcdetail::to_raw_pointer(m_ptr));
}
//!Assignment operator. Equivalent to intrusive_ptr(r).swap(*this).
//!Does not throw
intrusive_ptr & operator=(intrusive_ptr const & rhs)
{
this_type(rhs).swap(*this);
return *this;
}
//!Assignment from related. Equivalent to intrusive_ptr(r).swap(*this).
//!Does not throw
template<class U> intrusive_ptr & operator=
(intrusive_ptr<U, VP> const & rhs)
{
this_type(rhs).swap(*this);
return *this;
}
//!Assignment from pointer. Equivalent to intrusive_ptr(r).swap(*this).
//!Does not throw
intrusive_ptr & operator=(pointer rhs)
{
this_type(rhs).swap(*this);
return *this;
}
//!Returns a reference to the internal pointer.
//!Does not throw
pointer &get()
{ return m_ptr; }
//!Returns a reference to the internal pointer.
//!Does not throw
const pointer &get() const
{ return m_ptr; }
//!Returns *get().
//!Does not throw
T & operator*() const
{ return *m_ptr; }
//!Returns *get().
//!Does not throw
const pointer &operator->() const
{ return m_ptr; }
//!Returns get().
//!Does not throw
pointer &operator->()
{ return m_ptr; }
//!Conversion to boolean.
//!Does not throw
operator unspecified_bool_type () const
{ return m_ptr == 0? 0: &this_type::m_ptr; }
//!Not operator.
//!Does not throw
bool operator! () const
{ return m_ptr == 0; }
//!Exchanges the contents of the two smart pointers.
//!Does not throw
void swap(intrusive_ptr & rhs)
{ ipcdetail::do_swap(m_ptr, rhs.m_ptr); }
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
private:
pointer m_ptr;
#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
};
//!Returns a.get() == b.get().
//!Does not throw
template<class T, class U, class VP> inline
bool operator==(intrusive_ptr<T, VP> const & a,
intrusive_ptr<U, VP> const & b)
{ return a.get() == b.get(); }
//!Returns a.get() != b.get().
//!Does not throw
template<class T, class U, class VP> inline
bool operator!=(intrusive_ptr<T, VP> const & a,
intrusive_ptr<U, VP> const & b)
{ return a.get() != b.get(); }
//!Returns a.get() == b.
//!Does not throw
template<class T, class VP> inline
bool operator==(intrusive_ptr<T, VP> const & a,
const typename intrusive_ptr<T, VP>::pointer &b)
{ return a.get() == b; }
//!Returns a.get() != b.
//!Does not throw
template<class T, class VP> inline
bool operator!=(intrusive_ptr<T, VP> const & a,
const typename intrusive_ptr<T, VP>::pointer &b)
{ return a.get() != b; }
//!Returns a == b.get().
//!Does not throw
template<class T, class VP> inline
bool operator==(const typename intrusive_ptr<T, VP>::pointer &a,
intrusive_ptr<T, VP> const & b)
{ return a == b.get(); }
//!Returns a != b.get().
//!Does not throw
template<class T, class VP> inline
bool operator!=(const typename intrusive_ptr<T, VP>::pointer &a,
intrusive_ptr<T, VP> const & b)
{ return a != b.get(); }
//!Returns a.get() < b.get().
//!Does not throw
template<class T, class VP> inline
bool operator<(intrusive_ptr<T, VP> const & a,
intrusive_ptr<T, VP> const & b)
{
return std::less<typename intrusive_ptr<T, VP>::pointer>()
(a.get(), b.get());
}
//!Exchanges the contents of the two intrusive_ptrs.
//!Does not throw
template<class T, class VP> inline
void swap(intrusive_ptr<T, VP> & lhs,
intrusive_ptr<T, VP> & rhs)
{ lhs.swap(rhs); }
// operator<<
template<class E, class T, class Y, class VP>
inline std::basic_ostream<E, T> & operator<<
(std::basic_ostream<E, T> & os, intrusive_ptr<Y, VP> const & p)
{ os << p.get(); return os; }
//!Returns p.get().
//!Does not throw
template<class T, class VP>
inline typename boost::interprocess::intrusive_ptr<T, VP>::pointer
to_raw_pointer(intrusive_ptr<T, VP> p)
{ return p.get(); }
/*Emulates static cast operator. Does not throw*/
/*
template<class T, class U, class VP>
inline boost::interprocess::intrusive_ptr<T, VP> static_pointer_cast
(boost::interprocess::intrusive_ptr<U, VP> const & p)
{ return do_static_cast<U>(p.get()); }
*/
/*Emulates const cast operator. Does not throw*/
/*
template<class T, class U, class VP>
inline boost::interprocess::intrusive_ptr<T, VP> const_pointer_cast
(boost::interprocess::intrusive_ptr<U, VP> const & p)
{ return do_const_cast<U>(p.get()); }
*/
/*Emulates dynamic cast operator. Does not throw*/
/*
template<class T, class U, class VP>
inline boost::interprocess::intrusive_ptr<T, VP> dynamic_pointer_cast
(boost::interprocess::intrusive_ptr<U, VP> const & p)
{ return do_dynamic_cast<U>(p.get()); }
*/
/*Emulates reinterpret cast operator. Does not throw*/
/*
template<class T, class U, class VP>
inline boost::interprocess::intrusive_ptr<T, VP>reinterpret_pointer_cast
(boost::interprocess::intrusive_ptr<U, VP> const & p)
{ return do_reinterpret_cast<U>(p.get()); }
*/
} // namespace interprocess
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
#if defined(_MSC_VER) && (_MSC_VER < 1400)
//!Returns p.get().
//!Does not throw
template<class T, class VP>
inline T *to_raw_pointer(boost::interprocess::intrusive_ptr<T, VP> p)
{ return p.get(); }
#endif
#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
} // namespace boost
#include <boost/interprocess/detail/config_end.hpp>
#endif // #ifndef BOOST_INTERPROCESS_INTRUSIVE_PTR_HPP_INCLUDED
|
#include "baldr/nodeinfo.h"
#include "midgard/logging.h"
#include <cmath>
#include <baldr/datetime.h>
#include <baldr/graphtile.h>
using namespace valhalla::midgard;
using namespace valhalla::baldr;
namespace {
json::MapPtr access_json(uint16_t access) {
return json::map({{"bicycle", static_cast<bool>(access & kBicycleAccess)},
{"bus", static_cast<bool>(access & kBusAccess)},
{"car", static_cast<bool>(access & kAutoAccess)},
{"emergency", static_cast<bool>(access & kEmergencyAccess)},
{"HOV", static_cast<bool>(access & kHOVAccess)},
{"pedestrian", static_cast<bool>(access & kPedestrianAccess)},
{"taxi", static_cast<bool>(access & kTaxiAccess)},
{"truck", static_cast<bool>(access & kTruckAccess)},
{"wheelchair", static_cast<bool>(access & kWheelchairAccess)}});
}
json::MapPtr admin_json(const AdminInfo& admin, uint16_t tz_index) {
// admin
auto m = json::map({
{"iso_3166-1", admin.country_iso()},
{"country", admin.country_text()},
{"iso_3166-2", admin.state_iso()},
{"state", admin.state_text()},
});
// timezone
auto tz = DateTime::get_tz_db().from_index(tz_index);
if (tz) {
// TODO: so much to do but posix tz has pretty much all the info
// TODO: need to include ptz.h from HowardHinnant
// m->emplace("time_zone_posix", tz->to_posix_string());
m->emplace("time_zone_name", tz->name());
// TODO: need to include ptz.h from HowardHinnant
// if (tz->has_dst())
// m->emplace("daylight_savings_time_zone_name", tz->dst_zone_name());
}
return m;
}
/**
* Get the updated bit field.
* @param dst Data member to be updated.
* @param src Value to be updated.
* @param pos Position (pos element within the bit field).
* @param len Length of each element within the bit field.
* @return Returns an updated value for the bit field.
*/
uint32_t
OverwriteBits(const uint32_t dst, const uint32_t src, const uint32_t pos, const uint32_t len) {
uint32_t shift = (pos * len);
uint32_t mask = (((uint32_t)1 << len) - 1) << shift;
return (dst & ~mask) | (src << shift);
}
} // namespace
namespace valhalla {
namespace baldr {
// Default constructor. Initialize to all 0's.
NodeInfo::NodeInfo() {
memset(this, 0, sizeof(NodeInfo));
}
NodeInfo::NodeInfo(const PointLL& tile_corner,
const std::pair<float, float>& ll,
const uint32_t access,
const NodeType type,
const bool traffic_signal) {
memset(this, 0, sizeof(NodeInfo));
set_latlng(tile_corner, ll);
set_access(access);
set_type(type);
set_traffic_signal(traffic_signal);
}
// Sets the latitude and longitude.
void NodeInfo::set_latlng(const PointLL& tile_corner, const std::pair<float, float>& ll) {
// Protect against a node being slightly outside the tile (due to float roundoff)
lat_offset_ = ll.second < tile_corner.lat()
? 0
: static_cast<uint32_t>((ll.second - tile_corner.lat()) / kDegreesPrecision);
lon_offset_ = ll.first < tile_corner.lng()
? 0
: static_cast<uint32_t>((ll.first - tile_corner.lng()) / kDegreesPrecision);
}
// Set the index in the node's tile of its first outbound edge.
void NodeInfo::set_edge_index(const uint32_t edge_index) {
if (edge_index > kMaxGraphId) {
// Consider this a catastrophic error
throw std::runtime_error("NodeInfo: edge index exceeds max");
}
edge_index_ = edge_index;
}
// Set the number of outbound directed edges.
void NodeInfo::set_edge_count(const uint32_t edge_count) {
if (edge_count > kMaxEdgesPerNode) {
// Log an error and set count to max.
LOG_ERROR("NodeInfo: edge count exceeds max: " + std::to_string(edge_count));
edge_count_ = kMaxEdgesPerNode;
} else {
edge_count_ = edge_count;
}
}
// Set the access modes (bit mask) allowed to pass through the node.
void NodeInfo::set_access(const uint32_t access) {
if (access > kAllAccess) {
LOG_ERROR("NodeInfo: access exceeds maximum allowed: " + std::to_string(access));
access_ = (access & kAllAccess);
} else {
access_ = access;
}
}
// Set the intersection type.
void NodeInfo::set_intersection(const IntersectionType type) {
intersection_ = static_cast<uint32_t>(type);
}
// Set the index of the administrative information within this tile.
void NodeInfo::set_admin_index(const uint16_t admin_index) {
if (admin_index > kMaxAdminsPerTile) {
// Log an error and set count to max.
LOG_ERROR("NodeInfo: admin index exceeds max: " + std::to_string(admin_index));
admin_index_ = kMaxAdminsPerTile;
} else {
admin_index_ = admin_index;
}
}
// Set the timezone index.
void NodeInfo::set_timezone(const uint32_t timezone) {
if (timezone > kMaxTimeZonesPerTile) {
// Log an error and set count to max.
LOG_ERROR("NodeInfo: timezone index exceeds max: " + std::to_string(timezone));
timezone_ = kMaxTimeZonesPerTile;
} else {
timezone_ = timezone;
}
}
// Set the driveability of the local directed edge given a local
// edge index.
void NodeInfo::set_local_driveability(const uint32_t localidx, const Traversability t) {
if (localidx > kMaxLocalEdgeIndex) {
LOG_WARN("Exceeding max local index on set_local_driveability - skip");
} else {
local_driveability_ = OverwriteBits(local_driveability_, static_cast<uint32_t>(t), localidx, 2);
}
}
// Set the relative density
void NodeInfo::set_density(const uint32_t density) {
if (density > kMaxDensity) {
LOG_WARN("Exceeding max. density: " + std::to_string(density));
density_ = kMaxDensity;
} else {
density_ = density;
}
}
// Set the node type.
void NodeInfo::set_type(const NodeType type) {
type_ = static_cast<uint32_t>(type);
}
// Set the number of driveable edges on the local level. Subtract 1 so
// a value up to kMaxLocalEdgeIndex+1 can be stored.
void NodeInfo::set_local_edge_count(const uint32_t n) {
if (n > kMaxLocalEdgeIndex + 1) {
LOG_INFO("Exceeding max. local edge count: " + std::to_string(n));
local_edge_count_ = kMaxLocalEdgeIndex;
} else if (n == 0) {
LOG_ERROR("Node with 0 local edges found");
} else {
local_edge_count_ = n - 1;
}
}
// Set the flag indicating driving is on the right hand side of the road
// for outbound edges from this node.
void NodeInfo::set_drive_on_right(const bool rsd) {
drive_on_right_ = rsd;
}
// Sets the flag indicating a mode change is allowed at this node.
// The access data tells which modes are allowed at the node. Examples
// include transit stops, bike share locations, and parking locations.
void NodeInfo::set_mode_change(const bool mc) {
mode_change_ = mc;
}
// Sets the named intersection.
void NodeInfo::set_named_intersection(const bool named) {
named_ = named;
}
// Set the traffic signal flag.
void NodeInfo::set_traffic_signal(const bool traffic_signal) {
traffic_signal_ = traffic_signal;
}
// Set the transit stop index.
void NodeInfo::set_stop_index(const uint32_t stop_index) {
transition_index_ = stop_index;
}
// Set the heading of the local edge given its local index. Supports
// up to 8 local edges. Headings are reduced to 8 bits.
void NodeInfo::set_heading(uint32_t localidx, uint32_t heading) {
if (localidx > kMaxLocalEdgeIndex) {
LOG_WARN("Local index exceeds max in set_heading, skip");
} else {
// Has to be 64 bit!
uint64_t hdg = static_cast<uint64_t>(std::round((heading % 360) * kHeadingShrinkFactor));
headings_ |= hdg << static_cast<uint64_t>(localidx * 8);
}
}
// Set the connecting way id for a transit stop.
void NodeInfo::set_connecting_wayid(const uint64_t wayid) {
headings_ = wayid;
}
json::MapPtr NodeInfo::json(const GraphTile* tile) const {
auto m = json::map({
{"lon", json::fp_t{latlng(tile->header()->base_ll()).first, 6}},
{"lat", json::fp_t{latlng(tile->header()->base_ll()).second, 6}},
{"edge_count", static_cast<uint64_t>(edge_count_)},
{"access", access_json(access_)},
{"intersection_type", to_string(static_cast<IntersectionType>(intersection_))},
{"administrative", admin_json(tile->admininfo(admin_index_), timezone_)},
{"density", static_cast<uint64_t>(density_)},
{"local_edge_count", static_cast<uint64_t>(local_edge_count_ + 1)},
{"drive_on_right", static_cast<bool>(drive_on_right_)},
{"mode_change", static_cast<bool>(mode_change_)},
{"traffic_signal", static_cast<bool>(traffic_signal_)},
{"type", to_string(static_cast<NodeType>(type_))},
{"transition count", static_cast<uint64_t>(transition_count_)},
{"named_intersection", static_cast<bool>(named_)},
});
if (is_transit()) {
m->emplace("stop_index", static_cast<uint64_t>(stop_index()));
}
return m;
}
} // namespace baldr
} // namespace valhalla
|
include
int conjs[5000][5000], ne[5000], n, i, nc, j, k, no, op, c1, c2, ele=0, el;
int main(){
scanf("%d", &n);
while(scanf("%d", &nc)!=EOF){
for(j=1;j<=nc;j++){
scanf("%d", &ne[j]);
for(k=1;k<=ne[j];k++){
scanf("%d", &el);
conjs[j][el] = 1;
}
}
scanf("%d", &no);
for(j=0;j<no;j++){
scanf("%d %d %d", &op, &c1, &c2);
if(op == 1){
for(k=1;k<62;k++){
if(conjs[c1][k]==1 && conjs[c2][k]==1){
ele = ele +1;
}
}
}
if(op == 2){
for(k=1;k<62;k++){
if(conjs[c1][k] == 1 || conjs[c2][k]== 1){
ele = ele +1;
}
}
}
printf("%d\n", ele);
ele = 0;
}
for(j=1;j<=nc;j++){
for(k=1;k<=62;k++){
conjs[j][k]=0;
}
}
}
return 0;
}
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id$
*/
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <xercesc/util/XMLUniDefs.hpp>
#include <xercesc/sax/AttributeList.hpp>
#include "SAXPrint.hpp"
// ---------------------------------------------------------------------------
// Local const data
//
// Note: This is the 'safe' way to do these strings. If you compiler supports
// L"" style strings, and portability is not a concern, you can use
// those types constants directly.
// ---------------------------------------------------------------------------
static const XMLCh gEndElement[] = { chOpenAngle, chForwardSlash, chNull };
static const XMLCh gEndPI[] = { chQuestion, chCloseAngle, chNull };
static const XMLCh gStartPI[] = { chOpenAngle, chQuestion, chNull };
static const XMLCh gXMLDecl1[] =
{
chOpenAngle, chQuestion, chLatin_x, chLatin_m, chLatin_l
, chSpace, chLatin_v, chLatin_e, chLatin_r, chLatin_s, chLatin_i
, chLatin_o, chLatin_n, chEqual, chDoubleQuote, chDigit_1, chPeriod
, chDigit_0, chDoubleQuote, chSpace, chLatin_e, chLatin_n, chLatin_c
, chLatin_o, chLatin_d, chLatin_i, chLatin_n, chLatin_g, chEqual
, chDoubleQuote, chNull
};
static const XMLCh gXMLDecl2[] =
{
chDoubleQuote, chQuestion, chCloseAngle
, chLF, chNull
};
// ---------------------------------------------------------------------------
// SAXPrintHandlers: Constructors and Destructor
// ---------------------------------------------------------------------------
SAXPrintHandlers::SAXPrintHandlers( const char* const encodingName
, const XMLFormatter::UnRepFlags unRepFlags) :
fFormatter
(
encodingName
, 0
, this
, XMLFormatter::NoEscapes
, unRepFlags
)
{
//
// Go ahead and output an XML Decl with our known encoding. This
// is not the best answer, but its the best we can do until we
// have SAX2 support.
//
fFormatter << gXMLDecl1 << fFormatter.getEncodingName() << gXMLDecl2;
}
SAXPrintHandlers::~SAXPrintHandlers()
{
}
// ---------------------------------------------------------------------------
// SAXPrintHandlers: Overrides of the output formatter target interface
// ---------------------------------------------------------------------------
void SAXPrintHandlers::writeChars(const XMLByte* const /* toWrite */)
{
}
void SAXPrintHandlers::writeChars(const XMLByte* const toWrite,
const XMLSize_t count,
XMLFormatter* const /* formatter */)
{
// For this one, just dump them to the standard output
// Surprisingly, Solaris was the only platform on which
// required the char* cast to print out the string correctly.
// Without the cast, it was printing the pointer value in hex.
// Quite annoying, considering every other platform printed
// the string with the explicit cast to char* below.
XERCES_STD_QUALIFIER cout.write((char *) toWrite, (int) count);
XERCES_STD_QUALIFIER cout.flush();
}
// ---------------------------------------------------------------------------
// SAXPrintHandlers: Overrides of the SAX ErrorHandler interface
// ---------------------------------------------------------------------------
void SAXPrintHandlers::error(const SAXParseException& e)
{
XERCES_STD_QUALIFIER cerr << "\nError at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
<< "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
}
void SAXPrintHandlers::fatalError(const SAXParseException& e)
{
XERCES_STD_QUALIFIER cerr << "\nFatal Error at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
<< "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
}
void SAXPrintHandlers::warning(const SAXParseException& e)
{
XERCES_STD_QUALIFIER cerr << "\nWarning at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
<< "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
}
// ---------------------------------------------------------------------------
// SAXPrintHandlers: Overrides of the SAX DTDHandler interface
// ---------------------------------------------------------------------------
void SAXPrintHandlers::unparsedEntityDecl(const XMLCh* const /* name */
, const XMLCh* const /* publicId */
, const XMLCh* const /* systemId */
, const XMLCh* const /* notationName */)
{
// Not used at this time
}
void SAXPrintHandlers::notationDecl(const XMLCh* const /* name */
, const XMLCh* const /* publicId */
, const XMLCh* const /* systemId */)
{
// Not used at this time
}
// ---------------------------------------------------------------------------
// SAXPrintHandlers: Overrides of the SAX DocumentHandler interface
// ---------------------------------------------------------------------------
void SAXPrintHandlers::characters(const XMLCh* const chars
, const XMLSize_t length)
{
fFormatter.formatBuf(chars, length, XMLFormatter::CharEscapes);
}
void SAXPrintHandlers::endDocument()
{
}
void SAXPrintHandlers::endElement(const XMLCh* const name)
{
// No escapes are legal here
fFormatter << XMLFormatter::NoEscapes << gEndElement << name << chCloseAngle;
}
void SAXPrintHandlers::ignorableWhitespace( const XMLCh* const chars
,const XMLSize_t length)
{
fFormatter.formatBuf(chars, length, XMLFormatter::NoEscapes);
}
void SAXPrintHandlers::processingInstruction(const XMLCh* const target
, const XMLCh* const data)
{
fFormatter << XMLFormatter::NoEscapes << gStartPI << target;
if (data)
fFormatter << chSpace << data;
fFormatter << XMLFormatter::NoEscapes << gEndPI;
}
void SAXPrintHandlers::startDocument()
{
}
void SAXPrintHandlers::startElement(const XMLCh* const name
, AttributeList& attributes)
{
// The name has to be representable without any escapes
fFormatter << XMLFormatter::NoEscapes
<< chOpenAngle << name;
XMLSize_t len = attributes.getLength();
for (XMLSize_t index = 0; index < len; index++)
{
//
// Again the name has to be completely representable. But the
// attribute can have refs and requires the attribute style
// escaping.
//
fFormatter << XMLFormatter::NoEscapes
<< chSpace << attributes.getName(index)
<< chEqual << chDoubleQuote
<< XMLFormatter::AttrEscapes
<< attributes.getValue(index)
<< XMLFormatter::NoEscapes
<< chDoubleQuote;
}
fFormatter << chCloseAngle;
}
|
/*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#include "fboss/agent/hw/bcm/BcmEgressQueueFlexCounter.h"
#include "fboss/agent/hw/bcm/BcmCosQueueCounterType.h"
#include "fboss/agent/hw/bcm/BcmCosQueueManagerUtils.h"
#include "fboss/agent/hw/bcm/BcmError.h"
#include "fboss/agent/hw/bcm/BcmSdkVer.h"
#include "fboss/agent/hw/bcm/BcmSwitch.h"
#include "fboss/agent/hw/switch_asics/HwAsic.h"
#include <thrift/lib/cpp/util/EnumUtils.h>
extern "C" {
#include <bcm/port.h>
#if (defined(IS_OPENNSA) || defined(BCM_SDK_VERSION_GTE_6_5_20))
#include <bcm/flexctr.h>
#endif
}
namespace {
constexpr auto kNumCPUReservedPorts = 1;
struct BcmGetEgressQueueFlexCounterData {
uint32_t counterID{0};
uint32_t numIndex{0};
uint8_t queueIdxMask{0};
uint8_t portIdxMask{0};
};
struct BcmGetEgressQueueFlexCounterManagerData {
BcmGetEgressQueueFlexCounterData cpu;
BcmGetEgressQueueFlexCounterData port;
};
uint8_t getMask(int value) {
// NOTE: Both numQueuesPerPort and numPorts can be 1, i.e. cpu egress queue
// flex counter only collect cpu queue stats, so there's only one port, the
// cpu port. But we still need at least one mask_size for it.
return std::max(static_cast<int>(ceil(log2(value))), 1);
}
#if defined(IS_OPENNSA) || defined(BCM_SDK_VERSION_GTE_6_5_20)
// Broadcom provided some reference code in CS00011199690 to implement the
// details of egress queue counters.
// TODO(joseph5wu) Need to ask Broadcom why using 1 here but 16 in IFP
constexpr auto kEgressQueueActionPacketOperationObj0Mask = 1;
constexpr auto kEgressQueueActionPacketOperationObj1Mask = 1;
using namespace facebook::fboss;
/*
* Since the queue stat can be queried very frequently, we use a pre-allocate
* map to store the necessary indexes and data so we don't have to allocate
* the new memory every time when calling the getStats function.
*
* NOTE: Originally, we can use the following unordered_map, whose value is
* BcmEgressQueueStatsData, in BcmEgressQueueFlexCounter class so both cpu
* and regular front panel port flex counter can use the same data structure.
* Unfortunately because bcm_flexctr_counter_value_t is not open source, so it's
* quite difficult to make the std::vector<bcm_flexctr_counter_value_t> of
* BcmEgressQueueStatsData in open source code. I've tried using void* to hide
* this vector but it causes some memory leak issue if we're not properly handle
* the vector * when we try to delete this object.
* Since Broadcom will eventually support open sourcing these apis, I decided to
* use a static value in the facebook cpp file to directly use
*`bcm_flexctr_counter_value_t`.
*/
struct BcmEgressQueueStatsData {
std::vector<uint32_t> indexes;
std::vector<bcm_flexctr_counter_value_t> data;
};
using StatsDataMap = std::unordered_map<
bcm_gport_t,
folly::Synchronized<std::optional<BcmEgressQueueStatsData>>>;
static StatsDataMap cpuStatsData;
static StatsDataMap portStatsData;
StatsDataMap& getStatsDataMap(bool isForCPU) {
return isForCPU ? cpuStatsData : portStatsData;
}
void setEgressQueueActionConfig(bcm_flexctr_action_t* action, int numIndex) {
action->flags = 0;
action->source = bcmFlexctrSourceEgrPort;
action->mode = bcmFlexctrCounterModeNormal;
// reserve resources
action->index_num = numIndex;
}
void setEgressQueueActionIndex(
bcm_flexctr_action_t* action,
int numPorts,
int numQueuesPerPort) {
// The FlexCounter index cacluation logic is:
// 1) We define two values in bcm_flexctr_index_operation_t.object array
// 1.1) object[0] is used for queue id, with
// mask = ceil(log2(numQueuesPerPort)) and shift = 0;
// 1.2) object[1] is used for local logical port id(our PortID), with
// mask = ceil(log2(numPorts)) and shift = object[0].mask
// 2) So the final index will be:
// value0 = (SEL(object0) >> shift0) & ((1 << mask_size0) - 1)).
// value1 = (SEL(object1) & ((1 << mask_size1) - 1)) << shift1.
// index = (value1 | value0).
// For example, in TH4, total number of queues of a port queue is 12, so
// mask0 = ceil(log2(12)) = 4 and the index of logical port=8, uc queue=4 will
// be 0b10000100. NOTE: UC queue comes before MC queue in SDK.
bcm_flexctr_index_operation_t* index = &(action->index_operation);
index->object[0] = bcmFlexctrObjectStaticEgrQueueNum;
index->mask_size[0] = getMask(numQueuesPerPort);
index->shift[0] = 0;
index->object[1] = bcmFlexctrObjectStaticEgrEgressPort;
index->mask_size[1] = getMask(numPorts);
index->shift[1] = index->mask_size[0];
}
/*
* The following functions are duplicated from
* BcmIngressFieldProcessorFlexCounter. Unfortunately all the bcm_ types are
* not open source yet, hence we don't have an easy way to pass in or return
* these bcm_ types.
* Once we have FlexCounter open source in the SDK, we can merge these functions
*/
void setActionPerPacketValueOperation(
bcm_flexctr_value_operation_t* operation) {
operation->select = bcmFlexctrValueSelectCounterValue;
operation->object[0] = bcmFlexctrObjectConstOne;
operation->mask_size[0] = kEgressQueueActionPacketOperationObj0Mask;
operation->shift[0] = 0;
operation->object[1] = bcmFlexctrObjectConstZero;
operation->mask_size[1] = kEgressQueueActionPacketOperationObj1Mask;
operation->shift[1] = 0;
operation->type = bcmFlexctrValueOperationTypeInc;
}
void setActionPerBytesValueOperation(bcm_flexctr_value_operation_t* operation) {
operation->select = bcmFlexctrValueSelectPacketLength;
operation->type = bcmFlexctrValueOperationTypeInc;
}
void setActionValue(bcm_flexctr_action_t* action) {
// PACKET type always use operation_a
setActionPerPacketValueOperation(&(action->operation_a));
setActionPerBytesValueOperation(&(action->operation_b));
}
uint32_t getCounterIndex(
const BcmSwitch* hw,
bcm_gport_t gPort,
cfg::StreamType streamType,
int queue,
int reservedNumQueuePerPorts) {
// Current implementation has two separate BcmEgressQueueFlexCounter for CPU
// and regular port. And we only have MC queues for CPU
if (gPort == BCM_GPORT_LOCAL_CPU) {
if (streamType != cfg::StreamType::MULTICAST) {
throw facebook::fboss::FbossError(
"CPU only uses MULTICAST queue and doesn't support ",
apache::thrift::util::enumNameSafe(streamType));
}
// For CPU queue FlexCounter, we only have one port with all multicast
// queues, so whatever the queue number is passed in this function, it will
// be the index of the queue in FlexCounter
return queue;
} else {
// For Port queue FlexCounter, we store all regular port in one FlexCounter
// refer to the comments in setEgressQueueActionIndex() above, we will use
// a fixed reservedNumQueuePerPorts to reserve #queues indexes for a port.
// And the SDK will store UC queues before MC queues
bcm_port_t localPort;
auto rv = bcm_port_local_get(hw->getUnit(), gPort, &localPort);
bcmCheckError(rv, "Can't get local port id for gPort:", gPort);
uint32_t queueIdxStart = localPort * reservedNumQueuePerPorts;
if (streamType == cfg::StreamType::UNICAST) {
return queueIdxStart + queue;
} else if (streamType == cfg::StreamType::MULTICAST) {
return queueIdxStart +
hw->getPlatform()->getAsic()->getDefaultNumPortQueues(
cfg::StreamType::UNICAST, false /*not CPU*/) +
queue;
} else {
throw FbossError(
"Port:",
localPort,
" doesn't support ",
apache::thrift::util::enumNameSafe(streamType));
}
}
}
int getEgressQueueFlexCountersCallback(
int unit,
uint32 stat_counter_id,
bcm_flexctr_action_t* action,
void* user_data) {
auto* cbUserData =
static_cast<BcmGetEgressQueueFlexCounterManagerData*>(user_data);
// Check action config and index config are using the same config we program
if (action->source != bcmFlexctrSourceEgrPort ||
action->index_operation.object[0] != bcmFlexctrObjectStaticEgrQueueNum ||
action->index_operation.object[1] !=
bcmFlexctrObjectStaticEgrEgressPort) {
return 0;
}
auto fillInCallbackData = [&](BcmGetEgressQueueFlexCounterData& data,
const std::string& name) {
if (action->index_num == data.numIndex ||
action->index_operation.mask_size[0] == data.queueIdxMask ||
action->index_operation.mask_size[1] == data.portIdxMask) {
if (data.counterID != 0) {
throw FbossError(
"Multiple Egress Queue FlexCounters for ",
name,
": ",
data.counterID,
" and ",
stat_counter_id);
} else {
data.counterID = stat_counter_id;
XLOG(DBG1) << "Found " << name
<< " Egress Queue FlexCounter:" << stat_counter_id;
}
}
};
fillInCallbackData(cbUserData->cpu, "cpu");
fillInCallbackData(cbUserData->port, "port");
return 0;
}
void detachFromHW(int unit, bcm_gport_t gPort, uint32_t counterID) {
auto rv = bcm_port_stat_detach_with_id(unit, gPort, counterID);
if (rv == BCM_E_PARAM) {
// If the counter is not attached to this port, it will return E_PARAM
return;
}
bcmCheckError(
rv,
"Failed to detach Egress Queue FlexCounter:",
counterID,
" from port:",
gPort,
" on Hardware");
XLOG(DBG1) << "Detached Egress Queue FlexCounter:" << counterID
<< " from port:" << gPort << " on Hardware";
}
#endif
} // namespace
namespace facebook::fboss {
BcmEgressQueueFlexCounter::BcmEgressQueueFlexCounter(
BcmSwitch* hw,
int numPorts,
int numQueuesPerPort,
bool isForCPU)
: BcmFlexCounter(hw->getUnit()),
hw_(hw),
numQueuesPerPort_(numQueuesPerPort),
isForCPU_(isForCPU) {
if (numPorts < 1) {
throw FbossError("Invalid numPorts:", numPorts, ", which needs to be >= 1");
}
if (numQueuesPerPort < 1) {
throw FbossError(
"Invalid numQueuesPerPort:",
numQueuesPerPort,
", which needs to be >= 1");
}
#if defined(IS_OPENNSA) || defined(BCM_SDK_VERSION_GTE_6_5_20)
// With FlexCounter feature in the new SDK, we can create one counter for all
// queues of ports or cpu. Technically we can create one flex counter for each
// port, but this doesn't utilize the new FlexCounter mechanism thoroughly.
// NOTE: The following implementation follows SDK example:
// examples/xgs/tomahawk4/flexctr/th4_hsdk_flexctr_egr_port_queue.c
bcm_flexctr_action_t action;
bcm_flexctr_action_t_init(&action);
// set counter action index
setEgressQueueActionIndex(&action, numPorts, numQueuesPerPort);
// Because of the index design in FlexCounter, the reserved number of queues
// per port will be the power of 2, which can be greater than numQueuesPerPort
// And we need to use reservedNumQueuesPerPort_ to caculate the index of
// queue for a port. More details in setEgressQueueActionIndex() comments.
reservedNumQueuesPerPort_ = pow(2, action.index_operation.mask_size[0]);
// Since we will only create this flex counter once, we have to reserve all
// queues for all logical ports + cpu. In this way, we will always know the
// exact index for a specific queue of a specific port. And we don't need to
// consider the case that we add/remove a port and change the order.
int totalIndexes = numPorts * reservedNumQueuesPerPort_;
// set counter action config
setEgressQueueActionConfig(&action, totalIndexes);
// set counter action value
setActionValue(&action);
auto rv =
bcm_flexctr_action_create(unit_, 0 /* 0 options */, &action, &counterID_);
bcmCheckError(
rv,
"Failed to create Egress Queue FlexCounter for total index num:",
totalIndexes);
XLOG(DBG1) << "Successfully created Egress Queue FlexCounter:" << counterID_
<< " for total index num:" << totalIndexes;
#if !defined(IS_OPENNSA) && defined(BCM_SDK_VERSION_GTE_6_5_22)
if (!isForCPU_) {
rv = bcm_pktio_txpmd_stat_attach(unit_, counterID_);
bcmCheckError(
rv,
"Failed to attach egress queue flex counter to SOBMH packets sent from control plane");
}
#endif
#else
throw FbossError(
"Current SDK version doesn't support creating Egress Queue FlexCounter");
#endif
}
BcmEgressQueueFlexCounter::BcmEgressQueueFlexCounter(
BcmSwitch* hw,
uint32_t counterID,
int numQueuesPerPort,
int reservedNumQueuesPerPort,
bool isForCPU)
: BcmFlexCounter(hw->getUnit(), counterID),
hw_(hw),
numQueuesPerPort_(numQueuesPerPort),
reservedNumQueuesPerPort_(reservedNumQueuesPerPort),
isForCPU_(isForCPU) {}
BcmEgressQueueFlexCounter::~BcmEgressQueueFlexCounter() {
#if defined(IS_OPENNSA) || defined(BCM_SDK_VERSION_GTE_6_5_20)
// Unfortunately Brcm SDK is not able to provide an api to return the attached
// ports of a specific flex counter, and our statsDataMap is only populated
// after we call the attach() function during BcmPort initialization.
// But sometimes, our code might hit some issues before we finish BcmPort
// initialization and have to call BcmSwitch::resetTables(). In such case,
// statsDataMap might be empty but in HW, some ports are still attached to
// this counter and eventually agent will crash because we're trying to delete
// such counter before detach all ports first.
bcm_port_config_t pcfg;
bcm_port_config_t_init(&pcfg);
auto rv = bcm_port_config_get(unit_, &pcfg);
bcmCheckError(rv, "failed to get port configuration");
bcm_port_t idx;
bcm_gport_t gPort;
BCM_PBMP_ITER(isForCPU_ ? pcfg.cpu : pcfg.port, idx) {
rv = bcm_port_gport_get(hw_->getUnit(), idx, &gPort);
bcmCheckError(rv, "Failed to get gport for BCM port ", idx);
detachFromHW(hw_->getUnit(), gPort, counterID_);
}
#if !defined(IS_OPENNSA) && defined(BCM_SDK_VERSION_GTE_6_5_22)
if (!isForCPU_) {
rv = bcm_pktio_txpmd_stat_detach(hw_->getUnit());
bcmCheckError(
rv, "Failed to detach egress queue flex counter from SOBMH packets");
}
#endif
#endif
}
void BcmEgressQueueFlexCounter::attach(bcm_gport_t gPort) {
#if defined(IS_OPENNSA) || defined(BCM_SDK_VERSION_GTE_6_5_20)
// It's safe to call the attach function even if the counter is already
// attached to the port. Always call atach function here, so we can always
// make sure the flex counter is attached in HW
auto rv = bcm_port_stat_attach(hw_->getUnit(), gPort, counterID_);
bcmCheckError(
rv,
"Failed to attach Egress Queue FlexCounter:",
counterID_,
" to port:",
gPort);
// Always update the statsData when attach is called to make sure the cache
// in statsDataMap has the latest queue settings.
BcmEgressQueueStatsData statsData;
auto prepareStatData = [&](int totalQueue, cfg::StreamType streamType) {
for (int queue = 0; queue < totalQueue; queue++) {
statsData.indexes.push_back(getCounterIndex(
hw_, gPort, streamType, queue, reservedNumQueuesPerPort_));
bcm_flexctr_counter_value_t values{};
statsData.data.push_back(values);
}
};
if (gPort == BCM_GPORT_LOCAL_CPU) {
prepareStatData(numQueuesPerPort_, cfg::StreamType::MULTICAST);
} else {
// First handle UC queues
const auto* asic = hw_->getPlatform()->getAsic();
prepareStatData(
asic->getDefaultNumPortQueues(
cfg::StreamType::UNICAST, false /*not CPU*/),
cfg::StreamType::UNICAST);
prepareStatData(
asic->getDefaultNumPortQueues(
cfg::StreamType::MULTICAST, false /*not CPU*/),
cfg::StreamType::MULTICAST);
}
// Now try to get the lock to update the Syncronized object
auto& statsDataMap = getStatsDataMap(isForCPU_);
auto cachedPortIt = statsDataMap.find(gPort);
if (cachedPortIt == statsDataMap.end()) {
statsDataMap.emplace(gPort, statsData);
XLOG(DBG2) << "First time attach EgressQueueFlexCounter:" << counterID_
<< " to port:" << gPort;
} else {
auto wLockedCache = cachedPortIt->second.wlock();
*wLockedCache = statsData;
XLOG(DBG2) << "Attached EgressQueue FlexCounter:" << counterID_
<< " to port:" << gPort;
}
#else
throw FbossError(
"Current SDK version doesn't support ",
"attach Egress Queue FlexCounter to port:",
gPort);
#endif
}
void BcmEgressQueueFlexCounter::detach(bcm_gport_t gPort) {
#if defined(IS_OPENNSA) || defined(BCM_SDK_VERSION_GTE_6_5_20)
auto& statsDataMap = getStatsDataMap(isForCPU_);
auto cachedPortIt = statsDataMap.find(gPort);
if (cachedPortIt == statsDataMap.end()) {
// It's safe to call the detach function even if the counter is not attached
// to the port. Always call detach function here, so we can always make sure
// the flex counter is detached in HW
detachFromHW(hw_->getUnit(), gPort, counterID_);
XLOG(DBG2) << "Trying to detach EgressQueue FlexCounter:" << counterID_
<< ", which is already detached from port:" << gPort;
} else {
// If the port already exists in statsDataMap, we need to fetch the wlock
// before actually detaching from HW
auto wLockedCache = cachedPortIt->second.wlock();
detachFromHW(hw_->getUnit(), gPort, counterID_);
// Instead of removing from the map, which might need a map level lock in
// order to make sure the getStats() won't try to access the iterator while
// it's in the process of detaching the flex counter, use std::optional as
// the value of this port level Synchorized.
*wLockedCache = std::nullopt;
XLOG(DBG2) << "Detached EgressQueue FlexCounter:" << counterID_
<< " from port:" << gPort;
}
#else
throw FbossError(
"Current SDK version doesn't support ",
"detach Egress Queue FlexCounter from port:",
gPort);
#endif
}
void BcmEgressQueueFlexCounter::getStats(
bcm_gport_t gPort,
[[maybe_unused]] BcmEgressQueueTrafficCounterStats& stats) {
#if defined(IS_OPENNSA) || defined(BCM_SDK_VERSION_GTE_6_5_20)
auto& statsDataMap = getStatsDataMap(isForCPU_);
auto statDataItr = statsDataMap.find(gPort);
if (statDataItr == statsDataMap.end()) {
XLOG(WARN) << "Can't get queue stats before attaching FlexCounter to port:"
<< gPort << ", skip getStats()";
return;
}
auto queuesStatData = statDataItr->second.wlock();
if (!queuesStatData->has_value()) {
// The port might be disabled recently
XLOG(WARN) << "Can't get queue stats before attaching FlexCounter to port:"
<< gPort << ", skip getStats()";
return;
}
auto rv = bcm_flexctr_stat_get(
hw_->getUnit(),
counterID_,
(*queuesStatData)->indexes.size(),
(*queuesStatData)->indexes.data(),
(*queuesStatData)->data.data());
bcmCheckError(
rv,
"Failed to get Egress Queue FlexCounter stats for port:",
gPort,
", #queues:",
(*queuesStatData)->indexes.size());
int frontPanelUcQueueNum =
hw_->getPlatform()->getAsic()->getDefaultNumPortQueues(
cfg::StreamType::UNICAST, false /*not CPU*/);
auto updateStatData =
[&](int startIndex, int endIndex, cfg::StreamType streamType) {
for (int queue = startIndex; queue <= endIndex; queue++) {
// Because regular port queue has both UC and MC queues, and the SDK
// put MC queue index immediately after UC queues, we need to subtract
// ucQueueNum to make sure we can get the MC queue id starting from 0
int queueIdInQueueStats = (gPort != BCM_GPORT_LOCAL_CPU &&
streamType == cfg::StreamType::MULTICAST)
? queue - frontPanelUcQueueNum
: queue;
// Only update the queue stats if it's asked
if (auto queueStatsItr = stats[streamType].find(queueIdInQueueStats);
queueStatsItr != stats[streamType].end()) {
queueStatsItr->second[cfg::CounterType::PACKETS] =
(*queuesStatData)->data[queue].value[0];
queueStatsItr->second[cfg::CounterType::BYTES] =
(*queuesStatData)->data[queue].value[1];
}
}
};
if (gPort == BCM_GPORT_LOCAL_CPU) {
updateStatData(
0, (*queuesStatData)->indexes.size() - 1, cfg::StreamType::MULTICAST);
} else {
updateStatData(0, frontPanelUcQueueNum - 1, cfg::StreamType::UNICAST);
updateStatData(
frontPanelUcQueueNum,
(*queuesStatData)->indexes.size() - 1,
cfg::StreamType::MULTICAST);
}
#else
throw FbossError(
"Current SDK version doesn't support ",
"get Egress Queue FlexCounter stats for port:",
gPort);
#endif
}
bool BcmEgressQueueFlexCounter::isSupported(BcmCosQueueStatType type) {
return type == BcmCosQueueStatType::OUT_PACKETS ||
type == BcmCosQueueStatType::OUT_BYTES;
}
BcmEgressQueueFlexCounterManager::BcmEgressQueueFlexCounterManager(
BcmSwitch* hw) {
int numCPUQueues = utility::getMaxCPUQueueSize(hw->getUnit());
// Usually we only care about UC queue for regular ports, but to make sure
// we can support collecting MC queue counters in the future, we create
// a FlexCounter for both types queues.
auto* asic = hw->getPlatform()->getAsic();
int numQueuesPerPort = asic->getDefaultNumPortQueues(
cfg::StreamType::UNICAST, false /*non CPU*/) +
asic->getDefaultNumPortQueues(
cfg::StreamType::MULTICAST, false /*non CPU*/);
int numPorts = asic->getMaxNumLogicalPorts();
// Currently there's not a straightforward way to find the flex counter id
// from cpu or regular ports, so we have to use traverse callback to get
// Egress Queue FlexCounter from the hardware. In this way, we won't create
// a duplicated flexcounter during warm boot.
// NOTE: both cpu or regular port can only have one attached flex counter.
auto setupFlexCounterData = [](BcmGetEgressQueueFlexCounterData& data,
int nPorts,
int nQueuesPerPort) {
data.numIndex = nPorts * nQueuesPerPort;
data.queueIdxMask = getMask(nQueuesPerPort);
data.portIdxMask = getMask(nPorts);
};
BcmGetEgressQueueFlexCounterManagerData userData;
setupFlexCounterData(userData.cpu, kNumCPUReservedPorts, numCPUQueues);
setupFlexCounterData(userData.port, numPorts, numQueuesPerPort);
#if defined(IS_OPENNSA) || defined(BCM_SDK_VERSION_GTE_6_5_20)
auto rv = bcm_flexctr_action_traverse(
hw->getUnit(),
&getEgressQueueFlexCountersCallback,
static_cast<void*>(&userData));
bcmCheckError(rv, "Failed to traverse flex counters for Egress Queue");
#endif
// Create a BcmEgressQueueFlexCounter only for cpu
if (userData.cpu.counterID == 0) {
// Create a new CPU Egress Queue FlexCounter
cpuQueueFlexCounter_ = std::make_unique<BcmEgressQueueFlexCounter>(
hw, kNumCPUReservedPorts, numCPUQueues, true);
} else {
cpuQueueFlexCounter_ = std::make_unique<BcmEgressQueueFlexCounter>(
hw,
userData.cpu.counterID,
numCPUQueues,
pow(2, userData.cpu.queueIdxMask),
true);
}
// Create a BcmEgressQueueFlexCounter for all regular ports
if (userData.port.counterID == 0) {
// Create a new Port Egress Queue FlexCounter
portQueueFlexCounter_ = std::make_unique<BcmEgressQueueFlexCounter>(
hw, numPorts, numQueuesPerPort);
} else {
portQueueFlexCounter_ = std::make_unique<BcmEgressQueueFlexCounter>(
hw,
userData.port.counterID,
numQueuesPerPort,
pow(2, userData.port.queueIdxMask));
}
}
} // namespace facebook::fboss
|
#include<bits/stdc++.h>
using namespace std;
int facto(int a){
if(a<=1){
return 1;
}
return facto(a-1)*a;
}
int main(){
cout<<facto(5);
}
|
#include "httpServe.hpp"
Cache baseCache;
Cache& HttpServe::cache_ = baseCache;
int HttpServe::epollfd_ = -1;
const char HttpServe::rootDir_[] = "./";
const char HttpServe::homePage_[] = "index.html";
void HttpServe::init(int sockfd){
sockfd_ = sockfd; // 记录下连接的socket
int reuse = 1;
Setsockopt(sockfd_, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)); // 设置端口重用
reset();
}
void HttpServe::reset(){
nRead_ = 0;
nChecked_ = 0;
nStored_ = 0;
keepAlive_ = false;
sendFile_ = false;
written_ = 0;
setState(kRead); // 需要读数据
memset(readBuf_, 0, READ_BUFFER_SIZE);
memset(writeBuf_, 0, WRITE_BUFFER_SIZE);
}
void HttpServe::readRequestHdrs(){
char buf[MAXLINE];
getLine(buf, MAXLINE);
while (strcmp(buf, "\0")) {
getLine(buf, MAXLINE);
if (strstr(buf, "keep-alive")) {
keepAlive_ = true; // 保持连接
}
}
int n = (strstr(readBuf_, "\r\n\r\n") - readBuf_) + 4;
for(int i = n, j = 0; i < strlen(readBuf_); i++, j++){
postDataBuf_[j] = readBuf_[i];
}
return;
}
int HttpServe::parseUri(char *uri, char *filename, char *cgiargs){
char *ptr;
std::cout<<uri<<std::endl;
if (strstr(uri, "/")) {
strcpy(cgiargs, "");
strcpy(filename, rootDir_);
strcat(filename, uri);
if (uri[strlen(uri) - 1] == '/')
strcat(filename, homePage_);
if (strstr(uri, "/succes.html"))
strcat(filename, homePage_);
if (strstr(uri, "/wrong.html"))
strcat(filename, homePage_);
return 1;
}
else {
// Dynamic content
ptr = index(uri, '?');
if (ptr) {
strcpy(cgiargs, ptr + 1);
*ptr = '\0';
}
else{
strcpy(cgiargs, "");
}
strcpy(filename, ".");
strcat(filename, uri);
return 0;
}
}
int HttpServe::getLine(char *buf, int maxsize) {
int n; // 用于记录读取的字节的数目
for (n = 0; nChecked_ < nRead_;n++) {
*buf++ = readBuf_[nChecked_];
if (readBuf_[nChecked_++] == '\n'){
break;
}
}
*buf = 0;
return n;
}
bool HttpServe::read(){
//参数清零
nRead_ = 0;
nChecked_ = 0;
if (nRead_ >= READ_BUFFER_SIZE) {
return false;
}
int byte_read = 0;
while (true) {
byte_read = recv(sockfd_, readBuf_ + nRead_, READ_BUFFER_SIZE - nRead_, 0);
if (byte_read == -1) { //出错
if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) {
break; //读取完毕
}
return false; // 出错
}
else if (byte_read == 0) { //对方关闭连接
return false;
}
nRead_ += byte_read;
}
return true;
}
void HttpServe::process(){
int res;
switch (state_){
case kRead: {
res = processRead();
if (res == STATUS_WRITE)
modfd(epollfd_, sockfd_, EPOLLOUT);
else
removefd(epollfd_, sockfd_);
break;
}
case kWrite: {
res = processWrite();
if (res == STATUS_READ)
modfd(epollfd_, sockfd_, EPOLLIN);
else
removefd(epollfd_, sockfd_);
break;
}
default:
removefd(epollfd_, sockfd_);
break;
}
}
int HttpServe::processRead(){
int is_static;
struct stat sbuf;
char buf[MAXLINE], method[MAXLINE], uri[MAXLINE], version[MAXLINE], filename[MAXLINE], cgiargs[MAXLINE], line[MAXLINE];
if ((false == read()) || (nRead_ == 0)) {
//对方关闭连接
return STATUS_CLOSE;
}
//解析读入的数据
getLine(line, MAXLINE); //读取一行数据
sscanf(line, "%s %s %s", method, uri, version);
if ( strcasecmp(method, "GET")) {
if ( strcasecmp(method, "POST") ) {
sendErrorMsg(method, "501", "Not Implemented","Server does not implement this method");
goto end;
}
}
readRequestHdrs(); // 处理剩余的请求头部
//简易处理登录请求
if(!strcasecmp(method, "POST")){
char *flag1 = strstr(postDataBuf_,"username=1234");
char *flag2 = strstr(postDataBuf_,"password=1234");
if(flag1 != NULL && flag2 != NULL && strlen(postDataBuf_) == 27){
memset(filename, 0, MAXLINE);
strcpy(filename, rootDir_);
strcat(filename, "/succes.html");
stat(filename, &sbuf);
serveStatic(filename, sbuf.st_size);
goto end;
}
else{
memset(filename, 0, MAXLINE);
strcpy(filename, rootDir_);
strcat(filename, "/wrong.html");
stat(filename, &sbuf);
serveStatic(filename, sbuf.st_size);
goto end;
}
}
is_static = parseUri(uri, filename, cgiargs);
if (stat(filename, &sbuf) < 0) {
sendErrorMsg(filename, "404", "Not found","Server couldn't find this file"); // 没有找到文件
goto end;
}
if (is_static) {
//静态页面处理
if (!(S_ISREG(sbuf.st_mode)) || !(S_IRUSR & sbuf.st_mode)) {
sendErrorMsg(filename, "403", "Forbidden","Server couldn't read the file"); // 权限不够
goto end;
}
serveStatic(filename, sbuf.st_size);
}
else {
//动态页面处理,未完成,直接返回错误
sendErrorMsg(method, "501", "Not Implemented","Server does not implement this method");
goto end;
}
end:
setState(kWrite);
return processWrite();
}
int HttpServe::processWrite(){
int res;
//数据作为两部分发送,第1步,要发送writeBuf_里面的数据.
size_t nRemain = strlen(writeBuf_) - written_; // writeBuf_中还有多少字节要写
if (nRemain > 0) {
while (1) {
nRemain = strlen(writeBuf_) - written_;
res = write(sockfd_, writeBuf_ + written_, nRemain);
if (res < 0) {
if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) { // 资源暂时不可用
setState(kWrite); // 下一步写数据
return STATUS_WRITE;
}
setState(kError);
return STATUS_ERROR;
}
written_ += res;
if (written_ == strlen(writeBuf_)){
break;
}
}
}
// 第2步,要发送网页数据.
if (sendFile_) {
assert(fileInfo_);
size_t bytesToSend = fileInfo_->size_ + strlen(writeBuf_); // 总共需要发送的字节数目
char *fileAddr = (char *)fileInfo_->addr_;
size_t fileSize = fileInfo_->size_;
while (true) {
size_t offset = written_ - strlen(writeBuf_);
res = write(sockfd_, fileAddr + offset, fileSize - offset); // 发送
if (res < 0) {
if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) { // 资源暂时不可用
setState(kWrite); // 下一步需要写数据st_mode
return STATUS_WRITE;
}
setState(kError); // 出现了错误
return STATUS_ERROR;
}
written_ += res;
if (written_ == bytesToSend)
break;
}
}
if (keepAlive_) {
reset();
return STATUS_READ;
}
else {
reset();
return STATUS_SUCCESS;
}
}
void HttpServe::getFileType(char *filename, char *filetype){
if (strstr(filename, ".html"))
strcpy(filetype, "text/html");
else if (strstr(filename, ".gif"))
strcpy(filetype, "image/gif");
else if (strstr(filename, ".jpg"))
strcpy(filetype, "image/jpeg");
else if (strstr(filename, ".ico"))
strcpy(filetype, "image/ico");
else if (strstr(filename, ".png"))
strcpy(filetype, "image/png");
else if (strstr(filename, ".css"))
strcpy(filetype, "text/css");
else if (strstr(filename, ".ts"))
strcpy(filetype, "video/mp2t");
else if (strstr(filename, ".m3u8"))
strcpy(filetype, "application/x-mpegurl");
else if (strstr(filename, ".ttf") || strstr(filename, ".otf"))
strcpy(filetype, "application/octet-stream");
else
strcpy(filetype, "text/plain");
}
void HttpServe::serveStatic(char *fileName, size_t fileSize){
int srcfd;
char fileType[MAXLINE], buf[MAXBUF];
getFileType(fileName, fileType);
if(keepAlive_){
sprintf(buf, "HTTP/1.1 200 OK\r\n");
}
else{
sprintf(buf, "HTTP/1.0 200 OK\r\n");
}
sprintf(buf, "%sServer: Tinoryj Web Server\r\n", buf);
sprintf(buf, "%sContent-length: %d\r\n", buf, fileSize);
sprintf(buf, "%sContent-type: %s\r\n\r\n", buf, fileType);
addResponse(buf);
cache_.getFileAddr(fileName, fileSize, fileInfo_); // 添加文件
sendFile_ = true;
}
void HttpServe::serveDynamic(char *text, int len){
int srcfd;
char buf[MAXBUF];
if(keepAlive_){
sprintf(buf, "HTTP/1.1 200 OK\r\n");
}
else{
sprintf(buf, "HTTP/1.0 200 OK\r\n");
}
sprintf(buf, "%sServer: Tinoryj Web Server\r\n", buf);
sprintf(buf, "%sContent-length: %d\r\n", buf);
sprintf(buf, "%sContent-type: text/plain\r\n\r\n%s", buf, text);
addResponse(buf);
}
void HttpServe::sendErrorMsg(char *cause, char *errnum, char *shortmsg, char *longmsg){
char buf[MAXLINE], body[MAXBUF];
sprintf(body, "<html><title>Server Error: %s</title>",errnum);
sprintf(body, "%s<body bgcolor=""6ca6cd"">\r\n", body);
sprintf(body, "%s<center><h1>%s: %s</h1></center>\r\n", body, errnum, shortmsg);
sprintf(body, "%s<p><center>%s: %s</center>\r\n", body, longmsg, cause);
sprintf(body, "%s<hr><em><center>Tinoryj Web Server</center></em>\r\n", body);
if(keepAlive_){
addResponse("HTTP/1.1 %s %s\r\n", errnum, shortmsg);
}
else{
addResponse("HTTP/1.0 %s %s\r\n", errnum, shortmsg);
}
addResponse("Content-type: text/html\r\n");
addResponse("Content-length: %d\r\n\r\n", (int)strlen(body));
addResponse("%s", body);
}
bool HttpServe::addResponse(char* const str){
int len = strlen(str);
if ((nStored_ >= WRITE_BUFFER_SIZE) || (nStored_ + len >= WRITE_BUFFER_SIZE)){
return false;
}
strncpy(writeBuf_ + nStored_, str, len); // 拷贝len个字符
nStored_ += len; // nStored_是写缓冲区的末尾
return true;
}
bool HttpServe::addResponse(const char* format, ...){
if (nStored_ >= WRITE_BUFFER_SIZE){
return false;
}
va_list arg_list;
va_start(arg_list, format);
int len = vsnprintf(writeBuf_ + nStored_, WRITE_BUFFER_SIZE - 1 - nStored_, format, arg_list);
if (len >= (WRITE_BUFFER_SIZE - 1 - nStored_)){
return false;
}
nStored_ += len;
va_end(arg_list);
return true;
}
|
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#include "Backend.h"
#include "Language/JavascriptFunctionArgIndex.h"
const Js::OpCode LowererMD::MDUncondBranchOpcode = Js::OpCode::B;
const Js::OpCode LowererMD::MDMultiBranchOpcode = Js::OpCode::BR;
const Js::OpCode LowererMD::MDTestOpcode = Js::OpCode::TST;
const Js::OpCode LowererMD::MDOrOpcode = Js::OpCode::ORR;
const Js::OpCode LowererMD::MDXorOpcode = Js::OpCode::EOR;
const Js::OpCode LowererMD::MDOverflowBranchOpcode = Js::OpCode::BVS;
const Js::OpCode LowererMD::MDNotOverflowBranchOpcode = Js::OpCode::BVC;
const Js::OpCode LowererMD::MDConvertFloat32ToFloat64Opcode = Js::OpCode::FCVT;
const Js::OpCode LowererMD::MDConvertFloat64ToFloat32Opcode = Js::OpCode::FCVT;
const Js::OpCode LowererMD::MDCallOpcode = Js::OpCode::Call;
const Js::OpCode LowererMD::MDImulOpcode = Js::OpCode::MUL;
const Js::OpCode LowererMD::MDLea = Js::OpCode::LEA;
template<typename T>
inline void Swap(T& x, T& y)
{
T temp = x;
x = y;
y = temp;
}
// Static utility fn()
//
bool
LowererMD::IsAssign(const IR::Instr *instr)
{
return (instr->m_opcode == Js::OpCode::MOV ||
instr->m_opcode == Js::OpCode::FMOV ||
instr->m_opcode == Js::OpCode::LDIMM ||
instr->m_opcode == Js::OpCode::LDR ||
instr->m_opcode == Js::OpCode::LDRS ||
instr->m_opcode == Js::OpCode::FLDR ||
instr->m_opcode == Js::OpCode::STR ||
instr->m_opcode == Js::OpCode::FSTR);
}
///----------------------------------------------------------------------------
///
/// LowererMD::IsCall
///
///----------------------------------------------------------------------------
bool
LowererMD::IsCall(const IR::Instr *instr)
{
return (instr->m_opcode == Js::OpCode::BL ||
instr->m_opcode == Js::OpCode::BLR);
}
///----------------------------------------------------------------------------
///
/// LowererMD::IsIndirectBranch
///
///----------------------------------------------------------------------------
bool
LowererMD::IsIndirectBranch(const IR::Instr *instr)
{
return (instr->m_opcode == Js::OpCode::BR);
}
///----------------------------------------------------------------------------
///
/// LowererMD::IsUnconditionalBranch
///
///----------------------------------------------------------------------------
bool
LowererMD::IsUnconditionalBranch(const IR::Instr *instr)
{
return (instr->m_opcode == Js::OpCode::B ||
instr->m_opcode == Js::OpCode::BR);
}
bool
LowererMD::IsReturnInstr(const IR::Instr *instr)
{
return instr->m_opcode == Js::OpCode::RET;
}
///----------------------------------------------------------------------------
///
/// LowererMD::InvertBranch
///
///----------------------------------------------------------------------------
void
LowererMD::InvertBranch(IR::BranchInstr *branchInstr)
{
switch (branchInstr->m_opcode)
{
case Js::OpCode::BEQ:
branchInstr->m_opcode = Js::OpCode::BNE;
break;
case Js::OpCode::BNE:
branchInstr->m_opcode = Js::OpCode::BEQ;
break;
case Js::OpCode::BGE:
branchInstr->m_opcode = Js::OpCode::BLT;
break;
case Js::OpCode::BGT:
branchInstr->m_opcode = Js::OpCode::BLE;
break;
case Js::OpCode::BLT:
branchInstr->m_opcode = Js::OpCode::BGE;
break;
case Js::OpCode::BLE:
branchInstr->m_opcode = Js::OpCode::BGT;
break;
case Js::OpCode::BCS:
branchInstr->m_opcode = Js::OpCode::BCC;
break;
case Js::OpCode::BCC:
branchInstr->m_opcode = Js::OpCode::BCS;
break;
case Js::OpCode::BMI:
branchInstr->m_opcode = Js::OpCode::BPL;
break;
case Js::OpCode::BPL:
branchInstr->m_opcode = Js::OpCode::BMI;
break;
case Js::OpCode::BVS:
branchInstr->m_opcode = Js::OpCode::BVC;
break;
case Js::OpCode::BVC:
branchInstr->m_opcode = Js::OpCode::BVS;
break;
case Js::OpCode::BLS:
branchInstr->m_opcode = Js::OpCode::BHI;
break;
case Js::OpCode::BHI:
branchInstr->m_opcode = Js::OpCode::BLS;
break;
case Js::OpCode::CBZ:
branchInstr->m_opcode = Js::OpCode::CBNZ;
break;
case Js::OpCode::CBNZ:
branchInstr->m_opcode = Js::OpCode::CBZ;
break;
case Js::OpCode::TBZ:
branchInstr->m_opcode = Js::OpCode::TBNZ;
break;
case Js::OpCode::TBNZ:
branchInstr->m_opcode = Js::OpCode::TBZ;
break;
default:
AssertMsg(UNREACHED, "B missing in InvertBranch()");
}
}
Js::OpCode
LowererMD::MDConvertFloat64ToInt32Opcode(const RoundMode roundMode)
{
switch (roundMode)
{
case RoundModeTowardZero:
return Js::OpCode::FCVTZ;
case RoundModeTowardInteger:
return Js::OpCode::Nop;
case RoundModeHalfToEven:
return Js::OpCode::FCVTN;
default:
AssertMsg(0, "RoundMode has no MD mapping.");
return Js::OpCode::Nop;
}
}
// GenerateMemRef: Return an opnd that can be used to access the given address.
// ARM can't encode direct accesses to physical addresses, so put the address in a register
// and return an indir. (This facilitates re-use of the loaded address without having to re-load it.)
IR::Opnd *
LowererMD::GenerateMemRef(intptr_t addr, IRType type, IR::Instr *instr, bool dontEncode)
{
IR::RegOpnd *baseOpnd = IR::RegOpnd::New(TyMachReg, this->m_func);
IR::AddrOpnd *addrOpnd = IR::AddrOpnd::New(addr, IR::AddrOpndKindDynamicMisc, this->m_func, dontEncode);
Lowerer::InsertMove(baseOpnd, addrOpnd, instr);
return IR::IndirOpnd::New(baseOpnd, 0, type, this->m_func);
}
void
LowererMD::FlipHelperCallArgsOrder()
{
int left = 0;
int right = helperCallArgsCount - 1;
while (left < right)
{
IR::Opnd *tempOpnd = helperCallArgs[left];
helperCallArgs[left] = helperCallArgs[right];
helperCallArgs[right] = tempOpnd;
left++;
right--;
}
}
IR::Instr *
LowererMD::LowerCallHelper(IR::Instr *instrCall)
{
IR::Opnd *argOpnd = instrCall->UnlinkSrc2();
IR::Instr *prevInstr = instrCall;
IR::JnHelperMethod helperMethod = instrCall->GetSrc1()->AsHelperCallOpnd()->m_fnHelper;
instrCall->FreeSrc1();
while (argOpnd)
{
Assert(argOpnd->IsRegOpnd());
IR::RegOpnd *regArg = argOpnd->AsRegOpnd();
Assert(regArg->m_sym->m_isSingleDef);
IR::Instr *instrArg = regArg->m_sym->m_instrDef;
Assert(instrArg->m_opcode == Js::OpCode::ArgOut_A ||
(helperMethod == IR::JnHelperMethod::HelperOP_InitCachedScope && instrArg->m_opcode == Js::OpCode::ExtendArg_A));
prevInstr = this->LoadHelperArgument(prevInstr, instrArg->GetSrc1());
argOpnd = instrArg->GetSrc2();
if (instrArg->m_opcode == Js::OpCode::ArgOut_A)
{
instrArg->UnlinkSrc1();
if (argOpnd)
{
instrArg->UnlinkSrc2();
}
regArg->Free(this->m_func);
instrArg->Remove();
}
}
this->m_lowerer->LoadScriptContext(instrCall);
this->FlipHelperCallArgsOrder();
return this->ChangeToHelperCall(instrCall, helperMethod);
}
// Lower a call: May be either helper or native JS call. Just set the opcode, and
// put the result into the return register. (No stack adjustment required.)
IR::Instr *
LowererMD::LowerCall(IR::Instr * callInstr, Js::ArgSlot argCount)
{
IR::Instr *retInstr = callInstr;
IR::Opnd *targetOpnd = callInstr->GetSrc1();
AssertMsg(targetOpnd, "Call without a target?");
// This is required here due to calls created during lowering
callInstr->m_func->SetHasCallsOnSelfAndParents();
if (targetOpnd->IsRegOpnd())
{
// Indirect call
callInstr->m_opcode = Js::OpCode::BLR;
}
else
{
AssertMsg(targetOpnd->IsHelperCallOpnd(), "Why haven't we loaded the call target?");
// Direct call
//
// load the address into a register because we cannot directly access more than 24 bit constants
// in BL instruction. Non helper call methods will already be accessed indirectly.
//
// Skip this for bailout calls. The register allocator will lower that as appropriate, without affecting spill choices.
if (!callInstr->HasBailOutInfo())
{
IR::RegOpnd *regOpnd = IR::RegOpnd::New(nullptr, RegLR, TyMachPtr, this->m_func);
IR::Instr *movInstr = IR::Instr::New(Js::OpCode::LDIMM, regOpnd, callInstr->UnlinkSrc1(), this->m_func);
regOpnd->m_isCallArg = true;
callInstr->SetSrc1(regOpnd);
callInstr->InsertBefore(movInstr);
}
callInstr->m_opcode = Js::OpCode::BLR;
}
IR::Opnd *dstOpnd = callInstr->GetDst();
if (dstOpnd)
{
Js::OpCode assignOp;
RegNum returnReg;
if(dstOpnd->IsFloat64())
{
assignOp = Js::OpCode::FMOV;
returnReg = RETURN_DBL_REG;
}
else
{
assignOp = Js::OpCode::MOV;
returnReg = RETURN_REG;
if (callInstr->GetSrc1()->IsHelperCallOpnd())
{
// Truncate the result of a conversion to 32-bit int, because the C++ code doesn't.
IR::HelperCallOpnd *helperOpnd = callInstr->GetSrc1()->AsHelperCallOpnd();
if (helperOpnd->m_fnHelper == IR::HelperConv_ToInt32 ||
helperOpnd->m_fnHelper == IR::HelperConv_ToInt32_Full ||
helperOpnd->m_fnHelper == IR::HelperConv_ToInt32Core ||
helperOpnd->m_fnHelper == IR::HelperConv_ToUInt32 ||
helperOpnd->m_fnHelper == IR::HelperConv_ToUInt32_Full ||
helperOpnd->m_fnHelper == IR::HelperConv_ToUInt32Core)
{
assignOp = Js::OpCode::MOV_TRUNC;
}
}
}
IR::Instr * movInstr = callInstr->SinkDst(assignOp);
callInstr->GetDst()->AsRegOpnd()->SetReg(returnReg);
movInstr->GetSrc1()->AsRegOpnd()->SetReg(returnReg);
retInstr = movInstr;
Legalize(retInstr);
}
//
// assign the arguments to appropriate positions
//
AssertMsg(this->helperCallArgsCount >= 0, "Fatal. helper call arguments ought to be positive");
AssertMsg(this->helperCallArgsCount <= MaxArgumentsToHelper, "Too many helper call arguments");
uint16 argsLeft = this->helperCallArgsCount;
uint16 doubleArgsLeft = this->helperCallDoubleArgsCount;
uint16 intArgsLeft = argsLeft - doubleArgsLeft;
while(argsLeft > 0)
{
IR::Opnd *helperArgOpnd = this->helperCallArgs[this->helperCallArgsCount - argsLeft];
IR::Opnd * opndParam = nullptr;
if (helperArgOpnd->IsFloat())
{
opndParam = this->GetOpndForArgSlot(doubleArgsLeft - 1, helperArgOpnd);
AssertMsg(opndParam->IsRegOpnd(), "NYI for other kind of operands");
--doubleArgsLeft;
}
else
{
opndParam = this->GetOpndForArgSlot(intArgsLeft - 1, helperArgOpnd);
--intArgsLeft;
}
Lowerer::InsertMove(opndParam, helperArgOpnd, callInstr);
--argsLeft;
}
Assert(doubleArgsLeft == 0 && intArgsLeft == 0 && argsLeft == 0);
// We're done with the args (if any) now, so clear the param location state.
this->FinishArgLowering();
return retInstr;
}
IR::Instr *
LowererMD::LoadDynamicArgument(IR::Instr *instr, uint argNumber)
{
Assert(instr->m_opcode == Js::OpCode::ArgOut_A_Dynamic);
Assert(instr->GetSrc2() == nullptr);
IR::Opnd* dst = GetOpndForArgSlot((Js::ArgSlot) (argNumber - 1));
instr->SetDst(dst);
instr->m_opcode = Js::OpCode::MOV;
LegalizeMD::LegalizeInstr(instr, false);
return instr;
}
IR::Instr *
LowererMD::LoadDynamicArgumentUsingLength(IR::Instr *instr)
{
Assert(instr->m_opcode == Js::OpCode::ArgOut_A_Dynamic);
IR::RegOpnd* src2 = instr->UnlinkSrc2()->AsRegOpnd();
// We register store the first INT_ARG_REG_COUNT - 3 parameters, since the first 3 register parameters are taken by function object, callinfo, and this pointer
IR::Instr *add = IR::Instr::New(Js::OpCode::SUB, IR::RegOpnd::New(src2->GetType(), this->m_func), src2, IR::IntConstOpnd::New(INT_ARG_REG_COUNT - 3, TyInt8, this->m_func), this->m_func);
instr->InsertBefore(add);
LegalizeMD::LegalizeInstr(add, false);
//We need store nth actuals, so stack location is after function object, callinfo & this pointer
IR::RegOpnd *stackPointer = IR::RegOpnd::New(nullptr, GetRegStackPointer(), TyMachReg, this->m_func);
IR::IndirOpnd *actualsLocation = IR::IndirOpnd::New(stackPointer, add->GetDst()->AsRegOpnd(), GetDefaultIndirScale(), TyMachReg, this->m_func);
instr->SetDst(actualsLocation);
instr->m_opcode = Js::OpCode::LDR;
LegalizeMD::LegalizeInstr(instr, false);
return instr;
}
void
LowererMD::SetMaxArgSlots(Js::ArgSlot actualCount /*including this*/)
{
Js::ArgSlot offset = 3;//For function object & callInfo & this
if (this->m_func->m_argSlotsForFunctionsCalled < (uint32) (actualCount + offset))
{
this->m_func->m_argSlotsForFunctionsCalled = (uint32)(actualCount + offset);
}
return;
}
void
LowererMD::GenerateMemInit(IR::RegOpnd * opnd, int32 offset, size_t value, IR::Instr * insertBeforeInstr, bool isZeroed)
{
m_lowerer->GenerateMemInit(opnd, offset, (uint32)value, insertBeforeInstr, isZeroed);
}
IR::Instr *
LowererMD::LowerCallIDynamic(IR::Instr *callInstr, IR::Instr*saveThisArgOutInstr, IR::Opnd *argsLength, ushort callFlags, IR::Instr * insertBeforeInstrForCFG)
{
callInstr->InsertBefore(saveThisArgOutInstr); //Move this Argout next to call;
this->LoadDynamicArgument(saveThisArgOutInstr, 3); //this pointer is the 3rd argument
//callInfo
if (callInstr->m_func->IsInlinee())
{
Assert(argsLength->AsIntConstOpnd()->GetValue() == callInstr->m_func->actualCount);
this->SetMaxArgSlots((Js::ArgSlot)callInstr->m_func->actualCount);
}
else
{
callInstr->InsertBefore(IR::Instr::New(Js::OpCode::ADD, argsLength, argsLength, IR::IntConstOpnd::New(1, TyInt8, this->m_func), this->m_func));
this->SetMaxArgSlots(Js::InlineeCallInfo::MaxInlineeArgoutCount);
}
Lowerer::InsertMove( this->GetOpndForArgSlot(1), argsLength, callInstr);
IR::RegOpnd *funcObjOpnd = callInstr->UnlinkSrc1()->AsRegOpnd();
GeneratePreCall(callInstr, funcObjOpnd, insertBeforeInstrForCFG);
// functionOpnd is the first argument.
IR::Opnd * opndParam = this->GetOpndForArgSlot(0);
Lowerer::InsertMove(opndParam, funcObjOpnd, callInstr);
return this->LowerCall(callInstr, 0);
}
void
LowererMD::GenerateFunctionObjectTest(IR::Instr * callInstr, IR::RegOpnd *functionObjOpnd, bool isHelper, IR::LabelInstr* continueAfterExLabel /* = nullptr */)
{
AssertMsg(!m_func->IsJitInDebugMode() || continueAfterExLabel, "When jit is in debug mode, continueAfterExLabel must be provided otherwise continue after exception may cause AV.");
// Need check and error if we are calling a tagged int.
if (!functionObjOpnd->IsNotTaggedValue())
{
IR::LabelInstr * helperLabel = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
if (this->GenerateObjectTest(functionObjOpnd, callInstr, helperLabel))
{
IR::LabelInstr * callLabel = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, isHelper);
IR::Instr * instr = IR::BranchInstr::New(Js::OpCode::B, callLabel, this->m_func);
callInstr->InsertBefore(instr);
callInstr->InsertBefore(helperLabel);
callInstr->InsertBefore(callLabel);
this->m_lowerer->GenerateRuntimeError(callLabel, JSERR_NeedFunction);
if (continueAfterExLabel)
{
// Under debugger the RuntimeError (exception) can be ignored, generate branch to jmp to safe place
// (which would normally be debugger bailout check).
IR::BranchInstr* continueAfterEx = IR::BranchInstr::New(LowererMD::MDUncondBranchOpcode, continueAfterExLabel, this->m_func);
callLabel->InsertBefore(continueAfterEx);
}
}
}
}
IR::Instr*
LowererMD::GeneratePreCall(IR::Instr * callInstr, IR::Opnd *functionObjOpnd, IR::Instr * insertBeforeInstrForCFGCheck)
{
if (insertBeforeInstrForCFGCheck == nullptr)
{
insertBeforeInstrForCFGCheck = callInstr;
}
IR::RegOpnd * functionTypeRegOpnd = nullptr;
IR::IndirOpnd * entryPointIndirOpnd = nullptr;
// For calls to fixed functions we load the function's type directly from the known (hard-coded) function object address.
// For other calls, we need to load it from the function object stored in a register operand.
if (functionObjOpnd->IsAddrOpnd() && functionObjOpnd->AsAddrOpnd()->m_isFunction)
{
functionTypeRegOpnd = this->m_lowerer->GenerateFunctionTypeFromFixedFunctionObject(insertBeforeInstrForCFGCheck, functionObjOpnd);
}
else if (functionObjOpnd->IsRegOpnd())
{
AssertMsg(functionObjOpnd->AsRegOpnd()->m_sym->IsStackSym(), "Expected call target to be stackSym");
functionTypeRegOpnd = IR::RegOpnd::New(TyMachReg, this->m_func);
IR::IndirOpnd* functionTypeIndirOpnd = IR::IndirOpnd::New(functionObjOpnd->AsRegOpnd(),
Js::RecyclableObject::GetOffsetOfType(), TyMachReg, this->m_func);
Lowerer::InsertMove(functionTypeRegOpnd, functionTypeIndirOpnd, insertBeforeInstrForCFGCheck);
}
else
{
AnalysisAssertMsg(false, "Unexpected call target operand type.");
}
entryPointIndirOpnd = IR::IndirOpnd::New(functionTypeRegOpnd, Js::Type::GetOffsetOfEntryPoint(), TyMachPtr, m_func);
IR::RegOpnd *entryPointRegOpnd = functionTypeRegOpnd;
entryPointRegOpnd->m_isCallArg = true;
IR::Instr * stackParamInsert = Lowerer::InsertMove(entryPointRegOpnd, entryPointIndirOpnd, insertBeforeInstrForCFGCheck);
// targetAddrOpnd is the address we'll call.
callInstr->SetSrc1(entryPointRegOpnd);
#if defined(_CONTROL_FLOW_GUARD)
// verify that the call target is valid (CFG Check)
if (!PHASE_OFF(Js::CFGInJitPhase, this->m_func))
{
this->GenerateCFGCheck(entryPointRegOpnd, insertBeforeInstrForCFGCheck);
}
#endif
return stackParamInsert;
}
IR::Instr *
LowererMD::LowerCallI(IR::Instr * callInstr, ushort callFlags, bool isHelper, IR::Instr * insertBeforeInstrForCFG)
{
// Indirect call using JS calling convention:
// R0 = callee func object
// R1 = callinfo
// R2 = arg0 ("this")
// R3 = arg1
// [sp] = arg2
// etc.
// First load the target address. Note that we want to wind up with this:
// ...
// [sp+4] = arg3
// [sp] = arg2
// load target addr from func obj
// R3 = arg1
// ...
// R0 = func obj
// BLX target addr
// This way the register containing the target addr interferes with the param regs
// only, not the regs we use to store params to the stack.
// We're sinking the stores of stack params so that the call sequence is contiguous.
// This is required by nested calls, since each call will re-use the same stack slots.
// But if there is no nesting, stack params can be stored as soon as they're computed.
IR::Opnd * functionObjOpnd = callInstr->UnlinkSrc1();
IR::Instr * insertBeforeInstrForCFGCheck = callInstr;
// If this is a call for new, we already pass the function operand through NewScObject,
// which checks if the function operand is a real function or not, don't need to add a check again.
// If this is a call to a fixed function, we've already verified that the target is, indeed, a function.
if (callInstr->m_opcode != Js::OpCode::CallIFixed && !(callFlags & Js::CallFlags_New))
{
Assert(functionObjOpnd->IsRegOpnd());
IR::LabelInstr* continueAfterExLabel = Lowerer::InsertContinueAfterExceptionLabelForDebugger(m_func, callInstr, isHelper);
GenerateFunctionObjectTest(callInstr, functionObjOpnd->AsRegOpnd(), isHelper, continueAfterExLabel);
}
else if (insertBeforeInstrForCFG != nullptr)
{
// RegNum dstReg = insertBeforeInstrForCFG->GetDst()->AsRegOpnd()->GetReg();
// AssertMsg(dstReg == RegArg2 || dstReg == RegArg3, "NewScObject should insert the first Argument in RegArg2/RegArg3 only based on Spread call or not.");
insertBeforeInstrForCFGCheck = insertBeforeInstrForCFG;
}
IR::Instr * stackParamInsert = GeneratePreCall(callInstr, functionObjOpnd, insertBeforeInstrForCFGCheck);
// We need to get the calculated CallInfo in SimpleJit because that doesn't include any changes for stack alignment
IR::IntConstOpnd *callInfo;
int32 argCount = this->LowerCallArgs(callInstr, stackParamInsert, callFlags, 1, &callInfo);
// functionObjOpnd is the first argument.
IR::Opnd * opndParam = this->GetOpndForArgSlot(0);
Lowerer::InsertMove(opndParam, functionObjOpnd, callInstr);
IR::Opnd *const finalDst = callInstr->GetDst();
// Finally, lower the call instruction itself.
IR::Instr* ret = this->LowerCall(callInstr, (Js::ArgSlot)argCount);
IR::AutoReuseOpnd autoReuseSavedFunctionObjOpnd;
if (callInstr->IsJitProfilingInstr())
{
Assert(callInstr->m_func->IsSimpleJit());
Assert(!CONFIG_FLAG(NewSimpleJit));
if(finalDst &&
finalDst->IsRegOpnd() &&
functionObjOpnd->IsRegOpnd() &&
finalDst->AsRegOpnd()->m_sym == functionObjOpnd->AsRegOpnd()->m_sym)
{
// The function object sym is going to be overwritten, so save it in a temp for profiling
IR::RegOpnd *const savedFunctionObjOpnd = IR::RegOpnd::New(functionObjOpnd->GetType(), callInstr->m_func);
autoReuseSavedFunctionObjOpnd.Initialize(savedFunctionObjOpnd, callInstr->m_func);
Lowerer::InsertMove(savedFunctionObjOpnd, functionObjOpnd, callInstr->m_next);
functionObjOpnd = savedFunctionObjOpnd;
}
auto instr = callInstr->AsJitProfilingInstr();
ret = this->m_lowerer->GenerateCallProfiling(
instr->profileId,
instr->inlineCacheIndex,
instr->GetDst(),
functionObjOpnd,
callInfo,
instr->isProfiledReturnCall,
callInstr,
ret);
}
return ret;
}
int32
LowererMD::LowerCallArgs(IR::Instr *callInstr, IR::Instr *stackParamInsert, ushort callFlags, Js::ArgSlot extraParams, IR::IntConstOpnd **callInfoOpndRef)
{
AssertMsg(this->helperCallArgsCount == 0, "We don't support nested helper calls yet");
uint32 argCount = 0;
IR::Opnd* opndParam;
// Now walk the user arguments and remember the arg count.
IR::Instr * argInstr = callInstr;
IR::Opnd *src2Opnd = callInstr->UnlinkSrc2();
while (src2Opnd->IsSymOpnd())
{
// Get the arg instr
IR::SymOpnd * argLinkOpnd = src2Opnd->AsSymOpnd();
StackSym * argLinkSym = argLinkOpnd->m_sym->AsStackSym();
AssertMsg(argLinkSym->IsArgSlotSym() && argLinkSym->m_isSingleDef, "Arg tree not single def...");
argLinkOpnd->Free(this->m_func);
argInstr = argLinkSym->m_instrDef;
// The arg sym isn't assigned a constant directly anymore
argLinkSym->m_isConst = false;
argLinkSym->m_isIntConst = false;
argLinkSym->m_isTaggableIntConst = false;
// The arg slot nums are 1-based, so subtract 1. Then add 1 for the non-user args (callinfo).
auto argSlotNum = argLinkSym->GetArgSlotNum();
if(argSlotNum + extraParams < argSlotNum)
{
Js::Throw::OutOfMemory();
}
opndParam = this->GetOpndForArgSlot(argSlotNum + extraParams);
src2Opnd = argInstr->UnlinkSrc2();
argInstr->ReplaceDst(opndParam);
argInstr->Unlink();
if (opndParam->IsRegOpnd())
{
callInstr->InsertBefore(argInstr);
}
else
{
stackParamInsert->InsertBefore(argInstr);
}
this->ChangeToAssign(argInstr);
argCount++;
}
IR::RegOpnd * argLinkOpnd = src2Opnd->AsRegOpnd();
StackSym *argLinkSym = argLinkOpnd->m_sym->AsStackSym();
AssertMsg(!argLinkSym->IsArgSlotSym() && argLinkSym->m_isSingleDef, "Arg tree not single def...");
IR::Instr *startCallInstr = argLinkSym->m_instrDef;
AssertMsg(startCallInstr->m_opcode == Js::OpCode::StartCall || startCallInstr->m_opcode == Js::OpCode::LoweredStartCall, "Problem with arg chain.");
AssertMsg(startCallInstr->GetArgOutCount(/*getInterpreterArgOutCount*/ false) == argCount,
"ArgCount doesn't match StartCall count");
// Deal with the SC.
this->LowerStartCall(startCallInstr);
// Second argument is the callinfo.
IR::IntConstOpnd *opndCallInfo = Lowerer::MakeCallInfoConst(callFlags, argCount, m_func);
if(callInfoOpndRef)
{
opndCallInfo->Use(m_func);
*callInfoOpndRef = opndCallInfo;
}
opndParam = this->GetOpndForArgSlot(extraParams);
Lowerer::InsertMove(opndParam, opndCallInfo, callInstr);
return argCount + 1 + extraParams; // + 1 for call flags
}
IR::Instr *
LowererMD::LowerStartCall(IR::Instr * instr)
{
// StartCall doesn't need to generate a stack adjustment. Just delete it.
instr->m_opcode = Js::OpCode::LoweredStartCall;
return instr;
}
IR::Instr *
LowererMD::LoadHelperArgument(IR::Instr * instr, IR::Opnd * opndArgValue)
{
// Load the given parameter into the appropriate location.
// We update the current param state so we can do this work without making the caller
// do the work.
Assert(this->helperCallArgsCount < LowererMD::MaxArgumentsToHelper);
__analysis_assume(this->helperCallArgsCount < MaxArgumentsToHelper);
helperCallArgs[helperCallArgsCount++] = opndArgValue;
if (opndArgValue->GetType() == TyMachDouble)
{
this->helperCallDoubleArgsCount++;
}
return instr;
}
void
LowererMD::FinishArgLowering()
{
this->helperCallArgsCount = 0;
this->helperCallDoubleArgsCount = 0;
}
IR::Opnd *
LowererMD::GetOpndForArgSlot(Js::ArgSlot argSlot, IR::Opnd * argOpnd)
{
IR::Opnd * opndParam = nullptr;
IRType type = argOpnd ? argOpnd->GetType() : TyMachReg;
if (argOpnd == nullptr || !argOpnd->IsFloat())
{
if (argSlot < NUM_INT_ARG_REGS)
{
// Return an instance of the next arg register.
IR::RegOpnd *regOpnd;
regOpnd = IR::RegOpnd::New(nullptr, (RegNum)(argSlot + FIRST_INT_ARG_REG), type, this->m_func);
regOpnd->m_isCallArg = true;
opndParam = regOpnd;
}
else
{
// Create a stack slot reference and bump up the size of this function's outgoing param area,
// if necessary.
argSlot = argSlot - NUM_INT_ARG_REGS;
IntConstType offset = argSlot * MachRegInt;
IR::RegOpnd * spBase = IR::RegOpnd::New(nullptr, this->GetRegStackPointer(), TyMachReg, this->m_func);
opndParam = IR::IndirOpnd::New(spBase, int32(offset), type, this->m_func);
if (this->m_func->m_argSlotsForFunctionsCalled < (uint32)(argSlot + 1))
{
this->m_func->m_argSlotsForFunctionsCalled = argSlot + 1;
}
}
}
else
{
if (argSlot < MaxDoubleArgumentsToHelper)
{
// Return an instance of the next arg register.
IR::RegOpnd *regOpnd;
regOpnd = IR::RegOpnd::New(nullptr, (RegNum)(argSlot + FIRST_DOUBLE_ARG_REG), type, this->m_func);
regOpnd->m_isCallArg = true;
opndParam = regOpnd;
}
else
{
AssertMsg(false,"More than 8 double parameter passing disallowed");
}
}
return opndParam;
}
IR::Instr *
LowererMD::LoadDoubleHelperArgument(IR::Instr * instr, IR::Opnd * opndArg)
{
// Load the given parameter into the appropriate location.
// We update the current param state so we can do this work without making the caller
// do the work.
Assert(opndArg->GetType() == TyMachDouble);
return this->LoadHelperArgument(instr, opndArg);
}
void
LowererMD::GenerateStackProbe(IR::Instr *insertInstr, bool afterProlog)
{
//
// Generate a stack overflow check. This can be as simple as a cmp esp, const
// because this function is guaranteed to be called on its base thread only.
// If the check fails call ThreadContext::ProbeCurrentStack which will check again and must throw.
//
// LDIMM r17, ThreadContext::scriptStackLimit + frameSize //Load to register first, as this can be more than 12 bit supported in CMP
// CMP sp, r17
// BHI done
// begin:
// LDIMM r0, frameSize
// LDIMM r1, scriptContext
// LDIMM r2, ThreadContext::ProbeCurrentStack //MUST THROW
// BLX r2 //BX r2 if the stackprobe is before prolog
// done:
//
// For thread context with script interrupt enabled:
// LDIMM r17, &ThreadContext::scriptStackLimitForCurrentThread
// LDR r17, [r17]
// MOV r15, frameSize
// ADDS r17, r17, r15
// BVS $helper
// CMP sp, r17
// BHI done
// $helper:
// LDIMM r0, frameSize
// LDIMM r1, scriptContext
// LDIMM r2, ThreadContext::ProbeCurrentStack //MUST THROW
// BLX r2 //BX r2 if the stackprobe is before prolog
// done:
//
//m_localStackHeight for ARM contains (m_argSlotsForFunctionsCalled * MachPtr)
uint32 frameSize = this->m_func->m_localStackHeight + Js::Constants::MinStackJIT;
IR::RegOpnd *scratchOpnd = IR::RegOpnd::New(nullptr, SCRATCH_REG, TyMachReg, this->m_func);
IR::LabelInstr *helperLabel = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, afterProlog);
IR::Instr *instr;
bool doInterruptProbe = m_func->GetJITFunctionBody()->DoInterruptProbe();
if (doInterruptProbe || !m_func->GetThreadContextInfo()->IsThreadBound())
{
// LDIMM r17, &ThreadContext::scriptStackLimitForCurrentThread
intptr_t pLimit = m_func->GetThreadContextInfo()->GetThreadStackLimitAddr();
Lowerer::InsertMove(scratchOpnd, IR::AddrOpnd::New(pLimit, IR::AddrOpndKindDynamicMisc, this->m_func), insertInstr);
// LDR r17, [r17, #0]
Lowerer::InsertMove(scratchOpnd, IR::IndirOpnd::New(scratchOpnd, 0, TyMachReg, this->m_func), insertInstr);
AssertMsg(!IS_CONST_00000FFF(frameSize), "For small size we can just add frameSize to r17");
// MOV r15, frameSize
IR::Opnd* spAllocRegOpnd = IR::RegOpnd::New(nullptr, SP_ALLOC_SCRATCH_REG, TyMachReg, this->m_func);
Lowerer::InsertMove(spAllocRegOpnd, IR::IntConstOpnd::New(frameSize, TyMachReg, this->m_func), insertInstr);
// ADDS r17, r17, r15
instr = IR::Instr::New(Js::OpCode::ADDS, scratchOpnd, scratchOpnd, spAllocRegOpnd, this->m_func);
insertInstr->InsertBefore(instr);
// If this add overflows, we have to call the helper.
instr = IR::BranchInstr::New(Js::OpCode::BVS, helperLabel, this->m_func);
insertInstr->InsertBefore(instr);
}
else
{
// MOV r17, frameSize + scriptStackLimit
uint64 scriptStackLimit = m_func->GetThreadContextInfo()->GetScriptStackLimit();
IR::Opnd *stackLimitOpnd = IR::IntConstOpnd::New(frameSize + scriptStackLimit, TyMachReg, this->m_func);
Lowerer::InsertMove(scratchOpnd, stackLimitOpnd, insertInstr);
}
IR::LabelInstr *doneLabelInstr = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, false);
if (!IS_FAULTINJECT_STACK_PROBE_ON) // Do stack check fastpath only if not doing StackProbe fault injection
{
// CMP sp, r17
instr = IR::Instr::New(Js::OpCode::CMP, this->m_func);
instr->SetSrc1(IR::RegOpnd::New(nullptr, GetRegStackPointer(), TyMachReg, this->m_func));
instr->SetSrc2(scratchOpnd);
insertInstr->InsertBefore(instr);
LegalizeMD::LegalizeInstr(instr, false);
// BHI done
instr = IR::BranchInstr::New(Js::OpCode::BHI, doneLabelInstr, this->m_func);
insertInstr->InsertBefore(instr);
}
insertInstr->InsertBefore(helperLabel);
// ToDo (SaAgarwa): Make sure all SP offsets are correct
// Zero out the pointer to the list of stack nested funcs, since the functions won't be initialized on this path.
/*
scratchOpnd = IR::RegOpnd::New(nullptr, RegR0, TyMachReg, m_func);
IR::RegOpnd *frameReg = IR::RegOpnd::New(nullptr, GetRegFramePointer(), TyMachReg, m_func);
Lowerer::InsertMove(scratchOpnd, IR::IntConstOpnd::New(0, TyMachReg, m_func), insertInstr);
IR::Opnd *indirOpnd = IR::IndirOpnd::New(
frameReg, -(int32)(Js::Constants::StackNestedFuncList * sizeof(Js::Var)), TyMachReg, m_func);
Lowerer::InsertMove(indirOpnd, scratchOpnd, insertInstr);
*/
IR::RegOpnd *r0Opnd = IR::RegOpnd::New(nullptr, RegR0, TyMachReg, this->m_func);
Lowerer::InsertMove(r0Opnd, IR::IntConstOpnd::New(frameSize, TyMachReg, this->m_func, true), insertInstr);
IR::RegOpnd *r1Opnd = IR::RegOpnd::New(nullptr, RegR1, TyMachReg, this->m_func);
Lowerer::InsertMove(r1Opnd, this->m_lowerer->LoadScriptContextOpnd(insertInstr), insertInstr);
IR::RegOpnd *r2Opnd = IR::RegOpnd::New(nullptr, RegR2, TyMachReg, m_func);
Lowerer::InsertMove(r2Opnd, IR::HelperCallOpnd::New(IR::HelperProbeCurrentStack, this->m_func), insertInstr);
instr = IR::Instr::New(afterProlog? Js::OpCode::BLR : Js::OpCode::BR, this->m_func);
instr->SetSrc1(r2Opnd);
insertInstr->InsertBefore(instr);
insertInstr->InsertBefore(doneLabelInstr);
}
//
// Emits the code to allocate 'size' amount of space on stack. for values smaller than PAGE_SIZE
// this will just emit sub SP,size otherwise calls _chkstk.
//
bool
LowererMD::GenerateStackAllocation(IR::Instr *instr, uint32 allocSize, uint32 probeSize)
{
IR::RegOpnd* spOpnd = IR::RegOpnd::New(nullptr, GetRegStackPointer(), TyMachReg, this->m_func);
if (IsSmallStack(probeSize))
{
AssertMsg(!(allocSize & 0xFFFFF000), "Must fit in 12 bits");
AssertMsg(allocSize % MachStackAlignment == 0, "Must be aligned");
// Generate SUB SP, SP, stackSize
IR::IntConstOpnd * stackSizeOpnd = IR::IntConstOpnd::New(allocSize, TyMachReg, this->m_func, true);
IR::Instr * subInstr = IR::Instr::New(Js::OpCode::SUB, spOpnd, spOpnd, stackSizeOpnd, this->m_func);
instr->InsertBefore(subInstr);
return false;
}
//__chkStk is a leaf function and hence alignment is not required.
// Generate _chkstk call
// LDIMM RegR15, stackSize/16
// LDIMM RegR17, HelperCRT_chkstk
// BLX RegR17
// SUB SP, SP, x15, lsl #4
//chkstk expects the stacksize argument in R15 register
IR::RegOpnd *spAllocOpnd = IR::RegOpnd::New(nullptr, SP_ALLOC_SCRATCH_REG, TyMachReg, this->m_func);
IR::RegOpnd *targetOpnd = IR::RegOpnd::New(nullptr, SCRATCH_REG, TyMachReg, this->m_func);
IR::IntConstOpnd * stackSizeOpnd = IR::IntConstOpnd::New((allocSize / MachStackAlignment), TyMachReg, this->m_func, true);
IR::Instr *movHelperAddrInstr = IR::Instr::New(Js::OpCode::LDIMM, targetOpnd, IR::HelperCallOpnd::New(IR::HelperCRT_chkstk, this->m_func), this->m_func);
instr->InsertBefore(movHelperAddrInstr);
IR::Instr *movInstr = IR::Instr::New(Js::OpCode::LDIMM, spAllocOpnd, stackSizeOpnd, this->m_func);
instr->InsertBefore(movInstr);
IR::Instr * callInstr = IR::Instr::New(Js::OpCode::BLR, spAllocOpnd, targetOpnd, this->m_func);
instr->InsertBefore(callInstr);
// _chkstk succeeded adjust SP by allocSize. r15 contains allocSize/16 so left shift r15 by 4 to get allocSize
// Generate SUB SP, SP, x15, lsl #4
IR::Instr * subInstr = IR::Instr::New(Js::OpCode::SUB_LSL4, spOpnd, spOpnd, spAllocOpnd, this->m_func);
instr->InsertBefore(subInstr);
// return true to imply scratch register is trashed
return true;
}
void
LowererMD::GenerateStackDeallocation(IR::Instr *instr, uint32 allocSize)
{
IR::RegOpnd * spOpnd = IR::RegOpnd::New(nullptr, this->GetRegStackPointer(), TyMachReg, this->m_func);
IR::Instr * spAdjustInstr = IR::Instr::New(Js::OpCode::ADD,
spOpnd,
spOpnd,
IR::IntConstOpnd::New(allocSize, TyMachReg, this->m_func, true), this->m_func);
instr->InsertBefore(spAdjustInstr);
LegalizeMD::LegalizeInstr(spAdjustInstr, true);
}
class ARM64StackLayout
{
//
// Canonical ARM64 prolog/epilog stack layout (stack grows downward):
//
// +-------------------------------------+
// | caller-allocated parameters |
// +=====================================+-----> SP at time of call
// | callee-saved parameters (x0-x7) |
// +-------------------------------------+
// | frame pointer + link register |
// +-------------------------------------+-----> updated FP points here
// | arguments slot + StackFunctionList |
// +-------------------------------------+
// | callee-saved registers (x19-x28) |
// +-------------------------------------+
// | callee-saved FP regs (d8-d15) |
// +-------------------------------------+-----> == regOffset
// | locals area |
// +-------------------------------------+-----> locals pointer if not SP
// | caller-allocated parameters |
// +=====================================+-----> SP points here when done
//
public:
ARM64StackLayout(Func* func);
// Getters
bool HasCalls() const { return m_hasCalls; }
bool HasTry() const { return m_hasTry; }
ULONG ArgSlotCount() const { return m_argSlotCount; }
BitVector HomedParams() const { return m_homedParams; }
BitVector SavedRegisters() const { return m_savedRegisters; }
BitVector SavedDoubles() const { return m_savedDoubles; }
// Locals area sits right after space allocated for argments
ULONG LocalsOffset() const { return this->m_argSlotCount * MachRegInt; }
ULONG LocalsSize() const { return this->m_localsArea; }
// Saved non-volatile double registers sit past the locals area
ULONG SavedDoublesOffset() const { return this->LocalsOffset() + this->LocalsSize(); }
ULONG SavedDoublesSize() const { return this->m_savedDoubles.Count() * MachRegDouble; }
// Saved non-volatile integer registers sit after the saved doubles
ULONG SavedRegistersOffset() const { return this->SavedDoublesOffset() + this->SavedDoublesSize(); }
ULONG SavedRegistersSize() const { return this->m_savedRegisters.Count() * MachRegInt; }
// The argument slot and StackFunctionList entry come after the saved integer registers
ULONG ArgSlotOffset() const { return this->SavedRegistersOffset() + this->SavedRegistersSize(); }
ULONG ArgSlotSize() const { return this->m_hasCalls ? (2 * MachRegInt) : 0; }
// Next comes the frame chain
ULONG FpLrOffset() const { return this->ArgSlotOffset() + this->ArgSlotSize(); }
ULONG FpLrSize() const { return this->m_hasCalls ? (2 * MachRegInt) : 0; }
// Followed by any homed parameters
ULONG HomedParamsOffset() const { return this->FpLrOffset() + this->FpLrSize(); }
ULONG HomedParamsSize() const { return this->m_homedParams.Count() * MachRegInt; }
// And that's the total stack allocation
ULONG TotalStackSize() const { return this->HomedParamsOffset() + this->HomedParamsSize(); }
// The register area is the area at the far end that doesn't include locals or arg slots
ULONG RegisterAreaOffset() const { return this->SavedDoublesOffset(); }
ULONG RegisterAreaSize() const { return this->TotalStackSize() - this->RegisterAreaOffset(); }
private:
bool m_hasCalls;
bool m_hasTry;
ULONG m_argSlotCount;
ULONG m_localsArea;
BitVector m_homedParams;
BitVector m_savedRegisters;
BitVector m_savedDoubles;
};
ARM64StackLayout::ARM64StackLayout(Func* func)
: m_hasCalls(false),
m_hasTry(func->HasTry()),
m_argSlotCount(func->m_argSlotsForFunctionsCalled),
m_localsArea(func->m_localStackHeight)
{
Assert(m_localsArea % 16 == 0);
Assert(m_argSlotCount % 2 == 0);
// If there is a try, behave specially because the try/catch/finally helpers assume a
// fully-populated stack layout.
if (this->m_hasTry)
{
this->m_hasCalls = true;
this->m_savedRegisters.SetRange(FIRST_CALLEE_SAVED_GP_REG, CALLEE_SAVED_GP_REG_COUNT);
this->m_savedDoubles.SetRange(FIRST_CALLEE_SAVED_DBL_REG, CALLEE_SAVED_DOUBLE_REG_COUNT);
this->m_homedParams.SetRange(0, NUM_INT_ARG_REGS);
}
// Otherwise, be more selective
else
{
// Determine integer register saves. Since registers are always saved in pairs, mark both registers
// in each pair as being saved even if only one is actually used.
for (RegNum curReg = FIRST_CALLEE_SAVED_GP_REG; curReg <= LAST_CALLEE_SAVED_GP_REG; curReg = RegNum(curReg + 2))
{
Assert(LinearScan::IsCalleeSaved(curReg));
RegNum nextReg = RegNum(curReg + 1);
Assert(LinearScan::IsCalleeSaved(nextReg));
if (func->m_regsUsed.Test(curReg) || func->m_regsUsed.Test(nextReg))
{
this->m_savedRegisters.SetRange(curReg, 2);
}
}
// Determine double register saves. Since registers are always saved in pairs, mark both registers
// in each pair as being saved even if only one is actually used.
for (RegNum curReg = FIRST_CALLEE_SAVED_DBL_REG; curReg <= LAST_CALLEE_SAVED_DBL_REG; curReg = RegNum(curReg + 2))
{
Assert(LinearScan::IsCalleeSaved(curReg));
RegNum nextReg = RegNum(curReg + 1);
Assert(LinearScan::IsCalleeSaved(nextReg));
if (func->m_regsUsed.Test(curReg) || func->m_regsUsed.Test(nextReg))
{
this->m_savedDoubles.SetRange(curReg, 2);
}
}
// Determine if there are nested calls.
//
// If the function has a try, we need to have the same register saves in the prolog as the
// arm64_CallEhFrame helper, so that we can use the same epilog. So always allocate a slot
// for the stack nested func here whether we actually do have any stack nested func or not
// TODO-STACK-NESTED-FUNC: May be use a different arm64_CallEhFrame for when we have
// stack nested func?
//
// Note that this->TotalStackSize() will not include the homed parameters yet, so we add in
// the worst case assumption (homing all NUM_INT_ARG_REGS).
this->m_hasCalls = func->GetHasCalls() ||
func->HasAnyStackNestedFunc() ||
!LowererMD::IsSmallStack(this->TotalStackSize() + NUM_INT_ARG_REGS * MachRegInt);
// Home the params. This is done to enable on-the-fly creation of the arguments object,
// Dyno bailout code, etc. For non-global functions, that means homing all the param registers
// (since we have to assume they all have valid parameters). For the global function,
// just home x0 (function object) and x1 (callinfo), which the runtime can't get by any other means.
int homedParams = MIN_HOMED_PARAM_REGS;
if (func->IsLoopBody())
{
// Jitted loop body takes only one "user" param: the pointer to the local slots.
homedParams += 1;
}
else if (!this->m_hasCalls)
{
// A leaf function (no calls of any kind, including helpers) may still need its params, or, if it
// has none, may still need the function object and call info.
homedParams += func->GetInParamsCount();
}
else
{
homedParams = NUM_INT_ARG_REGS;
}
// Round up to an even number to keep stack alignment
if (homedParams % 2 != 0)
{
homedParams += 1;
}
this->m_homedParams.SetRange(0, (homedParams < NUM_INT_ARG_REGS) ? homedParams : NUM_INT_ARG_REGS);
}
}
IR::Instr *
LowererMD::LowerEntryInstr(IR::EntryInstr * entryInstr)
{
IR::Instr *insertInstr = entryInstr->m_next;
// Begin recording info for later pdata/xdata emission.
this->m_func->m_unwindInfo.Init(this->m_func);
// Ensure there are an even number of slots for called functions
if (this->m_func->m_argSlotsForFunctionsCalled % 2 != 0)
{
this->m_func->m_argSlotsForFunctionsCalled += 1;
}
if (this->m_func->HasInlinee())
{
// Allocate the inlined arg out stack in the locals. Allocate an additional slot so that
// we can unconditionally clear the first slot past the current frame.
this->m_func->m_localStackHeight += this->m_func->GetInlineeArgumentStackSize();
}
// Ensure the locals area is 16 byte aligned.
this->m_func->m_localStackHeight = Math::Align<int32>(this->m_func->m_localStackHeight, MachStackAlignment);
// Now that the localStackHeight has been adjusted, compute the final layout
ARM64StackLayout layout(this->m_func);
Assert(layout.TotalStackSize() % 16 == 0);
// Set the arguments offset relative to the end of the locals area
this->m_func->m_ArgumentsOffset = layout.HomedParamsOffset() - (layout.LocalsOffset() + layout.LocalsSize());
// Set the frame height if inlinee arguments are needed
if (m_func->GetMaxInlineeArgOutSize() != 0)
{
// subtracting 2 for frame pointer & return address
this->m_func->GetJITOutput()->SetFrameHeight(this->m_func->m_localStackHeight + this->m_func->m_ArgumentsOffset - 2 * MachRegInt);
}
// Two situations to handle:
//
// 1. If total stack allocation < 512, we can do a single allocation up front
// 2. Otherwise, we allocate the register area first, save regs, then allocate locals
//
// Breaking this down, there are two stack allocations
//
// Allocation 1 = situation1 ? TotalStackSize : RegisterAreaSize
// Allocation 2 = TotalStackSize - Allocation 1
//
// <probe>
// prologStart:
// sub sp, sp, #allocation1
// stp d8-d15, [sp, #savedDoublesOffset - allocation2]
// stp x19-x28, [sp, #savedRegistersOffset - allocation2]
// stp fp, lr, [sp, #fpLrOffset - allocation2]
// add fp, sp, #fpLrOffset - allocation2
// sub sp, sp, #allocation2 (might be call to _chkstk)
// prologEnd:
// stp zr, zr, [fp, #argSlotOffset - fpLrOffset]
// stp x0-x7, [fp, #paramSaveOffset - fpLrOffset]
// add localsptr, sp, #localsOffset
// sub ehsave, fp, #fpLrOffset - registerAreaOffset
//
// Determine the 1 or 2 stack allocation sizes
ULONG stackAllocation1 = (layout.TotalStackSize() < 512) ? layout.TotalStackSize() : layout.RegisterAreaSize();
ULONG stackAllocation2 = layout.TotalStackSize() - stackAllocation1;
// this->GenerateDebugBreak(insertInstr);
// Generate a stack probe for large stacks first even before register push
bool fStackProbeAfterProlog = IsSmallStack(layout.TotalStackSize());
if (!fStackProbeAfterProlog)
{
GenerateStackProbe(insertInstr, false);
}
// Create the prologStart label
IR::LabelInstr *prologStartLabel = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
insertInstr->InsertBefore(prologStartLabel);
this->m_func->m_unwindInfo.SetFunctionOffsetLabel(UnwindPrologStart, prologStartLabel);
// Perform the initial stack allocation (guaranteed to be small)
IR::RegOpnd *spOpnd = IR::RegOpnd::New(nullptr, RegSP, TyMachReg, this->m_func);
if (stackAllocation1 > 0)
{
IR::Instr * instrSub = IR::Instr::New(Js::OpCode::SUB, spOpnd, spOpnd, IR::IntConstOpnd::New(stackAllocation1, TyMachReg, this->m_func), this->m_func);
insertInstr->InsertBefore(instrSub);
}
// Save doubles in pairs
if (!layout.SavedDoubles().IsEmpty())
{
ULONG curOffset = layout.SavedDoublesOffset() - stackAllocation2;
for (RegNum curReg = FIRST_CALLEE_SAVED_DBL_REG; curReg <= LAST_CALLEE_SAVED_DBL_REG; curReg = RegNum(curReg + 2))
{
if (layout.SavedDoubles().Test(curReg))
{
RegNum nextReg = RegNum(curReg + 1);
IR::Instr * instrStp = IR::Instr::New(Js::OpCode::FSTP,
IR::IndirOpnd::New(spOpnd, curOffset, TyMachReg, this->m_func),
IR::RegOpnd::New(curReg, TyMachDouble, this->m_func),
IR::RegOpnd::New(nextReg, TyMachDouble, this->m_func), this->m_func);
insertInstr->InsertBefore(instrStp);
curOffset += 2 * MachRegDouble;
}
}
}
// Save integer registers in pairs
if (!layout.SavedRegisters().IsEmpty())
{
ULONG curOffset = layout.SavedRegistersOffset() - stackAllocation2;
for (RegNum curReg = FIRST_CALLEE_SAVED_GP_REG; curReg <= LAST_CALLEE_SAVED_GP_REG; curReg = RegNum(curReg + 2))
{
if (layout.SavedRegisters().Test(curReg))
{
RegNum nextReg = RegNum(curReg + 1);
IR::Instr * instrStp = IR::Instr::New(Js::OpCode::STP,
IR::IndirOpnd::New(spOpnd, curOffset, TyMachReg, this->m_func),
IR::RegOpnd::New(curReg, TyMachReg, this->m_func),
IR::RegOpnd::New(nextReg, TyMachReg, this->m_func), this->m_func);
insertInstr->InsertBefore(instrStp);
curOffset += 2 * MachRegInt;
}
}
}
// Save FP/LR and compute FP
IR::RegOpnd *fpOpnd = fpOpnd = IR::RegOpnd::New(nullptr, RegFP, TyMachReg, this->m_func);
if (layout.HasCalls())
{
// STP fp, lr, [sp, #offs]
ULONG fpOffset = layout.FpLrOffset() - stackAllocation2;
IR::Instr * instrStp = IR::Instr::New(Js::OpCode::STP,
IR::IndirOpnd::New(spOpnd, fpOffset, TyMachReg, this->m_func),
fpOpnd, IR::RegOpnd::New(RegLR, TyMachReg, this->m_func), this->m_func);
insertInstr->InsertBefore(instrStp);
// ADD fp, sp, #offs
// For exception handling, do this part AFTER the prolog to allow for proper unwinding
if (!layout.HasTry())
{
Lowerer::InsertAdd(false, fpOpnd, spOpnd, IR::IntConstOpnd::New(fpOffset, TyMachReg, this->m_func), insertInstr);
}
}
// Perform the second (potentially large) stack allocation
if (stackAllocation2 > 0)
{
// TODO: is the probeSize parameter correct here?
this->GenerateStackAllocation(insertInstr, stackAllocation2, stackAllocation1 + stackAllocation2);
}
// Future work in the register area should be done FP-relative if it is set up
IR::RegOpnd *regAreaBaseOpnd = layout.HasCalls() ? fpOpnd : spOpnd;
ULONG regAreaBaseOffset = layout.HasCalls() ? layout.FpLrOffset() : 0;
// This marks the end of the formal prolog (for EH purposes); create and register a label
IR::LabelInstr *prologEndLabel = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
insertInstr->InsertBefore(prologEndLabel);
this->m_func->m_unwindInfo.SetFunctionOffsetLabel(UnwindPrologEnd, prologEndLabel);
// Compute the FP now if there is a try present
if (layout.HasTry())
{
Lowerer::InsertAdd(false, fpOpnd, spOpnd, IR::IntConstOpnd::New(layout.FpLrOffset(), TyMachReg, this->m_func), insertInstr);
}
// Zero the argument slot if present
IR::RegOpnd *zrOpnd = IR::RegOpnd::New(nullptr, RegZR, TyMachReg, this->m_func);
if (layout.ArgSlotSize() > 0)
{
IR::Instr * instrStp = IR::Instr::New(Js::OpCode::STP,
IR::IndirOpnd::New(regAreaBaseOpnd, layout.ArgSlotOffset() - regAreaBaseOffset, TyMachReg, this->m_func),
zrOpnd, zrOpnd, this->m_func);
insertInstr->InsertBefore(instrStp);
}
// Home parameter registers in pairs
if (!layout.HomedParams().IsEmpty())
{
ULONG curOffset = layout.HomedParamsOffset() - regAreaBaseOffset;
for (RegNum curReg = FIRST_INT_ARG_REG; curReg <= LAST_INT_ARG_REG; curReg = RegNum(curReg + 2))
{
if (layout.HomedParams().Test(curReg))
{
RegNum nextReg = RegNum(curReg + 1);
IR::Instr * instrStp = IR::Instr::New(Js::OpCode::STP,
IR::IndirOpnd::New(regAreaBaseOpnd, curOffset, TyMachReg, this->m_func),
IR::RegOpnd::New(curReg, TyMachReg, this->m_func),
IR::RegOpnd::New(nextReg, TyMachReg, this->m_func), this->m_func);
insertInstr->InsertBefore(instrStp);
curOffset += 2 * MachRegInt;
}
}
}
// Compute the locals pointer if needed
RegNum localsReg = this->m_func->GetLocalsPointer();
if (localsReg != RegSP)
{
IR::RegOpnd* localsOpnd = IR::RegOpnd::New(nullptr, localsReg, TyMachReg, this->m_func);
Lowerer::InsertAdd(false, localsOpnd, spOpnd, IR::IntConstOpnd::New(layout.LocalsOffset(), TyMachReg, this->m_func), insertInstr);
}
// Zero initialize the first inlinee frames argc.
if (this->m_func->GetMaxInlineeArgOutSize() != 0)
{
// STR argc, zr
StackSym *sym = this->m_func->m_symTable->GetArgSlotSym((Js::ArgSlot) - 1);
sym->m_isInlinedArgSlot = true;
sym->m_offset = 0;
IR::Instr * instrStr = IR::Instr::New(Js::OpCode::STR, IR::SymOpnd::New(sym, 0, TyMachReg, this->m_func), zrOpnd, this->m_func);
insertInstr->InsertBefore(instrStr);
}
// Now do the stack probe for small stacks
// hasCalls catches the recursion case
if (layout.HasCalls() && fStackProbeAfterProlog)
{
GenerateStackProbe(insertInstr, true); //stack is already aligned in this case
}
return entryInstr;
}
IR::Instr *
LowererMD::LowerExitInstr(IR::ExitInstr * exitInstr)
{
// Compute the final layout (should match the prolog)
ARM64StackLayout layout(this->m_func);
Assert(layout.TotalStackSize() % 16 == 0);
// Determine the 1 or 2 stack allocation sizes
// Note that on exit, if there is a try, we always do a 2-step deallocation because the
// epilog is re-used by the try/catch/finally code
ULONG stackAllocation1 = (layout.TotalStackSize() < 512 && !layout.HasTry()) ? layout.TotalStackSize() : layout.RegisterAreaSize();
ULONG stackAllocation2 = layout.TotalStackSize() - stackAllocation1;
// Mark the start of the epilog
IR::LabelInstr *epilogStartLabel = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
exitInstr->InsertBefore(epilogStartLabel);
this->m_func->m_unwindInfo.SetFunctionOffsetLabel(UnwindEpilogStart, epilogStartLabel);
IR::RegOpnd *spOpnd = IR::RegOpnd::New(nullptr, RegSP, TyMachReg, this->m_func);
IR::RegOpnd *fpOpnd = IR::RegOpnd::New(nullptr, RegFP, TyMachReg, this->m_func);
// Exception handling regions exit via the same epilog
IR::LabelInstr* ehEpilogLabel = this->m_func->m_epilogLabel;
if (ehEpilogLabel != nullptr)
{
ehEpilogLabel->Unlink();
exitInstr->InsertBefore(ehEpilogLabel);
}
// Undo the last stack allocation
if (stackAllocation2 > 0)
{
GenerateStackDeallocation(exitInstr, stackAllocation2);
}
// Recover FP and LR
if (layout.HasCalls())
{
// LDP fp, lr, [sp, #offs]
ULONG fpOffset = layout.FpLrOffset() - stackAllocation2;
IR::Instr * instrLdp = IR::Instr::New(Js::OpCode::LDP, fpOpnd,
IR::IndirOpnd::New(spOpnd, fpOffset, TyMachReg, this->m_func),
IR::RegOpnd::New(RegLR, TyMachReg, this->m_func), this->m_func);
exitInstr->InsertBefore(instrLdp);
}
// Recover integer registers in pairs
if (!layout.SavedRegisters().IsEmpty())
{
ULONG curOffset = layout.SavedRegistersOffset() - stackAllocation2 + layout.SavedRegistersSize();
for (RegNum curReg = RegNum(LAST_CALLEE_SAVED_GP_REG - 1); curReg >= FIRST_CALLEE_SAVED_GP_REG; curReg = RegNum(curReg - 2))
{
if (layout.SavedRegisters().Test(curReg))
{
curOffset -= 2 * MachRegInt;
RegNum nextReg = RegNum(curReg + 1);
IR::Instr * instrLdp = IR::Instr::New(Js::OpCode::LDP,
IR::RegOpnd::New(curReg, TyMachReg, this->m_func),
IR::IndirOpnd::New(spOpnd, curOffset, TyMachReg, this->m_func),
IR::RegOpnd::New(nextReg, TyMachReg, this->m_func), this->m_func);
exitInstr->InsertBefore(instrLdp);
}
}
}
// Recover doubles in pairs
if (!layout.SavedDoubles().IsEmpty())
{
ULONG curOffset = layout.SavedDoublesOffset() - stackAllocation2 + layout.SavedDoublesSize();
for (RegNum curReg = RegNum(LAST_CALLEE_SAVED_DBL_REG - 1); curReg >= FIRST_CALLEE_SAVED_DBL_REG; curReg = RegNum(curReg - 2))
{
if (layout.SavedDoubles().Test(curReg))
{
curOffset -= 2 * MachRegDouble;
RegNum nextReg = RegNum(curReg + 1);
IR::Instr * instrLdp = IR::Instr::New(Js::OpCode::FLDP,
IR::RegOpnd::New(curReg, TyMachDouble, this->m_func),
IR::IndirOpnd::New(spOpnd, curOffset, TyMachReg, this->m_func),
IR::RegOpnd::New(nextReg, TyMachDouble, this->m_func), this->m_func);
exitInstr->InsertBefore(instrLdp);
}
}
}
// Final stack deallocation
if (stackAllocation1 > 0)
{
GenerateStackDeallocation(exitInstr, stackAllocation1);
}
// Return
IR::Instr * instrRet = IR::Instr::New(Js::OpCode::RET, nullptr, IR::RegOpnd::New(nullptr, RegLR, TyMachReg, this->m_func), this->m_func);
exitInstr->InsertBefore(instrRet);
// Label the end
IR::LabelInstr *epilogEndLabel = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
exitInstr->InsertBefore(epilogEndLabel);
this->m_func->m_unwindInfo.SetFunctionOffsetLabel(UnwindEpilogEnd, epilogEndLabel);
return exitInstr;
}
IR::Instr *
LowererMD::LoadNewScObjFirstArg(IR::Instr * instr, IR::Opnd * argSrc, ushort extraArgs)
{
// Spread moves down the argument slot by one.
// LowerCallArgs will handle the extraArgs. We only need to specify the argument number
// i.e 1 and not + extraArgs as done in AMD64
IR::SymOpnd *argOpnd = IR::SymOpnd::New(this->m_func->m_symTable->GetArgSlotSym(1), TyVar, this->m_func);
IR::Instr *argInstr = IR::Instr::New(Js::OpCode::ArgOut_A, argOpnd, argSrc, this->m_func);
instr->InsertBefore(argInstr);
// Insert the argument into the arg chain.
if (m_lowerer->IsSpreadCall(instr))
{
// Spread calls need LdSpreadIndices as the last arg in the arg chain.
instr = m_lowerer->GetLdSpreadIndicesInstr(instr);
}
IR::Opnd *linkOpnd = instr->UnlinkSrc2();
argInstr->SetSrc2(linkOpnd);
instr->SetSrc2(argOpnd);
return argInstr;
}
IR::Instr *
LowererMD::LowerTry(IR::Instr * tryInstr, IR::JnHelperMethod helperMethod)
{
// Mark the entry to the try
IR::Instr * instr = tryInstr->GetNextRealInstrOrLabel();
AssertMsg(instr->IsLabelInstr(), "No label at the entry to a try?");
IR::LabelInstr * tryAddr = instr->AsLabelInstr();
// Arg 7: ScriptContext
this->m_lowerer->LoadScriptContext(tryAddr);
if (tryInstr->m_opcode == Js::OpCode::TryCatch || this->m_func->DoOptimizeTry())
{
// Arg 6 : hasBailedOutOffset
IR::Opnd * hasBailedOutOffset = IR::IntConstOpnd::New(this->m_func->m_hasBailedOutSym->m_offset + tryInstr->m_func->GetInlineeArgumentStackSize(), TyInt32, this->m_func);
this->LoadHelperArgument(tryAddr, hasBailedOutOffset);
}
// Arg 5: arg out size
IR::RegOpnd * argOutSize = IR::RegOpnd::New(TyMachReg, this->m_func);
instr = IR::Instr::New(Js::OpCode::LDARGOUTSZ, argOutSize, this->m_func);
tryAddr->InsertBefore(instr);
this->LoadHelperArgument(tryAddr, argOutSize);
// Arg 4: locals pointer
IR::RegOpnd * localsPtr = IR::RegOpnd::New(nullptr, this->m_func->GetLocalsPointer(), TyMachReg, this->m_func);
this->LoadHelperArgument(tryAddr, localsPtr);
// Arg 3: frame pointer
IR::RegOpnd * framePtr = IR::RegOpnd::New(nullptr, FRAME_REG, TyMachReg, this->m_func);
this->LoadHelperArgument(tryAddr, framePtr);
// Arg 2: helper address
IR::LabelInstr * helperAddr = tryInstr->AsBranchInstr()->GetTarget();
this->LoadHelperArgument(tryAddr, IR::LabelOpnd::New(helperAddr, this->m_func));
// Arg 1: try address
this->LoadHelperArgument(tryAddr, IR::LabelOpnd::New(tryAddr, this->m_func));
// Call the helper
IR::RegOpnd *continuationAddr =
IR::RegOpnd::New(StackSym::New(TyMachReg,this->m_func), RETURN_REG, TyMachReg, this->m_func);
IR::Instr * callInstr = IR::Instr::New(
Js::OpCode::Call, continuationAddr, IR::HelperCallOpnd::New(helperMethod, this->m_func), this->m_func);
tryAddr->InsertBefore(callInstr);
this->LowerCall(callInstr, 0);
// Jump to the continuation address supplied by the helper
IR::BranchInstr *branchInstr = IR::MultiBranchInstr::New(Js::OpCode::BR, continuationAddr, this->m_func);
tryAddr->InsertBefore(branchInstr);
return tryInstr->m_prev;
}
IR::Instr *
LowererMD::LowerLeaveNull(IR::Instr * leaveInstr)
{
IR::Instr * instrPrev = leaveInstr->m_prev;
// Return a NULL continuation address to the caller to indicate that the finally did not seize the flow.
this->LowerEHRegionReturn(leaveInstr, IR::IntConstOpnd::New(0, TyMachReg, this->m_func));
leaveInstr->Remove();
return instrPrev;
}
IR::Instr *
LowererMD::LowerEHRegionReturn(IR::Instr * insertBeforeInstr, IR::Opnd * targetOpnd)
{
IR::RegOpnd *retReg = IR::RegOpnd::New(nullptr, RETURN_REG, TyMachReg, this->m_func);
// Load the continuation address into the return register.
Lowerer::InsertMove(retReg, targetOpnd, insertBeforeInstr);
IR::LabelInstr *epilogLabel = this->EnsureEHEpilogLabel();
IR::BranchInstr *jmpInstr = IR::BranchInstr::New(Js::OpCode::B, epilogLabel, this->m_func);
insertBeforeInstr->InsertBefore(jmpInstr);
// return the last instruction inserted
return jmpInstr;
}
///----------------------------------------------------------------------------
///
/// LowererMD::Init
///
///----------------------------------------------------------------------------
void
LowererMD::Init(Lowerer *lowerer)
{
m_lowerer = lowerer;
// The arg slot count computed by an earlier phase (e.g., IRBuilder) doesn't work for
// ARM if it accounts for nesting. Clear it here and let Lower compute its own value.
this->m_func->m_argSlotsForFunctionsCalled = 0;
}
///----------------------------------------------------------------------------
///
/// LowererMD::LoadInputParamPtr
///
/// Load the address of the start of the passed-in parameters not including
/// the this parameter.
///
///----------------------------------------------------------------------------
IR::Instr *
LowererMD::LoadInputParamPtr(IR::Instr * instrInsert, IR::RegOpnd * optionalDstOpnd /* = nullptr */)
{
if (this->m_func->GetJITFunctionBody()->IsCoroutine())
{
IR::RegOpnd * argPtrRegOpnd = Lowerer::LoadGeneratorArgsPtr(instrInsert);
IR::IndirOpnd * indirOpnd = IR::IndirOpnd::New(argPtrRegOpnd, 1 * MachPtr, TyMachPtr, this->m_func);
IR::RegOpnd * dstOpnd = optionalDstOpnd != nullptr ? optionalDstOpnd : IR::RegOpnd::New(TyMachPtr, this->m_func);
return Lowerer::InsertLea(dstOpnd, indirOpnd, instrInsert);
}
else
{
StackSym * paramSym = GetImplicitParamSlotSym(3);
return this->m_lowerer->InsertLoadStackAddress(paramSym, instrInsert);
}
}
///----------------------------------------------------------------------------
///
/// LowererMD::LoadInputParamCount
///
/// Load the passed-in parameter count from the appropriate slot.
///
///----------------------------------------------------------------------------
IR::Instr *
LowererMD::LoadInputParamCount(IR::Instr * instrInsert, int adjust, bool needFlags)
{
// LDR Rz, CallInfo
// UBFX Rx, Rz, 27, #1 // Get CallEval bit.
// UBFX Rz, Rz, 0, #24 // Extract call count
// SUB Rz, Rz, Rx // Now Rz has the right number of parameters
IR::SymOpnd * srcOpnd = Lowerer::LoadCallInfo(instrInsert);
IR::RegOpnd * dstOpnd = IR::RegOpnd::New(TyMachReg, this->m_func);
IR::Instr *instr = IR::Instr::New(Js::OpCode::LDR, dstOpnd, srcOpnd, this->m_func);
instrInsert->InsertBefore(instr);
// Get the actual call count. On ARM64 top 32 bits are unused
instr = IR::Instr::New(Js::OpCode::UBFX, dstOpnd, dstOpnd, IR::IntConstOpnd::New(BITFIELD(0, Js::CallInfo::ksizeofCount), TyMachReg, this->m_func), this->m_func);
instrInsert->InsertBefore(instr);
return Lowerer::InsertSub(needFlags, dstOpnd, dstOpnd, IR::IntConstOpnd::New(-adjust, TyUint32, this->m_func), instrInsert);
}
IR::Instr *
LowererMD::LoadStackArgPtr(IR::Instr * instr)
{
if (this->m_func->IsLoopBody())
{
// Get the first user param from the interpreter frame instance that was passed in.
// These args don't include the func object and callinfo; we just need to advance past "this".
// t1 = LDR [prm1 + m_inParams]
// dst = ADD t1, sizeof(var)
Assert(this->m_func->m_loopParamSym);
IR::RegOpnd *baseOpnd = IR::RegOpnd::New(this->m_func->m_loopParamSym, TyMachReg, this->m_func);
size_t offset = Js::InterpreterStackFrame::GetOffsetOfInParams();
IR::IndirOpnd *indirOpnd = IR::IndirOpnd::New(baseOpnd, (int32)offset, TyMachReg, this->m_func);
IR::RegOpnd *tmpOpnd = IR::RegOpnd::New(TyMachReg, this->m_func);
Lowerer::InsertMove(tmpOpnd, indirOpnd, instr);
instr->SetSrc1(tmpOpnd);
instr->SetSrc2(IR::IntConstOpnd::New(sizeof(Js::Var), TyMachReg, this->m_func));
}
else if (this->m_func->GetJITFunctionBody()->IsCoroutine())
{
IR::Instr *instr2 = LoadInputParamPtr(instr, instr->UnlinkDst()->AsRegOpnd());
instr->Remove();
instr = instr2;
}
else
{
// Get the args pointer relative to fp. We assume that fp is set up, since we'll only be looking
// for the stack arg pointer in a non-leaf.
// dst = ADD r11, "this" offset + sizeof(var)
instr->SetSrc1(IR::RegOpnd::New(nullptr, FRAME_REG, TyMachReg, this->m_func));
instr->SetSrc2(IR::IntConstOpnd::New((ArgOffsetFromFramePtr + Js::JavascriptFunctionArgIndex_SecondScriptArg) * sizeof(Js::Var), TyMachReg, this->m_func));
}
instr->m_opcode = Js::OpCode::ADD;
Legalize(instr);
return instr->m_prev;
}
IR::Instr *
LowererMD::LoadArgumentsFromFrame(IR::Instr * instr)
{
IR::RegOpnd *baseOpnd;
int32 offset;
if (this->m_func->IsLoopBody())
{
// Get the arguments ptr from the interpreter frame instance that was passed in.
Assert(this->m_func->m_loopParamSym);
baseOpnd = IR::RegOpnd::New(this->m_func->m_loopParamSym, TyMachReg, this->m_func);
offset = Js::InterpreterStackFrame::GetOffsetOfArguments();
}
else
{
// Get the arguments relative to the frame pointer.
baseOpnd = IR::RegOpnd::New(nullptr, FRAME_REG, TyMachReg, this->m_func);
offset = -MachArgsSlotOffset;
}
instr->SetSrc1(IR::IndirOpnd::New(baseOpnd, offset, TyMachReg, this->m_func));
this->ChangeToAssign(instr);
return instr->m_prev;
}
// load argument count as I4
IR::Instr *
LowererMD::LoadArgumentCount(IR::Instr * instr)
{
IR::RegOpnd *baseOpnd;
int32 offset;
if (this->m_func->IsLoopBody())
{
// Pull the arg count from the interpreter frame instance that was passed in.
// (The callinfo in the loop body's frame just shows the single parameter, the interpreter frame.)
Assert(this->m_func->m_loopParamSym);
baseOpnd = IR::RegOpnd::New(this->m_func->m_loopParamSym, TyMachReg, this->m_func);
offset = Js::InterpreterStackFrame::GetOffsetOfInSlotsCount();
}
else
{
baseOpnd = IR::RegOpnd::New(nullptr, FRAME_REG, TyMachReg, this->m_func);
offset = (ArgOffsetFromFramePtr + Js::JavascriptFunctionArgIndex_CallInfo) * sizeof(Js::Var);
}
instr->SetSrc1(IR::IndirOpnd::New(baseOpnd, offset, TyInt32, this->m_func));
this->ChangeToAssign(instr);
return instr->m_prev;
}
///----------------------------------------------------------------------------
///
/// LowererMD::LoadHeapArguments
///
/// Load the arguments object
/// NOTE: The same caveat regarding arguments passed on the stack applies here
/// as in LoadInputParamCount above.
///----------------------------------------------------------------------------
IR::Instr *
LowererMD::LoadHeapArguments(IR::Instr * instrArgs)
{
ASSERT_INLINEE_FUNC(instrArgs);
Func *func = instrArgs->m_func;
IR::Instr * instrPrev = instrArgs->m_prev;
if (func->IsStackArgsEnabled())
{
// The initial args slot value is zero.
instrArgs->m_opcode = Js::OpCode::LDIMM;
instrArgs->ReplaceSrc1(IR::AddrOpnd::NewNull(func));
if (PHASE_TRACE1(Js::StackArgFormalsOptPhase) && func->GetJITFunctionBody()->GetInParamsCount() > 1)
{
Output::Print(_u("StackArgFormals : %s (%d) :Removing Heap Arguments object creation in Lowerer. \n"), instrArgs->m_func->GetJITFunctionBody()->GetDisplayName(), instrArgs->m_func->GetFunctionNumber());
Output::Flush();
}
}
else
{
// s7 = formals are let decls
// s6 = memory context
// s5 = array of property ID's
// s4 = local frame instance
// s3 = address of first actual argument (after "this")
// s2 = actual argument count
// s1 = current function
// dst = JavascriptOperators::LoadHeapArguments(s1, s2, s3, s4, s5, s6, s7)
// s7 = formals are let decls
this->LoadHelperArgument(instrArgs, IR::IntConstOpnd::New(instrArgs->m_opcode == Js::OpCode::LdLetHeapArguments ? TRUE : FALSE, TyUint8, func));
// s6 = memory context
this->m_lowerer->LoadScriptContext(instrArgs);
// s5 = array of property ID's
intptr_t formalsPropIdArray = instrArgs->m_func->GetJITFunctionBody()->GetFormalsPropIdArrayAddr();
if (!formalsPropIdArray)
{
formalsPropIdArray = instrArgs->m_func->GetScriptContextInfo()->GetNullAddr();
}
IR::Opnd * argArray = IR::AddrOpnd::New(formalsPropIdArray, IR::AddrOpndKindDynamicMisc, m_func);
this->LoadHelperArgument(instrArgs, argArray);
// s4 = local frame instance
IR::Opnd * frameObj = instrArgs->UnlinkSrc1();
this->LoadHelperArgument(instrArgs, frameObj);
if (func->IsInlinee())
{
// s3 = address of first actual argument (after "this").
StackSym *firstRealArgSlotSym = func->GetInlineeArgvSlotOpnd()->m_sym->AsStackSym();
this->m_func->SetArgOffset(firstRealArgSlotSym, firstRealArgSlotSym->m_offset + MachPtr);
IR::Instr *instr = this->m_lowerer->InsertLoadStackAddress(firstRealArgSlotSym, instrArgs);
this->LoadHelperArgument(instrArgs, instr->GetDst());
// s2 = actual argument count (without counting "this").
this->LoadHelperArgument(instrArgs, IR::IntConstOpnd::New(func->actualCount - 1, TyUint32, func));
// s1 = current function.
this->LoadHelperArgument(instrArgs, func->GetInlineeFunctionObjectSlotOpnd());
// Save the newly-created args object to its dedicated stack slot.
IR::SymOpnd *argObjSlotOpnd = func->GetInlineeArgumentsObjectSlotOpnd();
Lowerer::InsertMove(argObjSlotOpnd,instrArgs->GetDst(), instrArgs->m_next);
}
else
{
// s3 = address of first actual argument (after "this")
// Stack looks like (function object)+0, (arg count)+4, (this)+8, actual args
IR::Instr * instr = this->LoadInputParamPtr(instrArgs);
this->LoadHelperArgument(instrArgs, instr->GetDst());
// s2 = actual argument count (without counting "this")
instr = this->LoadInputParamCount(instrArgs, -1);
IR::Opnd * opndInputParamCount = instr->GetDst();
this->LoadHelperArgument(instrArgs, opndInputParamCount);
// s1 = current function
StackSym * paramSym = GetImplicitParamSlotSym(0);
IR::Opnd * srcOpnd = IR::SymOpnd::New(paramSym, TyMachReg, func);
this->LoadHelperArgument(instrArgs, srcOpnd);
// Save the newly-created args object to its dedicated stack slot.
Lowerer::InsertMove(CreateStackArgumentsSlotOpnd(), instrArgs->GetDst(), instrArgs->m_next);
}
this->ChangeToHelperCall(instrArgs, IR::HelperOp_LoadHeapArguments);
}
return instrPrev;
}
///----------------------------------------------------------------------------
///
/// LowererMD::LoadHeapArgsCached
///
/// Load the heap-based arguments object using a cached scope
///
///----------------------------------------------------------------------------
IR::Instr *
LowererMD::LoadHeapArgsCached(IR::Instr * instrArgs)
{
Assert(!this->m_func->GetJITFunctionBody()->IsGenerator());
ASSERT_INLINEE_FUNC(instrArgs);
Func *func = instrArgs->m_func;
IR::Instr * instrPrev = instrArgs->m_prev;
if (instrArgs->m_func->IsStackArgsEnabled())
{
instrArgs->m_opcode = Js::OpCode::LDIMM;
instrArgs->ReplaceSrc1(IR::AddrOpnd::NewNull(func));
if (PHASE_TRACE1(Js::StackArgFormalsOptPhase) && func->GetJITFunctionBody()->GetInParamsCount() > 1)
{
Output::Print(_u("StackArgFormals : %s (%d) :Removing Heap Arguments object creation in Lowerer. \n"), instrArgs->m_func->GetJITFunctionBody()->GetDisplayName(), instrArgs->m_func->GetFunctionNumber());
Output::Flush();
}
}
else
{
// s7 = formals are let decls
// s6 = memory context
// s5 = local frame instance
// s4 = address of first actual argument (after "this")
// s3 = formal argument count
// s2 = actual argument count
// s1 = current function
// dst = JavascriptOperators::LoadHeapArgsCached(s1, s2, s3, s4, s5, s6, s7)
// s7 = formals are let decls
IR::Opnd * formalsAreLetDecls = IR::IntConstOpnd::New((IntConstType)(instrArgs->m_opcode == Js::OpCode::LdLetHeapArgsCached), TyUint8, func);
this->LoadHelperArgument(instrArgs, formalsAreLetDecls);
// s6 = memory context
this->m_lowerer->LoadScriptContext(instrArgs);
// s5 = local frame instance
IR::Opnd * frameObj = instrArgs->UnlinkSrc1();
this->LoadHelperArgument(instrArgs, frameObj);
if (func->IsInlinee())
{
// s4 = address of first actual argument (after "this").
StackSym *firstRealArgSlotSym = func->GetInlineeArgvSlotOpnd()->m_sym->AsStackSym();
this->m_func->SetArgOffset(firstRealArgSlotSym, firstRealArgSlotSym->m_offset + MachPtr);
IR::Instr *instr = this->m_lowerer->InsertLoadStackAddress(firstRealArgSlotSym, instrArgs);
this->LoadHelperArgument(instrArgs, instr->GetDst());
// s3 = formal argument count (without counting "this").
uint32 formalsCount = func->GetJITFunctionBody()->GetInParamsCount() - 1;
this->LoadHelperArgument(instrArgs, IR::IntConstOpnd::New(formalsCount, TyUint32, func));
// s2 = actual argument count (without counting "this").
this->LoadHelperArgument(instrArgs, IR::IntConstOpnd::New(func->actualCount - 1, TyUint32, func));
// s1 = current function.
this->LoadHelperArgument(instrArgs, func->GetInlineeFunctionObjectSlotOpnd());
// Save the newly-created args object to its dedicated stack slot.
IR::SymOpnd *argObjSlotOpnd = func->GetInlineeArgumentsObjectSlotOpnd();
Lowerer::InsertMove(argObjSlotOpnd, instrArgs->GetDst(), instrArgs->m_next);
}
else
{
// s4 = address of first actual argument (after "this")
IR::Instr * instr = this->LoadInputParamPtr(instrArgs);
this->LoadHelperArgument(instrArgs, instr->GetDst());
// s3 = formal argument count (without counting "this")
uint32 formalsCount = func->GetInParamsCount() - 1;
this->LoadHelperArgument(instrArgs, IR::IntConstOpnd::New(formalsCount, TyMachReg, func));
// s2 = actual argument count (without counting "this")
instr = this->LoadInputParamCount(instrArgs, -1);
this->LoadHelperArgument(instrArgs, instr->GetDst());
// s1 = current function
StackSym * paramSym = GetImplicitParamSlotSym(0);
IR::Opnd * srcOpnd = IR::SymOpnd::New(paramSym, TyMachReg, func);
this->LoadHelperArgument(instrArgs, srcOpnd);
// Save the newly-created args object to its dedicated stack slot.
Lowerer::InsertMove(CreateStackArgumentsSlotOpnd(), instrArgs->GetDst(), instrArgs->m_next);
}
this->ChangeToHelperCall(instrArgs, IR::HelperOp_LoadHeapArgsCached);
}
return instrPrev;
}
///----------------------------------------------------------------------------
///
/// LowererMD::ChangeToHelperCall
///
/// Change the current instruction to a call to the given helper.
///
///----------------------------------------------------------------------------
IR::Instr *
LowererMD::ChangeToHelperCall(IR::Instr * callInstr, IR::JnHelperMethod helperMethod, IR::LabelInstr *labelBailOut,
IR::Opnd *opndInstance, IR::PropertySymOpnd *propSymOpnd, bool isHelperContinuation)
{
IR::Instr * bailOutInstr = callInstr;
if (callInstr->HasBailOutInfo())
{
if (callInstr->GetBailOutKind() == IR::BailOutOnNotPrimitive)
{
callInstr = IR::Instr::New(callInstr->m_opcode, callInstr->m_func);
bailOutInstr->TransferTo(callInstr);
bailOutInstr->InsertBefore(callInstr);
bailOutInstr->m_opcode = Js::OpCode::BailOnNotPrimitive;
bailOutInstr->SetSrc1(opndInstance);
}
else
{
bailOutInstr = this->m_lowerer->SplitBailOnImplicitCall(callInstr);
}
}
IR::HelperCallOpnd *helperCallOpnd = Lowerer::CreateHelperCallOpnd(helperMethod, this->GetHelperArgsCount(), m_func);
if (helperCallOpnd->IsDiagHelperCallOpnd())
{
// Load arguments for the wrapper.
this->LoadHelperArgument(callInstr, IR::AddrOpnd::New((Js::Var)IR::GetMethodOriginalAddress(m_func->GetThreadContextInfo(), helperMethod), IR::AddrOpndKindDynamicMisc, m_func));
this->m_lowerer->LoadScriptContext(callInstr);
}
callInstr->SetSrc1(helperCallOpnd);
IR::Instr * instrRet = this->LowerCall(callInstr, 0);
if (bailOutInstr != callInstr)
{
// The bailout needs to be lowered after we lower the helper call because the helper argument
// has already been loaded. We need to drain them on AMD64 before starting another helper call
if (bailOutInstr->m_opcode == Js::OpCode::BailOnNotObject)
{
this->m_lowerer->LowerBailOnNotObject(bailOutInstr, nullptr, labelBailOut);
}
else if (bailOutInstr->m_opcode == Js::OpCode::BailOnNotPrimitive)
{
this->m_lowerer->LowerBailOnTrue(bailOutInstr, labelBailOut);
}
else
{
this->m_lowerer->LowerBailOnEqualOrNotEqual(bailOutInstr, nullptr, labelBailOut, propSymOpnd, isHelperContinuation);
}
}
return instrRet;
}
IR::Instr* LowererMD::ChangeToHelperCallMem(IR::Instr * instr, IR::JnHelperMethod helperMethod)
{
this->m_lowerer->LoadScriptContext(instr);
return this->ChangeToHelperCall(instr, helperMethod);
}
///----------------------------------------------------------------------------
///
/// LowererMD::ChangeToAssign
///
/// Change to a copy. Handle riscification of operands.
///
///----------------------------------------------------------------------------
// ToDo (SaAgarwa) Copied from ARM32 to compile. Validate is this correct
IR::Instr *
LowererMD::ChangeToAssignNoBarrierCheck(IR::Instr * instr)
{
return ChangeToAssign(instr, instr->GetDst()->GetType());
}
IR::Instr *
LowererMD::ChangeToAssign(IR::Instr * instr)
{
return ChangeToAssign(instr, instr->GetDst()->GetType());
}
IR::Instr *
LowererMD::ChangeToAssign(IR::Instr * instr, IRType destType)
{
Assert(!instr->HasBailOutInfo() || instr->GetBailOutKind() == IR::BailOutExpectingInteger
|| instr->GetBailOutKind() == IR::BailOutExpectingString);
IR::Opnd *src = instr->GetSrc1();
IRType srcType = src->GetType();
if (src->IsImmediateOpnd() || src->IsLabelOpnd())
{
instr->m_opcode = Js::OpCode::LDIMM;
}
else if(destType == TyFloat32 && instr->GetDst()->IsRegOpnd())
{
Assert(instr->GetSrc1()->IsFloat32());
instr->m_opcode = Js::OpCode::FLDR;
// Note that we allocate double register for single precision floats as well, as the register allocator currently
// does not support 32-bit float registers
instr->ReplaceDst(instr->GetDst()->UseWithNewType(TyFloat64, instr->m_func));
if(instr->GetSrc1()->IsRegOpnd())
{
instr->ReplaceSrc1(instr->GetSrc1()->UseWithNewType(TyFloat64, instr->m_func));
}
}
else if (!src->IsIndirOpnd() && TySize[destType] > TySize[srcType] && (IRType_IsSignedInt(destType) || IRType_IsUnsignedInt(destType)))
{
// If we're moving between different lengths of registers, we need to use the
// right operator - sign extend if the source is int, zero extend if uint.
if (IRType_IsSignedInt(srcType))
{
instr->ReplaceSrc1(src->UseWithNewType(IRType_EnsureSigned(destType), instr->m_func));
instr->SetSrc2(IR::IntConstOpnd::New(BITFIELD(0, TySize[srcType] * MachBits), TyMachReg, instr->m_func, true));
instr->m_opcode = Js::OpCode::SBFX;
}
else if (IRType_IsUnsignedInt(srcType))
{
instr->ReplaceSrc1(src->UseWithNewType(IRType_EnsureUnsigned(destType), instr->m_func));
instr->SetSrc2(IR::IntConstOpnd::New(BITFIELD(0, TySize[srcType] * MachBits), TyMachReg, instr->m_func, true));
instr->m_opcode = Js::OpCode::UBFX;
}
else
{
AssertMsg(false, "argument size mismatch for mov instruction, with non int/uint types!");
}
}
else
{
instr->m_opcode = IRType_IsFloat(destType) ? Js::OpCode::FMOV : Js::OpCode::MOV;
}
LegalizeMD::LegalizeInstr(instr, false);
return instr;
}
IR::Instr *
LowererMD::ChangeToWriteBarrierAssign(IR::Instr * assignInstr, const Func* func)
{
#ifdef RECYCLER_WRITE_BARRIER_JIT
// WriteBarrier-TODO- Implement ARM JIT
#endif
return ChangeToAssignNoBarrierCheck(assignInstr);
}
///----------------------------------------------------------------------------
///
/// LowererMD::LowerRet
///
/// Lower Ret to "MOV EAX, src"
/// The real RET is inserted at the exit of the function when emitting the
/// epilog.
///
///----------------------------------------------------------------------------
IR::Instr *
LowererMD::LowerRet(IR::Instr * retInstr)
{
IR::RegOpnd *retReg = IR::RegOpnd::New(TyMachReg, m_func);
retReg->SetReg(RETURN_REG);
Lowerer::InsertMove(retReg, retInstr->UnlinkSrc1(), retInstr);
retInstr->SetSrc1(retReg);
return retInstr;
}
///----------------------------------------------------------------------------
///
/// LowererMD::MDBranchOpcode
///
/// Map HIR branch opcode to machine-dependent equivalent.
///
///----------------------------------------------------------------------------
Js::OpCode
LowererMD::MDBranchOpcode(Js::OpCode opcode)
{
switch (opcode)
{
case Js::OpCode::BrEq_A:
case Js::OpCode::BrSrEq_A:
case Js::OpCode::BrNotNeq_A:
case Js::OpCode::BrSrNotNeq_A:
case Js::OpCode::BrAddr_A:
return Js::OpCode::BEQ;
case Js::OpCode::BrNeq_A:
case Js::OpCode::BrSrNeq_A:
case Js::OpCode::BrNotEq_A:
case Js::OpCode::BrSrNotEq_A:
case Js::OpCode::BrNotAddr_A:
return Js::OpCode::BNE;
case Js::OpCode::BrLt_A:
case Js::OpCode::BrNotGe_A:
return Js::OpCode::BLT;
case Js::OpCode::BrLe_A:
case Js::OpCode::BrNotGt_A:
return Js::OpCode::BLE;
case Js::OpCode::BrGt_A:
case Js::OpCode::BrNotLe_A:
return Js::OpCode::BGT;
case Js::OpCode::BrGe_A:
case Js::OpCode::BrNotLt_A:
return Js::OpCode::BGE;
case Js::OpCode::BrUnGt_A:
return Js::OpCode::BHI;
case Js::OpCode::BrUnGe_A:
return Js::OpCode::BCS;
case Js::OpCode::BrUnLt_A:
return Js::OpCode::BCC;
case Js::OpCode::BrUnLe_A:
return Js::OpCode::BLS;
default:
AssertMsg(0, "NYI");
return opcode;
}
}
Js::OpCode
LowererMD::MDUnsignedBranchOpcode(Js::OpCode opcode)
{
switch (opcode)
{
case Js::OpCode::BrEq_A:
case Js::OpCode::BrSrEq_A:
case Js::OpCode::BrSrNotNeq_A:
case Js::OpCode::BrNotNeq_A:
case Js::OpCode::BrAddr_A:
return Js::OpCode::BEQ;
case Js::OpCode::BrNeq_A:
case Js::OpCode::BrSrNeq_A:
case Js::OpCode::BrSrNotEq_A:
case Js::OpCode::BrNotEq_A:
case Js::OpCode::BrNotAddr_A:
return Js::OpCode::BNE;
case Js::OpCode::BrLt_A:
case Js::OpCode::BrNotGe_A:
return Js::OpCode::BCC;
case Js::OpCode::BrLe_A:
case Js::OpCode::BrNotGt_A:
return Js::OpCode::BLS;
case Js::OpCode::BrGt_A:
case Js::OpCode::BrNotLe_A:
return Js::OpCode::BHI;
case Js::OpCode::BrGe_A:
case Js::OpCode::BrNotLt_A:
return Js::OpCode::BCS;
default:
AssertMsg(0, "NYI");
return opcode;
}
}
Js::OpCode LowererMD::MDCompareWithZeroBranchOpcode(Js::OpCode opcode)
{
Assert(opcode == Js::OpCode::BrLt_A || opcode == Js::OpCode::BrGe_A);
return opcode == Js::OpCode::BrLt_A ? Js::OpCode::BMI : Js::OpCode::BPL;
}
void LowererMD::ChangeToAdd(IR::Instr *const instr, const bool needFlags)
{
Assert(instr);
Assert(instr->GetDst());
Assert(instr->GetSrc1());
Assert(instr->GetSrc2());
if(instr->GetDst()->IsFloat64())
{
Assert(instr->GetSrc1()->IsFloat64());
Assert(instr->GetSrc2()->IsFloat64());
Assert(!needFlags);
instr->m_opcode = Js::OpCode::FADD;
return;
}
instr->m_opcode = needFlags ? Js::OpCode::ADDS : Js::OpCode::ADD;
}
void LowererMD::ChangeToSub(IR::Instr *const instr, const bool needFlags)
{
Assert(instr);
Assert(instr->GetDst());
Assert(instr->GetSrc1());
Assert(instr->GetSrc2());
if(instr->GetDst()->IsFloat64())
{
Assert(instr->GetSrc1()->IsFloat64());
Assert(instr->GetSrc2()->IsFloat64());
Assert(!needFlags);
instr->m_opcode = Js::OpCode::FSUB;
return;
}
instr->m_opcode = needFlags ? Js::OpCode::SUBS : Js::OpCode::SUB;
}
void LowererMD::ChangeToShift(IR::Instr *const instr, const bool needFlags)
{
Assert(instr);
Assert(instr->GetDst());
Assert(instr->GetSrc1());
Assert(instr->GetSrc2());
Func *const func = instr->m_func;
switch(instr->m_opcode)
{
case Js::OpCode::Shl_A:
case Js::OpCode::Shl_I4:
Assert(!needFlags); // not implemented
instr->m_opcode = Js::OpCode::LSL;
break;
case Js::OpCode::Shr_A:
case Js::OpCode::Shr_I4:
Assert(!needFlags); // not implemented
instr->m_opcode = Js::OpCode::ASR;
break;
case Js::OpCode::ShrU_A:
case Js::OpCode::ShrU_I4:
Assert(!needFlags); // not implemented
instr->m_opcode = Js::OpCode::LSR;
break;
default:
Assert(false);
__assume(false);
}
// Javascript requires the ShiftCount is masked to the bottom 5 bits.
if(instr->GetSrc2()->IsIntConstOpnd())
{
// In the constant case, do the mask manually.
IntConstType immed = instr->GetSrc2()->AsIntConstOpnd()->GetValue() & 0x1f;
if (immed == 0)
{
// Shift by zero is just a move, and the shift-right instructions
// don't permit encoding of a zero shift amount.
instr->m_opcode = Js::OpCode::MOV;
instr->FreeSrc2();
}
else
{
instr->GetSrc2()->AsIntConstOpnd()->SetValue(immed);
}
}
else
{
// In the variable case, generate code to do the mask.
IR::Opnd *const src2 = instr->UnlinkSrc2();
instr->SetSrc2(IR::RegOpnd::New(TyInt32, func));
IR::Instr *const newInstr = IR::Instr::New(
Js::OpCode::AND, instr->GetSrc2(), src2, IR::IntConstOpnd::New(0x1f, TyInt8, func), func);
instr->InsertBefore(newInstr);
}
}
const uint16
LowererMD::GetFormalParamOffset()
{
//In ARM formal params are offset into the param area.
//So we only count the non-user params (Function object & CallInfo and let the encoder account for the saved R11 and LR
return 2;
}
///----------------------------------------------------------------------------
///
/// LowererMD::LowerCondBranch
///
///----------------------------------------------------------------------------
IR::Instr *
LowererMD::LowerCondBranch(IR::Instr * instr)
{
AssertMsg(instr->GetSrc1() != nullptr, "Expected src opnds on conditional branch");
IR::Opnd * opndSrc1 = instr->UnlinkSrc1();
IR::Instr * instrPrev = nullptr;
switch (instr->m_opcode)
{
case Js::OpCode::BrTrue_A:
case Js::OpCode::BrOnNotEmpty:
case Js::OpCode::BrNotNull_A:
case Js::OpCode::BrOnObject_A:
case Js::OpCode::BrOnClassConstructor:
case Js::OpCode::BrOnBaseConstructorKind:
Assert(!opndSrc1->IsFloat64());
AssertMsg(opndSrc1->IsRegOpnd(),"NYI for other operands");
AssertMsg(instr->GetSrc2() == nullptr, "Expected 1 src on boolean branch");
instrPrev = IR::Instr::New(Js::OpCode::CMP, this->m_func);
instrPrev->SetSrc1(opndSrc1);
instrPrev->SetSrc2(IR::IntConstOpnd::New(0, TyInt32, m_func));
instr->InsertBefore(instrPrev);
LegalizeMD::LegalizeInstr(instrPrev, false);
instr->m_opcode = Js::OpCode::BNE;
break;
case Js::OpCode::BrFalse_A:
case Js::OpCode::BrOnEmpty:
Assert(!opndSrc1->IsFloat64());
AssertMsg(opndSrc1->IsRegOpnd(),"NYI for other operands");
AssertMsg(instr->GetSrc2() == nullptr, "Expected 1 src on boolean branch");
instrPrev = IR::Instr::New(Js::OpCode::CMP, this->m_func);
instrPrev->SetSrc1(opndSrc1);
instrPrev->SetSrc2(IR::IntConstOpnd::New(0, TyInt32, m_func));
instr->InsertBefore(instrPrev);
LegalizeMD::LegalizeInstr(instrPrev, false);
instr->m_opcode = Js::OpCode::BEQ;
break;
default:
IR::Opnd * opndSrc2 = instr->UnlinkSrc2();
AssertMsg(opndSrc2 != nullptr, "Expected 2 src's on non-boolean branch");
if (opndSrc1->IsFloat64())
{
AssertMsg(opndSrc1->IsRegOpnd(),"NYI for other operands");
Assert(opndSrc2->IsFloat64());
Assert(opndSrc2->IsRegOpnd() && opndSrc1->IsRegOpnd());
//This comparison updates the FPSCR - floating point status control register
instrPrev = IR::Instr::New(Js::OpCode::FCMP, this->m_func);
instrPrev->SetSrc1(opndSrc1);
instrPrev->SetSrc2(opndSrc2);
instr->InsertBefore(instrPrev);
LegalizeMD::LegalizeInstr(instrPrev, false);
instr->m_opcode = LowererMD::MDBranchOpcode(instr->m_opcode);
}
else
{
AssertMsg(opndSrc2->IsRegOpnd() || opndSrc2->IsIntConstOpnd() || (opndSrc2->IsAddrOpnd()), "NYI for other operands");
instrPrev = IR::Instr::New(Js::OpCode::CMP, this->m_func);
instrPrev->SetSrc1(opndSrc1);
instrPrev->SetSrc2(opndSrc2);
instr->InsertBefore(instrPrev);
LegalizeMD::LegalizeInstr(instrPrev, false);
instr->m_opcode = MDBranchOpcode(instr->m_opcode);
}
break;
}
return instr;
}
///----------------------------------------------------------------------------
///
/// LowererMD::ForceDstToReg
///
///----------------------------------------------------------------------------
IR::Instr*
LowererMD::ForceDstToReg(IR::Instr *instr)
{
IR::Opnd * dst = instr->GetDst();
if (dst->IsRegOpnd())
{
return instr;
}
IR::Instr * newInstr = instr->SinkDst(Js::OpCode::Ld_A);
LowererMD::ChangeToAssign(newInstr);
return newInstr;
}
IR::Instr *
LowererMD::LoadFunctionObjectOpnd(IR::Instr *instr, IR::Opnd *&functionObjOpnd)
{
IR::Opnd * src1 = instr->GetSrc1();
IR::Instr * instrPrev = instr->m_prev;
if (src1 == nullptr)
{
IR::RegOpnd * regOpnd = IR::RegOpnd::New(TyMachPtr, m_func);
//function object is first argument and mark it as IsParamSlotSym.
StackSym *paramSym = GetImplicitParamSlotSym(0);
IR::SymOpnd *paramOpnd = IR::SymOpnd::New(paramSym, TyMachPtr, m_func);
instrPrev = Lowerer::InsertMove(regOpnd, paramOpnd, instr);
functionObjOpnd = instrPrev->GetDst();
}
else
{
// Inlinee LdHomeObj, use the function object opnd on the instruction
functionObjOpnd = instr->UnlinkSrc1();
if (!functionObjOpnd->IsRegOpnd())
{
Assert(functionObjOpnd->IsAddrOpnd());
}
}
return instrPrev;
}
bool
LowererMD::GenerateFastDiv(IR::Instr *instrDiv)
{
return false;
}
void
LowererMD::GenerateFastDivByPow2(IR::Instr *instrDiv)
{
//// Given:
//// dst = Div_A src1, src2
//// where src2 == power of 2
////
//// Generate:
//// (observation: positive q divides by p equally, where p = power of 2, if q's binary representation
//// has all zeroes to the right of p's power 2 bit, try to see if that is the case)
//// s1 = AND src1, 0x80000001 | ((src2Value - 1) << 1)
//// CMP s1, 1
//// BNE $doesntDivideEqually
//// s1 = ASR src1, log2(src2Value) -- do the equal divide
//// dst = EOR s1, 1 -- restore tagged int bit
//// B $done
//// $doesntDivideEqually:
//// (now check if it divides with the remainder of 1, for which we can do integer divide and accommodate with +0.5
//// note that we need only the part that is to the left of p's power 2 bit)
//// s1 = AND s1, 0x80000001 | (src2Value - 1)
//// CMP s1, 1
//// BNE $helper
//// s1 = ASR src1, log2(src2Value) + 1 -- do the integer divide and also shift out the tagged int bit
//// PUSH 0xXXXXXXXX (ScriptContext)
//// PUSH s1
//// dst = CALL Op_FinishOddDivByPow2 -- input: actual value, scriptContext; output: JavascriptNumber with 0.5 added to the input
//// JMP $done
//// $helper:
//// ...
//// $done:
//if (instrDiv->GetSrc1()->IsRegOpnd() && instrDiv->GetSrc1()->AsRegOpnd()->m_sym->m_isNotInt)
//{
// return;
//}
//IR::Opnd *dst = instrDiv->GetDst();
//IR::Opnd *src1 = instrDiv->GetSrc1();
//IR::AddrOpnd *src2 = instrDiv->GetSrc2()->IsAddrOpnd() ? instrDiv->GetSrc2()->AsAddrOpnd() : nullptr;
//IR::LabelInstr *doesntDivideEqually = IR::LabelInstr::New(Js::OpCode::Label, m_func);
//IR::LabelInstr *helper = IR::LabelInstr::New(Js::OpCode::Label, m_func, true);
//IR::LabelInstr *done = IR::LabelInstr::New(Js::OpCode::Label, m_func);
//IR::RegOpnd *s1 = IR::RegOpnd::New(TyVar, m_func);
//IR::Instr *instr;
//Assert(src2 && src2->IsVar() && Js::TaggedInt::Is(src2->m_address) && (Math::IsPow2(Js::TaggedInt::ToInt32(src2->m_address))));
//int32 src2Value = Js::TaggedInt::ToInt32(src2->m_address);
//// s1 = AND src1, 0x80000001 | ((src2Value - 1) << 1)
//instr = IR::Instr::New(Js::OpCode::AND, s1, src1, IR::IntConstOpnd::New((0x80000001 | ((src2Value - 1) << 1)), TyInt32, m_func), m_func);
//instrDiv->InsertBefore(instr);
//LegalizeMD::LegalizeInstr(instr, false);
//// CMP s1, 1
//instr = IR::Instr::New(Js::OpCode::CMP, m_func);
//instr->SetSrc1(s1);
//instr->SetSrc2(IR::IntConstOpnd::New(1, TyInt32, m_func));
//instrDiv->InsertBefore(instr);
//// BNE $doesntDivideEqually
//instr = IR::BranchInstr::New(Js::OpCode::BNE, doesntDivideEqually, m_func);
//instrDiv->InsertBefore(instr);
//// s1 = ASR src1, log2(src2Value) -- do the equal divide
//instr = IR::Instr::New(Js::OpCode::ASR, s1, src1, IR::IntConstOpnd::New(Math::Log2(src2Value), TyInt32, m_func), m_func);
//instrDiv->InsertBefore(instr);
//LegalizeMD::LegalizeInstr(instr, false);
//// dst = ORR s1, 1 -- restore tagged int bit
//instr = IR::Instr::New(Js::OpCode::ORR, dst, s1, IR::IntConstOpnd::New(1, TyInt32, m_func), m_func);
//instrDiv->InsertBefore(instr);
//LegalizeMD::LegalizeInstr(instr, false);
//
//// B $done
//instr = IR::BranchInstr::New(Js::OpCode::B, done, m_func);
//instrDiv->InsertBefore(instr);
//// $doesntDivideEqually:
//instrDiv->InsertBefore(doesntDivideEqually);
//// s1 = AND s1, 0x80000001 | (src2Value - 1)
//instr = IR::Instr::New(Js::OpCode::AND, s1, s1, IR::IntConstOpnd::New((0x80000001 | (src2Value - 1)), TyInt32, m_func), m_func);
//instrDiv->InsertBefore(instr);
//// CMP s1, 1
//instr = IR::Instr::New(Js::OpCode::CMP, m_func);
//instr->SetSrc1(s1);
//instr->SetSrc2(IR::IntConstOpnd::New(1, TyInt32, m_func));
//instrDiv->InsertBefore(instr);
//// BNE $helper
//instrDiv->InsertBefore(IR::BranchInstr::New(Js::OpCode::BNE, helper, m_func));
//// s1 = ASR src1, log2(src2Value) + 1 -- do the integer divide and also shift out the tagged int bit
//instr = IR::Instr::New(Js::OpCode::ASR, s1, src1, IR::IntConstOpnd::New(Math::Log2(src2Value) + 1, TyInt32, m_func), m_func);
//instrDiv->InsertBefore(instr);
//LegalizeMD::LegalizeInstr(instr, false);
//// Arg2: scriptContext
//IR::JnHelperMethod helperMethod;
//if (instrDiv->dstIsTempNumber)
//{
// // Var JavascriptMath::FinishOddDivByPow2_InPlace(uint32 value, ScriptContext *scriptContext, __out JavascriptNumber* result)
// helperMethod = IR::HelperOp_FinishOddDivByPow2InPlace;
// Assert(dst->IsRegOpnd());
// StackSym * tempNumberSym = this->m_lowerer->GetTempNumberSym(dst, instr->dstIsTempNumberTransferred);
// instr = this->m_lowerer->InsertLoadStackAddress(tempNumberSym, instrDiv);
// LegalizeMD::LegalizeInstr(instr, false);
// this->LoadHelperArgument(instrDiv, instr->GetDst());
//}
//else
//{
// // Var JavascriptMath::FinishOddDivByPow2(uint32 value, ScriptContext *scriptContext)
// helperMethod = IR::HelperOp_FinishOddDivByPow2;
//}
//this->m_lowerer->LoadScriptContext(instrDiv);
//// Arg1: value
//this->LoadHelperArgument(instrDiv, s1);
//// dst = CALL Op_FinishOddDivByPow2 -- input: actual value, output: JavascriptNumber with 0.5 added to the input
//instr = IR::Instr::New(Js::OpCode::Call, dst, IR::HelperCallOpnd::New(helperMethod, m_func), m_func);
//instrDiv->InsertBefore(instr);
//this->LowerCall(instr, 0);
//// JMP $done
//instrDiv->InsertBefore(IR::BranchInstr::New(Js::OpCode::B, done, m_func));
//// $helper:
//instrDiv->InsertBefore(helper);
//// $done:
//instrDiv->InsertAfter(done);
return;
}
///----------------------------------------------------------------------------
///
/// LowererMD::GenerateFastCmSrEqConst
///
///----------------------------------------------------------------------------
bool
LowererMD::GenerateFastCmSrEqConst(IR::Instr *instr)
{
//
// Given:
// s1 = CmSrEq_A s2, s3
// where either s2 or s3 is 'null', 'true' or 'false'
//
// Generate:
//
// CMP s2, s3
// JEQ $mov_true
// MOV s1, Library.GetFalse()
// JMP $done
// $mov_true:
// MOV s1, Library.GetTrue()
// $done:
//
Assert(m_lowerer->IsConstRegOpnd(instr->GetSrc2()->AsRegOpnd()));
return false;
}
bool LowererMD::GenerateFastCmXxI4(IR::Instr *instr)
{
return this->GenerateFastCmXxTaggedInt(instr);
}
///----------------------------------------------------------------------------
///
/// LowererMD::GenerateFastCmXxTaggedInt
///
///----------------------------------------------------------------------------
bool LowererMD::GenerateFastCmXxTaggedInt(IR::Instr *instr, bool isInHelper /* = false */)
{
// The idea is to do an inline compare if we can prove that both sources
// are tagged ints (i.e., are vars with the low bit set).
//
// Given:
//
// Cmxx_A dst, src1, src2
//
// Generate:
//
// (If not Int31's, goto $helper)
// LDIMM dst, trueResult
// CMP src1, src2
// BEQ $fallthru
// LDIMM dst, falseResult
// B $fallthru
// $helper:
// (caller will generate normal helper call sequence)
// $fallthru:
IR::Opnd * src1 = instr->GetSrc1();
IR::Opnd * src2 = instr->GetSrc2();
IR::Opnd * dst = instr->GetDst();
IR::LabelInstr * helper = IR::LabelInstr::New(Js::OpCode::Label, m_func, true);
IR::LabelInstr * fallthru = IR::LabelInstr::New(Js::OpCode::Label, m_func, isInHelper);
Assert(src1 && src2 && dst);
// Not tagged ints?
if (src1->IsRegOpnd() && src1->AsRegOpnd()->m_sym->m_isNotInt)
{
return false;
}
if (src2->IsRegOpnd() && src2->AsRegOpnd()->m_sym->m_isNotInt)
{
return false;
}
Js::OpCode opcode = Js::OpCode::InvalidOpCode;
switch ( instr->m_opcode)
{
case Js::OpCode::CmEq_A:
case Js::OpCode::CmSrEq_A:
case Js::OpCode::CmEq_I4:
opcode = Js::OpCode::BEQ;
break;
case Js::OpCode::CmNeq_A:
case Js::OpCode::CmSrNeq_A:
case Js::OpCode::CmNeq_I4:
opcode = Js::OpCode::BNE;
break;
case Js::OpCode::CmGt_A:
case Js::OpCode::CmGt_I4:
opcode = Js::OpCode::BGT;
break;
case Js::OpCode::CmGe_A:
case Js::OpCode::CmGe_I4:
opcode = Js::OpCode::BGE;
break;
case Js::OpCode::CmLt_A:
case Js::OpCode::CmLt_I4:
opcode = Js::OpCode::BLT;
break;
case Js::OpCode::CmLe_A:
case Js::OpCode::CmLe_I4:
opcode = Js::OpCode::BLE;
break;
case Js::OpCode::CmUnGt_A:
case Js::OpCode::CmUnGt_I4:
opcode = Js::OpCode::BHI;
break;
case Js::OpCode::CmUnGe_A:
case Js::OpCode::CmUnGe_I4:
opcode = Js::OpCode::BCS;
break;
case Js::OpCode::CmUnLt_A:
case Js::OpCode::CmUnLt_I4:
opcode = Js::OpCode::BCC;
break;
case Js::OpCode::CmUnLe_A:
case Js::OpCode::CmUnLe_I4:
opcode = Js::OpCode::BLS;
break;
default: Assert(false);
}
// Tagged ints?
bool isTaggedInts = false;
if (src1->IsTaggedInt() || src1->IsInt32())
{
if (src2->IsTaggedInt() || src2->IsInt32())
{
isTaggedInts = true;
}
}
if (!isTaggedInts)
{
this->GenerateSmIntPairTest(instr, src1, src2, helper);
}
if (dst->IsEqual(src1))
{
IR::RegOpnd *newSrc1 = IR::RegOpnd::New(TyMachReg, m_func);
Lowerer::InsertMove(newSrc1, src1, instr);
src1 = newSrc1;
}
if (dst->IsEqual(src2))
{
IR::RegOpnd *newSrc2 = IR::RegOpnd::New(TyMachReg, m_func);
Lowerer::InsertMove(newSrc2, src2, instr);
src2 = newSrc2;
}
IR::Opnd *opndTrue, *opndFalse;
if (dst->IsInt32())
{
opndTrue = IR::IntConstOpnd::New(1, TyMachReg, this->m_func);
opndFalse = IR::IntConstOpnd::New(0, TyMachReg, this->m_func);
}
else
{
opndTrue = m_lowerer->LoadLibraryValueOpnd(instr, LibraryValue::ValueTrue);
opndFalse = m_lowerer->LoadLibraryValueOpnd(instr, LibraryValue::ValueFalse);
}
// LDIMM dst, trueResult
// CMP src1, src2
// BEQ $fallthru
// LDIMM dst, falseResult
// B $fallthru
src1 = src1->UseWithNewType(TyInt32, m_func);
src2 = src2->UseWithNewType(TyInt32, m_func);
instr->InsertBefore(IR::Instr::New(Js::OpCode::LDIMM, dst, opndTrue, m_func));
IR::Instr *instrCmp = IR::Instr::New(Js::OpCode::CMP, m_func);
instrCmp->SetSrc1(src1);
instrCmp->SetSrc2(src2);
instr->InsertBefore(instrCmp);
LegalizeMD::LegalizeInstr(instrCmp,false);
instr->InsertBefore(IR::BranchInstr::New(opcode, fallthru, m_func));
instr->InsertBefore(IR::Instr::New(Js::OpCode::LDIMM, dst, opndFalse, m_func));
if (isTaggedInts)
{
instr->InsertAfter(fallthru);
instr->Remove();
return true;
}
// B $fallthru
instr->InsertBefore(IR::BranchInstr::New(Js::OpCode::B, fallthru, m_func));
instr->InsertBefore(helper);
instr->InsertAfter(fallthru);
return false;
}
IR::Instr * LowererMD::GenerateConvBool(IR::Instr *instr)
{
// dst = LDIMM true
// TST src1, src2
// BNE fallthrough
// dst = LDIMM false
// fallthrough:
IR::RegOpnd *dst = instr->GetDst()->AsRegOpnd();
IR::RegOpnd *src1 = instr->GetSrc1()->AsRegOpnd();
IR::Opnd *opndTrue = m_lowerer->LoadLibraryValueOpnd(instr, LibraryValue::ValueTrue);
IR::Opnd *opndFalse = m_lowerer->LoadLibraryValueOpnd(instr, LibraryValue::ValueFalse);
IR::LabelInstr *fallthru = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
// dst = LDIMM true
IR::Instr *instrFirst = IR::Instr::New(Js::OpCode::LDIMM, dst, opndTrue, m_func);
instr->InsertBefore(instrFirst);
// TST src1, src2
IR::Instr *instrTst = IR::Instr::New(Js::OpCode::TST, m_func);
instrTst->SetSrc1(src1);
instrTst->SetSrc2(src1);
instr->InsertBefore(instrTst);
LegalizeMD::LegalizeInstr(instrTst, false);
// BNE fallthrough
instr->InsertBefore(IR::BranchInstr::New(Js::OpCode::BNE, fallthru, m_func));
// dst = LDIMM false
instr->InsertBefore(IR::Instr::New(Js::OpCode::LDIMM, dst, opndFalse, m_func));
// fallthrough:
instr->InsertAfter(fallthru);
instr->Remove();
return instrFirst;
}
///----------------------------------------------------------------------------
///
/// LowererMD::GenerateFastAdd
///
/// NOTE: We assume that only the sum of two Int31's will have 0x2 set. This
/// is only true until we have a var type with tag == 0x2.
///
///----------------------------------------------------------------------------
bool
LowererMD::GenerateFastAdd(IR::Instr * instrAdd)
{
// Given:
//
// dst = Add src1, src2
//
// Generate:
//
// (If not 2 Int31's, jump to $helper.)
// s1 = MOV src1
// s1 = ADDS s1, src2 -- try an inline add
// BVS $helper -- bail if the add overflowed
// s1 = ORR s1, AtomTag_IntPtr
// dst = MOV s1
// B $fallthru
// $helper:
// (caller generates helper call)
// $fallthru:
IR::Instr * instr;
IR::LabelInstr * labelHelper;
IR::LabelInstr * labelFallThru;
IR::Opnd * opndReg;
IR::Opnd * opndSrc1;
IR::Opnd * opndSrc2;
opndSrc1 = instrAdd->GetSrc1();
opndSrc2 = instrAdd->GetSrc2();
AssertMsg(opndSrc1 && opndSrc2, "Expected 2 src opnd's on Add instruction");
// Generate fastpath for Incr_A anyway -
// Incrementing strings representing integers can be inter-mixed with integers e.g. "1"++ -> converts 1 to an int and thereafter, integer increment is expected.
if (opndSrc1->IsRegOpnd() && (opndSrc1->AsRegOpnd()->IsNotInt() || opndSrc1->GetValueType().IsString()
|| (instrAdd->m_opcode != Js::OpCode::Incr_A && opndSrc1->GetValueType().IsLikelyString())))
{
return false;
}
if (opndSrc2->IsRegOpnd() && (opndSrc2->AsRegOpnd()->IsNotInt() ||
opndSrc2->GetValueType().IsLikelyString()))
{
return false;
}
// Tagged ints?
bool isTaggedInts = false;
if (opndSrc1->IsTaggedInt())
{
if (opndSrc2->IsTaggedInt())
{
isTaggedInts = true;
}
}
labelHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
if (!isTaggedInts)
{
// (If not 2 Int31's, jump to $helper.)
this->GenerateSmIntPairTest(instrAdd, opndSrc1, opndSrc2, labelHelper);
}
if (opndSrc1->IsImmediateOpnd())
{
// If opnd1 is a constant, just swap them.
IR::Opnd *opndTmp = opndSrc1;
opndSrc1 = opndSrc2;
opndSrc2 = opndTmp;
}
//
// For 32 bit arithmetic we copy them and set the size of operands to be 32 bits. This is
// relevant only on ARM64.
//
opndSrc1 = opndSrc1->UseWithNewType(TyInt32, this->m_func);
opndSrc2 = opndSrc2->UseWithNewType(TyInt32, this->m_func);
// s1 = MOV src1
opndReg = IR::RegOpnd::New(TyInt32, this->m_func);
Lowerer::InsertMove(opndReg, opndSrc1, instrAdd);
// s1 = ADDS s1, src2
instr = IR::Instr::New(Js::OpCode::ADDS, opndReg, opndReg, opndSrc2, this->m_func);
instrAdd->InsertBefore(instr);
Legalize(instr);
// BVS $helper
instr = IR::BranchInstr::New(Js::OpCode::BVS, labelHelper, this->m_func);
instrAdd->InsertBefore(instr);
//
// Convert TyInt32 operand, back to TyMachPtr type.
//
if(TyMachReg != opndReg->GetType())
{
opndReg = opndReg->UseWithNewType(TyMachPtr, this->m_func);
}
// s1 = ORR s1, AtomTag_IntPtr
GenerateInt32ToVarConversion(opndReg, instrAdd);
// dst = MOV s1
instr = IR::Instr::New(Js::OpCode::MOV, instrAdd->GetDst(), opndReg, this->m_func);
instrAdd->InsertBefore(instr);
// B $fallthru
labelFallThru = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
instr = IR::BranchInstr::New(Js::OpCode::B, labelFallThru, this->m_func);
instrAdd->InsertBefore(instr);
// $helper:
// (caller generates helper call)
// $fallthru:
instrAdd->InsertBefore(labelHelper);
instrAdd->InsertAfter(labelFallThru);
return true;
}
///----------------------------------------------------------------------------
///
/// LowererMD::GenerateFastSub
///
///
///----------------------------------------------------------------------------
bool
LowererMD::GenerateFastSub(IR::Instr * instrSub)
{
// Given:
//
// dst = Sub src1, src2
//
// Generate:
//
// (If not 2 Int31's, jump to $helper.)
// s1 = MOV src1
// s1 = SUBS s1, src2 -- try an inline sub
// BVS $helper -- bail if the subtract overflowed
// BNE $helper
// s1 = ORR s1, AtomTag_IntPtr
// dst = MOV s1
// B $fallthru
// $helper:
// (caller generates helper call)
// $fallthru:
IR::Instr * instr;
IR::LabelInstr * labelHelper;
IR::LabelInstr * labelFallThru;
IR::Opnd * opndReg;
IR::Opnd * opndSrc1;
IR::Opnd * opndSrc2;
opndSrc1 = instrSub->GetSrc1();
opndSrc2 = instrSub->GetSrc2();
AssertMsg(opndSrc1 && opndSrc2, "Expected 2 src opnd's on Sub instruction");
// Not tagged ints?
if (opndSrc1->IsRegOpnd() && opndSrc1->AsRegOpnd()->IsNotInt())
{
return false;
}
if (opndSrc2->IsRegOpnd() && opndSrc2->AsRegOpnd()->IsNotInt())
{
return false;
}
// Tagged ints?
bool isTaggedInts = false;
if (opndSrc1->IsTaggedInt())
{
if (opndSrc2->IsTaggedInt())
{
isTaggedInts = true;
}
}
labelHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
if (!isTaggedInts)
{
// (If not 2 Int31's, jump to $helper.)
this->GenerateSmIntPairTest(instrSub, opndSrc1, opndSrc2, labelHelper);
}
//
// For 32 bit arithmetic we copy them and set the size of operands to be 32 bits. This is
// relevant only on ARM64.
//
opndSrc1 = opndSrc1->UseWithNewType(TyInt32, this->m_func);
opndSrc2 = opndSrc2->UseWithNewType(TyInt32, this->m_func);
// s1 = MOV src1
opndReg = IR::RegOpnd::New(TyInt32, this->m_func);
Lowerer::InsertMove(opndReg, opndSrc1, instrSub);
// s1 = SUBS s1, src2
instr = IR::Instr::New(Js::OpCode::SUBS, opndReg, opndReg, opndSrc2, this->m_func);
instrSub->InsertBefore(instr);
Legalize(instr);
// BVS $helper
instr = IR::BranchInstr::New(Js::OpCode::BVS, labelHelper, this->m_func);
instrSub->InsertBefore(instr);
//
// Convert TyInt32 operand, back to TyMachPtr type.
//
if(TyMachReg != opndReg->GetType())
{
opndReg = opndReg->UseWithNewType(TyMachPtr, this->m_func);
}
// s1 = ORR s1, AtomTag_IntPtr
GenerateInt32ToVarConversion(opndReg, instrSub);
// dst = MOV s1
instr = IR::Instr::New(Js::OpCode::MOV, instrSub->GetDst(), opndReg, this->m_func);
instrSub->InsertBefore(instr);
// B $fallthru
labelFallThru = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
instr = IR::BranchInstr::New(Js::OpCode::B, labelFallThru, this->m_func);
instrSub->InsertBefore(instr);
// $helper:
// (caller generates helper call)
// $fallthru:
instrSub->InsertBefore(labelHelper);
instrSub->InsertAfter(labelFallThru);
return true;
}
///----------------------------------------------------------------------------
///
/// LowererMD::GenerateFastMul
///
///----------------------------------------------------------------------------
bool
LowererMD::GenerateFastMul(IR::Instr * instrMul)
{
// Given:
//
// dst = Mul src1, src2
//
// Generate:
//
// (If not 2 Int31's, jump to $helper.)
// s1 = MOV src1
// s2 = MOV src2
// s3 = SMULL s1, s2 -- do the signed mul
// CMP s3, s3 SXTW
// BNE $helper -- bail if the result overflowed
// CBZ s3, $zero -- Check result is 0. might be -0. Result is -0 when a negative number is multiplied with 0.
// B $nonzero
// $zero: -- result of mul was 0. try to check for -0
// s2 = ADDS s2, src1 --check for same sign
// BGE $nonzero - positive 0 if signs are equal
// dst = ToVar(-0.0) -- load negative 0
// B $fallthru
// $nonzero:
// s3 = ORR s3, AtomTag_IntPtr
// dst= MOV s3
// B $fallthru
// $helper:
// (caller generates helper call)
// $fallthru:
IR::LabelInstr * labelHelper;
IR::LabelInstr * labelFallThru;
IR::LabelInstr * labelNonZero;
IR::Instr * instr;
IR::RegOpnd * opndReg1;
IR::RegOpnd * opndReg2;
IR::RegOpnd * s3;
IR::Opnd * opndSrc1;
IR::Opnd * opndSrc2;
opndSrc1 = instrMul->GetSrc1();
opndSrc2 = instrMul->GetSrc2();
AssertMsg(opndSrc1 && opndSrc2, "Expected 2 src opnd's on mul instruction");
if (opndSrc1->IsRegOpnd() && opndSrc1->AsRegOpnd()->IsNotInt())
{
return true;
}
if (opndSrc2->IsRegOpnd() && opndSrc2->AsRegOpnd()->IsNotInt())
{
return true;
}
// (If not 2 Int31's, jump to $helper.)
labelHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
labelNonZero = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
labelFallThru = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
this->GenerateSmIntPairTest(instrMul, opndSrc1, opndSrc2, labelHelper);
//
// For 32 bit arithmetic we copy them and set the size of operands to be 32 bits. This is
// relevant only on ARM64.
//
opndSrc1 = opndSrc1->UseWithNewType(TyInt32, this->m_func);
opndSrc2 = opndSrc2->UseWithNewType(TyInt32, this->m_func);
if (opndSrc1->IsImmediateOpnd())
{
IR::Opnd * temp = opndSrc1;
opndSrc1 = opndSrc2;
opndSrc2 = temp;
}
// s1 = MOV src1
opndReg1 = IR::RegOpnd::New(TyInt32, this->m_func);
Lowerer::InsertMove(opndReg1, opndSrc1, instrMul);
// s2 = MOV src2
opndReg2 = IR::RegOpnd::New(TyInt32, this->m_func);
Lowerer::InsertMove(opndReg2, opndSrc2, instrMul);
// s3 = SMULL s1, s2
s3 = IR::RegOpnd::New(TyInt64, this->m_func);
instr = IR::Instr::New(Js::OpCode::SMULL, s3, opndReg1, opndReg2, this->m_func);
instrMul->InsertBefore(instr);
// CMP s3, s3 SXTW s3
instr = IR::Instr::New(Js::OpCode::CMP_SXTW, this->m_func);
instr->SetSrc1(s3);
instr->SetSrc2(s3);
instrMul->InsertBefore(instr);
// BNE $helper
instr = IR::BranchInstr::New(Js::OpCode::BNE, labelHelper, this->m_func);
instrMul->InsertBefore(instr);
// CBZ s3, $zero -- Check result is 0. might be -0. Result is -0 when a negative number is multiplied with 0.
IR::LabelInstr *labelZero = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
instr = IR::BranchInstr::New(Js::OpCode::CBZ, labelZero, this->m_func);
instr->SetSrc1(s3);
instrMul->InsertBefore(instr);
// B $nonzero
instr = IR::BranchInstr::New(Js::OpCode::B, labelNonZero, this->m_func);
instrMul->InsertBefore(instr);
// $zero:
instrMul->InsertBefore(labelZero);
// s2 = ADDS s2, s1
instr = IR::Instr::New(Js::OpCode::ADDS, opndReg2, opndReg2, opndReg1, this->m_func);
instrMul->InsertBefore(instr);
Legalize(instr);
// BGE $nonzero
instr = IR::BranchInstr::New(Js::OpCode::BGE, labelNonZero, this->m_func);
instrMul->InsertBefore(instr);
// dst = ToVar(-0.0) -- load negative 0
instr = IR::Instr::New(Js::OpCode::LDIMM, instrMul->GetDst(), m_lowerer->LoadLibraryValueOpnd(instrMul, LibraryValue::ValueNegativeZero), this->m_func);
instrMul->InsertBefore(instr);
// B $fallthru
instr = IR::BranchInstr::New(Js::OpCode::B, labelFallThru, this->m_func);
instrMul->InsertBefore(instr);
// $nonzero:
instrMul->InsertBefore(labelNonZero);
// dst = MOV_TRUNC s3
instr = IR::Instr::New(Js::OpCode::MOV_TRUNC, instrMul->GetDst()->UseWithNewType(TyInt32,this->m_func), s3->UseWithNewType(TyInt32, this->m_func), this->m_func);
instrMul->InsertBefore(instr);
// dst = OR dst, AtomTag_IntPtr
GenerateInt32ToVarConversion(instrMul->GetDst(), instrMul);
// B $fallthru
instr = IR::BranchInstr::New(Js::OpCode::B, labelFallThru, this->m_func);
instrMul->InsertBefore(instr);
// $helper:
// (caller generates helper call)
// $fallthru:
instrMul->InsertBefore(labelHelper);
instrMul->InsertAfter(labelFallThru);
return true;
}
///----------------------------------------------------------------------------
///
/// LowererMD::GenerateFastAnd
///
///----------------------------------------------------------------------------
bool
LowererMD::GenerateFastAnd(IR::Instr * instrAnd)
{
// Left empty to match AMD64; assuming this is not performance critical
return true;
}
///----------------------------------------------------------------------------
///
/// LowererMD::GenerateFastOr
///
///----------------------------------------------------------------------------
bool
LowererMD::GenerateFastOr(IR::Instr * instrOr)
{
// Left empty to match AMD64; assuming this is not performance critical
return true;
}
///----------------------------------------------------------------------------
///
/// LowererMD::GenerateFastXor
///
///----------------------------------------------------------------------------
bool
LowererMD::GenerateFastXor(IR::Instr * instrXor)
{
// Left empty to match AMD64; assuming this is not performance critical
return true;
}
//----------------------------------------------------------------------------
//
// LowererMD::GenerateFastNot
//
//----------------------------------------------------------------------------
bool
LowererMD::GenerateFastNot(IR::Instr * instrNot)
{
// Left empty to match AMD64; assuming this is not performance critical
return true;
}
//
// If value is zero in tagged int representation, jump to $labelHelper.
//
void
LowererMD::GenerateTaggedZeroTest( IR::Opnd * opndSrc, IR::Instr * insertInstr, IR::LabelInstr * labelHelper )
{
// Cast the var to 32 bit integer.
if(opndSrc->GetSize() != 4)
{
opndSrc = opndSrc->UseWithNewType(TyUint32, this->m_func);
}
AssertMsg(TySize[opndSrc->GetType()] == 4, "This technique works only on the 32-bit version");
if(labelHelper != nullptr)
{
// CBZ src1, $labelHelper
IR::Instr* instr = IR::BranchInstr::New(Js::OpCode::CBZ, labelHelper, this->m_func);
instr->SetSrc1(opndSrc);
insertInstr->InsertBefore(instr);
}
else
{
// TST src1, src1
IR::Instr* instr = IR::Instr::New(Js::OpCode::TST, this->m_func);
instr->SetSrc1(opndSrc);
instr->SetSrc2(opndSrc);
insertInstr->InsertBefore(instr);
LegalizeMD::LegalizeInstr(instr, false);
}
}
bool
LowererMD::GenerateFastNeg(IR::Instr * instrNeg)
{
// Given:
//
// dst = Not src
//
// Generate:
//
// if not int, jump $helper
// if src == 0 -- test for zero (must be handled by the runtime to preserve
// BEQ $helper -- Difference between +0 and -0)
// dst = SUB dst, 0, src -- do an inline NEG
// BVS $helper -- bail if the subtract overflowed
// dst = OR dst, tag -- restore the var tag on the result
// BVS $helper
// B $fallthru
// $helper:
// (caller generates helper call)
// $fallthru:
IR::Instr * instr;
IR::LabelInstr * labelHelper = nullptr;
IR::LabelInstr * labelFallThru = nullptr;
IR::Opnd * opndSrc1;
IR::Opnd * opndDst;
bool usingNewDst = false;
opndSrc1 = instrNeg->GetSrc1();
AssertMsg(opndSrc1, "Expected src opnd on Neg instruction");
if (opndSrc1->IsRegOpnd() && opndSrc1->AsRegOpnd()->m_sym->IsIntConst())
{
IR::Opnd *newOpnd;
IntConstType value = opndSrc1->AsRegOpnd()->m_sym->GetIntConstValue();
if (value == 0)
{
// If the negate operand is zero, the result is -0.0, which is a Number rather than an Int31.
newOpnd = m_lowerer->LoadLibraryValueOpnd(instrNeg, LibraryValue::ValueNegativeZero);
}
else
{
// negation below can overflow because max negative int32 value > max positive value by 1.
newOpnd = IR::AddrOpnd::NewFromNumber(-(int64)value, m_func);
}
instrNeg->ClearBailOutInfo();
instrNeg->FreeSrc1();
instrNeg->SetSrc1(newOpnd);
instrNeg = this->ChangeToAssign(instrNeg);
// Skip lowering call to helper
return false;
}
bool isInt = (opndSrc1->IsTaggedInt());
if (opndSrc1->IsRegOpnd() && opndSrc1->AsRegOpnd()->IsNotInt())
{
return true;
}
labelHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
if (!isInt)
{
GenerateSmIntTest(opndSrc1, instrNeg, labelHelper);
}
// For 32 bit arithmetic we copy them and set the size of operands to be 32 bits.
opndSrc1 = opndSrc1->UseWithNewType(TyInt32, this->m_func);
GenerateTaggedZeroTest(opndSrc1, instrNeg, labelHelper);
if (opndSrc1->IsEqual(instrNeg->GetDst()))
{
usingNewDst = true;
opndDst = IR::RegOpnd::New(TyInt32, this->m_func);
}
else
{
opndDst = instrNeg->GetDst()->UseWithNewType(TyInt32, this->m_func);
}
// dst = SUBS zr, src
instr = IR::Instr::New(Js::OpCode::SUBS, opndDst, IR::RegOpnd::New(nullptr, RegZR, TyInt32, this->m_func), opndSrc1, this->m_func);
instrNeg->InsertBefore(instr);
// BVS $helper
instr = IR::BranchInstr::New(Js::OpCode::BVS, labelHelper, this->m_func);
instrNeg->InsertBefore(instr);
//
// Convert TyInt32 operand, back to TyMachPtr type.
//
if (TyMachReg != opndDst->GetType())
{
opndDst = opndDst->UseWithNewType(TyMachPtr, this->m_func);
}
GenerateInt32ToVarConversion(opndDst, instrNeg);
if (usingNewDst)
{
Lowerer::InsertMove(instrNeg->GetDst(), opndDst, instrNeg);
}
// B $fallthru
labelFallThru = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
instr = IR::BranchInstr::New(Js::OpCode::B, labelFallThru, this->m_func);
instrNeg->InsertBefore(instr);
// $helper:
// (caller generates helper sequence)
// $fallthru:
AssertMsg(labelHelper, "Should not be NULL");
instrNeg->InsertBefore(labelHelper);
instrNeg->InsertAfter(labelFallThru);
return true;
}
///----------------------------------------------------------------------------
///
/// LowererMD::GenerateFastShiftLeft
///
///----------------------------------------------------------------------------
bool
LowererMD::GenerateFastShiftLeft(IR::Instr * instrShift)
{
// Left empty to match AMD64; assuming this is not performance critical
return true;
}
///----------------------------------------------------------------------------
///
/// LowererMD::GenerateFastShiftRight
///
///----------------------------------------------------------------------------
bool
LowererMD::GenerateFastShiftRight(IR::Instr * instrShift)
{
// Given:
//
// dst = Shr/ShrU src1, src2
//
// Generate:
//
// (If not 2 Int31's, jump to $helper.)
// s1 = MOV src1
// s2 = MOV src2
// AND s2, 0x1F [unsigned only] // Bail if unsigned and not shifting,
// BEQ $helper [unsigned only] // as we may not end up with a taggable int
// s1 = ASR/LSR s1, s2
// ORR s1, 1 << VarTag_Shift
//dst = MOV s1
// B $fallthru
// $helper:
// (caller generates helper call)
// $fallthru:
IR::Instr * instr;
IR::LabelInstr * labelHelper;
IR::LabelInstr * labelFallThru;
IR::Opnd * opndReg;
IR::Opnd * opndSrc1;
IR::Opnd * opndSrc2;
Assert(instrShift->m_opcode == Js::OpCode::ShrU_A || instrShift->m_opcode == Js::OpCode::Shr_A);
bool isUnsigned = (instrShift->m_opcode == Js::OpCode::ShrU_A);
opndSrc1 = instrShift->GetSrc1();
opndSrc2 = instrShift->GetSrc2();
AssertMsg(opndSrc1 && opndSrc2, "Expected 2 src opnd's on Add instruction");
// Not int?
if (opndSrc1->IsRegOpnd() && opndSrc1->AsRegOpnd()->IsNotInt())
{
return true;
}
if (opndSrc2->IsRegOpnd() && opndSrc2->AsRegOpnd()->IsNotInt())
{
return true;
}
// Tagged ints?
bool isTaggedInts = false;
if (opndSrc1->IsTaggedInt())
{
if (opndSrc2->IsTaggedInt())
{
isTaggedInts = true;
}
}
IntConstType s2Value = 0;
bool src2IsIntConst = false;
if (isUnsigned)
{
if (opndSrc2->IsRegOpnd())
{
src2IsIntConst = opndSrc2->AsRegOpnd()->m_sym->IsTaggableIntConst();
if (src2IsIntConst)
{
s2Value = opndSrc2->AsRegOpnd()->m_sym->GetIntConstValue();
}
}
else
{
AssertMsg(opndSrc2->IsAddrOpnd() && Js::TaggedInt::Is(opndSrc2->AsAddrOpnd()->m_address),
"Expect src2 of shift right to be reg or Var.");
src2IsIntConst = true;
s2Value = Js::TaggedInt::ToInt32(opndSrc2->AsAddrOpnd()->m_address);
}
// 32-bit Shifts only uses the bottom 5 bits.
s2Value &= 0x1F;
// Unsigned shift by 0 could yield a value not encodable as a tagged int.
if (isUnsigned && src2IsIntConst && s2Value == 0)
{
return true;
}
}
labelHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
if (!isTaggedInts)
{
// (If not 2 Int31's, jump to $helper.)
this->GenerateSmIntPairTest(instrShift, opndSrc1, opndSrc2, labelHelper);
}
opndSrc1 = opndSrc1->UseWithNewType(TyInt32, this->m_func);
if (src2IsIntConst)
{
opndSrc2 = IR::IntConstOpnd::New(s2Value, TyInt32, this->m_func);
}
else
{
// s2 = MOV src2
opndReg = IR::RegOpnd::New(TyInt32, this->m_func);
Lowerer::InsertMove(opndReg, opndSrc2, instrShift);
opndSrc2 = opndReg;
}
if (!src2IsIntConst && isUnsigned)
{
// s2 = AND s2, 0x1F [unsigned only] // Bail if unsigned and not shifting,
instr = IR::Instr::New(Js::OpCode::AND, opndSrc2, opndSrc2, IR::IntConstOpnd::New(0x1F, TyInt32, this->m_func), this->m_func);
instrShift->InsertBefore(instr);
// CBZ s2, $helper [unsigned only] // as we may not end up with a taggable int
instr = IR::BranchInstr::New(Js::OpCode::CBZ, labelHelper, this->m_func);
instr->SetSrc1(opndSrc2);
instrShift->InsertBefore(instr);
}
// s1 = MOV src1
opndReg = IR::RegOpnd::New(TyInt32, this->m_func);
Lowerer::InsertMove(opndReg, opndSrc1, instrShift);
// s1 = ASR/LSR s1, RCX
instr = IR::Instr::New(isUnsigned ? Js::OpCode::LSR : Js::OpCode::ASR, opndReg, opndReg, opndSrc2, this->m_func);
instrShift->InsertBefore(instr);
//
// Convert TyInt32 operand, back to TyMachPtr type.
//
if(TyMachReg != opndReg->GetType())
{
opndReg = opndReg->UseWithNewType(TyMachPtr, this->m_func);
}
// ORR s1, 1 << VarTag_Shift
this->GenerateInt32ToVarConversion(opndReg, instrShift);
// dst = MOV s1
instr = IR::Instr::New(Js::OpCode::MOV, instrShift->GetDst(), opndReg, this->m_func);
instrShift->InsertBefore(instr);
// B $fallthru
labelFallThru = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
instr = IR::BranchInstr::New(Js::OpCode::B, labelFallThru, this->m_func);
instrShift->InsertBefore(instr);
// $helper:
// (caller generates helper call)
// $fallthru:
instrShift->InsertBefore(labelHelper);
instrShift->InsertAfter(labelFallThru);
return true;
}
void
LowererMD::GenerateFastBrS(IR::BranchInstr *brInstr)
{
IR::Opnd *src1 = brInstr->UnlinkSrc1();
Assert(src1->IsIntConstOpnd() || src1->IsAddrOpnd() || src1->IsRegOpnd());
m_lowerer->InsertTest(
m_lowerer->LoadOptimizationOverridesValueOpnd(
brInstr, OptimizationOverridesValue::OptimizationOverridesSideEffects),
src1,
brInstr);
Js::OpCode opcode;
switch(brInstr->m_opcode)
{
case Js::OpCode::BrHasSideEffects:
opcode = Js::OpCode::BNE;
break;
case Js::OpCode::BrNotHasSideEffects:
opcode = Js::OpCode::BEQ;
break;
default:
Assert(UNREACHED);
__assume(false);
}
brInstr->m_opcode = opcode;
}
///----------------------------------------------------------------------------
///
/// LowererMD::GenerateSmIntPairTest
///
/// Generate code to test whether the given operands are both Int31 vars
/// and branch to the given label if not.
///
///----------------------------------------------------------------------------
IR::Instr *
LowererMD::GenerateSmIntPairTest(
IR::Instr * instrInsert,
IR::Opnd * opndSrc1,
IR::Opnd * opndSrc2,
IR::LabelInstr * labelFail)
{
IR::Opnd * opndReg;
IR::Instr * instrPrev = instrInsert->m_prev;
IR::Instr * instr;
Assert(opndSrc1->GetType() == TyVar);
Assert(opndSrc2->GetType() == TyVar);
if (opndSrc1->IsTaggedInt())
{
IR::Opnd *tempOpnd = opndSrc1;
opndSrc1 = opndSrc2;
opndSrc2 = tempOpnd;
}
if (opndSrc2->IsTaggedInt())
{
if (opndSrc1->IsTaggedInt())
{
return instrPrev;
}
GenerateSmIntTest(opndSrc1, instrInsert, labelFail);
return instrPrev;
}
opndReg = IR::RegOpnd::New(TyMachReg, this->m_func);
// s1 = MOV src1
// s1 = UBFX s1, VarTagShift - 16, 64 - (VarTag_Shift - 16)
// s2 = MOV src2
// s1 = BFXIL s2, VarTagShift, 64 - VarTag_Shift
// s1 = EOR s1, AtomTag_Pair ------ compare the tags together to the expected tag pair
// CBNZ s1, $fail
// s1 = MOV src1
instr = IR::Instr::New(Js::OpCode::MOV, opndReg, opndSrc1, this->m_func);
instrInsert->InsertBefore(instr);
// s1 = UBFX s1, VarTagShift - 16, 64 - (VarTag_Shift - 16)
instr = IR::Instr::New(Js::OpCode::UBFX, opndReg, opndReg, IR::IntConstOpnd::New(BITFIELD(Js::VarTag_Shift - 16, 64 - (Js::VarTag_Shift - 16)), TyMachReg, this->m_func), this->m_func);
instrInsert->InsertBefore(instr);
// s2 = MOV src2
IR::Opnd * opndReg1 = IR::RegOpnd::New(TyMachReg, this->m_func);
instr = IR::Instr::New(Js::OpCode::MOV, opndReg1, opndSrc2, this->m_func);
instrInsert->InsertBefore(instr);
// s1 = BFXIL s2, VarTagShift, 64 - VarTag_Shift
instr = IR::Instr::New(Js::OpCode::BFXIL, opndReg, opndReg1, IR::IntConstOpnd::New(BITFIELD(Js::VarTag_Shift, 64 - Js::VarTag_Shift), TyMachReg, this->m_func), this->m_func);
instrInsert->InsertBefore(instr);
opndReg = opndReg->UseWithNewType(TyInt32, this->m_func)->AsRegOpnd();
// s1 = EOR s1, AtomTag_Pair
instr = IR::Instr::New(Js::OpCode::EOR, opndReg, opndReg, IR::IntConstOpnd::New(Js::AtomTag_Pair, TyInt32, this->m_func, true), this->m_func);
instrInsert->InsertBefore(instr);
// CBNZ s1, $fail
instr = IR::BranchInstr::New(Js::OpCode::CBNZ, labelFail, this->m_func);
instr->SetSrc1(opndReg);
instrInsert->InsertBefore(instr);
return instrPrev;
}
bool LowererMD::GenerateObjectTest(IR::Opnd * opndSrc, IR::Instr * insertInstr, IR::LabelInstr * labelTarget, bool fContinueLabel)
{
AssertMsg(opndSrc->GetSize() == MachPtr, "64-bit register required");
if (opndSrc->IsTaggedValue() && fContinueLabel)
{
// Insert delete branch opcode to tell the dbChecks not to assert on the helper label we may fall through into
IR::Instr *fakeBr = IR::PragmaInstr::New(Js::OpCode::DeletedNonHelperBranch, 0, this->m_func);
insertInstr->InsertBefore(fakeBr);
return false;
}
else if (opndSrc->IsNotTaggedValue() && !fContinueLabel)
{
return false;
}
IR::Opnd * opndReg = IR::RegOpnd::New(TyMachReg, this->m_func);
// s1 = MOV src1 - Move to a temporary
IR::Instr * instr = IR::Instr::New(Js::OpCode::MOV, opndReg, opndSrc, this->m_func);
insertInstr->InsertBefore(instr);
// s1 = UBFX s1, s1, #VarTag_Shift, #64 - VarTag_Shift
instr = IR::Instr::New(Js::OpCode::UBFX, opndReg, opndReg, IR::IntConstOpnd::New(BITFIELD(Js::VarTag_Shift, 64 - Js::VarTag_Shift), TyMachReg, this->m_func), this->m_func);
insertInstr->InsertBefore(instr);
if (fContinueLabel)
{
// CBZ s1, $labelHelper
instr = IR::BranchInstr::New(Js::OpCode::CBZ, labelTarget, this->m_func);
instr->SetSrc1(opndReg);
insertInstr->InsertBefore(instr);
IR::LabelInstr *labelHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
insertInstr->InsertBefore(labelHelper);
}
else
{
// CBNZ s1, $labelHelper
instr = IR::BranchInstr::New(Js::OpCode::CBNZ, labelTarget, this->m_func);
instr->SetSrc1(opndReg);
insertInstr->InsertBefore(instr);
}
return true;
}
void
LowererMD::GenerateLoadTaggedType(IR::Instr * instrLdSt, IR::RegOpnd * opndType, IR::RegOpnd * opndTaggedType)
{
// taggedType = OR type, InlineCacheAuxSlotTypeTag
IR::IntConstOpnd * opndAuxSlotTag = IR::IntConstOpnd::New(InlineCacheAuxSlotTypeTag, TyInt8, instrLdSt->m_func);
IR::Instr * instr = IR::Instr::New(Js::OpCode::ORR, opndTaggedType, opndType, opndAuxSlotTag, instrLdSt->m_func);
instrLdSt->InsertBefore(instr);
}
void
LowererMD::GenerateLoadPolymorphicInlineCacheSlot(IR::Instr * instrLdSt, IR::RegOpnd * opndInlineCache, IR::RegOpnd * opndType, uint polymorphicInlineCacheSize)
{
// Generate
//
// LDR r1, type
// LSR r1, r1, #PolymorphicInlineCacheShift
// AND r1, r1, #(size - 1)
// LSL r1, r1, #log2(sizeof(Js::InlineCache))
// ADD inlineCache, inlineCache, r1
// MOV r1, type
IR::RegOpnd * opndOffset = IR::RegOpnd::New(TyMachPtr, instrLdSt->m_func);
IR::Instr * instr = IR::Instr::New(Js::OpCode::MOV, opndOffset, opndType, instrLdSt->m_func);
instrLdSt->InsertBefore(instr);
IntConstType rightShiftAmount = PolymorphicInlineCacheShift;
IntConstType leftShiftAmount = Math::Log2(sizeof(Js::InlineCache));
// instead of generating
// LSR r1, r1, #PolymorphicInlineCacheShift
// AND r1, r1, #(size - 1)
// LSL r1, r1, #log2(sizeof(Js::InlineCache))
//
// we can generate:
// LSR r1, r1, #(PolymorphicInlineCacheShift - log2(sizeof(Js::InlineCache))
// AND r1, r1, #(size - 1) << log2(sizeof(Js::InlineCache))
Assert(rightShiftAmount > leftShiftAmount);
instr = IR::Instr::New(Js::OpCode::LSR, opndOffset, opndOffset, IR::IntConstOpnd::New(rightShiftAmount - leftShiftAmount, TyUint8, instrLdSt->m_func, true), instrLdSt->m_func);
instrLdSt->InsertBefore(instr);
Lowerer::InsertAnd(opndOffset, opndOffset, IR::IntConstOpnd::New(((IntConstType)(polymorphicInlineCacheSize - 1)) << leftShiftAmount, TyMachPtr, instrLdSt->m_func, true), instrLdSt);
// ADD inlineCache, inlineCache, r1
Lowerer::InsertAdd(false, opndInlineCache, opndInlineCache, opndOffset, instrLdSt);
}
///----------------------------------------------------------------------------
///
/// LowererMD::GenerateFastLdMethodFromFlags
///
/// Make use of the helper to cache the type and slot index used to do a LdFld
/// and do an inline load from the appropriate slot if the type hasn't changed
/// since the last time this LdFld was executed.
///
///----------------------------------------------------------------------------
bool
LowererMD::GenerateFastLdMethodFromFlags(IR::Instr * instrLdFld)
{
IR::LabelInstr * labelFallThru;
IR::LabelInstr * bailOutLabel;
IR::Opnd * opndSrc;
IR::Opnd * opndDst;
IR::RegOpnd * opndBase;
IR::RegOpnd * opndType;
IR::RegOpnd * opndInlineCache;
intptr_t inlineCache;
opndSrc = instrLdFld->GetSrc1();
AssertMsg(opndSrc->IsSymOpnd() && opndSrc->AsSymOpnd()->IsPropertySymOpnd() && opndSrc->AsSymOpnd()->m_sym->IsPropertySym(),
"Expected property sym operand as src of LdFldFlags");
IR::PropertySymOpnd * propertySymOpnd = opndSrc->AsPropertySymOpnd();
Assert(propertySymOpnd->m_runtimeInlineCache);
Assert(!instrLdFld->DoStackArgsOpt(this->m_func));
// TODO: LdMethodFromFlags doesn't participate in object type specialization. We should be using a temporary
// register without a type sym here.
if (propertySymOpnd->IsTypeCheckSeqCandidate())
{
AssertMsg(propertySymOpnd->HasObjectTypeSym(), "Type optimized property sym operand without a type sym?");
StackSym *typeSym = propertySymOpnd->GetObjectTypeSym();
opndType = IR::RegOpnd::New(typeSym, TyMachReg, this->m_func);
}
else
{
opndType = IR::RegOpnd::New(TyMachReg, this->m_func);
}
opndBase = propertySymOpnd->CreatePropertyOwnerOpnd(m_func);
opndDst = instrLdFld->GetDst();
inlineCache = propertySymOpnd->m_runtimeInlineCache;
Assert(inlineCache != 0);
opndInlineCache = IR::RegOpnd::New(TyMachReg, this->m_func);
labelFallThru = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
// Label to jump to (or fall through to) when bailing out
bailOutLabel = IR::LabelInstr::New(Js::OpCode::Label, instrLdFld->m_func, true /* isOpHelper */);
Lowerer::InsertMove(opndInlineCache, m_lowerer->LoadRuntimeInlineCacheOpnd(instrLdFld, propertySymOpnd), instrLdFld);
IR::LabelInstr * labelFlagAux = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
// Check the flag cache with the untagged type
this->m_lowerer->GenerateObjectTestAndTypeLoad(instrLdFld, opndBase, opndType, bailOutLabel);
//Blindly do the check for getter flag first and then do the type check
//We avoid repeated check for getter flag when the function object may be in either
//inline slots or auxiliary slots
this->m_lowerer->GenerateFlagInlineCacheCheckForGetterSetter(instrLdFld, opndInlineCache, bailOutLabel);
this->m_lowerer->GenerateFlagInlineCacheCheck(instrLdFld, opndType, opndInlineCache, labelFlagAux);
this->m_lowerer->GenerateLdFldFromFlagInlineCache(instrLdFld, opndBase, opndDst, opndInlineCache, labelFallThru, true);
// Check the flag cache with the tagged type
instrLdFld->InsertBefore(labelFlagAux);
IR::RegOpnd * opndTaggedType = IR::RegOpnd::New(TyMachReg, this->m_func);
GenerateLoadTaggedType(instrLdFld, opndType, opndTaggedType);
this->m_lowerer->GenerateFlagInlineCacheCheck(instrLdFld, opndTaggedType, opndInlineCache, bailOutLabel);
this->m_lowerer->GenerateLdFldFromFlagInlineCache(instrLdFld, opndBase, opndDst, opndInlineCache, labelFallThru, false);
instrLdFld->InsertBefore(bailOutLabel);
instrLdFld->InsertAfter(labelFallThru);
instrLdFld->UnlinkSrc1();
// Generate the bailout helper call. 'instr' will be changed to the CALL into the bailout function, so it can't be used for
// ordering instructions anymore.
this->m_lowerer->GenerateBailOut(instrLdFld);
return true;
}
//----------------------------------------------------------------------------
//
// LowererMD::GenerateFastScopedFldLookup
//
// This is a helper call which generates asm for both
// ScopedLdFld & ScopedStFld
//
//----------------------------------------------------------------------------
IR::Instr *
LowererMD::GenerateFastScopedFld(IR::Instr * instrScopedFld, bool isLoad)
{
// LDR s1, [base, offset(length)]
// CMP s1, 1 -- get the length on array and test if it is 1.
// BNE $helper
// LDR s2, [base, offset(scopes)] -- load the first scope
// LDR s3, [s2, offset(type)]
// LDIMM s4, inlineCache
// LDR s5, [s4, offset(u.local.type)]
// CMP s3, s5 -- check type
// BNE $helper
// LDR s6, [s2, offset(slots)] -- load the slots array
// LDR s7 , [s4, offset(u.local.slotIndex)] -- load the cached slot index
//
// if (load) {
// LDR dst, [s6, s7, LSL #2] -- load the value from the slot
// }
// else {
// STR src, [s6, s7, LSL #2]
// }
// B $done
//$helper:
// dst = BLX PatchGetPropertyScoped(inlineCache, base, field, defaultInstance, scriptContext)
//$done:
IR::Instr * instr;
IR::Instr * instrPrev = instrScopedFld->m_prev;
IR::RegOpnd * opndBase;
IR::RegOpnd * opndReg1; //s1
IR::RegOpnd * opndReg2; //s2
IR::RegOpnd * opndInlineCache; //s4
IR::IndirOpnd * indirOpnd;
IR::Opnd * propertyBase;
IR::LabelInstr * labelHelper;
IR::LabelInstr * labelFallThru;
if (isLoad)
{
propertyBase = instrScopedFld->GetSrc1();
}
else
{
propertyBase = instrScopedFld->GetDst();
}
AssertMsg(propertyBase->IsSymOpnd() && propertyBase->AsSymOpnd()->IsPropertySymOpnd() && propertyBase->AsSymOpnd()->m_sym->IsPropertySym(),
"Expected property sym operand of ScopedLdFld or ScopedStFld");
IR::PropertySymOpnd * propertySymOpnd = propertyBase->AsPropertySymOpnd();
opndBase = propertySymOpnd->CreatePropertyOwnerOpnd(m_func);
const IR::AutoReuseOpnd holdAfterLegalization(opndBase, m_func);
AssertMsg(opndBase->m_sym->m_isSingleDef, "We assume this isn't redefined");
labelHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
// LDR s1, [base, offset(length)] -- get the length on array and test if it is 1.
indirOpnd = IR::IndirOpnd::New(opndBase, Js::FrameDisplay::GetOffsetOfLength(), TyInt16, this->m_func);
opndReg1 = IR::RegOpnd::New(TyInt32, this->m_func);
Lowerer::InsertMove(opndReg1, indirOpnd, instrScopedFld);
// CMP s1, 1 -- get the length on array and test if it is 1.
instr = IR::Instr::New(Js::OpCode::CMP, this->m_func);
instr->SetSrc1(opndReg1);
instr->SetSrc2(IR::IntConstOpnd::New(0x1, TyInt8, this->m_func));
instrScopedFld->InsertBefore(instr);
LegalizeMD::LegalizeInstr(instr, false);
// BNE $helper
instr = IR::BranchInstr::New(Js::OpCode::BNE, labelHelper, this->m_func);
instrScopedFld->InsertBefore(instr);
// LDR s2, [base, offset(scopes)] -- load the first scope
indirOpnd = IR::IndirOpnd::New(opndBase, Js::FrameDisplay::GetOffsetOfScopes(), TyMachReg,this->m_func);
opndReg2 = IR::RegOpnd::New(TyMachReg, this->m_func);
Lowerer::InsertMove(opndReg2, indirOpnd, instrScopedFld);
// LDR s3, [s2, offset(type)]
// LDIMM s4, inlineCache
// LDR s5, [s4, offset(u.local.type)]
// CMP s3, s5 -- check type
// BNE $helper
opndInlineCache = IR::RegOpnd::New(TyMachReg, this->m_func);
opndReg2->m_sym->m_isNotInt = true;
IR::RegOpnd * opndType = IR::RegOpnd::New(TyMachReg, this->m_func);
this->m_lowerer->GenerateObjectTestAndTypeLoad(instrScopedFld, opndReg2, opndType, labelHelper);
Lowerer::InsertMove(opndInlineCache, m_lowerer->LoadRuntimeInlineCacheOpnd(instrScopedFld, propertySymOpnd), instrScopedFld);
labelFallThru = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
// Check the local cache with the tagged type
IR::RegOpnd * opndTaggedType = IR::RegOpnd::New(TyMachReg, this->m_func);
GenerateLoadTaggedType(instrScopedFld, opndType, opndTaggedType);
Lowerer::GenerateLocalInlineCacheCheck(instrScopedFld, opndTaggedType, opndInlineCache, labelHelper);
if (isLoad)
{
IR::Opnd *opndDst = instrScopedFld->GetDst();
Lowerer::GenerateLdFldFromLocalInlineCache(instrScopedFld, opndReg2, opndDst, opndInlineCache, labelFallThru, false);
}
else
{
IR::Opnd *opndSrc = instrScopedFld->GetSrc1();
GenerateStFldFromLocalInlineCache(instrScopedFld, opndReg2, opndSrc, opndInlineCache, labelFallThru, false);
}
// $helper:
// if (isLoad) {
// dst = BLX PatchGetPropertyScoped(inlineCache, opndBase, propertyId, srcBase, scriptContext)
// }
// else {
// BLX PatchSetPropertyScoped(inlineCache, base, field, value, defaultInstance, scriptContext)
// }
// $fallthru:
instrScopedFld->InsertBefore(labelHelper);
instrScopedFld->InsertAfter(labelFallThru);
return instrPrev;
}
//----------------------------------------------------------------------------
//
// LowererMD::GenerateFastScopedLdFld
//
// Make use of the helper to cache the type and slot index used to do a ScopedLdFld
// when the scope is an array of length 1.
// Extract the only element from array and do an inline load from the appropriate slot
// if the type hasn't changed since the last time this ScopedLdFld was executed.
//
//----------------------------------------------------------------------------
IR::Instr *
LowererMD::GenerateFastScopedLdFld(IR::Instr * instrLdScopedFld)
{
//Helper GenerateFastScopedFldLookup generates following:
//
// LDR s1, [base, offset(length)]
// CMP s1, 1 -- get the length on array and test if it is 1.
// BNE $helper
// LDR s2, [base, offset(scopes)] -- load the first scope
// LDR s3, [s2, offset(type)]
// LDIMM s4, inlineCache
// LDR s5, [s4, offset(u.local.type)]
// CMP s3, s5 -- check type
// BNE $helper
// LDR s6, [s2, offset(slots)] -- load the slots array
// LDR s7 , [s4, offset(u.local.slotIndex)] -- load the cached slot index
// LDR dst, [s6, s7, LSL #2] -- load the value from the slot
// B $done
//$helper:
// dst = BLX PatchGetPropertyScoped(inlineCache, base, field, defaultInstance, scriptContext)
//$done:
return GenerateFastScopedFld(instrLdScopedFld, true);
}
//----------------------------------------------------------------------------
//
// LowererMD::GenerateFastScopedStFld
//
// Make use of the helper to cache the type and slot index used to do a ScopedStFld
// when the scope is an array of length 1.
// Extract the only element from array and do an inline load from the appropriate slot
// if the type hasn't changed since the last time this ScopedStFld was executed.
//
//----------------------------------------------------------------------------
IR::Instr *
LowererMD::GenerateFastScopedStFld(IR::Instr * instrStScopedFld)
{
// LDR s1, [base, offset(length)]
// CMP s1, 1 -- get the length on array and test if it is 1.
// BNE $helper
// LDR s2, [base, offset(scopes)] -- load the first scope
// LDR s3, [s2, offset(type)]
// LDIMM s4, inlineCache
// LDR s5, [s4, offset(u.local.type)]
// CMP s3, s5 -- check type
// BNE $helper
// LDR s6, [s2, offset(slots)] -- load the slots array
// LDR s7 , [s4, offset(u.local.slotIndex)] -- load the cached slot index
// STR src, [s6, s7, LSL #2] -- store the value directly at the slot
// B $done
//$helper:
// BLX PatchSetPropertyScoped(inlineCache, base, field, value, defaultInstance, scriptContext)
//$done:
return GenerateFastScopedFld(instrStScopedFld, false);
}
void
LowererMD::GenerateStFldFromLocalInlineCache(
IR::Instr * instrStFld,
IR::RegOpnd * opndBase,
IR::Opnd * opndSrc,
IR::RegOpnd * opndInlineCache,
IR::LabelInstr * labelFallThru,
bool isInlineSlot)
{
IR::RegOpnd * opndSlotArray = nullptr;
IR::IndirOpnd * opndIndir;
IR::Instr * instr;
if (!isInlineSlot)
{
// s2 = MOV base->slots -- load the slot array
opndSlotArray = IR::RegOpnd::New(TyMachReg, instrStFld->m_func);
opndIndir = IR::IndirOpnd::New(opndBase, Js::DynamicObject::GetOffsetOfAuxSlots(), TyMachReg, instrStFld->m_func);
Lowerer::InsertMove(opndSlotArray, opndIndir, instrStFld);
}
// LDR s5, [s2, offset(u.local.slotIndex)] -- load the cached slot index
IR::RegOpnd *opndSlotIndex = IR::RegOpnd::New(TyUint16, instrStFld->m_func);
opndIndir = IR::IndirOpnd::New(opndInlineCache, offsetof(Js::InlineCache, u.local.slotIndex), TyUint16, instrStFld->m_func);
Lowerer::InsertMove(opndSlotIndex, opndIndir, instrStFld);
if (isInlineSlot)
{
// STR src, [base, s5, LSL #2] -- store the value directly to the slot [s4 + s5 * 4] = src
opndIndir = IR::IndirOpnd::New(opndBase, opndSlotIndex, LowererMD::GetDefaultIndirScale(), TyMachReg, instrStFld->m_func);
instr = IR::Instr::New(Js::OpCode::STR, opndIndir, opndSrc, instrStFld->m_func);
instrStFld->InsertBefore(instr);
LegalizeMD::LegalizeInstr(instr, false);
}
else
{
// STR src, [s4, s5, LSL #2] -- store the value directly to the slot [s4 + s5 * 4] = src
opndIndir = IR::IndirOpnd::New(opndSlotArray, opndSlotIndex, LowererMD::GetDefaultIndirScale(), TyMachReg, instrStFld->m_func);
instr = IR::Instr::New(Js::OpCode::STR, opndIndir, opndSrc, instrStFld->m_func);
instrStFld->InsertBefore(instr);
LegalizeMD::LegalizeInstr(instr, false);
}
// B $done
instr = IR::BranchInstr::New(Js::OpCode::B, labelFallThru, instrStFld->m_func);
instrStFld->InsertBefore(instr);
}
IR::Opnd *
LowererMD::CreateStackArgumentsSlotOpnd()
{
// Save the newly-created args object to its dedicated stack slot.
IR::IndirOpnd *indirOpnd = IR::IndirOpnd::New(IR::RegOpnd::New(nullptr, FRAME_REG , TyMachReg, m_func),
-MachArgsSlotOffset, TyMachPtr, m_func);
return indirOpnd;
}
//
// jump to $labelHelper, based on the result of CMP
//
void LowererMD::GenerateSmIntTest(IR::Opnd *opndSrc, IR::Instr *insertInstr, IR::LabelInstr *labelHelper, IR::Instr **instrFirst, bool fContinueLabel /* = false */)
{
AssertMsg(opndSrc->GetSize() == MachPtr, "64-bit register required");
IR::Opnd * opndReg = IR::RegOpnd::New(TyMachReg, this->m_func);
// s1 = MOV src1 - Move to a temporary
IR::Instr * instr = IR::Instr::New(Js::OpCode::MOV, opndReg, opndSrc, this->m_func);
insertInstr->InsertBefore(instr);
if (instrFirst)
{
*instrFirst = instr;
}
// s1 = UBFX s1, VarTag_Shift, 64 - VarTag_Shift
instr = IR::Instr::New(Js::OpCode::UBFX, opndReg, opndReg, IR::IntConstOpnd::New(BITFIELD(Js::VarTag_Shift, 64 - Js::VarTag_Shift), TyMachReg, this->m_func), this->m_func);
insertInstr->InsertBefore(instr);
Legalize(instr);
// s1 = EOR s1, AtomTag
instr = IR::Instr::New(Js::OpCode::EOR, opndReg, opndReg, IR::IntConstOpnd::New(Js::AtomTag, TyInt32, this->m_func, /* dontEncode = */ true), this->m_func);
insertInstr->InsertBefore(instr);
if(fContinueLabel)
{
// CBZ s1, $labelHelper
instr = IR::BranchInstr::New(Js::OpCode::CBZ, labelHelper, this->m_func);
}
else
{
// CBNZ s1, $labelHelper
instr = IR::BranchInstr::New(Js::OpCode::CBNZ, labelHelper, this->m_func);
}
instr->SetSrc1(opndReg);
insertInstr->InsertBefore(instr);
}
void LowererMD::GenerateInt32ToVarConversion(IR::Opnd * opndSrc, IR::Instr * insertInstr )
{
AssertMsg(opndSrc->IsRegOpnd(), "NYI for other types");
IR::Instr* instr = IR::Instr::New(Js::OpCode::ORR, opndSrc, opndSrc, IR::IntConstOpnd::New(Js::AtomTag_IntPtr, TyMachReg, this->m_func), this->m_func);
insertInstr->InsertBefore(instr);
}
IR::RegOpnd *
LowererMD::GenerateUntagVar(IR::RegOpnd * src, IR::LabelInstr * labelFail, IR::Instr * assignInstr, bool generateTagCheck)
{
Assert(src->IsVar());
// MOV valueOpnd, index
IR::RegOpnd *valueOpnd = IR::RegOpnd::New(TyInt32, this->m_func);
//
// Convert Index to 32 bits.
//
if (generateTagCheck)
{
IR::Opnd * opnd = src->UseWithNewType(TyMachReg, this->m_func);
Assert(!opnd->IsTaggedInt());
this->GenerateSmIntTest(opnd, assignInstr, labelFail);
}
// Doing a 32-bit MOV clears the tag bits on ARM64. Use MOV_TRUNC so it doesn't get peeped away.
IR::Instr * instr = IR::Instr::New(Js::OpCode::MOV_TRUNC, valueOpnd, src->UseWithNewType(TyInt32, this->m_func), this->m_func);
assignInstr->InsertBefore(instr);
return valueOpnd;
}
IR::RegOpnd *LowererMD::LoadNonnegativeIndex(
IR::RegOpnd *indexOpnd,
const bool skipNegativeCheck,
IR::LabelInstr *const notTaggedIntLabel,
IR::LabelInstr *const negativeLabel,
IR::Instr *const insertBeforeInstr)
{
Assert(indexOpnd);
Assert(indexOpnd->IsVar() || indexOpnd->GetType() == TyInt32 || indexOpnd->GetType() == TyUint32);
Assert(indexOpnd->GetType() != TyUint32 || skipNegativeCheck);
Assert(!indexOpnd->IsVar() || notTaggedIntLabel);
Assert(skipNegativeCheck || negativeLabel);
Assert(insertBeforeInstr);
if(indexOpnd->IsVar())
{
if (indexOpnd->GetValueType().IsLikelyFloat())
{
return m_lowerer->LoadIndexFromLikelyFloat(indexOpnd, skipNegativeCheck, notTaggedIntLabel, negativeLabel, insertBeforeInstr);
}
indexOpnd = GenerateUntagVar(indexOpnd, notTaggedIntLabel, insertBeforeInstr, !indexOpnd->IsTaggedInt());
}
if(!skipNegativeCheck)
{
// TBNZ index, #31, $notTaggedIntOrNegative
IR::Instr *instr = IR::BranchInstr::New(Js::OpCode::TBNZ, negativeLabel, this->m_func);
instr->SetSrc1(indexOpnd);
instr->SetSrc2(IR::IntConstOpnd::New(31, TyVar, this->m_func));
insertBeforeInstr->InsertBefore(instr);
}
return indexOpnd;
}
// Inlines fast-path for int Mul/Add or int Mul/Sub. If not int, call MulAdd/MulSub helper
bool LowererMD::TryGenerateFastMulAdd(IR::Instr * instrAdd, IR::Instr ** pInstrPrev)
{
IR::Instr *instrMul = instrAdd->GetPrevRealInstrOrLabel();
IR::Opnd *addSrc;
IR::RegOpnd *addCommonSrcOpnd;
Assert(instrAdd->m_opcode == Js::OpCode::Add_A || instrAdd->m_opcode == Js::OpCode::Sub_A);
bool isSub = (instrAdd->m_opcode == Js::OpCode::Sub_A) ? true : false;
// Mul needs to be a single def reg
if (instrMul->m_opcode != Js::OpCode::Mul_A || instrMul->GetDst()->IsRegOpnd() == false)
{
// Cannot generate MulAdd
return false;
}
if (instrMul->HasBailOutInfo())
{
// Bailout will be generated for the Add, but not the Mul.
// We could handle this, but this path isn't used that much anymore.
return false;
}
IR::RegOpnd *regMulDst = instrMul->GetDst()->AsRegOpnd();
if (regMulDst->m_sym->m_isSingleDef == false)
{
// Cannot generate MulAdd
return false;
}
// Only handle a * b + c, so dst of Mul needs to match left source of Add
if (instrMul->GetDst()->IsEqual(instrAdd->GetSrc1()))
{
addCommonSrcOpnd = instrAdd->GetSrc1()->AsRegOpnd();
addSrc = instrAdd->GetSrc2();
}
else if (instrMul->GetDst()->IsEqual(instrAdd->GetSrc2()))
{
addSrc = instrAdd->GetSrc1();
addCommonSrcOpnd = instrAdd->GetSrc2()->AsRegOpnd();
}
else
{
return false;
}
// Only handle a * b + c where c != a * b
if (instrAdd->GetSrc1()->IsEqual(instrAdd->GetSrc2()))
{
return false;
}
if (addCommonSrcOpnd->m_isTempLastUse == false)
{
return false;
}
IR::Opnd *mulSrc1 = instrMul->GetSrc1();
IR::Opnd *mulSrc2 = instrMul->GetSrc2();
if (mulSrc1->IsRegOpnd() && mulSrc1->AsRegOpnd()->IsTaggedInt()
&& mulSrc2->IsRegOpnd() && mulSrc2->AsRegOpnd()->IsTaggedInt())
{
return false;
}
// Save prevInstr for the main lower loop
*pInstrPrev = instrMul->m_prev;
// Generate int31 fast-path for Mul, go to MulAdd helper if it fails, or one of the source is marked notInt
if (!(addSrc->IsRegOpnd() && addSrc->AsRegOpnd()->IsNotInt())
&& !(mulSrc1->IsRegOpnd() && mulSrc1->AsRegOpnd()->IsNotInt())
&& !(mulSrc2->IsRegOpnd() && mulSrc2->AsRegOpnd()->IsNotInt()))
{
this->GenerateFastMul(instrMul);
IR::LabelInstr *labelHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
IR::Instr *instr = IR::BranchInstr::New(Js::OpCode::B, labelHelper, this->m_func);
instrMul->InsertBefore(instr);
// Generate int31 fast-path for Add
bool success;
if (isSub)
{
success = this->GenerateFastSub(instrAdd);
}
else
{
success = this->GenerateFastAdd(instrAdd);
}
if (!success)
{
labelHelper->isOpHelper = false;
}
// Generate MulAdd helper call
instrAdd->InsertBefore(labelHelper);
}
if (instrAdd->dstIsTempNumber)
{
m_lowerer->LoadHelperTemp(instrAdd, instrAdd);
}
else
{
IR::Opnd *tempOpnd = IR::IntConstOpnd::New(0, TyInt32, this->m_func);
this->LoadHelperArgument(instrAdd, tempOpnd);
}
this->m_lowerer->LoadScriptContext(instrAdd);
IR::JnHelperMethod helper;
if (addSrc == instrAdd->GetSrc2())
{
instrAdd->FreeSrc1();
IR::Opnd *addOpnd = instrAdd->UnlinkSrc2();
this->LoadHelperArgument(instrAdd, addOpnd);
helper = isSub ? IR::HelperOp_MulSubRight : IR::HelperOp_MulAddRight;
}
else
{
instrAdd->FreeSrc2();
IR::Opnd *addOpnd = instrAdd->UnlinkSrc1();
this->LoadHelperArgument(instrAdd, addOpnd);
helper = isSub ? IR::HelperOp_MulSubLeft : IR::HelperOp_MulAddLeft;
}
IR::Opnd *src2 = instrMul->UnlinkSrc2();
this->LoadHelperArgument(instrAdd, src2);
IR::Opnd *src1 = instrMul->UnlinkSrc1();
this->LoadHelperArgument(instrAdd, src1);
this->ChangeToHelperCall(instrAdd, helper);
instrMul->Remove();
return true;
}
IR::Instr *
LowererMD::LoadCheckedFloat(
IR::RegOpnd *opndOrig,
IR::RegOpnd *opndFloat,
IR::LabelInstr *labelInline,
IR::LabelInstr *labelHelper,
IR::Instr *instrInsert,
const bool checkForNullInLoopBody)
{
//
// if (TaggedInt::Is(opndOrig))
// opndFloat = FCVT opndOrig_32
// B $labelInline
// else
// B $labelOpndIsNotInt
//
// $labelOpndIsNotInt:
// if (TaggedFloat::Is(opndOrig))
// s2 = MOV opndOrig
// s2 = EOR FloatTag_Value
// opndFloat = FCVT s2
// else
// B $labelHelper
//
// $labelInline:
//
IR::Instr *instrFirst = nullptr;
IR::LabelInstr *labelOpndIsNotInt = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
GenerateSmIntTest(opndOrig, instrInsert, labelOpndIsNotInt, &instrFirst);
if (opndOrig->GetValueType().IsLikelyFloat())
{
// Make this path helper if value is likely a float
instrInsert->InsertBefore(IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true));
}
IR::Opnd *opndOrig_32 = opndOrig->UseWithNewType(TyInt32, this->m_func);
EmitIntToFloat(opndFloat, opndOrig_32, instrInsert);
IR::Instr *jmpInline = IR::BranchInstr::New(Js::OpCode::B, labelInline, this->m_func);
instrInsert->InsertBefore(jmpInline);
instrInsert->InsertBefore(labelOpndIsNotInt);
GenerateFloatTest(opndOrig, instrInsert, labelHelper, checkForNullInLoopBody);
IR::RegOpnd *s2 = IR::RegOpnd::New(TyMachReg, this->m_func);
IR::Instr *mov = IR::Instr::New(Js::OpCode::MOV, s2, opndOrig, this->m_func);
instrInsert->InsertBefore(mov);
IR::Instr *eorTag = IR::Instr::New(Js::OpCode::EOR,
s2,
s2,
IR::IntConstOpnd::New(Js::FloatTag_Value,
TyMachReg,
this->m_func,
/* dontEncode = */ true),
this->m_func);
instrInsert->InsertBefore(eorTag);
IR::Instr *movFloat = IR::Instr::New(Js::OpCode::FMOV_GEN, opndFloat, s2, this->m_func);
instrInsert->InsertBefore(movFloat);
return instrFirst;
}
void
LowererMD::EmitLoadFloatFromNumber(IR::Opnd *dst, IR::Opnd *src, IR::Instr *insertInstr)
{
IR::LabelInstr *labelDone;
IR::Instr *instr;
labelDone = EmitLoadFloatCommon(dst, src, insertInstr, insertInstr->HasBailOutInfo());
if (labelDone == nullptr)
{
// We're done
insertInstr->Remove();
return;
}
// $Done note: insertAfter
insertInstr->InsertAfter(labelDone);
if (!insertInstr->HasBailOutInfo())
{
// $Done
insertInstr->Remove();
return;
}
IR::LabelInstr *labelNoBailOut = nullptr;
IR::SymOpnd *tempSymOpnd = nullptr;
if (insertInstr->GetBailOutKind() == IR::BailOutPrimitiveButString)
{
if (!this->m_func->tempSymDouble)
{
this->m_func->tempSymDouble = StackSym::New(TyFloat64, this->m_func);
this->m_func->StackAllocate(this->m_func->tempSymDouble, MachDouble);
}
// LEA r3, tempSymDouble
IR::RegOpnd *reg3Opnd = IR::RegOpnd::New(TyMachReg, this->m_func);
tempSymOpnd = IR::SymOpnd::New(this->m_func->tempSymDouble, TyFloat64, this->m_func);
Lowerer::InsertLea(reg3Opnd, tempSymOpnd, insertInstr);
// regBoolResult = to_number_fromPrimitive(value, &dst, allowUndef, scriptContext);
this->m_lowerer->LoadScriptContext(insertInstr);
IR::IntConstOpnd *allowUndefOpnd;
if (insertInstr->GetBailOutKind() == IR::BailOutPrimitiveButString)
{
allowUndefOpnd = IR::IntConstOpnd::New(true, TyInt32, this->m_func);
}
else
{
Assert(insertInstr->GetBailOutKind() == IR::BailOutNumberOnly);
allowUndefOpnd = IR::IntConstOpnd::New(false, TyInt32, this->m_func);
}
this->LoadHelperArgument(insertInstr, allowUndefOpnd);
this->LoadHelperArgument(insertInstr, reg3Opnd);
this->LoadHelperArgument(insertInstr, src);
IR::RegOpnd *regBoolResult = IR::RegOpnd::New(TyInt32, this->m_func);
instr = IR::Instr::New(Js::OpCode::Call, regBoolResult, IR::HelperCallOpnd::New(IR::HelperOp_ConvNumber_FromPrimitive, this->m_func), this->m_func);
insertInstr->InsertBefore(instr);
this->LowerCall(instr, 0);
// TEST regBoolResult, regBoolResult
instr = IR::Instr::New(Js::OpCode::TST, this->m_func);
instr->SetSrc1(regBoolResult);
instr->SetSrc2(regBoolResult);
insertInstr->InsertBefore(instr);
LegalizeMD::LegalizeInstr(instr, false);
// BNE $noBailOut
labelNoBailOut = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
instr = IR::BranchInstr::New(Js::OpCode::BNE, labelNoBailOut, this->m_func);
insertInstr->InsertBefore(instr);
}
// Bailout code
Assert(insertInstr->m_opcode == Js::OpCode::FromVar);
insertInstr->UnlinkDst();
insertInstr->FreeSrc1();
IR::Instr *bailoutInstr = insertInstr;
insertInstr = bailoutInstr->m_next;
this->m_lowerer->GenerateBailOut(bailoutInstr);
// $noBailOut
if (labelNoBailOut)
{
insertInstr->InsertBefore(labelNoBailOut);
Assert(dst->IsRegOpnd());
// VLDR dst, [pResult].f64
instr = IR::Instr::New(Js::OpCode::FLDR, dst, tempSymOpnd, this->m_func);
insertInstr->InsertBefore(instr);
LegalizeMD::LegalizeInstr(instr, false);
}
}
IR::LabelInstr*
LowererMD::EmitLoadFloatCommon(IR::Opnd *dst, IR::Opnd *src, IR::Instr *insertInstr, bool needHelperLabel)
{
IR::Instr *instr;
Assert(src->GetType() == TyVar);
Assert(dst->GetType() == TyFloat64 || TyFloat32);
bool isFloatConst = false;
IR::RegOpnd *regFloatOpnd = nullptr;
if (src->IsRegOpnd() && src->AsRegOpnd()->m_sym->m_isFltConst)
{
IR::RegOpnd *regOpnd = src->AsRegOpnd();
Assert(regOpnd->m_sym->m_isSingleDef);
Js::Var value = regOpnd->m_sym->GetFloatConstValueAsVar_PostGlobOpt();
IR::MemRefOpnd *memRef = IR::MemRefOpnd::New((BYTE*)value + Js::JavascriptNumber::GetValueOffset(), TyFloat64, this->m_func, IR::AddrOpndKindDynamicDoubleRef);
regFloatOpnd = IR::RegOpnd::New(TyFloat64, this->m_func);
instr = IR::Instr::New(Js::OpCode::FLDR, regFloatOpnd, memRef, this->m_func);
insertInstr->InsertBefore(instr);
LegalizeMD::LegalizeInstr(instr, false);
isFloatConst = true;
}
// Src is constant?
if (src->IsImmediateOpnd() || src->IsFloatConstOpnd())
{
regFloatOpnd = IR::RegOpnd::New(TyFloat64, this->m_func);
m_lowerer->LoadFloatFromNonReg(src, regFloatOpnd, insertInstr);
isFloatConst = true;
}
if (isFloatConst)
{
if (dst->GetType() == TyFloat32)
{
// FCVT.F32.F64 regOpnd32.f32, regOpnd.f64 -- Convert regOpnd from f64 to f32
IR::RegOpnd *regOpnd32 = regFloatOpnd->UseWithNewType(TyFloat32, this->m_func)->AsRegOpnd();
instr = IR::Instr::New(Js::OpCode::FCVT, regOpnd32, regFloatOpnd, this->m_func);
insertInstr->InsertBefore(instr);
// FMOV dst, regOpnd32
instr = IR::Instr::New(Js::OpCode::FMOV, dst, regOpnd32, this->m_func);
insertInstr->InsertBefore(instr);
}
else
{
instr = IR::Instr::New(Js::OpCode::FMOV, dst, regFloatOpnd, this->m_func);
insertInstr->InsertBefore(instr);
}
LegalizeMD::LegalizeInstr(instr, false);
return nullptr;
}
Assert(src->IsRegOpnd());
IR::LabelInstr *labelStore = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
IR::LabelInstr *labelHelper;
IR::LabelInstr *labelDone = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
if (needHelperLabel)
{
labelHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
}
else
{
labelHelper = labelDone;
}
IR::RegOpnd *reg2 = IR::RegOpnd::New(TyMachDouble, this->m_func);
// Load the float value in reg2
this->LoadCheckedFloat(src->AsRegOpnd(), reg2, labelStore, labelHelper, insertInstr, needHelperLabel);
// $Store
insertInstr->InsertBefore(labelStore);
if (dst->GetType() == TyFloat32)
{
IR::RegOpnd *reg2_32 = reg2->UseWithNewType(TyFloat32, this->m_func)->AsRegOpnd();
// FCVT.F32.F64 r2_32.f32, r2.f64 -- Convert regOpnd from f64 to f32
instr = IR::Instr::New(Js::OpCode::FCVT, reg2_32, reg2, this->m_func);
insertInstr->InsertBefore(instr);
// FMOV dst, r2_32
instr = IR::Instr::New(Js::OpCode::FMOV, dst, reg2_32, this->m_func);
insertInstr->InsertBefore(instr);
}
else
{
// FMOV dst, r2
instr = IR::Instr::New(Js::OpCode::FMOV, dst, reg2, this->m_func);
insertInstr->InsertBefore(instr);
}
LegalizeMD::LegalizeInstr(instr, false);
// B $Done
instr = IR::BranchInstr::New(Js::OpCode::B, labelDone, this->m_func);
insertInstr->InsertBefore(instr);
if (needHelperLabel)
{
// $Helper
insertInstr->InsertBefore(labelHelper);
}
return labelDone;
}
void
LowererMD::EmitLoadFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *insertInstr, IR::Instr * instrBailOut, IR::LabelInstr * labelBailOut)
{
IR::LabelInstr *labelDone;
IR::Instr *instr;
Assert(src->GetType() == TyVar);
Assert(dst->GetType() == TyFloat64 || TyFloat32);
Assert(src->IsRegOpnd());
labelDone = EmitLoadFloatCommon(dst, src, insertInstr, true);
if (labelDone == nullptr)
{
// We're done
return;
}
IR::BailOutKind bailOutKind = instrBailOut && instrBailOut->HasBailOutInfo() ? instrBailOut->GetBailOutKind() : IR::BailOutInvalid;
if (bailOutKind & IR::BailOutOnArrayAccessHelperCall)
{
// Bail out instead of making the helper call.
Assert(labelBailOut);
m_lowerer->InsertBranch(Js::OpCode::Br, labelBailOut, insertInstr);
insertInstr->InsertBefore(labelDone);
return;
}
IR::Opnd *memAddress = dst;
if (dst->IsRegOpnd())
{
IR::SymOpnd *symOpnd = nullptr;
if (dst->GetType() == TyFloat32)
{
symOpnd = IR::SymOpnd::New(StackSym::New(TyFloat32, this->m_func), TyFloat32, this->m_func);
this->m_func->StackAllocate(symOpnd->m_sym->AsStackSym(), sizeof(float));
}
else
{
symOpnd = IR::SymOpnd::New(StackSym::New(TyFloat64,this->m_func), TyMachDouble, this->m_func);
this->m_func->StackAllocate(symOpnd->m_sym->AsStackSym(), sizeof(double));
}
memAddress = symOpnd;
}
// LEA r3, dst
IR::RegOpnd *reg3Opnd = IR::RegOpnd::New(TyMachReg, this->m_func);
Lowerer::InsertLea(reg3Opnd, memAddress, insertInstr);
// to_number_full(value, &dst, scriptContext);
// Create dummy binary op to convert into helper
instr = IR::Instr::New(Js::OpCode::Add_A, this->m_func);
instr->SetSrc1(src);
instr->SetSrc2(reg3Opnd);
insertInstr->InsertBefore(instr);
if (BailOutInfo::IsBailOutOnImplicitCalls(bailOutKind))
{
_Analysis_assume_(instrBailOut != nullptr);
instr = instr->ConvertToBailOutInstr(instrBailOut->GetBailOutInfo(), bailOutKind);
if (instrBailOut->GetBailOutInfo()->bailOutInstr == instrBailOut)
{
IR::Instr * instrShare = instrBailOut->ShareBailOut();
m_lowerer->LowerBailTarget(instrShare);
}
}
IR::JnHelperMethod helper;
if (dst->GetType() == TyFloat32)
{
helper = IR::HelperOp_ConvFloat_Helper;
}
else
{
helper = IR::HelperOp_ConvNumber_Helper;
}
this->m_lowerer->LowerBinaryHelperMem(instr, helper);
if (dst->IsRegOpnd())
{
instr = IR::Instr::New(Js::OpCode::FLDR, dst , memAddress, this->m_func);
insertInstr->InsertBefore(instr);
LegalizeMD::LegalizeInstr(instr, false);
}
// $Done
insertInstr->InsertBefore(labelDone);
}
void
LowererMD::GenerateFastRecyclerAlloc(size_t allocSize, IR::RegOpnd* newObjDst, IR::Instr* insertionPointInstr, IR::LabelInstr* allocHelperLabel, IR::LabelInstr* allocDoneLabel)
{
ScriptContextInfo* scriptContext = this->m_func->GetScriptContextInfo();
void* allocatorAddress;
uint32 endAddressOffset;
uint32 freeListOffset;
size_t alignedSize = HeapInfo::GetAlignedSizeNoCheck(allocSize);
bool allowNativeCodeBumpAllocation = scriptContext->GetRecyclerAllowNativeCodeBumpAllocation();
Recycler::GetNormalHeapBlockAllocatorInfoForNativeAllocation((void*)scriptContext->GetRecyclerAddr(), alignedSize,
allocatorAddress, endAddressOffset, freeListOffset,
allowNativeCodeBumpAllocation, this->m_func->IsOOPJIT());
IR::RegOpnd * allocatorAddressRegOpnd = IR::RegOpnd::New(TyMachPtr, this->m_func);
// LDIMM allocatorAddressRegOpnd, allocator
IR::AddrOpnd* allocatorAddressOpnd = IR::AddrOpnd::New(allocatorAddress, IR::AddrOpndKindDynamicMisc, this->m_func);
IR::Instr * loadAllocatorAddressInstr = IR::Instr::New(Js::OpCode::LDIMM, allocatorAddressRegOpnd, allocatorAddressOpnd, this->m_func);
insertionPointInstr->InsertBefore(loadAllocatorAddressInstr);
IR::IndirOpnd * endAddressOpnd = IR::IndirOpnd::New(allocatorAddressRegOpnd, endAddressOffset, TyMachPtr, this->m_func);
IR::IndirOpnd * freeObjectListOpnd = IR::IndirOpnd::New(allocatorAddressRegOpnd, freeListOffset, TyMachPtr, this->m_func);
// LDR newObjDst, allocator->freeObjectList
IR::Instr * loadMemBlockInstr = IR::Instr::New(Js::OpCode::LDR, newObjDst, freeObjectListOpnd, this->m_func);
insertionPointInstr->InsertBefore(loadMemBlockInstr);
LegalizeMD::LegalizeInstr(loadMemBlockInstr, false);
// nextMemBlock = ADD newObjDst, allocSize
IR::RegOpnd * nextMemBlockOpnd = IR::RegOpnd::New(TyMachPtr, this->m_func);
IR::IntConstOpnd* allocSizeOpnd = IR::IntConstOpnd::New((int32)allocSize, TyInt32, this->m_func);
IR::Instr * loadNextMemBlockInstr = IR::Instr::New(Js::OpCode::ADD, nextMemBlockOpnd, newObjDst, allocSizeOpnd, this->m_func);
insertionPointInstr->InsertBefore(loadNextMemBlockInstr);
LegalizeMD::LegalizeInstr(loadNextMemBlockInstr, false);
// CMP nextMemBlock, allocator->endAddress
IR::Instr * checkInstr = IR::Instr::New(Js::OpCode::CMP, this->m_func);
checkInstr->SetSrc1(nextMemBlockOpnd);
checkInstr->SetSrc2(endAddressOpnd);
insertionPointInstr->InsertBefore(checkInstr);
LegalizeMD::LegalizeInstr(checkInstr, false);
// BHI $allocHelper
IR::BranchInstr * branchToAllocHelperInstr = IR::BranchInstr::New(Js::OpCode::BHI, allocHelperLabel, this->m_func);
insertionPointInstr->InsertBefore(branchToAllocHelperInstr);
// LDR allocator->freeObjectList, nextMemBlock
IR::Instr * setFreeObjectListInstr = IR::Instr::New(Js::OpCode::LDR, freeObjectListOpnd, nextMemBlockOpnd, this->m_func);
insertionPointInstr->InsertBefore(setFreeObjectListInstr);
LegalizeMD::LegalizeInstr(setFreeObjectListInstr, false);
// B $allocDone
IR::BranchInstr * branchToAllocDoneInstr = IR::BranchInstr::New(Js::OpCode::B, allocDoneLabel, this->m_func);
insertionPointInstr->InsertBefore(branchToAllocDoneInstr);
}
void
LowererMD::GenerateClz(IR::Instr * instr)
{
Assert(instr->GetSrc1()->IsIntegral32());
Assert(IRType_IsNativeInt(instr->GetDst()->GetType()));
instr->m_opcode = Js::OpCode::CLZ;
LegalizeMD::LegalizeInstr(instr, false);
}
void
LowererMD::SaveDoubleToVar(IR::RegOpnd * dstOpnd, IR::RegOpnd *opndFloat, IR::Instr *instrOrig, IR::Instr *instrInsert, bool isHelper)
{
Assert(opndFloat->GetType() == TyFloat64);
// Call JSNumber::ToVar to save the float operand to the result of the original (var) instruction
// s1 = MOV opndFloat
IR::RegOpnd *s1 = IR::RegOpnd::New(TyMachReg, m_func);
IR::Instr *mov = IR::Instr::New(Js::OpCode::FMOV_GEN, s1, opndFloat, m_func);
instrInsert->InsertBefore(mov);
if (m_func->GetJITFunctionBody()->IsAsmJsMode())
{
// s1 = FMOV_GEN src
// tmp = UBFX s1, #52, #11 ; extract exponent, bits 52-62
// cmp = tmp, 0x7FF
// beq tmp, helper
// b done
// helper:
// tmp2 = tmp2 = UBFX s1, #0, #52 ; extract mantissa, bits 0-51
// cbz tmp2, done
// s1 = JavascriptNumber::k_Nan
// done:
IR::RegOpnd* tmp = IR::RegOpnd::New(TyMachReg, m_func);
IR::Instr* newInstr = IR::Instr::New(Js::OpCode::UBFX, tmp, s1, IR::IntConstOpnd::New(BITFIELD(52, 11), TyMachReg, m_func, true), m_func);
instrInsert->InsertBefore(newInstr);
LowererMD::Legalize(newInstr);
newInstr = IR::Instr::New(Js::OpCode::CMP, tmp, IR::IntConstOpnd::New(0x7FF, TyMachReg, m_func, true), m_func);
instrInsert->InsertBefore(newInstr);
LowererMD::Legalize(newInstr);
IR::LabelInstr* helper = Lowerer::InsertLabel(true, instrInsert);
IR::Instr* branch = IR::BranchInstr::New(Js::OpCode::BEQ, helper, m_func);
helper->InsertBefore(branch);
IR::LabelInstr* done = Lowerer::InsertLabel(isHelper, instrInsert);
Lowerer::InsertBranch(Js::OpCode::Br, done, helper);
IR::RegOpnd* tmp2 = IR::RegOpnd::New(TyMachReg, m_func);
newInstr = IR::Instr::New(Js::OpCode::UBFX, tmp2, s1, IR::IntConstOpnd::New(BITFIELD(0, 52), TyMachReg, m_func, true), m_func);
done->InsertBefore(newInstr);
LowererMD::Legalize(newInstr);
branch = IR::BranchInstr::New(Js::OpCode::CBZ, done, m_func);
branch->SetSrc1(tmp2);
done->InsertBefore(branch);
IR::Opnd * opndNaN = IR::AddrOpnd::New((Js::Var)Js::JavascriptNumber::k_Nan, IR::AddrOpndKindConstantVar, m_func, true);
Lowerer::InsertMove(s1, opndNaN, done);
}
// s1 = EOR s1, FloatTag_Value
// dst = s1
IR::Instr* setTag = IR::Instr::New(Js::OpCode::EOR, s1, s1, IR::AddrOpnd::New((Js::Var)Js::FloatTag_Value, IR::AddrOpndKindConstantVar, this->m_func, true), this->m_func);
IR::Instr* movDst = IR::Instr::New(Js::OpCode::MOV, dstOpnd, s1, this->m_func);
instrInsert->InsertBefore(setTag);
instrInsert->InsertBefore(movDst);
LowererMD::Legalize(setTag);
}
void
LowererMD::GenerateFastAbs(IR::Opnd *dst, IR::Opnd *src, IR::Instr *callInstr, IR::Instr *insertInstr, IR::LabelInstr *labelHelper, IR::LabelInstr *doneLabel)
{
// if isFloat goto $float
// s1 = MOV src
// CMP s1, #0
// s1 = CSNEGPL s1, s1
// TBNZ s1, #31, $labelHelper
// s1 = ORR s1, AtomTag_IntPtr
// JMP $done
// $float
// CMP [src], JavascriptNumber.vtable
// JNE $helper
// MOVSD r1, [src + offsetof(value)]
// ANDPD r1, absDoubleCst
// dst = DoubleToVar(r1)
IR::Instr *instr = nullptr;
IR::LabelInstr *labelFloat = nullptr;
bool isInt = false;
bool isNotInt = false;
if (src->IsRegOpnd())
{
if (src->AsRegOpnd()->IsTaggedInt())
{
isInt = true;
}
else if (src->AsRegOpnd()->IsNotInt())
{
isNotInt = true;
}
}
else if (src->IsAddrOpnd())
{
IR::AddrOpnd *varOpnd = src->AsAddrOpnd();
Assert(varOpnd->IsVar() && Js::TaggedInt::Is(varOpnd->m_address));
int64 absValue = ::_abs64(Js::TaggedInt::ToInt32(varOpnd->m_address));
if (!Js::TaggedInt::IsOverflow(absValue))
{
varOpnd->SetAddress(Js::TaggedInt::ToVarUnchecked((int32)absValue), IR::AddrOpndKindConstantVar);
instr = IR::Instr::New(Js::OpCode::MOV, dst, varOpnd, this->m_func);
insertInstr->InsertBefore(instr);
return;
}
}
if (src->IsRegOpnd() == false)
{
IR::RegOpnd *regOpnd = IR::RegOpnd::New(TyVar, this->m_func);
instr = IR::Instr::New(Js::OpCode::MOV, regOpnd, src, this->m_func);
insertInstr->InsertBefore(instr);
src = regOpnd;
}
bool emitFloatAbs = !isInt;
if (!isNotInt)
{
if (!isInt)
{
IR::LabelInstr *label = labelHelper;
if (emitFloatAbs)
{
label = labelFloat = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
}
GenerateSmIntTest(src, insertInstr, label);
}
// s1 = MOV src
IR::RegOpnd *regSrc = IR::RegOpnd::New(TyInt32, this->m_func);
Lowerer::InsertMove(regSrc, src, insertInstr);
// CMP s1, #0
instr = IR::Instr::New(Js::OpCode::CMP, this->m_func);
instr->SetSrc1(regSrc);
instr->SetSrc2(IR::IntConstOpnd::New(0, IRType::TyInt32, this->m_func));
insertInstr->InsertBefore(instr);
Legalize(instr);
// s1 = CSNEGPL s1, s1
instr = IR::Instr::New(Js::OpCode::CSNEGPL, regSrc, regSrc, regSrc, this->m_func);
insertInstr->InsertBefore(instr);
Legalize(instr);
// TBNZ s1, #31, $labelHelper
instr = IR::BranchInstr::New(Js::OpCode::TBNZ, labelHelper, this->m_func);
instr->SetSrc1(regSrc);
instr->SetSrc2(IR::IntConstOpnd::New(31, IRType::TyInt32, this->m_func));
insertInstr->InsertBefore(instr);
// MOV dst, s1
instr = IR::Instr::New(Js::OpCode::MOV, dst, regSrc, this->m_func);
insertInstr->InsertBefore(instr);
GenerateInt32ToVarConversion(dst, insertInstr);
}
if (labelFloat)
{
// B $done
instr = IR::BranchInstr::New(Js::OpCode::B, doneLabel, this->m_func);
insertInstr->InsertBefore(instr);
// $float
insertInstr->InsertBefore(labelFloat);
}
if (emitFloatAbs)
{
// if (typeof(src) == double)
IR::RegOpnd *src64 = src->AsRegOpnd();
GenerateFloatTest(src64, insertInstr, labelHelper);
// dst64 = MOV src64
insertInstr->InsertBefore(IR::Instr::New(Js::OpCode::MOV, dst, src64, this->m_func));
// Unconditionally set the sign bit. This will get XORd away when we remove the tag.
// dst64 = ORR 0x8000000000000000
insertInstr->InsertBefore(IR::Instr::New(Js::OpCode::ORR, dst, dst, IR::IntConstOpnd::New(MachSignBit, TyMachReg, this->m_func), this->m_func));
}
else if(!isInt)
{
// The source is not known to be a tagged int, so either it's definitely not an int (isNotInt), or the int version of
// abs failed the tag check and jumped here. We can't emit the float version of abs (!emitFloatAbs) due to SSE2 not
// being available, so jump straight to the helper.
// JMP $helper
instr = IR::BranchInstr::New(Js::OpCode::B, labelHelper, this->m_func);
insertInstr->InsertBefore(instr);
}
}
bool LowererMD::GenerateFastCharAt(Js::BuiltinFunction index, IR::Opnd *dst, IR::Opnd *srcStr, IR::Opnd *srcIndex, IR::Instr *callInstr,
IR::Instr *insertInstr, IR::LabelInstr *labelHelper, IR::LabelInstr *doneLabel)
{
// if regSrcStr is not object, JMP $helper
// CMP [regSrcStr + offset(type)] , static string type -- check base string type
// BNE $helper
// MOV r1, [regSrcStr + offset(m_pszValue)]
// CBZ r1, $helper
// MOV r2, srcIndex
// If r2 is not int, B $helper
// Convert r2 to int
// CMP [regSrcStr + offsetof(length)], r2
// BLS $helper
// LDRH r2, [r1 + r2 * 2]
// if (charAt)
// MOV x0, r1
// MOV x1, scriptContext
// BL GetStringFromChar
// MOV dst, x0
// else (charCodeAt)
// if (codePointAt)
// Lowerer.GenerateFastCodePointAt -- Common inline functions
// Convert r2 to Var
// MOV dst, r2
bool isInt = false;
bool isNotTaggedValue = false;
IR::Instr *instr;
IR::RegOpnd *regSrcStr;
if (srcStr->IsRegOpnd())
{
if (srcStr->AsRegOpnd()->IsTaggedInt())
{
isInt = true;
}
else if (srcStr->AsRegOpnd()->IsNotTaggedValue())
{
isNotTaggedValue = true;
}
}
if (srcStr->IsRegOpnd() == false)
{
IR::RegOpnd *regOpnd = IR::RegOpnd::New(TyVar, this->m_func);
instr = IR::Instr::New(Js::OpCode::MOV, regOpnd, srcStr, this->m_func);
insertInstr->InsertBefore(instr);
regSrcStr = regOpnd;
}
else
{
regSrcStr = srcStr->AsRegOpnd();
}
if (!isNotTaggedValue)
{
if (!isInt)
{
GenerateObjectTest(regSrcStr, insertInstr, labelHelper);
}
else
{
// Insert delete branch opcode to tell the dbChecks not to assert on this helper label
IR::Instr *fakeBr = IR::PragmaInstr::New(Js::OpCode::DeletedNonHelperBranch, 0, this->m_func);
insertInstr->InsertBefore(fakeBr);
instr = IR::BranchInstr::New(Js::OpCode::B, labelHelper, this->m_func);
insertInstr->InsertBefore(instr);
}
}
// Bail out if index a constant and is less than zero.
if (srcIndex->IsAddrOpnd() && Js::TaggedInt::ToInt32(srcIndex->AsAddrOpnd()->m_address) < 0)
{
labelHelper->isOpHelper = false;
instr = IR::BranchInstr::New(Js::OpCode::B, labelHelper, this->m_func);
insertInstr->InsertBefore(instr);
return false;
}
this->m_lowerer->GenerateStringTest(regSrcStr, insertInstr, labelHelper, nullptr, false);
// r1 contains the value of the char16* pointer inside JavascriptString.
// MOV r1, [regSrcStr + offset(m_pszValue)]
IR::RegOpnd *r1 = IR::RegOpnd::New(TyMachReg, this->m_func);
IR::IndirOpnd * indirOpnd = IR::IndirOpnd::New(regSrcStr->AsRegOpnd(), Js::JavascriptString::GetOffsetOfpszValue(), TyMachPtr, this->m_func);
instr = IR::Instr::New(Js::OpCode::MOV, r1, indirOpnd, this->m_func);
insertInstr->InsertBefore(instr);
Legalize(instr);
// CBZ r1, $helper -- Null pointer test
instr = IR::BranchInstr::New(Js::OpCode::CBZ, labelHelper, this->m_func);
instr->SetSrc1(r1);
insertInstr->InsertBefore(instr);
IR::IndirOpnd *strLength = IR::IndirOpnd::New(regSrcStr, offsetof(Js::JavascriptString, m_charLength), TyUint32, this->m_func);
if (srcIndex->IsAddrOpnd())
{
// CMP [regSrcStr + offsetof(length)], index
instr = IR::Instr::New(Js::OpCode::CMP, this->m_func);
instr->SetSrc1(strLength);
instr->SetSrc2(IR::IntConstOpnd::New(Js::TaggedInt::ToUInt32(srcIndex->AsAddrOpnd()->m_address), TyUint32, this->m_func));
insertInstr->InsertBefore(instr);
Legalize(instr);
// Use unsigned compare, this should handle negative indexes as well (they become > INT_MAX)
// BLS $helper
instr = IR::BranchInstr::New(Js::OpCode::BLS, labelHelper, this->m_func);
insertInstr->InsertBefore(instr);
indirOpnd = IR::IndirOpnd::New(r1, Js::TaggedInt::ToUInt32(srcIndex->AsAddrOpnd()->m_address) * sizeof(char16), TyUint16, this->m_func);
}
else
{
IR::RegOpnd *r2 = IR::RegOpnd::New(TyVar, this->m_func);
// MOV r2, srcIndex
instr = IR::Instr::New(Js::OpCode::MOV, r2, srcIndex, this->m_func);
insertInstr->InsertBefore(instr);
if (!srcIndex->IsRegOpnd() || !srcIndex->AsRegOpnd()->IsTaggedInt())
{
GenerateSmIntTest(r2, insertInstr, labelHelper);
}
// Remove the tag
// MOV r2, r2 [32-bit move zeros upper 32 bits and thus the tag]
IR::Opnd * r2_32 = r2->UseWithNewType(TyInt32, this->m_func);
instr = IR::Instr::New(Js::OpCode::MOV_TRUNC, r2_32, r2_32, this->m_func);
insertInstr->InsertBefore(instr);
r2 = r2_32->AsRegOpnd();
// CMP [regSrcStr + offsetof(length)], r2
instr = IR::Instr::New(Js::OpCode::CMP, this->m_func);
instr->SetSrc1(strLength);
instr->SetSrc2(r2);
insertInstr->InsertBefore(instr);
Legalize(instr);
if (r2->GetSize() != MachPtr)
{
r2 = r2->UseWithNewType(TyMachPtr, this->m_func)->AsRegOpnd();
}
// Use unsigned compare, this should handle negative indexes as well (they become > INT_MAX)
// BLS $helper
instr = IR::BranchInstr::New(Js::OpCode::BLS, labelHelper, this->m_func);
insertInstr->InsertBefore(instr);
indirOpnd = IR::IndirOpnd::New(r1, r2, 1, TyUint16, this->m_func);
}
// LDRH charReg, [r1 + r2 * 2] -- this is the value of the char
IR::RegOpnd *charReg = IR::RegOpnd::New(TyMachReg, this->m_func);
Lowerer::InsertMove(charReg, indirOpnd, insertInstr);
if (index == Js::BuiltinFunction::JavascriptString_CharAt)
{
IR::Opnd *resultOpnd;
if (dst->IsEqual(srcStr))
{
resultOpnd = IR::RegOpnd::New(TyVar, this->m_func);
}
else
{
resultOpnd = dst;
}
this->m_lowerer->GenerateGetSingleCharString(charReg, resultOpnd, labelHelper, doneLabel, insertInstr, false);
}
else
{
Assert(index == Js::BuiltinFunction::JavascriptString_CharCodeAt || index == Js::BuiltinFunction::JavascriptString_CodePointAt);
if (index == Js::BuiltinFunction::JavascriptString_CodePointAt)
{
this->m_lowerer->GenerateFastInlineStringCodePointAt(insertInstr, this->m_func, strLength, srcIndex, charReg, r1);
}
GenerateInt32ToVarConversion(charReg, insertInstr);
// MOV dst, charReg
instr = IR::Instr::New(Js::OpCode::MOV, dst, charReg, this->m_func);
insertInstr->InsertBefore(instr);
}
return true;
}
void
LowererMD::EmitInt4Instr(IR::Instr *instr)
{
IR::Instr * newInstr;
IR::Opnd * src1;
IR::Opnd * src2;
switch (instr->m_opcode)
{
case Js::OpCode::Neg_I4:
instr->m_opcode = Js::OpCode::SUB;
instr->SetSrc2(instr->UnlinkSrc1());
instr->SetSrc1(IR::RegOpnd::New(nullptr, RegZR, TyInt32, instr->m_func));
break;
case Js::OpCode::Not_I4:
instr->m_opcode = Js::OpCode::MVN;
break;
case Js::OpCode::Add_I4:
instr->m_opcode = Js::OpCode::ADD;
break;
case Js::OpCode::Sub_I4:
instr->m_opcode = Js::OpCode::SUB;
break;
case Js::OpCode::Mul_I4:
instr->m_opcode = Js::OpCode::MUL;
break;
case Js::OpCode::DivU_I4:
AssertMsg(UNREACHED, "Unsigned div NYI");
case Js::OpCode::Div_I4:
instr->m_opcode = Js::OpCode::SDIV;
break;
case Js::OpCode::RemU_I4:
AssertMsg(UNREACHED, "Unsigned rem NYI");
case Js::OpCode::Rem_I4:
instr->m_opcode = Js::OpCode::REM;
break;
case Js::OpCode::Or_I4:
instr->m_opcode = Js::OpCode::ORR;
break;
case Js::OpCode::Xor_I4:
instr->m_opcode = Js::OpCode::EOR;
break;
case Js::OpCode::And_I4:
instr->m_opcode = Js::OpCode::AND;
break;
case Js::OpCode::Shl_I4:
case Js::OpCode::ShrU_I4:
case Js::OpCode::Shr_I4:
ChangeToShift(instr, false /* needFlags */);
break;
case Js::OpCode::BrTrue_I4:
instr->m_opcode = Js::OpCode::CBNZ;
break;
case Js::OpCode::BrFalse_I4:
instr->m_opcode = Js::OpCode::CBZ;
break;
case Js::OpCode::BrEq_I4:
instr->m_opcode = Js::OpCode::BEQ;
goto br2_Common;
case Js::OpCode::BrNeq_I4:
instr->m_opcode = Js::OpCode::BNE;
goto br2_Common;
case Js::OpCode::BrGt_I4:
instr->m_opcode = Js::OpCode::BGT;
goto br2_Common;
case Js::OpCode::BrGe_I4:
instr->m_opcode = Js::OpCode::BGE;
goto br2_Common;
case Js::OpCode::BrLe_I4:
instr->m_opcode = Js::OpCode::BLE;
goto br2_Common;
case Js::OpCode::BrLt_I4:
instr->m_opcode = Js::OpCode::BLT;
goto br2_Common;
case Js::OpCode::BrUnGt_I4:
instr->m_opcode = Js::OpCode::BHI;
goto br2_Common;
case Js::OpCode::BrUnGe_I4:
instr->m_opcode = Js::OpCode::BCS;
goto br2_Common;
case Js::OpCode::BrUnLt_I4:
instr->m_opcode = Js::OpCode::BCC;
goto br2_Common;
case Js::OpCode::BrUnLe_I4:
instr->m_opcode = Js::OpCode::BLS;
goto br2_Common;
br2_Common:
src1 = instr->UnlinkSrc1();
src2 = instr->UnlinkSrc2();
newInstr = IR::Instr::New(Js::OpCode::CMP, instr->m_func);
instr->InsertBefore(newInstr);
newInstr->SetSrc1(src1);
newInstr->SetSrc2(src2);
// Let instr point to the CMP so we can legalize it.
instr = newInstr;
break;
default:
AssertMsg(UNREACHED, "NYI I4 instr");
break;
}
LegalizeMD::LegalizeInstr(instr, false);
}
void
LowererMD::LowerInt4NegWithBailOut(
IR::Instr *const instr,
const IR::BailOutKind bailOutKind,
IR::LabelInstr *const bailOutLabel,
IR::LabelInstr *const skipBailOutLabel)
{
Assert(instr);
Assert(instr->m_opcode == Js::OpCode::Neg_I4);
Assert(!instr->HasBailOutInfo());
Assert(bailOutKind & IR::BailOutOnResultConditions || bailOutKind == IR::BailOutOnFailedHoistedLoopCountBasedBoundCheck);
Assert(bailOutLabel);
Assert(instr->m_next == bailOutLabel);
Assert(skipBailOutLabel);
Assert(instr->GetDst()->IsInt32());
Assert(instr->GetSrc1()->IsInt32());
// SUBS dst, zr, src1
// BVS $bailOutLabel
// BEQ $bailOutLabel
// B $skipBailOut
// $bailOut:
// ...
// $skipBailOut:
// Lower the instruction
instr->m_opcode = Js::OpCode::SUBS;
instr->ReplaceDst(instr->GetDst()->UseWithNewType(TyInt32, instr->m_func));
instr->SetSrc2(instr->UnlinkSrc1()->UseWithNewType(TyInt32, instr->m_func));
instr->SetSrc1(IR::RegOpnd::New(nullptr, RegZR, TyInt32, instr->m_func));
Legalize(instr);
if(bailOutKind & IR::BailOutOnOverflow)
{
bailOutLabel->InsertBefore(IR::BranchInstr::New(Js::OpCode::BVS, bailOutLabel, instr->m_func));
}
if(bailOutKind & IR::BailOutOnNegativeZero)
{
bailOutLabel->InsertBefore(IR::BranchInstr::New(Js::OpCode::BEQ, bailOutLabel, instr->m_func));
}
// Skip bailout
bailOutLabel->InsertBefore(IR::BranchInstr::New(LowererMD::MDUncondBranchOpcode, skipBailOutLabel, instr->m_func));
}
void
LowererMD::LowerInt4AddWithBailOut(
IR::Instr *const instr,
const IR::BailOutKind bailOutKind,
IR::LabelInstr *const bailOutLabel,
IR::LabelInstr *const skipBailOutLabel)
{
Assert(instr);
Assert(instr->m_opcode == Js::OpCode::Add_I4);
Assert(!instr->HasBailOutInfo());
Assert(
(bailOutKind & IR::BailOutOnResultConditions) == IR::BailOutOnOverflow ||
bailOutKind == IR::BailOutOnFailedHoistedLoopCountBasedBoundCheck);
Assert(bailOutLabel);
Assert(instr->m_next == bailOutLabel);
Assert(skipBailOutLabel);
Assert(instr->GetDst()->IsInt32());
Assert(instr->GetSrc1()->IsInt32());
Assert(instr->GetSrc2()->IsInt32());
// ADDS dst, src1, src2
// BVC skipBailOutLabel
// fallthrough to bailout
const auto dst = instr->GetDst(), src1 = instr->GetSrc1(), src2 = instr->GetSrc2();
Assert(dst->IsRegOpnd());
const bool dstEquSrc1 = dst->IsEqual(src1), dstEquSrc2 = dst->IsEqual(src2);
if(dstEquSrc1 || dstEquSrc2)
{
LowererMD::ChangeToAssign(instr->SinkDst(Js::OpCode::Ld_I4, RegNOREG, skipBailOutLabel));
}
// Lower the instruction
ChangeToAdd(instr, true /* needFlags */);
Legalize(instr);
// Skip bailout on no overflow
bailOutLabel->InsertBefore(IR::BranchInstr::New(Js::OpCode::BVC, skipBailOutLabel, instr->m_func));
// Fall through to bailOutLabel
}
void
LowererMD::LowerInt4SubWithBailOut(
IR::Instr *const instr,
const IR::BailOutKind bailOutKind,
IR::LabelInstr *const bailOutLabel,
IR::LabelInstr *const skipBailOutLabel)
{
Assert(instr);
Assert(instr->m_opcode == Js::OpCode::Sub_I4);
Assert(!instr->HasBailOutInfo());
Assert(
(bailOutKind & IR::BailOutOnResultConditions) == IR::BailOutOnOverflow ||
bailOutKind == IR::BailOutOnFailedHoistedLoopCountBasedBoundCheck);
Assert(bailOutLabel);
Assert(instr->m_next == bailOutLabel);
Assert(skipBailOutLabel);
Assert(instr->GetDst()->IsInt32());
Assert(instr->GetSrc1()->IsInt32());
Assert(instr->GetSrc2()->IsInt32());
// SUBS dst, src1, src2
// BVC skipBailOutLabel
// fallthrough to bailout
const auto dst = instr->GetDst(), src1 = instr->GetSrc1(), src2 = instr->GetSrc2();
Assert(dst->IsRegOpnd());
const bool dstEquSrc1 = dst->IsEqual(src1), dstEquSrc2 = dst->IsEqual(src2);
if(dstEquSrc1 || dstEquSrc2)
{
LowererMD::ChangeToAssign(instr->SinkDst(Js::OpCode::Ld_I4, RegNOREG, skipBailOutLabel));
}
// Lower the instruction
ChangeToSub(instr, true /* needFlags */);
Legalize(instr);
// Skip bailout on no overflow
bailOutLabel->InsertBefore(IR::BranchInstr::New(Js::OpCode::BVC, skipBailOutLabel, instr->m_func));
// Fall through to bailOutLabel
}
void
LowererMD::LowerInt4MulWithBailOut(
IR::Instr *const instr,
const IR::BailOutKind bailOutKind,
IR::LabelInstr *const bailOutLabel,
IR::LabelInstr *const skipBailOutLabel)
{
Assert(instr);
Assert(instr->m_opcode == Js::OpCode::Mul_I4);
Assert(!instr->HasBailOutInfo());
Assert(bailOutKind & IR::BailOutOnResultConditions || bailOutKind == IR::BailOutOnFailedHoistedLoopCountBasedBoundCheck);
Assert(bailOutLabel);
Assert(instr->m_next == bailOutLabel);
Assert(skipBailOutLabel);
IR::Opnd *dst = instr->GetDst();
IR::Opnd *src1 = instr->UnlinkSrc1();
IR::Opnd *src2 = instr->UnlinkSrc2();
IR::Instr *insertInstr;
Assert(dst->IsInt32());
Assert(src1->IsInt32());
Assert(src2->IsInt32());
// s3 = SMULL src1, src2 // result is i64
IR::Opnd* s3 = IR::RegOpnd::New(TyInt64, instr->m_func);
insertInstr = IR::Instr::New(Js::OpCode::SMULL, s3, src1, src2, instr->m_func);
instr->InsertBefore(insertInstr);
LegalizeMD::LegalizeInstr(insertInstr, false);
// dst = MOV_TRUNC s3
instr->m_opcode = Js::OpCode::MOV_TRUNC;
instr->SetSrc1(s3->UseWithNewType(TyInt32, instr->m_func));
// check negative zero
//
// If the result is zero, we need to check and only bail out if it would be -0.
// We know that if the result is 0/-0, at least operand should be zero.
// We should bailout if src1 + src2 < 0, as this proves that the other operand is negative
//
// CMN src1, src2
// BPL $skipBailOutLabel
//
// $bailOutLabel
// GenerateBailout
//
// $skipBailOutLabel
IR::LabelInstr *checkForNegativeZeroLabel = nullptr;
if(bailOutKind & IR::BailOutOnNegativeZero)
{
checkForNegativeZeroLabel = IR::LabelInstr::New(Js::OpCode::Label, instr->m_func, true);
bailOutLabel->InsertBefore(checkForNegativeZeroLabel);
Assert(dst->IsRegOpnd());
Assert(!src1->IsEqual(src2)); // cannot result in -0 if both operands are the same; GlobOpt should have figured that out
// CMN src1, src2
// BPL $skipBailOutLabel
insertInstr = IR::Instr::New(Js::OpCode::CMN, instr->m_func);
insertInstr->SetSrc1(src1);
insertInstr->SetSrc2(src2);
bailOutLabel->InsertBefore(insertInstr);
LegalizeMD::LegalizeInstr(insertInstr, false);
bailOutLabel->InsertBefore(IR::BranchInstr::New(Js::OpCode::BPL, skipBailOutLabel, instr->m_func));
// Fall through to bailOutLabel
}
IR::LabelInstr* insertBeforeInstr = checkForNegativeZeroLabel ? checkForNegativeZeroLabel : bailOutLabel;
//check overflow
if(bailOutKind & IR::BailOutOnMulOverflow || bailOutKind == IR::BailOutOnFailedHoistedLoopCountBasedBoundCheck)
{
insertInstr = IR::Instr::New(Js::OpCode::CMP_SXTW, instr->m_func);
insertInstr->SetSrc1(s3);
insertInstr->SetSrc2(s3);
instr->InsertBefore(insertInstr);
// BNE $bailOutHelper
insertInstr = IR::BranchInstr::New(Js::OpCode::BNE, bailOutLabel, instr->m_func);
instr->InsertBefore(insertInstr);
}
if(bailOutKind & IR::BailOutOnNegativeZero)
{
// TST dst, dst
// BEQ $checkForNegativeZeroLabel
insertInstr = IR::Instr::New(Js::OpCode::TST, instr->m_func);
insertInstr->SetSrc1(dst);
insertInstr->SetSrc2(dst);
insertBeforeInstr->InsertBefore(insertInstr);
LegalizeMD::LegalizeInstr(insertInstr, false);
insertBeforeInstr->InsertBefore(IR::BranchInstr::New(Js::OpCode::BEQ, checkForNegativeZeroLabel, instr->m_func));
}
insertBeforeInstr->InsertBefore(IR::BranchInstr::New(Js::OpCode::B, skipBailOutLabel, instr->m_func));
}
void
LowererMD::LowerInt4RemWithBailOut(
IR::Instr *const instr,
const IR::BailOutKind bailOutKind,
IR::LabelInstr *const bailOutLabel,
IR::LabelInstr *const skipBailOutLabel) const
{
Assert(instr);
Assert(instr->m_opcode == Js::OpCode::Rem_I4);
Assert(!instr->HasBailOutInfo());
Assert(bailOutKind & IR::BailOutOnResultConditions);
Assert(bailOutLabel);
Assert(instr->m_next == bailOutLabel);
Assert(skipBailOutLabel);
IR::Opnd *dst = instr->GetDst();
IR::Opnd *src1 = instr->GetSrc1();
Assert(dst->IsInt32());
Assert(src1->IsInt32());
Assert(instr->GetSrc2()->IsInt32());
//Lower the instruction
EmitInt4Instr(instr);
//check for negative zero
//We have, dst = src1 % src2
//We need to bailout if dst == 0 and src1 < 0
// tst dst, dst
// bne $skipBailOutLabel
// tst src1,src1
// bpl $skipBailOutLabel
//
//$bailOutLabel
// GenerateBailout();
//
//$skipBailOutLabel
if(bailOutKind & IR::BailOutOnNegativeZero)
{
IR::LabelInstr *checkForNegativeZeroLabel = IR::LabelInstr::New(Js::OpCode::Label, instr->m_func, true);
bailOutLabel->InsertBefore(checkForNegativeZeroLabel);
IR::Instr *insertInstr = IR::Instr::New(Js::OpCode::TST, instr->m_func);
insertInstr->SetSrc1(dst);
insertInstr->SetSrc2(dst);
bailOutLabel->InsertBefore(insertInstr);
LegalizeMD::LegalizeInstr(insertInstr, false);
IR::Instr *branchInstr = IR::BranchInstr::New(Js::OpCode::BNE, skipBailOutLabel, instr->m_func);
bailOutLabel->InsertBefore(branchInstr);
insertInstr = IR::Instr::New(Js::OpCode::TST, instr->m_func);
insertInstr->SetSrc1(src1);
insertInstr->SetSrc2(src1);
bailOutLabel->InsertBefore(insertInstr);
LegalizeMD::LegalizeInstr(insertInstr, false);
branchInstr = IR::BranchInstr::New(Js::OpCode::BPL, skipBailOutLabel, instr->m_func);
bailOutLabel->InsertBefore(branchInstr);
}
// Fall through to bailOutLabel
}
void
LowererMD::EmitLoadVar(IR::Instr *instrLoad, bool isFromUint32, bool isHelper)
{
// MOV.32 e1, e_src1
// TBNZ e1, #31, $Helper [uint32] -- overflows?
// ORR r1, 1<<VarTag_Shift
// MOV r_dst, r1
// JMP $done [uint32]
// $helper [uint32]
// EmitLoadVarNoCheck
// $done [uint32]
Assert(instrLoad->GetSrc1()->IsRegOpnd());
Assert(instrLoad->GetDst()->GetType() == TyVar);
bool isInt = false;
IR::Opnd *dst = instrLoad->GetDst();
IR::RegOpnd *src1 = instrLoad->GetSrc1()->AsRegOpnd();
IR::LabelInstr *labelHelper = nullptr;
// TODO: Fix bad lowering. We shouldn't get TyVars here.
// Assert(instrLoad->GetSrc1()->GetType() == TyInt32);
src1->SetType(isFromUint32 ? TyUint32 : TyInt32);
if (src1->IsTaggedInt())
{
isInt = true;
}
else if (src1->IsNotInt())
{
// ToVar()
this->EmitLoadVarNoCheck(dst->AsRegOpnd(), src1, instrLoad, isFromUint32, isHelper);
return;
}
IR::RegOpnd *r1 = IR::RegOpnd::New(TyVar, m_func);
// e1 = MOV_TRUNC src1
// (Use 32-bit MOV_TRUNC here as we rely on the register copy to clear the upper 32 bits.)
IR::RegOpnd *e1 = r1->Copy(m_func)->AsRegOpnd();
e1->SetType(TyInt32);
instrLoad->InsertBefore(IR::Instr::New(Js::OpCode::MOV_TRUNC,
e1,
src1,
m_func));
if (!isInt && isFromUint32)
{
Assert(!labelHelper);
labelHelper = IR::LabelInstr::New(Js::OpCode::Label, m_func, true);
// TBNZ e1, #31, $helper
IR::Instr* instr = IR::BranchInstr::New(Js::OpCode::TBNZ, labelHelper, m_func);
instr->SetSrc1(e1);
instr->SetSrc2(IR::IntConstOpnd::New(31, TyInt32, m_func));
instrLoad->InsertBefore(instr);
}
// The previous operation clears the top 32 bits.
// ORR r1, 1<<VarTag_Shift
this->GenerateInt32ToVarConversion(r1, instrLoad);
// REVIEW: We need r1 only if we could generate sn = Ld_A_I4 sn. i.e. the destination and
// source are the same.
// r_dst = MOV r1
instrLoad->InsertBefore(IR::Instr::New(Js::OpCode::MOV,
dst,
r1,
m_func));
if (labelHelper)
{
Assert(isFromUint32);
// B $done
IR::LabelInstr * labelDone = IR::LabelInstr::New(Js::OpCode::Label, m_func, isHelper);
instrLoad->InsertBefore(IR::BranchInstr::New(Js::OpCode::B, labelDone, m_func));
// $helper
instrLoad->InsertBefore(labelHelper);
// ToVar()
this->EmitLoadVarNoCheck(dst->AsRegOpnd(), src1, instrLoad, isFromUint32, true);
// $done
instrLoad->InsertBefore(labelDone);
}
instrLoad->Remove();
}
void
LowererMD::EmitLoadVarNoCheck(IR::RegOpnd * dst, IR::RegOpnd * src, IR::Instr *instrLoad, bool isFromUint32, bool isHelper)
{
IR::RegOpnd * floatReg = IR::RegOpnd::New(TyFloat64, this->m_func);
if (isFromUint32)
{
this->EmitUIntToFloat(floatReg, src, instrLoad);
}
else
{
this->EmitIntToFloat(floatReg, src, instrLoad);
}
this->SaveDoubleToVar(dst, floatReg, instrLoad, instrLoad, isHelper);
}
bool
LowererMD::EmitLoadInt32(IR::Instr *instrLoad, bool conversionFromObjectAllowed, bool bailOutOnHelper, IR::LabelInstr * labelBailOut)
{
//
// r1 = MOV src1
// rtest = UBFX src1, AtomTag_Shift, 64 - AtomTag_Shift
// EOR rtest, 1
// CBNZ $helper or $float
// r_dst = MOV.32 e_src1
// B $done
// $float:
// dst = ConvertToFloat(r1, $helper)
// $helper:
// r_dst = ToInt32()
//
Assert(instrLoad->GetSrc1()->IsRegOpnd());
Assert(instrLoad->GetSrc1()->GetType() == TyVar);
// TODO: Fix bad lowering. We shouldn't see TyVars here.
// Assert(instrLoad->GetDst()->GetType() == TyInt32);
bool isInt = false;
bool isNotInt = false;
IR::Opnd *dst = instrLoad->GetDst();
IR::RegOpnd *src1 = instrLoad->GetSrc1()->AsRegOpnd();
IR::LabelInstr *helper = nullptr;
IR::LabelInstr *labelFloat = nullptr;
IR::LabelInstr *done = nullptr;
if (src1->IsTaggedInt())
{
isInt = true;
}
else if (src1->IsNotInt())
{
isNotInt = true;
}
if (src1->IsEqual(instrLoad->GetDst()) == false)
{
// r1 = MOV src1
IR::RegOpnd *r1 = IR::RegOpnd::New(TyVar, instrLoad->m_func);
r1->SetValueType(src1->GetValueType());
instrLoad->InsertBefore(IR::Instr::New(Js::OpCode::MOV, r1, src1, instrLoad->m_func));
src1 = r1;
}
const ValueType src1ValueType(src1->GetValueType());
const bool doFloatToIntFastPath =
(src1ValueType.IsLikelyFloat() || src1ValueType.IsLikelyUntaggedInt()) &&
!(instrLoad->HasBailOutInfo() && (instrLoad->GetBailOutKind() == IR::BailOutIntOnly || instrLoad->GetBailOutKind() == IR::BailOutExpectingInteger));
if (isNotInt)
{
// Known to be non-integer. If we are required to bail out on helper call, just re-jit.
if (!doFloatToIntFastPath && bailOutOnHelper)
{
if(!GlobOpt::DoEliminateArrayAccessHelperCall(this->m_func))
{
// Array access helper call removal is already off for some reason. Prevent trying to rejit again
// because it won't help and the same thing will happen again. Just abort jitting this function.
if(PHASE_TRACE(Js::BailOutPhase, this->m_func))
{
Output::Print(_u(" Aborting JIT because EliminateArrayAccessHelperCall is already off\n"));
Output::Flush();
}
throw Js::OperationAbortedException();
}
throw Js::RejitException(RejitReason::ArrayAccessHelperCallEliminationDisabled);
}
}
else
{
// It could be an integer in this case.
if (!isInt)
{
if(doFloatToIntFastPath)
{
labelFloat = IR::LabelInstr::New(Js::OpCode::Label, instrLoad->m_func, false);
}
else
{
helper = IR::LabelInstr::New(Js::OpCode::Label, instrLoad->m_func, true);
}
this->GenerateSmIntTest(src1, instrLoad, labelFloat ? labelFloat : helper);
}
instrLoad->InsertBefore(IR::Instr::New(Js::OpCode::MOV_TRUNC,
dst->UseWithNewType(TyInt32, instrLoad->m_func),
src1->UseWithNewType(TyInt32, instrLoad->m_func),
instrLoad->m_func));
if (!isInt)
{
// JMP $done
done = instrLoad->GetOrCreateContinueLabel();
instrLoad->InsertBefore(IR::BranchInstr::New(Js::OpCode::B, done, m_func));
}
}
if (!isInt)
{
if(doFloatToIntFastPath)
{
if(labelFloat)
{
instrLoad->InsertBefore(labelFloat);
}
if(!helper)
{
helper = IR::LabelInstr::New(Js::OpCode::Label, instrLoad->m_func, true);
}
if(!done)
{
done = instrLoad->GetOrCreateContinueLabel();
}
IR::RegOpnd* floatOpnd = this->CheckFloatAndUntag(src1, instrLoad, helper);
this->ConvertFloatToInt32(instrLoad->GetDst(), floatOpnd, helper, done, instrLoad);
}
// $helper:
if (helper)
{
instrLoad->InsertBefore(helper);
}
if(instrLoad->HasBailOutInfo() && (instrLoad->GetBailOutKind() == IR::BailOutIntOnly || instrLoad->GetBailOutKind() == IR::BailOutExpectingInteger))
{
// Avoid bailout if we have a JavascriptNumber whose value is a signed 32-bit integer
m_lowerer->LoadInt32FromUntaggedVar(instrLoad);
// Need to bail out instead of calling a helper
return true;
}
if (bailOutOnHelper)
{
Assert(labelBailOut);
m_lowerer->InsertBranch(Js::OpCode::Br, labelBailOut, instrLoad);
instrLoad->Remove();
}
else if (conversionFromObjectAllowed)
{
m_lowerer->LowerUnaryHelperMem(instrLoad, IR::HelperConv_ToInt32);
}
else
{
m_lowerer->LowerUnaryHelperMemWithBoolReference(instrLoad, IR::HelperConv_ToInt32_NoObjects, true /*useBoolForBailout*/);
}
}
else
{
instrLoad->Remove();
}
return false;
}
void
LowererMD::ImmedSrcToReg(IR::Instr * instr, IR::Opnd * newOpnd, int srcNum)
{
if (srcNum == 2)
{
instr->SetSrc2(newOpnd);
}
else
{
Assert(srcNum == 1);
instr->SetSrc1(newOpnd);
}
switch (instr->m_opcode)
{
case Js::OpCode::LDIMM:
instr->m_opcode = Js::OpCode::MOV;
break;
default:
// Nothing to do (unless we have immed/reg variations for other instructions).
break;
}
}
IR::LabelInstr *
LowererMD::GetBailOutStackRestoreLabel(BailOutInfo * bailOutInfo, IR::LabelInstr * exitTargetInstr)
{
return exitTargetInstr;
}
StackSym *
LowererMD::GetImplicitParamSlotSym(Js::ArgSlot argSlot)
{
return GetImplicitParamSlotSym(argSlot, this->m_func);
}
StackSym *
LowererMD::GetImplicitParamSlotSym(Js::ArgSlot argSlot, Func * func)
{
// For ARM, offset for implicit params always start at 0
// TODO: Consider not to use the argSlot number for the param slot sym, which can
// be confused with arg slot number from javascript
StackSym * stackSym = StackSym::NewParamSlotSym(argSlot, func);
func->SetArgOffset(stackSym, argSlot * MachPtr);
func->SetHasImplicitParamLoad();
return stackSym;
}
IR::LabelInstr *
LowererMD::EnsureEHEpilogLabel()
{
if (this->m_func->m_epilogLabel)
{
return this->m_func->m_epilogLabel;
}
IR::Instr *exitInstr = this->m_func->m_exitInstr;
IR::Instr *prevInstr = exitInstr->GetPrevRealInstrOrLabel();
if (prevInstr->IsLabelInstr())
{
this->m_func->m_epilogLabel = prevInstr->AsLabelInstr();
return prevInstr->AsLabelInstr();
}
IR::LabelInstr *labelInstr = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
exitInstr->InsertBefore(labelInstr);
this->m_func->m_epilogLabel = labelInstr;
return labelInstr;
}
// Helper method: inserts legalized assign for given srcOpnd into RegD0 in front of given instr in the following way:
// dstReg = InsertMove srcOpnd
// Used to put args of inline built-in call into RegD0 and RegD1 before we call actual CRT function.
void LowererMD::GenerateAssignForBuiltinArg(RegNum dstReg, IR::Opnd* srcOpnd, IR::Instr* instr)
{
IR::RegOpnd* tempDst = IR::RegOpnd::New(nullptr, dstReg, TyMachDouble, this->m_func);
tempDst->m_isCallArg = true; // This is to make sure that lifetime of opnd is virtually extended until next CALL instr.
Lowerer::InsertMove(tempDst, srcOpnd, instr);
}
// For given InlineMathXXX instr, generate the call to actual CRT function/CPU instr.
void LowererMD::GenerateFastInlineBuiltInCall(IR::Instr* instr, IR::JnHelperMethod helperMethod)
{
switch (instr->m_opcode)
{
case Js::OpCode::InlineMathSqrt:
// Sqrt maps directly to the VFP instruction.
// src and dst are already float, all we need is just change the opcode and legalize.
// Before:
// dst = InlineMathSqrt src1
// After:
// <potential FSTR by legalizer if src1 is not a register>
// dst = FSQRT src1
Assert(helperMethod == (IR::JnHelperMethod)0);
Assert(instr->GetSrc2() == nullptr);
instr->m_opcode = Js::OpCode::FSQRT;
LegalizeMD::LegalizeInstr(instr, /* fPostRegAlloc = */ false);
break;
case Js::OpCode::InlineMathAbs:
Assert(helperMethod == (IR::JnHelperMethod)0);
return GenerateFastInlineBuiltInMathAbs(instr);
case Js::OpCode::InlineMathFloor:
case Js::OpCode::InlineMathCeil:
Assert(helperMethod == (IR::JnHelperMethod)0);
return GenerateFastInlineBuiltInMathFloorCeil(instr);
case Js::OpCode::InlineMathRound:
Assert(helperMethod == (IR::JnHelperMethod)0);
return GenerateFastInlineBuiltInMathRound(instr);
case Js::OpCode::InlineMathMin:
case Js::OpCode::InlineMathMax:
Assert(helperMethod == (IR::JnHelperMethod)0);
return GenerateFastInlineBuiltInMathMinMax(instr);
default:
// Before:
// dst = <Built-in call> src1, src2
// After:
// d0 = InsertMove src1
// lr = MOV helperAddr
// BLX lr
// dst = InsertMove call->dst (d0)
// Src1
AssertMsg(instr->GetDst()->IsFloat(), "Currently accepting only float args for math helpers -- dst.");
AssertMsg(instr->GetSrc1()->IsFloat(), "Currently accepting only float args for math helpers -- src1.");
AssertMsg(!instr->GetSrc2() || instr->GetSrc2()->IsFloat(), "Currently accepting only float args for math helpers -- src2.");
this->GenerateAssignForBuiltinArg((RegNum)FIRST_FLOAT_REG, instr->UnlinkSrc1(), instr);
// Src2
if (instr->GetSrc2() != nullptr)
{
this->GenerateAssignForBuiltinArg((RegNum)(FIRST_FLOAT_REG + 1), instr->UnlinkSrc2(), instr);
}
// Call CRT.
IR::RegOpnd* floatCallDst = IR::RegOpnd::New(nullptr, (RegNum)(FIRST_FLOAT_REG), TyMachDouble, this->m_func); // Dst in d0.
IR::Instr* floatCall = IR::Instr::New(Js::OpCode::BLR, floatCallDst, this->m_func);
instr->InsertBefore(floatCall);
// lr = MOV helperAddr
// BLX lr
IR::AddrOpnd* targetAddr = IR::AddrOpnd::New((Js::Var)IR::GetMethodOriginalAddress(m_func->GetThreadContextInfo(), helperMethod), IR::AddrOpndKind::AddrOpndKindDynamicMisc, this->m_func);
IR::RegOpnd *targetOpnd = IR::RegOpnd::New(nullptr, RegLR, TyMachPtr, this->m_func);
IR::Instr *movInstr = IR::Instr::New(Js::OpCode::LDIMM, targetOpnd, targetAddr, this->m_func);
targetOpnd->m_isCallArg = true;
floatCall->SetSrc1(targetOpnd);
floatCall->InsertBefore(movInstr);
// Save the result.
Lowerer::InsertMove(instr->UnlinkDst(), floatCall->GetDst(), instr);
instr->Remove();
break;
}
}
void
LowererMD::GenerateFastInlineBuiltInMathAbs(IR::Instr *inlineInstr)
{
IR::Opnd* src = inlineInstr->GetSrc1()->Copy(this->m_func);
IR::Opnd* dst = inlineInstr->UnlinkDst();
Assert(src);
IR::Instr* tmpInstr;
IRType srcType = src->GetType();
IR::Instr* nextInstr = IR::LabelInstr::New(Js::OpCode::Label, m_func);
IR::Instr* continueInstr = m_lowerer->LowerBailOnIntMin(inlineInstr);
continueInstr->InsertAfter(nextInstr);
if (srcType == IRType::TyInt32)
{
// Note: if execution gets so far, we always get (untagged) int32 here.
Assert(src->IsRegOpnd());
// CMP src, #0
tmpInstr = IR::Instr::New(Js::OpCode::CMP, this->m_func);
tmpInstr->SetSrc1(src);
tmpInstr->SetSrc2(IR::IntConstOpnd::New(0, IRType::TyInt32, this->m_func));
nextInstr->InsertBefore(tmpInstr);
Legalize(tmpInstr);
// dst = CSNEGPL dst, src, src
tmpInstr = IR::Instr::New(Js::OpCode::CSNEGPL, dst, src, src, this->m_func);
nextInstr->InsertBefore(tmpInstr);
Legalize(tmpInstr);
}
else if (srcType == IRType::TyFloat64)
{
// FABS dst, src
tmpInstr = IR::Instr::New(Js::OpCode::FABS, dst, src, this->m_func);
nextInstr->InsertBefore(tmpInstr);
}
else
{
AssertMsg(FALSE, "GenerateFastInlineBuiltInMathAbs: unexpected type of the src!");
}
}
void
LowererMD::GenerateFastInlineMathFround(IR::Instr* instr)
{
// Note that this is fround, not round; this operation is to
// round a double to Float32 precision.
IR::Opnd* src1 = instr->GetSrc1();
IR::Opnd* dst = instr->GetDst();
Assert(dst->IsFloat());
Assert(src1->IsFloat());
IRType srcType = src1->GetType();
IRType dstType = dst->GetType();
if (srcType == TyFloat32)
{
if (dstType == TyFloat32)
{
LowererMD::ChangeToAssign(instr);
}
else
{
Assert(dstType == TyFloat64);
instr->m_opcode = Js::OpCode::FCVT;
LegalizeMD::LegalizeInstr(instr, false);
}
}
else
{
Assert(srcType == TyFloat64);
if (dstType == TyFloat32)
{
instr->m_opcode = Js::OpCode::FCVT;
LegalizeMD::LegalizeInstr(instr, false);
}
else
{
Assert(dstType == TyFloat64);
IR::RegOpnd* tempOpnd = IR::RegOpnd::New(TyFloat32, instr->m_func);
IR::Instr* shortener = IR::Instr::New(Js::OpCode::FCVT, tempOpnd, instr->UnlinkSrc1(), instr->m_func);
instr->InsertBefore(shortener);
instr->SetSrc1(tempOpnd);
instr->m_opcode = Js::OpCode::FCVT;
LegalizeMD::LegalizeInstr(instr, false);
}
}
}
void
LowererMD::GenerateFastInlineBuiltInMathRound(IR::Instr* instr)
{
Assert(instr->GetDst()->IsInt32());
IR::LabelInstr * doneLabel = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
// Allocate an integer register for negative zero checks if needed
IR::Opnd * negZeroReg = nullptr;
if (instr->ShouldCheckForNegativeZero())
{
negZeroReg = IR::RegOpnd::New(TyInt64, this->m_func);
}
// FMOV floatOpnd, src
IR::Opnd * src = instr->UnlinkSrc1();
IR::RegOpnd* floatOpnd = IR::RegOpnd::New(TyFloat64, this->m_func);
this->m_lowerer->InsertMove(floatOpnd, src, instr);
IR::LabelInstr * bailoutLabel = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);;
bool sharedBailout = (instr->GetBailOutInfo()->bailOutInstr != instr) ? true : false;
// FMOV_GEN negZeroReg, floatOpnd (note this is done before the 0.5 add below)
if (negZeroReg)
{
instr->InsertBefore(IR::Instr::New(Js::OpCode::FMOV_GEN, negZeroReg, floatOpnd, instr->m_func));
}
// Add 0.5
IR::Opnd * pointFive = IR::MemRefOpnd::New(m_func->GetThreadContextInfo()->GetDoublePointFiveAddr(), IRType::TyFloat64, this->m_func, IR::AddrOpndKindDynamicDoubleRef);
this->m_lowerer->InsertAdd(false, floatOpnd, floatOpnd, pointFive, instr);
// MSR FPSR, xzr
IR::Instr* setFPSRInstr = IR::Instr::New(Js::OpCode::MSR_FPSR, instr->m_func);
setFPSRInstr->SetSrc1(IR::RegOpnd::New(nullptr, RegZR, TyUint32, instr->m_func));
instr->InsertBefore(setFPSRInstr);
// FCVTM intOpnd, floatOpnd
IR::Opnd * intOpnd = IR::RegOpnd::New(TyInt32, this->m_func);
instr->InsertBefore(IR::Instr::New(Js::OpCode::FCVTM, intOpnd, floatOpnd, instr->m_func));
// FCVTM would set FPSR.IOC (0th bit in FPSR) if the source cannot be represented within the destination register
// MRS exceptReg, FPSR
IR::Opnd * exceptReg = IR::RegOpnd::New(TyUint32, this->m_func);
instr->InsertBefore(IR::Instr::New(Js::OpCode::MRS_FPSR, exceptReg, instr->m_func));
IR::LabelInstr* checkOverflowLabel = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
// CBNZ intOpnd, done/checkOverflow
IR::BranchInstr * cbnzInstr = cbnzInstr = IR::BranchInstr::New(Js::OpCode::CBNZ, checkOverflowLabel, instr->m_func);
cbnzInstr->SetSrc1(intOpnd);
instr->InsertBefore(cbnzInstr);
if (negZeroReg)
{
// TBZ negZeroReg, 63
IR::BranchInstr * tbzInstr = IR::BranchInstr::New(Js::OpCode::TBZ, doneLabel, instr->m_func);
tbzInstr->SetSrc1(negZeroReg);
tbzInstr->SetSrc2(IR::IntConstOpnd::New(63, TyMachReg, instr->m_func));
instr->InsertBefore(tbzInstr);
Lowerer::InsertBranch(LowererMD::MDUncondBranchOpcode, bailoutLabel, instr);
}
instr->InsertBefore(checkOverflowLabel);
// TBZ exceptReg, #0, done
IR::BranchInstr * tbzInstr = IR::BranchInstr::New(Js::OpCode::TBZ, doneLabel, instr->m_func);
tbzInstr->SetSrc1(exceptReg);
tbzInstr->SetSrc2(IR::IntConstOpnd::New(0, TyMachReg, instr->m_func));
instr->InsertBefore(tbzInstr);
IR::Opnd * dst = instr->UnlinkDst();
instr->InsertAfter(doneLabel);
if (!sharedBailout)
{
instr->InsertBefore(bailoutLabel);
}
// In case of a shared bailout, we should jump to the code that sets some data on the bailout record which is specific
// to this bailout. Pass the bailoutLabel to GenerateFunction so that it may use the label as the collectRuntimeStatsLabel.
this->m_lowerer->GenerateBailOut(instr, nullptr, nullptr, sharedBailout ? bailoutLabel : nullptr);
// MOV dst, intOpnd
IR::Instr* movInstr = IR::Instr::New(Js::OpCode::MOV, dst, intOpnd, this->m_func);
doneLabel->InsertAfter(movInstr);
}
void
LowererMD::GenerateFastInlineBuiltInMathFloorCeil(IR::Instr* instr)
{
Assert(instr->GetDst()->IsInt32());
IR::LabelInstr * doneLabel = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
// Allocate an integer register for negative zero checks if needed
IR::Opnd * negZeroReg = nullptr;
if (instr->ShouldCheckForNegativeZero())
{
negZeroReg = IR::RegOpnd::New(TyInt64, this->m_func);
}
// FMOV floatOpnd, src
IR::Opnd * src = instr->UnlinkSrc1();
IR::RegOpnd* floatOpnd = IR::RegOpnd::New(TyFloat64, this->m_func);
this->m_lowerer->InsertMove(floatOpnd, src, instr);
IR::LabelInstr * bailoutLabel = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);;
bool sharedBailout = (instr->GetBailOutInfo()->bailOutInstr != instr) ? true : false;
// MSR FPSR, xzr
IR::Instr* setFPSRInstr = IR::Instr::New(Js::OpCode::MSR_FPSR, instr->m_func);
setFPSRInstr->SetSrc1(IR::RegOpnd::New(nullptr, RegZR, TyUint32, instr->m_func));
instr->InsertBefore(setFPSRInstr);
// FMOV_GEN negZeroReg, floatOpnd (note this is done before the 0.5 add below)
if (negZeroReg)
{
instr->InsertBefore(IR::Instr::New(Js::OpCode::FMOV_GEN, negZeroReg, floatOpnd, instr->m_func));
}
// FCVTM/FCVTP intOpnd, floatOpnd
IR::Opnd * intOpnd = IR::RegOpnd::New(TyInt32, this->m_func);
instr->InsertBefore(IR::Instr::New((instr->m_opcode == Js::OpCode::InlineMathCeil) ? Js::OpCode::FCVTP : Js::OpCode::FCVTM, intOpnd, floatOpnd, instr->m_func));
// EOR negZeroReg, #0x8000000000000000
if (negZeroReg)
{
instr->InsertBefore(IR::Instr::New(Js::OpCode::EOR, negZeroReg, negZeroReg, IR::IntConstOpnd::New(0x8000000000000000ULL, IRType::TyInt64, this->m_func), instr->m_func));
}
// FCVTM would set FPSR.IOC (0th bit in FPSR) if the source cannot be represented within the destination register
// MRS exceptReg, FPSR
IR::Opnd * exceptReg = IR::RegOpnd::New(TyUint32, this->m_func);
instr->InsertBefore(IR::Instr::New(Js::OpCode::MRS_FPSR, exceptReg, instr->m_func));
// CBZ negZeroReg, bailout
if (negZeroReg)
{
IR::BranchInstr * cbzInstr = IR::BranchInstr::New(Js::OpCode::CBZ, bailoutLabel, instr->m_func);
cbzInstr->SetSrc1(negZeroReg);
instr->InsertBefore(cbzInstr);
}
// TBZ exceptReg, #0, done
IR::BranchInstr * tbzInstr = IR::BranchInstr::New(Js::OpCode::TBZ, doneLabel, instr->m_func);
tbzInstr->SetSrc1(exceptReg);
tbzInstr->SetSrc2(IR::IntConstOpnd::New(0, TyMachReg, instr->m_func));
instr->InsertBefore(tbzInstr);
IR::Opnd * dst = instr->UnlinkDst();
instr->InsertAfter(doneLabel);
if(!sharedBailout)
{
instr->InsertBefore(bailoutLabel);
}
// In case of a shared bailout, we should jump to the code that sets some data on the bailout record which is specific
// to this bailout. Pass the bailoutLabel to GenerateFunction so that it may use the label as the collectRuntimeStatsLabel.
this->m_lowerer->GenerateBailOut(instr, nullptr, nullptr, sharedBailout ? bailoutLabel : nullptr);
// MOV dst, intOpnd
IR::Instr* movInstr = IR::Instr::New(Js::OpCode::MOV, dst, intOpnd, this->m_func);
doneLabel->InsertAfter(movInstr);
}
void
LowererMD::GenerateFastInlineBuiltInMathMinMax(IR::Instr* instr)
{
IR::Opnd* dst = instr->GetDst();
if (dst->IsInt32())
{
IR::Opnd* src1 = instr->GetSrc1();
IR::Opnd* src2 = instr->GetSrc2();
// CMP src1, src2
IR::Instr* cmpInstr = IR::Instr::New(Js::OpCode::CMP, instr->m_func);
cmpInstr->SetSrc1(src1);
cmpInstr->SetSrc2(src2);
instr->InsertBefore(cmpInstr);
Legalize(cmpInstr);
// (min) CSELLT dst, src1, src2
// (max) CSELLT dst, src2, src1
IR::Opnd* op1 = (instr->m_opcode == Js::OpCode::InlineMathMin) ? src1 : src2;
IR::Opnd* op2 = (instr->m_opcode == Js::OpCode::InlineMathMin) ? src2 : src1;
IR::Instr * csellinstr = IR::Instr::New(Js::OpCode::CSELLT, dst, op1, op2, instr->m_func);
instr->InsertBefore(csellinstr);
Legalize(csellinstr);
instr->Remove();
}
else if (dst->IsFloat64())
{
// (min) FMIN dst, src1, src2
// (max) FMAX dst, src1, src2
instr->m_opcode = (instr->m_opcode == Js::OpCode::InlineMathMin) ? Js::OpCode::FMIN : Js::OpCode::FMAX;
}
}
IR::Instr *
LowererMD::LowerToFloat(IR::Instr *instr)
{
switch (instr->m_opcode)
{
case Js::OpCode::Add_A:
instr->m_opcode = Js::OpCode::FADD;
break;
case Js::OpCode::Sub_A:
instr->m_opcode = Js::OpCode::FSUB;
break;
case Js::OpCode::Mul_A:
instr->m_opcode = Js::OpCode::FMUL;
break;
case Js::OpCode::Div_A:
instr->m_opcode = Js::OpCode::FDIV;
break;
case Js::OpCode::Neg_A:
instr->m_opcode = Js::OpCode::FNEG;
break;
case Js::OpCode::BrEq_A:
case Js::OpCode::BrNeq_A:
case Js::OpCode::BrSrEq_A:
case Js::OpCode::BrSrNeq_A:
case Js::OpCode::BrGt_A:
case Js::OpCode::BrGe_A:
case Js::OpCode::BrLt_A:
case Js::OpCode::BrLe_A:
case Js::OpCode::BrNotEq_A:
case Js::OpCode::BrNotNeq_A:
case Js::OpCode::BrSrNotEq_A:
case Js::OpCode::BrSrNotNeq_A:
case Js::OpCode::BrNotGt_A:
case Js::OpCode::BrNotGe_A:
case Js::OpCode::BrNotLt_A:
case Js::OpCode::BrNotLe_A:
return this->LowerFloatCondBranch(instr->AsBranchInstr());
default:
Assume(UNREACHED);
}
LegalizeMD::LegalizeInstr(instr, false);
return instr;
}
IR::BranchInstr *
LowererMD::LowerFloatCondBranch(IR::BranchInstr *instrBranch, bool ignoreNaN)
{
IR::Instr *instr;
Js::OpCode brOpcode = Js::OpCode::InvalidOpCode;
bool addNaNCheck = false;
Func * func = instrBranch->m_func;
IR::Opnd *src1 = instrBranch->UnlinkSrc1();
IR::Opnd *src2 = instrBranch->UnlinkSrc2();
IR::Instr *instrCmp = IR::Instr::New(Js::OpCode::FCMP, func);
instrCmp->SetSrc1(src1);
instrCmp->SetSrc2(src2);
instrBranch->InsertBefore(instrCmp);
LegalizeMD::LegalizeInstr(instrCmp, false);
switch (instrBranch->m_opcode)
{
case Js::OpCode::BrSrEq_A:
case Js::OpCode::BrEq_A:
case Js::OpCode::BrNotNeq_A:
case Js::OpCode::BrSrNotNeq_A:
brOpcode = Js::OpCode::BEQ;
break;
case Js::OpCode::BrNeq_A:
case Js::OpCode::BrSrNeq_A:
case Js::OpCode::BrSrNotEq_A:
case Js::OpCode::BrNotEq_A:
brOpcode = Js::OpCode::BNE;
addNaNCheck = !ignoreNaN; //Special check for BNE as it is set when the operands are unordered (NaN).
break;
case Js::OpCode::BrLe_A:
brOpcode = Js::OpCode::BLS; //Can't use BLE as it is set when the operands are unordered (NaN).
break;
case Js::OpCode::BrLt_A:
brOpcode = Js::OpCode::BCC; //Can't use BLT as is set when the operands are unordered (NaN).
break;
case Js::OpCode::BrGe_A:
brOpcode = Js::OpCode::BGE;
break;
case Js::OpCode::BrGt_A:
brOpcode = Js::OpCode::BGT;
break;
case Js::OpCode::BrNotLe_A:
brOpcode = Js::OpCode::BHI;
break;
case Js::OpCode::BrNotLt_A:
brOpcode = Js::OpCode::BPL;
break;
case Js::OpCode::BrNotGe_A:
brOpcode = Js::OpCode::BLT;
break;
case Js::OpCode::BrNotGt_A:
brOpcode = Js::OpCode::BLE;
break;
default:
Assert(false);
break;
}
if (addNaNCheck)
{
instr = IR::BranchInstr::New(Js::OpCode::BVS, instrBranch->GetTarget(), func);
instrBranch->InsertBefore(instr);
}
instr = IR::BranchInstr::New(brOpcode, instrBranch->GetTarget(), func);
instrBranch->InsertBefore(instr);
instrBranch->Remove();
return instr->AsBranchInstr();
}
void
LowererMD::EmitIntToFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert)
{
IR::Instr *instr;
Assert(dst->IsRegOpnd() && dst->IsFloat64());
Assert(src->IsRegOpnd() && src->IsInt32());
// Convert to Float
instr = IR::Instr::New(Js::OpCode::FCVT, dst, src, this->m_func);
instrInsert->InsertBefore(instr);
}
void
LowererMD::EmitUIntToFloat(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert)
{
IR::Instr *instr;
Assert(dst->IsRegOpnd() && dst->IsFloat64());
Assert(src->IsRegOpnd() && src->IsUInt32());
// Convert to Float
instr = IR::Instr::New(Js::OpCode::FCVT, dst, src, this->m_func);
instrInsert->InsertBefore(instr);
}
void LowererMD::ConvertFloatToInt32(IR::Opnd* intOpnd, IR::Opnd* floatOpnd, IR::LabelInstr * labelHelper, IR::LabelInstr * labelDone, IR::Instr * instrInsert)
{
Assert(floatOpnd->IsFloat64());
Assert(intOpnd->IsInt32());
// VCVTS32F64 dst.i32, src.f64
// Convert to int
// ARM64_WORKITEM: On ARM32 this used the current rounding mode; here we are explicitly rounding toward zero -- is that ok?
IR::Instr * instr = IR::Instr::New(Js::OpCode::FCVTZ, intOpnd, floatOpnd, this->m_func);
instrInsert->InsertBefore(instr);
Legalize(instr);
this->CheckOverflowOnFloatToInt32(instrInsert, intOpnd, labelHelper, labelDone);
}
void
LowererMD::EmitIntToLong(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert)
{
Assert(UNREACHED);
}
void
LowererMD::EmitUIntToLong(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert)
{
Assert(UNREACHED);
}
void
LowererMD::EmitLongToInt(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert)
{
Assert(UNREACHED);
}
void
LowererMD::CheckOverflowOnFloatToInt32(IR::Instr* instrInsert, IR::Opnd* intOpnd, IR::LabelInstr * labelHelper, IR::LabelInstr * labelDone)
{
// Test for 0x80000000 or 0x7FFFFFFF
// tmp = EOR src, 0x80000000; gives 0 or -1 for overflow values
// tmp = EOR_ASR31 tmp, tmp; tmp = tmp ^ ((int32)tmp >> 31) -- converts -1 or 0 to 0
// CBZ tmp, helper; branch if tmp was -1 or 0
// B done;
IR::RegOpnd* tmp = IR::RegOpnd::New(TyInt32, this->m_func);
IR::Instr* instr = IR::Instr::New(Js::OpCode::EOR, tmp, intOpnd, IR::IntConstOpnd::New(0x80000000, TyUint32, this->m_func, true), this->m_func);
instrInsert->InsertBefore(instr);
instr = IR::Instr::New(Js::OpCode::EOR_ASR31, tmp, tmp, tmp, this->m_func);
instrInsert->InsertBefore(instr);
// CBZ $helper
instr = IR::BranchInstr::New(Js::OpCode::CBZ, labelHelper, this->m_func);
instr->SetSrc1(tmp);
instrInsert->InsertBefore(instr);
// B $done
instr = IR::BranchInstr::New(Js::OpCode::B, labelDone, this->m_func);
instrInsert->InsertBefore(instr);
}
void
LowererMD::EmitFloatToInt(IR::Opnd *dst, IR::Opnd *src, IR::Instr *instrInsert, IR::Instr * instrBailOut, IR::LabelInstr * labelBailOut)
{
IR::BailOutKind bailOutKind = IR::BailOutInvalid;
if (instrBailOut && instrBailOut->HasBailOutInfo())
{
bailOutKind = instrBailOut->GetBailOutKind();
if (bailOutKind & IR::BailOutOnArrayAccessHelperCall)
{
// Bail out instead of calling helper. If this is happening unconditionally, the caller should instead throw a rejit exception.
Assert(labelBailOut);
m_lowerer->InsertBranch(Js::OpCode::Br, labelBailOut, instrInsert);
return;
}
}
IR::LabelInstr *labelDone = IR::LabelInstr::New(Js::OpCode::Label, this->m_func);
IR::LabelInstr *labelHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
IR::Instr *instr;
ConvertFloatToInt32(dst, src, labelHelper, labelDone, instrInsert);
// $Helper
instrInsert->InsertBefore(labelHelper);
instr = IR::Instr::New(Js::OpCode::Call, dst, this->m_func);
instrInsert->InsertBefore(instr);
if (BailOutInfo::IsBailOutOnImplicitCalls(bailOutKind))
{
_Analysis_assume_(instrBailOut != nullptr);
instr = instr->ConvertToBailOutInstr(instrBailOut->GetBailOutInfo(), bailOutKind);
if (instrBailOut->GetBailOutInfo()->bailOutInstr == instrBailOut)
{
IR::Instr * instrShare = instrBailOut->ShareBailOut();
m_lowerer->LowerBailTarget(instrShare);
}
}
// dst = ToInt32Core(src);
LoadDoubleHelperArgument(instr, src);
this->ChangeToHelperCall(instr, IR::HelperConv_ToInt32Core);
// $Done
instrInsert->InsertBefore(labelDone);
}
IR::Instr *
LowererMD::InsertConvertFloat64ToInt32(const RoundMode roundMode, IR::Opnd *const dst, IR::Opnd *const src, IR::Instr *const insertBeforeInstr)
{
Assert(dst);
Assert(dst->IsInt32());
Assert(src);
Assert(src->IsFloat64());
Assert(insertBeforeInstr);
// The caller is expected to check for overflow. To have that work be done automatically, use LowererMD::EmitFloatToInt.
Func *const func = insertBeforeInstr->m_func;
IR::AutoReuseOpnd autoReuseSrcPlusHalf;
IR::Instr *instr = nullptr;
switch (roundMode)
{
case RoundModeTowardInteger:
case RoundModeHalfToEven:
{
// Conversion with rounding towards nearest integer is not supported by the architecture. Add 0.5 and do a
// round-toward-zero conversion instead.
IR::RegOpnd *const srcPlusHalf = IR::RegOpnd::New(TyFloat64, func);
autoReuseSrcPlusHalf.Initialize(srcPlusHalf, func);
Lowerer::InsertAdd(
false /* needFlags */,
srcPlusHalf,
src,
IR::MemRefOpnd::New(insertBeforeInstr->m_func->GetThreadContextInfo()->GetDoublePointFiveAddr(), TyFloat64, func,
IR::AddrOpndKindDynamicDoubleRef),
insertBeforeInstr);
instr = IR::Instr::New(LowererMD::MDConvertFloat64ToInt32Opcode(RoundModeTowardZero), dst, srcPlusHalf, func);
insertBeforeInstr->InsertBefore(instr);
LowererMD::Legalize(instr);
return instr;
}
default:
AssertMsg(0, "RoundMode not supported.");
return nullptr;
}
}
IR::Instr *
LowererMD::LoadFloatZero(IR::Opnd * opndDst, IR::Instr * instrInsert)
{
Assert(opndDst->GetType() == TyFloat64);
IR::Opnd * zero = IR::MemRefOpnd::New(instrInsert->m_func->GetThreadContextInfo()->GetDoubleZeroAddr(), TyFloat64, instrInsert->m_func, IR::AddrOpndKindDynamicDoubleRef);
// Todo(magardn): Make sure the correct opcode is used for moving between float and non-float regs (FMOV_GEN)
return Lowerer::InsertMove(opndDst, zero, instrInsert);
}
IR::Instr *
LowererMD::LoadFloatValue(IR::Opnd * opndDst, double value, IR::Instr * instrInsert)
{
// Floating point zero is a common value to load. Let's use a single memory location instead of allocating new memory for each.
const bool isFloatZero = value == 0.0 && !Js::JavascriptNumber::IsNegZero(value); // (-0.0 == 0.0) yields true
if (isFloatZero)
{
return LowererMD::LoadFloatZero(opndDst, instrInsert);
}
void * pValue = NativeCodeDataNewNoFixup(instrInsert->m_func->GetNativeCodeDataAllocator(), DoubleType<DataDesc_LowererMD_LoadFloatValue_Double>, value);
IR::Opnd * opnd;
if (instrInsert->m_func->IsOOPJIT())
{
int offset = NativeCodeData::GetDataTotalOffset(pValue);
auto addressRegOpnd = IR::RegOpnd::New(TyMachPtr, instrInsert->m_func);
Lowerer::InsertMove(
addressRegOpnd,
IR::MemRefOpnd::New(instrInsert->m_func->GetWorkItem()->GetWorkItemData()->nativeDataAddr, TyMachPtr, instrInsert->m_func, IR::AddrOpndKindDynamicNativeCodeDataRef),
instrInsert);
opnd = IR::IndirOpnd::New(addressRegOpnd, offset, TyMachDouble,
#if DBG
NativeCodeData::GetDataDescription(pValue, instrInsert->m_func->m_alloc),
#endif
instrInsert->m_func, true);
}
else
{
opnd = IR::MemRefOpnd::New((void*)pValue, TyMachDouble, instrInsert->m_func);
}
IR::Instr * instr = IR::Instr::New(Js::OpCode::FLDR, opndDst, opnd, instrInsert->m_func);
instrInsert->InsertBefore(instr);
LegalizeMD::LegalizeInstr(instr,false);
return instr;
}
void LowererMD::GenerateFloatTest(IR::RegOpnd * opndSrc, IR::Instr * insertInstr, IR::LabelInstr* labelHelper, const bool checkForNullInLoopBody)
{
if (opndSrc->GetValueType().IsFloat())
{
return;
}
// TST s1, floatTagReg
IR::Opnd* floatTag = IR::IntConstOpnd::New(Js::FloatTag_Value, TyMachReg, this->m_func, /* dontEncode = */ true);
IR::Instr* instr = IR::Instr::New(Js::OpCode::TST, this->m_func);
instr->SetSrc1(opndSrc);
instr->SetSrc2(floatTag);
insertInstr->InsertBefore(instr);
LegalizeMD::LegalizeInstr(instr, false);
// BZ $helper
instr = IR::BranchInstr::New(Js::OpCode::BEQ /* BZ */, labelHelper, this->m_func);
insertInstr->InsertBefore(instr);
}
IR::RegOpnd* LowererMD::CheckFloatAndUntag(IR::RegOpnd * opndSrc, IR::Instr * insertInstr, IR::LabelInstr* labelHelper)
{
IR::Opnd* floatTag = IR::IntConstOpnd::New(Js::FloatTag_Value, TyMachReg, this->m_func, /* dontEncode = */ true);
// MOV floatTagReg, FloatTag_Value
if (!opndSrc->GetValueType().IsFloat())
{
// TST s1, floatTagReg
IR::Instr* instr = IR::Instr::New(Js::OpCode::TST, this->m_func);
instr->SetSrc1(opndSrc);
instr->SetSrc2(floatTag);
insertInstr->InsertBefore(instr);
LegalizeMD::LegalizeInstr(instr, false);
// BZ $helper
instr = IR::BranchInstr::New(Js::OpCode::BEQ /* BZ */, labelHelper, this->m_func);
insertInstr->InsertBefore(instr);
}
IR::RegOpnd* untaggedFloat = IR::RegOpnd::New(TyMachReg, this->m_func);
IR::Instr* instr = IR::Instr::New(Js::OpCode::EOR, untaggedFloat, opndSrc, floatTag, this->m_func);
insertInstr->InsertBefore(instr);
IR::RegOpnd *floatReg = IR::RegOpnd::New(TyMachDouble, this->m_func);
instr = IR::Instr::New(Js::OpCode::FMOV_GEN, floatReg, untaggedFloat, this->m_func);
insertInstr->InsertBefore(instr);
return floatReg;
}
template <bool verify>
void
LowererMD::Legalize(IR::Instr *const instr, bool fPostRegAlloc)
{
if (verify)
{
// NYI for the rest of legalization
return;
}
LegalizeMD::LegalizeInstr(instr, fPostRegAlloc);
}
template void LowererMD::Legalize<false>(IR::Instr *const instr, bool fPostRegalloc);
#if DBG
template void LowererMD::Legalize<true>(IR::Instr *const instr, bool fPostRegalloc);
#endif
void
LowererMD::FinalLower()
{
NoRecoverMemoryArenaAllocator tempAlloc(_u("BE-ARMFinalLower"), m_func->m_alloc->GetPageAllocator(), Js::Throw::OutOfMemory);
EncodeReloc *pRelocList = nullptr;
size_t totalJmpTableSizeInBytes = 0;
uintptr_t instrOffset = 0;
FOREACH_INSTR_BACKWARD_EDITING_IN_RANGE(instr, instrPrev, this->m_func->m_tailInstr, this->m_func->m_headInstr)
{
if (instr->IsLowered() == false)
{
if (instr->IsLabelInstr())
{
//This is not the real set, Real offset gets set in encoder.
IR::LabelInstr *labelInstr = instr->AsLabelInstr();
labelInstr->SetOffset(instrOffset);
}
switch (instr->m_opcode)
{
case Js::OpCode::Ret:
instr->Remove();
break;
case Js::OpCode::Leave:
Assert(this->m_func->DoOptimizeTry() && !this->m_func->IsLoopBodyInTry());
instrPrev = m_lowerer->LowerLeave(instr, instr->AsBranchInstr()->GetTarget(), true /*fromFinalLower*/);
break;
}
}
else
{
instrOffset = instrOffset + MachMaxInstrSize;
if (instr->IsBranchInstr())
{
IR::BranchInstr *branchInstr = instr->AsBranchInstr();
if (branchInstr->IsMultiBranch())
{
Assert(instr->GetSrc1() && instr->GetSrc1()->IsRegOpnd());
IR::MultiBranchInstr * multiBranchInstr = instr->AsBranchInstr()->AsMultiBrInstr();
if (multiBranchInstr->m_isSwitchBr &&
(multiBranchInstr->m_kind == IR::MultiBranchInstr::IntJumpTable || multiBranchInstr->m_kind == IR::MultiBranchInstr::SingleCharStrJumpTable))
{
BranchJumpTableWrapper * branchJumpTableWrapper = multiBranchInstr->GetBranchJumpTable();
totalJmpTableSizeInBytes += (branchJumpTableWrapper->tableSize * sizeof(void*));
// instrOffset is relative to the end of the function. Jump tables come after the function and so would result in negative offsets. label offsets
// are unsigned so instead give jump table lables offsets relative to the end of the jump table section.
branchJumpTableWrapper->labelInstr->SetOffset(totalJmpTableSizeInBytes);
}
}
else if (!LowererMD::IsUnconditionalBranch(branchInstr)) //Ignore other direct branches
{
uintptr_t targetOffset = branchInstr->GetTarget()->GetOffset();
if (targetOffset != 0)
{
// this is forward reference
if (LegalizeMD::LegalizeDirectBranch(branchInstr, instrOffset))
{
//There might be an instruction inserted for legalizing conditional branch
instrOffset = instrOffset + MachMaxInstrSize;
}
}
else
{
EncodeReloc::New(&pRelocList, RelocTypeBranch19, (BYTE*)instrOffset, branchInstr, &tempAlloc);
//Assume this is a backward long branch, we shall fix up after complete pass, be conservative here
instrOffset = instrOffset + MachMaxInstrSize;
}
}
}
else if (LowererMD::IsAssign(instr) || instr->m_opcode == Js::OpCode::LEA || instr->m_opcode == Js::OpCode::LDARGOUTSZ || instr->m_opcode == Js::OpCode::REM)
{
// Cleanup spill code
// INSTR_BACKWARD_EDITING_IN_RANGE implies that next loop iteration will use instrPrev (instr->m_prev computed before entering current loop iteration).
IR::Instr* instrNext = instr->m_next;
bool canExpand = this->FinalLowerAssign(instr);
if (canExpand)
{
uint32 expandedInstrCount = 0; // The number of instrs the LDIMM expands into.
FOREACH_INSTR_IN_RANGE(instrCount, instrPrev->m_next, instrNext)
{
++expandedInstrCount;
}
NEXT_INSTR_IN_RANGE;
Assert(expandedInstrCount > 0);
// Adjust the offset for expanded instrs.
instrOffset += (expandedInstrCount - 1) * MachMaxInstrSize; // We already accounted for one MachMaxInstrSize.
}
}
if (instr->m_opcode == Js::OpCode::ADR)
{
IR::LabelInstr* label = instr->GetSrc1()->AsLabelOpnd()->GetLabel();
if (label->GetOffset() != 0 && !label->m_isDataLabel)
{
// this is forward reference
if (LegalizeMD::LegalizeAdrOffset(instr, instrOffset))
{
//Additional instructions were inserted.
instrOffset = instrOffset + MachMaxInstrSize * 2;
}
}
else
{
EncodeReloc::New(&pRelocList, RelocTypeLabelAdr, (BYTE*)instrOffset, instr, &tempAlloc);
//Assume this is a backward long branch, we shall fix up after complete pass, be conservative here
instrOffset = instrOffset + MachMaxInstrSize * 2;
}
}
}
} NEXT_INSTR_BACKWARD_EDITING_IN_RANGE;
//Fixup all the backward branches
for (EncodeReloc *reloc = pRelocList; reloc; reloc = reloc->m_next)
{
uintptr_t relocAddress = (uintptr_t)reloc->m_consumerOffset;
switch (reloc->m_relocType)
{
case RelocTypeBranch19:
AssertMsg(relocAddress < reloc->m_relocInstr->AsBranchInstr()->GetTarget()->GetOffset(), "Only backward branches require fixup");
LegalizeMD::LegalizeDirectBranch(reloc->m_relocInstr->AsBranchInstr(), relocAddress);
break;
case RelocTypeLabelAdr:
{
IR::LabelInstr* label = reloc->m_relocInstr->GetSrc1()->AsLabelOpnd()->GetLabel();
if (label->m_isDataLabel)
{
uintptr_t dataOffset;
if (label == m_func->GetFuncStartLabel())
{
dataOffset = instrOffset - relocAddress;
}
else if (label == m_func->GetFuncEndLabel())
{
dataOffset = relocAddress;
}
else
{
Assert(label->GetOffset() != 0);
// jump table label offsets are relative to the end of the jump table area.
dataOffset = relocAddress + totalJmpTableSizeInBytes - label->GetOffset();
// PC is a union with offset. Encoder expects this to be nullptr for jump table labels.
label->SetPC(nullptr);
}
LegalizeMD::LegalizeDataAdr(reloc->m_relocInstr, dataOffset);
break;
}
AssertMsg(relocAddress < label->GetOffset(), "Only backward branches require fixup");
LegalizeMD::LegalizeAdrOffset(reloc->m_relocInstr, relocAddress);
break;
}
default:
Assert(false);
}
}
}
// Returns true, if and only if the assign may expand into multiple instrs.
bool
LowererMD::FinalLowerAssign(IR::Instr * instr)
{
if (instr->m_opcode == Js::OpCode::LDIMM)
{
LegalizeMD::LegalizeInstr(instr, true);
// LDIMM can expand into up to 4 instructions when the immediate is more than 16 bytes,
// it can also expand into multiple different no-op (normally MOV) instrs when we obfuscate it, which is randomly.
return true;
}
else if (EncoderMD::IsLoad(instr) || instr->m_opcode == Js::OpCode::LEA)
{
Assert(instr->GetDst()->IsRegOpnd());
if (!instr->GetSrc1()->IsRegOpnd())
{
LegalizeMD::LegalizeSrc(instr, instr->GetSrc1(), 1, true);
return true;
}
instr->m_opcode = instr->GetSrc1()->IsFloat() ? Js::OpCode::FMOV : Js::OpCode::MOV;
}
else if (EncoderMD::IsStore(instr))
{
Assert(instr->GetSrc1()->IsRegOpnd());
if (!instr->GetDst()->IsRegOpnd())
{
LegalizeMD::LegalizeDst(instr, true);
return true;
}
instr->m_opcode = instr->GetDst()->IsFloat() ? Js::OpCode::FMOV : Js::OpCode::MOV;
}
else if (instr->m_opcode == Js::OpCode::LDARGOUTSZ)
{
Assert(instr->GetDst()->IsRegOpnd());
Assert((instr->GetSrc1() == nullptr) && (instr->GetSrc2() == nullptr));
// dst = LDARGOUTSZ
// This loads the function's arg out area size into the dst operand. We need a pseudo-op,
// because we generate the instruction during Lower but don't yet know the value of the constant it needs
// to load. Change it to the appropriate LDIMM here.
uint32 argOutSize = UInt32Math::Mul(this->m_func->m_argSlotsForFunctionsCalled, MachRegInt, Js::Throw::OutOfMemory);
instr->SetSrc1(IR::IntConstOpnd::New(argOutSize, TyMachReg, this->m_func));
instr->m_opcode = Js::OpCode::LDIMM;
LegalizeMD::LegalizeInstr(instr, true);
return true;
}
else if (instr->m_opcode == Js::OpCode::REM)
{
IR::Opnd* dst = instr->GetDst();
IR::Opnd* src1 = instr->GetSrc1();
IR::Opnd* src2 = instr->GetSrc2();
Assert(src1->IsRegOpnd());
Assert(src2->IsRegOpnd());
RegNum dstReg = dst->AsRegOpnd()->GetReg();
if (dstReg == src1->AsRegOpnd()->GetReg() || dstReg == src2->AsRegOpnd()->GetReg())
{
Assert(src1->AsRegOpnd()->GetReg() != SCRATCH_REG);
Assert(src2->AsRegOpnd()->GetReg() != SCRATCH_REG);
Assert(src1->GetType() == src2->GetType());
// r17 = SDIV src1, src2
IR::RegOpnd *regScratch = IR::RegOpnd::New(nullptr, SCRATCH_REG, src1->GetType(), instr->m_func);
IR::Instr *insertInstr = IR::Instr::New(Js::OpCode::SDIV, regScratch, src1, src2, instr->m_func);
instr->InsertBefore(insertInstr);
// r17 = MSUB src1, src2, r17 (r17 = src1 - src2 * r17)
insertInstr = IR::Instr::New(Js::OpCode::MSUB, regScratch, src1, src2, instr->m_func);
instr->InsertBefore(insertInstr);
// mov dst, r17
insertInstr = IR::Instr::New(dst->IsFloat() ? Js::OpCode::FMOV : Js::OpCode::MOV, dst, regScratch, instr->m_func);
instr->InsertBefore(insertInstr);
instr->Remove();
}
else
{
// dst = SDIV src1, src2
IR::Instr *divInstr = IR::Instr::New(Js::OpCode::SDIV, dst, src1, src2, instr->m_func);
instr->InsertBefore(divInstr);
// dst = MSUB src1, src2, dst (dst = src1 - src2 * dst)
instr->m_opcode = Js::OpCode::MSUB;
}
return true;
}
return false;
}
IR::Opnd *
LowererMD::GenerateArgOutForStackArgs(IR::Instr* callInstr, IR::Instr* stackArgsInstr)
{
return this->m_lowerer->GenerateArgOutForStackArgs(callInstr, stackArgsInstr);
}
IR::Instr *
LowererMD::LowerDivI4AndBailOnReminder(IR::Instr * instr, IR::LabelInstr * bailOutLabel)
{
// result = SDIV numerator, denominator
// mulResult = MUL result, denominator
// CMP mulResult, numerator
// BNE bailout
// <Caller insert more checks here>
// dst = MOV result <-- insertBeforeInstr
instr->m_opcode = Js::OpCode::SDIV;
// delay assigning to the final dst.
IR::Instr * sinkedInstr = instr->SinkDst(Js::OpCode::MOV);
LegalizeMD::LegalizeInstr(instr, false);
LegalizeMD::LegalizeInstr(sinkedInstr, false);
IR::Opnd * resultOpnd = instr->GetDst();
IR::Opnd * numerator = instr->GetSrc1();
IR::Opnd * denominatorOpnd = instr->GetSrc2();
// Insert all check before the assignment to the actual
IR::Instr * insertBeforeInstr = instr->m_next;
// Jump to bailout if the reminder is not 0 (or the divResult * denominator is not same as the numerator)
IR::RegOpnd * mulResult = IR::RegOpnd::New(TyInt32, m_func);
IR::Instr * mulInstr = IR::Instr::New(Js::OpCode::MUL, mulResult, resultOpnd, denominatorOpnd, m_func);
insertBeforeInstr->InsertBefore(mulInstr);
LegalizeMD::LegalizeInstr(mulInstr, false);
this->m_lowerer->InsertCompareBranch(mulResult, numerator, Js::OpCode::BrNeq_A, bailOutLabel, insertBeforeInstr);
return insertBeforeInstr;
}
void
LowererMD::LowerInlineSpreadArgOutLoop(IR::Instr *callInstr, IR::RegOpnd *indexOpnd, IR::RegOpnd *arrayElementsStartOpnd)
{
this->m_lowerer->LowerInlineSpreadArgOutLoopUsingRegisters(callInstr, indexOpnd, arrayElementsStartOpnd);
}
void
LowererMD::LowerTypeof(IR::Instr* typeOfInstr)
{
Func * func = typeOfInstr->m_func;
IR::Opnd * src1 = typeOfInstr->GetSrc1();
IR::Opnd * dst = typeOfInstr->GetDst();
Assert(src1->IsRegOpnd() && dst->IsRegOpnd());
IR::LabelInstr * helperLabel = IR::LabelInstr::New(Js::OpCode::Label, func, true);
IR::LabelInstr * taggedIntLabel = IR::LabelInstr::New(Js::OpCode::Label, func);
IR::LabelInstr * doneLabel = IR::LabelInstr::New(Js::OpCode::Label, func);
// MOV typeDisplayStringsArray, &javascriptLibrary->typeDisplayStrings
IR::RegOpnd * typeDisplayStringsArrayOpnd = IR::RegOpnd::New(TyMachPtr, func);
m_lowerer->InsertMove(typeDisplayStringsArrayOpnd, IR::AddrOpnd::New((BYTE*)m_func->GetScriptContextInfo()->GetLibraryAddr() + Js::JavascriptLibrary::GetTypeDisplayStringsOffset(), IR::AddrOpndKindConstantAddress, this->m_func), typeOfInstr);
GenerateObjectTest(src1, typeOfInstr, taggedIntLabel);
// MOV typeRegOpnd, [src1 + offset(Type)]
IR::RegOpnd * typeRegOpnd = IR::RegOpnd::New(TyMachReg, func);
m_lowerer->InsertMove(typeRegOpnd,
IR::IndirOpnd::New(src1->AsRegOpnd(), Js::RecyclableObject::GetOffsetOfType(), TyMachReg, func),
typeOfInstr);
IR::LabelInstr * falsyLabel = IR::LabelInstr::New(Js::OpCode::Label, func);
m_lowerer->GenerateFalsyObjectTest(typeOfInstr, typeRegOpnd, falsyLabel);
// <$not falsy>
// MOV typeId, TypeIds_Object
// MOV objTypeId, [typeRegOpnd + offsetof(typeId)]
// CMP objTypeId, TypeIds_Limit /*external object test*/
// BCS $externalObjectLabel
// MOV typeId, objTypeId
// $loadTypeDisplayStringLabel:
// MOV dst, typeDisplayStrings[typeId]
// TEST dst, dst
// BEQ $helper
// B $done
IR::RegOpnd * typeIdOpnd = IR::RegOpnd::New(TyUint32, func);
m_lowerer->InsertMove(typeIdOpnd, IR::IntConstOpnd::New(Js::TypeIds_Object, TyUint32, func), typeOfInstr);
IR::RegOpnd * objTypeIdOpnd = IR::RegOpnd::New(TyUint32, func);
m_lowerer->InsertMove(objTypeIdOpnd, IR::IndirOpnd::New(typeRegOpnd, Js::Type::GetOffsetOfTypeId(), TyInt32, func), typeOfInstr);
IR::LabelInstr * loadTypeDisplayStringLabel = IR::LabelInstr::New(Js::OpCode::Label, func);
m_lowerer->InsertCompareBranch(objTypeIdOpnd, IR::IntConstOpnd::New(Js::TypeIds_Limit, TyUint32, func), Js::OpCode::BrGe_A, true /*unsigned*/, loadTypeDisplayStringLabel, typeOfInstr);
m_lowerer->InsertMove(typeIdOpnd, objTypeIdOpnd, typeOfInstr);
typeOfInstr->InsertBefore(loadTypeDisplayStringLabel);
if (dst->IsEqual(src1))
{
ChangeToAssign(typeOfInstr->HoistSrc1(Js::OpCode::Ld_A));
}
m_lowerer->InsertMove(dst, IR::IndirOpnd::New(typeDisplayStringsArrayOpnd, typeIdOpnd, this->GetDefaultIndirScale(), TyMachPtr, func), typeOfInstr);
m_lowerer->InsertTestBranch(dst, dst, Js::OpCode::BrEq_A, helperLabel, typeOfInstr);
m_lowerer->InsertBranch(Js::OpCode::Br, doneLabel, typeOfInstr);
// $taggedInt:
// MOV dst, typeDisplayStrings[TypeIds_Number]
// B $done
typeOfInstr->InsertBefore(taggedIntLabel);
m_lowerer->InsertMove(dst, IR::IndirOpnd::New(typeDisplayStringsArrayOpnd, Js::TypeIds_Number * sizeof(Js::Var), TyMachPtr, func), typeOfInstr);
m_lowerer->InsertBranch(Js::OpCode::Br, doneLabel, typeOfInstr);
// $falsy:
// MOV dst, "undefined"
// B $done
typeOfInstr->InsertBefore(falsyLabel);
IR::Opnd * undefinedDisplayStringOpnd = IR::IndirOpnd::New(typeDisplayStringsArrayOpnd, Js::TypeIds_Undefined, TyMachPtr, func);
m_lowerer->InsertMove(dst, undefinedDisplayStringOpnd, typeOfInstr);
m_lowerer->InsertBranch(Js::OpCode::Br, doneLabel, typeOfInstr);
// $helper
// CALL OP_TypeOf
// $done
typeOfInstr->InsertBefore(helperLabel);
typeOfInstr->InsertAfter(doneLabel);
m_lowerer->LowerUnaryHelperMem(typeOfInstr, IR::HelperOp_Typeof);
}
#if DBG
//
// Helps in debugging of fast paths.
//
void LowererMD::GenerateDebugBreak( IR::Instr * insertInstr )
{
IR::Instr *int3 = IR::Instr::New(Js::OpCode::DEBUGBREAK, insertInstr->m_func);
insertInstr->InsertBefore(int3);
}
#endif
#ifdef _CONTROL_FLOW_GUARD
void
LowererMD::GenerateCFGCheck(IR::Opnd * entryPointOpnd, IR::Instr * insertBeforeInstr)
{
bool useJITTrampoline = CONFIG_FLAG(UseJITTrampoline);
IR::LabelInstr * callLabelInstr = nullptr;
uintptr_t jitThunkStartAddress = NULL;
if (useJITTrampoline)
{
#if ENABLE_OOP_NATIVE_CODEGEN
if (m_func->IsOOPJIT())
{
OOPJITThunkEmitter * jitThunkEmitter = m_func->GetOOPThreadContext()->GetJITThunkEmitter();
jitThunkStartAddress = jitThunkEmitter->EnsureInitialized();
}
else
#endif
{
InProcJITThunkEmitter * jitThunkEmitter = m_func->GetInProcThreadContext()->GetJITThunkEmitter();
jitThunkStartAddress = jitThunkEmitter->EnsureInitialized();
}
if (jitThunkStartAddress)
{
uintptr_t endAddressOfSegment = jitThunkStartAddress + InProcJITThunkEmitter::TotalThunkSize;
Assert(endAddressOfSegment > jitThunkStartAddress);
// Generate instructions for local Pre-Reserved Segment Range check
IR::AddrOpnd * endAddressOfSegmentConstOpnd = IR::AddrOpnd::New(endAddressOfSegment, IR::AddrOpndKindDynamicMisc, m_func);
IR::RegOpnd *resultOpnd = IR::RegOpnd::New(TyMachReg, this->m_func);
callLabelInstr = IR::LabelInstr::New(Js::OpCode::Label, m_func);
IR::LabelInstr * cfgLabelInstr = IR::LabelInstr::New(Js::OpCode::Label, m_func, true);
// resultOpnd = SUB endAddressOfSegmentConstOpnd, entryPointOpnd
// CMP resultOpnd, TotalThunkSize
// BHS $cfgLabel
// AND entryPointOpnd, ~(ThunkSize-1)
// JMP $callLabel
m_lowerer->InsertSub(false, resultOpnd, endAddressOfSegmentConstOpnd, entryPointOpnd, insertBeforeInstr);
m_lowerer->InsertCompareBranch(resultOpnd, IR::IntConstOpnd::New(InProcJITThunkEmitter::TotalThunkSize, TyMachReg, m_func, true), Js::OpCode::BrGe_A, true, cfgLabelInstr, insertBeforeInstr);
m_lowerer->InsertAnd(entryPointOpnd, entryPointOpnd, IR::IntConstOpnd::New(InProcJITThunkEmitter::ThunkAlignmentMask, TyMachReg, m_func, true), insertBeforeInstr);
m_lowerer->InsertBranch(Js::OpCode::Br, callLabelInstr, insertBeforeInstr);
insertBeforeInstr->InsertBefore(cfgLabelInstr);
}
}
//MOV x15, entryPoint
IR::RegOpnd * entryPointRegOpnd = IR::RegOpnd::New(nullptr, RegR15, TyMachReg, this->m_func);
entryPointRegOpnd->m_isCallArg = true;
IR::Instr *movInstrEntryPointToRegister = Lowerer::InsertMove(entryPointRegOpnd, entryPointOpnd, insertBeforeInstr);
//Generate CheckCFG CALL here
IR::HelperCallOpnd *cfgCallOpnd = IR::HelperCallOpnd::New(IR::HelperGuardCheckCall, this->m_func);
IR::Instr* cfgCallInstr = IR::Instr::New(Js::OpCode::BLR, this->m_func);
this->m_func->SetHasCallsOnSelfAndParents();
//mov x16, __guard_check_icall_fptr
IR::RegOpnd *targetOpnd = IR::RegOpnd::New(nullptr, RegR16, TyMachPtr, this->m_func);
IR::Instr *movInstr = Lowerer::InsertMove(targetOpnd, cfgCallOpnd, insertBeforeInstr);
Legalize(movInstr);
//call x16
cfgCallInstr->SetSrc1(targetOpnd);
//CALL cfg(x15)
insertBeforeInstr->InsertBefore(cfgCallInstr);
if (jitThunkStartAddress)
{
Assert(callLabelInstr);
if (CONFIG_FLAG(ForceJITCFGCheck))
{
// Always generate CFG check to make sure that the address is still valid
movInstrEntryPointToRegister->InsertBefore(callLabelInstr);
}
else
{
insertBeforeInstr->InsertBefore(callLabelInstr);
}
}
}
#endif
|
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's 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.
//
// * The name of the copyright holders may not 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 Intel Corporation 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.
//
//M*/
#ifndef __OPENCV_OBJDETECT_HPP__
#define __OPENCV_OBJDETECT_HPP__
#include "opencv2/core.hpp"
typedef struct CvLatentSvmDetector CvLatentSvmDetector;
typedef struct CvHaarClassifierCascade CvHaarClassifierCascade;
namespace cv
{
///////////////////////////// Object Detection ////////////////////////////
/*
* This is a class wrapping up the structure CvLatentSvmDetector and functions working with it.
* The class goals are:
* 1) provide c++ interface;
* 2) make it possible to load and detect more than one class (model) unlike CvLatentSvmDetector.
*/
class CV_EXPORTS LatentSvmDetector
{
public:
struct CV_EXPORTS ObjectDetection
{
ObjectDetection();
ObjectDetection( const Rect& rect, float score, int classID = -1 );
Rect rect;
float score;
int classID;
};
LatentSvmDetector();
LatentSvmDetector( const std::vector<String>& filenames, const std::vector<String>& classNames = std::vector<String>() );
virtual ~LatentSvmDetector();
virtual void clear();
virtual bool empty() const;
bool load( const std::vector<String>& filenames, const std::vector<String>& classNames = std::vector<String>() );
virtual void detect( const Mat& image,
std::vector<ObjectDetection>& objectDetections,
float overlapThreshold = 0.5f,
int numThreads = -1 );
const std::vector<String>& getClassNames() const;
size_t getClassCount() const;
private:
std::vector<CvLatentSvmDetector*> detectors;
std::vector<String> classNames;
};
// class for grouping object candidates, detected by Cascade Classifier, HOG etc.
// instance of the class is to be passed to cv::partition (see cxoperations.hpp)
class CV_EXPORTS SimilarRects
{
public:
SimilarRects(double _eps) : eps(_eps) {}
inline bool operator()(const Rect& r1, const Rect& r2) const
{
double delta = eps*(std::min(r1.width, r2.width) + std::min(r1.height, r2.height))*0.5;
return std::abs(r1.x - r2.x) <= delta &&
std::abs(r1.y - r2.y) <= delta &&
std::abs(r1.x + r1.width - r2.x - r2.width) <= delta &&
std::abs(r1.y + r1.height - r2.y - r2.height) <= delta;
}
double eps;
};
CV_EXPORTS void groupRectangles(std::vector<Rect>& rectList, int groupThreshold, double eps = 0.2);
CV_EXPORTS_W void groupRectangles(CV_IN_OUT std::vector<Rect>& rectList, CV_OUT std::vector<int>& weights,
int groupThreshold, double eps = 0.2);
CV_EXPORTS void groupRectangles(std::vector<Rect>& rectList, int groupThreshold,
double eps, std::vector<int>* weights, std::vector<double>* levelWeights );
CV_EXPORTS void groupRectangles(std::vector<Rect>& rectList, std::vector<int>& rejectLevels,
std::vector<double>& levelWeights, int groupThreshold, double eps = 0.2);
CV_EXPORTS void groupRectangles_meanshift(std::vector<Rect>& rectList, std::vector<double>& foundWeights,
std::vector<double>& foundScales,
double detectThreshold = 0.0, Size winDetSize = Size(64, 128));
template<> CV_EXPORTS void DefaultDeleter<CvHaarClassifierCascade>::operator ()(CvHaarClassifierCascade* obj) const;
enum { CASCADE_DO_CANNY_PRUNING = 1,
CASCADE_SCALE_IMAGE = 2,
CASCADE_FIND_BIGGEST_OBJECT = 4,
CASCADE_DO_ROUGH_SEARCH = 8
};
class CV_EXPORTS_W BaseCascadeClassifier : public Algorithm
{
public:
virtual ~BaseCascadeClassifier();
virtual bool empty() const = 0;
virtual bool load( const String& filename ) = 0;
virtual void detectMultiScale( InputArray image,
CV_OUT std::vector<Rect>& objects,
double scaleFactor,
int minNeighbors, int flags,
Size minSize, Size maxSize ) = 0;
virtual void detectMultiScale( InputArray image,
CV_OUT std::vector<Rect>& objects,
CV_OUT std::vector<int>& numDetections,
double scaleFactor,
int minNeighbors, int flags,
Size minSize, Size maxSize ) = 0;
virtual void detectMultiScale( InputArray image,
CV_OUT std::vector<Rect>& objects,
CV_OUT std::vector<int>& rejectLevels,
CV_OUT std::vector<double>& levelWeights,
double scaleFactor,
int minNeighbors, int flags,
Size minSize, Size maxSize,
bool outputRejectLevels ) = 0;
virtual bool isOldFormatCascade() const = 0;
virtual Size getOriginalWindowSize() const = 0;
virtual int getFeatureType() const = 0;
virtual void* getOldCascade() = 0;
class CV_EXPORTS MaskGenerator
{
public:
virtual ~MaskGenerator() {}
virtual Mat generateMask(const Mat& src)=0;
virtual void initializeMask(const Mat& /*src*/) { }
};
virtual void setMaskGenerator(const Ptr<MaskGenerator>& maskGenerator) = 0;
virtual Ptr<MaskGenerator> getMaskGenerator() = 0;
};
class CV_EXPORTS_W CascadeClassifier
{
public:
CV_WRAP CascadeClassifier();
CV_WRAP CascadeClassifier(const String& filename);
~CascadeClassifier();
CV_WRAP bool empty() const;
CV_WRAP bool load( const String& filename );
CV_WRAP bool read( const FileNode& node );
CV_WRAP void detectMultiScale( InputArray image,
CV_OUT std::vector<Rect>& objects,
double scaleFactor = 1.1,
int minNeighbors = 3, int flags = 0,
Size minSize = Size(),
Size maxSize = Size() );
CV_WRAP void detectMultiScale( InputArray image,
CV_OUT std::vector<Rect>& objects,
CV_OUT std::vector<int>& numDetections,
double scaleFactor=1.1,
int minNeighbors=3, int flags=0,
Size minSize=Size(),
Size maxSize=Size() );
CV_WRAP void detectMultiScale( InputArray image,
CV_OUT std::vector<Rect>& objects,
CV_OUT std::vector<int>& rejectLevels,
CV_OUT std::vector<double>& levelWeights,
double scaleFactor = 1.1,
int minNeighbors = 3, int flags = 0,
Size minSize = Size(),
Size maxSize = Size(),
bool outputRejectLevels = false );
CV_WRAP bool isOldFormatCascade() const;
CV_WRAP Size getOriginalWindowSize() const;
CV_WRAP int getFeatureType() const;
void* getOldCascade();
CV_WRAP static bool convert(const String& oldcascade, const String& newcascade);
void setMaskGenerator(const Ptr<BaseCascadeClassifier::MaskGenerator>& maskGenerator);
Ptr<BaseCascadeClassifier::MaskGenerator> getMaskGenerator();
Ptr<BaseCascadeClassifier> cc;
};
CV_EXPORTS Ptr<BaseCascadeClassifier::MaskGenerator> createFaceDetectionMaskGenerator();
//////////////// HOG (Histogram-of-Oriented-Gradients) Descriptor and Object Detector //////////////
// struct for detection region of interest (ROI)
struct DetectionROI
{
// scale(size) of the bounding box
double scale;
// set of requrested locations to be evaluated
std::vector<cv::Point> locations;
// vector that will contain confidence values for each location
std::vector<double> confidences;
};
struct CV_EXPORTS_W HOGDescriptor
{
public:
enum { L2Hys = 0
};
enum { DEFAULT_NLEVELS = 64
};
CV_WRAP HOGDescriptor() : winSize(64,128), blockSize(16,16), blockStride(8,8),
cellSize(8,8), nbins(9), derivAperture(1), winSigma(-1),
histogramNormType(HOGDescriptor::L2Hys), L2HysThreshold(0.2), gammaCorrection(true),
nlevels(HOGDescriptor::DEFAULT_NLEVELS)
{}
CV_WRAP HOGDescriptor(Size _winSize, Size _blockSize, Size _blockStride,
Size _cellSize, int _nbins, int _derivAperture=1, double _winSigma=-1,
int _histogramNormType=HOGDescriptor::L2Hys,
double _L2HysThreshold=0.2, bool _gammaCorrection=false,
int _nlevels=HOGDescriptor::DEFAULT_NLEVELS)
: winSize(_winSize), blockSize(_blockSize), blockStride(_blockStride), cellSize(_cellSize),
nbins(_nbins), derivAperture(_derivAperture), winSigma(_winSigma),
histogramNormType(_histogramNormType), L2HysThreshold(_L2HysThreshold),
gammaCorrection(_gammaCorrection), nlevels(_nlevels)
{}
CV_WRAP HOGDescriptor(const String& filename)
{
load(filename);
}
HOGDescriptor(const HOGDescriptor& d)
{
d.copyTo(*this);
}
virtual ~HOGDescriptor() {}
CV_WRAP size_t getDescriptorSize() const;
CV_WRAP bool checkDetectorSize() const;
CV_WRAP double getWinSigma() const;
CV_WRAP virtual void setSVMDetector(InputArray _svmdetector);
virtual bool read(FileNode& fn);
virtual void write(FileStorage& fs, const String& objname) const;
CV_WRAP virtual bool load(const String& filename, const String& objname = String());
CV_WRAP virtual void save(const String& filename, const String& objname = String()) const;
virtual void copyTo(HOGDescriptor& c) const;
CV_WRAP virtual void compute(InputArray img,
CV_OUT std::vector<float>& descriptors,
Size winStride = Size(), Size padding = Size(),
const std::vector<Point>& locations = std::vector<Point>()) const;
//with found weights output
CV_WRAP virtual void detect(const Mat& img, CV_OUT std::vector<Point>& foundLocations,
CV_OUT std::vector<double>& weights,
double hitThreshold = 0, Size winStride = Size(),
Size padding = Size(),
const std::vector<Point>& searchLocations = std::vector<Point>()) const;
//without found weights output
virtual void detect(const Mat& img, CV_OUT std::vector<Point>& foundLocations,
double hitThreshold = 0, Size winStride = Size(),
Size padding = Size(),
const std::vector<Point>& searchLocations=std::vector<Point>()) const;
//with result weights output
CV_WRAP virtual void detectMultiScale(InputArray img, CV_OUT std::vector<Rect>& foundLocations,
CV_OUT std::vector<double>& foundWeights, double hitThreshold = 0,
Size winStride = Size(), Size padding = Size(), double scale = 1.05,
double finalThreshold = 2.0,bool useMeanshiftGrouping = false) const;
//without found weights output
virtual void detectMultiScale(InputArray img, CV_OUT std::vector<Rect>& foundLocations,
double hitThreshold = 0, Size winStride = Size(),
Size padding = Size(), double scale = 1.05,
double finalThreshold = 2.0, bool useMeanshiftGrouping = false) const;
CV_WRAP virtual void computeGradient(const Mat& img, CV_OUT Mat& grad, CV_OUT Mat& angleOfs,
Size paddingTL = Size(), Size paddingBR = Size()) const;
CV_WRAP static std::vector<float> getDefaultPeopleDetector();
CV_WRAP static std::vector<float> getDaimlerPeopleDetector();
CV_PROP Size winSize;
CV_PROP Size blockSize;
CV_PROP Size blockStride;
CV_PROP Size cellSize;
CV_PROP int nbins;
CV_PROP int derivAperture;
CV_PROP double winSigma;
CV_PROP int histogramNormType;
CV_PROP double L2HysThreshold;
CV_PROP bool gammaCorrection;
CV_PROP std::vector<float> svmDetector;
UMat oclSvmDetector;
float free_coef;
CV_PROP int nlevels;
// evaluate specified ROI and return confidence value for each location
virtual void detectROI(const cv::Mat& img, const std::vector<cv::Point> &locations,
CV_OUT std::vector<cv::Point>& foundLocations, CV_OUT std::vector<double>& confidences,
double hitThreshold = 0, cv::Size winStride = Size(),
cv::Size padding = Size()) const;
// evaluate specified ROI and return confidence value for each location in multiple scales
virtual void detectMultiScaleROI(const cv::Mat& img,
CV_OUT std::vector<cv::Rect>& foundLocations,
std::vector<DetectionROI>& locations,
double hitThreshold = 0,
int groupThreshold = 0) const;
// read/parse Dalal's alt model file
void readALTModel(String modelfile);
void groupRectangles(std::vector<cv::Rect>& rectList, std::vector<double>& weights, int groupThreshold, double eps) const;
};
CV_EXPORTS_W void findDataMatrix(InputArray image,
CV_OUT std::vector<String>& codes,
OutputArray corners = noArray(),
OutputArrayOfArrays dmtx = noArray());
CV_EXPORTS_W void drawDataMatrixCodes(InputOutputArray image,
const std::vector<String>& codes,
InputArray corners);
}
#include "opencv2/objdetect/linemod.hpp"
#include "opencv2/objdetect/erfilter.hpp"
#endif
|
#include "Type.h"
namespace loveprint
{
namespace runtime
{
const char * Type::name() const
{
return _name;
}
const Type * Type::parenttype() const
{
return _parenttype;
}
bool Type::isChildOf(const Type * type) const
{
return _parenttype != nullptr && (_parenttype == type || _parenttype->isChildOf(type));
}
bool Type::isParentOf(const Type * type) const
{
for (auto it = _children.begin(); it != _children.end(); it++) {
if (*it == type || (*it)->isParentOf(type)) {
return true;
}
}
return false;
}
Type::Type(const char * name, Type * parenttype)
: _name(name)
, _parenttype(parenttype)
{
if (parenttype) {
parenttype->_children.push_back(this);
}
}
Type::~Type()
{
}
} // runtime
} // loveprint
|
//
// Copyright Sundeep S. Sangha 2015 - 2017.
// 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 RANGE_LAYER_REWRITE_RANGE_HPP
#define RANGE_LAYER_REWRITE_RANGE_HPP
#include "base_decor.hpp"
namespace range_layer {
namespace bits {
/*===========================================================
rewrite_range
===========================================================*/
template <typename Func, typename Range>
class rewrite_range
: public bits::base_decor
< Range
, rewrite_range<Func, Range>
, range_trait::is_linear<Range>
, range_trait::is_reversable<Range>
, range_trait::is_input<Range>
, range_trait::is_output<Range>
, range_trait::has_position<Range>
, range_trait::is_singleton<Range>
, range_trait::is_finite<Range>
, range_trait::is_erasable<Range>
, range_trait::is_all_erasable<Range>
, range_trait::is_shrinkable<Range>
, range_trait::is_expandable<Range>
, range_trait::is_insertable<Range>
, range_trait::is_subscriptable<Range>
, range_trait::is_decorator<Range>
>
{
using base_t = bits::base_decor
< Range
, rewrite_range<Func, Range>
, range_trait::is_linear<Range>
, range_trait::is_reversable<Range>
, range_trait::is_input<Range>
, range_trait::is_output<Range>
, range_trait::has_position<Range>
, range_trait::is_singleton<Range>
, range_trait::is_finite<Range>
, range_trait::is_erasable<Range>
, range_trait::is_all_erasable<Range>
, range_trait::is_shrinkable<Range>
, range_trait::is_expandable<Range>
, range_trait::is_insertable<Range>
, range_trait::is_subscriptable<Range>
, range_trait::is_decorator<Range>
>;
Func func;
public:
using write_type = typename range_trait::write_type_t<Range>;
/*===========================================================
ctor
===========================================================*/
rewrite_range (
Range _range
, Func _func
)
: base_t {_range}
, func {_func}
{}
/*===========================================================
copy ctor
===========================================================*/
rewrite_range (
rewrite_range const &
) = default;
/*===========================================================
move ctor
===========================================================*/
rewrite_range (rewrite_range &&) = default;
/*===========================================================
move assignment operator
===========================================================*/
rewrite_range &
operator = (rewrite_range &&) = default;
/*===========================================================
copy assignment operator
===========================================================*/
rewrite_range &
operator = (rewrite_range const &) = default;
/*===========================================================
dtor
===========================================================*/
~rewrite_range () = default;
/*===========================================================
write
===========================================================*/
template <typename T>
void
write (
T const & _var
){
auto rng = this->func(_var);
while (range_layer::has_readable(rng)){
range_layer::write(this->rng, range_layer::read(rng));
}
}
}; //-------------------------------------------rewrite_range
} //-----------------------------------------------------bits
/*===========================================================
rewrite
===========================================================*/
template <typename Func>
struct rewrite {
Func func;
template <typename Range>
bits::rewrite_range<Func, Range>
range (
Range _range
){
return bits::rewrite_range<Func, Range>{_range, this->func};
}
}; //-------------------------------------------------rewrite
template <typename Func>
rewrite<Func>
make_rewrite (
Func _func
){
return rewrite<Func>{_func};
}
} //----------------------------------------------range layer
#endif
|
#include "hzpch.h"
#include "Hazel/Renderer/RenderCommand.h"
namespace Hazel {
Scope<RendererAPI> RenderCommand::s_RendererAPI = RendererAPI::Create();
}
|
// DESCRIPTION
//
// Test to check whether the C++ compiler accepts the old for scoping rules (the scope of a
// variable declared inside the parentheses extends outside the for-body).
// Note that some compilers (notably g++ and egcs) support both new and old rules since they
// accept the old rules and only generate a warning.
// In sync with AC_CXX_OLD_FOR_SCOPING (2008-04-12).
//
// COPYLEFT
//
// Copyright (c) 2009 Theo Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
// Copyright (c) 2008 Todd Veldhuizen
// Copyright (c) 2008 Luc Maisonobe <luc@spaceroots.org>
//
// Copying and distribution of this file, with or without modification, are
// permitted in any medium without royalty provided the copyright notice
// and this notice are preserved.
int main() {
int z;
for (int i=0; i < 10; ++i)
z=z+i;
z=i;
return z;
}
|
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#include "mitkTestingMacros.h"
#include "mitkTestFixture.h"
#include "mitkTimeFramesRegistrationHelper.h"
class mitkTimeFramesRegistrationHelperTestSuite : public mitk::TestFixture
{
CPPUNIT_TEST_SUITE(mitkTimeFramesRegistrationHelperTestSuite);
// Test the append method
MITK_TEST(SetAllowUndefPixels_GetAllowUndefPixels);
MITK_TEST(SetPaddingValue_GetPaddingValue);
MITK_TEST(SetErrorValue_GetErrorValue);
MITK_TEST(SetAllowUnregPixels_GetAllowUnregPixels);
MITK_TEST(SetInterpolatorType_GetInterpolatorType);
MITK_TEST(Set_Get_Clear_IgnoreList);
CPPUNIT_TEST_SUITE_END();
private:
mitk::TimeFramesRegistrationHelper::Pointer frameRegHelper;
mitk::TimeFramesRegistrationHelper::IgnoreListType ignoreList;
public:
void setUp() override
{
frameRegHelper = mitk::TimeFramesRegistrationHelper::New();
ignoreList.clear();
ignoreList.push_back(2);
ignoreList.push_back(13);
}
void tearDown() override
{
}
void SetAllowUndefPixels_GetAllowUndefPixels()
{
CPPUNIT_ASSERT_EQUAL_MESSAGE("Check getter on default value", true,
frameRegHelper->GetAllowUndefPixels());
frameRegHelper->SetAllowUndefPixels(false);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Check getter on changed value", false,
frameRegHelper->GetAllowUndefPixels());
}
void SetPaddingValue_GetPaddingValue()
{
CPPUNIT_ASSERT_EQUAL_MESSAGE("Check getter on default value", 0.0,
frameRegHelper->GetPaddingValue());
frameRegHelper->SetPaddingValue(11);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Check getter on changed value", 11.0,
frameRegHelper->GetPaddingValue());
}
void SetAllowUnregPixels_GetAllowUnregPixels()
{
CPPUNIT_ASSERT_EQUAL_MESSAGE("Check getter on default value", true,
frameRegHelper->GetAllowUnregPixels());
frameRegHelper->SetAllowUnregPixels(false);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Check getter on changed value", false,
frameRegHelper->GetAllowUnregPixels());
}
void SetErrorValue_GetErrorValue()
{
CPPUNIT_ASSERT_EQUAL_MESSAGE("Check getter on default value", 0.0, frameRegHelper->GetErrorValue());
frameRegHelper->SetErrorValue(15);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Check getter on changed value", 15.0,
frameRegHelper->GetErrorValue());
}
void SetInterpolatorType_GetInterpolatorType()
{
CPPUNIT_ASSERT_EQUAL_MESSAGE("Check getter on default value", mitk::ImageMappingInterpolator::Linear,
frameRegHelper->GetInterpolatorType());
frameRegHelper->SetInterpolatorType(mitk::ImageMappingInterpolator::NearestNeighbor);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Check getter on changed value",
mitk::ImageMappingInterpolator::NearestNeighbor, frameRegHelper->GetInterpolatorType());
}
void Set_Get_Clear_IgnoreList()
{
CPPUNIT_ASSERT(frameRegHelper->GetIgnoreList().empty());
itk::ModifiedTimeType mtime = frameRegHelper->GetMTime();
frameRegHelper->SetIgnoreList(ignoreList);
CPPUNIT_ASSERT(mtime < frameRegHelper->GetMTime());
CPPUNIT_ASSERT(ignoreList == frameRegHelper->GetIgnoreList());
mtime = frameRegHelper->GetMTime();
frameRegHelper->ClearIgnoreList();
CPPUNIT_ASSERT(mtime < frameRegHelper->GetMTime());
CPPUNIT_ASSERT(frameRegHelper->GetIgnoreList().empty());
}
};
MITK_TEST_SUITE_REGISTRATION(mitkTimeFramesRegistrationHelper)
|
// Copyright 2017, Additive Regularization of Topic Models.
// Author: Murat Apishev (great-mel@yandex.ru)
#include "artm/core/protobuf_helpers.h"
#include "artm/core/phi_matrix.h"
#include "artm/core/phi_matrix_operations.h"
#include "artm/core/token.h"
#include "artm/regularizer/net_plsa_phi.h"
namespace artm {
namespace regularizer {
bool NetPlsaPhi::RegularizePhi(const ::artm::core::PhiMatrix& p_wt,
const ::artm::core::PhiMatrix& n_wt,
::artm::core::PhiMatrix* result) {
if (!::artm::core::PhiMatrixOperations::HasEqualShape(p_wt, n_wt)) {
LOG(ERROR) << "NetPlsaPhi does not support changes in p_wt and n_wt matrix. Cancel it's launch.";
return false;
}
// read the parameters from config and control their correctness
const int topic_size = p_wt.topic_size();
std::vector<bool> topics_to_regularize;
if (config_.topic_name().size() == 0) {
topics_to_regularize.assign(topic_size, true);
} else {
topics_to_regularize = core::is_member(p_wt.topic_name(), config_.topic_name());
}
if (!config_.has_class_id()) {
LOG(ERROR) << "There's no name of vertex modality in class_id field for" <<
"NetPLSA regularizer. Cancel it's launch.";
return false;
}
const auto& class_id = config_.class_id();
bool has_weights = config_.vertex_weight_size();
if (has_weights && vertex_name_.size() != config_.vertex_weight_size()) {
LOG(ERROR) << "Non-empty vertex_weight array should have the same length " <<
"with vertex_name array in NetPLSA regularizer config (" <<
vertex_name_.size() << " != " << config_.vertex_weight_size() << ")";
}
auto normalizers = artm::core::PhiMatrixOperations::FindNormalizers(n_wt);
auto norm_iter = normalizers.find(class_id);
if (norm_iter == normalizers.end()) {
LOG(ERROR) << "NetPlsaPhiConfig.class_id " << class_id
<< " does not exists in n_wt matrix. Cancel regularization.";
}
const auto& n_t = norm_iter->second;
for (int vertex_id = 0; vertex_id < vertex_name_.size(); ++vertex_id) {
auto edge_iter = edge_weights_.find(vertex_id);
if (edge_iter == edge_weights_.end()) {
continue;
}
const int token_id = p_wt.token_index(::artm::core::Token(class_id, vertex_name_[vertex_id]));
if (token_id < 0) {
continue;
}
float D_u = has_weights ? config_.vertex_weight(vertex_id) : 1.0;
for (int topic_id = 0; topic_id < topic_size; ++topic_id) {
if (!topics_to_regularize[topic_id]) {
continue;
}
float value = 0.0;
float p_ut = p_wt.get(token_id, topic_id);
for (const auto& pair_id : edge_iter->second) {
if (pair_id.first >= vertex_name_.size() || pair_id.first < 0) {
LOG(WARNING) << "Edge links to vertex " << pair_id.first <<
", that does not exist in list of vertices, it will be skipped";
continue;
}
const int index = p_wt.token_index(::artm::core::Token(class_id, vertex_name_[pair_id.first]));
if (index < 0) {
continue;
}
float p_vt = p_wt.get(index, topic_id);
float D_v = has_weights ? config_.vertex_weight(pair_id.first) : 1.0;
value += pair_id.second * (p_vt / D_v - p_ut / D_u) * (1 / D_u);
}
value *= n_t[topic_id] * n_t[topic_id];
result->set(token_id, topic_id, value);
}
}
return true;
}
google::protobuf::RepeatedPtrField<std::string> NetPlsaPhi::topics_to_regularize() {
return config_.topic_name();
}
google::protobuf::RepeatedPtrField<std::string> NetPlsaPhi::class_ids_to_regularize() {
google::protobuf::RepeatedPtrField<std::string> retval;
std::string* ptr = retval.Add();
*ptr = config_.class_id();
return retval;
}
void NetPlsaPhi::UpdateNetInfo(const NetPlsaPhiConfig& config) {
config_.clear_first_vertex_index();
config_.clear_second_vertex_index();
config_.clear_edge_weight();
config_.clear_vertex_name();
vertex_name_.clear();
int num_vertices = config.vertex_name_size();
for (int i = 0; i < num_vertices; ++i) {
vertex_name_.push_back(config.vertex_name(i));
}
edge_weights_.clear();
int num_edges = config.first_vertex_index_size();
if (num_edges) {
if (num_edges != config.second_vertex_index_size() || num_edges != config.edge_weight_size()) {
std::stringstream ss;
ss << "Both vertex indices and value arrays should have the same length " << num_edges << ", now: "
<< config.second_vertex_index_size() << " and " << config.edge_weight_size();
BOOST_THROW_EXCEPTION(::artm::core::CorruptedMessageException(ss.str()));
}
for (int i = 0; i < num_edges; ++i) {
edge_weights_[config.first_vertex_index(i)][config.second_vertex_index(i)] = config.edge_weight(i);
if (!config.symmetric_edge_weights()) {
continue;
}
edge_weights_[config.second_vertex_index(i)][config.first_vertex_index(i)] = config.edge_weight(i);
}
}
}
bool NetPlsaPhi::Reconfigure(const RegularizerConfig& config) {
std::string config_blob = config.config();
NetPlsaPhiConfig regularizer_config;
if (!regularizer_config.ParseFromString(config_blob)) {
BOOST_THROW_EXCEPTION(::artm::core::CorruptedMessageException(
"Unable to parse SmoothSparsePhiConfig from RegularizerConfig.config"));
}
config_.CopyFrom(regularizer_config);
UpdateNetInfo(regularizer_config);
return true;
}
} // namespace regularizer
} // namespace artm
|
//
// Copyright (c) 2008-2014 the Urho3D project.
//
// 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 <Urho3D/Urho3D.h>
#include "../../../Urho3D/Graphics/AnimationController.h"
#include "../../../Urho3D/Core/Context.h"
#include "../../../Urho3D/IO/MemoryBuffer.h"
#include "../../../Urho3D/Physics/PhysicsEvents.h"
#include "../../../Urho3D/Physics/PhysicsWorld.h"
#include "../../../Urho3D/Physics/RigidBody.h"
#include "../../../Urho3D/Scene/Scene.h"
#include "../../../Urho3D/Scene/SceneEvents.h"
#include "../../../Urho3D/Scene/LogicComponent.h"
#include "../../../Urho3D/Core/Timer.h"
#include "GameObject.h"
/// Define Types
#define OBJECTTYPE_Default 0
#define OBJECTTYPE_StaticMesh 1
#define OBJECTTYPE_AnimatedMesh 2
#define OBJECTTYPE_Terrain 3
#define OBJECTTYPE_Character 10
#define OBJECTTYPE_Camera 100
#define OBJECTTYPE_Light 101
using namespace std;
/// Base code
GameObject::GameObject(Context* context) :
LogicComponent(context),
GameObjectLifetime(-1.0f)
{
/// Only the physics update event is needed: unsubscribe from the rest for optimization
SetUpdateEventMask(USE_FIXEDUPDATE);
}
/// Registering a object
void GameObject::RegisterObject(Context* context)
{
context->RegisterFactory<GameObject>("Existence");
/// These macros register the class attributes to the Context for automatic load / save handling.
// We specify the Default attribute mode which means it will be used both for saving into file, and network replication
ATTRIBUTE("Game Lifetime", float, GameObjectLifetime, -1.0f, AM_DEFAULT);
return;
}
/// Creation of a game object
void GameObject::Start()
{
/// Set
GameObjectLifetime = -1.0f;
return;
}
/// Fix update
void GameObject::FixedUpdate(float timeStep)
{
/// Disappear when duration expired
if (GameObjectLifetime >= 0)
{
GameObjectLifetime -= timeStep;
if (GameObjectLifetime <= 0)
{
node_->Remove();
}
}
return;
}
/// Set Lifetime
void GameObject::SetLifetime(float lifetime)
{
GameObjectLifetime = lifetime;
return;
}
/// Set Lifetime
float GameObject::GetLifetime(void)
{
return GameObjectLifetime;
}
|
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <alloy/backend/ivm/ivm_assembler.h>
#include <alloy/backend/backend.h>
#include <alloy/backend/ivm/ivm_intcode.h>
#include <alloy/backend/ivm/ivm_function.h>
#include <alloy/backend/ivm/tracing.h>
#include <alloy/hir/hir_builder.h>
#include <alloy/hir/label.h>
#include <alloy/runtime/runtime.h>
using namespace alloy;
using namespace alloy::backend;
using namespace alloy::backend::ivm;
using namespace alloy::hir;
using namespace alloy::runtime;
IVMAssembler::IVMAssembler(Backend* backend) :
source_map_arena_(128 * 1024),
Assembler(backend) {
}
IVMAssembler::~IVMAssembler() {
alloy::tracing::WriteEvent(EventType::AssemblerDeinit({
}));
}
int IVMAssembler::Initialize() {
int result = Assembler::Initialize();
if (result) {
return result;
}
alloy::tracing::WriteEvent(EventType::AssemblerInit({
}));
return result;
}
void IVMAssembler::Reset() {
intcode_arena_.Reset();
source_map_arena_.Reset();
scratch_arena_.Reset();
Assembler::Reset();
}
int IVMAssembler::Assemble(
FunctionInfo* symbol_info, HIRBuilder* builder,
uint32_t debug_info_flags, runtime::DebugInfo* debug_info,
Function** out_function) {
IVMFunction* fn = new IVMFunction(symbol_info);
fn->set_debug_info(debug_info);
TranslationContext ctx;
ctx.access_callbacks = backend_->runtime()->access_callbacks();
ctx.register_count = 0;
ctx.intcode_count = 0;
ctx.intcode_arena = &intcode_arena_;
ctx.source_map_count = 0;
ctx.source_map_arena = &source_map_arena_;
ctx.scratch_arena = &scratch_arena_;
ctx.label_ref_head = NULL;
// Reset label tags as we use them.
builder->ResetLabelTags();
// Function prologue.
size_t stack_offset = 0;
auto locals = builder->locals();
for (auto it = locals.begin(); it != locals.end(); ++it) {
auto slot = *it;
size_t type_size = GetTypeSize(slot->type);
// Align to natural size.
stack_offset = XEALIGN(stack_offset, type_size);
slot->set_constant(stack_offset);
stack_offset += type_size;
}
// Ensure 16b alignment.
stack_offset = XEALIGN(stack_offset, 16);
ctx.stack_size = stack_offset;
auto block = builder->first_block();
while (block) {
Label* label = block->label_head;
while (label) {
label->tag = (void*)(0x80000000 | ctx.intcode_count);
label = label->next;
}
Instr* i = block->instr_head;
while (i) {
int result = TranslateIntCodes(ctx, i);
i = i->next;
}
block = block->next;
}
// Function epilogue.
// Fixup label references.
LabelRef* label_ref = ctx.label_ref_head;
while (label_ref) {
label_ref->instr->src1_reg = (uint32_t)label_ref->label->tag & ~0x80000000;
label_ref = label_ref->next;
}
fn->Setup(ctx);
*out_function = fn;
return 0;
}
|
/*
* Copyright 2019, Intel Corporation
*
* 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 the copyright holder 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.
*/
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "structmember.h"
#include <string>
#include <libpmemkv.h>
#include <libpmemkv_json_config.h>
#include <iostream>
#include <unordered_map>
#ifdef __cplusplus
extern "C" {
#endif
static PyObject *PmemkvException;
typedef struct {
PyObject *exception;
const char *object_name;
const char *exception_name;
} Exception;
static std::unordered_map<int, Exception> ExceptionDispatcher = {
{PMEMKV_STATUS_UNKNOWN_ERROR,
Exception{NULL, "UnknownError", "pmemkv_NI.UnknownError"}},
{PMEMKV_STATUS_NOT_FOUND, Exception{PyExc_KeyError, NULL, NULL}},
{PMEMKV_STATUS_NOT_SUPPORTED,
Exception{NULL, "NotSupported", "pmemkv_NI.NotSupported"}},
{PMEMKV_STATUS_INVALID_ARGUMENT,
Exception{NULL, "InvalidArgument", "pmemkv_NI.InvalidArgument"}},
{PMEMKV_STATUS_CONFIG_PARSING_ERROR,
Exception{NULL, "ConfigParsingError", "pmemkv_NI.ConfigParsingError"}},
{PMEMKV_STATUS_CONFIG_TYPE_ERROR,
Exception{NULL, "ConfigTypeError", "pmemkv_NI.ConfigTypeError"}},
{PMEMKV_STATUS_STOPPED_BY_CB,
Exception{NULL, "StoppedByCallback", "pmemkv_NI.StoppedByCallback"}},
{PMEMKV_STATUS_OUT_OF_MEMORY, Exception{PyExc_MemoryError, NULL, NULL}},
{PMEMKV_STATUS_WRONG_ENGINE_NAME,
Exception{NULL, "WrongEngineName", "pmemkv_NI.WrongEngineName"}},
{PMEMKV_STATUS_TRANSACTION_SCOPE_ERROR,
Exception{NULL, "TransactionScopeError", "pmemkv_NI.TransactionScopeError"}}};
typedef struct {
PyObject_HEAD
const char *value;
Py_ssize_t length;
} PmemkvValueBufferObject;
static PyMemberDef PmemvValueBuffer_members[] = {
{"value", T_INT, offsetof(PmemkvValueBufferObject, value), 0, "Pointer to data"},
{"length", T_INT, offsetof(PmemkvValueBufferObject, length), 0,
"Length of underlying data"},
{NULL}};
static int PmemkvValueBufferObject_getbuffer(PyObject *obj, Py_buffer *view, int flags)
{
if (view == NULL) {
PyErr_SetString(PyExc_ValueError, "NULL view in getbuffer");
return -1;
}
PmemkvValueBufferObject *self = (PmemkvValueBufferObject *)obj;
view->obj = obj;
view->buf = (void *)self->value;
view->len = self->length;
view->readonly = 1;
view->itemsize = 1;
view->format = 0; // unsigned bytes
view->ndim = 0;
view->shape = NULL;
view->strides = NULL;
view->suboffsets = NULL;
view->internal = NULL;
Py_INCREF(self);
return 0;
}
static PyBufferProcs PmemkvValueBuffer_as_buffer = {
// this definition is only compatible with Python 3.3 and above
(getbufferproc)PmemkvValueBufferObject_getbuffer,
(releasebufferproc)0, // we do not require any special release function
};
static PyObject *PmemkvValueBuffer_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
PmemkvValueBufferObject *self =
(PmemkvValueBufferObject *)type->tp_alloc(type, 0);
return (PyObject *)self;
}
static int PmemkvValueBuffer_init(PmemkvValueBufferObject *self)
{
if (self != NULL) {
self->value = NULL;
self->length = 0;
}
return 0;
}
static void PmemkvValueBuffer_dealloc(PmemkvValueBufferObject *self)
{
PyObject_Del(self);
}
static PyTypeObject PmemkvValueBufferType = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
.tp_name = "pmemkv.pmemkv_NI",
.tp_basicsize = sizeof(PmemkvValueBufferObject),
.tp_itemsize = 0,
.tp_dealloc = (destructor)PmemkvValueBuffer_dealloc,
.tp_print = 0,
.tp_getattr = 0,
.tp_setattr = 0,
.tp_as_async = 0,
.tp_repr = 0,
.tp_as_number = 0,
.tp_as_sequence = 0,
.tp_as_mapping = 0,
.tp_hash = 0,
.tp_call = 0,
.tp_str = 0,
.tp_getattro = 0,
.tp_setattro = 0,
.tp_as_buffer = &PmemkvValueBuffer_as_buffer,
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.tp_doc = "Pmemkv value type", /* tp_doc */
.tp_traverse = 0,
.tp_clear = 0,
.tp_richcompare = 0,
.tp_weaklistoffset = 0,
.tp_iter = 0,
.tp_iternext = 0,
.tp_methods = 0,
.tp_members = PmemvValueBuffer_members,
.tp_getset = 0,
.tp_base = 0,
.tp_dict = NULL,
.tp_descr_get = 0,
.tp_descr_set = 0,
.tp_dictoffset = 0,
.tp_init = (initproc)PmemkvValueBuffer_init,
.tp_alloc = 0,
.tp_new = PmemkvValueBuffer_new,
.tp_free = 0,
.tp_is_gc = 0, /* For PyObject_IS_GC */
.tp_bases = 0,
.tp_mro = 0,
.tp_cache = 0,
.tp_subclasses = 0,
.tp_weaklist = 0,
.tp_del = 0,
.tp_version_tag = 0,
.tp_finalize = 0,
};
typedef struct {
PyObject_HEAD
pmemkv_db *db;
} PmemkvObject;
static PyMemberDef
pmemkv_NI_members[] = {
{"db", T_INT, offsetof(PmemkvObject, db), 0, "Engine instance"},
{NULL}
};
static PyObject *
Pmemkv_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
PmemkvObject *self = (PmemkvObject *) type->tp_alloc(type, 0);
return (PyObject *) self;
}
static int Pmemkv_init(PmemkvObject *self)
{
if (self != NULL) {
self->db = NULL;
}
return 0;
}
// Turn on/off operations.
static PyObject *
pmemkv_NI_Start(PmemkvObject *self, PyObject* args) {
Py_buffer engine, json_config;
if (!PyArg_ParseTuple(args, "s*s*", &engine, &json_config)) {
return NULL;
}
pmemkv_config *config = pmemkv_config_new();
if (config == nullptr) {
// "Allocating a new pmemkv config failed"
PyErr_SetString(PmemkvException, pmemkv_errormsg());
return NULL;
}
int rv = pmemkv_config_from_json(config, (const char*) json_config.buf);
if (rv != PMEMKV_STATUS_OK) {
pmemkv_config_delete(config);
// "Creating a pmemkv config from JSON string failed"
PyErr_SetString(ExceptionDispatcher[rv].exception,
pmemkv_config_from_json_errormsg());
return NULL;
}
rv = pmemkv_open((const char*) engine.buf, config, &self->db);
if (rv != PMEMKV_STATUS_OK) {
// "pmemkv_open failed"
PyErr_SetString(ExceptionDispatcher[rv].exception, pmemkv_errormsg());
return NULL;
}
Py_RETURN_NONE;
}
static PyObject *
pmemkv_NI_Stop(PmemkvObject *self) {
if( self->db != NULL)
pmemkv_close(self->db);
self->db = NULL;
Py_RETURN_NONE;
}
static void
Pmemkv_dealloc(PmemkvObject *self) {
pmemkv_NI_Stop(self);
Py_TYPE(self)->tp_free((PyObject *) self);
}
void value_callback(const char *value, size_t valuebyte, void *context)
{
PmemkvValueBufferObject *entry =
PyObject_New(PmemkvValueBufferObject, &PmemkvValueBufferType);
if (entry) {
entry->value = value;
entry->length = valuebyte;
PyObject *args = PyTuple_New(1);
if (args != NULL) {
if (PyTuple_SetItem(args, 0, (PyObject *)entry) == 0) {
PyObject *res =
PyObject_CallObject((PyObject *)context, args);
Py_XDECREF(res);
}
}
Py_XDECREF(args);
} else {
PyErr_SetString(PyExc_MemoryError,
"Cannot create memory buffer");
}
}
int key_callback(const char *key, size_t keybytes, const char *value, size_t valuebyte,
void *context)
{
value_callback(key, keybytes, context);
if (PyErr_Occurred() != NULL)
return -1;
return 0;
}
int key_value_callback(const char *key, size_t keybytes, const char *value,
size_t valuebyte, void *context)
{
PmemkvValueBufferObject *value_buffer =
PyObject_New(PmemkvValueBufferObject, &PmemkvValueBufferType);
PmemkvValueBufferObject *key_buffer =
PyObject_New(PmemkvValueBufferObject, &PmemkvValueBufferType);
Py_INCREF(value_buffer);
Py_INCREF(key_buffer);
int retval = 0;
if (value_buffer) {
value_buffer->value = value;
value_buffer->length = valuebyte;
}
if (key_buffer) {
key_buffer->value = key;
key_buffer->length = keybytes;
}
PyObject *args = PyTuple_New(2);
if (PyTuple_SetItem(args, 0, (PyObject *)key_buffer) != 0) {
retval = -1;
} else if (PyTuple_SetItem(args, 1, (PyObject *)value_buffer) != 0) {
retval = -1;
}
PyObject *res = PyObject_CallObject((PyObject *)context, args);
Py_DECREF(value_buffer);
Py_DECREF(key_buffer);
Py_DECREF(args);
Py_XDECREF(res);
if (PyErr_Occurred() != NULL)
retval = -1;
return retval;
}
// "All" Methods.
static PyObject *
pmemkv_NI_GetKeys(PmemkvObject *self, PyObject* args) {
PyObject* python_callback;
if (!PyArg_ParseTuple(args, "O:set_callback", &python_callback)) {
return NULL;
}
int result = pmemkv_get_all(self->db, key_callback, python_callback);
if (PyErr_Occurred() != NULL)
return NULL;
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return PyLong_FromLong(result);
}
static PyObject *
pmemkv_NI_GetKeysAbove(PmemkvObject *self, PyObject* args) {
Py_buffer key;
PyObject* python_callback;
if (!PyArg_ParseTuple(args, "s*O:set_callback", &key, &python_callback)) {
return NULL;
}
int result = pmemkv_get_above(self->db, (const char *)key.buf, key.len,
key_callback, python_callback);
if (PyErr_Occurred() != NULL)
return NULL;
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return PyLong_FromLong(result);
}
static PyObject *
pmemkv_NI_GetKeysBelow(PmemkvObject *self, PyObject* args) {
Py_buffer key;
PyObject* python_callback;
if (!PyArg_ParseTuple(args, "s*O:set_callback", &key, &python_callback)) {
return NULL;
}
int result = pmemkv_get_below(self->db, (const char *)key.buf, key.len,
key_callback, python_callback);
if (PyErr_Occurred() != NULL)
return NULL;
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return PyLong_FromLong(result);
}
static PyObject *
pmemkv_NI_GetKeysBetween(PmemkvObject *self, PyObject* args) {
Py_buffer key1, key2;
PyObject* python_callback;
if (!PyArg_ParseTuple(args, "s*s*O:set_callback", &key1, &key2, &python_callback)) {
return NULL;
}
int result = pmemkv_get_between(self->db, (const char *)key1.buf, key1.len,
(const char *)key2.buf, key2.len, key_callback,
python_callback);
if (PyErr_Occurred() != NULL)
return NULL;
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return PyLong_FromLong(result);
}
// "Count" Methods.
static PyObject *
pmemkv_NI_CountAll(PmemkvObject *self) {
size_t cnt;
int result = pmemkv_count_all(self->db, &cnt);
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return Py_BuildValue("i", cnt);
}
static PyObject *
pmemkv_NI_CountAbove(PmemkvObject *self, PyObject* args) {
Py_buffer key;
if (!PyArg_ParseTuple(args, "s*", &key)) {
return NULL;
}
size_t cnt;
int result = pmemkv_count_above(self->db, (const char*) key.buf, key.len, &cnt);
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return Py_BuildValue("i", cnt);
}
static PyObject *
pmemkv_NI_CountBelow(PmemkvObject *self, PyObject* args) {
Py_buffer key;
if (!PyArg_ParseTuple(args, "s*", &key)) {
return NULL;
}
size_t cnt;
int result = pmemkv_count_below(self->db, (const char*) key.buf, key.len, &cnt);
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return Py_BuildValue("i", cnt);
}
static PyObject *
pmemkv_NI_CountBetween(PmemkvObject *self, PyObject* args) {
Py_buffer key1, key2;
if (!PyArg_ParseTuple(args, "s*s*", &key1, &key2)) {
return NULL;
}
size_t cnt;
int result = pmemkv_count_between(self->db, (const char*) key1.buf, key1.len, (const char*) key2.buf, key2.len, &cnt);
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return Py_BuildValue("i", cnt);
}
// "Each" Methods.
static PyObject *
pmemkv_NI_GetAll(PmemkvObject *self, PyObject* args) {
PyObject* python_callback;
if (!PyArg_ParseTuple(args, "O:set_callback", &python_callback)) {
return NULL;
}
int result = pmemkv_get_all(self->db, key_value_callback, python_callback);
if (PyErr_Occurred() != NULL)
return NULL;
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return PyLong_FromLong(result);
}
static PyObject *
pmemkv_NI_GetAbove(PmemkvObject *self, PyObject* args) {
Py_buffer key;
PyObject* python_callback;
if (!PyArg_ParseTuple(args, "s*O:set_callback", &key, &python_callback)) {
return NULL;
}
int result = pmemkv_get_above(self->db, (const char *)key.buf, key.len,
key_value_callback, python_callback);
if (PyErr_Occurred() != NULL)
return NULL;
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return PyLong_FromLong(result);
}
static PyObject *
pmemkv_NI_GetBelow(PmemkvObject *self, PyObject* args) {
Py_buffer key;
PyObject* python_callback;
if (!PyArg_ParseTuple(args, "s*O:set_callback", &key, &python_callback)) {
return NULL;
}
int result = pmemkv_get_below(self->db, (const char *)key.buf, key.len,
key_value_callback, python_callback);
if (PyErr_Occurred() != NULL)
return NULL;
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return PyLong_FromLong(result);
}
static PyObject *
pmemkv_NI_GetBetween(PmemkvObject *self, PyObject* args) {
Py_buffer key1, key2;
PyObject* python_callback;
if (!PyArg_ParseTuple(args, "s*s*O:set_callback", &key1, &key2, &python_callback)) {
return NULL;
}
int result = pmemkv_get_between(self->db, (const char *)key1.buf, key1.len,
(const char *)key2.buf, key2.len,
key_value_callback, python_callback);
if (PyErr_Occurred() != NULL)
return NULL;
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return PyLong_FromLong(result);
}
// "Exists" Method.
static PyObject *
pmemkv_NI_Exists(PmemkvObject *self, PyObject* args) {
Py_buffer key;
if (!PyArg_ParseTuple(args, "s*", &key)) {
return NULL;
}
int result = pmemkv_exists(self->db, (const char*) key.buf, key.len);
if (result != PMEMKV_STATUS_OK && result != PMEMKV_STATUS_NOT_FOUND) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return PyBool_FromLong(result == PMEMKV_STATUS_OK);
}
// "CRUD" Operations.
static PyObject *
pmemkv_NI_Put(PmemkvObject *self, PyObject* args) {
Py_buffer key, value;
if (!PyArg_ParseTuple(args, "s*s*", &key, &value)) {
return NULL;
}
int result = pmemkv_put(self->db, (const char*) key.buf, key.len, (const char*) value.buf, value.len);
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return PyLong_FromLong(result);
}
static PyObject *pmemkv_NI_GetString(PmemkvObject *self, PyObject *args)
{
Py_buffer key;
if (!PyArg_ParseTuple(args, "s*", &key)) {
return NULL;
}
struct GetCallbackContext {
int status;
std::string value;
};
GetCallbackContext cxt = {PMEMKV_STATUS_NOT_FOUND, ""};
auto callback = [](const char* v, size_t vb, void* context) {
const auto c = ((GetCallbackContext*) context);
c->status = PMEMKV_STATUS_OK;
c->value.append(v, vb);
};
int result = pmemkv_get(self->db, (const char*) key.buf, key.len, callback, &cxt);
if (PyErr_Occurred() != NULL)
return NULL;
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
} else if (cxt.status == PMEMKV_STATUS_OK) {
return Py_BuildValue("s#", cxt.value.data(), cxt.value.size());
}
Py_RETURN_NONE;
}
static PyObject *pmemkv_NI_Get(PmemkvObject *self, PyObject *args)
{
Py_buffer key;
PyObject *python_callback;
if (!PyArg_ParseTuple(args, "s*O:set_callback", &key, &python_callback)) {
return NULL;
}
int result = pmemkv_get(self->db, (const char *)key.buf, key.len, value_callback,
python_callback);
if (PyErr_Occurred() != NULL)
return NULL;
if (result != PMEMKV_STATUS_OK) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return PyLong_FromLong(result);
}
static PyObject *
pmemkv_NI_Remove(PmemkvObject *self, PyObject* args) {
Py_buffer key;
if (!PyArg_ParseTuple(args, "s*", &key)) {
return NULL;
}
int result = pmemkv_remove(self->db, (const char*) key.buf, key.len);
if (result != PMEMKV_STATUS_OK && result != PMEMKV_STATUS_NOT_FOUND) {
PyErr_SetString(ExceptionDispatcher[result].exception, pmemkv_errormsg());
return NULL;
}
return PyBool_FromLong(result == PMEMKV_STATUS_OK);
}
// Functions declarations.
static PyMethodDef pmemkv_NI_methods[] = {
{"start", (PyCFunction)pmemkv_NI_Start, METH_VARARGS, NULL},
{"stop", (PyCFunction)pmemkv_NI_Stop, METH_NOARGS, NULL},
{"put", (PyCFunction)pmemkv_NI_Put, METH_VARARGS, NULL},
{"get_string", (PyCFunction)pmemkv_NI_GetString, METH_VARARGS, NULL},
{"get", (PyCFunction)pmemkv_NI_Get, METH_VARARGS, NULL},
{"get_keys", (PyCFunction)pmemkv_NI_GetKeys, METH_VARARGS, NULL},
{"get_keys_above", (PyCFunction)pmemkv_NI_GetKeysAbove, METH_VARARGS, NULL},
{"get_keys_below", (PyCFunction)pmemkv_NI_GetKeysBelow, METH_VARARGS, NULL},
{"get_keys_between", (PyCFunction)pmemkv_NI_GetKeysBetween, METH_VARARGS, NULL},
{"count_all", (PyCFunction)pmemkv_NI_CountAll, METH_NOARGS, NULL},
{"count_above", (PyCFunction)pmemkv_NI_CountAbove, METH_VARARGS, NULL},
{"count_below", (PyCFunction)pmemkv_NI_CountBelow, METH_VARARGS, NULL},
{"count_between", (PyCFunction)pmemkv_NI_CountBetween, METH_VARARGS, NULL},
{"get_all", (PyCFunction)pmemkv_NI_GetAll, METH_VARARGS, NULL},
{"get_above", (PyCFunction)pmemkv_NI_GetAbove, METH_VARARGS, NULL},
{"get_below", (PyCFunction)pmemkv_NI_GetBelow, METH_VARARGS, NULL},
{"get_between", (PyCFunction)pmemkv_NI_GetBetween, METH_VARARGS, NULL},
{"exists", (PyCFunction)pmemkv_NI_Exists, METH_VARARGS, NULL},
{"remove", (PyCFunction)pmemkv_NI_Remove, METH_VARARGS, NULL},
{NULL, NULL, 0, NULL}};
static PyTypeObject PmemkvType = {
PyVarObject_HEAD_INIT(NULL, 0)
.tp_name = "pmemkv.pmemkv_NI",
.tp_basicsize = sizeof(PmemkvObject),
.tp_itemsize = 0,
.tp_dealloc = (destructor)Pmemkv_dealloc,
.tp_print = 0,
.tp_getattr = 0,
.tp_setattr = 0,
.tp_as_async = 0,
.tp_repr = 0,
.tp_as_number = 0,
.tp_as_sequence = 0,
.tp_as_mapping = 0,
.tp_hash = 0,
.tp_call = 0,
.tp_str = 0,
.tp_getattro = 0,
.tp_setattro = 0,
.tp_as_buffer = 0,
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.tp_doc = "Pmemkv binding", /* tp_doc */
.tp_traverse = 0,
.tp_clear = 0,
.tp_richcompare = 0,
.tp_weaklistoffset = 0,
.tp_iter = 0,
.tp_iternext = 0,
.tp_methods = pmemkv_NI_methods,
.tp_members = pmemkv_NI_members,
.tp_getset = 0,
.tp_base = 0,
.tp_dict = NULL,
.tp_descr_get = 0,
.tp_descr_set = 0,
.tp_dictoffset = 0,
.tp_init = (initproc)Pmemkv_init,
.tp_alloc = 0,
.tp_new = Pmemkv_new,
.tp_free = 0,
.tp_is_gc = 0, /* For PyObject_IS_GC */
.tp_bases = 0,
.tp_mro = 0,
.tp_cache = 0,
.tp_subclasses = 0,
.tp_weaklist = 0,
.tp_del = 0,
.tp_version_tag = 0,
.tp_finalize = 0,
};
// Module defination.
static struct PyModuleDef pmemkv_NI_module = {
PyModuleDef_HEAD_INIT,
"_pmemkv", /* name of module */
NULL, /* module documentation, may be NULL */
-1, /* size of per-interpreter state of the module, or -1 if the module keeps state in global variables. */
};
// Creating dynamic module.
PyMODINIT_FUNC
PyInit__pmemkv(void) {
PyObject *m;
if (PyType_Ready(&PmemkvType) < 0)
return NULL;
m = PyModule_Create(&pmemkv_NI_module);
if (m == NULL)
return NULL;
try {
Py_INCREF(&PmemkvType);
if (PyModule_AddObject(m, "pmemkv_NI", (PyObject *)&PmemkvType) < 0) {
throw;
}
PmemkvException =
PyErr_NewException("pmemkv_NI.PmemkvException", NULL, NULL);
if (PyModule_AddObject(m, "Error", PmemkvException) < 0) {
throw;
}
for (auto &e : ExceptionDispatcher) {
if (e.second.exception == NULL) {
e.second.exception = PyErr_NewException(
e.second.exception_name, PmemkvException, NULL);
if (PyModule_AddObject(m, e.second.object_name,
e.second.exception) < 0) {
throw;
}
}
}
} catch (...) {
Py_XDECREF(&PmemkvType);
Py_XDECREF(m);
Py_XDECREF(PmemkvException);
Py_XDECREF(m);
for (auto &e : ExceptionDispatcher) {
Py_XDECREF(e.second.exception);
Py_XDECREF(m);
}
return NULL;
}
return m;
}
#ifdef __cplusplus
}
#endif
|
#include <iostream>
#include <fstream>
#include <vector>
#include <boost/foreach.hpp>
#include <boost/preprocessor/stringize.hpp>
#include <boost/test/unit_test.hpp>
#include "json/json_spirit_reader_template.h"
#include "json/json_spirit_writer_template.h"
#include "json/json_spirit_utils.h"
#include "main.h"
#include "wallet.h"
using namespace std;
using namespace json_spirit;
extern uint256 SignatureHash(CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
extern Array read_json(const std::string& filename);
extern CScript ParseScript(string s);
static const unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
BOOST_AUTO_TEST_SUITE(script_tests)
BOOST_AUTO_TEST_CASE(script_valid)
{
// Read tests from test/data/script_valid.json
// Format is an array of arrays
// Inner arrays are [ "scriptSig", "scriptPubKey" ]
// ... where scriptSig and scriptPubKey are stringified
// scripts.
Array tests = read_json("script_valid.json");
BOOST_FOREACH(Value& tv, tests)
{
Array test = tv.get_array();
string strTest = write_string(tv, false);
if (test.size() < 2) // Allow size > 2; extra stuff ignored (useful for comments)
{
BOOST_ERROR("Bad test: " << strTest);
continue;
}
string scriptSigString = test[0].get_str();
CScript scriptSig = ParseScript(scriptSigString);
string scriptPubKeyString = test[1].get_str();
CScript scriptPubKey = ParseScript(scriptPubKeyString);
CTransaction tx;
BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, tx, 0, flags, SIGHASH_NONE), strTest);
}
}
BOOST_AUTO_TEST_CASE(script_invalid)
{
// Scripts that should evaluate as invalid
Array tests = read_json("script_invalid.json");
BOOST_FOREACH(Value& tv, tests)
{
Array test = tv.get_array();
string strTest = write_string(tv, false);
if (test.size() < 2) // Allow size > 2; extra stuff ignored (useful for comments)
{
BOOST_ERROR("Bad test: " << strTest);
continue;
}
string scriptSigString = test[0].get_str();
CScript scriptSig = ParseScript(scriptSigString);
string scriptPubKeyString = test[1].get_str();
CScript scriptPubKey = ParseScript(scriptPubKeyString);
CTransaction tx;
BOOST_CHECK_MESSAGE(!VerifyScript(scriptSig, scriptPubKey, tx, 0, flags, SIGHASH_NONE), strTest);
}
}
BOOST_AUTO_TEST_CASE(script_PushData)
{
// Check that PUSHDATA1, PUSHDATA2, and PUSHDATA4 create the same value on
// the stack as the 1-75 opcodes do.
static const unsigned char direct[] = { 1, 0x5a };
static const unsigned char pushdata1[] = { OP_PUSHDATA1, 1, 0x5a };
static const unsigned char pushdata2[] = { OP_PUSHDATA2, 1, 0, 0x5a };
static const unsigned char pushdata4[] = { OP_PUSHDATA4, 1, 0, 0, 0, 0x5a };
vector<vector<unsigned char> > directStack;
BOOST_CHECK(EvalScript(directStack, CScript(&direct[0], &direct[sizeof(direct)]), CTransaction(), 0, true, 0));
vector<vector<unsigned char> > pushdata1Stack;
BOOST_CHECK(EvalScript(pushdata1Stack, CScript(&pushdata1[0], &pushdata1[sizeof(pushdata1)]), CTransaction(), 0, true, 0));
BOOST_CHECK(pushdata1Stack == directStack);
vector<vector<unsigned char> > pushdata2Stack;
BOOST_CHECK(EvalScript(pushdata2Stack, CScript(&pushdata2[0], &pushdata2[sizeof(pushdata2)]), CTransaction(), 0, true, 0));
BOOST_CHECK(pushdata2Stack == directStack);
vector<vector<unsigned char> > pushdata4Stack;
BOOST_CHECK(EvalScript(pushdata4Stack, CScript(&pushdata4[0], &pushdata4[sizeof(pushdata4)]), CTransaction(), 0, true, 0));
BOOST_CHECK(pushdata4Stack == directStack);
}
CScript
sign_multisig(CScript scriptPubKey, std::vector<CKey> keys, CTransaction transaction)
{
uint256 hash = SignatureHash(scriptPubKey, transaction, 0, SIGHASH_ALL);
CScript result;
//
// NOTE: CHECKMULTISIG has an unfortunate bug; it requires
// one extra item on the stack, before the signatures.
// Putting OP_0 on the stack is the workaround;
// fixing the bug would mean splitting the block chain (old
// clients would not accept new CHECKMULTISIG transactions,
// and vice-versa)
//
result << OP_0;
BOOST_FOREACH(const CKey &key, keys)
{
vector<unsigned char> vchSig;
BOOST_CHECK(key.Sign(hash, vchSig));
vchSig.push_back((unsigned char)SIGHASH_ALL);
result << vchSig;
}
return result;
}
CScript
sign_multisig(CScript scriptPubKey, const CKey &key, CTransaction transaction)
{
std::vector<CKey> keys;
keys.push_back(key);
return sign_multisig(scriptPubKey, keys, transaction);
}
BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
{
CKey key1, key2, key3;
key1.MakeNewKey(true);
key2.MakeNewKey(false);
key3.MakeNewKey(true);
CScript scriptPubKey12;
scriptPubKey12 << OP_1 << key1.GetPubKey() << key2.GetPubKey() << OP_2 << OP_CHECKMULTISIG;
CTransaction txFrom12;
txFrom12.vout.resize(1);
txFrom12.vout[0].scriptPubKey = scriptPubKey12;
CTransaction txTo12;
txTo12.vin.resize(1);
txTo12.vout.resize(1);
txTo12.vin[0].prevout.n = 0;
txTo12.vin[0].prevout.hash = txFrom12.GetHash();
txTo12.vout[0].nValue = 1;
CScript goodsig1 = sign_multisig(scriptPubKey12, key1, txTo12);
BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey12, txTo12, 0, flags, 0));
txTo12.vout[0].nValue = 2;
BOOST_CHECK(!VerifyScript(goodsig1, scriptPubKey12, txTo12, 0, flags, 0));
CScript goodsig2 = sign_multisig(scriptPubKey12, key2, txTo12);
BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey12, txTo12, 0, flags, 0));
CScript badsig1 = sign_multisig(scriptPubKey12, key3, txTo12);
BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey12, txTo12, 0, flags, 0));
}
BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
{
CKey key1, key2, key3, key4;
key1.MakeNewKey(true);
key2.MakeNewKey(false);
key3.MakeNewKey(true);
key4.MakeNewKey(false);
CScript scriptPubKey23;
scriptPubKey23 << OP_2 << key1.GetPubKey() << key2.GetPubKey() << key3.GetPubKey() << OP_3 << OP_CHECKMULTISIG;
CTransaction txFrom23;
txFrom23.vout.resize(1);
txFrom23.vout[0].scriptPubKey = scriptPubKey23;
CTransaction txTo23;
txTo23.vin.resize(1);
txTo23.vout.resize(1);
txTo23.vin[0].prevout.n = 0;
txTo23.vin[0].prevout.hash = txFrom23.GetHash();
txTo23.vout[0].nValue = 1;
std::vector<CKey> keys;
keys.push_back(key1); keys.push_back(key2);
CScript goodsig1 = sign_multisig(scriptPubKey23, keys, txTo23);
BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey23, txTo23, 0, flags, 0));
keys.clear();
keys.push_back(key1); keys.push_back(key3);
CScript goodsig2 = sign_multisig(scriptPubKey23, keys, txTo23);
BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey23, txTo23, 0, flags, 0));
keys.clear();
keys.push_back(key2); keys.push_back(key3);
CScript goodsig3 = sign_multisig(scriptPubKey23, keys, txTo23);
BOOST_CHECK(VerifyScript(goodsig3, scriptPubKey23, txTo23, 0, flags, 0));
keys.clear();
keys.push_back(key2); keys.push_back(key2); // Can't re-use sig
CScript badsig1 = sign_multisig(scriptPubKey23, keys, txTo23);
BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, txTo23, 0, flags, 0));
keys.clear();
keys.push_back(key2); keys.push_back(key1); // sigs must be in correct order
CScript badsig2 = sign_multisig(scriptPubKey23, keys, txTo23);
BOOST_CHECK(!VerifyScript(badsig2, scriptPubKey23, txTo23, 0, flags, 0));
keys.clear();
keys.push_back(key3); keys.push_back(key2); // sigs must be in correct order
CScript badsig3 = sign_multisig(scriptPubKey23, keys, txTo23);
BOOST_CHECK(!VerifyScript(badsig3, scriptPubKey23, txTo23, 0, flags, 0));
keys.clear();
keys.push_back(key4); keys.push_back(key2); // sigs must match pubkeys
CScript badsig4 = sign_multisig(scriptPubKey23, keys, txTo23);
BOOST_CHECK(!VerifyScript(badsig4, scriptPubKey23, txTo23, 0, flags, 0));
keys.clear();
keys.push_back(key1); keys.push_back(key4); // sigs must match pubkeys
CScript badsig5 = sign_multisig(scriptPubKey23, keys, txTo23);
BOOST_CHECK(!VerifyScript(badsig5, scriptPubKey23, txTo23, 0, flags, 0));
keys.clear(); // Must have signatures
CScript badsig6 = sign_multisig(scriptPubKey23, keys, txTo23);
BOOST_CHECK(!VerifyScript(badsig6, scriptPubKey23, txTo23, 0, flags, 0));
}
BOOST_AUTO_TEST_CASE(script_combineSigs)
{
// Test the CombineSignatures function
CBasicKeyStore keystore;
vector<CKey> keys;
vector<CPubKey> pubkeys;
for (int i = 0; i < 3; i++)
{
CKey key;
key.MakeNewKey(i%2 == 1);
keys.push_back(key);
pubkeys.push_back(key.GetPubKey());
keystore.AddKey(key);
}
CTransaction txFrom;
txFrom.vout.resize(1);
txFrom.vout[0].scriptPubKey.SetDestination(keys[0].GetPubKey().GetID());
CScript& scriptPubKey = txFrom.vout[0].scriptPubKey;
CTransaction txTo;
txTo.vin.resize(1);
txTo.vout.resize(1);
txTo.vin[0].prevout.n = 0;
txTo.vin[0].prevout.hash = txFrom.GetHash();
CScript& scriptSig = txTo.vin[0].scriptSig;
txTo.vout[0].nValue = 1;
CScript empty;
CScript combined = CombineSignatures(scriptPubKey, txTo, 0, empty, empty);
BOOST_CHECK(combined.empty());
// Single signature case:
SignSignature(keystore, txFrom, txTo, 0); // changes scriptSig
combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSig, empty);
BOOST_CHECK(combined == scriptSig);
combined = CombineSignatures(scriptPubKey, txTo, 0, empty, scriptSig);
BOOST_CHECK(combined == scriptSig);
CScript scriptSigCopy = scriptSig;
// Signing again will give a different, valid signature:
SignSignature(keystore, txFrom, txTo, 0);
combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSigCopy, scriptSig);
BOOST_CHECK(combined == scriptSigCopy || combined == scriptSig);
// P2SH, single-signature case:
CScript pkSingle; pkSingle << keys[0].GetPubKey() << OP_CHECKSIG;
keystore.AddCScript(pkSingle);
scriptPubKey.SetDestination(pkSingle.GetID());
SignSignature(keystore, txFrom, txTo, 0);
combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSig, empty);
BOOST_CHECK(combined == scriptSig);
combined = CombineSignatures(scriptPubKey, txTo, 0, empty, scriptSig);
BOOST_CHECK(combined == scriptSig);
scriptSigCopy = scriptSig;
SignSignature(keystore, txFrom, txTo, 0);
combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSigCopy, scriptSig);
BOOST_CHECK(combined == scriptSigCopy || combined == scriptSig);
// dummy scriptSigCopy with placeholder, should always choose non-placeholder:
scriptSigCopy = CScript() << OP_0 << static_cast<vector<unsigned char> >(pkSingle);
combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSigCopy, scriptSig);
BOOST_CHECK(combined == scriptSig);
combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSig, scriptSigCopy);
BOOST_CHECK(combined == scriptSig);
// Hardest case: Multisig 2-of-3
scriptPubKey.SetMultisig(2, pubkeys);
keystore.AddCScript(scriptPubKey);
SignSignature(keystore, txFrom, txTo, 0);
combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSig, empty);
BOOST_CHECK(combined == scriptSig);
combined = CombineSignatures(scriptPubKey, txTo, 0, empty, scriptSig);
BOOST_CHECK(combined == scriptSig);
// A couple of partially-signed versions:
vector<unsigned char> sig1;
uint256 hash1 = SignatureHash(scriptPubKey, txTo, 0, SIGHASH_ALL);
BOOST_CHECK(keys[0].Sign(hash1, sig1));
sig1.push_back(SIGHASH_ALL);
vector<unsigned char> sig2;
uint256 hash2 = SignatureHash(scriptPubKey, txTo, 0, SIGHASH_NONE);
BOOST_CHECK(keys[1].Sign(hash2, sig2));
sig2.push_back(SIGHASH_NONE);
vector<unsigned char> sig3;
uint256 hash3 = SignatureHash(scriptPubKey, txTo, 0, SIGHASH_SINGLE);
BOOST_CHECK(keys[2].Sign(hash3, sig3));
sig3.push_back(SIGHASH_SINGLE);
// Not fussy about order (or even existence) of placeholders or signatures:
CScript partial1a = CScript() << OP_0 << sig1 << OP_0;
CScript partial1b = CScript() << OP_0 << OP_0 << sig1;
CScript partial2a = CScript() << OP_0 << sig2;
CScript partial2b = CScript() << sig2 << OP_0;
CScript partial3a = CScript() << sig3;
CScript partial3b = CScript() << OP_0 << OP_0 << sig3;
CScript partial3c = CScript() << OP_0 << sig3 << OP_0;
CScript complete12 = CScript() << OP_0 << sig1 << sig2;
CScript complete13 = CScript() << OP_0 << sig1 << sig3;
CScript complete23 = CScript() << OP_0 << sig2 << sig3;
combined = CombineSignatures(scriptPubKey, txTo, 0, partial1a, partial1b);
BOOST_CHECK(combined == partial1a);
combined = CombineSignatures(scriptPubKey, txTo, 0, partial1a, partial2a);
BOOST_CHECK(combined == complete12);
combined = CombineSignatures(scriptPubKey, txTo, 0, partial2a, partial1a);
BOOST_CHECK(combined == complete12);
combined = CombineSignatures(scriptPubKey, txTo, 0, partial1b, partial2b);
BOOST_CHECK(combined == complete12);
combined = CombineSignatures(scriptPubKey, txTo, 0, partial3b, partial1b);
BOOST_CHECK(combined == complete13);
combined = CombineSignatures(scriptPubKey, txTo, 0, partial2a, partial3a);
BOOST_CHECK(combined == complete23);
combined = CombineSignatures(scriptPubKey, txTo, 0, partial3b, partial2b);
BOOST_CHECK(combined == complete23);
combined = CombineSignatures(scriptPubKey, txTo, 0, partial3b, partial3a);
BOOST_CHECK(combined == partial3c);
}
BOOST_AUTO_TEST_SUITE_END()
|
#include "Triangle.hpp"
Triangle::Triangle(glm::vec3 position, GLfloat size)
: m_position(position), m_scale(size)
{
/****************************************************
* Define the vertex data and set up the VBO and VAO
*****************************************************/
GLfloat vertices[] = {
0.0f, 0.5f, 0.0f, 1.0f, 0.0f, 0.0f, // Top Middle
-0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 0.0f, // Bottom Left
0.5f, -0.5f, 0.0f, 0.0f, 0.0f, 1.0f // Bottom Right
};
// Generate the VBO / VAO
glGenBuffers(1, &m_VBO);
glGenVertexArrays(1, &m_VAO);
// Bind the vertex array object
glBindVertexArray(m_VAO);
// Bind the vertex buffer object
glBindBuffer(GL_ARRAY_BUFFER, m_VBO);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
// Position attribute
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (GLvoid *)0);
glEnableVertexAttribArray(0);
// Color attribute
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (GLvoid *)(3 * sizeof(GLfloat)));
glEnableVertexAttribArray(1);
// Unbind the vertex array object
glBindVertexArray(0);
/************************************************
* Define the vertex and fragment shader sources
************************************************/
const char * vertexShaderSource =
"#version 330 core\n"
"layout (location = 0) in vec3 aPos;\n"
"void main()\n"
"{\n"
" gl_Position = vec4(aPos, 1.0f);\n"
"}\0";
const char * fragmentShaderSource =
"#version 330 core\n"
"out vec4 FragColor;\n"
"void main()\n"
"{\n"
" FragColor = vec4(1.0f, 0.0f, 0.0f, 1.0f);\n"
"}\0";
m_shader.load(vertexShaderSource, fragmentShaderSource);
}
Triangle::~Triangle()
{
// Deallocate all resources
glDeleteVertexArrays(1, &m_VAO);
glDeleteBuffers(1, &m_VBO);
}
void Triangle::draw()
{
// Use the shader program
m_shader.use();
// Bind the vertex array object
glBindVertexArray(m_VAO);
glDrawArrays(GL_TRIANGLES, 0, 3);
// Unbind the vertex array object
glBindVertexArray(0);
}
|
/*
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
*
* 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.
*/
#pragma once
#include <cudf/types.hpp>
#include <functional>
#include <memory>
#include <vector>
/**
* @file aggregation.hpp
* @brief Representation for specifying desired aggregations from
* aggregation-based APIs, e.g., groupby, reductions, rolling, etc.
*
* @note Not all aggregation APIs support all aggregation operations. See
* individual function documentation to see what aggregations are supported.
*/
namespace cudf {
/**
* @addtogroup aggregation_factories
* @{
* @file
*/
// forward declaration
namespace detail {
class simple_aggregations_collector;
class aggregation_finalizer;
} // namespace detail
/**
* @brief Abstract base class for specifying the desired aggregation in an
* `aggregation_request`.
*
* All aggregations must derive from this class to implement the pure virtual
* functions and potentially encapsulate additional information needed to
* compute the aggregation.
*/
class aggregation {
public:
/**
* @brief Possible aggregation operations
*/
enum Kind {
SUM, ///< sum reduction
PRODUCT, ///< product reduction
MIN, ///< min reduction
MAX, ///< max reduction
COUNT_VALID, ///< count number of valid elements
COUNT_ALL, ///< count number of elements
ANY, ///< any reduction
ALL, ///< all reduction
SUM_OF_SQUARES, ///< sum of squares reduction
MEAN, ///< arithmetic mean reduction
M2, ///< sum of squares of differences from the mean
VARIANCE, ///< variance
STD, ///< standard deviation
MEDIAN, ///< median reduction
QUANTILE, ///< compute specified quantile(s)
ARGMAX, ///< Index of max element
ARGMIN, ///< Index of min element
NUNIQUE, ///< count number of unique elements
NTH_ELEMENT, ///< get the nth element
ROW_NUMBER, ///< get row-number of current index (relative to rolling window)
RANK, ///< get rank of current index
DENSE_RANK, ///< get dense rank of current index
COLLECT_LIST, ///< collect values into a list
COLLECT_SET, ///< collect values into a list without duplicate entries
LEAD, ///< window function, accesses row at specified offset following current row
LAG, ///< window function, accesses row at specified offset preceding current row
PTX, ///< PTX UDF based reduction
CUDA, ///< CUDA UDF based reduction
MERGE_LISTS, ///< merge multiple lists values into one list
MERGE_SETS, ///< merge multiple lists values into one list then drop duplicate entries
MERGE_M2 ///< merge partial values of M2 aggregation
};
aggregation() = delete;
aggregation(aggregation::Kind a) : kind{a} {}
Kind kind; ///< The aggregation to perform
virtual ~aggregation() = default;
virtual bool is_equal(aggregation const& other) const { return kind == other.kind; }
virtual size_t do_hash() const { return std::hash<int>{}(kind); }
virtual std::unique_ptr<aggregation> clone() const = 0;
// override functions for compound aggregations
virtual std::vector<std::unique_ptr<aggregation>> get_simple_aggregations(
data_type col_type, cudf::detail::simple_aggregations_collector& collector) const = 0;
virtual void finalize(cudf::detail::aggregation_finalizer& finalizer) const = 0;
};
/**
* @brief Derived class intended for rolling_window specific aggregation usage.
*
* As an example, rolling_window will only accept rolling_aggregation inputs,
* and the appropriate derived classes (sum_aggregation, mean_aggregation, etc)
* derive from this interface to represent these valid options.
*/
class rolling_aggregation : public virtual aggregation {
public:
~rolling_aggregation() = default;
protected:
rolling_aggregation() {}
};
/**
* @brief Derived class intended for groupby specific aggregation usage.
*/
class groupby_aggregation : public virtual aggregation {
public:
~groupby_aggregation() = default;
protected:
groupby_aggregation() {}
};
/**
* @brief Derived class intended for groupby specific scan usage.
*/
class groupby_scan_aggregation : public virtual aggregation {
public:
~groupby_scan_aggregation() = default;
protected:
groupby_scan_aggregation() {}
};
enum class udf_type : bool { CUDA, PTX };
/// Factory to create a SUM aggregation
template <typename Base = aggregation>
std::unique_ptr<Base> make_sum_aggregation();
/// Factory to create a PRODUCT aggregation
template <typename Base = aggregation>
std::unique_ptr<Base> make_product_aggregation();
/// Factory to create a MIN aggregation
template <typename Base = aggregation>
std::unique_ptr<Base> make_min_aggregation();
/// Factory to create a MAX aggregation
template <typename Base = aggregation>
std::unique_ptr<Base> make_max_aggregation();
/**
* @brief Factory to create a COUNT aggregation
*
* @param null_handling Indicates if null values will be counted.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_count_aggregation(null_policy null_handling = null_policy::EXCLUDE);
/// Factory to create an ANY aggregation
template <typename Base = aggregation>
std::unique_ptr<Base> make_any_aggregation();
/// Factory to create a ALL aggregation
template <typename Base = aggregation>
std::unique_ptr<Base> make_all_aggregation();
/// Factory to create a SUM_OF_SQUARES aggregation
template <typename Base = aggregation>
std::unique_ptr<Base> make_sum_of_squares_aggregation();
/// Factory to create a MEAN aggregation
template <typename Base = aggregation>
std::unique_ptr<Base> make_mean_aggregation();
/**
* @brief Factory to create a M2 aggregation
*
* A M2 aggregation is sum of squares of differences from the mean. That is:
* `M2 = SUM((x - MEAN) * (x - MEAN))`.
*
* This aggregation produces the intermediate values that are used to compute variance and standard
* deviation across multiple discrete sets. See
* `https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm` for more
* detail.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_m2_aggregation();
/**
* @brief Factory to create a VARIANCE aggregation
*
* @param ddof Delta degrees of freedom. The divisor used in calculation of
* `variance` is `N - ddof`, where `N` is the population size.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_variance_aggregation(size_type ddof = 1);
/**
* @brief Factory to create a STD aggregation
*
* @param ddof Delta degrees of freedom. The divisor used in calculation of
* `std` is `N - ddof`, where `N` is the population size.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_std_aggregation(size_type ddof = 1);
/// Factory to create a MEDIAN aggregation
template <typename Base = aggregation>
std::unique_ptr<Base> make_median_aggregation();
/**
* @brief Factory to create a QUANTILE aggregation
*
* @param quantiles The desired quantiles
* @param interpolation The desired interpolation
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_quantile_aggregation(std::vector<double> const& q,
interpolation i = interpolation::LINEAR);
/**
* @brief Factory to create an `argmax` aggregation
*
* `argmax` returns the index of the maximum element.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_argmax_aggregation();
/**
* @brief Factory to create an `argmin` aggregation
*
* `argmin` returns the index of the minimum element.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_argmin_aggregation();
/**
* @brief Factory to create a `nunique` aggregation
*
* `nunique` returns the number of unique elements.
* @param null_handling Indicates if null values will be counted.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_nunique_aggregation(null_policy null_handling = null_policy::EXCLUDE);
/**
* @brief Factory to create a `nth_element` aggregation
*
* `nth_element` returns the n'th element of the group/series.
*
* If @p n is not within the range `[-group_size, group_size)`, the result of
* the respective group will be null. Negative indices `[-group_size, -1]`
* corresponds to `[0, group_size-1]` indices respectively where `group_size` is
* the size of each group.
*
* @param n index of nth element in each group.
* @param null_handling Indicates to include/exclude nulls during indexing.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_nth_element_aggregation(
size_type n, null_policy null_handling = null_policy::INCLUDE);
/// Factory to create a ROW_NUMBER aggregation
template <typename Base = aggregation>
std::unique_ptr<Base> make_row_number_aggregation();
/**
* @brief Factory to create a RANK aggregation
*
* `RANK` returns a non-nullable column of size_type "ranks": the number of rows preceding or
* equal to the current row plus one. As a result, ranks are not unique and gaps will appear in
* the ranking sequence.
*
* This aggregation only works with "scan" algorithms. The input column into the group or
* ungrouped scan is an orderby column that orders the rows that the aggregate function ranks.
* If rows are ordered by more than one column, the orderby input column should be a struct
* column containing the ordering columns.
*
* Note:
* 1. This method requires that the rows are presorted by the group keys and order_by columns.
* 2. `RANK` aggregations will return a fully valid column regardless of null_handling policy
* specified in the scan.
* 3. `RANK` aggregations are not compatible with exclusive scans.
*
* @code{.pseudo}
* Example: Consider an motor-racing statistics dataset, containing the following columns:
* 1. driver_name: (STRING) Name of the car driver
* 2. num_overtakes: (INT32) Number of times the driver overtook another car in a lap
* 3. lap_number: (INT32) The number of the lap
*
* For the following presorted data:
*
* [ // driver_name, num_overtakes, lap_number
* { "bottas", 2, 3 },
* { "bottas", 2, 7 },
* { "bottas", 2, 7 },
* { "bottas", 1, 1 },
* { "bottas", 1, 2 },
* { "hamilton", 4, 1 },
* { "hamilton", 4, 1 },
* { "hamilton", 3, 4 },
* { "hamilton", 2, 4 }
* ]
*
* A grouped rank aggregation scan with:
* groupby column : driver_name
* input orderby column: struct_column{num_overtakes, lap_number}
* result: column<size_type>{1, 2, 2, 4, 5, 1, 1, 3, 4}
*
* A grouped rank aggregation scan with:
* groupby column : driver_name
* input orderby column: num_overtakes
* result: column<size_type>{1, 1, 1, 4, 4, 1, 1, 3, 4}
* @endcode
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_rank_aggregation();
/**
* @brief Factory to create a DENSE_RANK aggregation
*
* `DENSE_RANK` returns a non-nullable column of size_type "dense ranks": the preceding unique
* value's rank plus one. As a result, ranks are not unique but there are no gaps in the ranking
* sequence (unlike RANK aggregations).
*
* This aggregation only works with "scan" algorithms. The input column into the group or
* ungrouped scan is an orderby column that orders the rows that the aggregate function ranks.
* If rows are ordered by more than one column, the orderby input column should be a struct
* column containing the ordering columns.
*
* Note:
* 1. This method requires that the rows are presorted by the group keys and order_by columns.
* 2. `DENSE_RANK` aggregations will return a fully valid column regardless of null_handling
* policy specified in the scan.
* 3. `DENSE_RANK` aggregations are not compatible with exclusive scans.
*
* @code{.pseudo}
* Example: Consider an motor-racing statistics dataset, containing the following columns:
* 1. driver_name: (STRING) Name of the car driver
* 2. num_overtakes: (INT32) Number of times the driver overtook another car in a lap
* 3. lap_number: (INT32) The number of the lap
*
* For the following presorted data:
*
* [ // driver_name, num_overtakes, lap_number
* { "bottas", 2, 3 },
* { "bottas", 2, 7 },
* { "bottas", 2, 7 },
* { "bottas", 1, 1 },
* { "bottas", 1, 2 },
* { "hamilton", 4, 1 },
* { "hamilton", 4, 1 },
* { "hamilton", 3, 4 },
* { "hamilton", 2, 4 }
* ]
*
* A grouped dense rank aggregation scan with:
* groupby column : driver_name
* input orderby column: struct_column{num_overtakes, lap_number}
* result: column<size_type>{1, 2, 2, 3, 4, 1, 1, 2, 3}
*
* A grouped dense rank aggregation scan with:
* groupby column : driver_name
* input orderby column: num_overtakes
* result: column<size_type>{1, 1, 1, 2, 2, 1, 1, 2, 3}
* @endcode
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_dense_rank_aggregation();
/**
* @brief Factory to create a COLLECT_LIST aggregation
*
* `COLLECT_LIST` returns a list column of all included elements in the group/series.
*
* If `null_handling` is set to `EXCLUDE`, null elements are dropped from each
* of the list rows.
*
* @param null_handling Indicates whether to include/exclude nulls in list elements.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_collect_list_aggregation(
null_policy null_handling = null_policy::INCLUDE);
/**
* @brief Factory to create a COLLECT_SET aggregation
*
* `COLLECT_SET` returns a lists column of all included elements in the group/series. Within each
* list, the duplicated entries are dropped out such that each entry appears only once.
*
* If `null_handling` is set to `EXCLUDE`, null elements are dropped from each
* of the list rows.
*
* @param null_handling Indicates whether to include/exclude nulls during collection
* @param nulls_equal Flag to specify whether null entries within each list should be considered
* equal.
* @param nans_equal Flag to specify whether NaN values in floating point column should be
* considered equal.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_collect_set_aggregation(null_policy null_handling = null_policy::INCLUDE,
null_equality nulls_equal = null_equality::EQUAL,
nan_equality nans_equal = nan_equality::UNEQUAL);
/// Factory to create a LAG aggregation
template <typename Base = aggregation>
std::unique_ptr<Base> make_lag_aggregation(size_type offset);
/// Factory to create a LEAD aggregation
template <typename Base = aggregation>
std::unique_ptr<Base> make_lead_aggregation(size_type offset);
/**
* @brief Factory to create an aggregation base on UDF for PTX or CUDA
*
* @param[in] type: either udf_type::PTX or udf_type::CUDA
* @param[in] user_defined_aggregator A string containing the aggregator code
* @param[in] output_type expected output type
*
* @return aggregation unique pointer housing user_defined_aggregator string.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_udf_aggregation(udf_type type,
std::string const& user_defined_aggregator,
data_type output_type);
/**
* @brief Factory to create a MERGE_LISTS aggregation.
*
* Given a lists column, this aggregation merges all the lists corresponding to the same key value
* into one list. It is designed specifically to merge the partial results of multiple (distributed)
* groupby `COLLECT_LIST` aggregations into a final `COLLECT_LIST` result. As such, it requires the
* input lists column to be non-nullable (the child column containing list entries is not subjected
* to this requirement).
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_merge_lists_aggregation();
/**
* @brief Factory to create a MERGE_SETS aggregation.
*
* Given a lists column, this aggregation firstly merges all the lists corresponding to the same key
* value into one list, then it drops all the duplicate entries in each lists, producing a lists
* column containing non-repeated entries.
*
* This aggregation is designed specifically to merge the partial results of multiple (distributed)
* groupby `COLLECT_LIST` or `COLLECT_SET` aggregations into a final `COLLECT_SET` result. As such,
* it requires the input lists column to be non-nullable (the child column containing list entries
* is not subjected to this requirement).
*
* In practice, the input (partial results) to this aggregation should be generated by (distributed)
* `COLLECT_LIST` aggregations, not `COLLECT_SET`, to avoid unnecessarily removing duplicate entries
* for the partial results.
*
* @param nulls_equal Flag to specify whether nulls within each list should be considered equal
* during dropping duplicate list entries.
* @param nans_equal Flag to specify whether NaN values in floating point column should be
* considered equal during dropping duplicate list entries.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_merge_sets_aggregation(null_equality nulls_equal = null_equality::EQUAL,
nan_equality nans_equal = nan_equality::UNEQUAL);
/**
* @brief Factory to create a MERGE_M2 aggregation
*
* Merges the results of `M2` aggregations on independent sets into a new `M2` value equivalent to
* if a single `M2` aggregation was done across all of the sets at once. This aggregation is only
* valid on structs whose members are the result of the `COUNT_VALID`, `MEAN`, and `M2` aggregations
* on the same sets. The output of this aggregation is a struct containing the merged `COUNT_VALID`,
* `MEAN`, and `M2` aggregations.
*
* The input `M2` aggregation values are expected to be all non-negative numbers, since they
* were output from `M2` aggregation.
*/
template <typename Base = aggregation>
std::unique_ptr<Base> make_merge_m2_aggregation();
/** @} */ // end of group
} // namespace cudf
|
// stdafx.cpp : source file that includes just the standard includes
// Regex_Examples.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
|
#ifndef LAMBDA_NATURAL_CONSTANT_HPP
#define LAMBDA_NATURAL_CONSTANT_HPP
#include <ast/node.hpp>
namespace ast
{
class NaturalConstant : public Node
{
public:
using Pointer = Node::PointerType<NaturalConstant>;
using NaturalValueType = unsigned long;
public:
explicit NaturalConstant(NaturalValueType value);
const NaturalValueType &value() const { return mValue; }
Node::Pointer evaluate(Context &context) const override;
Type::Pointer typecheck(TypeContext &context) override;
Node::Pointer transform(NodeVisitor *visitor) override;
Node::Pointer copy() const override;
string toString() const override;
private:
NaturalValueType mValue;
};
}
#endif //LAMBDA_NATURAL_CONSTANT_HPP
|
// Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
/**\file
* Checks that test case methods with identical class, name and tags are
* reported as error.
*/
#include <catch2/catch_test_macros.hpp>
class TestCaseFixture {
public:
int m_a;
};
TEST_CASE_METHOD(TestCaseFixture, "A test case with duplicated name and tags", "[tag1]") {}
TEST_CASE_METHOD(TestCaseFixture, "A test case with duplicated name and tags", "[tag1]") {}
|
#include "my_application.h"
#include <flutter_linux/flutter_linux.h>
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
#endif
#include "flutter/generated_plugin_registrant.h"
struct _MyApplication {
GtkApplication parent_instance;
char** dart_entrypoint_arguments;
};
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
// Implements GApplication::activate.
static void my_application_activate(GApplication* application) {
MyApplication* self = MY_APPLICATION(application);
GtkWindow* window =
GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
// Use a header bar when running in GNOME as this is the common style used
// by applications and is the setup most users will be using (e.g. Ubuntu
// desktop).
// If running on X and not using GNOME then just use a traditional title bar
// in case the window manager does more exotic layout, e.g. tiling.
// If running on Wayland assume the header bar will work (may need changing
// if future cases occur).
gboolean use_header_bar = TRUE;
#ifdef GDK_WINDOWING_X11
GdkScreen *screen = gtk_window_get_screen(window);
if (GDK_IS_X11_SCREEN(screen)) {
const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
use_header_bar = FALSE;
}
}
#endif
if (use_header_bar) {
GtkHeaderBar *header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
gtk_widget_show(GTK_WIDGET(header_bar));
gtk_header_bar_set_title(header_bar, "three_d_viewer");
gtk_header_bar_set_show_close_button(header_bar, TRUE);
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
}
else {
gtk_window_set_title(window, "three_d_viewer");
}
gtk_window_set_default_size(window, 1280, 720);
gtk_widget_show(GTK_WIDGET(window));
g_autoptr(FlDartProject) project = fl_dart_project_new();
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
FlView* view = fl_view_new(project);
gtk_widget_show(GTK_WIDGET(view));
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
fl_register_plugins(FL_PLUGIN_REGISTRY(view));
gtk_widget_grab_focus(GTK_WIDGET(view));
}
// Implements GApplication::local_command_line.
static gboolean my_application_local_command_line(GApplication* application, gchar ***arguments, int *exit_status) {
MyApplication* self = MY_APPLICATION(application);
// Strip out the first argument as it is the binary name.
self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
g_autoptr(GError) error = nullptr;
if (!g_application_register(application, nullptr, &error)) {
g_warning("Failed to register: %s", error->message);
*exit_status = 1;
return TRUE;
}
g_application_activate(application);
*exit_status = 0;
return TRUE;
}
// Implements GObject::dispose.
static void my_application_dispose(GObject *object) {
MyApplication* self = MY_APPLICATION(object);
g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
}
static void my_application_class_init(MyApplicationClass* klass) {
G_APPLICATION_CLASS(klass)->activate = my_application_activate;
G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
}
static void my_application_init(MyApplication* self) {}
MyApplication* my_application_new() {
return MY_APPLICATION(g_object_new(my_application_get_type(),
"application-id", APPLICATION_ID,
"flags", G_APPLICATION_NON_UNIQUE,
nullptr));
}
|
// _ _____ __________
// | | / / _ | / __/_ __/ Visibility
// | |/ / __ |_\ \ / / Across
// |___/_/ |_/___/ /_/ Space and Time
//
// SPDX-FileCopyrightText: (c) 2021 The VAST Contributors
// SPDX-License-Identifier: BSD-3-Clause
#define SUITE pcap
#include <vast/concept/parseable/to.hpp>
#include <vast/concept/parseable/vast/address.hpp>
#include <vast/config.hpp>
#include <vast/defaults.hpp>
#include <vast/error.hpp>
#include <vast/format/reader_factory.hpp>
#include <vast/format/writer_factory.hpp>
#include <vast/table_slice.hpp>
#include <vast/table_slice_builder_factory.hpp>
#include <vast/table_slice_column.hpp>
#include <vast/test/data.hpp>
#include <vast/test/fixtures/actor_system.hpp>
#include <vast/test/test.hpp>
#include <filesystem>
namespace vast::plugins::pcap {
namespace {
// Baseline computed via `./community-id.py nmap_vsn.pcap` from the
// repository https://github.com/corelight/community-id-spec.
std::string_view community_ids[] = {
"1:S2JPnyxVrN68D+w4ZMxKNeyQoNI=", "1:S2JPnyxVrN68D+w4ZMxKNeyQoNI=",
"1:holOOTgd0/2k/ojauB8VsMbd2pI=", "1:holOOTgd0/2k/ojauB8VsMbd2pI=",
"1:Vzc86YWBMwkcA1dPNrPN6t5hvj4=", "1:QbjD7ZBgS/i6o4RS0ovLWNhArt0=",
"1:gvhz8+T8uMPcj1nTxa7QZCz4RkI=", "1:8iil9/ZM2nGLcSw5H1hLk3AB4OY=",
"1:8EW/SvA6t3JXhn5vefyUyYCtPQY=", "1:8EW/SvA6t3JXhn5vefyUyYCtPQY=",
"1:8EW/SvA6t3JXhn5vefyUyYCtPQY=", "1:8EW/SvA6t3JXhn5vefyUyYCtPQY=",
"1:Vzc86YWBMwkcA1dPNrPN6t5hvj4=", "1:Vzc86YWBMwkcA1dPNrPN6t5hvj4=",
"1:Vzc86YWBMwkcA1dPNrPN6t5hvj4=", "1:gvhz8+T8uMPcj1nTxa7QZCz4RkI=",
"1:6r39sKcWauHVhKZ+Z92/0UK9lNg=", "1:xIXIGoyl8i+RURiBec05S5X8XEk=",
"1:Ry5Au48dLKiT1Sq7N1kqT7n0wn8=", "1:EP0qhzV2s6lNTSAErUFzHBDLXog=",
"1:0FtkY5KIWLZIwfKcr7k3dLvAkpo=", "1:HzDIiZWEeOnjh8jBPlvUCnCxemo=",
"1:bMRO6UR8tNUnjnO3GuJCXs/ufuo=", "1:4O0NCs9k1xB4iZqlTYsOMaeZPiE=",
"1:I7m0KKPgV/VUUmVf2aJkP+iDKNw=", "1:xIXIGoyl8i+RURiBec05S5X8XEk=",
"1:0FtkY5KIWLZIwfKcr7k3dLvAkpo=", "1:4O0NCs9k1xB4iZqlTYsOMaeZPiE=",
"1:7xMlZ3kChAVsoDvCm6u5nsrqjMY=", "1:7xMlZ3kChAVsoDvCm6u5nsrqjMY=",
"1:7xMlZ3kChAVsoDvCm6u5nsrqjMY=", "1:7xMlZ3kChAVsoDvCm6u5nsrqjMY=",
"1:zjGM746aZkpYb2mVIlsgLrUG59k=", "1:zjGM746aZkpYb2mVIlsgLrUG59k=",
"1:zjGM746aZkpYb2mVIlsgLrUG59k=", "1:zjGM746aZkpYb2mVIlsgLrUG59k=",
"1:zjGM746aZkpYb2mVIlsgLrUG59k=", "1:zjGM746aZkpYb2mVIlsgLrUG59k=",
"1:zjGM746aZkpYb2mVIlsgLrUG59k=", "1:zjGM746aZkpYb2mVIlsgLrUG59k=",
"1:zjGM746aZkpYb2mVIlsgLrUG59k=", "1:zjGM746aZkpYb2mVIlsgLrUG59k=",
"1:zjGM746aZkpYb2mVIlsgLrUG59k=", "1:zjGM746aZkpYb2mVIlsgLrUG59k=",
};
struct fixture {
fixture() {
factory<format::reader>::initialize();
factory<format::writer>::initialize();
factory<table_slice_builder>::initialize();
}
};
} // namespace
FIXTURE_SCOPE(pcap_tests, fixture)
TEST(PCAP read 1) {
// Initialize a PCAP source with no cutoff (-1), and at most 5 flow table
// entries.
caf::settings settings;
caf::put(settings, "vast.import.read", artifacts::traces::nmap_vsn);
caf::put(settings, "vast.import.pcap.cutoff", static_cast<uint64_t>(-1));
caf::put(settings, "vast.import.pcap.max-flows", static_cast<size_t>(5));
// A non-positive value disables the timeout. We need to do this because the
// deterministic actor system is messing with the clocks.
caf::put(settings, "vast.import.batch-timeout", "0s");
auto reader = format::reader::make("pcap", settings);
REQUIRE(reader);
size_t events_produced = 0;
table_slice slice;
auto add_slice = [&](const table_slice& x) {
REQUIRE_EQUAL(slice.encoding(), table_slice_encoding::none);
REQUIRE_NOT_EQUAL(x.encoding(), table_slice_encoding::none);
slice = x;
events_produced = x.rows();
};
auto [err, produced] = reader->get()->read(std::numeric_limits<size_t>::max(),
100, // we expect only 44 events
add_slice);
CHECK_EQUAL(err, ec::end_of_input);
REQUIRE_EQUAL(events_produced, 44u);
auto&& layout = slice.layout();
CHECK_EQUAL(layout.name(), "pcap.packet");
auto src_field = slice.at(43, 1, address_type{});
auto src = unbox(caf::get_if<view<address>>(&src_field));
CHECK_EQUAL(src, unbox(to<address>("192.168.1.1")));
auto community_id_column = table_slice_column::make(slice, "community_id");
REQUIRE(community_id_column);
for (size_t row = 0; row < 44; ++row)
CHECK_VARIANT_EQUAL((*community_id_column)[row], community_ids[row]);
MESSAGE("write out read packets");
const auto file = std::filesystem::path{"vast-unit-test-nmap-vsn.pacp"};
caf::put(settings, "vast.export.write", file.string());
auto writer = format::writer::make("pcap", settings);
REQUIRE(writer);
auto deleter
= caf::detail::make_scope_guard([&] { std::filesystem::remove_all(file); });
REQUIRE_EQUAL(writer->get()->write(slice), caf::none);
}
TEST(PCAP read 2) {
// Spawn a PCAP source with a 64-byte cutoff, at most 100 flow table entries,
// with flows inactive for more than 5 seconds to be evicted every 2 seconds.
caf::settings settings;
caf::put(settings, "vast.import.read", artifacts::traces::nmap_vsn);
caf::put(settings, "vast.import.pcap.cutoff", static_cast<uint64_t>(64));
caf::put(settings, "vast.import.pcap.max-flows", static_cast<size_t>(100));
caf::put(settings, "vast.import.pcap.max-flow-age", static_cast<size_t>(5));
caf::put(settings, "vast.import.pcap.flow-expiry", static_cast<size_t>(2));
// A non-positive value disables the timeout. We need to do this because the
// deterministic actor system is messing with the clocks.
caf::put(settings, "vast.import.batch-timeout", "0s");
auto reader = format::reader::make("pcap", settings);
REQUIRE(reader);
table_slice slice{};
auto add_slice = [&](const table_slice& x) {
REQUIRE_EQUAL(slice.encoding(), table_slice_encoding::none);
slice = x;
};
auto [err, produced] = reader->get()->read(std::numeric_limits<size_t>::max(),
100, // we expect only 36 events
add_slice);
REQUIRE_NOT_EQUAL(slice.encoding(), table_slice_encoding::none);
CHECK_EQUAL(err, ec::end_of_input);
REQUIRE_EQUAL(produced, 36u);
CHECK_EQUAL(slice.rows(), 36u);
auto&& layout = slice.layout();
CHECK_EQUAL(layout.name(), "pcap.packet");
MESSAGE("write out read packets");
const auto file
= std::filesystem::path{"vast-unit-test-workshop-2011-browse.pcap"};
caf::put(settings, "vast.export.write", file.string());
auto writer = format::writer::make("pcap", settings);
REQUIRE(writer);
auto deleter
= caf::detail::make_scope_guard([&] { std::filesystem::remove_all(file); });
REQUIRE_EQUAL(writer->get()->write(slice), caf::none);
}
FIXTURE_SCOPE_END()
} // namespace vast::plugins::pcap
|
//
// TM & (c) 2021 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
// All rights reserved. See LICENSE.txt for license.
//
#include <MaterialXGenGlsl/EsslShaderGenerator.h>
#include <MaterialXGenShader/Shader.h>
#include <MaterialXGenShader/ShaderStage.h>
#include <MaterialXGenShader/Util.h>
#include <emscripten/bind.h>
namespace ems = emscripten;
namespace mx = MaterialX;
/// Returns the first renderable element from the given document. This element can be used to generate a shader.
mx::ElementPtr findRenderableElement(mx::DocumentPtr doc)
{
mx::StringVec renderablePaths;
std::vector<mx::TypedElementPtr> elems;
mx::findRenderableElements(doc, elems);
for (mx::TypedElementPtr elem : elems)
{
mx::TypedElementPtr renderableElem = elem;
mx::NodePtr node = elem->asA<mx::Node>();
if (node && node->getType() == mx::MATERIAL_TYPE_STRING)
{
std::vector<mx::NodePtr> shaderNodes = getShaderNodes(node, mx::SURFACE_SHADER_TYPE_STRING);
if (!shaderNodes.empty())
{
renderableElem = *shaderNodes.begin();
}
}
const auto& renderablePath = renderableElem->getNamePath();
mx::ElementPtr renderableElement = doc->getDescendant(renderablePath);
mx::TypedElementPtr typedElem = renderableElement ? renderableElement->asA<mx::TypedElement>() : nullptr;
if (typedElem)
{
return renderableElement;
}
}
return nullptr;
}
EMSCRIPTEN_BINDINGS(EsslShaderGenerator)
{
ems::class_<mx::EsslShaderGenerator, ems::base<mx::HwShaderGenerator>>("EsslShaderGenerator")
.smart_ptr_constructor("EsslShaderGenerator", &std::make_shared<mx::EsslShaderGenerator>)
;
ems::function("findRenderableElement", &findRenderableElement);
}
|
// Copyright (c) 2011-2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include <config/danecoin-config.h>
#endif
#include <qt/utilitydialog.h>
#include <qt/forms/ui_helpmessagedialog.h>
#include <qt/guiutil.h>
#include <clientversion.h>
#include <init.h>
#include <util/system.h>
#include <util/strencodings.h>
#include <stdio.h>
#include <QCloseEvent>
#include <QLabel>
#include <QMainWindow>
#include <QRegExp>
#include <QTextCursor>
#include <QTextTable>
#include <QVBoxLayout>
/** "Help message" or "About" dialog box */
HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
QDialog(parent),
ui(new Ui::HelpMessageDialog)
{
ui->setupUi(this);
QString version = QString{PACKAGE_NAME} + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion());
if (about)
{
setWindowTitle(tr("About %1").arg(PACKAGE_NAME));
std::string licenseInfo = LicenseInfo();
/// HTML-format the license message from the core
QString licenseInfoHTML = QString::fromStdString(LicenseInfo());
// Make URLs clickable
QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
uri.setMinimal(true); // use non-greedy matching
licenseInfoHTML.replace(uri, "<a href=\"\\1\">\\1</a>");
// Replace newlines with HTML breaks
licenseInfoHTML.replace("\n", "<br>");
ui->aboutMessage->setTextFormat(Qt::RichText);
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
text = version + "\n" + QString::fromStdString(FormatParagraph(licenseInfo));
ui->aboutMessage->setText(version + "<br><br>" + licenseInfoHTML);
ui->aboutMessage->setWordWrap(true);
ui->helpMessage->setVisible(false);
} else {
setWindowTitle(tr("Command-line options"));
QString header = "Usage: danecoin-qt [command-line options] \n";
QTextCursor cursor(ui->helpMessage->document());
cursor.insertText(version);
cursor.insertBlock();
cursor.insertText(header);
cursor.insertBlock();
std::string strUsage = gArgs.GetHelpMessage();
QString coreOptions = QString::fromStdString(strUsage);
text = version + "\n\n" + header + "\n" + coreOptions;
QTextTableFormat tf;
tf.setBorderStyle(QTextFrameFormat::BorderStyle_None);
tf.setCellPadding(2);
QVector<QTextLength> widths;
widths << QTextLength(QTextLength::PercentageLength, 35);
widths << QTextLength(QTextLength::PercentageLength, 65);
tf.setColumnWidthConstraints(widths);
QTextCharFormat bold;
bold.setFontWeight(QFont::Bold);
for (const QString &line : coreOptions.split("\n")) {
if (line.startsWith(" -"))
{
cursor.currentTable()->appendRows(1);
cursor.movePosition(QTextCursor::PreviousCell);
cursor.movePosition(QTextCursor::NextRow);
cursor.insertText(line.trimmed());
cursor.movePosition(QTextCursor::NextCell);
} else if (line.startsWith(" ")) {
cursor.insertText(line.trimmed()+' ');
} else if (line.size() > 0) {
//Title of a group
if (cursor.currentTable())
cursor.currentTable()->appendRows(1);
cursor.movePosition(QTextCursor::Down);
cursor.insertText(line.trimmed(), bold);
cursor.insertTable(1, 2, tf);
}
}
ui->helpMessage->moveCursor(QTextCursor::Start);
ui->scrollArea->setVisible(false);
ui->aboutLogo->setVisible(false);
}
GUIUtil::handleCloseWindowShortcut(this);
}
HelpMessageDialog::~HelpMessageDialog()
{
delete ui;
}
void HelpMessageDialog::printToConsole()
{
// On other operating systems, the expected action is to print the message to the console.
tfm::format(std::cout, "%s\n", qPrintable(text));
}
void HelpMessageDialog::showOrPrint()
{
#if defined(WIN32)
// On Windows, show a message box, as there is no stderr/stdout in windowed applications
exec();
#else
// On other operating systems, print help text to console
printToConsole();
#endif
}
void HelpMessageDialog::on_okButton_accepted()
{
close();
}
/** "Shutdown" window */
ShutdownWindow::ShutdownWindow(QWidget *parent, Qt::WindowFlags f):
QWidget(parent, f)
{
QVBoxLayout *layout = new QVBoxLayout();
layout->addWidget(new QLabel(
tr("%1 is shutting down...").arg(PACKAGE_NAME) + "<br /><br />" +
tr("Do not shut down the computer until this window disappears.")));
setLayout(layout);
GUIUtil::handleCloseWindowShortcut(this);
}
QWidget* ShutdownWindow::showShutdownWindow(QMainWindow* window)
{
assert(window != nullptr);
// Show a simple window indicating shutdown status
QWidget *shutdownWindow = new ShutdownWindow();
shutdownWindow->setWindowTitle(window->windowTitle());
// Center shutdown window at where main window was
const QPoint global = window->mapToGlobal(window->rect().center());
shutdownWindow->move(global.x() - shutdownWindow->width() / 2, global.y() - shutdownWindow->height() / 2);
shutdownWindow->show();
return shutdownWindow;
}
void ShutdownWindow::closeEvent(QCloseEvent *event)
{
event->ignore();
}
|
//----------------------------------------------------------------------------------------------------------------------
///
/// \file lap.cpp
/// \brief Решение задачи о назначениях (cтандартная линейная дискретная оптимизационная задача)
/// \date 14.07.20 - создан
/// \author Соболев А.А.
///
#include <lap.h>
namespace LAP /// Решение задачи о назначениях
{
//----------------------------------------------------------------------------------------------------------------------
void JVC( const arma::mat &assigncost, int dim, TSearchParam sp, double maxcost, double resolution, arma::ivec &rowsol )
{
// Если ищем максимум - умножим матрицу на -1
arma::mat cost( dim, dim, arma::fill::zeros );
if( sp == TSearchParam::Max ) { // Поиск минимума/максимума
cost = -assigncost;
} else {
cost = assigncost;
}
bool unassignedfound;
int i = 0, imin = 0, numfree = 0, prvnumfree = 0, f = 0, i0 = 0, k = 0, freerow = 0; // row
int j = 0, j1 = 0, j2 = 0, endofpath = 0, last = 0, low = 0, up = 0;
double dmin = 0.0, h = 0.0, umin = 0.0, usubmin = 0.0, v2 = 0.0; // cost
arma::vec u = arma::vec( dim, arma::fill::zeros );//new double[dim];
arma::vec v = arma::vec( dim, arma::fill::zeros );//new double[dim];
arma::ivec free = arma::ivec( dim, arma::fill::zeros );//new int[dim]; // list of unassigned rows.
arma::ivec collist = arma::ivec( dim, arma::fill::zeros );//new int[dim]; // list of columns to be scanned in various ways.
arma::ivec matches = arma::ivec( dim, arma::fill::zeros );//new int[dim]; // counts how many times a row could be assigned.
arma::vec d = arma::vec( dim, arma::fill::zeros );//new double[dim]; // 'cost-distance' in augmenting path calculation.
arma::ivec pred = arma::ivec( dim, arma::fill::zeros );//new int[dim]; // row-predecessor of column in augmenting/alternating path.
//int *rowsol = new int[dim];
arma::ivec colsol = arma::ivec( dim, arma::fill::zeros );//int *colsol = new int[dim];
arma::vec x = arma::vec( dim, arma::fill::zeros );
arma::vec xh = arma::vec( dim, arma::fill::zeros );
arma::ivec vf0 = arma::ivec( dim, arma::fill::zeros );
// init
rowsol.zeros();
rowsol -= 1;
colsol -= 1;
// COLUMN REDUCTION
for( j = ( dim - 1 ); j >= 0; j-- ) { // reverse order gives better results.
// find minimum cost over rows.
dmin = cost(0,j);
imin = 0;
for( i = 1; i < dim; i++ ) {
if( cost(i,j) < dmin ) {
dmin = cost(i,j);
imin = i;
}
}
v(j) = dmin;
matches(imin)++;
if( matches(imin) == 1 ) {
// init assignment if minimum row assigned for first time.
rowsol(imin) = j;
colsol(j) = imin;
} else if( v(j) < v(rowsol(imin)) ) {
int j1 = rowsol(imin);
rowsol(imin) = j;
colsol(j) = imin;
colsol(j1) = -1;
} else {
colsol(j) = -1; // row already assigned, column not assigned.
}
}
// REDUCTION TRANSFER
for( i = 0; i < dim; i++ ) {
if( matches(i) == 0 ) { // fill list of unassigned 'free' rows.
free(numfree) = i;
numfree++;
} else {
if( matches(i) == 1 ) { // transfer reduction from rows that are assigned once.
j1 = rowsol(i);
for( j = 0; j < dim; j++ ) {
x(j) = cost(i,j) - v(j);
}
x(j1) = maxcost;
v(j1) = v(j1) - x.min();
}
}
}
// AUGMENTING ROW REDUCTION
int loopcnt = 0; // do-loop to be done twice.
while( loopcnt < 2 ) {
loopcnt++;
// scan all free rows.
// in some cases, a free row may be replaced with another one to be scanned next.
k = 0;
prvnumfree = numfree;
numfree = 0; // start list of rows still free after augmenting row reduction.
while( k < prvnumfree ) {
i = free(k);
k++;
// find minimum and second minimum reduced cost over columns.
for( j = 0; j < dim; j++ ) {
x(j) = cost(i,j) - v(j);
}
j1 = arma::index_min( x );
umin = x(j1);
x(j1) = maxcost;
j2 = arma::index_min( x );
usubmin = x(j2);
i0 = colsol(j1);
if( ( usubmin - umin ) > resolution ) {
// change the reduction of the minimum column to increase the minimum
// reduced cost in the row to the subminimum.
v(j1) = v(j1) - ( usubmin - umin );
} else {
if( i0 > -1 ) { // minimum and subminimum equal.
// minimum column j1 is assigned.
// swap columns j1 and j2, as j2 may be unassigned.
j1 = j2;
i0 = colsol(j2);
}
}
// (re-)assign i to j1, possibly de-assigning an i0.
rowsol(i) = j1;
colsol(j1) = i;
if( i0 > -1 ) { // minimum column j1 assigned earlier. // ORIGINAL
//if( umin < ( usubmin + EPS ) ) { // fixed EPS
if( ( usubmin - umin ) > resolution ) {
// put in current k, and go back to that k.
// continue augmenting path i - j1 with i0.
k--;
free(k) = i0;
} else {
// no further augmenting reduction possible.
// store i0 in list of free rows for next phase.
free(numfree) = i0;
numfree++;
}
}
}
}
// AUGMENT SOLUTION FOR EACH FREE ROW
for( f = 0; f < numfree; f++ ) {
freerow = free(f); // start row of augmenting path.
// Dijkstra shortest path algorithm.
// runs until unassigned column added to shortest path tree.
for( j = 0; j < dim; j++ ) {
d(j) = cost(freerow,j) - v(j);
pred(j) = freerow;
collist(j) = j; // init column list.
}
low = 0; // columns in 0..low-1 are ready, now none.
up = 0; // columns in low..up-1 are to be scanned for current minimum, now none.
// columns in up..dim-1 are to be considered later to find new minimum,
// at this stage the list simply contains all columns
unassignedfound = false;
while( !unassignedfound ) {
if( up == low ) { // no more columns to be scanned for current minimum.
last = low - 1;
// scan columns for up..dim-1 to find all indices for which new minimum occurs.
// store these indices between low..up-1 (increasing up).
dmin = d(collist(up));
up++;
for( k = up; k < dim; k++ ) {
j = collist(k);
h = d(j);
if( ( h < dmin ) || ( std::abs( h - dmin ) < resolution ) ) { //
// if( h <= dmin ) { // ORIGINAL
if( h < dmin ) { // new minimum.
up = low; // restart list at index low.
dmin = h;
}
// new index with same minimum, put on undex up, and extend list.
collist(k) = collist(up);
collist(up) = j;
up++;
}
}
// check if any of the minimum columns happens to be unassigned.
// if so, we have an augmenting path right away.
for( k = low; k < up; k++ ) {
if( colsol(collist(k)) < 0 ) {
endofpath = collist(k);
unassignedfound = true;
break;
}
}
}
if( !unassignedfound ) {
// update 'distances' between freerow and all unscanned columns, via next scanned column.
j1 = collist(low);
low++;
i = colsol(j1);
h = cost(i,j1) - v(j1) - dmin;
for( k = up; k < dim; k++ ) {
j = collist(k);
v2 = cost(i,j) - v(j) - h;
if( v2 < d(j) ) {
pred(j) = i;
// if( v2 == min ) { // new column found at same minimum value - ORIGINAL
if( std::abs( v2 - dmin ) < resolution ) { // new column found at same minimum value - MY VERSION
if( colsol(j) < 0 ) {
// if unassigned, shortest augmenting path is complete.
endofpath = j;
unassignedfound = true;
break;
} else {
// else add to list to be scanned right away.
collist(k) = collist(up);
collist(up) = j;
up++;
}
}
d(j) = v2;
}
}
}
}
// update column prices.
for( k = 0; k <= last; k++ ) { //for( k = last + 1; k--; ) {
j1 = collist(k);
v(j1) = v(j1) + d(j1) - dmin;
}
// reset row and column assignments along the alternating path.
while( true ) {
i = pred(endofpath);
colsol(endofpath) = i;
j1 = endofpath;
endofpath = rowsol(i);
rowsol(i) = j1;
if( i == freerow ) {
break;
}
}
}
// // calculate optimal cost.
// //double lapcost = 0;
// for( i = 0; i < dim; i++ ) {
// j = rowsol(i);
// u[i] = cost(i,j) - v(j);
// //lapcost = lapcost + assigncost[( i * dim ) + j]; //lapcost = lapcost + assigncost[i][j];
// }
}
//----------------------------------------------------------------------------------------------------------------------
void Mack( const arma::mat &assigncost, int dim, TSearchParam sp, arma::ivec &rowsol )
{
double* cost = new double[dim*dim];
for( int i = 0; i < dim; i++ ) {
for( int j = 0; j < dim; j++ ) {
if( sp == TSearchParam::Max ) {
cost[dim*i+j] = -assigncost(i,j); // Поиск максимума
} else {
cost[dim*i+j] = assigncost(i,j); // Поиск минимума
}
}
}
double* ma = new double[dim+1];
double* mb = new double[dim+1];
int* ip = new int[dim+1];
int* im = new int[dim+1];
int* ic = new int[(dim+1) * (dim+1)];
int* lr = new int[dim+1];
int* jr = new int[dim+1];
int* jm = new int[dim+1];
int* jk = new int[dim+1];
int* jv = new int[dim+1]; // result of algorithm (needs to be converted from 1...N fortran format to 0...(N-1) C# format)
int* nm = new int[dim+1];
// clear memory
memset( ma, 0, static_cast<unsigned long long>( dim + 1 ) * sizeof(double) );
memset( mb, 0, static_cast<unsigned long long>( dim + 1 ) * sizeof(double) );
memset( ip, 0, static_cast<unsigned long long>( dim + 1 ) * sizeof(int) );
memset( im, 0, static_cast<unsigned long long>( dim + 1 ) * sizeof(int) );
memset( ic, 0, static_cast<unsigned long long>( ( dim + 1 ) * ( dim + 1 ) ) * sizeof(int) );
memset( lr, 0, static_cast<unsigned long long>( dim + 1 ) * sizeof(int) );
memset( jr, 0, static_cast<unsigned long long>( dim + 1 ) * sizeof(int) );
memset( jm, 0, static_cast<unsigned long long>( dim + 1 ) * sizeof(int) );
memset( jk, 0, static_cast<unsigned long long>( dim + 1 ) * sizeof(int) );
memset( jv, 0, static_cast<unsigned long long>( dim + 1 ) * sizeof(int) );
memset( nm, 0, static_cast<unsigned long long>( dim + 1 ) * sizeof(int) );
double rim = 0;
double riz = 0;
double riv = 0;
int nc = 0;
int i = 0;
int il = 0;
int ir = 0;
int iw = 0;
int iz = 0;
int icj = 0;
int ilr = 0;
int iip = 0;
int l = 0;
int ls = 0;
int k = 0;
int j = 0;
int jc = 0;
int jd = 0;
int jp = 0;
int jq = 0;
int ju1 = 0;
int jx = 0;
int jy = 0;
double rma = 1e10;
// 2
for( i = 1; i <= dim; i++ ) {
rim = rma;
for( j = 1; j <= dim; j++ ) {
riz = cost[dim*(i-1)+(j-1)]; //riz = p[i, j];
if( riz > rim ) {
continue;
}
rim = riz;
l = j;
}
nm[l] = nm[l] + 1;
k = nm[l];
ic[dim*(l-1)+(k-1)] = i; //ic[l, k] = i;
ma[i] = rim;
jr[i] = l;
}
bool isJN = false;
for( ; ; ) {
j = 0;
for( ; ; ) {
j = j + 1;
if( j > dim ) {
isJN = true;
break;
}
if( nm[j] >= 2 ) {
break;
}
}
if( isJN ) {
break;
}
ju1 = nm[j];
for( i = 1; i <= dim; i++ ) {
ip[i] = ic[dim*(j-1)+(i-1)]; //ip[i] = ic[j, i];
}
nc = 1;
lr[1] = j;
jk[j] = 1;
mb[j] = 0;
for( ; ; ) {
riv = rma;
// 4
for( k = 1; k <= ju1; k++ ) {
i = ip[k];
for( jd = 1; jd <= dim; jd++ ) {
if( jk[jd] == 1 ) {
continue;
}
riz = cost[dim*(i-1)+(jd-1)] - ma[i]; //riz = p[i, jd] - ma[i];
if( riz > riv ) {
continue;
}
riv = riz;
jc = jd;
ir = i;
}
}
// 5
for( jx = 1; jx <= nc; jx++ ) {
ilr = lr[jx];
mb[ilr] = mb[ilr] + riv;
}
for( k = 1; k <= ju1; k++ ) {
iip = ip[k];
ma[iip] = ma[iip] + riv;
}
mb[jc] = 0;
jk[jc] = 1;
nc = nc + 1;
lr[nc] = jc;
im[jc] = ir;
jm[ir] = jc;
jy = nm[jc];
if( jy != 0 ) {
for( jx = 1; jx <= jy; jx++ ) {
ju1 = ju1 + 1;
ip[ju1] = ic[dim*(jc-1)+(jx-1)]; // ip[ju1] = ic[jc, jx];
}
continue;
}
break;
}
for( jx = 1; jx <= nc; jx++ ) {
ls = lr[jx];
jk[ls] = 0;
for( i = 1; i <= dim; i++ ) {
cost[dim*(i-1)+(ls-1)] = cost[dim*(i-1)+(ls-1)] + mb[ls]; //p[i, ls] = p[i, ls] + mb[ls];
}
}
nm[jc] = 1;
ic[dim*(jc-1)+1-1] = ir; // ic[jc, 1] = ir;
for( ; ; ) {
jp = jr[ir];
jr[ir] = jc;
iw = 0;
jq = nm[jp];
for( il = 1; il <= jq; il++ ) {
iz = ic[dim*(jp-1)+(il-1)]; // iz = ic[jp, il];
if( iz != ir ) {
iw = iw + 1;
ic[dim*(jp-1)+(iw-1)] = ic[dim*(jp-1)+(il-1)];// ic[jp, iw] = ic[jp, il];
}
}
if( jq > 1 ) {
break;
}
ir = im[jp];
jc = jp;
ic[dim*(jp-1)+(jq-1)] = ir;//ic[jp, jq] = ir;
}
nm[jp] = jq - 1;
}
for( j = 1; j <= dim; j++ ) {
icj = ic[dim*(j-1)+1-1];// icj = ic[j, 1];
jv[icj] = j;
}
for( int i = 0; i < dim; i++ ) {
rowsol[i] = jv[i+1]-1;
}
// освобождаем память
delete[] cost;
delete[] ma;
delete[] mb;
delete[] ip;
delete[] im;
delete[] ic;
delete[] lr;
delete[] jr;
delete[] jm;
delete[] jk;
delete[] jv;
delete[] nm;
return;
}
}
|
//
// sqlite_orm.cpp
// sqlite_orm
//
// Created by Alex Kremer on 30/11/2011.
// Copyright (c) 2011 godexsoft. All rights reserved.
//
#include "sqlite_orm.h"
namespace sqlite {
namespace orm {
template<>
const std::string wrap_type(std::string v)
{
return v;
}
template<>
const std::string wrap_type(sql_date v)
{
return "DATETIME('" + v.to_string() + "')";
}
template<>
const std::string wrap_type(bool v)
{
return v?"1":"0";
}
template<>
const std::string wrap_type(long v)
{
return boost::lexical_cast<std::string>(v);
}
template<>
const std::string wrap_type(int v)
{
return boost::lexical_cast<std::string>(v);
}
template<>
const std::string wrap_type(sqlite3_int64 v)
{
return boost::lexical_cast<std::string>(v);
}
template<>
const std::string wrap_type(double v)
{
return boost::lexical_cast<std::string>(v);
}
}; // orm
}; // sqlite
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/api/socket/tcp_socket.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/api/api_resource_event_notifier.h"
#include "net/base/address_list.h"
#include "net/base/completion_callback.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/rand_callback.h"
#include "net/socket/tcp_client_socket.h"
#include "net/socket/tcp_server_socket.h"
#include "testing/gmock/include/gmock/gmock.h"
using testing::_;
using testing::DoAll;
using testing::Return;
using testing::SaveArg;
namespace extensions {
class MockTCPSocket : public net::TCPClientSocket {
public:
explicit MockTCPSocket(const net::AddressList& address_list)
: net::TCPClientSocket(address_list, NULL, net::NetLog::Source()) {
}
MOCK_METHOD3(Read, int(net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback));
MOCK_METHOD3(Write, int(net::IOBuffer* buf, int buf_len,
const net::CompletionCallback& callback));
MOCK_METHOD2(SetKeepAlive, bool(bool enable, int delay));
MOCK_METHOD1(SetNoDelay, bool(bool no_delay));
virtual bool IsConnected() const OVERRIDE {
return true;
}
private:
DISALLOW_COPY_AND_ASSIGN(MockTCPSocket);
};
class MockTCPServerSocket : public net::TCPServerSocket {
public:
explicit MockTCPServerSocket()
: net::TCPServerSocket(NULL, net::NetLog::Source()) {
}
MOCK_METHOD2(Listen, int(const net::IPEndPoint& address, int backlog));
MOCK_METHOD2(Accept, int(scoped_ptr<net::StreamSocket>* socket,
const net::CompletionCallback& callback));
private:
DISALLOW_COPY_AND_ASSIGN(MockTCPServerSocket);
};
class MockApiResourceEventNotifier : public ApiResourceEventNotifier {
public:
explicit MockApiResourceEventNotifier(const std::string& owner_extension_id)
: ApiResourceEventNotifier(NULL, NULL,
owner_extension_id,
0, GURL()) {}
MOCK_METHOD2(OnReadComplete, void(int result_code,
const std::string& message));
MOCK_METHOD1(OnWriteComplete, void(int result_code));
protected:
virtual ~MockApiResourceEventNotifier() {}
};
class CompleteHandler {
public:
CompleteHandler() {}
MOCK_METHOD1(OnComplete, void(int result_code));
MOCK_METHOD2(OnReadComplete, void(int result_code,
scoped_refptr<net::IOBuffer> io_buffer));
MOCK_METHOD2(OnAccept, void(int, net::TCPClientSocket*));
private:
DISALLOW_COPY_AND_ASSIGN(CompleteHandler);
};
const std::string FAKE_ID = "abcdefghijklmnopqrst";
TEST(SocketTest, TestTCPSocketRead) {
net::AddressList address_list;
MockTCPSocket* tcp_client_socket = new MockTCPSocket(address_list);
ApiResourceEventNotifier* notifier = new MockApiResourceEventNotifier(
FAKE_ID);
CompleteHandler handler;
scoped_ptr<TCPSocket> socket(TCPSocket::CreateSocketForTesting(
tcp_client_socket, FAKE_ID, notifier));
EXPECT_CALL(*tcp_client_socket, Read(_, _, _))
.Times(1);
EXPECT_CALL(handler, OnReadComplete(_, _))
.Times(1);
const int count = 512;
socket->Read(count, base::Bind(&CompleteHandler::OnReadComplete,
base::Unretained(&handler)));
}
TEST(SocketTest, TestTCPSocketWrite) {
net::AddressList address_list;
MockTCPSocket* tcp_client_socket = new MockTCPSocket(address_list);
ApiResourceEventNotifier* notifier = new MockApiResourceEventNotifier(
FAKE_ID);
CompleteHandler handler;
scoped_ptr<TCPSocket> socket(TCPSocket::CreateSocketForTesting(
tcp_client_socket, FAKE_ID, notifier));
net::CompletionCallback callback;
EXPECT_CALL(*tcp_client_socket, Write(_, _, _))
.Times(2)
.WillRepeatedly(testing::DoAll(SaveArg<2>(&callback),
Return(128)));
EXPECT_CALL(handler, OnComplete(_))
.Times(1);
scoped_refptr<net::IOBufferWithSize> io_buffer(
new net::IOBufferWithSize(256));
socket->Write(io_buffer.get(), io_buffer->size(),
base::Bind(&CompleteHandler::OnComplete, base::Unretained(&handler)));
}
TEST(SocketTest, TestTCPSocketBlockedWrite) {
net::AddressList address_list;
MockTCPSocket* tcp_client_socket = new MockTCPSocket(address_list);
MockApiResourceEventNotifier* notifier = new MockApiResourceEventNotifier(
FAKE_ID);
CompleteHandler handler;
scoped_ptr<TCPSocket> socket(TCPSocket::CreateSocketForTesting(
tcp_client_socket, FAKE_ID, notifier));
net::CompletionCallback callback;
EXPECT_CALL(*tcp_client_socket, Write(_, _, _))
.Times(2)
.WillRepeatedly(testing::DoAll(SaveArg<2>(&callback),
Return(net::ERR_IO_PENDING)));
scoped_refptr<net::IOBufferWithSize> io_buffer(new net::IOBufferWithSize(42));
socket->Write(io_buffer.get(), io_buffer->size(),
base::Bind(&CompleteHandler::OnComplete, base::Unretained(&handler)));
// Good. Original call came back unable to complete. Now pretend the socket
// finished, and confirm that we passed the error back.
EXPECT_CALL(handler, OnComplete(42))
.Times(1);
callback.Run(40);
callback.Run(2);
}
TEST(SocketTest, TestTCPSocketBlockedWriteReentry) {
net::AddressList address_list;
MockTCPSocket* tcp_client_socket = new MockTCPSocket(address_list);
MockApiResourceEventNotifier* notifier = new MockApiResourceEventNotifier(
FAKE_ID);
CompleteHandler handlers[5];
scoped_ptr<TCPSocket> socket(TCPSocket::CreateSocketForTesting(
tcp_client_socket, FAKE_ID, notifier));
net::CompletionCallback callback;
EXPECT_CALL(*tcp_client_socket, Write(_, _, _))
.Times(5)
.WillRepeatedly(testing::DoAll(SaveArg<2>(&callback),
Return(net::ERR_IO_PENDING)));
scoped_refptr<net::IOBufferWithSize> io_buffers[5];
int i;
for (i = 0; i < 5; i++) {
io_buffers[i] = new net::IOBufferWithSize(128 + i * 50);
scoped_refptr<net::IOBufferWithSize> io_buffer1(
new net::IOBufferWithSize(42));
socket->Write(io_buffers[i].get(), io_buffers[i]->size(),
base::Bind(&CompleteHandler::OnComplete,
base::Unretained(&handlers[i])));
EXPECT_CALL(handlers[i], OnComplete(io_buffers[i]->size()))
.Times(1);
}
for (i = 0; i < 5; i++) {
callback.Run(128 + i * 50);
}
}
TEST(SocketTest, TestTCPSocketSetNoDelay) {
net::AddressList address_list;
MockTCPSocket* tcp_client_socket = new MockTCPSocket(address_list);
MockApiResourceEventNotifier* notifier = new MockApiResourceEventNotifier(
FAKE_ID);
scoped_ptr<TCPSocket> socket(TCPSocket::CreateSocketForTesting(
tcp_client_socket, FAKE_ID, notifier));
bool no_delay = false;
EXPECT_CALL(*tcp_client_socket, SetNoDelay(_))
.WillOnce(testing::DoAll(SaveArg<0>(&no_delay), Return(true)));
int result = socket->SetNoDelay(true);
EXPECT_TRUE(result);
EXPECT_TRUE(no_delay);
EXPECT_CALL(*tcp_client_socket, SetNoDelay(_))
.WillOnce(testing::DoAll(SaveArg<0>(&no_delay), Return(false)));
result = socket->SetNoDelay(false);
EXPECT_FALSE(result);
EXPECT_FALSE(no_delay);
}
TEST(SocketTest, TestTCPSocketSetKeepAlive) {
net::AddressList address_list;
MockTCPSocket* tcp_client_socket = new MockTCPSocket(address_list);
MockApiResourceEventNotifier* notifier = new MockApiResourceEventNotifier(
FAKE_ID);
scoped_ptr<TCPSocket> socket(TCPSocket::CreateSocketForTesting(
tcp_client_socket, FAKE_ID, notifier));
bool enable = false;
int delay = 0;
EXPECT_CALL(*tcp_client_socket, SetKeepAlive(_, _))
.WillOnce(testing::DoAll(SaveArg<0>(&enable),
SaveArg<1>(&delay),
Return(true)));
int result = socket->SetKeepAlive(true, 4500);
EXPECT_TRUE(result);
EXPECT_TRUE(enable);
EXPECT_EQ(4500, delay);
EXPECT_CALL(*tcp_client_socket, SetKeepAlive(_, _))
.WillOnce(testing::DoAll(SaveArg<0>(&enable),
SaveArg<1>(&delay),
Return(false)));
result = socket->SetKeepAlive(false, 0);
EXPECT_FALSE(result);
EXPECT_FALSE(enable);
EXPECT_EQ(0, delay);
}
TEST(SocketTest, TestTCPServerSocketListenAccept) {
MockTCPServerSocket* tcp_server_socket = new MockTCPServerSocket();
CompleteHandler handler;
scoped_ptr<TCPSocket> socket(TCPSocket::CreateServerSocketForTesting(
tcp_server_socket, FAKE_ID));
EXPECT_CALL(*tcp_server_socket, Accept(_, _)).Times(1);
EXPECT_CALL(*tcp_server_socket, Listen(_, _)).Times(1);
EXPECT_CALL(handler, OnAccept(_, _));
std::string err_msg;
EXPECT_EQ(net::OK, socket->Listen("127.0.0.1", 9999, 10, &err_msg));
socket->Accept(base::Bind(&CompleteHandler::OnAccept,
base::Unretained(&handler)));
}
} // namespace extensions
|
#ifndef SELDON_FILE_FUNCTIONS_BASE_CXX
// in this file, we put functions such as Add, Mlt, MltAdd
// with a reduced number of templates in order
// to forbid undesired instantiations of generic functions
/*
Functions defined in this file:
M X -> Y
Mlt(M, X, Y)
alpha M X -> Y
Mlt(alpha, M, X, Y)
M X -> Y
M^T X -> Y
Mlt(Trans, M, X, Y)
*/
namespace Seldon
{
/**********************************
* Functions in Functions_MatVect *
**********************************/
template<class T0, class Prop0, class Storage0, class Allocator0>
void SolveLU(const Matrix<T0, Prop0, Storage0, Allocator0>& A,
const Vector<int>& pivot, Vector<complex<T0> >& x)
{
Vector<T0> xr(x.GetM()), xi(x.GetM());
for (int i = 0; i < x.GetM(); i++)
{
xr(i) = real(x(i));
xi(i) = imag(x(i));
}
SolveLuVector(A, pivot, xr);
SolveLuVector(A, pivot, xi);
for (int i = 0; i < x.GetM(); i++)
x(i) = complex<T0>(xr(i), xi(i));
}
template<class T0, class Storage0, class Allocator0>
void SolveLU(const SeldonTranspose& trans,
const Matrix<T0, General, Storage0, Allocator0>& A,
const Vector<int>& pivot, Vector<complex<T0> >& x)
{
Vector<T0> xr(x.GetM()), xi(x.GetM());
for (int i = 0; i < x.GetM(); i++)
{
xr(i) = real(x(i));
xi(i) = imag(x(i));
}
SolveLuVector(trans, A, pivot, xr);
SolveLuVector(trans, A, pivot, xi);
for (int i = 0; i < x.GetM(); i++)
x(i) = complex<T0>(xr(i), xi(i));
}
template<class T0, class Storage0, class Allocator0>
void SolveLU(const SeldonTranspose& trans,
const Matrix<T0, Symmetric, Storage0, Allocator0>& A,
const Vector<int>& pivot, Vector<complex<T0> >& x)
{
Vector<T0> xr(x.GetM()), xi(x.GetM());
for (int i = 0; i < x.GetM(); i++)
{
xr(i) = real(x(i));
xi(i) = imag(x(i));
}
SolveLuVector(A, pivot, xr);
SolveLuVector(A, pivot, xi);
for (int i = 0; i < x.GetM(); i++)
x(i) = complex<T0>(xr(i), xi(i));
}
}
#define SELDON_FILE_FUNCTIONS_BASE_CXX
#endif
|
/****************************************************************************
*
* Copyright 2018 Samsung Electronics 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 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 <memory>
#include <media/MediaPlayer.h>
#include <media/FileInputDataSource.h>
#include "tc_common.h"
static const char *dummyfilepath = "/mnt/fileinputdatasource.raw";
class EmptyObserver : public media::MediaPlayerObserverInterface
{
public:
void onPlaybackStarted(Id id) override;
void onPlaybackFinished(Id id) override;
void onPlaybackError(Id id) override;
void onPlaybackPaused(Id id) override;
};
void EmptyObserver::onPlaybackStarted(Id id)
{
}
void EmptyObserver::onPlaybackFinished(Id id)
{
}
void EmptyObserver::onPlaybackError(Id id)
{
}
void EmptyObserver::onPlaybackPaused(Id id)
{
}
static void SetUp(void)
{
FILE *fp = fopen(dummyfilepath, "w");
fputs("dummydata", fp);
fclose(fp);
}
static void TearDown()
{
remove(dummyfilepath);
}
static void utc_media_MediaPlayer_create_p(void)
{
media::MediaPlayer mp;
TC_ASSERT_EQ("utc_media_MediaPlayer_create", mp.create(), media::PLAYER_OK);
mp.destroy();
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_create_n(void)
{
media::MediaPlayer mp;
mp.create();
TC_ASSERT_EQ("utc_media_MediaPlayer_create", mp.create(), media::PLAYER_ERROR);
mp.destroy();
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_destroy_p(void)
{
media::MediaPlayer mp;
auto observer = std::make_shared<EmptyObserver>();
mp.create();
mp.setObserver(observer);
TC_ASSERT_EQ("utc_media_MediaPlayer_destroy", mp.destroy(), media::PLAYER_OK);
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_destroy_n(void)
{
/* destroy without create */
{
media::MediaPlayer mp;
TC_ASSERT_EQ("utc_media_MediaPlayer_destroy", mp.destroy(), media::PLAYER_ERROR);
}
/* destroy At invalid time */
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource(dummyfilepath)));
mp.create();
mp.setDataSource(std::move(source));
mp.prepare();
TC_ASSERT_EQ("utc_media_MediaPlayer_destroy", mp.destroy(), media::PLAYER_ERROR);
mp.unprepare();
mp.destroy();
}
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_setDataSource_p(void)
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource(dummyfilepath)));
source->setSampleRate(20000);
source->setChannels(2);
mp.create();
TC_ASSERT_EQ("utc_media_MediaPlayer_setDataSource", mp.setDataSource(std::move(source)), media::PLAYER_OK);
mp.destroy();
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_setDataSource_n(void)
{
/* setDataSource without create */
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource(dummyfilepath)));
source->setSampleRate(20000);
source->setChannels(2);
TC_ASSERT_EQ("setDataSource", mp.setDataSource(std::move(source)), media::PLAYER_ERROR);
}
/* setDataSource with nullptr */
{
media::MediaPlayer mp;
mp.create();
TC_ASSERT_EQ("utc_media_MediaPlayer_setDataSource", mp.setDataSource(nullptr), media::PLAYER_ERROR);
mp.destroy();
}
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_setObserver_p(void)
{
media::MediaPlayer mp;
auto observer = std::make_shared<EmptyObserver>();
mp.create();
TC_ASSERT_EQ("utc_media_MediaPlayer_setObserver", mp.setObserver(observer), media::PLAYER_OK);
mp.destroy();
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_setObserver_n(void)
{
media::MediaPlayer mp;
TC_ASSERT_EQ("utc_media_MediaPlayer_setObserver", mp.setObserver(nullptr), media::PLAYER_ERROR);
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_prepare_p(void)
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource(dummyfilepath)));
mp.create();
mp.setDataSource(std::move(source));
TC_ASSERT_EQ("utc_media_MediaPlayer_prepare", mp.prepare(), media::PLAYER_OK);
mp.unprepare();
mp.destroy();
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_prepare_n(void)
{
/* prepare without create */
{
media::MediaPlayer mp;
TC_ASSERT_EQ("utc_media_MediaPlayer_prepare", mp.prepare(), media::PLAYER_ERROR);
}
/* prepare twice */
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource(dummyfilepath)));
mp.create();
mp.setDataSource(std::move(source));
mp.prepare();
TC_ASSERT_EQ("utc_media_MediaPlayer_prepare", mp.prepare(), media::PLAYER_ERROR);
mp.unprepare();
mp.destroy();
}
/* prepare without setting datasource */
{
media::MediaPlayer mp;
mp.create();
TC_ASSERT_EQ("utc_media_MediaPlayer_prepare", mp.prepare(), media::PLAYER_ERROR);
mp.destroy();
}
/* prepare with invalid datasource */
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource("non-exist-file")));
mp.create();
mp.setDataSource(std::move(source));
TC_ASSERT_EQ("utc_media_MediaPlayer_prepare", mp.prepare(), media::PLAYER_ERROR);
mp.destroy();
}
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_unprepare_p(void)
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource(dummyfilepath)));
mp.create();
mp.setDataSource(std::move(source));
mp.prepare();
TC_ASSERT_EQ("utc_media_MediaPlayer_unprepare", mp.unprepare(), media::PLAYER_OK);
mp.destroy();
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_unprepare_n(void)
{
/* unprepare without create */
{
media::MediaPlayer mp;
TC_ASSERT_EQ("utc_media_MediaPlayer_unprepare", mp.unprepare(), media::PLAYER_ERROR);
}
/* unprepare twice */
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource(dummyfilepath)));
mp.create();
mp.setDataSource(std::move(source));
mp.unprepare();
TC_ASSERT_EQ("utc_media_MediaPlayer_unprepare", mp.unprepare(), media::PLAYER_ERROR);
mp.unprepare();
mp.destroy();
}
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_start_p(void)
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource(dummyfilepath)));
mp.create();
mp.setDataSource(std::move(source));
mp.prepare();
TC_ASSERT_EQ("utc_media_MediaPlayer_start", mp.start(), media::PLAYER_OK);
mp.unprepare();
mp.destroy();
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_start_n(void)
{
media::MediaPlayer mp;
TC_ASSERT_EQ("utc_media_MediaPlayer_start", mp.start(), media::PLAYER_ERROR);
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_pause_p(void)
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource(dummyfilepath)));
mp.create();
mp.setDataSource(std::move(source));
mp.prepare();
mp.start();
TC_ASSERT_EQ("utc_media_MediaPlayer_pause", mp.pause(), media::PLAYER_OK);
mp.unprepare();
mp.destroy();
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_pause_n(void)
{
media::MediaPlayer mp;
TC_ASSERT_EQ("utc_media_MediaPlayer_pause", mp.pause(), media::PLAYER_ERROR);
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_stop_p(void)
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource(dummyfilepath)));
mp.create();
mp.setDataSource(std::move(source));
mp.prepare();
mp.start();
TC_ASSERT_EQ("utc_media_MediaPlayer_stop", mp.stop(), media::PLAYER_OK);
mp.unprepare();
mp.destroy();
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_stop_n(void)
{
media::MediaPlayer mp;
TC_ASSERT_EQ("utc_media_MediaPlayer_stop", mp.stop(), media::PLAYER_ERROR);
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_getVolume_p(void)
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource(dummyfilepath)));
mp.create();
mp.setDataSource(std::move(source));
mp.prepare();
TC_ASSERT_GEQ("utc_media_MediaPlayer_getVolume", mp.getVolume(), 0);
mp.unprepare();
mp.destroy();
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_getVolume_n(void)
{
media::MediaPlayer mp;
TC_ASSERT_LT("utc_media_MediaPlayer_getVolume", mp.getVolume(), 0);
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_setVolume_p(void)
{
media::MediaPlayer mp;
std::unique_ptr<media::stream::FileInputDataSource> source = std::move(std::unique_ptr<media::stream::FileInputDataSource>(new media::stream::FileInputDataSource(dummyfilepath)));
mp.create();
mp.setDataSource(std::move(source));
mp.prepare();
auto ret = mp.setVolume(0);
TC_ASSERT_EQ("utc_media_MediaPlayer_setVolume", ret, media::PLAYER_OK);
TC_ASSERT_EQ("utc_media_MediaPlayer_setVolume", mp.getVolume(), 0);
mp.unprepare();
mp.destroy();
TC_SUCCESS_RESULT();
}
static void utc_media_MediaPlayer_setVolume_n(void)
{
media::MediaPlayer mp;
TC_ASSERT_EQ("utc_media_MediaPlayer_setVolume", mp.setVolume(0), media::PLAYER_ERROR);
TC_SUCCESS_RESULT();
}
int utc_media_MediaPlayer_main(void)
{
SetUp();
utc_media_MediaPlayer_create_p();
utc_media_MediaPlayer_create_n();
utc_media_MediaPlayer_destroy_p();
utc_media_MediaPlayer_destroy_n();
utc_media_MediaPlayer_setDataSource_p();
utc_media_MediaPlayer_setDataSource_n();
utc_media_MediaPlayer_setObserver_p();
utc_media_MediaPlayer_setObserver_n();
utc_media_MediaPlayer_prepare_p();
utc_media_MediaPlayer_prepare_n();
utc_media_MediaPlayer_unprepare_p();
utc_media_MediaPlayer_unprepare_n();
utc_media_MediaPlayer_start_p();
utc_media_MediaPlayer_start_n();
utc_media_MediaPlayer_pause_p();
utc_media_MediaPlayer_pause_n();
utc_media_MediaPlayer_stop_p();
utc_media_MediaPlayer_stop_n();
utc_media_MediaPlayer_getVolume_p();
utc_media_MediaPlayer_getVolume_n();
utc_media_MediaPlayer_setVolume_p();
utc_media_MediaPlayer_setVolume_n();
TearDown();
return 0;
}
|
WHEN("^the operator applies (.*) to the accelerator for (\\d+) ms$")
{
REGEX_PARAM(int, throttle_sensor_val);
REGEX_PARAM(int, duration);
g_mock_arduino_analog_read_return[0] = throttle_sensor_val;
g_mock_arduino_analog_read_return[1] = throttle_sensor_val;
g_mock_arduino_millis_return = 1;
check_for_faults();
g_mock_arduino_millis_return += duration;
check_for_faults();
}
|
#include <iostream>
#include <limits>
#include "CodeGen_HLS_Base.h"
#include "CodeGen_Internal.h"
#include "Substitute.h"
#include "IROperator.h"
#include "Param.h"
#include "Var.h"
#include "Lerp.h"
#include "Simplify.h"
namespace Halide {
namespace Internal {
using std::ostream;
using std::endl;
using std::string;
using std::vector;
using std::ostringstream;
using std::to_string;
string CodeGen_HLS_Base::print_stencil_type(Stencil_Type stencil_type) {
ostringstream oss;
// C: Stencil<uint16_t, 1, 1, 1> stencil_var;
// C: hls::stream<Stencil<uint16_t, 1, 1, 1> > stencil_stream_var;
switch(stencil_type.type) {
case Stencil_Type::StencilContainerType::Stencil :
oss << "Stencil<" << print_type(stencil_type.elemType);
for(const auto &range : stencil_type.bounds) {
internal_assert(is_one(simplify(range.min == 0)));
oss << ", " << range.extent;
}
oss << ">";
break;
case Stencil_Type::StencilContainerType::Stream :
oss << "hls::stream<PackedStencil<";
oss << print_type(stencil_type.elemType);
for(const auto &range : stencil_type.bounds) {
internal_assert(is_one(simplify(range.min == 0)));
oss << ", " << range.extent;
}
oss << "> >";
break;
case Stencil_Type::StencilContainerType::AxiStream :
oss << "hls::stream<AxiPackedStencil<";
oss << print_type(stencil_type.elemType);
for(const auto &range : stencil_type.bounds) {
internal_assert(is_one(simplify(range.min == 0)));
oss << ", " << range.extent;
}
oss << "> >";
break;
default: internal_error;
}
return oss.str();
}
string CodeGen_HLS_Base::print_name(const string &name) {
ostringstream oss;
// Prefix an underscore to avoid reserved words (e.g. a variable named "while")
if (isalpha(name[0])) {
oss << '_';
}
for (size_t i = 0; i < name.size(); i++) {
// vivado HLS compiler doesn't like '__'
if (!isalnum(name[i])) {
oss << "_";
}
else oss << name[i];
}
return oss.str();
}
string CodeGen_HLS_Base::print_stencil_pragma(const string &name) {
// nothing is printed by default
return string();
}
void CodeGen_HLS_Base::visit(const Call *op) {
if (op->name == "linebuffer") {
//IR: linebuffer(buffered.stencil_update.stream, buffered.stencil.stream, extent_0[, extent_1, ...])
//C: linebuffer<extent_0[, extent_1, ...]>(buffered.stencil_update.stream, buffered.stencil.stream)
internal_assert(op->args.size() >= 3);
string a0 = print_expr(op->args[0]);
string a1 = print_expr(op->args[1]);
do_indent();
stream << "linebuffer<";
for(size_t i = 2; i < op->args.size(); i++) {
stream << print_expr(op->args[i]);
if (i != op->args.size() -1)
stream << ", ";
}
stream << ">(" << a0 << ", " << a1 << ");\n";
id = "0"; // skip evaluation
} else if (op->name == "write_stream") {
if (op->args.size() == 2) {
// normal case
// IR: write_stream(buffered.stencil_update.stream, buffered.stencil_update)
// C: buffered_stencil_update_stream.write(buffered_stencil_update);
string a0 = print_expr(op->args[0]);
string a1 = print_expr(op->args[1]);
do_indent();
stream << a0 << ".write(" << a1 << ");\n";
id = "0"; // skip evaluation
} else {
// write stream call for the dag output kernel
// IR: write_stream(output.stencil.stream, output.stencil, loop_var_1, loop_max_1, ...)
// C: AxiPackedStencil<uint8_t, 1, 1, 1> _output_stencil_packed = _output_stencil;
// if (_loop_var_1 == loop_max_1 && ...)
// _output_stencil_packed.last = 1;
// else
// _output_stencil_packed.last = 0;
// _output_stencil_stream.write(_output_stencil_packed);
internal_assert(op->args.size() > 2 && op->args.size() % 2 == 0);
const Variable *stream_var = op->args[0].as<Variable>();
const Variable *stencil_var = op->args[1].as<Variable>();
internal_assert(stream_var && stencil_var);
string stream_name = stream_var->name;
string stencil_name = stencil_var->name;
string packed_stencil_name = stencil_name + "_packed";
internal_assert(stencils.contains(stencil_name));
Stencil_Type stencil_type = stencils.get(stencil_name);
internal_assert(stencil_type.type == Stencil_Type::StencilContainerType::Stencil);
// emit code declaring the packed stencil
do_indent();
stream << "AxiPacked" << print_stencil_type(stencil_type) << " "
<< print_name(packed_stencil_name) << " = "
<< print_name(stencil_name) << ";\n";
// emit code asserting TLAST
vector<string> loop_vars, loop_maxes;
for (size_t i = 2; i < op->args.size(); i += 2) {
loop_vars.push_back(print_expr(op->args[i]));
loop_maxes.push_back(print_expr(op->args[i+1]));
}
do_indent();
stream << "if (";
for (size_t i = 0; i < loop_vars.size(); i++) {
stream << loop_vars[i] << " == " << loop_maxes[i];
if (i < loop_vars.size() - 1)
stream << " && ";
}
stream << ") {\n";
do_indent();
stream << ' ' << print_name(packed_stencil_name) << ".last = 1;\n";
do_indent();
stream << "} else {\n";
do_indent();
stream << ' ' << print_name(packed_stencil_name) << ".last = 0;\n";
do_indent();
stream << "}\n";
// emit code writing stream
do_indent();
stream << print_name(stream_name) << ".write("
<< print_name(packed_stencil_name) << ");\n";
id = "0"; // skip evaluation
}
} else if (op->name == "read_stream") {
internal_assert(op->args.size() == 2 || op->args.size() == 3);
string a1 = print_expr(op->args[1]);
const Variable *stream_name_var = op->args[0].as<Variable>();
internal_assert(stream_name_var);
string stream_name = stream_name_var->name;
if (op->args.size() == 3) {
// stream name is maggled with the consumer name
const StringImm *consumer_imm = op->args[2].as<StringImm>();
internal_assert(consumer_imm);
stream_name += ".to." + consumer_imm->value;
}
do_indent();
stream << a1 << " = " << print_name(stream_name) << ".read();\n";
id = "0"; // skip evaluation
} else if (ends_with(op->name, ".stencil") ||
ends_with(op->name, ".stencil_update")) {
ostringstream rhs;
// IR: out.stencil_update(0, 0, 0)
// C: out_stencil_update(0, 0, 0)
vector<string> args_indices(op->args.size());
for(size_t i = 0; i < op->args.size(); i++)
args_indices[i] = print_expr(op->args[i]);
rhs << print_name(op->name) << "(";
for(size_t i = 0; i < op->args.size(); i++) {
rhs << args_indices[i];
if (i != op->args.size() - 1)
rhs << ", ";
}
rhs << ")";
print_assignment(op->type, rhs.str());
} else if (op->name == "dispatch_stream") {
// emits the calling arguments in comment
vector<string> args(op->args.size());
for(size_t i = 0; i < op->args.size(); i++)
args[i] = print_expr(op->args[i]);
do_indent();
stream << "// dispatch_stream(";
for(size_t i = 0; i < args.size(); i++) {
stream << args[i];
if (i != args.size() - 1)
stream << ", ";
}
stream << ");\n";
// syntax:
// dispatch_stream(stream_name, num_of_dimensions,
// stencil_size_dim_0, stencil_step_dim_0, store_extent_dim_0,
// [stencil_size_dim_1, stencil_step_dim_1, store_extent_dim_1, ...]
// num_of_consumers,
// consumer_0_name, fifo_0_depth,
// consumer_0_offset_dim_0, consumer_0_extent_dim_0,
// [consumer_0_offset_dim_1, consumer_0_extent_dim_1, ...]
// [consumer_1_name, ...])
// recover the structed data from op->args
internal_assert(op->args.size() >= 2);
const Variable *stream_name_var = op->args[0].as<Variable>();
internal_assert(stream_name_var);
string stream_name = stream_name_var->name;
size_t num_of_demensions = *as_const_int(op->args[1]);
vector<int> stencil_sizes(num_of_demensions);
vector<int> stencil_steps(num_of_demensions);
vector<int> store_extents(num_of_demensions);
internal_assert(op->args.size() >= num_of_demensions*3 + 2);
for (size_t i = 0; i < num_of_demensions; i++) {
stencil_sizes[i] = *as_const_int(op->args[i*3 + 2]);
stencil_steps[i] = *as_const_int(op->args[i*3 + 3]);
store_extents[i] = *as_const_int(op->args[i*3 + 4]);
}
internal_assert(op->args.size() >= num_of_demensions*3 + 3);
size_t num_of_consumers = *as_const_int(op->args[num_of_demensions*3 + 2]);
vector<string> consumer_names(num_of_consumers);
vector<int> consumer_fifo_depth(num_of_consumers);
vector<vector<int> > consumer_offsets(num_of_consumers);
vector<vector<int> > consumer_extents(num_of_consumers);
internal_assert(op->args.size() >= num_of_demensions*3 + 3 + num_of_consumers*(2 + 2*num_of_demensions));
for (size_t i = 0; i < num_of_consumers; i++) {
const StringImm *string_imm = op->args[num_of_demensions*3 + 3 + (2 + 2*num_of_demensions)*i].as<StringImm>();
internal_assert(string_imm);
consumer_names[i] = string_imm->value;
const IntImm *int_imm = op->args[num_of_demensions*3 + 4 + (2 + 2*num_of_demensions)*i].as<IntImm>();
internal_assert(int_imm);
consumer_fifo_depth[i] = int_imm->value;
vector<int> offsets(num_of_demensions);
vector<int > extents(num_of_demensions);
for (size_t j = 0; j < num_of_demensions; j++) {
offsets[j] = *as_const_int(op->args[num_of_demensions*3 + 5 + (2 + 2*num_of_demensions)*i + 2*j]);
extents[j] = *as_const_int(op->args[num_of_demensions*3 + 6 + (2 + 2*num_of_demensions)*i + 2*j]);
}
consumer_offsets[i] = offsets;
consumer_extents[i] = extents;
}
// emits declarations of streams for each consumer
internal_assert(stencils.contains(stream_name));
Stencil_Type stream_type = stencils.get(stream_name);
// Optimization. if there is only one consumer and its fifo depth is zero
// , use C++ reference for the consumer stream
if (num_of_consumers == 1 && consumer_fifo_depth[0] == 0) {
string consumer_stream_name = stream_name + ".to." + consumer_names[0];
do_indent();
stream << print_stencil_type(stream_type) << " &"
<< print_name(consumer_stream_name) << " = "
<< print_name(stream_name) << ";\n";
id = "0"; // skip evaluation
return;
}
for (size_t i = 0; i < num_of_consumers; i++) {
string consumer_stream_name = stream_name + ".to." + consumer_names[i];
Stencil_Type consumer_stream_type = stream_type;
consumer_stream_type.depth = std::max(consumer_fifo_depth[i], 1); // HLS tool doesn't support zero-depth FIFO yet
do_indent();
stream << print_stencil_type(consumer_stream_type) << ' '
<< print_name(consumer_stream_name) << ";\n";
// pragma
stencils.push(consumer_stream_name, consumer_stream_type);
stream << print_stencil_pragma(consumer_stream_name);
stencils.pop(consumer_stream_name);
}
// emits for a loop for each dimensions (larger dimension number, outer the loop)
for (int i = num_of_demensions - 1; i >= 0; i--) {
string dim_name = "_dim_" + to_string(i);
do_indent();
// HLS C: for(int dim = 0; dim <= store_extent - stencil.size; dim += stencil.step)
stream << "for (int " << dim_name <<" = 0; "
<< dim_name << " <= " << store_extents[i] - stencil_sizes[i] << "; "
<< dim_name << " += " << stencil_steps[i] << ")\n";
}
open_scope();
// pragma
stream << "#pragma HLS PIPELINE\n";
// read stencil from stream
Stencil_Type stencil_type = stream_type;
stencil_type.type = Stencil_Type::StencilContainerType::Stencil;
string stencil_name = "tmp_stencil";
do_indent();
stream << "Packed" << print_stencil_type(stencil_type) << ' '
<< print_name(stencil_name) << " = "
<< print_name(stream_name) << ".read();\n";
// dispatch the stencil to each consumer stream
for (size_t i = 0; i < num_of_consumers; i++) {
string consumer_stream_name = stream_name + ".to." + consumer_names[i];
// emits the predicate for dispatching stencils
// HLS C: if(dim_0 >= consumer_offset_0 && dim_0 <= consumer_offset_0 + consumer_extent_0 - stencil_size_0
// [&& dim_1 >= consumer_offset_1 && dim_1 <= consumer_offset_1 + consumer_extent_1 - stencil_size_1...])
do_indent();
stream << "if (";
for (size_t j = 0; j < num_of_demensions; j++) {
string dim_name = "_dim_" + to_string(j);
stream << dim_name << " >= " << consumer_offsets[i][j] << " && "
<< dim_name << " <= " << consumer_offsets[i][j] + consumer_extents[i][j] - stencil_sizes[j];
if (j != num_of_demensions - 1)
stream << " && ";
}
stream << ")\n";
// emits the write call in the if body
open_scope();
do_indent();
stream << print_name(consumer_stream_name) << ".write("
<< print_name(stencil_name) << ");\n";
close_scope("");
}
close_scope("");
id = "0"; // skip evaluation
} else {
CodeGen_C::visit(op);
}
}
void CodeGen_HLS_Base::visit(const Realize *op) {
if (ends_with(op->name, ".stream")) {
// create a stream type
internal_assert(op->types.size() == 1);
allocations.push(op->name, {op->types[0], "null"});
Stencil_Type stream_type({Stencil_Type::StencilContainerType::Stream,
op->types[0], op->bounds, 1});
stencils.push(op->name, stream_type);
// emits the declaration for the stream
do_indent();
stream << print_stencil_type(stream_type) << ' ' << print_name(op->name) << ";\n";
stream << print_stencil_pragma(op->name);
// traverse down
op->body.accept(this);
// We didn't generate free stmt inside for stream type
allocations.pop(op->name);
stencils.pop(op->name);
} else if (ends_with(op->name, ".stencil") ||
ends_with(op->name, ".stencil_update")) {
// create a stencil type
internal_assert(op->types.size() == 1);
allocations.push(op->name, {op->types[0], "null"});
Stencil_Type stype({Stencil_Type::StencilContainerType::Stencil, op->types[0], op->bounds, 1});
stencils.push(op->name, stype);
do_indent();
// Stencil<uint16_t, 1, 1, 1> conv1_stencil_update;
stream << print_stencil_type(stype) << ' ' << print_name(op->name) << ";\n";
stream << print_stencil_pragma(op->name);
// INIT
stream << print_name(op->name) << "(0";
for (const auto &range : op->bounds) {
stream << ", " << range.min;
}
stream << ") = 0;\n";
op->body.accept(this);
// We didn't generate free stmt inside for stream type
allocations.pop(op->name);
stencils.pop(op->name);
} else {
CodeGen_C::visit(op);
}
}
void CodeGen_HLS_Base::visit(const Provide *op) {
if (ends_with(op->name, ".stencil") ||
ends_with(op->name, ".stencil_update")) {
// IR: buffered.stencil_update(1, 2, 3) =
// C: buffered_stencil_update(1, 2, 3) =
vector<string> args_indices(op->args.size());
for(size_t i = 0; i < op->args.size(); i++)
args_indices[i] = print_expr(op->args[i]);
internal_assert(op->values.size() == 1);
string id_value = print_expr(op->values[0]);
do_indent();
stream << print_name(op->name) << "(";
for(size_t i = 0; i < op->args.size(); i++) {
stream << args_indices[i];
if (i != op->args.size() - 1)
stream << ", ";
}
stream << ") = " << id_value << ";\n";
cache.clear();
} else {
CodeGen_C::visit(op);
}
}
}
}
|
//-----------------------------------------------------------------------------
// |
// Softing Industrial Automation GmbH |
// Richard-Reitzner-Allee 6 |
// 85540 Haar, Germany |
// |
// This is a part of the Softing OPC Toolkit |
// Copyright (c) 2005-2020 Softing Industrial Automation GmbH |
// All Rights Reserved |
// |
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// OPC Toolkit - Demo |
// |
// Filename : SODmCObjectView.cpp |
// Version : 4.47.1 |
// Date : 27-July-2020 |
// |
// Description : classes of the top left splitter window (object view) |
// and all toolkit objects |
// - SODmCObjectView: object view class |
// |
// This code and information is provided "as is" without warranty of |
// any kind, either expressed or implied, including but not limited |
// to the implied warranties of merchantability and/or fitness for a |
// particular purpose. |
// |
//-----------------------------------------------------------------------------
#include "stdafx.h"
#include "resource.h"
#include "SOClient.h"
#include "SODmCMainView.h"
#include "SODmCObjectView.h"
#include "SODmCPropFrm.h"
#include "SODmCMainFrm.h"
#include "SODaCServer.h"
#include "SODmCGroup.h"
#include "SODmCItem.h"
#include "SODmCServerAE.h"
#include "SODmCServerDA.h"
#include "SODmCSubscription.h"
#include "SODmCEvent.h"
#include ".\sodmcobjectview.h"
//-----------------------------------------------------------------------------
// Global SODmCObjectView access function |
//-----------------------------------------------------------------------------
static SODmCObjectView* s_objectView = NULL;
//-----------------------------------------------------------------------------
// getObjectView
//
// - get object view object
//
// returns:
// object view object
//
SODmCObjectView* getObjectView()
{
return s_objectView;
} // getObjectView
//-----------------------------------------------------------------------------
// SODmCObjectView |
//-----------------------------------------------------------------------------
IMPLEMENT_DYNCREATE(SODmCObjectView, CTreeView)
BEGIN_MESSAGE_MAP(SODmCObjectView, CTreeView)
ON_WM_TIMER()
ON_NOTIFY_REFLECT(TVN_SELCHANGED, OnSC)
ON_NOTIFY_REFLECT(TVN_DELETEITEM, OnDI)
ON_NOTIFY_REFLECT(TVN_BEGINLABELEDIT, OnBLE)
ON_NOTIFY_REFLECT(TVN_ENDLABELEDIT, OnELE)
ON_WM_RBUTTONDOWN()
ON_WM_DESTROY()
ON_COMMAND(ID_DELETEOBJECT, onDelete)
ON_UPDATE_COMMAND_UI(ID_DELETEOBJECT, onUpdDelete)
ON_COMMAND(ID_EDIT_ADDGROUP, onAddGroup)
ON_UPDATE_COMMAND_UI(ID_EDIT_ADDGROUP, onUpdAddGroup)
ON_COMMAND(ID_EDIT_ADDSUBSCRIPTION, onAddSubscription)
ON_UPDATE_COMMAND_UI(ID_EDIT_ADDSUBSCRIPTION, onUpdAddSubscription)
ON_COMMAND(ID_EDIT_ADDITEM, onAddItem)
ON_UPDATE_COMMAND_UI(ID_EDIT_ADDITEM, onUpdAddItem)
ON_COMMAND(ID_EDIT_PROPERTIES, onProperties)
ON_UPDATE_COMMAND_UI(ID_EDIT_PROPERTIES, onUpdProperties)
ON_COMMAND(ID_START_FLAT, onStartObjFlat)
ON_COMMAND(ID_START_DEEP, onStartObjDeep)
ON_COMMAND(ID_CONNECT_FLAT, onConnectObjFlat)
ON_COMMAND(ID_CONNECT_DEEP, onConnectObjDeep)
ON_COMMAND(ID_STOP, onStopObj)
ON_UPDATE_COMMAND_UI(ID_START_FLAT, onUpdStartObjFlat)
ON_UPDATE_COMMAND_UI(ID_START_DEEP, onUpdStartObjDeep)
ON_UPDATE_COMMAND_UI(ID_CONNECT_FLAT, onUpdConnectObjFlat)
ON_UPDATE_COMMAND_UI(ID_CONNECT_DEEP, onUpdConnectObjDeep)
ON_UPDATE_COMMAND_UI(ID_STOP, onUpdStopObj)
ON_COMMAND(ID_GROUP_REFRESH, onRefreshGroup)
ON_UPDATE_COMMAND_UI(ID_GROUP_REFRESH, onUpdRefreshGroup)
ON_COMMAND(ID_ITEM_READ, onReadItem)
ON_UPDATE_COMMAND_UI(ID_ITEM_READ, onUpdReadItem)
ON_COMMAND(ID_WRITEFROMFILE, onWriteFromFile)
ON_UPDATE_COMMAND_UI(ID_WRITEFROMFILE, onUpdWriteFromFile)
ON_COMMAND(ID_READTOFILE, onReadToFile)
ON_UPDATE_COMMAND_UI(ID_READTOFILE, onUpdReadToFile)
ON_UPDATE_COMMAND_UI(ID_LOGTOFILE, OnUpdLogtofile)
ON_COMMAND(ID_LOGTOFILE, OnLogtofile)
END_MESSAGE_MAP()
SODmCObjectView::SODmCObjectView()
{
s_objectView = this;
m_images.Create(IDB_OBJECT_IMAGE, 16, 0, RGB(255, 0, 255));
m_firstInit = TRUE;
m_hDA = 0;
m_hAE = 0;
m_workingList.create(SOCMNLIST_TYPE_ORG_LIST | SOCMNLIST_TYPE_OBJ_OBJECT | SOCMNLIST_TYPE_KEY_NO | SOCMNLIST_TYPE_SYNCED);
}
//-----------------------------------------------------------------------------
// OnDestroy
//
// - clear item list if list view is destroyed
//
afx_msg void SODmCObjectView::OnDestroy(void)
{
KillTimer(m_timer);
GetTreeCtrl().DeleteAllItems();
s_objectView = NULL;
m_workingList.destroy();
} // OnDestroy
//-----------------------------------------------------------------------------
// OnInitialUpdate
//
// - set tree control image list
//
void SODmCObjectView::OnInitialUpdate(void)
{
CTreeView::OnInitialUpdate();
if (m_firstInit)
{
m_firstInit = FALSE;
GetTreeCtrl().SetImageList(&m_images, TVSIL_NORMAL);
m_timer = SetTimer(1, 130, 0);
}
} // OnInitialUpdate
//-----------------------------------------------------------------------------
// PreCreateWindow
//
// - initialize tree control
//
// returns:
// result of base class
//
BOOL SODmCObjectView::PreCreateWindow(
IN CREATESTRUCT& cs) // creation data
{
cs.style &= ~(TVS_DISABLEDRAGDROP);
cs.style |= (TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS | TVS_SHOWSELALWAYS | TVS_EDITLABELS);
return CTreeView::PreCreateWindow(cs);
} // PreCreateWindow
//-----------------------------------------------------------------------------
// getTreeHandleDA
//
// - get the tree handle of the root of the DA object tree
//
// returns:
// tree handle
//
HTREEITEM SODmCObjectView::getTreeHandleDA(void)
{
if (m_hDA == 0)
{
m_hDA = SODmCTreeInsert(&GetTreeCtrl(), TVI_ROOT, _T("Data Access"), TRUE, NULL, SODMCOBJECTVIEW_IMG_SPEC_DA, SODMCOBJECTVIEW_IMG_SPEC_DA, TVI_LAST);
}
return m_hDA;
} // getTreeHandleDA
//-----------------------------------------------------------------------------
// deleteDATree
//
// - delete the root of the DA object tree
//
void SODmCObjectView::deleteDATree(void)
{
if (m_hDA != 0)
{
GetTreeCtrl().DeleteItem(m_hDA);
}
m_hDA = 0;
} // deleteDATree
//-----------------------------------------------------------------------------
// getTreeHandleAE
//
// - get the tree handle of the root of the DA object tree
//
// returns:
// tree handle
//
HTREEITEM SODmCObjectView::getTreeHandleAE(void)
{
if (m_hAE == 0)
{
m_hAE = SODmCTreeInsert(&GetTreeCtrl(), TVI_ROOT, _T("Alarms and Events"), TRUE, NULL, SODMCOBJECTVIEW_IMG_SPEC_AE, SODMCOBJECTVIEW_IMG_SPEC_AE, TVI_LAST);
}
return m_hAE;
} // getTreeHandleAE
//-----------------------------------------------------------------------------
// deleteAETree
//
// - delete the root of the DA object tree
//
void SODmCObjectView::deleteAETree(void)
{
if (m_hAE != 0)
{
GetTreeCtrl().DeleteItem(m_hAE);
}
m_hAE = 0;
} // deleteAETree
void SODmCObjectView::OnTimer(UINT nIDEvent)
{
static int curImg = 0;
SOCmnList<SOCltElement> workingList(m_workingList);
SOCmnListPosition pos;
SOCltElement* pEl;
HTREEITEM hTree;
int baseImg;
BYTE objState, targetObjectState;
pos = workingList.getStartPosition();
while (pos)
{
pEl = workingList.getNext(pos);
objState = pEl->getObjectState();
targetObjectState = pEl->getTargetObjectState();
if (objState != targetObjectState)
{
if (((objState == SOCltElement::disconnected) && (targetObjectState == SOCltElement::started)) ||
((objState == SOCltElement::started) && (targetObjectState == SOCltElement::disconnected)))
{
baseImg = SODMCOBJECTVIEW_IMG_WORK_R_G;
}
else if (((objState == SOCltElement::disconnected) && (targetObjectState == SOCltElement::connected)) ||
((objState == SOCltElement::connected) && (targetObjectState == SOCltElement::disconnected)))
{
baseImg = SODMCOBJECTVIEW_IMG_WORK_R_Y;
}
else
{
baseImg = SODMCOBJECTVIEW_IMG_WORK_Y_G;
}
switch (pEl->getObjectType())
{
#ifdef SODMC_DA
case SOCMNOBJECT_TYPE_SERVER_DA:
{
SODmCCmnServerDA* pCmnSrv = NULL;
#ifdef SODMC_DCOM
if (((SODaCServer*)pEl)->getProtocol() == SOCLT_PROTOCOL_DCOM)
{
pCmnSrv = (SODmCCmnServerDA*)(SODmCComServerDA*)pEl;
}
#endif
#ifdef SODMC_SOAP
if (((SODaCServer*)pEl)->getProtocol() == SOCLT_PROTOCOL_SOAP)
{
pCmnSrv = (SODmCCmnServerDA*)(SODmCXmlServerDA*)pEl;
}
#endif
#ifdef SOFEATURE_TUNNEL
if (((SODaCServer*)pEl)->getProtocol() == SOCLT_PROTOCOL_TUNNEL)
{
pCmnSrv = (SODmCCmnServerDA*)(SODmCTPServerDA*)pEl;
}
#endif
hTree = pCmnSrv->getTreeHandle();
}
break;
case SOCMNOBJECT_TYPE_GROUP:
#ifdef SODMC_DCOM
if (((SODaCGroup*)pEl)->getProtocol() == SOCLT_PROTOCOL_DCOM)
{
hTree = ((SODmCComGroup*)pEl)->getTreeHandle();
}
#endif
#ifdef SODMC_SOAP
if (((SODaCGroup*)pEl)->getProtocol() == SOCLT_PROTOCOL_SOAP)
{
hTree = ((SODmCXmlGroup*)pEl)->getTreeHandle();
}
#endif
#ifdef SOFEATURE_TUNNEL
if (((SODaCGroup*)pEl)->getProtocol() == SOCLT_PROTOCOL_TUNNEL)
{
hTree = ((SODmCTPGroup*)pEl)->getTreeHandle();
}
#endif
break;
#endif
#ifdef SODMC_AE
case SOCMNOBJECT_TYPE_SERVER_AE:
{
SODmCCmnServerAE* pCmnSrv = NULL;
#ifdef SODMC_DCOM
if (((SOAeCServer*)pEl)->getProtocol() == SOCLT_PROTOCOL_DCOM)
{
pCmnSrv = (SODmCCmnServerAE*)(SODmCComServerAE*)pEl;
}
#endif
#ifdef SOFEATURE_TUNNEL
if (((SOAeCServer*)pEl)->getProtocol() == SOCLT_PROTOCOL_TUNNEL)
{
pCmnSrv = (SODmCCmnServerAE*)(SODmCTPServerAE*)pEl;
}
#endif
hTree = pCmnSrv->getTreeHandle();
}
break;
case SOCMNOBJECT_TYPE_SUBSCRIPTION:
#ifdef SODMC_DCOM
if (((SOAeCSubscription*)pEl)->getProtocol() == SOCLT_PROTOCOL_DCOM)
{
hTree = ((SODmCComSubscription*)pEl)->getTreeHandle();
}
#endif
#ifdef SOFEATURE_TUNNEL
if (((SOAeCSubscription*)pEl)->getProtocol() == SOCLT_PROTOCOL_TUNNEL)
{
hTree = ((SODmCTPSubscription*)pEl)->getTreeHandle();
}
#endif
break;
#endif
}
GetTreeCtrl().SetItemImage(hTree, baseImg + curImg, baseImg + curImg);
}
}
curImg++;
if (curImg > 3)
{
curImg = 0;
}
}
void SODmCObjectView::addToWorkingList(IN SOCltElement* element)
{
SOCmnList<SOCltElement> workingList(m_workingList);
workingList.add(element);
}
void SODmCObjectView::removeFromWorkingList(IN SOCltElement* element)
{
SOCmnList<SOCltElement> workingList(m_workingList);
workingList.removeObject(element);
}
//-----------------------------------------------------------------------------
// OnRButtonDown
//
// - show popup menu on right mouse button down
//
void SODmCObjectView::OnRButtonDown(
IN UINT nFlags, // flags
IN CPoint point) // mouse point
{
CMenu bar;
GetParentFrame()->ActivateFrame();
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
switch (obj->getObjectType())
{
case SOCMNOBJECT_TYPE_SERVER_DA:
bar.LoadMenu(IDR_OBJECT_SERVERDA_POPUP);
break;
case SOCMNOBJECT_TYPE_SERVER_AE:
bar.LoadMenu(IDR_OBJECT_SERVERAE_POPUP);
break;
case SOCMNOBJECT_TYPE_GROUP:
bar.LoadMenu(IDR_OBJECT_GROUP_POPUP);
break;
case SOCMNOBJECT_TYPE_SUBSCRIPTION:
bar.LoadMenu(IDR_OBJECT_SUBSCRIPTION_POPUP);
break;
case SOCMNOBJECT_TYPE_ITEM:
bar.LoadMenu(IDR_OBJECT_ITEM_POPUP);
break;
}
}
if (bar.m_hMenu != 0)
{
CMenu& popup = *bar.GetSubMenu(0); // get sub menu
// view menu
ClientToScreen(&point);
popup.TrackPopupMenu(TPM_RIGHTBUTTON, point.x, point.y, AfxGetMainWnd());
CTreeView::OnRButtonDown(nFlags, point);
}
} // OnRButtonDown
//-----------------------------------------------------------------------------
// OnSC
//
// - selected object changed
//
void SODmCObjectView::OnSC(NMHDR* pNMHDR, LRESULT* pResult)
{
SODmCMainView* mainview = ::getMainView();
if (pResult)
{
*pResult = 0;
}
switch (mainview->getSelectedTab())
{
#ifdef SODMC_DA
case SODMCMAINVIEW_TAB_TDA:
{
SOCmnPointer<SODaCServer> srv = getSelectedServerDA();
mainview->changeSelectedServerDA(srv, FALSE);
}
break;
case SODMCMAINVIEW_TAB_LDA:
{
SOCmnPointer<SODmCItem> item = getSelectedItem();
mainview->clearSelection();
mainview->changeSelectedItem(item);
}
break;
#endif
#ifdef SODMC_AE
case SODMCMAINVIEW_TAB_TAE:
{
SOCmnPointer<SOAeCSubscription> subs = getSelectedSubscription();
mainview->changeSelectedSubscription(subs, FALSE);
}
break;
#endif
}
} // OnSC
//-----------------------------------------------------------------------------
// OnDI
//
// - tree item deleted
//
void SODmCObjectView::OnDI(NMHDR* pNMHDR, LRESULT* pResult)
{
if (pResult)
{
*pResult = 0;
}
NM_TREEVIEW* nmTV = (NM_TREEVIEW*)pNMHDR;
SOCltElement* obj = (SOCltElement*)GetTreeCtrl().GetItemData(nmTV->itemOld.hItem);
if (obj)
{
switch (obj->getObjectType())
{
#ifdef SODMC_DA
case SOCMNOBJECT_TYPE_SERVER_DA:
{
SODmCCmnServerDA* pCmnSrv = NULL;
#ifdef SODMC_DCOM
if (((SODaCServer*)obj)->getProtocol() == SOCLT_PROTOCOL_DCOM)
{
pCmnSrv = (SODmCCmnServerDA*)(SODmCComServerDA*)obj;
}
#endif
#ifdef SODMC_SOAP
if (((SODaCServer*)obj)->getProtocol() == SOCLT_PROTOCOL_SOAP)
{
pCmnSrv = (SODmCCmnServerDA*)(SODmCXmlServerDA*)obj;
}
#endif
#ifdef SOFEATURE_TUNNEL
if (((SODaCServer*)obj)->getProtocol() == SOCLT_PROTOCOL_TUNNEL)
{
pCmnSrv = (SODmCCmnServerDA*)(SODmCTPServerDA*)obj;
}
#endif
pCmnSrv->setTreeHandle(0);
}
break;
case SOCMNOBJECT_TYPE_ITEM:
((SODmCItem*)obj)->setTreeHandle(0);
break;
case SOCMNOBJECT_TYPE_GROUP:
#ifdef SODMC_DCOM
if (((SODaCGroup*)obj)->getProtocol() == SOCLT_PROTOCOL_DCOM)
{
((SODmCComGroup*)obj)->setTreeHandle(0);
}
#endif
#ifdef SODMC_SOAP
if (((SODaCGroup*)obj)->getProtocol() == SOCLT_PROTOCOL_SOAP)
{
((SODmCXmlGroup*)obj)->setTreeHandle(0);
}
#endif
#ifdef SOFEATURE_TUNNEL
if (((SODaCGroup*)obj)->getProtocol() == SOCLT_PROTOCOL_TUNNEL)
{
((SODmCTPGroup*)obj)->setTreeHandle(0);
}
#endif
break;
#endif
#ifdef SODMC_AE
case SOCMNOBJECT_TYPE_SERVER_AE:
{
SODmCCmnServerAE* pCmnSrv = NULL;
#ifdef SODMC_DCOM
if (((SOAeCServer*)obj)->getProtocol() == SOCLT_PROTOCOL_DCOM)
{
pCmnSrv = (SODmCCmnServerAE*)(SODmCComServerAE*)obj;
}
#endif
#ifdef SOFEATURE_TUNNEL
if (((SOAeCServer*)obj)->getProtocol() == SOCLT_PROTOCOL_TUNNEL)
{
pCmnSrv = (SODmCCmnServerAE*)(SODmCTPServerAE*)obj;
}
#endif
pCmnSrv->setTreeHandle(0);
}
break;
case SOCMNOBJECT_TYPE_SUBSCRIPTION:
#ifdef SODMC_DCOM
if (((SOAeCSubscription*)obj)->getProtocol() == SOCLT_PROTOCOL_DCOM)
{
((SODmCComSubscription*)obj)->setTreeHandle(0);
}
#endif
#ifdef SOFEATURE_TUNNEL
if (((SOAeCSubscription*)obj)->getProtocol() == SOCLT_PROTOCOL_TUNNEL)
{
((SODmCTPSubscription*)obj)->setTreeHandle(0);
}
#endif
break;
#endif
}
}
} // OnDI
//-----------------------------------------------------------------------------
// OnBLE
//
// - begin editing tree label
//
void SODmCObjectView::OnBLE(NMHDR* pNMHDR, LRESULT* pResult)
{
NMTVDISPINFO* nmDI = (NMTVDISPINFO*)pNMHDR;
if (GetTreeCtrl().GetItemData(nmDI->item.hItem))
{
*pResult = TRUE;
}
else
{
*pResult = FALSE;
}
} // OnBLE
//-----------------------------------------------------------------------------
// OnELE
//
// - end editing tree label
//
void SODmCObjectView::OnELE(NMHDR* pNMHDR, LRESULT* pResult)
{
NMTVDISPINFO* nmDI = (NMTVDISPINFO*)pNMHDR;
SOCltElement* obj = (SOCltElement*)GetTreeCtrl().GetItemData(nmDI->item.hItem);
*pResult = FALSE;
if ((nmDI->item.pszText) && (obj))
{
switch (obj->getObjectType())
{
#ifdef SODMC_DA
case SOCMNOBJECT_TYPE_SERVER_DA:
((SODaCServer*)obj)->setServerName(nmDI->item.pszText);
*pResult = TRUE;
break;
case SOCMNOBJECT_TYPE_ITEM:
{
SODmCItem* item = ((SODmCItem*)obj);
BYTE targetState = item->getTargetObjectState();
*pResult = item->setItemID(nmDI->item.pszText);
if ((item->isConnected()) || (targetState >= SOCltElement::connected))
{
item->disconnect();
if (targetState == SOCltElement::connected)
{
item->connect();
}
else
{
item->start();
}
}
}
break;
case SOCMNOBJECT_TYPE_GROUP:
{
SODaCGroup* group = ((SODaCGroup*)obj);
BYTE targetState = group->getTargetObjectState();
if (SUCCEEDED(group->setName(nmDI->item.pszText)))
{
*pResult = TRUE;
if ((group->isConnected()) || (targetState >= SOCltElement::connected))
{
if (group->getConnectionType() == SODAC_CFG_CONNECTION_TYPE_GETPUBLICGROUPBYNAME)
{
group->disconnect();
if (targetState == SOCltElement::connected)
{
group->connect(TRUE);
}
else
{
group->start(TRUE);
}
}
else
{
group->update(FALSE, SODAC_GRPPAR_NAME);
}
}
}
}
break;
#endif
#ifdef SODMC_AE
case SOCMNOBJECT_TYPE_SERVER_AE:
((SOAeCServer*)obj)->setServerName(nmDI->item.pszText);
*pResult = TRUE;
break;
case SOCMNOBJECT_TYPE_SUBSCRIPTION:
#ifdef SODMC_DCOM
if (((SOAeCSubscription*)obj)->getProtocol() == SOCLT_PROTOCOL_DCOM)
{
((SODmCComSubscription*)obj)->setLabel(nmDI->item.pszText);
}
#endif
#ifdef SOFEATURE_TUNNEL
if (((SOAeCSubscription*)obj)->getProtocol() == SOCLT_PROTOCOL_TUNNEL)
{
((SODmCTPSubscription*)obj)->setLabel(nmDI->item.pszText);
}
#endif
*pResult = TRUE;
break;
#endif
}
getApp()->setDirtyFlag();
}
} // OnELE
//-----------------------------------------------------------------------------
// getSelectedObject
//
// - get the selected toolkit object
//
// returns:
// Selected object
// NULL - No object selected
//
SOCltElement* SODmCObjectView::getSelectedObject(void)
{
HTREEITEM hItem = GetTreeCtrl().GetSelectedItem();
SOCltElement* obj = NULL;
if (hItem != NULL)
{
// item selected the object pointer is the item data
obj = (SOCltElement*)GetTreeCtrl().GetItemData(hItem);
if (obj)
{
obj->addRef();
}
}
return obj;
} // getSelectedObject
#ifdef SODMC_DA
//-----------------------------------------------------------------------------
// getSelectedServerDA
//
// - get the selected server DA object
//
// returns:
// Selected server DA
// NULL - No server DA selected
//
SODaCServer* SODmCObjectView::getSelectedServerDA(void)
{
HTREEITEM hItem = GetTreeCtrl().GetSelectedItem();
SOCmnElement* obj;
if (hItem != NULL)
{
// item selected the object pointer is the item data
obj = (SOCltElement*)GetTreeCtrl().GetItemData(hItem);
if (obj)
{
switch (obj->getObjectType())
{
case SOCMNOBJECT_TYPE_SERVER_DA:
obj->addRef();
return (SODaCServer*)obj;
break;
case SOCMNOBJECT_TYPE_GROUP:
return (SODaCServer*)obj->getParentBranch();
break;
case SOCMNOBJECT_TYPE_ITEM:
{
SOCmnPointer<SOCmnElement> group;
group = obj->getParentBranch();
return (SODaCServer*)group->getParentBranch();
}
break;
}
}
}
return NULL;
} // getSelectedServerDA
#endif
#ifdef SODMC_AE
//-----------------------------------------------------------------------------
// getSelectedServerAE
//
// - get the selected server AE object
//
// returns:
// Selected server AE
// NULL - No server AE selected
//
SOAeCServer* SODmCObjectView::getSelectedServerAE(void)
{
HTREEITEM hItem = GetTreeCtrl().GetSelectedItem();
SOCmnElement* obj;
if (hItem != NULL)
{
// item selected the object pointer is the item data
obj = (SOCltElement*)GetTreeCtrl().GetItemData(hItem);
if (obj)
{
switch (obj->getObjectType())
{
case SOCMNOBJECT_TYPE_SERVER_AE:
obj->addRef();
return (SOAeCServer*)obj;
break;
case SOCMNOBJECT_TYPE_SUBSCRIPTION:
return (SOAeCServer*)obj->getParentBranch();
break;
}
}
}
return NULL;
} // getSelectedServerDA
#endif
#ifdef SODMC_DA
//-----------------------------------------------------------------------------
// getSelectedGroup
//
// - get the selected group
//
// returns:
// Selected group
// NULL - No group selected
//
SODaCGroup* SODmCObjectView::getSelectedGroup(void)
{
HTREEITEM hItem = GetTreeCtrl().GetSelectedItem();
SOCmnElement* obj;
if (hItem != NULL)
{
// item selected the object pointer is the item data
obj = (SOCltElement*)GetTreeCtrl().GetItemData(hItem);
if (obj)
{
switch (obj->getObjectType())
{
case SOCMNOBJECT_TYPE_SERVER_DA:
{
SOCmnList<SOCmnElement> branchList(obj->getBranchList());
if (branchList.getCount() == 1)
{
SODaCGroup* grp = (SODaCGroup*)branchList.getHead();
grp->addRef();
return grp;
}
}
break;
case SOCMNOBJECT_TYPE_GROUP:
obj->addRef();
return (SODaCGroup*)obj;
break;
case SOCMNOBJECT_TYPE_ITEM:
return (SODaCGroup*)obj->getParentBranch();
break;
}
}
}
return NULL;
} // getSelectedGroup
#endif
#ifdef SODMC_AE
//-----------------------------------------------------------------------------
// getSelectedSubscription
//
// - get the selected subscription
//
// returns:
// Selected group
// NULL - No group selected
//
SOAeCSubscription* SODmCObjectView::getSelectedSubscription(void)
{
HTREEITEM hItem = GetTreeCtrl().GetSelectedItem();
SOCmnElement* obj;
if (hItem != NULL)
{
// item selected the object pointer is the item data
obj = (SOCltElement*)GetTreeCtrl().GetItemData(hItem);
if (obj)
{
switch (obj->getObjectType())
{
case SOCMNOBJECT_TYPE_SERVER_AE:
{
SOCmnList<SOCmnElement> leafList(obj->getLeafList());
if (leafList.getCount() == 1)
{
SOAeCSubscription* sub = (SOAeCSubscription*)leafList.getHead();
sub->addRef();
return sub;
}
}
break;
case SOCMNOBJECT_TYPE_SUBSCRIPTION:
obj->addRef();
return (SOAeCSubscription*)obj;
break;
}
}
}
return NULL;
} // getSelectedSubscription
#endif
#ifdef SODMC_DA
//-----------------------------------------------------------------------------
// getSelectedItem
//
// - get the selected DA item
//
// returns:
// Selected DA item
// NULL - No DA item selected
//
SODmCItem* SODmCObjectView::getSelectedItem(void)
{
HTREEITEM hItem = GetTreeCtrl().GetSelectedItem();
SOCmnElement* obj;
if (hItem != NULL)
{
// item selected the object pointer is the item data
obj = (SOCltElement*)GetTreeCtrl().GetItemData(hItem);
if (obj)
{
if (obj->is(SOCMNOBJECT_TYPE_ITEM))
{
obj->addRef();
return (SODmCItem*)obj;
}
}
}
return NULL;
} // getSelectedItem
//-----------------------------------------------------------------------------
// changeSelectedItem
//
// - called to change the selected item
//
void SODmCObjectView::changeSelectedItem(IN SODmCItem* item) // new selected item
{
if (item)
{
GetTreeCtrl().Select(item->getTreeHandle(), TVGN_CARET);
}
} // changeSelectedItem
//-----------------------------------------------------------------------------
// changeSelectedServerDA
//
// - called to change the selected item
//
void SODmCObjectView::changeSelectedServerDA(IN SODaCServer* server) // new selected server
{
if (server)
{
SODmCCmnServerDA* pCmnSrv = NULL;
#ifdef SODMC_DCOM
if (((SODaCServer*)server)->getProtocol() == SOCLT_PROTOCOL_DCOM)
{
pCmnSrv = (SODmCCmnServerDA*)(SODmCComServerDA*)server;
}
#endif
#ifdef SODMC_SOAP
if (((SODaCServer*)server)->getProtocol() == SOCLT_PROTOCOL_SOAP)
{
pCmnSrv = (SODmCCmnServerDA*)(SODmCXmlServerDA*)server;
}
#endif
#ifdef SOFEATURE_TUNNEL
if (((SODaCServer*)server)->getProtocol() == SOCLT_PROTOCOL_TUNNEL)
{
pCmnSrv = (SODmCCmnServerDA*)(SODmCTPServerDA*)server;
}
#endif
GetTreeCtrl().Select(pCmnSrv->getTreeHandle(), TVGN_CARET);
}
} // changeSelectedServerDA
#endif
#ifdef SODMC_AE
//-----------------------------------------------------------------------------
// changeSelectedServerAE
//
// - called to change the selected item
//
void SODmCObjectView::changeSelectedServerAE(IN SOAeCServer* server) // new selected server
{
if (server)
{
SODmCCmnServerAE* pCmnSrv = NULL;
if (server->getProtocol() == SOCLT_PROTOCOL_DCOM)
{
pCmnSrv = (SODmCCmnServerAE*)(SODmCComServerAE*)(SOAeCServer*)server;
}
#ifdef SOFEATURE_TUNNEL
else
{
pCmnSrv = (SODmCCmnServerAE*)(SODmCTPServerAE*)(SOAeCServer*)server;
}
#endif
GetTreeCtrl().Select(pCmnSrv->getTreeHandle(), TVGN_CARET);
}
} // changeSelectedServerAE
#endif
//-----------------------------------------------------------------------------
// setObjectStateImage
//
// - set the correct object state image
//
void SODmCObjectView::setObjectStateImage(
IN HTREEITEM treeHandle,
IN int listIdx,
IN BYTE objState,
IN BYTE targetObjState)
{
int image;
switch (objState)
{
case SOCltElement::disconnected:
{
switch (targetObjState)
{
case SOCltElement::disconnected:
image = SODMCOBJECTVIEW_IMG_OBJ_R_R;
break;
case SOCltElement::connected:
image = SODMCOBJECTVIEW_IMG_OBJ_R_Y;
break;
case SOCltElement::started:
image = SODMCOBJECTVIEW_IMG_OBJ_R_G;
break;
}
}
break;
case SOCltElement::connected:
{
switch (targetObjState)
{
case SOCltElement::disconnected:
image = SODMCOBJECTVIEW_IMG_OBJ_Y_R;
break;
case SOCltElement::connected:
image = SODMCOBJECTVIEW_IMG_OBJ_Y_Y;
break;
case SOCltElement::started:
image = SODMCOBJECTVIEW_IMG_OBJ_Y_G;
break;
}
}
break;
case SOCltElement::started:
{
switch (targetObjState)
{
case SOCltElement::disconnected:
image = SODMCOBJECTVIEW_IMG_OBJ_G_R;
break;
case SOCltElement::connected:
image = SODMCOBJECTVIEW_IMG_OBJ_G_Y;
break;
case SOCltElement::started:
image = SODMCOBJECTVIEW_IMG_OBJ_G_G;
break;
}
}
break;
}
if (treeHandle != 0)
{
SODmCObjectView* objview = getObjectView();
objview->GetTreeCtrl().SetItemImage(treeHandle, image, image);
}
if (listIdx != -1)
{
SODmCMainView* mainview = getMainView();
image += SODMCMAINVIEW_IMG_OBJ_DEFAULT - SODMCOBJECTVIEW_IMG_OBJ_DEFAULT;
LV_ITEM lv;
lv.mask = LVIF_IMAGE;
lv.iItem = listIdx;
lv.iSubItem = 0;
lv.iImage = image;
mainview->getListDA()->SetItem(&lv);
}
} // setObjectStateImage
//-----------------------------------------------------------------------------
// OnAddGroup
//
// - menu handler edit/add group
//
void SODmCObjectView::onAddGroup()
{
#ifdef SODMC_DA
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
if (obj->is(SOCMNOBJECT_TYPE_SERVER_DA))
{
SOCmnPointer<SODaCGroup> group = (SODaCGroup*)((SODaCServer*)(SOCltElement*)obj)->addGroup(NULL, 1000);
group->start(TRUE, SOCLT_EXEC_ASYNC); // activate
getApp()->setDirtyFlag();
SODmCPSheet* sheet = getPropertyFrame()->getPropertySheet();
sheet->showGroupAttributes(group);
getMainFrame()->showPropertyFrame();
}
}
#endif
} // OnAddGroup
//-----------------------------------------------------------------------------
// onUpdAddGroup
//
// - Enable menu if server or DA item is selected
//
void SODmCObjectView::onUpdAddGroup(OUT CCmdUI* pCmdUI) // command UI
{
#ifdef SODMC_DA
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
pCmdUI->Enable(obj->is(SOCMNOBJECT_TYPE_SERVER_DA));
}
else
#endif
pCmdUI->Enable(FALSE);
} // onUpdAddGroup
//-----------------------------------------------------------------------------
// OnAddSubscription
//
// - menu handler edit/add subscription
//
void SODmCObjectView::onAddSubscription()
{
#ifdef SODMC_AE
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
if (obj->is(SOCMNOBJECT_TYPE_SERVER_AE))
{
SOCmnPointer<SOAeCSubscription> sub = (SOAeCSubscription*)((SOAeCServer*)(SOCltElement*)obj)->addSubscription();
sub->start(TRUE, SOCLT_EXEC_ASYNC); // activate
getApp()->setDirtyFlag();
SODmCPSheet* sheet = getPropertyFrame()->getPropertySheet();
sheet->showSubscriptionAttributes(sub);
getMainFrame()->showPropertyFrame();
}
}
#endif
} // OnAddSubscription
//-----------------------------------------------------------------------------
// onUpdAddSubscription
//
// - Enable menu if server or DA item is selected
//
void SODmCObjectView::onUpdAddSubscription(OUT CCmdUI* pCmdUI) // command UI
{
#ifdef SODMC_AE
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
pCmdUI->Enable(obj->is(SOCMNOBJECT_TYPE_SERVER_AE));
}
else
#endif
pCmdUI->Enable(FALSE);
} // onUpdAddSubscription
//-----------------------------------------------------------------------------
// OnAddItem
//
// - menu handler edit/add item
//
void SODmCObjectView::onAddItem()
{
#ifdef SODMC_DA
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
if (obj->is(SOCMNOBJECT_TYPE_GROUP))
{
SOCmnPointer<SODmCItem> item = (SODmCItem*)((SODaCGroup*)(SOCltElement*)obj)->addItem(_T("Item"));
item->start(FALSE, SOCLT_EXEC_ASYNC); // activate
getApp()->setDirtyFlag();
SODmCPSheet* sheet = getPropertyFrame()->getPropertySheet();
sheet->showItemAttributes(item);
getMainFrame()->showPropertyFrame();
}
}
#endif
} // OnAddItem
//-----------------------------------------------------------------------------
// onUpdAddItem
//
// - Enable menu if server or DA item is selected
//
void SODmCObjectView::onUpdAddItem(OUT CCmdUI* pCmdUI) // command UI
{
#ifdef SODMC_DA
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
pCmdUI->Enable(obj->is(SOCMNOBJECT_TYPE_GROUP));
}
else
#endif
pCmdUI->Enable(FALSE);
} // onUpdAddItem
//-----------------------------------------------------------------------------
// OnDeleteObject
//
// - menu handler edit/delete object
//
void SODmCObjectView::onDelete()
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
SOCmnPointer<SOCmnElement> parent = obj->getParentBranch();
switch (obj->getObjectType())
{
case SOCMNOBJECT_TYPE_SERVER_DA:
case SOCMNOBJECT_TYPE_SERVER_AE:
case SOCMNOBJECT_TYPE_GROUP:
obj->disconnect();
obj->removeAllAdditionalElements();
obj->removeAllLeaves();
obj->removeAllBranches();
parent->removeBranch(obj);
break;
case SOCMNOBJECT_TYPE_ITEM:
case SOCMNOBJECT_TYPE_SUBSCRIPTION:
obj->disconnect();
parent->removeLeaf(obj);
break;
}
obj->removeAllAdditionalElements();
obj->removeAllLeaves();
obj->removeAllBranches();
getApp()->setDirtyFlag();
}
} // OnDeleteObject
//-----------------------------------------------------------------------------
// onUpdSelected
//
// - Enable menu if server or DA item is selected
//
void SODmCObjectView::onUpdDelete(OUT CCmdUI* pCmdUI) // command UI
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
pCmdUI->Enable(TRUE);
}
else
{
pCmdUI->Enable(FALSE);
}
} // onUpdSelected
//-----------------------------------------------------------------------------
// onProperties
//
// - menu handler of menu edit/properties object
//
afx_msg void SODmCObjectView::onProperties(void)
{
// get the selected item
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
SODmCPSheet* sheet = getPropertyFrame()->getPropertySheet();
switch (obj->getObjectType())
{
#ifdef SODMC_DA
case SOCMNOBJECT_TYPE_SERVER_DA:
sheet->showServerDAAttributes((SODaCServer*)(SOCltElement*)obj);
break;
case SOCMNOBJECT_TYPE_GROUP:
sheet->showGroupAttributes((SODaCGroup*)(SOCltElement*)obj);
break;
case SOCMNOBJECT_TYPE_ITEM:
sheet->showItemAttributes((SODmCItem*)(SOCltElement*)obj);
break;
#endif
#ifdef SODMC_AE
case SOCMNOBJECT_TYPE_SERVER_AE:
sheet->showServerAEAttributes((SOAeCServer*)(SOCltElement*)obj);
break;
case SOCMNOBJECT_TYPE_SUBSCRIPTION:
sheet->showSubscriptionAttributes((SOAeCSubscription*)(SOCltElement*)obj);
break;
#endif
default:
sheet->showAbout();
break;
}
getMainFrame()->showPropertyFrame();
}
} // onProperties
//-----------------------------------------------------------------------------
// onUpdProperties
//
// - update menu handler of menu edit/properties object
//
afx_msg void SODmCObjectView::onUpdProperties(OUT CCmdUI* pCmdUI)
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
pCmdUI->Enable(obj->is(SOCMNOBJECT_TYPE_SERVER_DA) || obj->is(SOCMNOBJECT_TYPE_GROUP) || obj->is(SOCMNOBJECT_TYPE_ITEM) || obj->is(SOCMNOBJECT_TYPE_SERVER_AE) || obj->is(SOCMNOBJECT_TYPE_SUBSCRIPTION));
}
else
{
pCmdUI->Enable(FALSE);
}
} // onUpdProperties
//-----------------------------------------------------------------------------
// onStartObjFlat
//
// - menu handler State/Start/Flat
//
afx_msg void SODmCObjectView::onStartObjFlat(void)
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
obj->start(FALSE, SOCLT_EXEC_ASYNC);
}
} // onStartObjFlat
//-----------------------------------------------------------------------------
// onUpdStartObjFlat
//
// - update menu handler of menu State/Start/Flat
//
afx_msg void SODmCObjectView::onUpdStartObjFlat(OUT CCmdUI* pCmdUI)
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
pCmdUI->Enable(obj->getObjectState() != SOCltElement::started);
}
else
{
pCmdUI->Enable(FALSE);
}
} // onUpdStartObjFlat
//-----------------------------------------------------------------------------
// onStartObjDeep
//
// - menu handler State/Start/Deep
//
afx_msg void SODmCObjectView::onStartObjDeep(void)
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
obj->start(TRUE, SOCLT_EXEC_ASYNC);
}
} // onStartObjDeep
//-----------------------------------------------------------------------------
// onUpdStartObjDeep
//
// - update menu handler of menu State/Start/Deep
//
afx_msg void SODmCObjectView::onUpdStartObjDeep(OUT CCmdUI* pCmdUI)
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
pCmdUI->Enable(TRUE);
}
else
{
pCmdUI->Enable(FALSE);
}
} // onUpdStartObjDeep
//-----------------------------------------------------------------------------
// onConnectObjFlat
//
// - menu handler State/Connect/Flat
//
afx_msg void SODmCObjectView::onConnectObjFlat(void)
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
obj->connect(FALSE, SOCLT_EXEC_ASYNC);
}
} // onConnectObjFlat
//-----------------------------------------------------------------------------
// onUpdConnectObjFlat
//
// - update menu handler of menu State/Connect/Flat
//
afx_msg void SODmCObjectView::onUpdConnectObjFlat(OUT CCmdUI* pCmdUI)
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
pCmdUI->Enable(obj->getObjectState() != SOCltElement::connected);
}
else
{
pCmdUI->Enable(FALSE);
}
} // onUpdConnectObjFlat
//-----------------------------------------------------------------------------
// onConnectObjDeep
//
// - menu handler State/Connect/Deep
//
afx_msg void SODmCObjectView::onConnectObjDeep(void)
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
obj->connect(TRUE, SOCLT_EXEC_ASYNC);
}
} // onConnectObjDeep
//-----------------------------------------------------------------------------
// onUpdConnectObjDeep
//
// - update menu handler of menu State/Connect/Deep
//
afx_msg void SODmCObjectView::onUpdConnectObjDeep(OUT CCmdUI* pCmdUI)
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
pCmdUI->Enable(TRUE);
}
else
{
pCmdUI->Enable(FALSE);
}
} // onUpdConnectObjDeep
//-----------------------------------------------------------------------------
// onStopObj
//
// - menu handler State/Stop
//
afx_msg void SODmCObjectView::onStopObj(void)
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
obj->disconnect(SOCLT_EXEC_ASYNC);
}
} // onStopObj
//-----------------------------------------------------------------------------
// onUpdStopObj
//
// - update menu handler of menu State/Stop
//
afx_msg void SODmCObjectView::onUpdStopObj(OUT CCmdUI* pCmdUI)
{
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
pCmdUI->Enable(obj->getObjectState() != SOCltElement::disconnected);
}
else
{
pCmdUI->Enable(FALSE);
}
} // onUpdStopObj
//-----------------------------------------------------------------------------
// onRefreshGroup
//
// - menu handler Refresh
//
afx_msg void SODmCObjectView::onRefreshGroup(void)
{
#ifdef SODMC_DA
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
((SODaCGroup*)(SOCmnElement*)obj)->asyncRefresh(SODAC_MAXAGE_DEVICE);
}
#endif
} // onRefreshGroup
//-----------------------------------------------------------------------------
// onUpdRefreshGroup
//
// - update menu handler of menu Refresh
//
afx_msg void SODmCObjectView::onUpdRefreshGroup(OUT CCmdUI* pCmdUI)
{
#ifdef SODMC_DA
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
pCmdUI->Enable((obj->is(SOCMNOBJECT_TYPE_GROUP)) && (obj->isStarted()) &&
(((SODaCGroup*)(SOCmnElement*)obj)->getDataRetrieval() == SODaCGroup::drAsyncAdvise));
else
#endif
pCmdUI->Enable(FALSE);
} // onUpdRefreshGroup
//-----------------------------------------------------------------------------
// onReadItem
//
// - menu handler Read
//
afx_msg void SODmCObjectView::onReadItem(void)
{
#ifdef SODMC_DA
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
((SODmCItem*)(SOCmnElement*)obj)->read(SODAC_MAXAGE_DEVICE);
}
#endif
} // onReadItem
//-----------------------------------------------------------------------------
// onUpdReadItem
//
// - update menu handler of menu Read
//
afx_msg void SODmCObjectView::onUpdReadItem(OUT CCmdUI* pCmdUI)
{
#ifdef SODMC_DA
SOCmnPointer<SOCltElement> obj(getSelectedObject());
if (obj.isNotNull())
{
pCmdUI->Enable((obj->is(SOCMNOBJECT_TYPE_ITEM)) && (obj->isConnected()));
}
else
#endif
pCmdUI->Enable(FALSE);
} // onUpdReadItem
//-----------------------------------------------------------------------------
// onWriteFromFile
//
// - menu handler of menu edit/write from file
//
afx_msg void SODmCObjectView::onWriteFromFile(void)
{
#ifdef SODMC_DA
SOCmnPointer<SODmCItem> item(getSelectedItem());
getMainView()->writeFromFile(item);
#endif
} // onWriteFromFile
//-----------------------------------------------------------------------------
// onUpdWriteFromFile
//
// - update menu handler of menu edit/write from file
//
afx_msg void SODmCObjectView::onUpdWriteFromFile(OUT CCmdUI* pCmdUI)
{
#ifdef SODMC_DA
SOCmnPointer<SODmCItem> item(getSelectedItem());
if (item.isNotNull())
{
if ((item->getAccessRights() & OPC_WRITEABLE)
&& ((item->getNativeDatatype() & VT_ARRAY) || (item->getNativeDatatype() & VT_BSTR)))
{
if ((item->getNativeDatatype() & VT_ARRAY)
&& (!(item->getNativeDatatype() & VT_UI1) || !(item->getNativeDatatype() & VT_I1)))
{
pCmdUI->Enable(FALSE);
return; // write is not allowed on the selected array
}
pCmdUI->Enable(TRUE);
return;
}
}
#endif
pCmdUI->Enable(FALSE);
} // onUpdWriteFromFile
//-----------------------------------------------------------------------------
// onReadToFile
//
// - menu handler of menu edit/read to file
//
afx_msg void SODmCObjectView::onReadToFile(void)
{
#ifdef SODMC_DA
SOCmnPointer<SODmCItem> item(getSelectedItem());
getMainView()->readToFile(item);
#endif
} // onReadToFile
//-----------------------------------------------------------------------------
// onUpdReadToFile
//
// - update menu handler of menu edit/read to file
//
afx_msg void SODmCObjectView::onUpdReadToFile(OUT CCmdUI* pCmdUI)
{
#ifdef SODMC_DA
SOCmnPointer<SODmCItem> item(getSelectedItem());
if (item.isNotNull())
{
if ((item->getAccessRights() & OPC_READABLE)
&& ((item->getNativeDatatype() & VT_ARRAY) || (item->getNativeDatatype() & VT_BSTR)))
{
if ((item->getNativeDatatype() & VT_ARRAY)
&& (!(item->getNativeDatatype() & VT_UI1) || !(item->getNativeDatatype() & VT_I1)))
{
pCmdUI->Enable(FALSE);
return; // write is not allowed on the selected array
}
pCmdUI->Enable(TRUE);
return;
}
}
#endif
pCmdUI->Enable(FALSE);
} // onUpdReadToFile
void SODmCObjectView::OnLogtofile()
{
#ifdef SODMC_DA
SOCmnPointer<SODmCItem> item(getSelectedItem());
if (item.isNotNull())
{
// show save file dialog
CFileDialog dlg(FALSE, NULL, NULL, OFN_HIDEREADONLY | OFN_PATHMUSTEXIST,
_T("All Files (*.*)|*.*||"));
#if (WINVER >= 0x0500) && (_WIN32_WINNT >= 0x0500)
dlg.GetOFN().lStructSize = OPENFILENAME_SIZE_VERSION_400;
#endif
if (IDOK != dlg.DoModal())
{
item->setLogFile(SOCmnString());
}
else
{
// get file name
item->setLogFile(SOCmnString(dlg.GetPathName()));
}
item->setLogToFile(!item->getLogFile().isEmpty());
}
#endif // SODMC_DA
}
void SODmCObjectView::OnUpdLogtofile(CCmdUI* pCmdUI)
{
#ifdef SODMC_DA
pCmdUI->Enable(TRUE);
SOCmnPointer<SODmCItem> item(getSelectedItem());
if (item.isNotNull())
{
pCmdUI->SetCheck(item->getLogToFile());
}
else
{
pCmdUI->SetCheck(FALSE);
}
#else
pCmdUI->Enable(FALSE);
#endif // SODMC_DA
}
|
//
// Copyright 2020 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
#include "pxr/imaging/hdSt/dynamicUvTextureObject.h"
#include "pxr/imaging/hdSt/dynamicUvTextureImplementation.h"
#include "pxr/imaging/hdSt/resourceRegistry.h"
#include "pxr/imaging/hdSt/textureHandleRegistry.h"
#include "pxr/imaging/hdSt/subtextureIdentifier.h"
#include "pxr/imaging/hgi/hgi.h"
PXR_NAMESPACE_OPEN_SCOPE
HdStDynamicUvTextureObject::HdStDynamicUvTextureObject(
const HdStTextureIdentifier &textureId,
HdSt_TextureObjectRegistry * const textureObjectRegistry)
: HdStUvTextureObject(textureId, textureObjectRegistry)
{
}
HdStDynamicUvTextureObject::~HdStDynamicUvTextureObject()
{
_DestroyTexture();
}
HdStDynamicUvTextureImplementation *
HdStDynamicUvTextureObject::_GetImpl() const
{
const HdStDynamicUvSubtextureIdentifier * const subId =
dynamic_cast<const HdStDynamicUvSubtextureIdentifier *>(
GetTextureIdentifier().GetSubtextureIdentifier());
if (!TF_VERIFY(subId)) {
return nullptr;
}
return subId->GetTextureImplementation();
}
bool
HdStDynamicUvTextureObject::IsValid() const
{
if (HdStDynamicUvTextureImplementation * const impl = _GetImpl()) {
return impl->IsValid(this);
}
return true;
}
void
HdStDynamicUvTextureObject::_Load()
{
if (HdStDynamicUvTextureImplementation * const impl = _GetImpl()) {
impl->Load(this);
}
}
void
HdStDynamicUvTextureObject::_Commit()
{
if (HdStDynamicUvTextureImplementation * const impl = _GetImpl()) {
impl->Commit(this);
}
}
PXR_NAMESPACE_CLOSE_SCOPE
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
/*
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#include "precomp.h"
#include "mpidi_ch3_impl.h"
void MPIDI_CH3I_BootstrapQ_create(MPIDI_CH3I_BootstrapQ* queue_ptr)
{
*queue_ptr = MPIDI_CH3I_set;
return;
}
void MPIDI_CH3I_BootstrapQ_tostring(
_In_ MPIDI_CH3I_BootstrapQ queue,
_Out_writes_z_(length) char *name,
_In_range_(>, 20) size_t length
)
{
MPIU_Assert(length > 20);
MPIU_Snprintf(name, length, "%u:%u", GetCurrentProcessId(), ExGetPortValue(queue));
return;
}
void MPIDI_CH3I_BootstrapQ_unlink(MPIDI_CH3I_BootstrapQ /*queue*/)
{
}
void MPIDI_CH3I_BootstrapQ_destroy(MPIDI_CH3I_BootstrapQ /*queue*/)
{
}
int MPIDI_CH3I_BootstrapQ_attach(const char* name, MPIDI_CH3I_BootstrapQ * queue_ptr)
{
char* p;
int pid;
int queue_id = 0;
BOOL fSucc;
HANDLE hQueue;
HANDLE hProcess;
pid = strtoul(name, &p, 10);
if(*p != '\0')
{
queue_id = strtoul(p + 1, &p, 10);
}
if(pid == 0 || queue_id == 0)
return MPIU_ERR_FATAL_GET(MPI_SUCCESS, MPI_ERR_OTHER, "**argstr_shmq");
hProcess = OpenProcess(
PROCESS_DUP_HANDLE,
FALSE, // bInheritHandle
pid
);
if (hProcess == NULL)
{
return MPIU_ERR_FATAL_GET(MPI_SUCCESS, MPI_ERR_OTHER, "**OpenProcess %d %d", pid, ::GetLastError());
}
fSucc = DuplicateHandle(
hProcess,
UlongToHandle(queue_id),
GetCurrentProcess(),
&hQueue,
0, // dwDesiredAccess is ignored,
FALSE, // bInheritHandle,
DUPLICATE_SAME_ACCESS
);
if(!fSucc)
{
int mpi_errno = MPIU_ERR_FATAL_GET(MPI_SUCCESS, MPI_ERR_OTHER, "**duphandle %s %d", name, ::GetLastError());
CloseHandle(hProcess);
return mpi_errno;
}
CloseHandle(hProcess);
*queue_ptr = hQueue;
return MPI_SUCCESS;
}
void MPIDI_CH3I_BootstrapQ_detach(MPIDI_CH3I_BootstrapQ queue)
{
CloseHandle(queue);
}
int
MPIDI_CH3I_BootstrapQ_send_msg(
MPIDI_CH3I_BootstrapQ queue,
int key,
const void* buffer,
int length
)
{
BOOL fSucc;
fSucc = PostQueuedCompletionStatus(
queue,
length,
key,
(OVERLAPPED*)buffer
);
if(!fSucc)
{
//DWORD gle = GetLastError();
return MPIU_ERR_FATAL_GET(MPI_SUCCESS, MPI_ERR_OTHER, "**boot_send");
}
return MPI_SUCCESS;
}
int MPIDI_CH3I_Notify_connect(MPIDI_CH3I_BootstrapQ queue, HANDLE hShm, int pid)
{
return MPIDI_CH3I_BootstrapQ_send_msg(queue, EX_KEY_SHM_NOTIFY_CONNECTION, hShm, pid);
}
int MPIDI_CH3I_Notify_message(MPIDI_CH3I_BootstrapQ queue)
{
return MPIDI_CH3I_BootstrapQ_send_msg(queue, EX_KEY_SHM_NOTIFY_MESSAGE, NULL, 0);
}
void MPIDI_CH3I_Notify_accept_connect(ch3u_bootstrapq_routine pfnAcceptConnection)
{
ExRegisterCompletionProcessor(EX_KEY_SHM_NOTIFY_CONNECTION, pfnAcceptConnection);
}
void MPIDI_CH3I_Notify_accept_message(ch3u_bootstrapq_routine pfnAcceptMessage)
{
ExRegisterCompletionProcessor(EX_KEY_SHM_NOTIFY_MESSAGE, pfnAcceptMessage);
}
|
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Christian Schulte, 2012
*
* Last modified:
* $Date: 2012-09-07 11:29:57 +0200 (Fri, 07 Sep 2012) $ by $Author: schulte $
* $Revision: 13061 $
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* 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.
*
*/
namespace Gecode {
/// Traits of %SetVar for branching
template<>
class BranchTraits<SetVar> {
public:
/// Type for the branching filter function
typedef SetBranchFilter Filter;
/// Type for the branching merit function
typedef SetBranchMerit Merit;
/// Type for the branching value function
typedef SetBranchVal Val;
/// Return type of the branching value function
typedef int ValType;
/// Type for the branching commit function
typedef SetBranchCommit Commit;
};
}
// STATISTICS: set-branch
|
// *********************************************************************************************************************
// File: DGWImageCache.hpp
//
// Description: Image cache for DG.
//
// Project: GRAPHISOFT Dialog Manager (DGLib)
//
// Contact person: VM
// *********************************************************************************************************************
#ifndef DGWIMAGECACHE_HPP
#define DGWIMAGECACHE_HPP
#pragma once
// Includes ------------------------------------------------------------------------------------------------------------
#include "Win32Interface.hpp"
#include "DG.h"
#include "HashCommon.hpp"
#include "HashTable.hpp"
#include "RS.hpp"
namespace DG {
// === class ImageCache ================================================================================================
class DG_DLL_EXPORT ImageCache
{
public:
class DG_DLL_EXPORT Image
{
friend class DG::ImageCache;
private:
GSResModule resModule;
short imageId;
UInt32 dpi;
HICON hIcon;
short cx;
short cy;
Int32 developerId;
Int32 localId;
public:
Image ();
Image (GSResModule resModule, short imageId, short cx = 0, short cy = 0, Int32 developerId = 0, Int32 localId = 0);
Image (Icon icon, short cx = 0, short cy = 0, Int32 developerId = 0, Int32 localId = 0);
Image (HICON _hIcon);
Image (const Image& image);
virtual ~Image ();
Image& operator= (const Image& source);
bool operator== (const Image& source);
bool operator!= (const Image& source);
void Set (GSResModule resModule, short imageId, short cx = 0, short cy = 0, Int32 developerId = 0, Int32 localId = 0);
void Set (HICON hIcon);
void Set (const DG::Image& icon, short cx = 0, short cy = 0, Int32 developerId = 0, Int32 localId = 0);
void Pin (Int32 developerId, Int32 localId);
void Release (void);
GSResModule GetResModule (void) const;
short GetImageId (void) const;
HICON GetIcon (UInt32 dpi);
Icon GetDGIcon (void) const;
bool IsEmpty (void) const;
};
private:
class CacheItem
{
friend class DG::ImageCache;
private:
GSResModule resModule;
short imageId;
UInt32 dpi;
HICON hIcon;
Int32 refCounter;
Int32 developerId;
Int32 localId;
bool isPinned;
Int32 width; // Filled by GetImageSize
Int32 height; // Filled by GetImageSize
CacheItem (); // Disable default constructor
bool operator== (const CacheItem& source); // Disable
#if defined (DEBUVERS_VM)
void Dump (void) const
{
DBPRINTF ("CacheItem rm:0x%X, id:%d, dpi:%d, hIcn:0x%X, refCnt:%d, devId:0x%X, locId:0x%X, pinned:%d, w:%d, h:%d\n",
resModule, imageId, dpi, hIcon, refCounter, developerId, localId, isPinned, width, height);
}
#endif
public:
CacheItem (UInt32 dpi, GSResModule resModule, short imageId, HICON hIcon, Int32 refCounter, Int32 developerId = 0, Int32 localId = 0, bool isPinned = false);
~CacheItem ();
};
struct SystemImage: public GS::Hashable
{
HINSTANCE hModule;
LPWSTR resName;
Int32 width;
Int32 height;
SystemImage (HINSTANCE _hModule, LPWSTR _resName, Int32 _width, Int32 _height):
hModule (_hModule),
resName (_resName),
width (_width),
height (_height)
{
}
bool operator== (const SystemImage& other) const
{
return hModule == other.hModule && resName == other.resName && width == other.width && height == other.height;
}
virtual ULong GenerateHashValue (void) const override
{
return GS::GenerateHashValue (hModule, resName, width, height);
}
};
GS::Array<CacheItem> cache;
GS::Array<HICON> unreferencedIcons;
GS::HashTable<SystemImage, HICON> systemIcons;
static HICON RequestImage (UInt32 dpi, GSResModule resModule, short imageId, short cx = 0, short cy = 0, Int32 developerId = 0, Int32 localId = 0);
static void ReleaseImage (Image& image);
static void RemoveUnreferencedImage (HICON hIcon);
static bool GetImageIdentifiers (HICON hIcon, UInt32* dpi, GSResModule* resModule, short* imageId, Int32* developerId, Int32* localId, bool* isPinned, Int32* cacheIndex = NULL);
static void PinImage (GSResModule resModule, short imageId, Int32 developerId, Int32 localId);
public:
ImageCache ();
~ImageCache ();
static bool GetImageSize (HICON hIcon, Int32* width, Int32* height);
static void ReleasePinnedImages (Int32 developerId, Int32 localId);
static HICON GetSystemIcon (HINSTANCE hModule, LPWSTR resName, Int32 width, Int32 height);
static void GetInfo (DWORD& cachedImageCount, DWORD& usedImageCount);
#if defined (DEBUVERS_VM)
static void DumpCacheContent (void);
#endif
};
} // namespace DG
#endif
|
//
// Copyright 2016 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
#include <boost/python/def.hpp>
#include <boost/python.hpp>
#include "pxr/usd/usdUtils/stageCache.h"
#include "pxr/base/tf/pyResultConversions.h"
using namespace std;
using namespace boost::python;
using namespace boost;
void wrapStageCache()
{
class_<UsdUtilsStageCache>("StageCache")
.def("Get", &UsdUtilsStageCache::Get,
return_value_policy<reference_existing_object>())
.staticmethod("Get")
.def("GetSessionLayerForVariantSelections",
&UsdUtilsStageCache::GetSessionLayerForVariantSelections)
.staticmethod("GetSessionLayerForVariantSelections")
;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.