Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:48

0001 #include "L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyticAnalyzer.h"
0002 #include <cmath>
0003 #include <memory>
0004 
0005 using namespace edm;
0006 using namespace std;
0007 using namespace cmsdt;
0008 // ============================================================================
0009 // Constructors and destructor
0010 // ============================================================================
0011 MuonPathAnalyticAnalyzer::MuonPathAnalyticAnalyzer(const ParameterSet &pset,
0012                                                    edm::ConsumesCollector &iC,
0013                                                    std::shared_ptr<GlobalCoordsObtainer> &globalcoordsobtainer)
0014     : MuonPathAnalyzer(pset, iC),
0015       debug_(pset.getUntrackedParameter<bool>("debug")),
0016       chi2Th_(pset.getParameter<double>("chi2Th")),
0017       tanPhiTh_(pset.getParameter<double>("tanPhiTh")),
0018       tanPhiThw2max_(pset.getParameter<double>("tanPhiThw2max")),
0019       tanPhiThw2min_(pset.getParameter<double>("tanPhiThw2min")),
0020       tanPhiThw1max_(pset.getParameter<double>("tanPhiThw1max")),
0021       tanPhiThw1min_(pset.getParameter<double>("tanPhiThw1min")),
0022       tanPhiThw0_(pset.getParameter<double>("tanPhiThw0")) {
0023   if (debug_)
0024     LogDebug("MuonPathAnalyticAnalyzer") << "MuonPathAnalyzer: constructor";
0025 
0026   fillLAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER();
0027 
0028   //shift phi
0029   int rawId;
0030   shift_filename_ = pset.getParameter<edm::FileInPath>("shift_filename");
0031   std::ifstream ifin3(shift_filename_.fullPath());
0032   double shift;
0033   if (ifin3.fail()) {
0034     throw cms::Exception("Missing Input File")
0035         << "MuonPathAnalyticAnalyzer::MuonPathAnalyticAnalyzer() -  Cannot find " << shift_filename_.fullPath();
0036   }
0037   while (ifin3.good()) {
0038     ifin3 >> rawId >> shift;
0039     shiftinfo_[rawId] = shift;
0040   }
0041 
0042   //shift theta
0043 
0044   shift_theta_filename_ = pset.getParameter<edm::FileInPath>("shift_theta_filename");
0045   std::ifstream ifin4(shift_theta_filename_.fullPath());
0046   if (ifin4.fail()) {
0047     throw cms::Exception("Missing Input File")
0048         << "MuonPathAnalyzerPerSL::MuonPathAnalyzerPerSL() -  Cannot find " << shift_theta_filename_.fullPath();
0049   }
0050 
0051   while (ifin4.good()) {
0052     ifin4 >> rawId >> shift;
0053     shiftthetainfo_[rawId] = shift;
0054   }
0055 
0056   chosen_sl_ = pset.getParameter<int>("trigger_with_sl");
0057 
0058   if (chosen_sl_ != 1 && chosen_sl_ != 3 && chosen_sl_ != 4) {
0059     LogDebug("MuonPathAnalyticAnalyzer") << "chosen sl must be 1,3 or 4(both superlayers)";
0060     assert(chosen_sl_ != 1 && chosen_sl_ != 3 && chosen_sl_ != 4);  //4 means run using the two superlayers
0061   }
0062 
0063   dtGeomH = iC.esConsumes<DTGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
0064   globalcoordsobtainer_ = globalcoordsobtainer;
0065 }
0066 
0067 MuonPathAnalyticAnalyzer::~MuonPathAnalyticAnalyzer() {
0068   if (debug_)
0069     LogDebug("MuonPathAnalyticAnalyzer") << "MuonPathAnalyzer: destructor";
0070 }
0071 
0072 // ============================================================================
0073 // Main methods (initialise, run, finish)
0074 // ============================================================================
0075 void MuonPathAnalyticAnalyzer::initialise(const edm::EventSetup &iEventSetup) {
0076   if (debug_)
0077     LogDebug("MuonPathAnalyticAnalyzer") << "MuonPathAnalyticAnalyzer::initialiase";
0078 
0079   auto geom = iEventSetup.getHandle(dtGeomH);
0080   dtGeo_ = &(*geom);
0081 }
0082 
0083 void MuonPathAnalyticAnalyzer::run(edm::Event &iEvent,
0084                                    const edm::EventSetup &iEventSetup,
0085                                    MuonPathPtrs &muonpaths,
0086                                    std::vector<metaPrimitive> &metaPrimitives) {
0087   if (debug_)
0088     LogDebug("MuonPathAnalyticAnalyzer") << "MuonPathAnalyticAnalyzer: run";
0089 
0090   // fit per SL (need to allow for multiple outputs for a single mpath)
0091   for (auto &muonpath : muonpaths) {
0092     analyze(muonpath, metaPrimitives);
0093   }
0094 }
0095 
0096 void MuonPathAnalyticAnalyzer::finish() {
0097   if (debug_)
0098     LogDebug("MuonPathAnalyticAnalyzer") << "MuonPathAnalyzer: finish";
0099 };
0100 
0101 //------------------------------------------------------------------
0102 //--- Metodos privados
0103 //------------------------------------------------------------------
0104 
0105 void MuonPathAnalyticAnalyzer::analyze(MuonPathPtr &inMPath, std::vector<metaPrimitive> &metaPrimitives) {
0106   if (debug_)
0107     LogDebug("MuonPathAnalyticAnalyzer") << "DTp2:analyze \t\t\t\t starts";
0108   // LOCATE MPATH
0109   int selected_Id = 0;
0110   if (inMPath->primitive(0)->tdcTimeStamp() != -1)
0111     selected_Id = inMPath->primitive(0)->cameraId();
0112   else if (inMPath->primitive(1)->tdcTimeStamp() != -1)
0113     selected_Id = inMPath->primitive(1)->cameraId();
0114   else if (inMPath->primitive(2)->tdcTimeStamp() != -1)
0115     selected_Id = inMPath->primitive(2)->cameraId();
0116   else if (inMPath->primitive(3)->tdcTimeStamp() != -1)
0117     selected_Id = inMPath->primitive(3)->cameraId();
0118 
0119   DTLayerId thisLId(selected_Id);
0120   if (debug_)
0121     LogDebug("MuonPathAnalyticAnalyzer") << "Building up MuonPathSLId from rawId in the Primitive";
0122   DTSuperLayerId MuonPathSLId(thisLId.wheel(), thisLId.station(), thisLId.sector(), thisLId.superLayer());
0123   if (debug_)
0124     LogDebug("MuonPathAnalyticAnalyzer") << "The MuonPathSLId is" << MuonPathSLId;
0125 
0126   if (debug_)
0127     LogDebug("MuonPathAnalyticAnalyzer")
0128         << "DTp2:analyze \t\t\t\t In analyze function checking if inMPath->isAnalyzable() " << inMPath->isAnalyzable();
0129 
0130   if (chosen_sl_ < 4 && thisLId.superLayer() != chosen_sl_)
0131     return;  // avoid running when mpath not in chosen SL (for 1SL fitting)
0132 
0133   auto mPath = std::make_shared<MuonPath>(inMPath);
0134   mPath->setQuality(NOPATH);
0135 
0136   int wi[4], wires[4], t0s[4], valids[4];
0137   // bool is_four_hit = true;
0138   for (int j = 0; j < NUM_LAYERS; j++) {
0139     if (mPath->primitive(j)->isValidTime()) {
0140       wi[j] = mPath->primitive(j)->channelId();
0141       wires[j] = mPath->primitive(j)->channelId();
0142       t0s[j] = mPath->primitive(j)->tdcTimeStamp();
0143       valids[j] = 1;
0144     } else {
0145       wi[j] = -1;
0146       wires[j] = -1;
0147       t0s[j] = -1;
0148       valids[j] = 0;
0149       // is_four_hit = false;
0150     }
0151   }
0152 
0153   if (wi[0] < 0)
0154     wi[0] = wi[1];
0155   else if (wi[1] < 0)
0156     wi[1] = wi[0];
0157   else if (wi[2] < 0)
0158     wi[2] = wi[1] - 1;
0159   else if (wi[3] < 0)
0160     wi[3] = wi[2];
0161 
0162   int cell_horiz_layout[4];
0163   for (int lay = 0; lay < NUM_LAYERS; lay++) {
0164     cell_horiz_layout[lay] = (wi[lay] - wi[0]) * 2;
0165     if (lay % 2 != 0)
0166       cell_horiz_layout[lay]--;
0167   }
0168 
0169   // calculate the coarse offset position
0170   int tmp = 1;
0171   if (valids[1] == 0)
0172     tmp = 3;
0173   int coarse_pos = (wi[tmp] * 2 - cell_horiz_layout[tmp]) * 21 * std::pow(2, 4);
0174 
0175   //calculate the relative position of wires in mm wrt layer 0's cell wire
0176   int xwire_mm[4];
0177   for (int lay = 0; lay < NUM_LAYERS; lay++) {
0178     xwire_mm[lay] = 21 * cell_horiz_layout[lay];
0179   }
0180 
0181   // divide the timestamps in coarse + reduced part
0182   int valid_coarse_times[4], min_coarse_time = 999999, max_coarse_time = -999999;
0183   for (int lay = 0; lay < NUM_LAYERS; lay++) {
0184     if (valids[lay] == 1) {
0185       valid_coarse_times[lay] = (t0s[lay] >> (TDCTIME_REDUCED_SIZE - 1));
0186       if (valid_coarse_times[lay] < min_coarse_time) {
0187         min_coarse_time = valid_coarse_times[lay];
0188       }
0189       if (valid_coarse_times[lay] > max_coarse_time) {
0190         max_coarse_time = valid_coarse_times[lay];
0191       }
0192     } else {
0193       valid_coarse_times[lay] = -1;
0194     }
0195   }
0196 
0197   if (max_coarse_time - min_coarse_time >= 2)
0198     return;
0199   int coarse_offset = max_coarse_time - 1;
0200 
0201   int reduced_times[4];
0202   for (int lay = 0; lay < NUM_LAYERS; lay++) {
0203     reduced_times[lay] =
0204         ((1 - ((max_coarse_time & 1) ^ ((t0s[lay] >> (TDCTIME_REDUCED_SIZE - 1)) & 1))) << (TDCTIME_REDUCED_SIZE - 1));
0205     reduced_times[lay] += (t0s[lay] & std::stoi(std::string(TDCTIME_REDUCED_SIZE - 1, '1'), nullptr, 2));
0206   }
0207   std::vector<LATCOMB_CONSTANTS> latcomb_consts_arr;
0208   for (auto &elem : LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER)
0209     if (elem.cell_valid_layout.valid[0] == valids[0] && elem.cell_valid_layout.valid[1] == valids[1] &&
0210         elem.cell_valid_layout.valid[2] == valids[2] && elem.cell_valid_layout.valid[3] == valids[3] &&
0211         elem.cell_valid_layout.cell_horiz_layout[0] == cell_horiz_layout[0] &&
0212         elem.cell_valid_layout.cell_horiz_layout[1] == cell_horiz_layout[1] &&
0213         elem.cell_valid_layout.cell_horiz_layout[2] == cell_horiz_layout[2] &&
0214         elem.cell_valid_layout.cell_horiz_layout[3] == cell_horiz_layout[3])
0215       for (auto &ind_latcomb_consts : elem.latcomb_constants)
0216         latcomb_consts_arr.push_back(ind_latcomb_consts);
0217   for (auto &latcomb_consts : latcomb_consts_arr) {
0218     segment_fitter(MuonPathSLId,
0219                    wires,
0220                    t0s,
0221                    valids,
0222                    reduced_times,
0223                    cell_horiz_layout,
0224                    latcomb_consts,
0225                    xwire_mm,
0226                    coarse_pos,
0227                    coarse_offset,
0228                    metaPrimitives);
0229   }
0230 }
0231 
0232 int MuonPathAnalyticAnalyzer::compute_parameter(MAGNITUDE constants, int t0s[4], int DIV_SHR_BITS, int INCREASED_RES) {
0233   long int result = 0;
0234   for (int lay = 0; lay < NUM_LAYERS; lay++) {
0235     result += constants.coeff[lay] * t0s[lay];
0236   }
0237   result = ((result * int(std::pow(2, INCREASED_RES)) + constants.add) * constants.mult) >> DIV_SHR_BITS;
0238 
0239   return result;
0240 }
0241 
0242 void MuonPathAnalyticAnalyzer::segment_fitter(DTSuperLayerId MuonPathSLId,
0243                                               int wires[4],
0244                                               int t0s[4],
0245                                               int valid[4],
0246                                               int reduced_times[4],
0247                                               int cell_horiz_layout[4],
0248                                               LATCOMB_CONSTANTS latcomb_consts,
0249                                               int xwire_mm[4],
0250                                               int coarse_pos,
0251                                               int coarse_offset,
0252                                               std::vector<cmsdt::metaPrimitive> &metaPrimitives) {
0253   auto latcomb = latcomb_consts.latcomb;
0254   auto constants = latcomb_consts.constants;
0255   bool is_four_hit = true;
0256 
0257   if (latcomb == 0)
0258     return;
0259 
0260   int lat_array[4];
0261   for (int lay = 0; lay < NUM_LAYERS; lay++) {
0262     if (((latcomb >> lay) & 1) != 0) {
0263       lat_array[lay] = 1;
0264     } else
0265       lat_array[lay] = -1;
0266   }
0267 
0268   int time = compute_parameter(constants.t0, reduced_times, DIV_SHR_BITS_T0, INCREASED_RES_T0);
0269   int pos = compute_parameter(constants.pos, reduced_times, DIV_SHR_BITS_POS, INCREASED_RES_POS);
0270   int slope = compute_parameter(constants.slope, reduced_times, DIV_SHR_BITS_SLOPE, INCREASED_RES_SLOPE);
0271   int slope_xhh =
0272       compute_parameter(constants.slope_xhh, reduced_times, DIV_SHR_BITS_SLOPE_XHH, INCREASED_RES_SLOPE_XHH);
0273 
0274   int bx_time = time + (coarse_offset << (TDCTIME_REDUCED_SIZE - 1));
0275 
0276   pos += coarse_pos;
0277 
0278   int chi2_mm2_p = 0;
0279   for (int lay = 0; lay < NUM_LAYERS; lay++) {
0280     int drift_time = reduced_times[lay] - time;
0281     if (valid[lay] == 1 && (drift_time < 0 || drift_time > MAXDRIFT))
0282       return;
0283 
0284     int drift_dist = ((((drift_time * INCREASED_RES_POS_POW) + DTDD_PREADD) * DTDD_MULT) >> DTDD_SHIFTR_BITS);
0285     int xdist = xwire_mm[lay] * pow(2, 4) - (pos - coarse_pos) + lat_array[lay] * drift_dist;
0286     xdist -= (3 - 2 * (3 - lay)) * slope_xhh;
0287     int res = xdist;
0288     if (valid[lay] == 0) {
0289       res = 0;
0290       is_four_hit = false;
0291     }
0292     chi2_mm2_p += res * res * 4;
0293   }
0294 
0295   int quality = HIGHQ;
0296   if (!is_four_hit)
0297     quality = LOWQ;
0298 
0299   // Obtain coordinate values in floating point
0300   double pos_f, slope_f, chi2_f;
0301   DTWireId wireId(MuonPathSLId, 2, 1);
0302 
0303   pos_f = double(pos) +
0304           int(10 * shiftinfo_[wireId.rawId()] * INCREASED_RES_POS_POW);  // position in mm * precision in JM RF
0305   pos_f /= (10. * INCREASED_RES_POS_POW);                                // position in cm w.r.t center of the chamber
0306   slope_f = -(double(slope) / INCREASED_RES_SLOPE_POW);
0307   chi2_f = double(chi2_mm2_p) / (16. * 64. * 100.);
0308 
0309   // Impose the thresholds
0310   if (MuonPathSLId.superLayer() != 2)
0311     if (std::abs(slope_f) > tanPhiTh_)
0312       return;
0313   if (chi2_f > (chi2Th_))
0314     return;
0315 
0316   // Compute phi and phib
0317   // Implemented using cmssw geometry and fw-like approach
0318   DTChamberId ChId(MuonPathSLId.wheel(), MuonPathSLId.station(), MuonPathSLId.sector());
0319   // fw-like variables
0320   double phi = -999.;
0321   double phiB = -999.;
0322   // cmssw-like variables
0323   double phi_cmssw = -999.;
0324   double phiB_cmssw = -999.;
0325   if (MuonPathSLId.superLayer() != 2) {
0326     double z = 0;
0327     double z1 = Z_POS_SL;
0328     double z3 = -1. * z1;
0329     if (ChId.station() == 3 or ChId.station() == 4) {
0330       z1 = z1 + Z_SHIFT_MB4;
0331       z3 = z3 + Z_SHIFT_MB4;
0332     }
0333     if (MuonPathSLId.superLayer() == 1)
0334       z = z1;
0335     else if (MuonPathSLId.superLayer() == 3)
0336       z = z3;
0337 
0338     // cmssw-like calculation
0339     GlobalPoint jm_x_cmssw_global = dtGeo_->chamber(ChId)->toGlobal(LocalPoint(pos_f, 0., z));
0340     int thisec = MuonPathSLId.sector();
0341     if (thisec == 13)
0342       thisec = 4;
0343     if (thisec == 14)
0344       thisec = 10;
0345     phi_cmssw = jm_x_cmssw_global.phi() - PHI_CONV * (thisec - 1);
0346     double psi = atan(slope_f);
0347     phiB_cmssw = hasPosRF(MuonPathSLId.wheel(), MuonPathSLId.sector()) ? psi - phi_cmssw : -psi - phi_cmssw;
0348 
0349     auto global_coords =
0350         globalcoordsobtainer_->get_global_coordinates(ChId.rawId(), MuonPathSLId.superLayer(), pos, slope);
0351     phi = global_coords[0];
0352     phiB = global_coords[1];
0353   } else {
0354     // Impose the thresholds
0355     if (std::abs(MuonPathSLId.wheel()) == 2) {
0356       if (slope_f > tanPhiThw2max_ or slope_f < tanPhiThw2min_)
0357         return;
0358     }
0359     if (std::abs(MuonPathSLId.wheel()) == 1) {
0360       if (slope_f > tanPhiThw1max_ or slope_f < tanPhiThw1min_)
0361         return;
0362     }
0363     if (MuonPathSLId.wheel() == 0) {
0364       if (std::abs(slope_f) > tanPhiThw0_)
0365         return;
0366     }
0367 
0368     // fw-like calculation
0369     DTLayerId SL2_layer2Id(MuonPathSLId, 2);
0370     double z_shift = shiftthetainfo_[SL2_layer2Id.rawId()];
0371     double jm_y = hasPosRF(MuonPathSLId.wheel(), MuonPathSLId.sector()) ? z_shift - pos_f : z_shift + pos_f;
0372     phi = jm_y;
0373     phiB = slope_f;
0374 
0375     // cmssw-like calculation
0376     LocalPoint wire1_in_layer(dtGeo_->layer(SL2_layer2Id)->specificTopology().wirePosition(1), 0, -0.65);
0377     GlobalPoint wire1_in_global = dtGeo_->layer(SL2_layer2Id)->toGlobal(wire1_in_layer);
0378     LocalPoint wire1_in_sl = dtGeo_->superLayer(MuonPathSLId)->toLocal(wire1_in_global);
0379     double x_shift = wire1_in_sl.x();
0380     jm_y = (dtGeo_->superLayer(MuonPathSLId)
0381                 ->toGlobal(LocalPoint(double(pos) / (10 * pow(2, INCREASED_RES_POS)) + x_shift, 0., 0)))
0382                .z();
0383     phi_cmssw = jm_y;
0384     phiB_cmssw = slope_f;
0385   }
0386 
0387   // get the lateralities (in reverse order) in order to fill the metaprimitive
0388   std::vector<int> lateralities = getLateralityCombination(latcomb);
0389   for (int lay = 0; lay < NUM_LAYERS; lay++) {
0390     if (valid[lay] == 0)
0391       lateralities[lay] = -1;
0392   }
0393 
0394   metaPrimitives.emplace_back(metaPrimitive({MuonPathSLId.rawId(),
0395                                              double(bx_time),
0396                                              pos_f,
0397                                              slope_f,
0398                                              phi,
0399                                              phiB,
0400                                              phi_cmssw,
0401                                              phiB_cmssw,
0402                                              chi2_f,
0403                                              quality,
0404                                              wires[0],
0405                                              t0s[0],
0406                                              lateralities[0],
0407                                              wires[1],
0408                                              t0s[1],
0409                                              lateralities[1],
0410                                              wires[2],
0411                                              t0s[2],
0412                                              lateralities[2],
0413                                              wires[3],
0414                                              t0s[3],
0415                                              lateralities[3],
0416                                              -1,
0417                                              -1,
0418                                              -1,
0419                                              -1,
0420                                              -1,
0421                                              -1,
0422                                              -1,
0423                                              -1,
0424                                              -1,
0425                                              -1,
0426                                              -1,
0427                                              -1,
0428                                              -1}));
0429 }
0430 
0431 std::vector<int> MuonPathAnalyticAnalyzer::getLateralityCombination(int latcomb) {
0432   // returns the latcomb as a binary number represented in a vector of integers
0433   // careful, the output is in reverse order
0434   std::vector<int> binaryNum = {};
0435   while (latcomb > 1) {
0436     binaryNum.push_back(latcomb % 2);
0437     latcomb = latcomb / 2;
0438   }
0439   binaryNum.push_back(latcomb);
0440   while (binaryNum.size() < 4)
0441     binaryNum.push_back(0);
0442   return binaryNum;
0443 }
0444 
0445 void MuonPathAnalyticAnalyzer::fillLAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER() {
0446   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, 0, -1}, {1, 1, 0, 1}},
0447                                                     {
0448                                                         {1,
0449                                                          {
0450                                                              {-6170, {1, 0, 0, -1}, 56936},
0451                                                              {239, {0, 1, 0, -1}, 4380},
0452                                                              {37, {0, 1, 0, -1}, 3559},
0453                                                              {776, {2, 3, 0, -1}, 16384},
0454                                                          }},
0455                                                         {2,
0456                                                          {
0457                                                              {-30885, {-1, 3, 0, -2}, 18979},
0458                                                              {-1583769, {1, 0, 0, -1}, 2920},
0459                                                              {-6133, {1, 0, 0, -1}, 2372},
0460                                                              {-771, {2, 3, 0, 1}, 10923},
0461                                                          }},
0462                                                         {3,
0463                                                          {
0464                                                              {-6170, {1, 0, 0, -1}, 56936},
0465                                                              {-1584008, {-1, 1, 0, 0}, 8759},
0466                                                              {-6170, {-1, 1, 0, 0}, 7117},
0467                                                              {-773, {-2, 3, 0, 1}, 32768},
0468                                                          }},
0469                                                         {8,
0470                                                          {
0471                                                              {-6170, {-1, 0, 0, 1}, 56936},
0472                                                              {-1584008, {1, -1, 0, 0}, 8759},
0473                                                              {-6170, {1, -1, 0, 0}, 7117},
0474                                                              {775, {-2, 3, 0, 1}, 32768},
0475                                                          }},
0476                                                         {9,
0477                                                          {
0478                                                              {-30885, {1, -3, 0, 2}, 18979},
0479                                                              {-1583769, {-1, 0, 0, 1}, 2920},
0480                                                              {-6133, {-1, 0, 0, 1}, 2372},
0481                                                              {777, {2, 3, 0, 1}, 10923},
0482                                                          }},
0483                                                         {10,
0484                                                          {
0485                                                              {-6170, {-1, 0, 0, 1}, 56936},
0486                                                              {239, {0, -1, 0, 1}, 4380},
0487                                                              {37, {0, -1, 0, 1}, 3559},
0488                                                              {-772, {2, 3, 0, -1}, 16384},
0489                                                          }},
0490                                                     }});
0491   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, 0, 1}, {0, 1, 1, 1}},
0492                                                     {
0493                                                         {2,
0494                                                          {
0495                                                              {-6170, {0, 1, -1, 0}, 56936},
0496                                                              {1584248, {0, 0, 1, -1}, 8759},
0497                                                              {6206, {0, 0, 1, -1}, 7117},
0498                                                              {1, {0, 1, 2, -1}, 32768},
0499                                                          }},
0500                                                         {4,
0501                                                          {
0502                                                              {-6170, {0, -1, 1, 0}, 56936},
0503                                                              {3168495, {0, 1, 0, -1}, 4380},
0504                                                              {12413, {0, 1, 0, -1}, 3559},
0505                                                              {2, {0, 1, 2, 1}, 16384},
0506                                                          }},
0507                                                         {6,
0508                                                          {
0509                                                              {-6170, {0, 2, -1, -1}, 56936},
0510                                                              {1584248, {0, -1, 1, 0}, 8759},
0511                                                              {6206, {0, -1, 1, 0}, 7117},
0512                                                              {1, {0, -1, 2, 1}, 32768},
0513                                                          }},
0514                                                         {8,
0515                                                          {
0516                                                              {-6170, {0, -2, 1, 1}, 56936},
0517                                                              {1584248, {0, 1, -1, 0}, 8759},
0518                                                              {6206, {0, 1, -1, 0}, 7117},
0519                                                              {1, {0, -1, 2, 1}, 32768},
0520                                                          }},
0521                                                         {10,
0522                                                          {
0523                                                              {-6170, {0, 1, -1, 0}, 56936},
0524                                                              {3168495, {0, -1, 0, 1}, 4380},
0525                                                              {12413, {0, -1, 0, 1}, 3559},
0526                                                              {2, {0, 1, 2, 1}, 16384},
0527                                                          }},
0528                                                         {12,
0529                                                          {
0530                                                              {-6170, {0, -1, 1, 0}, 56936},
0531                                                              {1584248, {0, 0, -1, 1}, 8759},
0532                                                              {6206, {0, 0, -1, 1}, 7117},
0533                                                              {1, {0, 1, 2, -1}, 32768},
0534                                                          }},
0535                                                     }});
0536   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, -2, -3}, {1, 1, 0, 1}},
0537                                                     {
0538                                                         {1,
0539                                                          {
0540                                                              {-18546, {1, 0, 0, -1}, 56936},
0541                                                              {-3168017, {0, 1, 0, -1}, 4380},
0542                                                              {-12339, {0, 1, 0, -1}, 3559},
0543                                                              {2, {2, 3, 0, -1}, 16384},
0544                                                          }},
0545                                                         {2,
0546                                                          {
0547                                                              {-55637, {-1, 3, 0, -2}, 18979},
0548                                                              {-4752025, {1, 0, 0, -1}, 2920},
0549                                                              {-18509, {1, 0, 0, -1}, 2372},
0550                                                              {3, {2, 3, 0, 1}, 10923},
0551                                                          }},
0552                                                         {3,
0553                                                          {
0554                                                              {-18546, {1, 0, 0, -1}, 56936},
0555                                                              {-1584008, {-1, 1, 0, 0}, 8759},
0556                                                              {-6170, {-1, 1, 0, 0}, 7117},
0557                                                              {1, {-2, 3, 0, 1}, 32768},
0558                                                          }},
0559                                                         {8,
0560                                                          {
0561                                                              {-18546, {-1, 0, 0, 1}, 56936},
0562                                                              {-1584008, {1, -1, 0, 0}, 8759},
0563                                                              {-6170, {1, -1, 0, 0}, 7117},
0564                                                              {1, {-2, 3, 0, 1}, 32768},
0565                                                          }},
0566                                                         {9,
0567                                                          {
0568                                                              {-55637, {1, -3, 0, 2}, 18979},
0569                                                              {-4752025, {-1, 0, 0, 1}, 2920},
0570                                                              {-18509, {-1, 0, 0, 1}, 2372},
0571                                                              {3, {2, 3, 0, 1}, 10923},
0572                                                          }},
0573                                                         {10,
0574                                                          {
0575                                                              {-18546, {-1, 0, 0, 1}, 56936},
0576                                                              {-3168017, {0, -1, 0, 1}, 4380},
0577                                                              {-12339, {0, -1, 0, 1}, 3559},
0578                                                              {2, {2, 3, 0, -1}, 16384},
0579                                                          }},
0580                                                     }});
0581   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 0, 1}, {0, 1, 1, 1}},
0582                                                     {
0583                                                         {2,
0584                                                          {
0585                                                              {6206, {0, 1, -1, 0}, 56936},
0586                                                              {1584248, {0, 0, 1, -1}, 8759},
0587                                                              {6206, {0, 0, 1, -1}, 7117},
0588                                                              {775, {0, 1, 2, -1}, 32768},
0589                                                          }},
0590                                                         {4,
0591                                                          {
0592                                                              {6206, {0, -1, 1, 0}, 56936},
0593                                                              {239, {0, 1, 0, -1}, 4380},
0594                                                              {37, {0, 1, 0, -1}, 3559},
0595                                                              {-772, {0, 1, 2, 1}, 16384},
0596                                                          }},
0597                                                         {6,
0598                                                          {
0599                                                              {18582, {0, 2, -1, -1}, 56936},
0600                                                              {-1584008, {0, -1, 1, 0}, 8759},
0601                                                              {-6170, {0, -1, 1, 0}, 7117},
0602                                                              {-773, {0, -1, 2, 1}, 32768},
0603                                                          }},
0604                                                         {8,
0605                                                          {
0606                                                              {18582, {0, -2, 1, 1}, 56936},
0607                                                              {-1584008, {0, 1, -1, 0}, 8759},
0608                                                              {-6170, {0, 1, -1, 0}, 7117},
0609                                                              {775, {0, -1, 2, 1}, 32768},
0610                                                          }},
0611                                                         {10,
0612                                                          {
0613                                                              {6206, {0, 1, -1, 0}, 56936},
0614                                                              {239, {0, -1, 0, 1}, 4380},
0615                                                              {37, {0, -1, 0, 1}, 3559},
0616                                                              {776, {0, 1, 2, 1}, 16384},
0617                                                          }},
0618                                                         {12,
0619                                                          {
0620                                                              {6206, {0, -1, 1, 0}, 56936},
0621                                                              {1584248, {0, 0, -1, 1}, 8759},
0622                                                              {6206, {0, 0, -1, 1}, 7117},
0623                                                              {-773, {0, 1, 2, -1}, 32768},
0624                                                          }},
0625                                                     }});
0626   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 2, 1}, {1, 1, 1, 0}},
0627                                                     {
0628                                                         {1,
0629                                                          {
0630                                                              {18582, {1, 1, -2, 0}, 56936},
0631                                                              {1584248, {0, 1, -1, 0}, 8759},
0632                                                              {6206, {0, 1, -1, 0}, 7117},
0633                                                              {1, {1, 2, -1, 0}, 32768},
0634                                                          }},
0635                                                         {2,
0636                                                          {
0637                                                              {18582, {0, 1, -1, 0}, 56936},
0638                                                              {3168495, {1, 0, -1, 0}, 4380},
0639                                                              {12413, {1, 0, -1, 0}, 3559},
0640                                                              {2, {1, 2, 1, 0}, 16384},
0641                                                          }},
0642                                                         {3,
0643                                                          {
0644                                                              {18582, {0, 1, -1, 0}, 56936},
0645                                                              {1584248, {-1, 1, 0, 0}, 8759},
0646                                                              {6206, {-1, 1, 0, 0}, 7117},
0647                                                              {1, {-1, 2, 1, 0}, 32768},
0648                                                          }},
0649                                                         {4,
0650                                                          {
0651                                                              {18582, {0, -1, 1, 0}, 56936},
0652                                                              {1584248, {1, -1, 0, 0}, 8759},
0653                                                              {6206, {1, -1, 0, 0}, 7117},
0654                                                              {1, {-1, 2, 1, 0}, 32768},
0655                                                          }},
0656                                                         {5,
0657                                                          {
0658                                                              {18582, {0, -1, 1, 0}, 56936},
0659                                                              {3168495, {-1, 0, 1, 0}, 4380},
0660                                                              {12413, {-1, 0, 1, 0}, 3559},
0661                                                              {2, {1, 2, 1, 0}, 16384},
0662                                                          }},
0663                                                         {6,
0664                                                          {
0665                                                              {18582, {-1, -1, 2, 0}, 56936},
0666                                                              {1584248, {0, -1, 1, 0}, 8759},
0667                                                              {6206, {0, -1, 1, 0}, 7117},
0668                                                              {1, {1, 2, -1, 0}, 32768},
0669                                                          }},
0670                                                     }});
0671   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 0, -1}, {1, 0, 1, 1}},
0672                                                     {
0673                                                         {1,
0674                                                          {
0675                                                              {-6170, {1, 0, 0, -1}, 56936},
0676                                                              {-1584008, {0, 0, 1, -1}, 8759},
0677                                                              {-6170, {0, 0, 1, -1}, 7117},
0678                                                              {-773, {1, 0, 3, -2}, 32768},
0679                                                          }},
0680                                                         {4,
0681                                                          {
0682                                                              {-6133, {-2, 0, 3, -1}, 18979},
0683                                                              {-1583769, {1, 0, 0, -1}, 2920},
0684                                                              {-6133, {1, 0, 0, -1}, 2372},
0685                                                              {777, {1, 0, 3, 2}, 10923},
0686                                                          }},
0687                                                         {5,
0688                                                          {
0689                                                              {-6170, {1, 0, 0, -1}, 56936},
0690                                                              {239, {-1, 0, 1, 0}, 4380},
0691                                                              {37, {-1, 0, 1, 0}, 3559},
0692                                                              {776, {-1, 0, 3, 2}, 16384},
0693                                                          }},
0694                                                         {8,
0695                                                          {
0696                                                              {-6170, {-1, 0, 0, 1}, 56936},
0697                                                              {239, {1, 0, -1, 0}, 4380},
0698                                                              {37, {1, 0, -1, 0}, 3559},
0699                                                              {-772, {-1, 0, 3, 2}, 16384},
0700                                                          }},
0701                                                         {9,
0702                                                          {
0703                                                              {-6133, {2, 0, -3, 1}, 18979},
0704                                                              {-1583769, {-1, 0, 0, 1}, 2920},
0705                                                              {-6133, {-1, 0, 0, 1}, 2372},
0706                                                              {-771, {1, 0, 3, 2}, 10923},
0707                                                          }},
0708                                                         {12,
0709                                                          {
0710                                                              {-6170, {-1, 0, 0, 1}, 56936},
0711                                                              {-1584008, {0, 0, -1, 1}, 8759},
0712                                                              {-6170, {0, 0, -1, 1}, 7117},
0713                                                              {775, {1, 0, 3, -2}, 32768},
0714                                                          }},
0715                                                     }});
0716   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, -2, -1}, {1, 1, 1, 0}},
0717                                                     {
0718                                                         {1,
0719                                                          {
0720                                                              {-18546, {1, 1, -2, 0}, 56936},
0721                                                              {-1584008, {0, 1, -1, 0}, 8759},
0722                                                              {-6170, {0, 1, -1, 0}, 7117},
0723                                                              {1, {1, 2, -1, 0}, 32768},
0724                                                          }},
0725                                                         {2,
0726                                                          {
0727                                                              {-18546, {0, 1, -1, 0}, 56936},
0728                                                              {-3168017, {1, 0, -1, 0}, 4380},
0729                                                              {-12339, {1, 0, -1, 0}, 3559},
0730                                                              {2, {1, 2, 1, 0}, 16384},
0731                                                          }},
0732                                                         {3,
0733                                                          {
0734                                                              {-18546, {0, 1, -1, 0}, 56936},
0735                                                              {-1584008, {-1, 1, 0, 0}, 8759},
0736                                                              {-6170, {-1, 1, 0, 0}, 7117},
0737                                                              {1, {-1, 2, 1, 0}, 32768},
0738                                                          }},
0739                                                         {4,
0740                                                          {
0741                                                              {-18546, {0, -1, 1, 0}, 56936},
0742                                                              {-1584008, {1, -1, 0, 0}, 8759},
0743                                                              {-6170, {1, -1, 0, 0}, 7117},
0744                                                              {1, {-1, 2, 1, 0}, 32768},
0745                                                          }},
0746                                                         {5,
0747                                                          {
0748                                                              {-18546, {0, -1, 1, 0}, 56936},
0749                                                              {-3168017, {-1, 0, 1, 0}, 4380},
0750                                                              {-12339, {-1, 0, 1, 0}, 3559},
0751                                                              {2, {1, 2, 1, 0}, 16384},
0752                                                          }},
0753                                                         {6,
0754                                                          {
0755                                                              {-18546, {-1, -1, 2, 0}, 56936},
0756                                                              {-1584008, {0, -1, 1, 0}, 8759},
0757                                                              {-6170, {0, -1, 1, 0}, 7117},
0758                                                              {1, {1, 2, -1, 0}, 32768},
0759                                                          }},
0760                                                     }});
0761   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, -2, -3}, {0, 1, 1, 1}},
0762                                                     {
0763                                                         {2,
0764                                                          {
0765                                                              {-18546, {0, 1, -1, 0}, 56936},
0766                                                              {-1584008, {0, 0, 1, -1}, 8759},
0767                                                              {-6170, {0, 0, 1, -1}, 7117},
0768                                                              {1, {0, 1, 2, -1}, 32768},
0769                                                          }},
0770                                                         {4,
0771                                                          {
0772                                                              {-18546, {0, -1, 1, 0}, 56936},
0773                                                              {-3168017, {0, 1, 0, -1}, 4380},
0774                                                              {-12339, {0, 1, 0, -1}, 3559},
0775                                                              {2, {0, 1, 2, 1}, 16384},
0776                                                          }},
0777                                                         {6,
0778                                                          {
0779                                                              {-18546, {0, 2, -1, -1}, 56936},
0780                                                              {-1584008, {0, -1, 1, 0}, 8759},
0781                                                              {-6170, {0, -1, 1, 0}, 7117},
0782                                                              {1, {0, -1, 2, 1}, 32768},
0783                                                          }},
0784                                                         {8,
0785                                                          {
0786                                                              {-18546, {0, -2, 1, 1}, 56936},
0787                                                              {-1584008, {0, 1, -1, 0}, 8759},
0788                                                              {-6170, {0, 1, -1, 0}, 7117},
0789                                                              {1, {0, -1, 2, 1}, 32768},
0790                                                          }},
0791                                                         {10,
0792                                                          {
0793                                                              {-18546, {0, 1, -1, 0}, 56936},
0794                                                              {-3168017, {0, -1, 0, 1}, 4380},
0795                                                              {-12339, {0, -1, 0, 1}, 3559},
0796                                                              {2, {0, 1, 2, 1}, 16384},
0797                                                          }},
0798                                                         {12,
0799                                                          {
0800                                                              {-18546, {0, -1, 1, 0}, 56936},
0801                                                              {-1584008, {0, 0, -1, 1}, 8759},
0802                                                              {-6170, {0, 0, -1, 1}, 7117},
0803                                                              {1, {0, 1, 2, -1}, 32768},
0804                                                          }},
0805                                                     }});
0806   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, -2, -1}, {0, 1, 1, 1}},
0807                                                     {
0808                                                         {2,
0809                                                          {
0810                                                              {-18546, {0, 1, -1, 0}, 56936},
0811                                                              {1584248, {0, 0, 1, -1}, 8759},
0812                                                              {6206, {0, 0, 1, -1}, 7117},
0813                                                              {775, {0, 1, 2, -1}, 32768},
0814                                                          }},
0815                                                         {4,
0816                                                          {
0817                                                              {-18546, {0, -1, 1, 0}, 56936},
0818                                                              {239, {0, 1, 0, -1}, 4380},
0819                                                              {37, {0, 1, 0, -1}, 3559},
0820                                                              {-772, {0, 1, 2, 1}, 16384},
0821                                                          }},
0822                                                         {6,
0823                                                          {
0824                                                              {-6170, {0, 2, -1, -1}, 56936},
0825                                                              {-1584008, {0, -1, 1, 0}, 8759},
0826                                                              {-6170, {0, -1, 1, 0}, 7117},
0827                                                              {-773, {0, -1, 2, 1}, 32768},
0828                                                          }},
0829                                                         {8,
0830                                                          {
0831                                                              {-6170, {0, -2, 1, 1}, 56936},
0832                                                              {-1584008, {0, 1, -1, 0}, 8759},
0833                                                              {-6170, {0, 1, -1, 0}, 7117},
0834                                                              {775, {0, -1, 2, 1}, 32768},
0835                                                          }},
0836                                                         {10,
0837                                                          {
0838                                                              {-18546, {0, 1, -1, 0}, 56936},
0839                                                              {239, {0, -1, 0, 1}, 4380},
0840                                                              {37, {0, -1, 0, 1}, 3559},
0841                                                              {776, {0, 1, 2, 1}, 16384},
0842                                                          }},
0843                                                         {12,
0844                                                          {
0845                                                              {-18546, {0, -1, 1, 0}, 56936},
0846                                                              {1584248, {0, 0, -1, 1}, 8759},
0847                                                              {6206, {0, 0, -1, 1}, 7117},
0848                                                              {-773, {0, 1, 2, -1}, 32768},
0849                                                          }},
0850                                                     }});
0851   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, -2, -3}, {1, 1, 1, 0}},
0852                                                     {
0853                                                         {1,
0854                                                          {
0855                                                              {-18546, {1, 1, -2, 0}, 56936},
0856                                                              {-1584008, {0, 1, -1, 0}, 8759},
0857                                                              {-6170, {0, 1, -1, 0}, 7117},
0858                                                              {1, {1, 2, -1, 0}, 32768},
0859                                                          }},
0860                                                         {2,
0861                                                          {
0862                                                              {-18546, {0, 1, -1, 0}, 56936},
0863                                                              {-3168017, {1, 0, -1, 0}, 4380},
0864                                                              {-12339, {1, 0, -1, 0}, 3559},
0865                                                              {2, {1, 2, 1, 0}, 16384},
0866                                                          }},
0867                                                         {3,
0868                                                          {
0869                                                              {-18546, {0, 1, -1, 0}, 56936},
0870                                                              {-1584008, {-1, 1, 0, 0}, 8759},
0871                                                              {-6170, {-1, 1, 0, 0}, 7117},
0872                                                              {1, {-1, 2, 1, 0}, 32768},
0873                                                          }},
0874                                                         {4,
0875                                                          {
0876                                                              {-18546, {0, -1, 1, 0}, 56936},
0877                                                              {-1584008, {1, -1, 0, 0}, 8759},
0878                                                              {-6170, {1, -1, 0, 0}, 7117},
0879                                                              {1, {-1, 2, 1, 0}, 32768},
0880                                                          }},
0881                                                         {5,
0882                                                          {
0883                                                              {-18546, {0, -1, 1, 0}, 56936},
0884                                                              {-3168017, {-1, 0, 1, 0}, 4380},
0885                                                              {-12339, {-1, 0, 1, 0}, 3559},
0886                                                              {2, {1, 2, 1, 0}, 16384},
0887                                                          }},
0888                                                         {6,
0889                                                          {
0890                                                              {-18546, {-1, -1, 2, 0}, 56936},
0891                                                              {-1584008, {0, -1, 1, 0}, 8759},
0892                                                              {-6170, {0, -1, 1, 0}, 7117},
0893                                                              {1, {1, 2, -1, 0}, 32768},
0894                                                          }},
0895                                                     }});
0896   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 2, 1}, {0, 1, 1, 1}},
0897                                                     {
0898                                                         {2,
0899                                                          {
0900                                                              {18582, {0, 1, -1, 0}, 56936},
0901                                                              {-1584008, {0, 0, 1, -1}, 8759},
0902                                                              {-6170, {0, 0, 1, -1}, 7117},
0903                                                              {-773, {0, 1, 2, -1}, 32768},
0904                                                          }},
0905                                                         {4,
0906                                                          {
0907                                                              {18582, {0, -1, 1, 0}, 56936},
0908                                                              {239, {0, 1, 0, -1}, 4380},
0909                                                              {37, {0, 1, 0, -1}, 3559},
0910                                                              {776, {0, 1, 2, 1}, 16384},
0911                                                          }},
0912                                                         {6,
0913                                                          {
0914                                                              {6206, {0, 2, -1, -1}, 56936},
0915                                                              {1584248, {0, -1, 1, 0}, 8759},
0916                                                              {6206, {0, -1, 1, 0}, 7117},
0917                                                              {775, {0, -1, 2, 1}, 32768},
0918                                                          }},
0919                                                         {8,
0920                                                          {
0921                                                              {6206, {0, -2, 1, 1}, 56936},
0922                                                              {1584248, {0, 1, -1, 0}, 8759},
0923                                                              {6206, {0, 1, -1, 0}, 7117},
0924                                                              {-773, {0, -1, 2, 1}, 32768},
0925                                                          }},
0926                                                         {10,
0927                                                          {
0928                                                              {18582, {0, 1, -1, 0}, 56936},
0929                                                              {239, {0, -1, 0, 1}, 4380},
0930                                                              {37, {0, -1, 0, 1}, 3559},
0931                                                              {-772, {0, 1, 2, 1}, 16384},
0932                                                          }},
0933                                                         {12,
0934                                                          {
0935                                                              {18582, {0, -1, 1, 0}, 56936},
0936                                                              {-1584008, {0, 0, -1, 1}, 8759},
0937                                                              {-6170, {0, 0, -1, 1}, 7117},
0938                                                              {775, {0, 1, 2, -1}, 32768},
0939                                                          }},
0940                                                     }});
0941   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, -2, -1}, {1, 1, 1, 1}},
0942                                                     {
0943                                                         {4,
0944                                                          {
0945                                                              {-222510, {-6, -5, 14, -3}, 4067},
0946                                                              {-6334836, {4, 1, 0, -5}, 626},
0947                                                              {-24494, {4, 1, 0, -5}, 508},
0948                                                              {-3087, {1, 2, 7, 4}, 4681},
0949                                                          }},
0950                                                         {6,
0951                                                          {
0952                                                              {-24715, {-1, 1, 1, -1}, 28468},
0953                                                              {-6335315, {3, -1, 1, -3}, 876},
0954                                                              {-24568, {3, -1, 1, -3}, 712},
0955                                                              {-772, {1, 1, 1, 1}, 16384},
0956                                                          }},
0957                                                         {7,
0958                                                          {
0959                                                              {-37018, {5, 2, -1, -6}, 9489},
0960                                                              {-3168017, {-1, 0, 1, 0}, 4380},
0961                                                              {-12339, {-1, 0, 1, 0}, 3559},
0962                                                              {-2318, {-2, 1, 4, 3}, 10923},
0963                                                          }},
0964                                                         {0,
0965                                                          {
0966                                                              {0, {0, 0, 0, 0}, 0},
0967                                                              {0, {0, 0, 0, 0}, 0},
0968                                                              {0, {0, 0, 0, 0}, 0},
0969                                                              {0, {0, 0, 0, 0}, 0},
0970                                                          }},
0971                                                         {0,
0972                                                          {
0973                                                              {0, {0, 0, 0, 0}, 0},
0974                                                              {0, {0, 0, 0, 0}, 0},
0975                                                              {0, {0, 0, 0, 0}, 0},
0976                                                              {0, {0, 0, 0, 0}, 0},
0977                                                          }},
0978                                                         {0,
0979                                                          {
0980                                                              {0, {0, 0, 0, 0}, 0},
0981                                                              {0, {0, 0, 0, 0}, 0},
0982                                                              {0, {0, 0, 0, 0}, 0},
0983                                                              {0, {0, 0, 0, 0}, 0},
0984                                                          }},
0985                                                     }});
0986   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 2, 3}, {0, 1, 1, 1}},
0987                                                     {
0988                                                         {2,
0989                                                          {
0990                                                              {18582, {0, 1, -1, 0}, 56936},
0991                                                              {1584248, {0, 0, 1, -1}, 8759},
0992                                                              {6206, {0, 0, 1, -1}, 7117},
0993                                                              {1, {0, 1, 2, -1}, 32768},
0994                                                          }},
0995                                                         {4,
0996                                                          {
0997                                                              {18582, {0, -1, 1, 0}, 56936},
0998                                                              {3168495, {0, 1, 0, -1}, 4380},
0999                                                              {12413, {0, 1, 0, -1}, 3559},
1000                                                              {2, {0, 1, 2, 1}, 16384},
1001                                                          }},
1002                                                         {6,
1003                                                          {
1004                                                              {18582, {0, 2, -1, -1}, 56936},
1005                                                              {1584248, {0, -1, 1, 0}, 8759},
1006                                                              {6206, {0, -1, 1, 0}, 7117},
1007                                                              {1, {0, -1, 2, 1}, 32768},
1008                                                          }},
1009                                                         {8,
1010                                                          {
1011                                                              {18582, {0, -2, 1, 1}, 56936},
1012                                                              {1584248, {0, 1, -1, 0}, 8759},
1013                                                              {6206, {0, 1, -1, 0}, 7117},
1014                                                              {1, {0, -1, 2, 1}, 32768},
1015                                                          }},
1016                                                         {10,
1017                                                          {
1018                                                              {18582, {0, 1, -1, 0}, 56936},
1019                                                              {3168495, {0, -1, 0, 1}, 4380},
1020                                                              {12413, {0, -1, 0, 1}, 3559},
1021                                                              {2, {0, 1, 2, 1}, 16384},
1022                                                          }},
1023                                                         {12,
1024                                                          {
1025                                                              {18582, {0, -1, 1, 0}, 56936},
1026                                                              {1584248, {0, 0, -1, 1}, 8759},
1027                                                              {6206, {0, 0, -1, 1}, 7117},
1028                                                              {1, {0, 1, 2, -1}, 32768},
1029                                                          }},
1030                                                     }});
1031   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 0, -1}, {1, 1, 1, 1}},
1032                                                     {
1033                                                         {1,
1034                                                          {
1035                                                              {-37018, {6, 1, -2, -5}, 9489},
1036                                                              {-3168017, {0, 1, 0, -1}, 4380},
1037                                                              {-12339, {0, 1, 0, -1}, 3559},
1038                                                              {-2318, {3, 4, 1, -2}, 10923},
1039                                                          }},
1040                                                         {9,
1041                                                          {
1042                                                              {37, {1, -1, -1, 1}, 28468},
1043                                                              {-6335315, {-3, 1, -1, 3}, 876},
1044                                                              {-24568, {-3, 1, -1, 3}, 712},
1045                                                              {-772, {1, 1, 1, 1}, 16384},
1046                                                          }},
1047                                                         {13,
1048                                                          {
1049                                                              {49762, {3, -14, 5, 6}, 4067},
1050                                                              {-6334836, {-5, 0, 1, 4}, 626},
1051                                                              {-24494, {-5, 0, 1, 4}, 508},
1052                                                              {-3087, {4, 7, 2, 1}, 4681},
1053                                                          }},
1054                                                         {0,
1055                                                          {
1056                                                              {0, {0, 0, 0, 0}, 0},
1057                                                              {0, {0, 0, 0, 0}, 0},
1058                                                              {0, {0, 0, 0, 0}, 0},
1059                                                              {0, {0, 0, 0, 0}, 0},
1060                                                          }},
1061                                                         {0,
1062                                                          {
1063                                                              {0, {0, 0, 0, 0}, 0},
1064                                                              {0, {0, 0, 0, 0}, 0},
1065                                                              {0, {0, 0, 0, 0}, 0},
1066                                                              {0, {0, 0, 0, 0}, 0},
1067                                                          }},
1068                                                         {0,
1069                                                          {
1070                                                              {0, {0, 0, 0, 0}, 0},
1071                                                              {0, {0, 0, 0, 0}, 0},
1072                                                              {0, {0, 0, 0, 0}, 0},
1073                                                              {0, {0, 0, 0, 0}, 0},
1074                                                          }},
1075                                                     }});
1076   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, -2, -1}, {1, 1, 0, 1}},
1077                                                     {
1078                                                         {1,
1079                                                          {
1080                                                              {-6170, {1, 0, 0, -1}, 56936},
1081                                                              {239, {0, 1, 0, -1}, 4380},
1082                                                              {37, {0, 1, 0, -1}, 3559},
1083                                                              {776, {2, 3, 0, -1}, 16384},
1084                                                          }},
1085                                                         {2,
1086                                                          {
1087                                                              {-30885, {-1, 3, 0, -2}, 18979},
1088                                                              {-1583769, {1, 0, 0, -1}, 2920},
1089                                                              {-6133, {1, 0, 0, -1}, 2372},
1090                                                              {-771, {2, 3, 0, 1}, 10923},
1091                                                          }},
1092                                                         {3,
1093                                                          {
1094                                                              {-6170, {1, 0, 0, -1}, 56936},
1095                                                              {-1584008, {-1, 1, 0, 0}, 8759},
1096                                                              {-6170, {-1, 1, 0, 0}, 7117},
1097                                                              {-773, {-2, 3, 0, 1}, 32768},
1098                                                          }},
1099                                                         {8,
1100                                                          {
1101                                                              {-6170, {-1, 0, 0, 1}, 56936},
1102                                                              {-1584008, {1, -1, 0, 0}, 8759},
1103                                                              {-6170, {1, -1, 0, 0}, 7117},
1104                                                              {775, {-2, 3, 0, 1}, 32768},
1105                                                          }},
1106                                                         {9,
1107                                                          {
1108                                                              {-30885, {1, -3, 0, 2}, 18979},
1109                                                              {-1583769, {-1, 0, 0, 1}, 2920},
1110                                                              {-6133, {-1, 0, 0, 1}, 2372},
1111                                                              {777, {2, 3, 0, 1}, 10923},
1112                                                          }},
1113                                                         {10,
1114                                                          {
1115                                                              {-6170, {-1, 0, 0, 1}, 56936},
1116                                                              {239, {0, -1, 0, 1}, 4380},
1117                                                              {37, {0, -1, 0, 1}, 3559},
1118                                                              {-772, {2, 3, 0, -1}, 16384},
1119                                                          }},
1120                                                     }});
1121   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 2, 3}, {1, 1, 0, 1}},
1122                                                     {
1123                                                         {1,
1124                                                          {
1125                                                              {18582, {1, 0, 0, -1}, 56936},
1126                                                              {3168495, {0, 1, 0, -1}, 4380},
1127                                                              {12413, {0, 1, 0, -1}, 3559},
1128                                                              {2, {2, 3, 0, -1}, 16384},
1129                                                          }},
1130                                                         {2,
1131                                                          {
1132                                                              {55747, {-1, 3, 0, -2}, 18979},
1133                                                              {4752743, {1, 0, 0, -1}, 2920},
1134                                                              {18619, {1, 0, 0, -1}, 2372},
1135                                                              {3, {2, 3, 0, 1}, 10923},
1136                                                          }},
1137                                                         {3,
1138                                                          {
1139                                                              {18582, {1, 0, 0, -1}, 56936},
1140                                                              {1584248, {-1, 1, 0, 0}, 8759},
1141                                                              {6206, {-1, 1, 0, 0}, 7117},
1142                                                              {1, {-2, 3, 0, 1}, 32768},
1143                                                          }},
1144                                                         {8,
1145                                                          {
1146                                                              {18582, {-1, 0, 0, 1}, 56936},
1147                                                              {1584248, {1, -1, 0, 0}, 8759},
1148                                                              {6206, {1, -1, 0, 0}, 7117},
1149                                                              {1, {-2, 3, 0, 1}, 32768},
1150                                                          }},
1151                                                         {9,
1152                                                          {
1153                                                              {55747, {1, -3, 0, 2}, 18979},
1154                                                              {4752743, {-1, 0, 0, 1}, 2920},
1155                                                              {18619, {-1, 0, 0, 1}, 2372},
1156                                                              {3, {2, 3, 0, 1}, 10923},
1157                                                          }},
1158                                                         {10,
1159                                                          {
1160                                                              {18582, {-1, 0, 0, 1}, 56936},
1161                                                              {3168495, {0, -1, 0, 1}, 4380},
1162                                                              {12413, {0, -1, 0, 1}, 3559},
1163                                                              {2, {2, 3, 0, -1}, 16384},
1164                                                          }},
1165                                                     }});
1166   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, 0, 1}, {1, 1, 1, 0}},
1167                                                     {
1168                                                         {1,
1169                                                          {
1170                                                              {6206, {1, 1, -2, 0}, 56936},
1171                                                              {1584248, {0, 1, -1, 0}, 8759},
1172                                                              {6206, {0, 1, -1, 0}, 7117},
1173                                                              {775, {1, 2, -1, 0}, 32768},
1174                                                          }},
1175                                                         {2,
1176                                                          {
1177                                                              {-6170, {0, 1, -1, 0}, 56936},
1178                                                              {239, {1, 0, -1, 0}, 4380},
1179                                                              {37, {1, 0, -1, 0}, 3559},
1180                                                              {-772, {1, 2, 1, 0}, 16384},
1181                                                          }},
1182                                                         {3,
1183                                                          {
1184                                                              {-6170, {0, 1, -1, 0}, 56936},
1185                                                              {-1584008, {-1, 1, 0, 0}, 8759},
1186                                                              {-6170, {-1, 1, 0, 0}, 7117},
1187                                                              {-773, {-1, 2, 1, 0}, 32768},
1188                                                          }},
1189                                                         {4,
1190                                                          {
1191                                                              {-6170, {0, -1, 1, 0}, 56936},
1192                                                              {-1584008, {1, -1, 0, 0}, 8759},
1193                                                              {-6170, {1, -1, 0, 0}, 7117},
1194                                                              {775, {-1, 2, 1, 0}, 32768},
1195                                                          }},
1196                                                         {5,
1197                                                          {
1198                                                              {-6170, {0, -1, 1, 0}, 56936},
1199                                                              {239, {-1, 0, 1, 0}, 4380},
1200                                                              {37, {-1, 0, 1, 0}, 3559},
1201                                                              {776, {1, 2, 1, 0}, 16384},
1202                                                          }},
1203                                                         {6,
1204                                                          {
1205                                                              {6206, {-1, -1, 2, 0}, 56936},
1206                                                              {1584248, {0, -1, 1, 0}, 8759},
1207                                                              {6206, {0, -1, 1, 0}, 7117},
1208                                                              {-773, {1, 2, -1, 0}, 32768},
1209                                                          }},
1210                                                     }});
1211   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 0, -1}, {0, 1, 1, 1}},
1212                                                     {
1213                                                         {2,
1214                                                          {
1215                                                              {6206, {0, 1, -1, 0}, 56936},
1216                                                              {-1584008, {0, 0, 1, -1}, 8759},
1217                                                              {-6170, {0, 0, 1, -1}, 7117},
1218                                                              {1, {0, 1, 2, -1}, 32768},
1219                                                          }},
1220                                                         {4,
1221                                                          {
1222                                                              {6206, {0, -1, 1, 0}, 56936},
1223                                                              {-3168017, {0, 1, 0, -1}, 4380},
1224                                                              {-12339, {0, 1, 0, -1}, 3559},
1225                                                              {2, {0, 1, 2, 1}, 16384},
1226                                                          }},
1227                                                         {6,
1228                                                          {
1229                                                              {6206, {0, 2, -1, -1}, 56936},
1230                                                              {-1584008, {0, -1, 1, 0}, 8759},
1231                                                              {-6170, {0, -1, 1, 0}, 7117},
1232                                                              {1, {0, -1, 2, 1}, 32768},
1233                                                          }},
1234                                                         {8,
1235                                                          {
1236                                                              {6206, {0, -2, 1, 1}, 56936},
1237                                                              {-1584008, {0, 1, -1, 0}, 8759},
1238                                                              {-6170, {0, 1, -1, 0}, 7117},
1239                                                              {1, {0, -1, 2, 1}, 32768},
1240                                                          }},
1241                                                         {10,
1242                                                          {
1243                                                              {6206, {0, 1, -1, 0}, 56936},
1244                                                              {-3168017, {0, -1, 0, 1}, 4380},
1245                                                              {-12339, {0, -1, 0, 1}, 3559},
1246                                                              {2, {0, 1, 2, 1}, 16384},
1247                                                          }},
1248                                                         {12,
1249                                                          {
1250                                                              {6206, {0, -1, 1, 0}, 56936},
1251                                                              {-1584008, {0, 0, -1, 1}, 8759},
1252                                                              {-6170, {0, 0, -1, 1}, 7117},
1253                                                              {1, {0, 1, 2, -1}, 32768},
1254                                                          }},
1255                                                     }});
1256   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, 0, -1}, {1, 1, 1, 1}},
1257                                                     {
1258                                                         {2,
1259                                                          {
1260                                                              {-123502, {-3, 14, -5, -6}, 4067},
1261                                                              {-6334836, {5, 0, -1, -4}, 626},
1262                                                              {-24494, {5, 0, -1, -4}, 508},
1263                                                              {-2314, {4, 7, 2, 1}, 4681},
1264                                                          }},
1265                                                         {10,
1266                                                          {
1267                                                              {-12339, {-1, 1, -1, 1}, 28468},
1268                                                              {479, {1, -1, -1, 1}, 2190},
1269                                                              {74, {1, -1, -1, 1}, 1779},
1270                                                              {-1543, {1, 3, 3, 1}, 8192},
1271                                                          }},
1272                                                         {3,
1273                                                          {
1274                                                              {-12339, {1, 1, -1, -1}, 28468},
1275                                                              {-3168017, {-1, 1, 1, -1}, 4380},
1276                                                              {-12339, {-1, 1, 1, -1}, 3559},
1277                                                              {-1545, {-1, 3, 3, -1}, 16384},
1278                                                          }},
1279                                                         {11,
1280                                                          {
1281                                                              {-49246, {6, 5, -14, 3}, 4067},
1282                                                              {-6334836, {-4, -1, 0, 5}, 626},
1283                                                              {-24494, {-4, -1, 0, 5}, 508},
1284                                                              {-2314, {1, 2, 7, 4}, 4681},
1285                                                          }},
1286                                                         {0,
1287                                                          {
1288                                                              {0, {0, 0, 0, 0}, 0},
1289                                                              {0, {0, 0, 0, 0}, 0},
1290                                                              {0, {0, 0, 0, 0}, 0},
1291                                                              {0, {0, 0, 0, 0}, 0},
1292                                                          }},
1293                                                         {0,
1294                                                          {
1295                                                              {0, {0, 0, 0, 0}, 0},
1296                                                              {0, {0, 0, 0, 0}, 0},
1297                                                              {0, {0, 0, 0, 0}, 0},
1298                                                              {0, {0, 0, 0, 0}, 0},
1299                                                          }},
1300                                                     }});
1301   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, 0, -1}, {0, 1, 1, 1}},
1302                                                     {
1303                                                         {2,
1304                                                          {
1305                                                              {-6170, {0, 1, -1, 0}, 56936},
1306                                                              {-1584008, {0, 0, 1, -1}, 8759},
1307                                                              {-6170, {0, 0, 1, -1}, 7117},
1308                                                              {-773, {0, 1, 2, -1}, 32768},
1309                                                          }},
1310                                                         {4,
1311                                                          {
1312                                                              {-6170, {0, -1, 1, 0}, 56936},
1313                                                              {239, {0, 1, 0, -1}, 4380},
1314                                                              {37, {0, 1, 0, -1}, 3559},
1315                                                              {776, {0, 1, 2, 1}, 16384},
1316                                                          }},
1317                                                         {6,
1318                                                          {
1319                                                              {-18546, {0, 2, -1, -1}, 56936},
1320                                                              {1584248, {0, -1, 1, 0}, 8759},
1321                                                              {6206, {0, -1, 1, 0}, 7117},
1322                                                              {775, {0, -1, 2, 1}, 32768},
1323                                                          }},
1324                                                         {8,
1325                                                          {
1326                                                              {-18546, {0, -2, 1, 1}, 56936},
1327                                                              {1584248, {0, 1, -1, 0}, 8759},
1328                                                              {6206, {0, 1, -1, 0}, 7117},
1329                                                              {-773, {0, -1, 2, 1}, 32768},
1330                                                          }},
1331                                                         {10,
1332                                                          {
1333                                                              {-6170, {0, 1, -1, 0}, 56936},
1334                                                              {239, {0, -1, 0, 1}, 4380},
1335                                                              {37, {0, -1, 0, 1}, 3559},
1336                                                              {-772, {0, 1, 2, 1}, 16384},
1337                                                          }},
1338                                                         {12,
1339                                                          {
1340                                                              {-6170, {0, -1, 1, 0}, 56936},
1341                                                              {-1584008, {0, 0, -1, 1}, 8759},
1342                                                              {-6170, {0, 0, -1, 1}, 7117},
1343                                                              {775, {0, 1, 2, -1}, 32768},
1344                                                          }},
1345                                                     }});
1346   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 2, 3}, {1, 1, 1, 1}},
1347                                                     {
1348                                                         {8,
1349                                                          {
1350                                                              {111495, {-5, -2, 1, 6}, 9489},
1351                                                              {3168495, {1, 0, -1, 0}, 4380},
1352                                                              {12413, {1, 0, -1, 0}, 3559},
1353                                                              {3, {-2, 1, 4, 3}, 10923},
1354                                                          }},
1355                                                         {12,
1356                                                          {
1357                                                              {37165, {-1, -1, 1, 1}, 28468},
1358                                                              {3168495, {1, -1, -1, 1}, 4380},
1359                                                              {12413, {1, -1, -1, 1}, 3559},
1360                                                              {2, {-1, 3, 3, -1}, 16384},
1361                                                          }},
1362                                                         {14,
1363                                                          {
1364                                                              {111495, {-6, -1, 2, 5}, 9489},
1365                                                              {3168495, {0, -1, 0, 1}, 4380},
1366                                                              {12413, {0, -1, 0, 1}, 3559},
1367                                                              {3, {3, 4, 1, -2}, 10923},
1368                                                          }},
1369                                                         {1,
1370                                                          {
1371                                                              {111495, {6, 1, -2, -5}, 9489},
1372                                                              {3168495, {0, 1, 0, -1}, 4380},
1373                                                              {12413, {0, 1, 0, -1}, 3559},
1374                                                              {3, {3, 4, 1, -2}, 10923},
1375                                                          }},
1376                                                         {3,
1377                                                          {
1378                                                              {37165, {1, 1, -1, -1}, 28468},
1379                                                              {3168495, {-1, 1, 1, -1}, 4380},
1380                                                              {12413, {-1, 1, 1, -1}, 3559},
1381                                                              {2, {-1, 3, 3, -1}, 16384},
1382                                                          }},
1383                                                         {7,
1384                                                          {
1385                                                              {111495, {5, 2, -1, -6}, 9489},
1386                                                              {3168495, {-1, 0, 1, 0}, 4380},
1387                                                              {12413, {-1, 0, 1, 0}, 3559},
1388                                                              {3, {-2, 1, 4, 3}, 10923},
1389                                                          }},
1390                                                     }});
1391   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 0, 1}, {1, 0, 1, 1}},
1392                                                     {
1393                                                         {1,
1394                                                          {
1395                                                              {6206, {1, 0, 0, -1}, 56936},
1396                                                              {1584248, {0, 0, 1, -1}, 8759},
1397                                                              {6206, {0, 0, 1, -1}, 7117},
1398                                                              {775, {1, 0, 3, -2}, 32768},
1399                                                          }},
1400                                                         {4,
1401                                                          {
1402                                                              {6243, {-2, 0, 3, -1}, 18979},
1403                                                              {1584487, {1, 0, 0, -1}, 2920},
1404                                                              {6243, {1, 0, 0, -1}, 2372},
1405                                                              {-771, {1, 0, 3, 2}, 10923},
1406                                                          }},
1407                                                         {5,
1408                                                          {
1409                                                              {6206, {1, 0, 0, -1}, 56936},
1410                                                              {239, {-1, 0, 1, 0}, 4380},
1411                                                              {37, {-1, 0, 1, 0}, 3559},
1412                                                              {-772, {-1, 0, 3, 2}, 16384},
1413                                                          }},
1414                                                         {8,
1415                                                          {
1416                                                              {6206, {-1, 0, 0, 1}, 56936},
1417                                                              {239, {1, 0, -1, 0}, 4380},
1418                                                              {37, {1, 0, -1, 0}, 3559},
1419                                                              {776, {-1, 0, 3, 2}, 16384},
1420                                                          }},
1421                                                         {9,
1422                                                          {
1423                                                              {6243, {2, 0, -3, 1}, 18979},
1424                                                              {1584487, {-1, 0, 0, 1}, 2920},
1425                                                              {6243, {-1, 0, 0, 1}, 2372},
1426                                                              {777, {1, 0, 3, 2}, 10923},
1427                                                          }},
1428                                                         {12,
1429                                                          {
1430                                                              {6206, {-1, 0, 0, 1}, 56936},
1431                                                              {1584248, {0, 0, -1, 1}, 8759},
1432                                                              {6206, {0, 0, -1, 1}, 7117},
1433                                                              {-773, {1, 0, 3, -2}, 32768},
1434                                                          }},
1435                                                     }});
1436   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 2, 1}, {1, 1, 0, 1}},
1437                                                     {
1438                                                         {1,
1439                                                          {
1440                                                              {6206, {1, 0, 0, -1}, 56936},
1441                                                              {239, {0, 1, 0, -1}, 4380},
1442                                                              {37, {0, 1, 0, -1}, 3559},
1443                                                              {-772, {2, 3, 0, -1}, 16384},
1444                                                          }},
1445                                                         {2,
1446                                                          {
1447                                                              {30995, {-1, 3, 0, -2}, 18979},
1448                                                              {1584487, {1, 0, 0, -1}, 2920},
1449                                                              {6243, {1, 0, 0, -1}, 2372},
1450                                                              {777, {2, 3, 0, 1}, 10923},
1451                                                          }},
1452                                                         {3,
1453                                                          {
1454                                                              {6206, {1, 0, 0, -1}, 56936},
1455                                                              {1584248, {-1, 1, 0, 0}, 8759},
1456                                                              {6206, {-1, 1, 0, 0}, 7117},
1457                                                              {775, {-2, 3, 0, 1}, 32768},
1458                                                          }},
1459                                                         {8,
1460                                                          {
1461                                                              {6206, {-1, 0, 0, 1}, 56936},
1462                                                              {1584248, {1, -1, 0, 0}, 8759},
1463                                                              {6206, {1, -1, 0, 0}, 7117},
1464                                                              {-773, {-2, 3, 0, 1}, 32768},
1465                                                          }},
1466                                                         {9,
1467                                                          {
1468                                                              {30995, {1, -3, 0, 2}, 18979},
1469                                                              {1584487, {-1, 0, 0, 1}, 2920},
1470                                                              {6243, {-1, 0, 0, 1}, 2372},
1471                                                              {-771, {2, 3, 0, 1}, 10923},
1472                                                          }},
1473                                                         {10,
1474                                                          {
1475                                                              {6206, {-1, 0, 0, 1}, 56936},
1476                                                              {239, {0, -1, 0, 1}, 4380},
1477                                                              {37, {0, -1, 0, 1}, 3559},
1478                                                              {776, {2, 3, 0, -1}, 16384},
1479                                                          }},
1480                                                     }});
1481   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, 0, -1}, {1, 1, 1, 0}},
1482                                                     {
1483                                                         {1,
1484                                                          {
1485                                                              {6206, {1, 1, -2, 0}, 56936},
1486                                                              {1584248, {0, 1, -1, 0}, 8759},
1487                                                              {6206, {0, 1, -1, 0}, 7117},
1488                                                              {775, {1, 2, -1, 0}, 32768},
1489                                                          }},
1490                                                         {2,
1491                                                          {
1492                                                              {-6170, {0, 1, -1, 0}, 56936},
1493                                                              {239, {1, 0, -1, 0}, 4380},
1494                                                              {37, {1, 0, -1, 0}, 3559},
1495                                                              {-772, {1, 2, 1, 0}, 16384},
1496                                                          }},
1497                                                         {3,
1498                                                          {
1499                                                              {-6170, {0, 1, -1, 0}, 56936},
1500                                                              {-1584008, {-1, 1, 0, 0}, 8759},
1501                                                              {-6170, {-1, 1, 0, 0}, 7117},
1502                                                              {-773, {-1, 2, 1, 0}, 32768},
1503                                                          }},
1504                                                         {4,
1505                                                          {
1506                                                              {-6170, {0, -1, 1, 0}, 56936},
1507                                                              {-1584008, {1, -1, 0, 0}, 8759},
1508                                                              {-6170, {1, -1, 0, 0}, 7117},
1509                                                              {775, {-1, 2, 1, 0}, 32768},
1510                                                          }},
1511                                                         {5,
1512                                                          {
1513                                                              {-6170, {0, -1, 1, 0}, 56936},
1514                                                              {239, {-1, 0, 1, 0}, 4380},
1515                                                              {37, {-1, 0, 1, 0}, 3559},
1516                                                              {776, {1, 2, 1, 0}, 16384},
1517                                                          }},
1518                                                         {6,
1519                                                          {
1520                                                              {6206, {-1, -1, 2, 0}, 56936},
1521                                                              {1584248, {0, -1, 1, 0}, 8759},
1522                                                              {6206, {0, -1, 1, 0}, 7117},
1523                                                              {-773, {1, 2, -1, 0}, 32768},
1524                                                          }},
1525                                                     }});
1526   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 2, 1}, {1, 0, 1, 1}},
1527                                                     {
1528                                                         {1,
1529                                                          {
1530                                                              {6206, {1, 0, 0, -1}, 56936},
1531                                                              {-1584008, {0, 0, 1, -1}, 8759},
1532                                                              {-6170, {0, 0, 1, -1}, 7117},
1533                                                              {-1546, {1, 0, 3, -2}, 32768},
1534                                                          }},
1535                                                         {4,
1536                                                          {
1537                                                              {43371, {-2, 0, 3, -1}, 18979},
1538                                                              {1584487, {1, 0, 0, -1}, 2920},
1539                                                              {6243, {1, 0, 0, -1}, 2372},
1540                                                              {1550, {1, 0, 3, 2}, 10923},
1541                                                          }},
1542                                                         {5,
1543                                                          {
1544                                                              {6206, {1, 0, 0, -1}, 56936},
1545                                                              {3168495, {-1, 0, 1, 0}, 4380},
1546                                                              {12413, {-1, 0, 1, 0}, 3559},
1547                                                              {1549, {-1, 0, 3, 2}, 16384},
1548                                                          }},
1549                                                         {8,
1550                                                          {
1551                                                              {6206, {-1, 0, 0, 1}, 56936},
1552                                                              {3168495, {1, 0, -1, 0}, 4380},
1553                                                              {12413, {1, 0, -1, 0}, 3559},
1554                                                              {-1545, {-1, 0, 3, 2}, 16384},
1555                                                          }},
1556                                                         {9,
1557                                                          {
1558                                                              {43371, {2, 0, -3, 1}, 18979},
1559                                                              {1584487, {-1, 0, 0, 1}, 2920},
1560                                                              {6243, {-1, 0, 0, 1}, 2372},
1561                                                              {-1544, {1, 0, 3, 2}, 10923},
1562                                                          }},
1563                                                         {12,
1564                                                          {
1565                                                              {6206, {-1, 0, 0, 1}, 56936},
1566                                                              {-1584008, {0, 0, -1, 1}, 8759},
1567                                                              {-6170, {0, 0, -1, 1}, 7117},
1568                                                              {1548, {1, 0, 3, -2}, 32768},
1569                                                          }},
1570                                                     }});
1571   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 0, -1}, {1, 1, 1, 0}},
1572                                                     {
1573                                                         {1,
1574                                                          {
1575                                                              {-6170, {1, 1, -2, 0}, 56936},
1576                                                              {-1584008, {0, 1, -1, 0}, 8759},
1577                                                              {-6170, {0, 1, -1, 0}, 7117},
1578                                                              {-773, {1, 2, -1, 0}, 32768},
1579                                                          }},
1580                                                         {2,
1581                                                          {
1582                                                              {6206, {0, 1, -1, 0}, 56936},
1583                                                              {239, {1, 0, -1, 0}, 4380},
1584                                                              {37, {1, 0, -1, 0}, 3559},
1585                                                              {776, {1, 2, 1, 0}, 16384},
1586                                                          }},
1587                                                         {3,
1588                                                          {
1589                                                              {6206, {0, 1, -1, 0}, 56936},
1590                                                              {1584248, {-1, 1, 0, 0}, 8759},
1591                                                              {6206, {-1, 1, 0, 0}, 7117},
1592                                                              {775, {-1, 2, 1, 0}, 32768},
1593                                                          }},
1594                                                         {4,
1595                                                          {
1596                                                              {6206, {0, -1, 1, 0}, 56936},
1597                                                              {1584248, {1, -1, 0, 0}, 8759},
1598                                                              {6206, {1, -1, 0, 0}, 7117},
1599                                                              {-773, {-1, 2, 1, 0}, 32768},
1600                                                          }},
1601                                                         {5,
1602                                                          {
1603                                                              {6206, {0, -1, 1, 0}, 56936},
1604                                                              {239, {-1, 0, 1, 0}, 4380},
1605                                                              {37, {-1, 0, 1, 0}, 3559},
1606                                                              {-772, {1, 2, 1, 0}, 16384},
1607                                                          }},
1608                                                         {6,
1609                                                          {
1610                                                              {-6170, {-1, -1, 2, 0}, 56936},
1611                                                              {-1584008, {0, -1, 1, 0}, 8759},
1612                                                              {-6170, {0, -1, 1, 0}, 7117},
1613                                                              {775, {1, 2, -1, 0}, 32768},
1614                                                          }},
1615                                                     }});
1616   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 2, 3}, {1, 1, 1, 0}},
1617                                                     {
1618                                                         {1,
1619                                                          {
1620                                                              {18582, {1, 1, -2, 0}, 56936},
1621                                                              {1584248, {0, 1, -1, 0}, 8759},
1622                                                              {6206, {0, 1, -1, 0}, 7117},
1623                                                              {1, {1, 2, -1, 0}, 32768},
1624                                                          }},
1625                                                         {2,
1626                                                          {
1627                                                              {18582, {0, 1, -1, 0}, 56936},
1628                                                              {3168495, {1, 0, -1, 0}, 4380},
1629                                                              {12413, {1, 0, -1, 0}, 3559},
1630                                                              {2, {1, 2, 1, 0}, 16384},
1631                                                          }},
1632                                                         {3,
1633                                                          {
1634                                                              {18582, {0, 1, -1, 0}, 56936},
1635                                                              {1584248, {-1, 1, 0, 0}, 8759},
1636                                                              {6206, {-1, 1, 0, 0}, 7117},
1637                                                              {1, {-1, 2, 1, 0}, 32768},
1638                                                          }},
1639                                                         {4,
1640                                                          {
1641                                                              {18582, {0, -1, 1, 0}, 56936},
1642                                                              {1584248, {1, -1, 0, 0}, 8759},
1643                                                              {6206, {1, -1, 0, 0}, 7117},
1644                                                              {1, {-1, 2, 1, 0}, 32768},
1645                                                          }},
1646                                                         {5,
1647                                                          {
1648                                                              {18582, {0, -1, 1, 0}, 56936},
1649                                                              {3168495, {-1, 0, 1, 0}, 4380},
1650                                                              {12413, {-1, 0, 1, 0}, 3559},
1651                                                              {2, {1, 2, 1, 0}, 16384},
1652                                                          }},
1653                                                         {6,
1654                                                          {
1655                                                              {18582, {-1, -1, 2, 0}, 56936},
1656                                                              {1584248, {0, -1, 1, 0}, 8759},
1657                                                              {6206, {0, -1, 1, 0}, 7117},
1658                                                              {1, {1, 2, -1, 0}, 32768},
1659                                                          }},
1660                                                     }});
1661   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 0, 1}, {1, 1, 1, 0}},
1662                                                     {
1663                                                         {1,
1664                                                          {
1665                                                              {-6170, {1, 1, -2, 0}, 56936},
1666                                                              {-1584008, {0, 1, -1, 0}, 8759},
1667                                                              {-6170, {0, 1, -1, 0}, 7117},
1668                                                              {-773, {1, 2, -1, 0}, 32768},
1669                                                          }},
1670                                                         {2,
1671                                                          {
1672                                                              {6206, {0, 1, -1, 0}, 56936},
1673                                                              {239, {1, 0, -1, 0}, 4380},
1674                                                              {37, {1, 0, -1, 0}, 3559},
1675                                                              {776, {1, 2, 1, 0}, 16384},
1676                                                          }},
1677                                                         {3,
1678                                                          {
1679                                                              {6206, {0, 1, -1, 0}, 56936},
1680                                                              {1584248, {-1, 1, 0, 0}, 8759},
1681                                                              {6206, {-1, 1, 0, 0}, 7117},
1682                                                              {775, {-1, 2, 1, 0}, 32768},
1683                                                          }},
1684                                                         {4,
1685                                                          {
1686                                                              {6206, {0, -1, 1, 0}, 56936},
1687                                                              {1584248, {1, -1, 0, 0}, 8759},
1688                                                              {6206, {1, -1, 0, 0}, 7117},
1689                                                              {-773, {-1, 2, 1, 0}, 32768},
1690                                                          }},
1691                                                         {5,
1692                                                          {
1693                                                              {6206, {0, -1, 1, 0}, 56936},
1694                                                              {239, {-1, 0, 1, 0}, 4380},
1695                                                              {37, {-1, 0, 1, 0}, 3559},
1696                                                              {-772, {1, 2, 1, 0}, 16384},
1697                                                          }},
1698                                                         {6,
1699                                                          {
1700                                                              {-6170, {-1, -1, 2, 0}, 56936},
1701                                                              {-1584008, {0, -1, 1, 0}, 8759},
1702                                                              {-6170, {0, -1, 1, 0}, 7117},
1703                                                              {775, {1, 2, -1, 0}, 32768},
1704                                                          }},
1705                                                     }});
1706   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, 0, 1}, {1, 1, 1, 1}},
1707                                                     {
1708                                                         {2,
1709                                                          {
1710                                                              {-49246, {-3, 14, -5, -6}, 4067},
1711                                                              {6338188, {5, 0, -1, -4}, 626},
1712                                                              {25010, {5, 0, -1, -4}, 508},
1713                                                              {-3087, {4, 7, 2, 1}, 4681},
1714                                                          }},
1715                                                         {6,
1716                                                          {
1717                                                              {37, {-1, 1, 1, -1}, 28468},
1718                                                              {6337709, {3, -1, 1, -3}, 876},
1719                                                              {24936, {3, -1, 1, -3}, 712},
1720                                                              {-772, {1, 1, 1, 1}, 16384},
1721                                                          }},
1722                                                         {14,
1723                                                          {
1724                                                              {37239, {-6, -1, 2, 5}, 9489},
1725                                                              {3168495, {0, -1, 0, 1}, 4380},
1726                                                              {12413, {0, -1, 0, 1}, 3559},
1727                                                              {-2318, {3, 4, 1, -2}, 10923},
1728                                                          }},
1729                                                         {0,
1730                                                          {
1731                                                              {0, {0, 0, 0, 0}, 0},
1732                                                              {0, {0, 0, 0, 0}, 0},
1733                                                              {0, {0, 0, 0, 0}, 0},
1734                                                              {0, {0, 0, 0, 0}, 0},
1735                                                          }},
1736                                                         {0,
1737                                                          {
1738                                                              {0, {0, 0, 0, 0}, 0},
1739                                                              {0, {0, 0, 0, 0}, 0},
1740                                                              {0, {0, 0, 0, 0}, 0},
1741                                                              {0, {0, 0, 0, 0}, 0},
1742                                                          }},
1743                                                         {0,
1744                                                          {
1745                                                              {0, {0, 0, 0, 0}, 0},
1746                                                              {0, {0, 0, 0, 0}, 0},
1747                                                              {0, {0, 0, 0, 0}, 0},
1748                                                              {0, {0, 0, 0, 0}, 0},
1749                                                          }},
1750                                                     }});
1751   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, -2, -3}, {1, 0, 1, 1}},
1752                                                     {
1753                                                         {1,
1754                                                          {
1755                                                              {-18546, {1, 0, 0, -1}, 56936},
1756                                                              {-1584008, {0, 0, 1, -1}, 8759},
1757                                                              {-6170, {0, 0, 1, -1}, 7117},
1758                                                              {1, {1, 0, 3, -2}, 32768},
1759                                                          }},
1760                                                         {4,
1761                                                          {
1762                                                              {-55637, {-2, 0, 3, -1}, 18979},
1763                                                              {-4752025, {1, 0, 0, -1}, 2920},
1764                                                              {-18509, {1, 0, 0, -1}, 2372},
1765                                                              {3, {1, 0, 3, 2}, 10923},
1766                                                          }},
1767                                                         {5,
1768                                                          {
1769                                                              {-18546, {1, 0, 0, -1}, 56936},
1770                                                              {-3168017, {-1, 0, 1, 0}, 4380},
1771                                                              {-12339, {-1, 0, 1, 0}, 3559},
1772                                                              {2, {-1, 0, 3, 2}, 16384},
1773                                                          }},
1774                                                         {8,
1775                                                          {
1776                                                              {-18546, {-1, 0, 0, 1}, 56936},
1777                                                              {-3168017, {1, 0, -1, 0}, 4380},
1778                                                              {-12339, {1, 0, -1, 0}, 3559},
1779                                                              {2, {-1, 0, 3, 2}, 16384},
1780                                                          }},
1781                                                         {9,
1782                                                          {
1783                                                              {-55637, {2, 0, -3, 1}, 18979},
1784                                                              {-4752025, {-1, 0, 0, 1}, 2920},
1785                                                              {-18509, {-1, 0, 0, 1}, 2372},
1786                                                              {3, {1, 0, 3, 2}, 10923},
1787                                                          }},
1788                                                         {12,
1789                                                          {
1790                                                              {-18546, {-1, 0, 0, 1}, 56936},
1791                                                              {-1584008, {0, 0, -1, 1}, 8759},
1792                                                              {-6170, {0, 0, -1, 1}, 7117},
1793                                                              {1, {1, 0, 3, -2}, 32768},
1794                                                          }},
1795                                                     }});
1796   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 0, 1}, {1, 1, 1, 1}},
1797                                                     {
1798                                                         {4,
1799                                                          {
1800                                                              {49762, {-6, -5, 14, -3}, 4067},
1801                                                              {6338188, {4, 1, 0, -5}, 626},
1802                                                              {25010, {4, 1, 0, -5}, 508},
1803                                                              {-2314, {1, 2, 7, 4}, 4681},
1804                                                          }},
1805                                                         {12,
1806                                                          {
1807                                                              {12413, {-1, -1, 1, 1}, 28468},
1808                                                              {3168495, {1, -1, -1, 1}, 4380},
1809                                                              {12413, {1, -1, -1, 1}, 3559},
1810                                                              {-1545, {-1, 3, 3, -1}, 16384},
1811                                                          }},
1812                                                         {5,
1813                                                          {
1814                                                              {12413, {1, -1, 1, -1}, 28468},
1815                                                              {479, {-1, 1, 1, -1}, 2190},
1816                                                              {74, {-1, 1, 1, -1}, 1779},
1817                                                              {-1543, {1, 3, 3, 1}, 8192},
1818                                                          }},
1819                                                         {13,
1820                                                          {
1821                                                              {124018, {3, -14, 5, 6}, 4067},
1822                                                              {6338188, {-5, 0, 1, 4}, 626},
1823                                                              {25010, {-5, 0, 1, 4}, 508},
1824                                                              {-2314, {4, 7, 2, 1}, 4681},
1825                                                          }},
1826                                                         {0,
1827                                                          {
1828                                                              {0, {0, 0, 0, 0}, 0},
1829                                                              {0, {0, 0, 0, 0}, 0},
1830                                                              {0, {0, 0, 0, 0}, 0},
1831                                                              {0, {0, 0, 0, 0}, 0},
1832                                                          }},
1833                                                         {0,
1834                                                          {
1835                                                              {0, {0, 0, 0, 0}, 0},
1836                                                              {0, {0, 0, 0, 0}, 0},
1837                                                              {0, {0, 0, 0, 0}, 0},
1838                                                              {0, {0, 0, 0, 0}, 0},
1839                                                          }},
1840                                                     }});
1841   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, 0, 1}, {1, 0, 1, 1}},
1842                                                     {
1843                                                         {1,
1844                                                          {
1845                                                              {6206, {1, 0, 0, -1}, 56936},
1846                                                              {1584248, {0, 0, 1, -1}, 8759},
1847                                                              {6206, {0, 0, 1, -1}, 7117},
1848                                                              {775, {1, 0, 3, -2}, 32768},
1849                                                          }},
1850                                                         {4,
1851                                                          {
1852                                                              {6243, {-2, 0, 3, -1}, 18979},
1853                                                              {1584487, {1, 0, 0, -1}, 2920},
1854                                                              {6243, {1, 0, 0, -1}, 2372},
1855                                                              {-771, {1, 0, 3, 2}, 10923},
1856                                                          }},
1857                                                         {5,
1858                                                          {
1859                                                              {6206, {1, 0, 0, -1}, 56936},
1860                                                              {239, {-1, 0, 1, 0}, 4380},
1861                                                              {37, {-1, 0, 1, 0}, 3559},
1862                                                              {-772, {-1, 0, 3, 2}, 16384},
1863                                                          }},
1864                                                         {8,
1865                                                          {
1866                                                              {6206, {-1, 0, 0, 1}, 56936},
1867                                                              {239, {1, 0, -1, 0}, 4380},
1868                                                              {37, {1, 0, -1, 0}, 3559},
1869                                                              {776, {-1, 0, 3, 2}, 16384},
1870                                                          }},
1871                                                         {9,
1872                                                          {
1873                                                              {6243, {2, 0, -3, 1}, 18979},
1874                                                              {1584487, {-1, 0, 0, 1}, 2920},
1875                                                              {6243, {-1, 0, 0, 1}, 2372},
1876                                                              {777, {1, 0, 3, 2}, 10923},
1877                                                          }},
1878                                                         {12,
1879                                                          {
1880                                                              {6206, {-1, 0, 0, 1}, 56936},
1881                                                              {1584248, {0, 0, -1, 1}, 8759},
1882                                                              {6206, {0, 0, -1, 1}, 7117},
1883                                                              {-773, {1, 0, 3, -2}, 32768},
1884                                                          }},
1885                                                     }});
1886   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, 0, -1}, {1, 0, 1, 1}},
1887                                                     {
1888                                                         {1,
1889                                                          {
1890                                                              {-6170, {1, 0, 0, -1}, 56936},
1891                                                              {-1584008, {0, 0, 1, -1}, 8759},
1892                                                              {-6170, {0, 0, 1, -1}, 7117},
1893                                                              {-773, {1, 0, 3, -2}, 32768},
1894                                                          }},
1895                                                         {4,
1896                                                          {
1897                                                              {-6133, {-2, 0, 3, -1}, 18979},
1898                                                              {-1583769, {1, 0, 0, -1}, 2920},
1899                                                              {-6133, {1, 0, 0, -1}, 2372},
1900                                                              {777, {1, 0, 3, 2}, 10923},
1901                                                          }},
1902                                                         {5,
1903                                                          {
1904                                                              {-6170, {1, 0, 0, -1}, 56936},
1905                                                              {239, {-1, 0, 1, 0}, 4380},
1906                                                              {37, {-1, 0, 1, 0}, 3559},
1907                                                              {776, {-1, 0, 3, 2}, 16384},
1908                                                          }},
1909                                                         {8,
1910                                                          {
1911                                                              {-6170, {-1, 0, 0, 1}, 56936},
1912                                                              {239, {1, 0, -1, 0}, 4380},
1913                                                              {37, {1, 0, -1, 0}, 3559},
1914                                                              {-772, {-1, 0, 3, 2}, 16384},
1915                                                          }},
1916                                                         {9,
1917                                                          {
1918                                                              {-6133, {2, 0, -3, 1}, 18979},
1919                                                              {-1583769, {-1, 0, 0, 1}, 2920},
1920                                                              {-6133, {-1, 0, 0, 1}, 2372},
1921                                                              {-771, {1, 0, 3, 2}, 10923},
1922                                                          }},
1923                                                         {12,
1924                                                          {
1925                                                              {-6170, {-1, 0, 0, 1}, 56936},
1926                                                              {-1584008, {0, 0, -1, 1}, 8759},
1927                                                              {-6170, {0, 0, -1, 1}, 7117},
1928                                                              {775, {1, 0, 3, -2}, 32768},
1929                                                          }},
1930                                                     }});
1931   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 2, 1}, {1, 1, 1, 1}},
1932                                                     {
1933                                                         {8,
1934                                                          {
1935                                                              {37239, {-5, -2, 1, 6}, 9489},
1936                                                              {3168495, {1, 0, -1, 0}, 4380},
1937                                                              {12413, {1, 0, -1, 0}, 3559},
1938                                                              {-2318, {-2, 1, 4, 3}, 10923},
1939                                                          }},
1940                                                         {9,
1941                                                          {
1942                                                              {24789, {1, -1, -1, 1}, 28468},
1943                                                              {6337709, {-3, 1, -1, 3}, 876},
1944                                                              {24936, {-3, 1, -1, 3}, 712},
1945                                                              {-772, {1, 1, 1, 1}, 16384},
1946                                                          }},
1947                                                         {11,
1948                                                          {
1949                                                              {223026, {6, 5, -14, 3}, 4067},
1950                                                              {6338188, {-4, -1, 0, 5}, 626},
1951                                                              {25010, {-4, -1, 0, 5}, 508},
1952                                                              {-3087, {1, 2, 7, 4}, 4681},
1953                                                          }},
1954                                                         {0,
1955                                                          {
1956                                                              {0, {0, 0, 0, 0}, 0},
1957                                                              {0, {0, 0, 0, 0}, 0},
1958                                                              {0, {0, 0, 0, 0}, 0},
1959                                                              {0, {0, 0, 0, 0}, 0},
1960                                                          }},
1961                                                         {0,
1962                                                          {
1963                                                              {0, {0, 0, 0, 0}, 0},
1964                                                              {0, {0, 0, 0, 0}, 0},
1965                                                              {0, {0, 0, 0, 0}, 0},
1966                                                              {0, {0, 0, 0, 0}, 0},
1967                                                          }},
1968                                                         {0,
1969                                                          {
1970                                                              {0, {0, 0, 0, 0}, 0},
1971                                                              {0, {0, 0, 0, 0}, 0},
1972                                                              {0, {0, 0, 0, 0}, 0},
1973                                                              {0, {0, 0, 0, 0}, 0},
1974                                                          }},
1975                                                     }});
1976   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, -2, -1}, {1, 0, 1, 1}},
1977                                                     {
1978                                                         {1,
1979                                                          {
1980                                                              {-6170, {1, 0, 0, -1}, 56936},
1981                                                              {1584248, {0, 0, 1, -1}, 8759},
1982                                                              {6206, {0, 0, 1, -1}, 7117},
1983                                                              {1548, {1, 0, 3, -2}, 32768},
1984                                                          }},
1985                                                         {4,
1986                                                          {
1987                                                              {-43261, {-2, 0, 3, -1}, 18979},
1988                                                              {-1583769, {1, 0, 0, -1}, 2920},
1989                                                              {-6133, {1, 0, 0, -1}, 2372},
1990                                                              {-1544, {1, 0, 3, 2}, 10923},
1991                                                          }},
1992                                                         {5,
1993                                                          {
1994                                                              {-6170, {1, 0, 0, -1}, 56936},
1995                                                              {-3168017, {-1, 0, 1, 0}, 4380},
1996                                                              {-12339, {-1, 0, 1, 0}, 3559},
1997                                                              {-1545, {-1, 0, 3, 2}, 16384},
1998                                                          }},
1999                                                         {8,
2000                                                          {
2001                                                              {-6170, {-1, 0, 0, 1}, 56936},
2002                                                              {-3168017, {1, 0, -1, 0}, 4380},
2003                                                              {-12339, {1, 0, -1, 0}, 3559},
2004                                                              {1549, {-1, 0, 3, 2}, 16384},
2005                                                          }},
2006                                                         {9,
2007                                                          {
2008                                                              {-43261, {2, 0, -3, 1}, 18979},
2009                                                              {-1583769, {-1, 0, 0, 1}, 2920},
2010                                                              {-6133, {-1, 0, 0, 1}, 2372},
2011                                                              {1550, {1, 0, 3, 2}, 10923},
2012                                                          }},
2013                                                         {12,
2014                                                          {
2015                                                              {-6170, {-1, 0, 0, 1}, 56936},
2016                                                              {1584248, {0, 0, -1, 1}, 8759},
2017                                                              {6206, {0, 0, -1, 1}, 7117},
2018                                                              {-1546, {1, 0, 3, -2}, 32768},
2019                                                          }},
2020                                                     }});
2021   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 0, -1}, {1, 1, 0, 1}},
2022                                                     {
2023                                                         {1,
2024                                                          {
2025                                                              {-6170, {1, 0, 0, -1}, 56936},
2026                                                              {-3168017, {0, 1, 0, -1}, 4380},
2027                                                              {-12339, {0, 1, 0, -1}, 3559},
2028                                                              {-1545, {2, 3, 0, -1}, 16384},
2029                                                          }},
2030                                                         {2,
2031                                                          {
2032                                                              {6243, {-1, 3, 0, -2}, 18979},
2033                                                              {-1583769, {1, 0, 0, -1}, 2920},
2034                                                              {-6133, {1, 0, 0, -1}, 2372},
2035                                                              {1550, {2, 3, 0, 1}, 10923},
2036                                                          }},
2037                                                         {3,
2038                                                          {
2039                                                              {-6170, {1, 0, 0, -1}, 56936},
2040                                                              {1584248, {-1, 1, 0, 0}, 8759},
2041                                                              {6206, {-1, 1, 0, 0}, 7117},
2042                                                              {1548, {-2, 3, 0, 1}, 32768},
2043                                                          }},
2044                                                         {8,
2045                                                          {
2046                                                              {-6170, {-1, 0, 0, 1}, 56936},
2047                                                              {1584248, {1, -1, 0, 0}, 8759},
2048                                                              {6206, {1, -1, 0, 0}, 7117},
2049                                                              {-1546, {-2, 3, 0, 1}, 32768},
2050                                                          }},
2051                                                         {9,
2052                                                          {
2053                                                              {6243, {1, -3, 0, 2}, 18979},
2054                                                              {-1583769, {-1, 0, 0, 1}, 2920},
2055                                                              {-6133, {-1, 0, 0, 1}, 2372},
2056                                                              {-1544, {2, 3, 0, 1}, 10923},
2057                                                          }},
2058                                                         {10,
2059                                                          {
2060                                                              {-6170, {-1, 0, 0, 1}, 56936},
2061                                                              {-3168017, {0, -1, 0, 1}, 4380},
2062                                                              {-12339, {0, -1, 0, 1}, 3559},
2063                                                              {1549, {2, 3, 0, -1}, 16384},
2064                                                          }},
2065                                                     }});
2066   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, -2, -3}, {1, 1, 1, 1}},
2067                                                     {
2068                                                         {8,
2069                                                          {
2070                                                              {-111274, {-5, -2, 1, 6}, 9489},
2071                                                              {-3168017, {1, 0, -1, 0}, 4380},
2072                                                              {-12339, {1, 0, -1, 0}, 3559},
2073                                                              {3, {-2, 1, 4, 3}, 10923},
2074                                                          }},
2075                                                         {12,
2076                                                          {
2077                                                              {-37091, {-1, -1, 1, 1}, 28468},
2078                                                              {-3168017, {1, -1, -1, 1}, 4380},
2079                                                              {-12339, {1, -1, -1, 1}, 3559},
2080                                                              {2, {-1, 3, 3, -1}, 16384},
2081                                                          }},
2082                                                         {14,
2083                                                          {
2084                                                              {-111274, {-6, -1, 2, 5}, 9489},
2085                                                              {-3168017, {0, -1, 0, 1}, 4380},
2086                                                              {-12339, {0, -1, 0, 1}, 3559},
2087                                                              {3, {3, 4, 1, -2}, 10923},
2088                                                          }},
2089                                                         {1,
2090                                                          {
2091                                                              {-111274, {6, 1, -2, -5}, 9489},
2092                                                              {-3168017, {0, 1, 0, -1}, 4380},
2093                                                              {-12339, {0, 1, 0, -1}, 3559},
2094                                                              {3, {3, 4, 1, -2}, 10923},
2095                                                          }},
2096                                                         {3,
2097                                                          {
2098                                                              {-37091, {1, 1, -1, -1}, 28468},
2099                                                              {-3168017, {-1, 1, 1, -1}, 4380},
2100                                                              {-12339, {-1, 1, 1, -1}, 3559},
2101                                                              {2, {-1, 3, 3, -1}, 16384},
2102                                                          }},
2103                                                         {7,
2104                                                          {
2105                                                              {-111274, {5, 2, -1, -6}, 9489},
2106                                                              {-3168017, {-1, 0, 1, 0}, 4380},
2107                                                              {-12339, {-1, 0, 1, 0}, 3559},
2108                                                              {3, {-2, 1, 4, 3}, 10923},
2109                                                          }},
2110                                                     }});
2111   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 0, 1}, {1, 1, 0, 1}},
2112                                                     {
2113                                                         {1,
2114                                                          {
2115                                                              {6206, {1, 0, 0, -1}, 56936},
2116                                                              {239, {0, 1, 0, -1}, 4380},
2117                                                              {37, {0, 1, 0, -1}, 3559},
2118                                                              {-772, {2, 3, 0, -1}, 16384},
2119                                                          }},
2120                                                         {2,
2121                                                          {
2122                                                              {30995, {-1, 3, 0, -2}, 18979},
2123                                                              {1584487, {1, 0, 0, -1}, 2920},
2124                                                              {6243, {1, 0, 0, -1}, 2372},
2125                                                              {777, {2, 3, 0, 1}, 10923},
2126                                                          }},
2127                                                         {3,
2128                                                          {
2129                                                              {6206, {1, 0, 0, -1}, 56936},
2130                                                              {1584248, {-1, 1, 0, 0}, 8759},
2131                                                              {6206, {-1, 1, 0, 0}, 7117},
2132                                                              {775, {-2, 3, 0, 1}, 32768},
2133                                                          }},
2134                                                         {8,
2135                                                          {
2136                                                              {6206, {-1, 0, 0, 1}, 56936},
2137                                                              {1584248, {1, -1, 0, 0}, 8759},
2138                                                              {6206, {1, -1, 0, 0}, 7117},
2139                                                              {-773, {-2, 3, 0, 1}, 32768},
2140                                                          }},
2141                                                         {9,
2142                                                          {
2143                                                              {30995, {1, -3, 0, 2}, 18979},
2144                                                              {1584487, {-1, 0, 0, 1}, 2920},
2145                                                              {6243, {-1, 0, 0, 1}, 2372},
2146                                                              {-771, {2, 3, 0, 1}, 10923},
2147                                                          }},
2148                                                         {10,
2149                                                          {
2150                                                              {6206, {-1, 0, 0, 1}, 56936},
2151                                                              {239, {0, -1, 0, 1}, 4380},
2152                                                              {37, {0, -1, 0, 1}, 3559},
2153                                                              {776, {2, 3, 0, -1}, 16384},
2154                                                          }},
2155                                                     }});
2156   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, 1, 2, 3}, {1, 0, 1, 1}},
2157                                                     {
2158                                                         {1,
2159                                                          {
2160                                                              {18582, {1, 0, 0, -1}, 56936},
2161                                                              {1584248, {0, 0, 1, -1}, 8759},
2162                                                              {6206, {0, 0, 1, -1}, 7117},
2163                                                              {1, {1, 0, 3, -2}, 32768},
2164                                                          }},
2165                                                         {4,
2166                                                          {
2167                                                              {55747, {-2, 0, 3, -1}, 18979},
2168                                                              {4752743, {1, 0, 0, -1}, 2920},
2169                                                              {18619, {1, 0, 0, -1}, 2372},
2170                                                              {3, {1, 0, 3, 2}, 10923},
2171                                                          }},
2172                                                         {5,
2173                                                          {
2174                                                              {18582, {1, 0, 0, -1}, 56936},
2175                                                              {3168495, {-1, 0, 1, 0}, 4380},
2176                                                              {12413, {-1, 0, 1, 0}, 3559},
2177                                                              {2, {-1, 0, 3, 2}, 16384},
2178                                                          }},
2179                                                         {8,
2180                                                          {
2181                                                              {18582, {-1, 0, 0, 1}, 56936},
2182                                                              {3168495, {1, 0, -1, 0}, 4380},
2183                                                              {12413, {1, 0, -1, 0}, 3559},
2184                                                              {2, {-1, 0, 3, 2}, 16384},
2185                                                          }},
2186                                                         {9,
2187                                                          {
2188                                                              {55747, {2, 0, -3, 1}, 18979},
2189                                                              {4752743, {-1, 0, 0, 1}, 2920},
2190                                                              {18619, {-1, 0, 0, 1}, 2372},
2191                                                              {3, {1, 0, 3, 2}, 10923},
2192                                                          }},
2193                                                         {12,
2194                                                          {
2195                                                              {18582, {-1, 0, 0, 1}, 56936},
2196                                                              {1584248, {0, 0, -1, 1}, 8759},
2197                                                              {6206, {0, 0, -1, 1}, 7117},
2198                                                              {1, {1, 0, 3, -2}, 32768},
2199                                                          }},
2200                                                     }});
2201   LAYOUT_VALID_TO_LATCOMB_CONSTS_ENCODER.push_back({{{0, -1, 0, 1}, {1, 1, 0, 1}},
2202                                                     {
2203                                                         {1,
2204                                                          {
2205                                                              {6206, {1, 0, 0, -1}, 56936},
2206                                                              {3168495, {0, 1, 0, -1}, 4380},
2207                                                              {12413, {0, 1, 0, -1}, 3559},
2208                                                              {1549, {2, 3, 0, -1}, 16384},
2209                                                          }},
2210                                                         {2,
2211                                                          {
2212                                                              {-6133, {-1, 3, 0, -2}, 18979},
2213                                                              {1584487, {1, 0, 0, -1}, 2920},
2214                                                              {6243, {1, 0, 0, -1}, 2372},
2215                                                              {-1544, {2, 3, 0, 1}, 10923},
2216                                                          }},
2217                                                         {3,
2218                                                          {
2219                                                              {6206, {1, 0, 0, -1}, 56936},
2220                                                              {-1584008, {-1, 1, 0, 0}, 8759},
2221                                                              {-6170, {-1, 1, 0, 0}, 7117},
2222                                                              {-1546, {-2, 3, 0, 1}, 32768},
2223                                                          }},
2224                                                         {8,
2225                                                          {
2226                                                              {6206, {-1, 0, 0, 1}, 56936},
2227                                                              {-1584008, {1, -1, 0, 0}, 8759},
2228                                                              {-6170, {1, -1, 0, 0}, 7117},
2229                                                              {1548, {-2, 3, 0, 1}, 32768},
2230                                                          }},
2231                                                         {9,
2232                                                          {
2233                                                              {-6133, {1, -3, 0, 2}, 18979},
2234                                                              {1584487, {-1, 0, 0, 1}, 2920},
2235                                                              {6243, {-1, 0, 0, 1}, 2372},
2236                                                              {1550, {2, 3, 0, 1}, 10923},
2237                                                          }},
2238                                                         {10,
2239                                                          {
2240                                                              {6206, {-1, 0, 0, 1}, 56936},
2241                                                              {3168495, {0, -1, 0, 1}, 4380},
2242                                                              {12413, {0, -1, 0, 1}, 3559},
2243                                                              {-1545, {2, 3, 0, -1}, 16384},
2244                                                          }},
2245                                                     }});
2246 }