SHARE
TWEET

Untitled

a guest Feb 16th, 2020 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "crypto.h"
  2.  
  3. void add_round_key(bs_reg_t state_bs[CRYPTO_IN_SIZE_BIT], uint8_t key[CRYPTO_KEY_SIZE])
  4. {
  5.     // /// INSERT YOUR CODE HERE ///
  6.     state_bs[0] = state_bs[0] ^  (0xFFFF & (~(((uint16_t)(key[ 0 ] >> 0) & 0x1) - 1)));
  7.  
  8.     state_bs[1] = state_bs[1] ^  (0xFFFF & (~(((uint16_t)(key[ 0 ] >> 1) & 0x1) - 1)));
  9.  
  10.     state_bs[2] = state_bs[2] ^  (0xFFFF & (~(((uint16_t)(key[ 0 ] >> 2) & 0x1) - 1)));
  11.  
  12.     state_bs[3] = state_bs[3] ^  (0xFFFF & (~(((uint16_t)(key[ 0 ] >> 3) & 0x1) - 1)));
  13.  
  14.     state_bs[4] = state_bs[4] ^  (0xFFFF & (~(((uint16_t)(key[ 0 ] >> 4) & 0x1) - 1)));
  15.  
  16.     state_bs[5] = state_bs[5] ^  (0xFFFF & (~(((uint16_t)(key[ 0 ] >> 5) & 0x1) - 1)));
  17.  
  18.     state_bs[6] = state_bs[6] ^  (0xFFFF & (~(((uint16_t)(key[ 0 ] >> 6) & 0x1) - 1)));
  19.  
  20.     state_bs[7] = state_bs[7] ^  (0xFFFF & (~(((uint16_t)(key[ 0 ] >> 7) & 0x1) - 1)));
  21.  
  22.     state_bs[8] = state_bs[8] ^  (0xFFFF & (~(((uint16_t)(key[ 1 ] >> 0) & 0x1) - 1)));
  23.  
  24.     state_bs[9] = state_bs[9] ^  (0xFFFF & (~(((uint16_t)(key[ 1 ] >> 1) & 0x1) - 1)));
  25.  
  26.     state_bs[10] = state_bs[10] ^  (0xFFFF & (~(((uint16_t)(key[ 1 ] >> 2) & 0x1) - 1)));
  27.  
  28.     state_bs[11] = state_bs[11] ^  (0xFFFF & (~(((uint16_t)(key[ 1 ] >> 3) & 0x1) - 1)));
  29.  
  30.     state_bs[12] = state_bs[12] ^  (0xFFFF & (~(((uint16_t)(key[ 1 ] >> 4) & 0x1) - 1)));
  31.  
  32.     state_bs[13] = state_bs[13] ^  (0xFFFF & (~(((uint16_t)(key[ 1 ] >> 5) & 0x1) - 1)));
  33.  
  34.     state_bs[14] = state_bs[14] ^  (0xFFFF & (~(((uint16_t)(key[ 1 ] >> 6) & 0x1) - 1)));
  35.  
  36.     state_bs[15] = state_bs[15] ^  (0xFFFF & (~(((uint16_t)(key[ 1 ] >> 7) & 0x1) - 1)));
  37.  
  38.     state_bs[16] = state_bs[16] ^  (0xFFFF & (~(((uint16_t)(key[ 2 ] >> 0) & 0x1) - 1)));
  39.  
  40.     state_bs[17] = state_bs[17] ^  (0xFFFF & (~(((uint16_t)(key[ 2 ] >> 1) & 0x1) - 1)));
  41.  
  42.     state_bs[18] = state_bs[18] ^  (0xFFFF & (~(((uint16_t)(key[ 2 ] >> 2) & 0x1) - 1)));
  43.  
  44.     state_bs[19] = state_bs[19] ^  (0xFFFF & (~(((uint16_t)(key[ 2 ] >> 3) & 0x1) - 1)));
  45.  
  46.     state_bs[20] = state_bs[20] ^  (0xFFFF & (~(((uint16_t)(key[ 2 ] >> 4) & 0x1) - 1)));
  47.  
  48.     state_bs[21] = state_bs[21] ^  (0xFFFF & (~(((uint16_t)(key[ 2 ] >> 5) & 0x1) - 1)));
  49.  
  50.     state_bs[22] = state_bs[22] ^  (0xFFFF & (~(((uint16_t)(key[ 2 ] >> 6) & 0x1) - 1)));
  51.  
  52.     state_bs[23] = state_bs[23] ^  (0xFFFF & (~(((uint16_t)(key[ 2 ] >> 7) & 0x1) - 1)));
  53.  
  54.     state_bs[24] = state_bs[24] ^  (0xFFFF & (~(((uint16_t)(key[ 3 ] >> 0) & 0x1) - 1)));
  55.  
  56.     state_bs[25] = state_bs[25] ^  (0xFFFF & (~(((uint16_t)(key[ 3 ] >> 1) & 0x1) - 1)));
  57.  
  58.     state_bs[26] = state_bs[26] ^  (0xFFFF & (~(((uint16_t)(key[ 3 ] >> 2) & 0x1) - 1)));
  59.  
  60.     state_bs[27] = state_bs[27] ^  (0xFFFF & (~(((uint16_t)(key[ 3 ] >> 3) & 0x1) - 1)));
  61.  
  62.     state_bs[28] = state_bs[28] ^  (0xFFFF & (~(((uint16_t)(key[ 3 ] >> 4) & 0x1) - 1)));
  63.  
  64.     state_bs[29] = state_bs[29] ^  (0xFFFF & (~(((uint16_t)(key[ 3 ] >> 5) & 0x1) - 1)));
  65.  
  66.     state_bs[30] = state_bs[30] ^  (0xFFFF & (~(((uint16_t)(key[ 3 ] >> 6) & 0x1) - 1)));
  67.  
  68.     state_bs[31] = state_bs[31] ^  (0xFFFF & (~(((uint16_t)(key[ 3 ] >> 7) & 0x1) - 1)));
  69.  
  70.     state_bs[32] = state_bs[32] ^  (0xFFFF & (~(((uint16_t)(key[ 4 ] >> 0) & 0x1) - 1)));
  71.  
  72.     state_bs[33] = state_bs[33] ^  (0xFFFF & (~(((uint16_t)(key[ 4 ] >> 1) & 0x1) - 1)));
  73.  
  74.     state_bs[34] = state_bs[34] ^  (0xFFFF & (~(((uint16_t)(key[ 4 ] >> 2) & 0x1) - 1)));
  75.  
  76.     state_bs[35] = state_bs[35] ^  (0xFFFF & (~(((uint16_t)(key[ 4 ] >> 3) & 0x1) - 1)));
  77.  
  78.     state_bs[36] = state_bs[36] ^  (0xFFFF & (~(((uint16_t)(key[ 4 ] >> 4) & 0x1) - 1)));
  79.  
  80.     state_bs[37] = state_bs[37] ^  (0xFFFF & (~(((uint16_t)(key[ 4 ] >> 5) & 0x1) - 1)));
  81.  
  82.     state_bs[38] = state_bs[38] ^  (0xFFFF & (~(((uint16_t)(key[ 4 ] >> 6) & 0x1) - 1)));
  83.  
  84.     state_bs[39] = state_bs[39] ^  (0xFFFF & (~(((uint16_t)(key[ 4 ] >> 7) & 0x1) - 1)));
  85.  
  86.     state_bs[40] = state_bs[40] ^  (0xFFFF & (~(((uint16_t)(key[ 5 ] >> 0) & 0x1) - 1)));
  87.  
  88.     state_bs[41] = state_bs[41] ^  (0xFFFF & (~(((uint16_t)(key[ 5 ] >> 1) & 0x1) - 1)));
  89.  
  90.     state_bs[42] = state_bs[42] ^  (0xFFFF & (~(((uint16_t)(key[ 5 ] >> 2) & 0x1) - 1)));
  91.  
  92.     state_bs[43] = state_bs[43] ^  (0xFFFF & (~(((uint16_t)(key[ 5 ] >> 3) & 0x1) - 1)));
  93.  
  94.     state_bs[44] = state_bs[44] ^  (0xFFFF & (~(((uint16_t)(key[ 5 ] >> 4) & 0x1) - 1)));
  95.  
  96.     state_bs[45] = state_bs[45] ^  (0xFFFF & (~(((uint16_t)(key[ 5 ] >> 5) & 0x1) - 1)));
  97.  
  98.     state_bs[46] = state_bs[46] ^  (0xFFFF & (~(((uint16_t)(key[ 5 ] >> 6) & 0x1) - 1)));
  99.  
  100.     state_bs[47] = state_bs[47] ^  (0xFFFF & (~(((uint16_t)(key[ 5 ] >> 7) & 0x1) - 1)));
  101.  
  102.     state_bs[48] = state_bs[48] ^  (0xFFFF & (~(((uint16_t)(key[ 6 ] >> 0) & 0x1) - 1)));
  103.  
  104.     state_bs[49] = state_bs[49] ^  (0xFFFF & (~(((uint16_t)(key[ 6 ] >> 1) & 0x1) - 1)));
  105.  
  106.     state_bs[50] = state_bs[50] ^  (0xFFFF & (~(((uint16_t)(key[ 6 ] >> 2) & 0x1) - 1)));
  107.  
  108.     state_bs[51] = state_bs[51] ^  (0xFFFF & (~(((uint16_t)(key[ 6 ] >> 3) & 0x1) - 1)));
  109.  
  110.     state_bs[52] = state_bs[52] ^  (0xFFFF & (~(((uint16_t)(key[ 6 ] >> 4) & 0x1) - 1)));
  111.  
  112.     state_bs[53] = state_bs[53] ^  (0xFFFF & (~(((uint16_t)(key[ 6 ] >> 5) & 0x1) - 1)));
  113.  
  114.     state_bs[54] = state_bs[54] ^  (0xFFFF & (~(((uint16_t)(key[ 6 ] >> 6) & 0x1) - 1)));
  115.  
  116.     state_bs[55] = state_bs[55] ^  (0xFFFF & (~(((uint16_t)(key[ 6 ] >> 7) & 0x1) - 1)));
  117.  
  118.     state_bs[56] = state_bs[56] ^  (0xFFFF & (~(((uint16_t)(key[ 7 ] >> 0) & 0x1) - 1)));
  119.  
  120.     state_bs[57] = state_bs[57] ^  (0xFFFF & (~(((uint16_t)(key[ 7 ] >> 1) & 0x1) - 1)));
  121.  
  122.     state_bs[58] = state_bs[58] ^  (0xFFFF & (~(((uint16_t)(key[ 7 ] >> 2) & 0x1) - 1)));
  123.  
  124.     state_bs[59] = state_bs[59] ^  (0xFFFF & (~(((uint16_t)(key[ 7 ] >> 3) & 0x1) - 1)));
  125.  
  126.     state_bs[60] = state_bs[60] ^  (0xFFFF & (~(((uint16_t)(key[ 7 ] >> 4) & 0x1) - 1)));
  127.  
  128.     state_bs[61] = state_bs[61] ^  (0xFFFF & (~(((uint16_t)(key[ 7 ] >> 5) & 0x1) - 1)));
  129.  
  130.     state_bs[62] = state_bs[62] ^  (0xFFFF & (~(((uint16_t)(key[ 7 ] >> 6) & 0x1) - 1)));
  131.  
  132.     state_bs[63] = state_bs[63] ^  (0xFFFF & (~(((uint16_t)(key[ 7 ] >> 7) & 0x1) - 1)));
  133. }
  134.  
  135. void pbox_layer(bs_reg_t state_bs[CRYPTO_IN_SIZE_BIT], bs_reg_t out[CRYPTO_IN_SIZE_BIT])
  136. {
  137.     out[0] = state_bs[0];
  138.     out[16] = state_bs[1];
  139.     out[32] = state_bs[2];
  140.     out[48] = state_bs[3];
  141.     out[1] = state_bs[4];
  142.     out[17] = state_bs[5];
  143.     out[33] = state_bs[6];
  144.     out[49] = state_bs[7];
  145.     out[2] = state_bs[8];
  146.     out[18] = state_bs[9];
  147.     out[34] = state_bs[10];
  148.     out[50] = state_bs[11];
  149.     out[3] = state_bs[12];
  150.     out[19] = state_bs[13];
  151.     out[35] = state_bs[14];
  152.     out[51] = state_bs[15];
  153.     out[4] = state_bs[16];
  154.     out[20] = state_bs[17];
  155.     out[36] = state_bs[18];
  156.     out[52] = state_bs[19];
  157.     out[5] = state_bs[20];
  158.     out[21] = state_bs[21];
  159.     out[37] = state_bs[22];
  160.     out[53] = state_bs[23];
  161.     out[6] = state_bs[24];
  162.     out[22] = state_bs[25];
  163.     out[38] = state_bs[26];
  164.     out[54] = state_bs[27];
  165.     out[7] = state_bs[28];
  166.     out[23] = state_bs[29];
  167.     out[39] = state_bs[30];
  168.     out[55] = state_bs[31];
  169.     out[8] = state_bs[32];
  170.     out[24] = state_bs[33];
  171.     out[40] = state_bs[34];
  172.     out[56] = state_bs[35];
  173.     out[9] = state_bs[36];
  174.     out[25] = state_bs[37];
  175.     out[41] = state_bs[38];
  176.     out[57] = state_bs[39];
  177.     out[10] = state_bs[40];
  178.     out[26] = state_bs[41];
  179.     out[42] = state_bs[42];
  180.     out[58] = state_bs[43];
  181.     out[11] = state_bs[44];
  182.     out[27] = state_bs[45];
  183.     out[43] = state_bs[46];
  184.     out[59] = state_bs[47];
  185.     out[12] = state_bs[48];
  186.     out[28] = state_bs[49];
  187.     out[44] = state_bs[50];
  188.     out[60] = state_bs[51];
  189.     out[13] = state_bs[52];
  190.     out[29] = state_bs[53];
  191.     out[45] = state_bs[54];
  192.     out[61] = state_bs[55];
  193.     out[14] = state_bs[56];
  194.     out[30] = state_bs[57];
  195.     out[46] = state_bs[58];
  196.     out[62] = state_bs[59];
  197.     out[15] = state_bs[60];
  198.     out[31] = state_bs[61];
  199.     out[47] = state_bs[62];
  200.     out[63] = state_bs[63];
  201. }
  202.  
  203. void sbox_layer(bs_reg_t state_bs[CRYPTO_IN_SIZE_BIT], bs_reg_t out[CRYPTO_IN_SIZE_BIT])
  204. {
  205.     bs_reg_t in0, in1, in2, in3;
  206.  
  207.     in0 = state_bs[0];
  208.     in1 = state_bs[1];
  209.     in2 = state_bs[2];
  210.     in3 = state_bs[3];
  211.  
  212.     out[0] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  213.     out[1] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  214.     out[2] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  215.     out[3] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  216.  
  217.  
  218.     in0 = state_bs[4];
  219.     in1 = state_bs[5];
  220.     in2 = state_bs[6];
  221.     in3 = state_bs[7];
  222.  
  223.     out[4] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  224.     out[5] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  225.     out[6] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  226.     out[7] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  227.  
  228.  
  229.     in0 = state_bs[8];
  230.     in1 = state_bs[9];
  231.     in2 = state_bs[10];
  232.     in3 = state_bs[11];
  233.  
  234.     out[8] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  235.     out[9] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  236.     out[10] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  237.     out[11] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  238.  
  239.  
  240.     in0 = state_bs[12];
  241.     in1 = state_bs[13];
  242.     in2 = state_bs[14];
  243.     in3 = state_bs[15];
  244.  
  245.     out[12] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  246.     out[13] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  247.     out[14] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  248.     out[15] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  249.  
  250.  
  251.     in0 = state_bs[16];
  252.     in1 = state_bs[17];
  253.     in2 = state_bs[18];
  254.     in3 = state_bs[19];
  255.  
  256.     out[16] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  257.     out[17] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  258.     out[18] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  259.     out[19] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  260.  
  261.  
  262.     in0 = state_bs[20];
  263.     in1 = state_bs[21];
  264.     in2 = state_bs[22];
  265.     in3 = state_bs[23];
  266.  
  267.     out[20] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  268.     out[21] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  269.     out[22] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  270.     out[23] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  271.  
  272.  
  273.     in0 = state_bs[24];
  274.     in1 = state_bs[25];
  275.     in2 = state_bs[26];
  276.     in3 = state_bs[27];
  277.  
  278.     out[24] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  279.     out[25] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  280.     out[26] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  281.     out[27] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  282.  
  283.  
  284.     in0 = state_bs[28];
  285.     in1 = state_bs[29];
  286.     in2 = state_bs[30];
  287.     in3 = state_bs[31];
  288.  
  289.     out[28] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  290.     out[29] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  291.     out[30] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  292.     out[31] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  293.  
  294.  
  295.     in0 = state_bs[32];
  296.     in1 = state_bs[33];
  297.     in2 = state_bs[34];
  298.     in3 = state_bs[35];
  299.  
  300.     out[32] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  301.     out[33] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  302.     out[34] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  303.     out[35] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  304.  
  305.  
  306.     in0 = state_bs[36];
  307.     in1 = state_bs[37];
  308.     in2 = state_bs[38];
  309.     in3 = state_bs[39];
  310.  
  311.     out[36] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  312.     out[37] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  313.     out[38] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  314.     out[39] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  315.  
  316.  
  317.     in0 = state_bs[40];
  318.     in1 = state_bs[41];
  319.     in2 = state_bs[42];
  320.     in3 = state_bs[43];
  321.  
  322.     out[40] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  323.     out[41] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  324.     out[42] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  325.     out[43] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  326.  
  327.  
  328.     in0 = state_bs[44];
  329.     in1 = state_bs[45];
  330.     in2 = state_bs[46];
  331.     in3 = state_bs[47];
  332.  
  333.     out[44] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  334.     out[45] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  335.     out[46] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  336.     out[47] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  337.  
  338.  
  339.     in0 = state_bs[48];
  340.     in1 = state_bs[49];
  341.     in2 = state_bs[50];
  342.     in3 = state_bs[51];
  343.  
  344.     out[48] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  345.     out[49] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  346.     out[50] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  347.     out[51] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  348.  
  349.  
  350.     in0 = state_bs[52];
  351.     in1 = state_bs[53];
  352.     in2 = state_bs[54];
  353.     in3 = state_bs[55];
  354.  
  355.     out[52] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  356.     out[53] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  357.     out[54] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  358.     out[55] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  359.  
  360.  
  361.     in0 = state_bs[56];
  362.     in1 = state_bs[57];
  363.     in2 = state_bs[58];
  364.     in3 = state_bs[59];
  365.  
  366.     out[56] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  367.     out[57] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  368.     out[58] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  369.     out[59] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  370.  
  371.  
  372.     in0 = state_bs[60];
  373.     in1 = state_bs[61];
  374.     in2 = state_bs[62];
  375.     in3 = state_bs[63];
  376.  
  377.     out[60] = ((in0) ^  (in1 & in2) ^ (in2) ^ (in3) );
  378.     out[61] = (in0 & ( (in2 & (in1 ^ in3)) ^ (in3 & in1))) ^ (in3 & (~in2 ^ in1)) ^ in1;
  379.     out[62] = (in0 & ((in1 & ~in3) ^ (in3 & ~in2))) ^ (in3 & ~in1) ^ ~in2;
  380.     out[63] = (in1 & ( (in0 & (in2 ^ in3)) ^ ~in2)) ^ (in0 & ~(in2 & in3)) ^ ~in3;
  381.  
  382. }
  383.  
  384. static void enslice(const uint8_t pt[CRYPTO_IN_SIZE * BITSLICE_WIDTH], bs_reg_t state_bs[CRYPTO_IN_SIZE_BIT])
  385. {
  386.     /// INSERT YOUR CODE HERE ///
  387.     //state_bs has 64 rows and 16 cols, each row is bit of the 16 input data
  388.     //16 col cux 16 input data
  389.  
  390.     state_bs[0] = (state_bs[0] & (~(1 << 0))) | (((pt[ 0 ] >> 0) & 0x1) << 0);
  391.  
  392.  
  393.     state_bs[1] = (state_bs[1] & (~(1 << 0))) | (((pt[ 0 ] >> 1) & 0x1) << 0);
  394.  
  395.     state_bs[2] = (state_bs[2] & (~(1 << 0))) | (((pt[ 0 ] >> 2) & 0x1) << 0);
  396.     state_bs[3] = (state_bs[3] & (~(1 << 0))) | (((pt[ 0 ] >> 3) & 0x1) << 0);
  397.  
  398.     state_bs[4] = (state_bs[4] & (~(1 << 0))) | (((pt[ 0 ] >> 4) & 0x1) << 0);
  399.  
  400.     state_bs[5] = (state_bs[5] & (~(1 << 0))) | (((pt[ 0 ] >> 5) & 0x1) << 0);
  401.  
  402.     state_bs[6] = (state_bs[6] & (~(1 << 0))) | (((pt[ 0 ] >> 6) & 0x1) << 0);
  403.  
  404.     state_bs[7] = (state_bs[7] & (~(1 << 0))) | (((pt[ 0 ] >> 7) & 0x1) << 0);
  405.  
  406.     state_bs[8] = (state_bs[8] & (~(1 << 0))) | (((pt[ 1 ] >> 0) & 0x1) << 0);
  407.  
  408.     state_bs[9] = (state_bs[9] & (~(1 << 0))) | (((pt[ 1 ] >> 1) & 0x1) << 0);
  409.  
  410.     state_bs[10] = (state_bs[10] & (~(1 << 0))) | (((pt[ 1 ] >> 2) & 0x1) << 0);
  411.  
  412.     state_bs[11] = (state_bs[11] & (~(1 << 0))) | (((pt[ 1 ] >> 3) & 0x1) << 0);
  413.  
  414.     state_bs[12] = (state_bs[12] & (~(1 << 0))) | (((pt[ 1 ] >> 4) & 0x1) << 0);
  415.  
  416.     state_bs[13] = (state_bs[13] & (~(1 << 0))) | (((pt[ 1 ] >> 5) & 0x1) << 0);
  417.  
  418.     state_bs[14] = (state_bs[14] & (~(1 << 0))) | (((pt[ 1 ] >> 6) & 0x1) << 0);
  419.  
  420.     state_bs[15] = (state_bs[15] & (~(1 << 0))) | (((pt[ 1 ] >> 7) & 0x1) << 0);
  421.  
  422.     state_bs[16] = (state_bs[16] & (~(1 << 0))) | (((pt[ 2 ] >> 0) & 0x1) << 0);
  423.  
  424.     state_bs[17] = (state_bs[17] & (~(1 << 0))) | (((pt[ 2 ] >> 1) & 0x1) << 0);
  425.  
  426.     state_bs[18] = (state_bs[18] & (~(1 << 0))) | (((pt[ 2 ] >> 2) & 0x1) << 0);
  427.  
  428.     state_bs[19] = (state_bs[19] & (~(1 << 0))) | (((pt[ 2 ] >> 3) & 0x1) << 0);
  429.  
  430.     state_bs[20] = (state_bs[20] & (~(1 << 0))) | (((pt[ 2 ] >> 4) & 0x1) << 0);
  431.  
  432.     state_bs[21] = (state_bs[21] & (~(1 << 0))) | (((pt[ 2 ] >> 5) & 0x1) << 0);
  433.  
  434.     state_bs[22] = (state_bs[22] & (~(1 << 0))) | (((pt[ 2 ] >> 6) & 0x1) << 0);
  435.  
  436.     state_bs[23] = (state_bs[23] & (~(1 << 0))) | (((pt[ 2 ] >> 7) & 0x1) << 0);
  437.  
  438.     state_bs[24] = (state_bs[24] & (~(1 << 0))) | (((pt[ 3 ] >> 0) & 0x1) << 0);
  439.  
  440.     state_bs[25] = (state_bs[25] & (~(1 << 0))) | (((pt[ 3 ] >> 1) & 0x1) << 0);
  441.  
  442.     state_bs[26] = (state_bs[26] & (~(1 << 0))) | (((pt[ 3 ] >> 2) & 0x1) << 0);
  443.  
  444.     state_bs[27] = (state_bs[27] & (~(1 << 0))) | (((pt[ 3 ] >> 3) & 0x1) << 0);
  445.  
  446.     state_bs[28] = (state_bs[28] & (~(1 << 0))) | (((pt[ 3 ] >> 4) & 0x1) << 0);
  447.  
  448.     state_bs[29] = (state_bs[29] & (~(1 << 0))) | (((pt[ 3 ] >> 5) & 0x1) << 0);
  449.  
  450.     state_bs[30] = (state_bs[30] & (~(1 << 0))) | (((pt[ 3 ] >> 6) & 0x1) << 0);
  451.  
  452.     state_bs[31] = (state_bs[31] & (~(1 << 0))) | (((pt[ 3 ] >> 7) & 0x1) << 0);
  453.  
  454.     state_bs[32] = (state_bs[32] & (~(1 << 0))) | (((pt[ 4 ] >> 0) & 0x1) << 0);
  455.  
  456.     state_bs[33] = (state_bs[33] & (~(1 << 0))) | (((pt[ 4 ] >> 1) & 0x1) << 0);
  457.  
  458.     state_bs[34] = (state_bs[34] & (~(1 << 0))) | (((pt[ 4 ] >> 2) & 0x1) << 0);
  459.  
  460.     state_bs[35] = (state_bs[35] & (~(1 << 0))) | (((pt[ 4 ] >> 3) & 0x1) << 0);
  461.  
  462.     state_bs[36] = (state_bs[36] & (~(1 << 0))) | (((pt[ 4 ] >> 4) & 0x1) << 0);
  463.  
  464.     state_bs[37] = (state_bs[37] & (~(1 << 0))) | (((pt[ 4 ] >> 5) & 0x1) << 0);
  465.  
  466.     state_bs[38] = (state_bs[38] & (~(1 << 0))) | (((pt[ 4 ] >> 6) & 0x1) << 0);
  467.  
  468.     state_bs[39] = (state_bs[39] & (~(1 << 0))) | (((pt[ 4 ] >> 7) & 0x1) << 0);
  469.  
  470.     state_bs[40] = (state_bs[40] & (~(1 << 0))) | (((pt[ 5 ] >> 0) & 0x1) << 0);
  471.  
  472.     state_bs[41] = (state_bs[41] & (~(1 << 0))) | (((pt[ 5 ] >> 1) & 0x1) << 0);
  473.  
  474.     state_bs[42] = (state_bs[42] & (~(1 << 0))) | (((pt[ 5 ] >> 2) & 0x1) << 0);
  475.  
  476.     state_bs[43] = (state_bs[43] & (~(1 << 0))) | (((pt[ 5 ] >> 3) & 0x1) << 0);
  477.  
  478.     state_bs[44] = (state_bs[44] & (~(1 << 0))) | (((pt[ 5 ] >> 4) & 0x1) << 0);
  479.  
  480.     state_bs[45] = (state_bs[45] & (~(1 << 0))) | (((pt[ 5 ] >> 5) & 0x1) << 0);
  481.  
  482.     state_bs[46] = (state_bs[46] & (~(1 << 0))) | (((pt[ 5 ] >> 6) & 0x1) << 0);
  483.  
  484.     state_bs[47] = (state_bs[47] & (~(1 << 0))) | (((pt[ 5 ] >> 7) & 0x1) << 0);
  485.  
  486.     state_bs[48] = (state_bs[48] & (~(1 << 0))) | (((pt[ 6 ] >> 0) & 0x1) << 0);
  487.  
  488.     state_bs[49] = (state_bs[49] & (~(1 << 0))) | (((pt[ 6 ] >> 1) & 0x1) << 0);
  489.  
  490.     state_bs[50] = (state_bs[50] & (~(1 << 0))) | (((pt[ 6 ] >> 2) & 0x1) << 0);
  491.  
  492.     state_bs[51] = (state_bs[51] & (~(1 << 0))) | (((pt[ 6 ] >> 3) & 0x1) << 0);
  493.  
  494.     state_bs[52] = (state_bs[52] & (~(1 << 0))) | (((pt[ 6 ] >> 4) & 0x1) << 0);
  495.  
  496.     state_bs[53] = (state_bs[53] & (~(1 << 0))) | (((pt[ 6 ] >> 5) & 0x1) << 0);
  497.  
  498.     state_bs[54] = (state_bs[54] & (~(1 << 0))) | (((pt[ 6 ] >> 6) & 0x1) << 0);
  499.  
  500.     state_bs[55] = (state_bs[55] & (~(1 << 0))) | (((pt[ 6 ] >> 7) & 0x1) << 0);
  501.  
  502.     state_bs[56] = (state_bs[56] & (~(1 << 0))) | (((pt[ 7 ] >> 0) & 0x1) << 0);
  503.  
  504.     state_bs[57] = (state_bs[57] & (~(1 << 0))) | (((pt[ 7 ] >> 1) & 0x1) << 0);
  505.  
  506.     state_bs[58] = (state_bs[58] & (~(1 << 0))) | (((pt[ 7 ] >> 2) & 0x1) << 0);
  507.  
  508.     state_bs[59] = (state_bs[59] & (~(1 << 0))) | (((pt[ 7 ] >> 3) & 0x1) << 0);
  509.  
  510.     state_bs[60] = (state_bs[60] & (~(1 << 0))) | (((pt[ 7 ] >> 4) & 0x1) << 0);
  511.  
  512.     state_bs[61] = (state_bs[61] & (~(1 << 0))) | (((pt[ 7 ] >> 5) & 0x1) << 0);
  513.  
  514.     state_bs[62] = (state_bs[62] & (~(1 << 0))) | (((pt[ 7 ] >> 6) & 0x1) << 0);
  515.  
  516.     state_bs[63] = (state_bs[63] & (~(1 << 0))) | (((pt[ 7 ] >> 7) & 0x1) << 0);
  517.  
  518.     state_bs[0] = (state_bs[0] & (~(1 << 1))) | (((pt[ 8 ] >> 0) & 0x1) << 1);
  519.  
  520.     state_bs[1] = (state_bs[1] & (~(1 << 1))) | (((pt[ 8 ] >> 1) & 0x1) << 1);
  521.  
  522.     state_bs[2] = (state_bs[2] & (~(1 << 1))) | (((pt[ 8 ] >> 2) & 0x1) << 1);
  523.  
  524.     state_bs[3] = (state_bs[3] & (~(1 << 1))) | (((pt[ 8 ] >> 3) & 0x1) << 1);
  525.  
  526.     state_bs[4] = (state_bs[4] & (~(1 << 1))) | (((pt[ 8 ] >> 4) & 0x1) << 1);
  527.  
  528.     state_bs[5] = (state_bs[5] & (~(1 << 1))) | (((pt[ 8 ] >> 5) & 0x1) << 1);
  529.  
  530.     state_bs[6] = (state_bs[6] & (~(1 << 1))) | (((pt[ 8 ] >> 6) & 0x1) << 1);
  531.  
  532.     state_bs[7] = (state_bs[7] & (~(1 << 1))) | (((pt[ 8 ] >> 7) & 0x1) << 1);
  533.  
  534.     state_bs[8] = (state_bs[8] & (~(1 << 1))) | (((pt[ 9 ] >> 0) & 0x1) << 1);
  535.  
  536.     state_bs[9] = (state_bs[9] & (~(1 << 1))) | (((pt[ 9 ] >> 1) & 0x1) << 1);
  537.  
  538.     state_bs[10] = (state_bs[10] & (~(1 << 1))) | (((pt[ 9 ] >> 2) & 0x1) << 1);
  539.  
  540.     state_bs[11] = (state_bs[11] & (~(1 << 1))) | (((pt[ 9 ] >> 3) & 0x1) << 1);
  541.  
  542.     state_bs[12] = (state_bs[12] & (~(1 << 1))) | (((pt[ 9 ] >> 4) & 0x1) << 1);
  543.  
  544.     state_bs[13] = (state_bs[13] & (~(1 << 1))) | (((pt[ 9 ] >> 5) & 0x1) << 1);
  545.  
  546.     state_bs[14] = (state_bs[14] & (~(1 << 1))) | (((pt[ 9 ] >> 6) & 0x1) << 1);
  547.  
  548.     state_bs[15] = (state_bs[15] & (~(1 << 1))) | (((pt[ 9 ] >> 7) & 0x1) << 1);
  549.  
  550.     state_bs[16] = (state_bs[16] & (~(1 << 1))) | (((pt[ 10 ] >> 0) & 0x1) << 1);
  551.  
  552.     state_bs[17] = (state_bs[17] & (~(1 << 1))) | (((pt[ 10 ] >> 1) & 0x1) << 1);
  553.  
  554.     state_bs[18] = (state_bs[18] & (~(1 << 1))) | (((pt[ 10 ] >> 2) & 0x1) << 1);
  555.  
  556.     state_bs[19] = (state_bs[19] & (~(1 << 1))) | (((pt[ 10 ] >> 3) & 0x1) << 1);
  557.  
  558.     state_bs[20] = (state_bs[20] & (~(1 << 1))) | (((pt[ 10 ] >> 4) & 0x1) << 1);
  559.  
  560.     state_bs[21] = (state_bs[21] & (~(1 << 1))) | (((pt[ 10 ] >> 5) & 0x1) << 1);
  561.  
  562.     state_bs[22] = (state_bs[22] & (~(1 << 1))) | (((pt[ 10 ] >> 6) & 0x1) << 1);
  563.  
  564.     state_bs[23] = (state_bs[23] & (~(1 << 1))) | (((pt[ 10 ] >> 7) & 0x1) << 1);
  565.  
  566.     state_bs[24] = (state_bs[24] & (~(1 << 1))) | (((pt[ 11 ] >> 0) & 0x1) << 1);
  567.  
  568.     state_bs[25] = (state_bs[25] & (~(1 << 1))) | (((pt[ 11 ] >> 1) & 0x1) << 1);
  569.  
  570.     state_bs[26] = (state_bs[26] & (~(1 << 1))) | (((pt[ 11 ] >> 2) & 0x1) << 1);
  571.  
  572.     state_bs[27] = (state_bs[27] & (~(1 << 1))) | (((pt[ 11 ] >> 3) & 0x1) << 1);
  573.  
  574.     state_bs[28] = (state_bs[28] & (~(1 << 1))) | (((pt[ 11 ] >> 4) & 0x1) << 1);
  575.  
  576.     state_bs[29] = (state_bs[29] & (~(1 << 1))) | (((pt[ 11 ] >> 5) & 0x1) << 1);
  577.  
  578.     state_bs[30] = (state_bs[30] & (~(1 << 1))) | (((pt[ 11 ] >> 6) & 0x1) << 1);
  579.  
  580.     state_bs[31] = (state_bs[31] & (~(1 << 1))) | (((pt[ 11 ] >> 7) & 0x1) << 1);
  581.  
  582.     state_bs[32] = (state_bs[32] & (~(1 << 1))) | (((pt[ 12 ] >> 0) & 0x1) << 1);
  583.  
  584.     state_bs[33] = (state_bs[33] & (~(1 << 1))) | (((pt[ 12 ] >> 1) & 0x1) << 1);
  585.  
  586.     state_bs[34] = (state_bs[34] & (~(1 << 1))) | (((pt[ 12 ] >> 2) & 0x1) << 1);
  587.  
  588.     state_bs[35] = (state_bs[35] & (~(1 << 1))) | (((pt[ 12 ] >> 3) & 0x1) << 1);
  589.  
  590.     state_bs[36] = (state_bs[36] & (~(1 << 1))) | (((pt[ 12 ] >> 4) & 0x1) << 1);
  591.  
  592.     state_bs[37] = (state_bs[37] & (~(1 << 1))) | (((pt[ 12 ] >> 5) & 0x1) << 1);
  593.  
  594.     state_bs[38] = (state_bs[38] & (~(1 << 1))) | (((pt[ 12 ] >> 6) & 0x1) << 1);
  595.  
  596.     state_bs[39] = (state_bs[39] & (~(1 << 1))) | (((pt[ 12 ] >> 7) & 0x1) << 1);
  597.  
  598.     state_bs[40] = (state_bs[40] & (~(1 << 1))) | (((pt[ 13 ] >> 0) & 0x1) << 1);
  599.  
  600.     state_bs[41] = (state_bs[41] & (~(1 << 1))) | (((pt[ 13 ] >> 1) & 0x1) << 1);
  601.  
  602.     state_bs[42] = (state_bs[42] & (~(1 << 1))) | (((pt[ 13 ] >> 2) & 0x1) << 1);
  603.  
  604.     state_bs[43] = (state_bs[43] & (~(1 << 1))) | (((pt[ 13 ] >> 3) & 0x1) << 1);
  605.  
  606.     state_bs[44] = (state_bs[44] & (~(1 << 1))) | (((pt[ 13 ] >> 4) & 0x1) << 1);
  607.  
  608.     state_bs[45] = (state_bs[45] & (~(1 << 1))) | (((pt[ 13 ] >> 5) & 0x1) << 1);
  609.  
  610.     state_bs[46] = (state_bs[46] & (~(1 << 1))) | (((pt[ 13 ] >> 6) & 0x1) << 1);
  611.  
  612.     state_bs[47] = (state_bs[47] & (~(1 << 1))) | (((pt[ 13 ] >> 7) & 0x1) << 1);
  613.  
  614.     state_bs[48] = (state_bs[48] & (~(1 << 1))) | (((pt[ 14 ] >> 0) & 0x1) << 1);
  615.  
  616.     state_bs[49] = (state_bs[49] & (~(1 << 1))) | (((pt[ 14 ] >> 1) & 0x1) << 1);
  617.  
  618.     state_bs[50] = (state_bs[50] & (~(1 << 1))) | (((pt[ 14 ] >> 2) & 0x1) << 1);
  619.  
  620.     state_bs[51] = (state_bs[51] & (~(1 << 1))) | (((pt[ 14 ] >> 3) & 0x1) << 1);
  621.  
  622.     state_bs[52] = (state_bs[52] & (~(1 << 1))) | (((pt[ 14 ] >> 4) & 0x1) << 1);
  623.  
  624.     state_bs[53] = (state_bs[53] & (~(1 << 1))) | (((pt[ 14 ] >> 5) & 0x1) << 1);
  625.  
  626.     state_bs[54] = (state_bs[54] & (~(1 << 1))) | (((pt[ 14 ] >> 6) & 0x1) << 1);
  627.  
  628.     state_bs[55] = (state_bs[55] & (~(1 << 1))) | (((pt[ 14 ] >> 7) & 0x1) << 1);
  629.  
  630.     state_bs[56] = (state_bs[56] & (~(1 << 1))) | (((pt[ 15 ] >> 0) & 0x1) << 1);
  631.  
  632.     state_bs[57] = (state_bs[57] & (~(1 << 1))) | (((pt[ 15 ] >> 1) & 0x1) << 1);
  633.  
  634.     state_bs[58] = (state_bs[58] & (~(1 << 1))) | (((pt[ 15 ] >> 2) & 0x1) << 1);
  635.  
  636.     state_bs[59] = (state_bs[59] & (~(1 << 1))) | (((pt[ 15 ] >> 3) & 0x1) << 1);
  637.  
  638.     state_bs[60] = (state_bs[60] & (~(1 << 1))) | (((pt[ 15 ] >> 4) & 0x1) << 1);
  639.  
  640.     state_bs[61] = (state_bs[61] & (~(1 << 1))) | (((pt[ 15 ] >> 5) & 0x1) << 1);
  641.  
  642.     state_bs[62] = (state_bs[62] & (~(1 << 1))) | (((pt[ 15 ] >> 6) & 0x1) << 1);
  643.  
  644.     state_bs[63] = (state_bs[63] & (~(1 << 1))) | (((pt[ 15 ] >> 7) & 0x1) << 1);
  645.  
  646.     state_bs[0] = (state_bs[0] & (~(1 << 2))) | (((pt[ 16 ] >> 0) & 0x1) << 2);
  647.  
  648.     state_bs[1] = (state_bs[1] & (~(1 << 2))) | (((pt[ 16 ] >> 1) & 0x1) << 2);
  649.  
  650.     state_bs[2] = (state_bs[2] & (~(1 << 2))) | (((pt[ 16 ] >> 2) & 0x1) << 2);
  651.  
  652.     state_bs[3] = (state_bs[3] & (~(1 << 2))) | (((pt[ 16 ] >> 3) & 0x1) << 2);
  653.  
  654.     state_bs[4] = (state_bs[4] & (~(1 << 2))) | (((pt[ 16 ] >> 4) & 0x1) << 2);
  655.  
  656.     state_bs[5] = (state_bs[5] & (~(1 << 2))) | (((pt[ 16 ] >> 5) & 0x1) << 2);
  657.  
  658.     state_bs[6] = (state_bs[6] & (~(1 << 2))) | (((pt[ 16 ] >> 6) & 0x1) << 2);
  659.  
  660.     state_bs[7] = (state_bs[7] & (~(1 << 2))) | (((pt[ 16 ] >> 7) & 0x1) << 2);
  661.  
  662.     state_bs[8] = (state_bs[8] & (~(1 << 2))) | (((pt[ 17 ] >> 0) & 0x1) << 2);
  663.  
  664.     state_bs[9] = (state_bs[9] & (~(1 << 2))) | (((pt[ 17 ] >> 1) & 0x1) << 2);
  665.  
  666.     state_bs[10] = (state_bs[10] & (~(1 << 2))) | (((pt[ 17 ] >> 2) & 0x1) << 2);
  667.  
  668.     state_bs[11] = (state_bs[11] & (~(1 << 2))) | (((pt[ 17 ] >> 3) & 0x1) << 2);
  669.  
  670.     state_bs[12] = (state_bs[12] & (~(1 << 2))) | (((pt[ 17 ] >> 4) & 0x1) << 2);
  671.  
  672.     state_bs[13] = (state_bs[13] & (~(1 << 2))) | (((pt[ 17 ] >> 5) & 0x1) << 2);
  673.  
  674.     state_bs[14] = (state_bs[14] & (~(1 << 2))) | (((pt[ 17 ] >> 6) & 0x1) << 2);
  675.  
  676.     state_bs[15] = (state_bs[15] & (~(1 << 2))) | (((pt[ 17 ] >> 7) & 0x1) << 2);
  677.  
  678.     state_bs[16] = (state_bs[16] & (~(1 << 2))) | (((pt[ 18 ] >> 0) & 0x1) << 2);
  679.  
  680.     state_bs[17] = (state_bs[17] & (~(1 << 2))) | (((pt[ 18 ] >> 1) & 0x1) << 2);
  681.  
  682.     state_bs[18] = (state_bs[18] & (~(1 << 2))) | (((pt[ 18 ] >> 2) & 0x1) << 2);
  683.  
  684.     state_bs[19] = (state_bs[19] & (~(1 << 2))) | (((pt[ 18 ] >> 3) & 0x1) << 2);
  685.  
  686.     state_bs[20] = (state_bs[20] & (~(1 << 2))) | (((pt[ 18 ] >> 4) & 0x1) << 2);
  687.  
  688.     state_bs[21] = (state_bs[21] & (~(1 << 2))) | (((pt[ 18 ] >> 5) & 0x1) << 2);
  689.  
  690.     state_bs[22] = (state_bs[22] & (~(1 << 2))) | (((pt[ 18 ] >> 6) & 0x1) << 2);
  691.  
  692.     state_bs[23] = (state_bs[23] & (~(1 << 2))) | (((pt[ 18 ] >> 7) & 0x1) << 2);
  693.  
  694.     state_bs[24] = (state_bs[24] & (~(1 << 2))) | (((pt[ 19 ] >> 0) & 0x1) << 2);
  695.  
  696.     state_bs[25] = (state_bs[25] & (~(1 << 2))) | (((pt[ 19 ] >> 1) & 0x1) << 2);
  697.  
  698.     state_bs[26] = (state_bs[26] & (~(1 << 2))) | (((pt[ 19 ] >> 2) & 0x1) << 2);
  699.  
  700.     state_bs[27] = (state_bs[27] & (~(1 << 2))) | (((pt[ 19 ] >> 3) & 0x1) << 2);
  701.  
  702.     state_bs[28] = (state_bs[28] & (~(1 << 2))) | (((pt[ 19 ] >> 4) & 0x1) << 2);
  703.  
  704.     state_bs[29] = (state_bs[29] & (~(1 << 2))) | (((pt[ 19 ] >> 5) & 0x1) << 2);
  705.  
  706.     state_bs[30] = (state_bs[30] & (~(1 << 2))) | (((pt[ 19 ] >> 6) & 0x1) << 2);
  707.  
  708.     state_bs[31] = (state_bs[31] & (~(1 << 2))) | (((pt[ 19 ] >> 7) & 0x1) << 2);
  709.  
  710.     state_bs[32] = (state_bs[32] & (~(1 << 2))) | (((pt[ 20 ] >> 0) & 0x1) << 2);
  711.  
  712.     state_bs[33] = (state_bs[33] & (~(1 << 2))) | (((pt[ 20 ] >> 1) & 0x1) << 2);
  713.  
  714.     state_bs[34] = (state_bs[34] & (~(1 << 2))) | (((pt[ 20 ] >> 2) & 0x1) << 2);
  715.  
  716.     state_bs[35] = (state_bs[35] & (~(1 << 2))) | (((pt[ 20 ] >> 3) & 0x1) << 2);
  717.  
  718.     state_bs[36] = (state_bs[36] & (~(1 << 2))) | (((pt[ 20 ] >> 4) & 0x1) << 2);
  719.  
  720.     state_bs[37] = (state_bs[37] & (~(1 << 2))) | (((pt[ 20 ] >> 5) & 0x1) << 2);
  721.  
  722.     state_bs[38] = (state_bs[38] & (~(1 << 2))) | (((pt[ 20 ] >> 6) & 0x1) << 2);
  723.  
  724.     state_bs[39] = (state_bs[39] & (~(1 << 2))) | (((pt[ 20 ] >> 7) & 0x1) << 2);
  725.  
  726.     state_bs[40] = (state_bs[40] & (~(1 << 2))) | (((pt[ 21 ] >> 0) & 0x1) << 2);
  727.  
  728.     state_bs[41] = (state_bs[41] & (~(1 << 2))) | (((pt[ 21 ] >> 1) & 0x1) << 2);
  729.  
  730.     state_bs[42] = (state_bs[42] & (~(1 << 2))) | (((pt[ 21 ] >> 2) & 0x1) << 2);
  731.  
  732.     state_bs[43] = (state_bs[43] & (~(1 << 2))) | (((pt[ 21 ] >> 3) & 0x1) << 2);
  733.  
  734.     state_bs[44] = (state_bs[44] & (~(1 << 2))) | (((pt[ 21 ] >> 4) & 0x1) << 2);
  735.  
  736.     state_bs[45] = (state_bs[45] & (~(1 << 2))) | (((pt[ 21 ] >> 5) & 0x1) << 2);
  737.  
  738.     state_bs[46] = (state_bs[46] & (~(1 << 2))) | (((pt[ 21 ] >> 6) & 0x1) << 2);
  739.  
  740.     state_bs[47] = (state_bs[47] & (~(1 << 2))) | (((pt[ 21 ] >> 7) & 0x1) << 2);
  741.  
  742.     state_bs[48] = (state_bs[48] & (~(1 << 2))) | (((pt[ 22 ] >> 0) & 0x1) << 2);
  743.  
  744.     state_bs[49] = (state_bs[49] & (~(1 << 2))) | (((pt[ 22 ] >> 1) & 0x1) << 2);
  745.  
  746.     state_bs[50] = (state_bs[50] & (~(1 << 2))) | (((pt[ 22 ] >> 2) & 0x1) << 2);
  747.  
  748.     state_bs[51] = (state_bs[51] & (~(1 << 2))) | (((pt[ 22 ] >> 3) & 0x1) << 2);
  749.  
  750.     state_bs[52] = (state_bs[52] & (~(1 << 2))) | (((pt[ 22 ] >> 4) & 0x1) << 2);
  751.  
  752.     state_bs[53] = (state_bs[53] & (~(1 << 2))) | (((pt[ 22 ] >> 5) & 0x1) << 2);
  753.  
  754.     state_bs[54] = (state_bs[54] & (~(1 << 2))) | (((pt[ 22 ] >> 6) & 0x1) << 2);
  755.  
  756.     state_bs[55] = (state_bs[55] & (~(1 << 2))) | (((pt[ 22 ] >> 7) & 0x1) << 2);
  757.  
  758.     state_bs[56] = (state_bs[56] & (~(1 << 2))) | (((pt[ 23 ] >> 0) & 0x1) << 2);
  759.  
  760.     state_bs[57] = (state_bs[57] & (~(1 << 2))) | (((pt[ 23 ] >> 1) & 0x1) << 2);
  761.  
  762.     state_bs[58] = (state_bs[58] & (~(1 << 2))) | (((pt[ 23 ] >> 2) & 0x1) << 2);
  763.  
  764.     state_bs[59] = (state_bs[59] & (~(1 << 2))) | (((pt[ 23 ] >> 3) & 0x1) << 2);
  765.  
  766.     state_bs[60] = (state_bs[60] & (~(1 << 2))) | (((pt[ 23 ] >> 4) & 0x1) << 2);
  767.  
  768.     state_bs[61] = (state_bs[61] & (~(1 << 2))) | (((pt[ 23 ] >> 5) & 0x1) << 2);
  769.  
  770.     state_bs[62] = (state_bs[62] & (~(1 << 2))) | (((pt[ 23 ] >> 6) & 0x1) << 2);
  771.  
  772.     state_bs[63] = (state_bs[63] & (~(1 << 2))) | (((pt[ 23 ] >> 7) & 0x1) << 2);
  773.  
  774.     state_bs[0] = (state_bs[0] & (~(1 << 3))) | (((pt[ 24 ] >> 0) & 0x1) << 3);
  775.  
  776.     state_bs[1] = (state_bs[1] & (~(1 << 3))) | (((pt[ 24 ] >> 1) & 0x1) << 3);
  777.  
  778.     state_bs[2] = (state_bs[2] & (~(1 << 3))) | (((pt[ 24 ] >> 2) & 0x1) << 3);
  779.  
  780.     state_bs[3] = (state_bs[3] & (~(1 << 3))) | (((pt[ 24 ] >> 3) & 0x1) << 3);
  781.  
  782.     state_bs[4] = (state_bs[4] & (~(1 << 3))) | (((pt[ 24 ] >> 4) & 0x1) << 3);
  783.  
  784.     state_bs[5] = (state_bs[5] & (~(1 << 3))) | (((pt[ 24 ] >> 5) & 0x1) << 3);
  785.  
  786.     state_bs[6] = (state_bs[6] & (~(1 << 3))) | (((pt[ 24 ] >> 6) & 0x1) << 3);
  787.  
  788.     state_bs[7] = (state_bs[7] & (~(1 << 3))) | (((pt[ 24 ] >> 7) & 0x1) << 3);
  789.  
  790.     state_bs[8] = (state_bs[8] & (~(1 << 3))) | (((pt[ 25 ] >> 0) & 0x1) << 3);
  791.  
  792.     state_bs[9] = (state_bs[9] & (~(1 << 3))) | (((pt[ 25 ] >> 1) & 0x1) << 3);
  793.  
  794.     state_bs[10] = (state_bs[10] & (~(1 << 3))) | (((pt[ 25 ] >> 2) & 0x1) << 3);
  795.  
  796.     state_bs[11] = (state_bs[11] & (~(1 << 3))) | (((pt[ 25 ] >> 3) & 0x1) << 3);
  797.  
  798.     state_bs[12] = (state_bs[12] & (~(1 << 3))) | (((pt[ 25 ] >> 4) & 0x1) << 3);
  799.  
  800.     state_bs[13] = (state_bs[13] & (~(1 << 3))) | (((pt[ 25 ] >> 5) & 0x1) << 3);
  801.  
  802.     state_bs[14] = (state_bs[14] & (~(1 << 3))) | (((pt[ 25 ] >> 6) & 0x1) << 3);
  803.  
  804.     state_bs[15] = (state_bs[15] & (~(1 << 3))) | (((pt[ 25 ] >> 7) & 0x1) << 3);
  805.  
  806.     state_bs[16] = (state_bs[16] & (~(1 << 3))) | (((pt[ 26 ] >> 0) & 0x1) << 3);
  807.  
  808.     state_bs[17] = (state_bs[17] & (~(1 << 3))) | (((pt[ 26 ] >> 1) & 0x1) << 3);
  809.  
  810.     state_bs[18] = (state_bs[18] & (~(1 << 3))) | (((pt[ 26 ] >> 2) & 0x1) << 3);
  811.  
  812.     state_bs[19] = (state_bs[19] & (~(1 << 3))) | (((pt[ 26 ] >> 3) & 0x1) << 3);
  813.  
  814.     state_bs[20] = (state_bs[20] & (~(1 << 3))) | (((pt[ 26 ] >> 4) & 0x1) << 3);
  815.  
  816.     state_bs[21] = (state_bs[21] & (~(1 << 3))) | (((pt[ 26 ] >> 5) & 0x1) << 3);
  817.  
  818.     state_bs[22] = (state_bs[22] & (~(1 << 3))) | (((pt[ 26 ] >> 6) & 0x1) << 3);
  819.  
  820.     state_bs[23] = (state_bs[23] & (~(1 << 3))) | (((pt[ 26 ] >> 7) & 0x1) << 3);
  821.  
  822.     state_bs[24] = (state_bs[24] & (~(1 << 3))) | (((pt[ 27 ] >> 0) & 0x1) << 3);
  823.  
  824.     state_bs[25] = (state_bs[25] & (~(1 << 3))) | (((pt[ 27 ] >> 1) & 0x1) << 3);
  825.  
  826.     state_bs[26] = (state_bs[26] & (~(1 << 3))) | (((pt[ 27 ] >> 2) & 0x1) << 3);
  827.  
  828.     state_bs[27] = (state_bs[27] & (~(1 << 3))) | (((pt[ 27 ] >> 3) & 0x1) << 3);
  829.  
  830.     state_bs[28] = (state_bs[28] & (~(1 << 3))) | (((pt[ 27 ] >> 4) & 0x1) << 3);
  831.  
  832.     state_bs[29] = (state_bs[29] & (~(1 << 3))) | (((pt[ 27 ] >> 5) & 0x1) << 3);
  833.  
  834.     state_bs[30] = (state_bs[30] & (~(1 << 3))) | (((pt[ 27 ] >> 6) & 0x1) << 3);
  835.  
  836.     state_bs[31] = (state_bs[31] & (~(1 << 3))) | (((pt[ 27 ] >> 7) & 0x1) << 3);
  837.  
  838.     state_bs[32] = (state_bs[32] & (~(1 << 3))) | (((pt[ 28 ] >> 0) & 0x1) << 3);
  839.  
  840.     state_bs[33] = (state_bs[33] & (~(1 << 3))) | (((pt[ 28 ] >> 1) & 0x1) << 3);
  841.  
  842.     state_bs[34] = (state_bs[34] & (~(1 << 3))) | (((pt[ 28 ] >> 2) & 0x1) << 3);
  843.  
  844.     state_bs[35] = (state_bs[35] & (~(1 << 3))) | (((pt[ 28 ] >> 3) & 0x1) << 3);
  845.  
  846.     state_bs[36] = (state_bs[36] & (~(1 << 3))) | (((pt[ 28 ] >> 4) & 0x1) << 3);
  847.  
  848.     state_bs[37] = (state_bs[37] & (~(1 << 3))) | (((pt[ 28 ] >> 5) & 0x1) << 3);
  849.  
  850.     state_bs[38] = (state_bs[38] & (~(1 << 3))) | (((pt[ 28 ] >> 6) & 0x1) << 3);
  851.  
  852.     state_bs[39] = (state_bs[39] & (~(1 << 3))) | (((pt[ 28 ] >> 7) & 0x1) << 3);
  853.  
  854.     state_bs[40] = (state_bs[40] & (~(1 << 3))) | (((pt[ 29 ] >> 0) & 0x1) << 3);
  855.  
  856.     state_bs[41] = (state_bs[41] & (~(1 << 3))) | (((pt[ 29 ] >> 1) & 0x1) << 3);
  857.  
  858.     state_bs[42] = (state_bs[42] & (~(1 << 3))) | (((pt[ 29 ] >> 2) & 0x1) << 3);
  859.  
  860.     state_bs[43] = (state_bs[43] & (~(1 << 3))) | (((pt[ 29 ] >> 3) & 0x1) << 3);
  861.  
  862.     state_bs[44] = (state_bs[44] & (~(1 << 3))) | (((pt[ 29 ] >> 4) & 0x1) << 3);
  863.  
  864.     state_bs[45] = (state_bs[45] & (~(1 << 3))) | (((pt[ 29 ] >> 5) & 0x1) << 3);
  865.  
  866.     state_bs[46] = (state_bs[46] & (~(1 << 3))) | (((pt[ 29 ] >> 6) & 0x1) << 3);
  867.  
  868.     state_bs[47] = (state_bs[47] & (~(1 << 3))) | (((pt[ 29 ] >> 7) & 0x1) << 3);
  869.  
  870.     state_bs[48] = (state_bs[48] & (~(1 << 3))) | (((pt[ 30 ] >> 0) & 0x1) << 3);
  871.  
  872.     state_bs[49] = (state_bs[49] & (~(1 << 3))) | (((pt[ 30 ] >> 1) & 0x1) << 3);
  873.  
  874.     state_bs[50] = (state_bs[50] & (~(1 << 3))) | (((pt[ 30 ] >> 2) & 0x1) << 3);
  875.  
  876.     state_bs[51] = (state_bs[51] & (~(1 << 3))) | (((pt[ 30 ] >> 3) & 0x1) << 3);
  877.  
  878.     state_bs[52] = (state_bs[52] & (~(1 << 3))) | (((pt[ 30 ] >> 4) & 0x1) << 3);
  879.  
  880.     state_bs[53] = (state_bs[53] & (~(1 << 3))) | (((pt[ 30 ] >> 5) & 0x1) << 3);
  881.  
  882.     state_bs[54] = (state_bs[54] & (~(1 << 3))) | (((pt[ 30 ] >> 6) & 0x1) << 3);
  883.  
  884.     state_bs[55] = (state_bs[55] & (~(1 << 3))) | (((pt[ 30 ] >> 7) & 0x1) << 3);
  885.  
  886.     state_bs[56] = (state_bs[56] & (~(1 << 3))) | (((pt[ 31 ] >> 0) & 0x1) << 3);
  887.  
  888.     state_bs[57] = (state_bs[57] & (~(1 << 3))) | (((pt[ 31 ] >> 1) & 0x1) << 3);
  889.  
  890.     state_bs[58] = (state_bs[58] & (~(1 << 3))) | (((pt[ 31 ] >> 2) & 0x1) << 3);
  891.  
  892.     state_bs[59] = (state_bs[59] & (~(1 << 3))) | (((pt[ 31 ] >> 3) & 0x1) << 3);
  893.  
  894.     state_bs[60] = (state_bs[60] & (~(1 << 3))) | (((pt[ 31 ] >> 4) & 0x1) << 3);
  895.  
  896.     state_bs[61] = (state_bs[61] & (~(1 << 3))) | (((pt[ 31 ] >> 5) & 0x1) << 3);
  897.  
  898.     state_bs[62] = (state_bs[62] & (~(1 << 3))) | (((pt[ 31 ] >> 6) & 0x1) << 3);
  899.  
  900.     state_bs[63] = (state_bs[63] & (~(1 << 3))) | (((pt[ 31 ] >> 7) & 0x1) << 3);
  901.  
  902.     state_bs[0] = (state_bs[0] & (~(1 << 4))) | (((pt[ 32 ] >> 0) & 0x1) << 4);
  903.  
  904.     state_bs[1] = (state_bs[1] & (~(1 << 4))) | (((pt[ 32 ] >> 1) & 0x1) << 4);
  905.  
  906.     state_bs[2] = (state_bs[2] & (~(1 << 4))) | (((pt[ 32 ] >> 2) & 0x1) << 4);
  907.  
  908.     state_bs[3] = (state_bs[3] & (~(1 << 4))) | (((pt[ 32 ] >> 3) & 0x1) << 4);
  909.  
  910.     state_bs[4] = (state_bs[4] & (~(1 << 4))) | (((pt[ 32 ] >> 4) & 0x1) << 4);
  911.  
  912.     state_bs[5] = (state_bs[5] & (~(1 << 4))) | (((pt[ 32 ] >> 5) & 0x1) << 4);
  913.  
  914.     state_bs[6] = (state_bs[6] & (~(1 << 4))) | (((pt[ 32 ] >> 6) & 0x1) << 4);
  915.  
  916.     state_bs[7] = (state_bs[7] & (~(1 << 4))) | (((pt[ 32 ] >> 7) & 0x1) << 4);
  917.  
  918.     state_bs[8] = (state_bs[8] & (~(1 << 4))) | (((pt[ 33 ] >> 0) & 0x1) << 4);
  919.  
  920.     state_bs[9] = (state_bs[9] & (~(1 << 4))) | (((pt[ 33 ] >> 1) & 0x1) << 4);
  921.  
  922.     state_bs[10] = (state_bs[10] & (~(1 << 4))) | (((pt[ 33 ] >> 2) & 0x1) << 4);
  923.  
  924.     state_bs[11] = (state_bs[11] & (~(1 << 4))) | (((pt[ 33 ] >> 3) & 0x1) << 4);
  925.  
  926.     state_bs[12] = (state_bs[12] & (~(1 << 4))) | (((pt[ 33 ] >> 4) & 0x1) << 4);
  927.  
  928.     state_bs[13] = (state_bs[13] & (~(1 << 4))) | (((pt[ 33 ] >> 5) & 0x1) << 4);
  929.  
  930.     state_bs[14] = (state_bs[14] & (~(1 << 4))) | (((pt[ 33 ] >> 6) & 0x1) << 4);
  931.  
  932.     state_bs[15] = (state_bs[15] & (~(1 << 4))) | (((pt[ 33 ] >> 7) & 0x1) << 4);
  933.  
  934.     state_bs[16] = (state_bs[16] & (~(1 << 4))) | (((pt[ 34 ] >> 0) & 0x1) << 4);
  935.  
  936.     state_bs[17] = (state_bs[17] & (~(1 << 4))) | (((pt[ 34 ] >> 1) & 0x1) << 4);
  937.  
  938.     state_bs[18] = (state_bs[18] & (~(1 << 4))) | (((pt[ 34 ] >> 2) & 0x1) << 4);
  939.  
  940.     state_bs[19] = (state_bs[19] & (~(1 << 4))) | (((pt[ 34 ] >> 3) & 0x1) << 4);
  941.  
  942.     state_bs[20] = (state_bs[20] & (~(1 << 4))) | (((pt[ 34 ] >> 4) & 0x1) << 4);
  943.  
  944.     state_bs[21] = (state_bs[21] & (~(1 << 4))) | (((pt[ 34 ] >> 5) & 0x1) << 4);
  945.  
  946.     state_bs[22] = (state_bs[22] & (~(1 << 4))) | (((pt[ 34 ] >> 6) & 0x1) << 4);
  947.  
  948.     state_bs[23] = (state_bs[23] & (~(1 << 4))) | (((pt[ 34 ] >> 7) & 0x1) << 4);
  949.  
  950.     state_bs[24] = (state_bs[24] & (~(1 << 4))) | (((pt[ 35 ] >> 0) & 0x1) << 4);
  951.  
  952.     state_bs[25] = (state_bs[25] & (~(1 << 4))) | (((pt[ 35 ] >> 1) & 0x1) << 4);
  953.  
  954.     state_bs[26] = (state_bs[26] & (~(1 << 4))) | (((pt[ 35 ] >> 2) & 0x1) << 4);
  955.  
  956.     state_bs[27] = (state_bs[27] & (~(1 << 4))) | (((pt[ 35 ] >> 3) & 0x1) << 4);
  957.  
  958.     state_bs[28] = (state_bs[28] & (~(1 << 4))) | (((pt[ 35 ] >> 4) & 0x1) << 4);
  959.  
  960.     state_bs[29] = (state_bs[29] & (~(1 << 4))) | (((pt[ 35 ] >> 5) & 0x1) << 4);
  961.  
  962.     state_bs[30] = (state_bs[30] & (~(1 << 4))) | (((pt[ 35 ] >> 6) & 0x1) << 4);
  963.  
  964.     state_bs[31] = (state_bs[31] & (~(1 << 4))) | (((pt[ 35 ] >> 7) & 0x1) << 4);
  965.  
  966.     state_bs[32] = (state_bs[32] & (~(1 << 4))) | (((pt[ 36 ] >> 0) & 0x1) << 4);
  967.  
  968.     state_bs[33] = (state_bs[33] & (~(1 << 4))) | (((pt[ 36 ] >> 1) & 0x1) << 4);
  969.  
  970.     state_bs[34] = (state_bs[34] & (~(1 << 4))) | (((pt[ 36 ] >> 2) & 0x1) << 4);
  971.  
  972.     state_bs[35] = (state_bs[35] & (~(1 << 4))) | (((pt[ 36 ] >> 3) & 0x1) << 4);
  973.  
  974.     state_bs[36] = (state_bs[36] & (~(1 << 4))) | (((pt[ 36 ] >> 4) & 0x1) << 4);
  975.  
  976.     state_bs[37] = (state_bs[37] & (~(1 << 4))) | (((pt[ 36 ] >> 5) & 0x1) << 4);
  977.  
  978.     state_bs[38] = (state_bs[38] & (~(1 << 4))) | (((pt[ 36 ] >> 6) & 0x1) << 4);
  979.  
  980.     state_bs[39] = (state_bs[39] & (~(1 << 4))) | (((pt[ 36 ] >> 7) & 0x1) << 4);
  981.  
  982.     state_bs[40] = (state_bs[40] & (~(1 << 4))) | (((pt[ 37 ] >> 0) & 0x1) << 4);
  983.  
  984.     state_bs[41] = (state_bs[41] & (~(1 << 4))) | (((pt[ 37 ] >> 1) & 0x1) << 4);
  985.  
  986.     state_bs[42] = (state_bs[42] & (~(1 << 4))) | (((pt[ 37 ] >> 2) & 0x1) << 4);
  987.  
  988.     state_bs[43] = (state_bs[43] & (~(1 << 4))) | (((pt[ 37 ] >> 3) & 0x1) << 4);
  989.  
  990.     state_bs[44] = (state_bs[44] & (~(1 << 4))) | (((pt[ 37 ] >> 4) & 0x1) << 4);
  991.  
  992.     state_bs[45] = (state_bs[45] & (~(1 << 4))) | (((pt[ 37 ] >> 5) & 0x1) << 4);
  993.  
  994.     state_bs[46] = (state_bs[46] & (~(1 << 4))) | (((pt[ 37 ] >> 6) & 0x1) << 4);
  995.  
  996.     state_bs[47] = (state_bs[47] & (~(1 << 4))) | (((pt[ 37 ] >> 7) & 0x1) << 4);
  997.  
  998.     state_bs[48] = (state_bs[48] & (~(1 << 4))) | (((pt[ 38 ] >> 0) & 0x1) << 4);
  999.  
  1000.     state_bs[49] = (state_bs[49] & (~(1 << 4))) | (((pt[ 38 ] >> 1) & 0x1) << 4);
  1001.  
  1002.     state_bs[50] = (state_bs[50] & (~(1 << 4))) | (((pt[ 38 ] >> 2) & 0x1) << 4);
  1003.  
  1004.     state_bs[51] = (state_bs[51] & (~(1 << 4))) | (((pt[ 38 ] >> 3) & 0x1) << 4);
  1005.  
  1006.     state_bs[52] = (state_bs[52] & (~(1 << 4))) | (((pt[ 38 ] >> 4) & 0x1) << 4);
  1007.  
  1008.     state_bs[53] = (state_bs[53] & (~(1 << 4))) | (((pt[ 38 ] >> 5) & 0x1) << 4);
  1009.  
  1010.     state_bs[54] = (state_bs[54] & (~(1 << 4))) | (((pt[ 38 ] >> 6) & 0x1) << 4);
  1011.  
  1012.     state_bs[55] = (state_bs[55] & (~(1 << 4))) | (((pt[ 38 ] >> 7) & 0x1) << 4);
  1013.  
  1014.     state_bs[56] = (state_bs[56] & (~(1 << 4))) | (((pt[ 39 ] >> 0) & 0x1) << 4);
  1015.  
  1016.     state_bs[57] = (state_bs[57] & (~(1 << 4))) | (((pt[ 39 ] >> 1) & 0x1) << 4);
  1017.  
  1018.     state_bs[58] = (state_bs[58] & (~(1 << 4))) | (((pt[ 39 ] >> 2) & 0x1) << 4);
  1019.  
  1020.     state_bs[59] = (state_bs[59] & (~(1 << 4))) | (((pt[ 39 ] >> 3) & 0x1) << 4);
  1021.  
  1022.     state_bs[60] = (state_bs[60] & (~(1 << 4))) | (((pt[ 39 ] >> 4) & 0x1) << 4);
  1023.  
  1024.     state_bs[61] = (state_bs[61] & (~(1 << 4))) | (((pt[ 39 ] >> 5) & 0x1) << 4);
  1025.  
  1026.     state_bs[62] = (state_bs[62] & (~(1 << 4))) | (((pt[ 39 ] >> 6) & 0x1) << 4);
  1027.  
  1028.     state_bs[63] = (state_bs[63] & (~(1 << 4))) | (((pt[ 39 ] >> 7) & 0x1) << 4);
  1029.  
  1030.     state_bs[0] = (state_bs[0] & (~(1 << 5))) | (((pt[ 40 ] >> 0) & 0x1) << 5);
  1031.  
  1032.     state_bs[1] = (state_bs[1] & (~(1 << 5))) | (((pt[ 40 ] >> 1) & 0x1) << 5);
  1033.  
  1034.     state_bs[2] = (state_bs[2] & (~(1 << 5))) | (((pt[ 40 ] >> 2) & 0x1) << 5);
  1035.  
  1036.     state_bs[3] = (state_bs[3] & (~(1 << 5))) | (((pt[ 40 ] >> 3) & 0x1) << 5);
  1037.  
  1038.     state_bs[4] = (state_bs[4] & (~(1 << 5))) | (((pt[ 40 ] >> 4) & 0x1) << 5);
  1039.  
  1040.     state_bs[5] = (state_bs[5] & (~(1 << 5))) | (((pt[ 40 ] >> 5) & 0x1) << 5);
  1041.  
  1042.     state_bs[6] = (state_bs[6] & (~(1 << 5))) | (((pt[ 40 ] >> 6) & 0x1) << 5);
  1043.  
  1044.     state_bs[7] = (state_bs[7] & (~(1 << 5))) | (((pt[ 40 ] >> 7) & 0x1) << 5);
  1045.  
  1046.     state_bs[8] = (state_bs[8] & (~(1 << 5))) | (((pt[ 41 ] >> 0) & 0x1) << 5);
  1047.  
  1048.     state_bs[9] = (state_bs[9] & (~(1 << 5))) | (((pt[ 41 ] >> 1) & 0x1) << 5);
  1049.  
  1050.     state_bs[10] = (state_bs[10] & (~(1 << 5))) | (((pt[ 41 ] >> 2) & 0x1) << 5);
  1051.  
  1052.     state_bs[11] = (state_bs[11] & (~(1 << 5))) | (((pt[ 41 ] >> 3) & 0x1) << 5);
  1053.  
  1054.     state_bs[12] = (state_bs[12] & (~(1 << 5))) | (((pt[ 41 ] >> 4) & 0x1) << 5);
  1055.  
  1056.     state_bs[13] = (state_bs[13] & (~(1 << 5))) | (((pt[ 41 ] >> 5) & 0x1) << 5);
  1057.  
  1058.     state_bs[14] = (state_bs[14] & (~(1 << 5))) | (((pt[ 41 ] >> 6) & 0x1) << 5);
  1059.  
  1060.     state_bs[15] = (state_bs[15] & (~(1 << 5))) | (((pt[ 41 ] >> 7) & 0x1) << 5);
  1061.  
  1062.     state_bs[16] = (state_bs[16] & (~(1 << 5))) | (((pt[ 42 ] >> 0) & 0x1) << 5);
  1063.  
  1064.     state_bs[17] = (state_bs[17] & (~(1 << 5))) | (((pt[ 42 ] >> 1) & 0x1) << 5);
  1065.  
  1066.     state_bs[18] = (state_bs[18] & (~(1 << 5))) | (((pt[ 42 ] >> 2) & 0x1) << 5);
  1067.  
  1068.     state_bs[19] = (state_bs[19] & (~(1 << 5))) | (((pt[ 42 ] >> 3) & 0x1) << 5);
  1069.  
  1070.     state_bs[20] = (state_bs[20] & (~(1 << 5))) | (((pt[ 42 ] >> 4) & 0x1) << 5);
  1071.  
  1072.     state_bs[21] = (state_bs[21] & (~(1 << 5))) | (((pt[ 42 ] >> 5) & 0x1) << 5);
  1073.  
  1074.     state_bs[22] = (state_bs[22] & (~(1 << 5))) | (((pt[ 42 ] >> 6) & 0x1) << 5);
  1075.  
  1076.     state_bs[23] = (state_bs[23] & (~(1 << 5))) | (((pt[ 42 ] >> 7) & 0x1) << 5);
  1077.  
  1078.     state_bs[24] = (state_bs[24] & (~(1 << 5))) | (((pt[ 43 ] >> 0) & 0x1) << 5);
  1079.  
  1080.     state_bs[25] = (state_bs[25] & (~(1 << 5))) | (((pt[ 43 ] >> 1) & 0x1) << 5);
  1081.  
  1082.     state_bs[26] = (state_bs[26] & (~(1 << 5))) | (((pt[ 43 ] >> 2) & 0x1) << 5);
  1083.  
  1084.     state_bs[27] = (state_bs[27] & (~(1 << 5))) | (((pt[ 43 ] >> 3) & 0x1) << 5);
  1085.  
  1086.     state_bs[28] = (state_bs[28] & (~(1 << 5))) | (((pt[ 43 ] >> 4) & 0x1) << 5);
  1087.  
  1088.     state_bs[29] = (state_bs[29] & (~(1 << 5))) | (((pt[ 43 ] >> 5) & 0x1) << 5);
  1089.  
  1090.     state_bs[30] = (state_bs[30] & (~(1 << 5))) | (((pt[ 43 ] >> 6) & 0x1) << 5);
  1091.  
  1092.     state_bs[31] = (state_bs[31] & (~(1 << 5))) | (((pt[ 43 ] >> 7) & 0x1) << 5);
  1093.  
  1094.     state_bs[32] = (state_bs[32] & (~(1 << 5))) | (((pt[ 44 ] >> 0) & 0x1) << 5);
  1095.  
  1096.     state_bs[33] = (state_bs[33] & (~(1 << 5))) | (((pt[ 44 ] >> 1) & 0x1) << 5);
  1097.  
  1098.     state_bs[34] = (state_bs[34] & (~(1 << 5))) | (((pt[ 44 ] >> 2) & 0x1) << 5);
  1099.  
  1100.     state_bs[35] = (state_bs[35] & (~(1 << 5))) | (((pt[ 44 ] >> 3) & 0x1) << 5);
  1101.  
  1102.     state_bs[36] = (state_bs[36] & (~(1 << 5))) | (((pt[ 44 ] >> 4) & 0x1) << 5);
  1103.  
  1104.     state_bs[37] = (state_bs[37] & (~(1 << 5))) | (((pt[ 44 ] >> 5) & 0x1) << 5);
  1105.  
  1106.     state_bs[38] = (state_bs[38] & (~(1 << 5))) | (((pt[ 44 ] >> 6) & 0x1) << 5);
  1107.  
  1108.     state_bs[39] = (state_bs[39] & (~(1 << 5))) | (((pt[ 44 ] >> 7) & 0x1) << 5);
  1109.  
  1110.     state_bs[40] = (state_bs[40] & (~(1 << 5))) | (((pt[ 45 ] >> 0) & 0x1) << 5);
  1111.  
  1112.     state_bs[41] = (state_bs[41] & (~(1 << 5))) | (((pt[ 45 ] >> 1) & 0x1) << 5);
  1113.  
  1114.     state_bs[42] = (state_bs[42] & (~(1 << 5))) | (((pt[ 45 ] >> 2) & 0x1) << 5);
  1115.  
  1116.     state_bs[43] = (state_bs[43] & (~(1 << 5))) | (((pt[ 45 ] >> 3) & 0x1) << 5);
  1117.  
  1118.     state_bs[44] = (state_bs[44] & (~(1 << 5))) | (((pt[ 45 ] >> 4) & 0x1) << 5);
  1119.  
  1120.     state_bs[45] = (state_bs[45] & (~(1 << 5))) | (((pt[ 45 ] >> 5) & 0x1) << 5);
  1121.  
  1122.     state_bs[46] = (state_bs[46] & (~(1 << 5))) | (((pt[ 45 ] >> 6) & 0x1) << 5);
  1123.  
  1124.     state_bs[47] = (state_bs[47] & (~(1 << 5))) | (((pt[ 45 ] >> 7) & 0x1) << 5);
  1125.  
  1126.     state_bs[48] = (state_bs[48] & (~(1 << 5))) | (((pt[ 46 ] >> 0) & 0x1) << 5);
  1127.  
  1128.     state_bs[49] = (state_bs[49] & (~(1 << 5))) | (((pt[ 46 ] >> 1) & 0x1) << 5);
  1129.  
  1130.     state_bs[50] = (state_bs[50] & (~(1 << 5))) | (((pt[ 46 ] >> 2) & 0x1) << 5);
  1131.  
  1132.     state_bs[51] = (state_bs[51] & (~(1 << 5))) | (((pt[ 46 ] >> 3) & 0x1) << 5);
  1133.  
  1134.     state_bs[52] = (state_bs[52] & (~(1 << 5))) | (((pt[ 46 ] >> 4) & 0x1) << 5);
  1135.  
  1136.     state_bs[53] = (state_bs[53] & (~(1 << 5))) | (((pt[ 46 ] >> 5) & 0x1) << 5);
  1137.  
  1138.     state_bs[54] = (state_bs[54] & (~(1 << 5))) | (((pt[ 46 ] >> 6) & 0x1) << 5);
  1139.  
  1140.     state_bs[55] = (state_bs[55] & (~(1 << 5))) | (((pt[ 46 ] >> 7) & 0x1) << 5);
  1141.  
  1142.     state_bs[56] = (state_bs[56] & (~(1 << 5))) | (((pt[ 47 ] >> 0) & 0x1) << 5);
  1143.  
  1144.     state_bs[57] = (state_bs[57] & (~(1 << 5))) | (((pt[ 47 ] >> 1) & 0x1) << 5);
  1145.  
  1146.     state_bs[58] = (state_bs[58] & (~(1 << 5))) | (((pt[ 47 ] >> 2) & 0x1) << 5);
  1147.  
  1148.     state_bs[59] = (state_bs[59] & (~(1 << 5))) | (((pt[ 47 ] >> 3) & 0x1) << 5);
  1149.  
  1150.     state_bs[60] = (state_bs[60] & (~(1 << 5))) | (((pt[ 47 ] >> 4) & 0x1) << 5);
  1151.  
  1152.     state_bs[61] = (state_bs[61] & (~(1 << 5))) | (((pt[ 47 ] >> 5) & 0x1) << 5);
  1153.  
  1154.     state_bs[62] = (state_bs[62] & (~(1 << 5))) | (((pt[ 47 ] >> 6) & 0x1) << 5);
  1155.  
  1156.     state_bs[63] = (state_bs[63] & (~(1 << 5))) | (((pt[ 47 ] >> 7) & 0x1) << 5);
  1157.  
  1158.     state_bs[0] = (state_bs[0] & (~(1 << 6))) | (((pt[ 48 ] >> 0) & 0x1) << 6);
  1159.  
  1160.     state_bs[1] = (state_bs[1] & (~(1 << 6))) | (((pt[ 48 ] >> 1) & 0x1) << 6);
  1161.  
  1162.     state_bs[2] = (state_bs[2] & (~(1 << 6))) | (((pt[ 48 ] >> 2) & 0x1) << 6);
  1163.  
  1164.     state_bs[3] = (state_bs[3] & (~(1 << 6))) | (((pt[ 48 ] >> 3) & 0x1) << 6);
  1165.  
  1166.     state_bs[4] = (state_bs[4] & (~(1 << 6))) | (((pt[ 48 ] >> 4) & 0x1) << 6);
  1167.  
  1168.     state_bs[5] = (state_bs[5] & (~(1 << 6))) | (((pt[ 48 ] >> 5) & 0x1) << 6);
  1169.  
  1170.     state_bs[6] = (state_bs[6] & (~(1 << 6))) | (((pt[ 48 ] >> 6) & 0x1) << 6);
  1171.  
  1172.     state_bs[7] = (state_bs[7] & (~(1 << 6))) | (((pt[ 48 ] >> 7) & 0x1) << 6);
  1173.  
  1174.     state_bs[8] = (state_bs[8] & (~(1 << 6))) | (((pt[ 49 ] >> 0) & 0x1) << 6);
  1175.  
  1176.     state_bs[9] = (state_bs[9] & (~(1 << 6))) | (((pt[ 49 ] >> 1) & 0x1) << 6);
  1177.  
  1178.     state_bs[10] = (state_bs[10] & (~(1 << 6))) | (((pt[ 49 ] >> 2) & 0x1) << 6);
  1179.  
  1180.     state_bs[11] = (state_bs[11] & (~(1 << 6))) | (((pt[ 49 ] >> 3) & 0x1) << 6);
  1181.  
  1182.     state_bs[12] = (state_bs[12] & (~(1 << 6))) | (((pt[ 49 ] >> 4) & 0x1) << 6);
  1183.  
  1184.     state_bs[13] = (state_bs[13] & (~(1 << 6))) | (((pt[ 49 ] >> 5) & 0x1) << 6);
  1185.  
  1186.     state_bs[14] = (state_bs[14] & (~(1 << 6))) | (((pt[ 49 ] >> 6) & 0x1) << 6);
  1187.  
  1188.     state_bs[15] = (state_bs[15] & (~(1 << 6))) | (((pt[ 49 ] >> 7) & 0x1) << 6);
  1189.  
  1190.     state_bs[16] = (state_bs[16] & (~(1 << 6))) | (((pt[ 50 ] >> 0) & 0x1) << 6);
  1191.  
  1192.     state_bs[17] = (state_bs[17] & (~(1 << 6))) | (((pt[ 50 ] >> 1) & 0x1) << 6);
  1193.  
  1194.     state_bs[18] = (state_bs[18] & (~(1 << 6))) | (((pt[ 50 ] >> 2) & 0x1) << 6);
  1195.  
  1196.     state_bs[19] = (state_bs[19] & (~(1 << 6))) | (((pt[ 50 ] >> 3) & 0x1) << 6);
  1197.  
  1198.     state_bs[20] = (state_bs[20] & (~(1 << 6))) | (((pt[ 50 ] >> 4) & 0x1) << 6);
  1199.  
  1200.     state_bs[21] = (state_bs[21] & (~(1 << 6))) | (((pt[ 50 ] >> 5) & 0x1) << 6);
  1201.  
  1202.     state_bs[22] = (state_bs[22] & (~(1 << 6))) | (((pt[ 50 ] >> 6) & 0x1) << 6);
  1203.  
  1204.     state_bs[23] = (state_bs[23] & (~(1 << 6))) | (((pt[ 50 ] >> 7) & 0x1) << 6);
  1205.  
  1206.     state_bs[24] = (state_bs[24] & (~(1 << 6))) | (((pt[ 51 ] >> 0) & 0x1) << 6);
  1207.  
  1208.     state_bs[25] = (state_bs[25] & (~(1 << 6))) | (((pt[ 51 ] >> 1) & 0x1) << 6);
  1209.  
  1210.     state_bs[26] = (state_bs[26] & (~(1 << 6))) | (((pt[ 51 ] >> 2) & 0x1) << 6);
  1211.  
  1212.     state_bs[27] = (state_bs[27] & (~(1 << 6))) | (((pt[ 51 ] >> 3) & 0x1) << 6);
  1213.  
  1214.     state_bs[28] = (state_bs[28] & (~(1 << 6))) | (((pt[ 51 ] >> 4) & 0x1) << 6);
  1215.  
  1216.     state_bs[29] = (state_bs[29] & (~(1 << 6))) | (((pt[ 51 ] >> 5) & 0x1) << 6);
  1217.  
  1218.     state_bs[30] = (state_bs[30] & (~(1 << 6))) | (((pt[ 51 ] >> 6) & 0x1) << 6);
  1219.  
  1220.     state_bs[31] = (state_bs[31] & (~(1 << 6))) | (((pt[ 51 ] >> 7) & 0x1) << 6);
  1221.  
  1222.     state_bs[32] = (state_bs[32] & (~(1 << 6))) | (((pt[ 52 ] >> 0) & 0x1) << 6);
  1223.  
  1224.     state_bs[33] = (state_bs[33] & (~(1 << 6))) | (((pt[ 52 ] >> 1) & 0x1) << 6);
  1225.  
  1226.     state_bs[34] = (state_bs[34] & (~(1 << 6))) | (((pt[ 52 ] >> 2) & 0x1) << 6);
  1227.  
  1228.     state_bs[35] = (state_bs[35] & (~(1 << 6))) | (((pt[ 52 ] >> 3) & 0x1) << 6);
  1229.  
  1230.     state_bs[36] = (state_bs[36] & (~(1 << 6))) | (((pt[ 52 ] >> 4) & 0x1) << 6);
  1231.  
  1232.     state_bs[37] = (state_bs[37] & (~(1 << 6))) | (((pt[ 52 ] >> 5) & 0x1) << 6);
  1233.  
  1234.     state_bs[38] = (state_bs[38] & (~(1 << 6))) | (((pt[ 52 ] >> 6) & 0x1) << 6);
  1235.  
  1236.     state_bs[39] = (state_bs[39] & (~(1 << 6))) | (((pt[ 52 ] >> 7) & 0x1) << 6);
  1237.  
  1238.     state_bs[40] = (state_bs[40] & (~(1 << 6))) | (((pt[ 53 ] >> 0) & 0x1) << 6);
  1239.  
  1240.     state_bs[41] = (state_bs[41] & (~(1 << 6))) | (((pt[ 53 ] >> 1) & 0x1) << 6);
  1241.  
  1242.     state_bs[42] = (state_bs[42] & (~(1 << 6))) | (((pt[ 53 ] >> 2) & 0x1) << 6);
  1243.  
  1244.     state_bs[43] = (state_bs[43] & (~(1 << 6))) | (((pt[ 53 ] >> 3) & 0x1) << 6);
  1245.  
  1246.     state_bs[44] = (state_bs[44] & (~(1 << 6))) | (((pt[ 53 ] >> 4) & 0x1) << 6);
  1247.  
  1248.     state_bs[45] = (state_bs[45] & (~(1 << 6))) | (((pt[ 53 ] >> 5) & 0x1) << 6);
  1249.  
  1250.     state_bs[46] = (state_bs[46] & (~(1 << 6))) | (((pt[ 53 ] >> 6) & 0x1) << 6);
  1251.  
  1252.     state_bs[47] = (state_bs[47] & (~(1 << 6))) | (((pt[ 53 ] >> 7) & 0x1) << 6);
  1253.  
  1254.     state_bs[48] = (state_bs[48] & (~(1 << 6))) | (((pt[ 54 ] >> 0) & 0x1) << 6);
  1255.  
  1256.     state_bs[49] = (state_bs[49] & (~(1 << 6))) | (((pt[ 54 ] >> 1) & 0x1) << 6);
  1257.  
  1258.     state_bs[50] = (state_bs[50] & (~(1 << 6))) | (((pt[ 54 ] >> 2) & 0x1) << 6);
  1259.  
  1260.     state_bs[51] = (state_bs[51] & (~(1 << 6))) | (((pt[ 54 ] >> 3) & 0x1) << 6);
  1261.  
  1262.     state_bs[52] = (state_bs[52] & (~(1 << 6))) | (((pt[ 54 ] >> 4) & 0x1) << 6);
  1263.  
  1264.     state_bs[53] = (state_bs[53] & (~(1 << 6))) | (((pt[ 54 ] >> 5) & 0x1) << 6);
  1265.  
  1266.     state_bs[54] = (state_bs[54] & (~(1 << 6))) | (((pt[ 54 ] >> 6) & 0x1) << 6);
  1267.  
  1268.     state_bs[55] = (state_bs[55] & (~(1 << 6))) | (((pt[ 54 ] >> 7) & 0x1) << 6);
  1269.  
  1270.     state_bs[56] = (state_bs[56] & (~(1 << 6))) | (((pt[ 55 ] >> 0) & 0x1) << 6);
  1271.  
  1272.     state_bs[57] = (state_bs[57] & (~(1 << 6))) | (((pt[ 55 ] >> 1) & 0x1) << 6);
  1273.  
  1274.     state_bs[58] = (state_bs[58] & (~(1 << 6))) | (((pt[ 55 ] >> 2) & 0x1) << 6);
  1275.  
  1276.     state_bs[59] = (state_bs[59] & (~(1 << 6))) | (((pt[ 55 ] >> 3) & 0x1) << 6);
  1277.  
  1278.     state_bs[60] = (state_bs[60] & (~(1 << 6))) | (((pt[ 55 ] >> 4) & 0x1) << 6);
  1279.  
  1280.     state_bs[61] = (state_bs[61] & (~(1 << 6))) | (((pt[ 55 ] >> 5) & 0x1) << 6);
  1281.  
  1282.     state_bs[62] = (state_bs[62] & (~(1 << 6))) | (((pt[ 55 ] >> 6) & 0x1) << 6);
  1283.  
  1284.     state_bs[63] = (state_bs[63] & (~(1 << 6))) | (((pt[ 55 ] >> 7) & 0x1) << 6);
  1285.  
  1286.    state_bs[0] = (state_bs[0] & (~(1 << 7))) | (((pt[ 56 ] >> 0) & 0x1) << 7);
  1287.  
  1288.     state_bs[1] = (state_bs[1] & (~(1 << 7))) | (((pt[ 56 ] >> 1) & 0x1) << 7);
  1289.  
  1290.     state_bs[2] = (state_bs[2] & (~(1 << 7))) | (((pt[ 56 ] >> 2) & 0x1) << 7);
  1291.  
  1292.     state_bs[3] = (state_bs[3] & (~(1 << 7))) | (((pt[ 56 ] >> 3) & 0x1) << 7);
  1293.  
  1294.     state_bs[4] = (state_bs[4] & (~(1 << 7))) | (((pt[ 56 ] >> 4) & 0x1) << 7);
  1295.  
  1296.     state_bs[5] = (state_bs[5] & (~(1 << 7))) | (((pt[ 56 ] >> 5) & 0x1) << 7);
  1297.  
  1298.     state_bs[6] = (state_bs[6] & (~(1 << 7))) | (((pt[ 56 ] >> 6) & 0x1) << 7);
  1299.  
  1300.     state_bs[7] = (state_bs[7] & (~(1 << 7))) | (((pt[ 56 ] >> 7) & 0x1) << 7);
  1301.  
  1302.     state_bs[8] = (state_bs[8] & (~(1 << 7))) | (((pt[ 57 ] >> 0) & 0x1) << 7);
  1303.  
  1304.     state_bs[9] = (state_bs[9] & (~(1 << 7))) | (((pt[ 57 ] >> 1) & 0x1) << 7);
  1305.  
  1306.     state_bs[10] = (state_bs[10] & (~(1 << 7))) | (((pt[ 57 ] >> 2) & 0x1) << 7);
  1307.  
  1308.     state_bs[11] = (state_bs[11] & (~(1 << 7))) | (((pt[ 57 ] >> 3) & 0x1) << 7);
  1309.  
  1310.     state_bs[12] = (state_bs[12] & (~(1 << 7))) | (((pt[ 57 ] >> 4) & 0x1) << 7);
  1311.  
  1312.     state_bs[13] = (state_bs[13] & (~(1 << 7))) | (((pt[ 57 ] >> 5) & 0x1) << 7);
  1313.  
  1314.     state_bs[14] = (state_bs[14] & (~(1 << 7))) | (((pt[ 57 ] >> 6) & 0x1) << 7);
  1315.  
  1316.     state_bs[15] = (state_bs[15] & (~(1 << 7))) | (((pt[ 57 ] >> 7) & 0x1) << 7);
  1317.  
  1318.     state_bs[16] = (state_bs[16] & (~(1 << 7))) | (((pt[ 58 ] >> 0) & 0x1) << 7);
  1319.  
  1320.     state_bs[17] = (state_bs[17] & (~(1 << 7))) | (((pt[ 58 ] >> 1) & 0x1) << 7);
  1321.  
  1322.     state_bs[18] = (state_bs[18] & (~(1 << 7))) | (((pt[ 58 ] >> 2) & 0x1) << 7);
  1323.  
  1324.     state_bs[19] = (state_bs[19] & (~(1 << 7))) | (((pt[ 58 ] >> 3) & 0x1) << 7);
  1325.  
  1326.     state_bs[20] = (state_bs[20] & (~(1 << 7))) | (((pt[ 58 ] >> 4) & 0x1) << 7);
  1327.  
  1328.     state_bs[21] = (state_bs[21] & (~(1 << 7))) | (((pt[ 58 ] >> 5) & 0x1) << 7);
  1329.  
  1330.     state_bs[22] = (state_bs[22] & (~(1 << 7))) | (((pt[ 58 ] >> 6) & 0x1) << 7);
  1331.  
  1332.     state_bs[23] = (state_bs[23] & (~(1 << 7))) | (((pt[ 58 ] >> 7) & 0x1) << 7);
  1333.  
  1334.     state_bs[24] = (state_bs[24] & (~(1 << 7))) | (((pt[ 59 ] >> 0) & 0x1) << 7);
  1335.  
  1336.     state_bs[25] = (state_bs[25] & (~(1 << 7))) | (((pt[ 59 ] >> 1) & 0x1) << 7);
  1337.  
  1338.     state_bs[26] = (state_bs[26] & (~(1 << 7))) | (((pt[ 59 ] >> 2) & 0x1) << 7);
  1339.  
  1340.     state_bs[27] = (state_bs[27] & (~(1 << 7))) | (((pt[ 59 ] >> 3) & 0x1) << 7);
  1341.  
  1342.     state_bs[28] = (state_bs[28] & (~(1 << 7))) | (((pt[ 59 ] >> 4) & 0x1) << 7);
  1343.  
  1344.     state_bs[29] = (state_bs[29] & (~(1 << 7))) | (((pt[ 59 ] >> 5) & 0x1) << 7);
  1345.  
  1346.     state_bs[30] = (state_bs[30] & (~(1 << 7))) | (((pt[ 59 ] >> 6) & 0x1) << 7);
  1347.  
  1348.     state_bs[31] = (state_bs[31] & (~(1 << 7))) | (((pt[ 59 ] >> 7) & 0x1) << 7);
  1349.  
  1350.     state_bs[32] = (state_bs[32] & (~(1 << 7))) | (((pt[ 60 ] >> 0) & 0x1) << 7);
  1351.  
  1352.     state_bs[33] = (state_bs[33] & (~(1 << 7))) | (((pt[ 60 ] >> 1) & 0x1) << 7);
  1353.  
  1354.     state_bs[34] = (state_bs[34] & (~(1 << 7))) | (((pt[ 60 ] >> 2) & 0x1) << 7);
  1355.  
  1356.     state_bs[35] = (state_bs[35] & (~(1 << 7))) | (((pt[ 60 ] >> 3) & 0x1) << 7);
  1357.  
  1358.     state_bs[36] = (state_bs[36] & (~(1 << 7))) | (((pt[ 60 ] >> 4) & 0x1) << 7);
  1359.  
  1360.     state_bs[37] = (state_bs[37] & (~(1 << 7))) | (((pt[ 60 ] >> 5) & 0x1) << 7);
  1361.  
  1362.     state_bs[38] = (state_bs[38] & (~(1 << 7))) | (((pt[ 60 ] >> 6) & 0x1) << 7);
  1363.  
  1364.     state_bs[39] = (state_bs[39] & (~(1 << 7))) | (((pt[ 60 ] >> 7) & 0x1) << 7);
  1365.  
  1366.     state_bs[40] = (state_bs[40] & (~(1 << 7))) | (((pt[ 61 ] >> 0) & 0x1) << 7);
  1367.  
  1368.     state_bs[41] = (state_bs[41] & (~(1 << 7))) | (((pt[ 61 ] >> 1) & 0x1) << 7);
  1369.  
  1370.     state_bs[42] = (state_bs[42] & (~(1 << 7))) | (((pt[ 61 ] >> 2) & 0x1) << 7);
  1371.  
  1372.     state_bs[43] = (state_bs[43] & (~(1 << 7))) | (((pt[ 61 ] >> 3) & 0x1) << 7);
  1373.  
  1374.     state_bs[44] = (state_bs[44] & (~(1 << 7))) | (((pt[ 61 ] >> 4) & 0x1) << 7);
  1375.  
  1376.     state_bs[45] = (state_bs[45] & (~(1 << 7))) | (((pt[ 61 ] >> 5) & 0x1) << 7);
  1377.  
  1378.     state_bs[46] = (state_bs[46] & (~(1 << 7))) | (((pt[ 61 ] >> 6) & 0x1) << 7);
  1379.  
  1380.     state_bs[47] = (state_bs[47] & (~(1 << 7))) | (((pt[ 61 ] >> 7) & 0x1) << 7);
  1381.  
  1382.     state_bs[48] = (state_bs[48] & (~(1 << 7))) | (((pt[ 62 ] >> 0) & 0x1) << 7);
  1383.  
  1384.     state_bs[49] = (state_bs[49] & (~(1 << 7))) | (((pt[ 62 ] >> 1) & 0x1) << 7);
  1385.  
  1386.     state_bs[50] = (state_bs[50] & (~(1 << 7))) | (((pt[ 62 ] >> 2) & 0x1) << 7);
  1387.  
  1388.     state_bs[51] = (state_bs[51] & (~(1 << 7))) | (((pt[ 62 ] >> 3) & 0x1) << 7);
  1389.  
  1390.     state_bs[52] = (state_bs[52] & (~(1 << 7))) | (((pt[ 62 ] >> 4) & 0x1) << 7);
  1391.  
  1392.     state_bs[53] = (state_bs[53] & (~(1 << 7))) | (((pt[ 62 ] >> 5) & 0x1) << 7);
  1393.  
  1394.     state_bs[54] = (state_bs[54] & (~(1 << 7))) | (((pt[ 62 ] >> 6) & 0x1) << 7);
  1395.  
  1396.     state_bs[55] = (state_bs[55] & (~(1 << 7))) | (((pt[ 62 ] >> 7) & 0x1) << 7);
  1397.  
  1398.     state_bs[56] = (state_bs[56] & (~(1 << 7))) | (((pt[ 63 ] >> 0) & 0x1) << 7);
  1399.  
  1400.     state_bs[57] = (state_bs[57] & (~(1 << 7))) | (((pt[ 63 ] >> 1) & 0x1) << 7);
  1401.  
  1402.     state_bs[58] = (state_bs[58] & (~(1 << 7))) | (((pt[ 63 ] >> 2) & 0x1) << 7);
  1403.  
  1404.     state_bs[59] = (state_bs[59] & (~(1 << 7))) | (((pt[ 63 ] >> 3) & 0x1) << 7);
  1405.  
  1406.     state_bs[60] = (state_bs[60] & (~(1 << 7))) | (((pt[ 63 ] >> 4) & 0x1) << 7);
  1407.  
  1408.     state_bs[61] = (state_bs[61] & (~(1 << 7))) | (((pt[ 63 ] >> 5) & 0x1) << 7);
  1409.  
  1410.     state_bs[62] = (state_bs[62] & (~(1 << 7))) | (((pt[ 63 ] >> 6) & 0x1) << 7);
  1411.  
  1412.     state_bs[63] = (state_bs[63] & (~(1 << 7))) | (((pt[ 63 ] >> 7) & 0x1) << 7);
  1413.  
  1414.     state_bs[0] = (state_bs[0] & (~(1 << 8))) | (((pt[ 64 ] >> 0) & 0x1) << 8);
  1415.  
  1416.     state_bs[1] = (state_bs[1] & (~(1 << 8))) | (((pt[ 64 ] >> 1) & 0x1) << 8);
  1417.  
  1418.     state_bs[2] = (state_bs[2] & (~(1 << 8))) | (((pt[ 64 ] >> 2) & 0x1) << 8);
  1419.  
  1420.     state_bs[3] = (state_bs[3] & (~(1 << 8))) | (((pt[ 64 ] >> 3) & 0x1) << 8);
  1421.  
  1422.     state_bs[4] = (state_bs[4] & (~(1 << 8))) | (((pt[ 64 ] >> 4) & 0x1) << 8);
  1423.  
  1424.     state_bs[5] = (state_bs[5] & (~(1 << 8))) | (((pt[ 64 ] >> 5) & 0x1) << 8);
  1425.  
  1426.     state_bs[6] = (state_bs[6] & (~(1 << 8))) | (((pt[ 64 ] >> 6) & 0x1) << 8);
  1427.  
  1428.     state_bs[7] = (state_bs[7] & (~(1 << 8))) | (((pt[ 64 ] >> 7) & 0x1) << 8);
  1429.  
  1430.     state_bs[8] = (state_bs[8] & (~(1 << 8))) | (((pt[ 65 ] >> 0) & 0x1) << 8);
  1431.  
  1432.     state_bs[9] = (state_bs[9] & (~(1 << 8))) | (((pt[ 65 ] >> 1) & 0x1) << 8);
  1433.  
  1434.     state_bs[10] = (state_bs[10] & (~(1 << 8))) | (((pt[ 65 ] >> 2) & 0x1) << 8);
  1435.  
  1436.     state_bs[11] = (state_bs[11] & (~(1 << 8))) | (((pt[ 65 ] >> 3) & 0x1) << 8);
  1437.  
  1438.     state_bs[12] = (state_bs[12] & (~(1 << 8))) | (((pt[ 65 ] >> 4) & 0x1) << 8);
  1439.  
  1440.     state_bs[13] = (state_bs[13] & (~(1 << 8))) | (((pt[ 65 ] >> 5) & 0x1) << 8);
  1441.  
  1442.     state_bs[14] = (state_bs[14] & (~(1 << 8))) | (((pt[ 65 ] >> 6) & 0x1) << 8);
  1443.  
  1444.     state_bs[15] = (state_bs[15] & (~(1 << 8))) | (((pt[ 65 ] >> 7) & 0x1) << 8);
  1445.  
  1446.     state_bs[16] = (state_bs[16] & (~(1 << 8))) | (((pt[ 66 ] >> 0) & 0x1) << 8);
  1447.  
  1448.     state_bs[17] = (state_bs[17] & (~(1 << 8))) | (((pt[ 66 ] >> 1) & 0x1) << 8);
  1449.  
  1450.     state_bs[18] = (state_bs[18] & (~(1 << 8))) | (((pt[ 66 ] >> 2) & 0x1) << 8);
  1451.  
  1452.     state_bs[19] = (state_bs[19] & (~(1 << 8))) | (((pt[ 66 ] >> 3) & 0x1) << 8);
  1453.  
  1454.     state_bs[20] = (state_bs[20] & (~(1 << 8))) | (((pt[ 66 ] >> 4) & 0x1) << 8);
  1455.  
  1456.     state_bs[21] = (state_bs[21] & (~(1 << 8))) | (((pt[ 66 ] >> 5) & 0x1) << 8);
  1457.  
  1458.     state_bs[22] = (state_bs[22] & (~(1 << 8))) | (((pt[ 66 ] >> 6) & 0x1) << 8);
  1459.  
  1460.     state_bs[23] = (state_bs[23] & (~(1 << 8))) | (((pt[ 66 ] >> 7) & 0x1) << 8);
  1461.  
  1462.     state_bs[24] = (state_bs[24] & (~(1 << 8))) | (((pt[ 67 ] >> 0) & 0x1) << 8);
  1463.  
  1464.     state_bs[25] = (state_bs[25] & (~(1 << 8))) | (((pt[ 67 ] >> 1) & 0x1) << 8);
  1465.  
  1466.     state_bs[26] = (state_bs[26] & (~(1 << 8))) | (((pt[ 67 ] >> 2) & 0x1) << 8);
  1467.  
  1468.     state_bs[27] = (state_bs[27] & (~(1 << 8))) | (((pt[ 67 ] >> 3) & 0x1) << 8);
  1469.  
  1470.     state_bs[28] = (state_bs[28] & (~(1 << 8))) | (((pt[ 67 ] >> 4) & 0x1) << 8);
  1471.  
  1472.     state_bs[29] = (state_bs[29] & (~(1 << 8))) | (((pt[ 67 ] >> 5) & 0x1) << 8);
  1473.  
  1474.     state_bs[30] = (state_bs[30] & (~(1 << 8))) | (((pt[ 67 ] >> 6) & 0x1) << 8);
  1475.  
  1476.     state_bs[31] = (state_bs[31] & (~(1 << 8))) | (((pt[ 67 ] >> 7) & 0x1) << 8);
  1477.  
  1478.     state_bs[32] = (state_bs[32] & (~(1 << 8))) | (((pt[ 68 ] >> 0) & 0x1) << 8);
  1479.  
  1480.     state_bs[33] = (state_bs[33] & (~(1 << 8))) | (((pt[ 68 ] >> 1) & 0x1) << 8);
  1481.  
  1482.     state_bs[34] = (state_bs[34] & (~(1 << 8))) | (((pt[ 68 ] >> 2) & 0x1) << 8);
  1483.  
  1484.     state_bs[35] = (state_bs[35] & (~(1 << 8))) | (((pt[ 68 ] >> 3) & 0x1) << 8);
  1485.  
  1486.     state_bs[36] = (state_bs[36] & (~(1 << 8))) | (((pt[ 68 ] >> 4) & 0x1) << 8);
  1487.  
  1488.     state_bs[37] = (state_bs[37] & (~(1 << 8))) | (((pt[ 68 ] >> 5) & 0x1) << 8);
  1489.  
  1490.     state_bs[38] = (state_bs[38] & (~(1 << 8))) | (((pt[ 68 ] >> 6) & 0x1) << 8);
  1491.  
  1492.     state_bs[39] = (state_bs[39] & (~(1 << 8))) | (((pt[ 68 ] >> 7) & 0x1) << 8);
  1493.  
  1494.     state_bs[40] = (state_bs[40] & (~(1 << 8))) | (((pt[ 69 ] >> 0) & 0x1) << 8);
  1495.  
  1496.     state_bs[41] = (state_bs[41] & (~(1 << 8))) | (((pt[ 69 ] >> 1) & 0x1) << 8);
  1497.  
  1498.     state_bs[42] = (state_bs[42] & (~(1 << 8))) | (((pt[ 69 ] >> 2) & 0x1) << 8);
  1499.  
  1500.     state_bs[43] = (state_bs[43] & (~(1 << 8))) | (((pt[ 69 ] >> 3) & 0x1) << 8);
  1501.  
  1502.     state_bs[44] = (state_bs[44] & (~(1 << 8))) | (((pt[ 69 ] >> 4) & 0x1) << 8);
  1503.  
  1504.     state_bs[45] = (state_bs[45] & (~(1 << 8))) | (((pt[ 69 ] >> 5) & 0x1) << 8);
  1505.  
  1506.     state_bs[46] = (state_bs[46] & (~(1 << 8))) | (((pt[ 69 ] >> 6) & 0x1) << 8);
  1507.  
  1508.     state_bs[47] = (state_bs[47] & (~(1 << 8))) | (((pt[ 69 ] >> 7) & 0x1) << 8);
  1509.  
  1510.     state_bs[48] = (state_bs[48] & (~(1 << 8))) | (((pt[ 70 ] >> 0) & 0x1) << 8);
  1511.  
  1512.     state_bs[49] = (state_bs[49] & (~(1 << 8))) | (((pt[ 70 ] >> 1) & 0x1) << 8);
  1513.  
  1514.     state_bs[50] = (state_bs[50] & (~(1 << 8))) | (((pt[ 70 ] >> 2) & 0x1) << 8);
  1515.  
  1516.     state_bs[51] = (state_bs[51] & (~(1 << 8))) | (((pt[ 70 ] >> 3) & 0x1) << 8);
  1517.  
  1518.     state_bs[52] = (state_bs[52] & (~(1 << 8))) | (((pt[ 70 ] >> 4) & 0x1) << 8);
  1519.  
  1520.     state_bs[53] = (state_bs[53] & (~(1 << 8))) | (((pt[ 70 ] >> 5) & 0x1) << 8);
  1521.  
  1522.     state_bs[54] = (state_bs[54] & (~(1 << 8))) | (((pt[ 70 ] >> 6) & 0x1) << 8);
  1523.  
  1524.     state_bs[55] = (state_bs[55] & (~(1 << 8))) | (((pt[ 70 ] >> 7) & 0x1) << 8);
  1525.  
  1526.     state_bs[56] = (state_bs[56] & (~(1 << 8))) | (((pt[ 71 ] >> 0) & 0x1) << 8);
  1527.  
  1528.     state_bs[57] = (state_bs[57] & (~(1 << 8))) | (((pt[ 71 ] >> 1) & 0x1) << 8);
  1529.  
  1530.     state_bs[58] = (state_bs[58] & (~(1 << 8))) | (((pt[ 71 ] >> 2) & 0x1) << 8);
  1531.  
  1532.     state_bs[59] = (state_bs[59] & (~(1 << 8))) | (((pt[ 71 ] >> 3) & 0x1) << 8);
  1533.  
  1534.     state_bs[60] = (state_bs[60] & (~(1 << 8))) | (((pt[ 71 ] >> 4) & 0x1) << 8);
  1535.  
  1536.     state_bs[61] = (state_bs[61] & (~(1 << 8))) | (((pt[ 71 ] >> 5) & 0x1) << 8);
  1537.  
  1538.     state_bs[62] = (state_bs[62] & (~(1 << 8))) | (((pt[ 71 ] >> 6) & 0x1) << 8);
  1539.  
  1540.     state_bs[63] = (state_bs[63] & (~(1 << 8))) | (((pt[ 71 ] >> 7) & 0x1) << 8);
  1541.  
  1542.     state_bs[0] = (state_bs[0] & (~(1 << 9))) | (((pt[ 72 ] >> 0) & 0x1) << 9);
  1543.  
  1544.     state_bs[1] = (state_bs[1] & (~(1 << 9))) | (((pt[ 72 ] >> 1) & 0x1) << 9);
  1545.  
  1546.     state_bs[2] = (state_bs[2] & (~(1 << 9))) | (((pt[ 72 ] >> 2) & 0x1) << 9);
  1547.  
  1548.     state_bs[3] = (state_bs[3] & (~(1 << 9))) | (((pt[ 72 ] >> 3) & 0x1) << 9);
  1549.  
  1550.     state_bs[4] = (state_bs[4] & (~(1 << 9))) | (((pt[ 72 ] >> 4) & 0x1) << 9);
  1551.  
  1552.     state_bs[5] = (state_bs[5] & (~(1 << 9))) | (((pt[ 72 ] >> 5) & 0x1) << 9);
  1553.  
  1554.     state_bs[6] = (state_bs[6] & (~(1 << 9))) | (((pt[ 72 ] >> 6) & 0x1) << 9);
  1555.  
  1556.     state_bs[7] = (state_bs[7] & (~(1 << 9))) | (((pt[ 72 ] >> 7) & 0x1) << 9);
  1557.  
  1558.     state_bs[8] = (state_bs[8] & (~(1 << 9))) | (((pt[ 73 ] >> 0) & 0x1) << 9);
  1559.  
  1560.     state_bs[9] = (state_bs[9] & (~(1 << 9))) | (((pt[ 73 ] >> 1) & 0x1) << 9);
  1561.  
  1562.     state_bs[10] = (state_bs[10] & (~(1 << 9))) | (((pt[ 73 ] >> 2) & 0x1) << 9);
  1563.  
  1564.     state_bs[11] = (state_bs[11] & (~(1 << 9))) | (((pt[ 73 ] >> 3) & 0x1) << 9);
  1565.  
  1566.     state_bs[12] = (state_bs[12] & (~(1 << 9))) | (((pt[ 73 ] >> 4) & 0x1) << 9);
  1567.  
  1568.     state_bs[13] = (state_bs[13] & (~(1 << 9))) | (((pt[ 73 ] >> 5) & 0x1) << 9);
  1569.  
  1570.     state_bs[14] = (state_bs[14] & (~(1 << 9))) | (((pt[ 73 ] >> 6) & 0x1) << 9);
  1571.  
  1572.     state_bs[15] = (state_bs[15] & (~(1 << 9))) | (((pt[ 73 ] >> 7) & 0x1) << 9);
  1573.  
  1574.     state_bs[16] = (state_bs[16] & (~(1 << 9))) | (((pt[ 74 ] >> 0) & 0x1) << 9);
  1575.  
  1576.     state_bs[17] = (state_bs[17] & (~(1 << 9))) | (((pt[ 74 ] >> 1) & 0x1) << 9);
  1577.  
  1578.     state_bs[18] = (state_bs[18] & (~(1 << 9))) | (((pt[ 74 ] >> 2) & 0x1) << 9);
  1579.  
  1580.     state_bs[19] = (state_bs[19] & (~(1 << 9))) | (((pt[ 74 ] >> 3) & 0x1) << 9);
  1581.  
  1582.     state_bs[20] = (state_bs[20] & (~(1 << 9))) | (((pt[ 74 ] >> 4) & 0x1) << 9);
  1583.  
  1584.     state_bs[21] = (state_bs[21] & (~(1 << 9))) | (((pt[ 74 ] >> 5) & 0x1) << 9);
  1585.  
  1586.     state_bs[22] = (state_bs[22] & (~(1 << 9))) | (((pt[ 74 ] >> 6) & 0x1) << 9);
  1587.  
  1588.     state_bs[23] = (state_bs[23] & (~(1 << 9))) | (((pt[ 74 ] >> 7) & 0x1) << 9);
  1589.  
  1590.     state_bs[24] = (state_bs[24] & (~(1 << 9))) | (((pt[ 75 ] >> 0) & 0x1) << 9);
  1591.  
  1592.     state_bs[25] = (state_bs[25] & (~(1 << 9))) | (((pt[ 75 ] >> 1) & 0x1) << 9);
  1593.  
  1594.     state_bs[26] = (state_bs[26] & (~(1 << 9))) | (((pt[ 75 ] >> 2) & 0x1) << 9);
  1595.  
  1596.     state_bs[27] = (state_bs[27] & (~(1 << 9))) | (((pt[ 75 ] >> 3) & 0x1) << 9);
  1597.  
  1598.     state_bs[28] = (state_bs[28] & (~(1 << 9))) | (((pt[ 75 ] >> 4) & 0x1) << 9);
  1599.  
  1600.     state_bs[29] = (state_bs[29] & (~(1 << 9))) | (((pt[ 75 ] >> 5) & 0x1) << 9);
  1601.  
  1602.     state_bs[30] = (state_bs[30] & (~(1 << 9))) | (((pt[ 75 ] >> 6) & 0x1) << 9);
  1603.  
  1604.     state_bs[31] = (state_bs[31] & (~(1 << 9))) | (((pt[ 75 ] >> 7) & 0x1) << 9);
  1605.  
  1606.     state_bs[32] = (state_bs[32] & (~(1 << 9))) | (((pt[ 76 ] >> 0) & 0x1) << 9);
  1607.  
  1608.     state_bs[33] = (state_bs[33] & (~(1 << 9))) | (((pt[ 76 ] >> 1) & 0x1) << 9);
  1609.  
  1610.     state_bs[34] = (state_bs[34] & (~(1 << 9))) | (((pt[ 76 ] >> 2) & 0x1) << 9);
  1611.  
  1612.     state_bs[35] = (state_bs[35] & (~(1 << 9))) | (((pt[ 76 ] >> 3) & 0x1) << 9);
  1613.  
  1614.     state_bs[36] = (state_bs[36] & (~(1 << 9))) | (((pt[ 76 ] >> 4) & 0x1) << 9);
  1615.  
  1616.     state_bs[37] = (state_bs[37] & (~(1 << 9))) | (((pt[ 76 ] >> 5) & 0x1) << 9);
  1617.  
  1618.     state_bs[38] = (state_bs[38] & (~(1 << 9))) | (((pt[ 76 ] >> 6) & 0x1) << 9);
  1619.  
  1620.     state_bs[39] = (state_bs[39] & (~(1 << 9))) | (((pt[ 76 ] >> 7) & 0x1) << 9);
  1621.  
  1622.     state_bs[40] = (state_bs[40] & (~(1 << 9))) | (((pt[ 77 ] >> 0) & 0x1) << 9);
  1623.  
  1624.     state_bs[41] = (state_bs[41] & (~(1 << 9))) | (((pt[ 77 ] >> 1) & 0x1) << 9);
  1625.  
  1626.     state_bs[42] = (state_bs[42] & (~(1 << 9))) | (((pt[ 77 ] >> 2) & 0x1) << 9);
  1627.  
  1628.     state_bs[43] = (state_bs[43] & (~(1 << 9))) | (((pt[ 77 ] >> 3) & 0x1) << 9);
  1629.  
  1630.     state_bs[44] = (state_bs[44] & (~(1 << 9))) | (((pt[ 77 ] >> 4) & 0x1) << 9);
  1631.  
  1632.     state_bs[45] = (state_bs[45] & (~(1 << 9))) | (((pt[ 77 ] >> 5) & 0x1) << 9);
  1633.  
  1634.     state_bs[46] = (state_bs[46] & (~(1 << 9))) | (((pt[ 77 ] >> 6) & 0x1) << 9);
  1635.  
  1636.     state_bs[47] = (state_bs[47] & (~(1 << 9))) | (((pt[ 77 ] >> 7) & 0x1) << 9);
  1637.  
  1638.     state_bs[48] = (state_bs[48] & (~(1 << 9))) | (((pt[ 78 ] >> 0) & 0x1) << 9);
  1639.  
  1640.     state_bs[49] = (state_bs[49] & (~(1 << 9))) | (((pt[ 78 ] >> 1) & 0x1) << 9);
  1641.  
  1642.     state_bs[50] = (state_bs[50] & (~(1 << 9))) | (((pt[ 78 ] >> 2) & 0x1) << 9);
  1643.  
  1644.     state_bs[51] = (state_bs[51] & (~(1 << 9))) | (((pt[ 78 ] >> 3) & 0x1) << 9);
  1645.  
  1646.     state_bs[52] = (state_bs[52] & (~(1 << 9))) | (((pt[ 78 ] >> 4) & 0x1) << 9);
  1647.  
  1648.     state_bs[53] = (state_bs[53] & (~(1 << 9))) | (((pt[ 78 ] >> 5) & 0x1) << 9);
  1649.  
  1650.     state_bs[54] = (state_bs[54] & (~(1 << 9))) | (((pt[ 78 ] >> 6) & 0x1) << 9);
  1651.  
  1652.     state_bs[55] = (state_bs[55] & (~(1 << 9))) | (((pt[ 78 ] >> 7) & 0x1) << 9);
  1653.  
  1654.     state_bs[56] = (state_bs[56] & (~(1 << 9))) | (((pt[ 79 ] >> 0) & 0x1) << 9);
  1655.  
  1656.     state_bs[57] = (state_bs[57] & (~(1 << 9))) | (((pt[ 79 ] >> 1) & 0x1) << 9);
  1657.  
  1658.     state_bs[58] = (state_bs[58] & (~(1 << 9))) | (((pt[ 79 ] >> 2) & 0x1) << 9);
  1659.  
  1660.     state_bs[59] = (state_bs[59] & (~(1 << 9))) | (((pt[ 79 ] >> 3) & 0x1) << 9);
  1661.  
  1662.     state_bs[60] = (state_bs[60] & (~(1 << 9))) | (((pt[ 79 ] >> 4) & 0x1) << 9);
  1663.  
  1664.     state_bs[61] = (state_bs[61] & (~(1 << 9))) | (((pt[ 79 ] >> 5) & 0x1) << 9);
  1665.  
  1666.     state_bs[62] = (state_bs[62] & (~(1 << 9))) | (((pt[ 79 ] >> 6) & 0x1) << 9);
  1667.  
  1668.     state_bs[63] = (state_bs[63] & (~(1 << 9))) | (((pt[ 79 ] >> 7) & 0x1) << 9);
  1669.  
  1670.     state_bs[0] = (state_bs[0] & 0xfbff) | ((pt[ 80 ] & 0x01) << 10);
  1671.     state_bs[1] = (state_bs[1] & 0xfbff) | ((pt[ 80 ] & 0x02) << 9);
  1672.     state_bs[2] = (state_bs[2] & 0xfbff) | ((pt[ 80 ] & 0x04) << 8);
  1673.     state_bs[3] = (state_bs[3] & 0xfbff) | ((pt[ 80 ] & 0x08) << 7);
  1674.     state_bs[4] = (state_bs[4] & 0xfbff) | ((pt[ 80 ] & 0x10) << 6);
  1675.     state_bs[5] = (state_bs[5] & 0xfbff) | ((pt[ 80 ] & 0x20) << 5);
  1676.     state_bs[6] = (state_bs[6] & 0xfbff) | ((pt[ 80 ] & 0x40) << 4);
  1677.     state_bs[7] = (state_bs[7] & 0xfbff) | ((pt[ 80 ] & 0x80) << 3);
  1678.     state_bs[8] = (state_bs[8] & 0xfbff) | ((pt[ 81 ] & 0x01) << 10);
  1679.     state_bs[9] = (state_bs[9] & 0xfbff) | ((pt[ 81 ] & 0x02) << 9);
  1680.     state_bs[10] = (state_bs[10] & 0xfbff) | ((pt[ 81 ] & 0x04) << 8);
  1681.     state_bs[11] = (state_bs[11] & 0xfbff) | ((pt[ 81 ] & 0x08) << 7);
  1682.     state_bs[12] = (state_bs[12] & 0xfbff) | ((pt[ 81 ] & 0x10) << 6);
  1683.     state_bs[13] = (state_bs[13] & 0xfbff) | ((pt[ 81 ] & 0x20) << 5);
  1684.     state_bs[14] = (state_bs[14] & 0xfbff) | ((pt[ 81 ] & 0x40) << 4);
  1685.     state_bs[15] = (state_bs[15] & 0xfbff) | ((pt[ 81 ] & 0x80) << 3);
  1686.     state_bs[16] = (state_bs[16] & 0xfbff) | ((pt[ 82 ] & 0x01) << 10);
  1687.     state_bs[17] = (state_bs[17] & 0xfbff) | ((pt[ 82 ] & 0x02) << 9);
  1688.     state_bs[18] = (state_bs[18] & 0xfbff) | ((pt[ 82 ] & 0x04) << 8);
  1689.     state_bs[19] = (state_bs[19] & 0xfbff) | ((pt[ 82 ] & 0x08) << 7);
  1690.     state_bs[20] = (state_bs[20] & 0xfbff) | ((pt[ 82 ] & 0x10) << 6);
  1691.     state_bs[21] = (state_bs[21] & 0xfbff) | ((pt[ 82 ] & 0x20) << 5);
  1692.     state_bs[22] = (state_bs[22] & 0xfbff) | ((pt[ 82 ] & 0x40) << 4);
  1693.     state_bs[23] = (state_bs[23] & 0xfbff) | ((pt[ 82 ] & 0x80) << 3);
  1694.     state_bs[24] = (state_bs[24] & 0xfbff) | ((pt[ 83 ] & 0x01) << 10);
  1695.     state_bs[25] = (state_bs[25] & 0xfbff) | ((pt[ 83 ] & 0x02) << 9);
  1696.     state_bs[26] = (state_bs[26] & 0xfbff) | ((pt[ 83 ] & 0x04) << 8);
  1697.     state_bs[27] = (state_bs[27] & 0xfbff) | ((pt[ 83 ] & 0x08) << 7);
  1698.     state_bs[28] = (state_bs[28] & 0xfbff) | ((pt[ 83 ] & 0x10) << 6);
  1699.     state_bs[29] = (state_bs[29] & 0xfbff) | ((pt[ 83 ] & 0x20) << 5);
  1700.     state_bs[30] = (state_bs[30] & 0xfbff) | ((pt[ 83 ] & 0x40) << 4);
  1701.     state_bs[31] = (state_bs[31] & 0xfbff) | ((pt[ 83 ] & 0x80) << 3);
  1702.     state_bs[32] = (state_bs[32] & 0xfbff) | ((pt[ 84 ] & 0x01) << 10);
  1703.     state_bs[33] = (state_bs[33] & 0xfbff) | ((pt[ 84 ] & 0x02) << 9);
  1704.     state_bs[34] = (state_bs[34] & 0xfbff) | ((pt[ 84 ] & 0x04) << 8);
  1705.     state_bs[35] = (state_bs[35] & 0xfbff) | ((pt[ 84 ] & 0x08) << 7);
  1706.     state_bs[36] = (state_bs[36] & 0xfbff) | ((pt[ 84 ] & 0x10) << 6);
  1707.     state_bs[37] = (state_bs[37] & 0xfbff) | ((pt[ 84 ] & 0x20) << 5);
  1708.     state_bs[38] = (state_bs[38] & 0xfbff) | ((pt[ 84 ] & 0x40) << 4);
  1709.     state_bs[39] = (state_bs[39] & 0xfbff) | ((pt[ 84 ] & 0x80) << 3);
  1710.     state_bs[40] = (state_bs[40] & 0xfbff) | ((pt[ 85 ] & 0x01) << 10);
  1711.     state_bs[41] = (state_bs[41] & 0xfbff) | ((pt[ 85 ] & 0x02) << 9);
  1712.     state_bs[42] = (state_bs[42] & 0xfbff) | ((pt[ 85 ] & 0x04) << 8);
  1713.     state_bs[43] = (state_bs[43] & 0xfbff) | ((pt[ 85 ] & 0x08) << 7);
  1714.     state_bs[44] = (state_bs[44] & 0xfbff) | ((pt[ 85 ] & 0x10) << 6);
  1715.     state_bs[45] = (state_bs[45] & 0xfbff) | ((pt[ 85 ] & 0x20) << 5);
  1716.     state_bs[46] = (state_bs[46] & 0xfbff) | ((pt[ 85 ] & 0x40) << 4);
  1717.     state_bs[47] = (state_bs[47] & 0xfbff) | ((pt[ 85 ] & 0x80) << 3);
  1718.     state_bs[48] = (state_bs[48] & 0xfbff) | ((pt[ 86 ] & 0x01) << 10);
  1719.     state_bs[49] = (state_bs[49] & 0xfbff) | ((pt[ 86 ] & 0x02) << 9);
  1720.     state_bs[50] = (state_bs[50] & 0xfbff) | ((pt[ 86 ] & 0x04) << 8);
  1721.     state_bs[51] = (state_bs[51] & 0xfbff) | ((pt[ 86 ] & 0x08) << 7);
  1722.     state_bs[52] = (state_bs[52] & 0xfbff) | ((pt[ 86 ] & 0x10) << 6);
  1723.     state_bs[53] = (state_bs[53] & 0xfbff) | ((pt[ 86 ] & 0x20) << 5);
  1724.     state_bs[54] = (state_bs[54] & 0xfbff) | ((pt[ 86 ] & 0x40) << 4);
  1725.     state_bs[55] = (state_bs[55] & 0xfbff) | ((pt[ 86 ] & 0x80) << 3);
  1726.     state_bs[56] = (state_bs[56] & 0xfbff) | ((pt[ 87 ] & 0x01) << 10);
  1727.     state_bs[57] = (state_bs[57] & 0xfbff) | ((pt[ 87 ] & 0x02) << 9);
  1728.     state_bs[58] = (state_bs[58] & 0xfbff) | ((pt[ 87 ] & 0x04) << 8);
  1729.     state_bs[59] = (state_bs[59] & 0xfbff) | ((pt[ 87 ] & 0x08) << 7);
  1730.     state_bs[60] = (state_bs[60] & 0xfbff) | ((pt[ 87 ] & 0x10) << 6);
  1731.     state_bs[61] = (state_bs[61] & 0xfbff) | ((pt[ 87 ] & 0x20) << 5);
  1732.     state_bs[62] = (state_bs[62] & 0xfbff) | ((pt[ 87 ] & 0x40) << 4);
  1733.     state_bs[63] = (state_bs[63] & 0xfbff) | ((pt[ 87 ] & 0x80) << 3);
  1734.  
  1735.     state_bs[0] = (state_bs[0] & 0xf7ff) | ((pt[ 88 ] & 0x01) << 11);
  1736.     state_bs[1] = (state_bs[1] & 0xf7ff) | ((pt[ 88 ] & 0x02) << 10);
  1737.     state_bs[2] = (state_bs[2] & 0xf7ff) | ((pt[ 88 ] & 0x04) << 9);
  1738.     state_bs[3] = (state_bs[3] & 0xf7ff) | ((pt[ 88 ] & 0x08) << 8);
  1739.     state_bs[4] = (state_bs[4] & 0xf7ff) | ((pt[ 88 ] & 0x10) << 7);
  1740.     state_bs[5] = (state_bs[5] & 0xf7ff) | ((pt[ 88 ] & 0x20) << 6);
  1741.     state_bs[6] = (state_bs[6] & 0xf7ff) | ((pt[ 88 ] & 0x40) << 5);
  1742.     state_bs[7] = (state_bs[7] & 0xf7ff) | ((pt[ 88 ] & 0x80) << 4);
  1743.     state_bs[8] = (state_bs[8] & 0xf7ff) | ((pt[ 89 ] & 0x01) << 11);
  1744.     state_bs[9] = (state_bs[9] & 0xf7ff) | ((pt[ 89 ] & 0x02) << 10);
  1745.     state_bs[10] = (state_bs[10] & 0xf7ff) | ((pt[ 89 ] & 0x04) << 9);
  1746.     state_bs[11] = (state_bs[11] & 0xf7ff) | ((pt[ 89 ] & 0x08) << 8);
  1747.     state_bs[12] = (state_bs[12] & 0xf7ff) | ((pt[ 89 ] & 0x10) << 7);
  1748.     state_bs[13] = (state_bs[13] & 0xf7ff) | ((pt[ 89 ] & 0x20) << 6);
  1749.     state_bs[14] = (state_bs[14] & 0xf7ff) | ((pt[ 89 ] & 0x40) << 5);
  1750.     state_bs[15] = (state_bs[15] & 0xf7ff) | ((pt[ 89 ] & 0x80) << 4);
  1751.     state_bs[16] = (state_bs[16] & 0xf7ff) | ((pt[ 90 ] & 0x01) << 11);
  1752.     state_bs[17] = (state_bs[17] & 0xf7ff) | ((pt[ 90 ] & 0x02) << 10);
  1753.     state_bs[18] = (state_bs[18] & 0xf7ff) | ((pt[ 90 ] & 0x04) << 9);
  1754.     state_bs[19] = (state_bs[19] & 0xf7ff) | ((pt[ 90 ] & 0x08) << 8);
  1755.     state_bs[20] = (state_bs[20] & 0xf7ff) | ((pt[ 90 ] & 0x10) << 7);
  1756.     state_bs[21] = (state_bs[21] & 0xf7ff) | ((pt[ 90 ] & 0x20) << 6);
  1757.     state_bs[22] = (state_bs[22] & 0xf7ff) | ((pt[ 90 ] & 0x40) << 5);
  1758.     state_bs[23] = (state_bs[23] & 0xf7ff) | ((pt[ 90 ] & 0x80) << 4);
  1759.     state_bs[24] = (state_bs[24] & 0xf7ff) | ((pt[ 91 ] & 0x01) << 11);
  1760.     state_bs[25] = (state_bs[25] & 0xf7ff) | ((pt[ 91 ] & 0x02) << 10);
  1761.     state_bs[26] = (state_bs[26] & 0xf7ff) | ((pt[ 91 ] & 0x04) << 9);
  1762.     state_bs[27] = (state_bs[27] & 0xf7ff) | ((pt[ 91 ] & 0x08) << 8);
  1763.     state_bs[28] = (state_bs[28] & 0xf7ff) | ((pt[ 91 ] & 0x10) << 7);
  1764.     state_bs[29] = (state_bs[29] & 0xf7ff) | ((pt[ 91 ] & 0x20) << 6);
  1765.     state_bs[30] = (state_bs[30] & 0xf7ff) | ((pt[ 91 ] & 0x40) << 5);
  1766.     state_bs[31] = (state_bs[31] & 0xf7ff) | ((pt[ 91 ] & 0x80) << 4);
  1767.     state_bs[32] = (state_bs[32] & 0xf7ff) | ((pt[ 92 ] & 0x01) << 11);
  1768.     state_bs[33] = (state_bs[33] & 0xf7ff) | ((pt[ 92 ] & 0x02) << 10);
  1769.     state_bs[34] = (state_bs[34] & 0xf7ff) | ((pt[ 92 ] & 0x04) << 9);
  1770.     state_bs[35] = (state_bs[35] & 0xf7ff) | ((pt[ 92 ] & 0x08) << 8);
  1771.     state_bs[36] = (state_bs[36] & 0xf7ff) | ((pt[ 92 ] & 0x10) << 7);
  1772.     state_bs[37] = (state_bs[37] & 0xf7ff) | ((pt[ 92 ] & 0x20) << 6);
  1773.     state_bs[38] = (state_bs[38] & 0xf7ff) | ((pt[ 92 ] & 0x40) << 5);
  1774.     state_bs[39] = (state_bs[39] & 0xf7ff) | ((pt[ 92 ] & 0x80) << 4);
  1775.     state_bs[40] = (state_bs[40] & 0xf7ff) | ((pt[ 93 ] & 0x01) << 11);
  1776.     state_bs[41] = (state_bs[41] & 0xf7ff) | ((pt[ 93 ] & 0x02) << 10);
  1777.     state_bs[42] = (state_bs[42] & 0xf7ff) | ((pt[ 93 ] & 0x04) << 9);
  1778.     state_bs[43] = (state_bs[43] & 0xf7ff) | ((pt[ 93 ] & 0x08) << 8);
  1779.     state_bs[44] = (state_bs[44] & 0xf7ff) | ((pt[ 93 ] & 0x10) << 7);
  1780.     state_bs[45] = (state_bs[45] & 0xf7ff) | ((pt[ 93 ] & 0x20) << 6);
  1781.     state_bs[46] = (state_bs[46] & 0xf7ff) | ((pt[ 93 ] & 0x40) << 5);
  1782.     state_bs[47] = (state_bs[47] & 0xf7ff) | ((pt[ 93 ] & 0x80) << 4);
  1783.     state_bs[48] = (state_bs[48] & 0xf7ff) | ((pt[ 94 ] & 0x01) << 11);
  1784.     state_bs[49] = (state_bs[49] & 0xf7ff) | ((pt[ 94 ] & 0x02) << 10);
  1785.     state_bs[50] = (state_bs[50] & 0xf7ff) | ((pt[ 94 ] & 0x04) << 9);
  1786.     state_bs[51] = (state_bs[51] & 0xf7ff) | ((pt[ 94 ] & 0x08) << 8);
  1787.     state_bs[52] = (state_bs[52] & 0xf7ff) | ((pt[ 94 ] & 0x10) << 7);
  1788.     state_bs[53] = (state_bs[53] & 0xf7ff) | ((pt[ 94 ] & 0x20) << 6);
  1789.     state_bs[54] = (state_bs[54] & 0xf7ff) | ((pt[ 94 ] & 0x40) << 5);
  1790.     state_bs[55] = (state_bs[55] & 0xf7ff) | ((pt[ 94 ] & 0x80) << 4);
  1791.     state_bs[56] = (state_bs[56] & 0xf7ff) | ((pt[ 95 ] & 0x01) << 11);
  1792.     state_bs[57] = (state_bs[57] & 0xf7ff) | ((pt[ 95 ] & 0x02) << 10);
  1793.     state_bs[58] = (state_bs[58] & 0xf7ff) | ((pt[ 95 ] & 0x04) << 9);
  1794.     state_bs[59] = (state_bs[59] & 0xf7ff) | ((pt[ 95 ] & 0x08) << 8);
  1795.     state_bs[60] = (state_bs[60] & 0xf7ff) | ((pt[ 95 ] & 0x10) << 7);
  1796.     state_bs[61] = (state_bs[61] & 0xf7ff) | ((pt[ 95 ] & 0x20) << 6);
  1797.     state_bs[62] = (state_bs[62] & 0xf7ff) | ((pt[ 95 ] & 0x40) << 5);
  1798.     state_bs[63] = (state_bs[63] & 0xf7ff) | ((pt[ 95 ] & 0x80) << 4);
  1799.  
  1800.  
  1801.  
  1802.     state_bs[0] = (state_bs[0] & 0xefff) | ((pt[ 96 ] & 0x01) << 12);
  1803.     state_bs[1] = (state_bs[1] & 0xefff) | ((pt[ 96 ] & 0x02) << 11);
  1804.     state_bs[2] = (state_bs[2] & 0xefff) | ((pt[ 96 ] & 0x04) << 10);
  1805.     state_bs[3] = (state_bs[3] & 0xefff) | ((pt[ 96 ] & 0x08) << 9);
  1806.     state_bs[4] = (state_bs[4] & 0xefff) | ((pt[ 96 ] & 0x10) << 8);
  1807.     state_bs[5] = (state_bs[5] & 0xefff) | ((pt[ 96 ] & 0x20) << 7);
  1808.     state_bs[6] = (state_bs[6] & 0xefff) | ((pt[ 96 ] & 0x40) << 6);
  1809.     state_bs[7] = (state_bs[7] & 0xefff) | ((pt[ 96 ] & 0x80) << 5);
  1810.     state_bs[8] = (state_bs[8] & 0xefff) | ((pt[ 97 ] & 0x01) << 12);
  1811.     state_bs[9] = (state_bs[9] & 0xefff) | ((pt[ 97 ] & 0x02) << 11);
  1812.     state_bs[10] = (state_bs[10] & 0xefff) | ((pt[ 97 ] & 0x04) << 10);
  1813.     state_bs[11] = (state_bs[11] & 0xefff) | ((pt[ 97 ] & 0x08) << 9);
  1814.     state_bs[12] = (state_bs[12] & 0xefff) | ((pt[ 97 ] & 0x10) << 8);
  1815.     state_bs[13] = (state_bs[13] & 0xefff) | ((pt[ 97 ] & 0x20) << 7);
  1816.     state_bs[14] = (state_bs[14] & 0xefff) | ((pt[ 97 ] & 0x40) << 6);
  1817.     state_bs[15] = (state_bs[15] & 0xefff) | ((pt[ 97 ] & 0x80) << 5);
  1818.     state_bs[16] = (state_bs[16] & 0xefff) | ((pt[ 98 ] & 0x01) << 12);
  1819.     state_bs[17] = (state_bs[17] & 0xefff) | ((pt[ 98 ] & 0x02) << 11);
  1820.     state_bs[18] = (state_bs[18] & 0xefff) | ((pt[ 98 ] & 0x04) << 10);
  1821.     state_bs[19] = (state_bs[19] & 0xefff) | ((pt[ 98 ] & 0x08) << 9);
  1822.     state_bs[20] = (state_bs[20] & 0xefff) | ((pt[ 98 ] & 0x10) << 8);
  1823.     state_bs[21] = (state_bs[21] & 0xefff) | ((pt[ 98 ] & 0x20) << 7);
  1824.     state_bs[22] = (state_bs[22] & 0xefff) | ((pt[ 98 ] & 0x40) << 6);
  1825.     state_bs[23] = (state_bs[23] & 0xefff) | ((pt[ 98 ] & 0x80) << 5);
  1826.     state_bs[24] = (state_bs[24] & 0xefff) | ((pt[ 99 ] & 0x01) << 12);
  1827.     state_bs[25] = (state_bs[25] & 0xefff) | ((pt[ 99 ] & 0x02) << 11);
  1828.     state_bs[26] = (state_bs[26] & 0xefff) | ((pt[ 99 ] & 0x04) << 10);
  1829.     state_bs[27] = (state_bs[27] & 0xefff) | ((pt[ 99 ] & 0x08) << 9);
  1830.     state_bs[28] = (state_bs[28] & 0xefff) | ((pt[ 99 ] & 0x10) << 8);
  1831.     state_bs[29] = (state_bs[29] & 0xefff) | ((pt[ 99 ] & 0x20) << 7);
  1832.     state_bs[30] = (state_bs[30] & 0xefff) | ((pt[ 99 ] & 0x40) << 6);
  1833.     state_bs[31] = (state_bs[31] & 0xefff) | ((pt[ 99 ] & 0x80) << 5);
  1834.     state_bs[32] = (state_bs[32] & 0xefff) | ((pt[ 100 ] & 0x01) << 12);
  1835.     state_bs[33] = (state_bs[33] & 0xefff) | ((pt[ 100 ] & 0x02) << 11);
  1836.     state_bs[34] = (state_bs[34] & 0xefff) | ((pt[ 100 ] & 0x04) << 10);
  1837.     state_bs[35] = (state_bs[35] & 0xefff) | ((pt[ 100 ] & 0x08) << 9);
  1838.     state_bs[36] = (state_bs[36] & 0xefff) | ((pt[ 100 ] & 0x10) << 8);
  1839.     state_bs[37] = (state_bs[37] & 0xefff) | ((pt[ 100 ] & 0x20) << 7);
  1840.     state_bs[38] = (state_bs[38] & 0xefff) | ((pt[ 100 ] & 0x40) << 6);
  1841.     state_bs[39] = (state_bs[39] & 0xefff) | ((pt[ 100 ] & 0x80) << 5);
  1842.     state_bs[40] = (state_bs[40] & 0xefff) | ((pt[ 101 ] & 0x01) << 12);
  1843.     state_bs[41] = (state_bs[41] & 0xefff) | ((pt[ 101 ] & 0x02) << 11);
  1844.     state_bs[42] = (state_bs[42] & 0xefff) | ((pt[ 101 ] & 0x04) << 10);
  1845.     state_bs[43] = (state_bs[43] & 0xefff) | ((pt[ 101 ] & 0x08) << 9);
  1846.     state_bs[44] = (state_bs[44] & 0xefff) | ((pt[ 101 ] & 0x10) << 8);
  1847.     state_bs[45] = (state_bs[45] & 0xefff) | ((pt[ 101 ] & 0x20) << 7);
  1848.     state_bs[46] = (state_bs[46] & 0xefff) | ((pt[ 101 ] & 0x40) << 6);
  1849.     state_bs[47] = (state_bs[47] & 0xefff) | ((pt[ 101 ] & 0x80) << 5);
  1850.     state_bs[48] = (state_bs[48] & 0xefff) | ((pt[ 102 ] & 0x01) << 12);
  1851.     state_bs[49] = (state_bs[49] & 0xefff) | ((pt[ 102 ] & 0x02) << 11);
  1852.     state_bs[50] = (state_bs[50] & 0xefff) | ((pt[ 102 ] & 0x04) << 10);
  1853.     state_bs[51] = (state_bs[51] & 0xefff) | ((pt[ 102 ] & 0x08) << 9);
  1854.     state_bs[52] = (state_bs[52] & 0xefff) | ((pt[ 102 ] & 0x10) << 8);
  1855.     state_bs[53] = (state_bs[53] & 0xefff) | ((pt[ 102 ] & 0x20) << 7);
  1856.     state_bs[54] = (state_bs[54] & 0xefff) | ((pt[ 102 ] & 0x40) << 6);
  1857.     state_bs[55] = (state_bs[55] & 0xefff) | ((pt[ 102 ] & 0x80) << 5);
  1858.     state_bs[56] = (state_bs[56] & 0xefff) | ((pt[ 103 ] & 0x01) << 12);
  1859.     state_bs[57] = (state_bs[57] & 0xefff) | ((pt[ 103 ] & 0x02) << 11);
  1860.     state_bs[58] = (state_bs[58] & 0xefff) | ((pt[ 103 ] & 0x04) << 10);
  1861.     state_bs[59] = (state_bs[59] & 0xefff) | ((pt[ 103 ] & 0x08) << 9);
  1862.     state_bs[60] = (state_bs[60] & 0xefff) | ((pt[ 103 ] & 0x10) << 8);
  1863.     state_bs[61] = (state_bs[61] & 0xefff) | ((pt[ 103 ] & 0x20) << 7);
  1864.     state_bs[62] = (state_bs[62] & 0xefff) | ((pt[ 103 ] & 0x40) << 6);
  1865.     state_bs[63] = (state_bs[63] & 0xefff) | ((pt[ 103 ] & 0x80) << 5);
  1866.  
  1867.  
  1868.  
  1869.     state_bs[0] = (state_bs[0] & 0xdfff) | ((pt[ 104 ] & 0x01) << 13);
  1870.     state_bs[1] = (state_bs[1] & 0xdfff) | ((pt[ 104 ] & 0x02) << 12);
  1871.     state_bs[2] = (state_bs[2] & 0xdfff) | ((pt[ 104 ] & 0x04) << 11);
  1872.     state_bs[3] = (state_bs[3] & 0xdfff) | ((pt[ 104 ] & 0x08) << 10);
  1873.     state_bs[4] = (state_bs[4] & 0xdfff) | ((pt[ 104 ] & 0x10) << 9);
  1874.     state_bs[5] = (state_bs[5] & 0xdfff) | ((pt[ 104 ] & 0x20) << 8);
  1875.     state_bs[6] = (state_bs[6] & 0xdfff) | ((pt[ 104 ] & 0x40) << 7);
  1876.     state_bs[7] = (state_bs[7] & 0xdfff) | ((pt[ 104 ] & 0x80) << 6);
  1877.     state_bs[8] = (state_bs[8] & 0xdfff) | ((pt[ 105 ] & 0x01) << 13);
  1878.     state_bs[9] = (state_bs[9] & 0xdfff) | ((pt[ 105 ] & 0x02) << 12);
  1879.     state_bs[10] = (state_bs[10] & 0xdfff) | ((pt[ 105 ] & 0x04) << 11);
  1880.     state_bs[11] = (state_bs[11] & 0xdfff) | ((pt[ 105 ] & 0x08) << 10);
  1881.     state_bs[12] = (state_bs[12] & 0xdfff) | ((pt[ 105 ] & 0x10) << 9);
  1882.     state_bs[13] = (state_bs[13] & 0xdfff) | ((pt[ 105 ] & 0x20) << 8);
  1883.     state_bs[14] = (state_bs[14] & 0xdfff) | ((pt[ 105 ] & 0x40) << 7);
  1884.     state_bs[15] = (state_bs[15] & 0xdfff) | ((pt[ 105 ] & 0x80) << 6);
  1885.     state_bs[16] = (state_bs[16] & 0xdfff) | ((pt[ 106 ] & 0x01) << 13);
  1886.     state_bs[17] = (state_bs[17] & 0xdfff) | ((pt[ 106 ] & 0x02) << 12);
  1887.     state_bs[18] = (state_bs[18] & 0xdfff) | ((pt[ 106 ] & 0x04) << 11);
  1888.     state_bs[19] = (state_bs[19] & 0xdfff) | ((pt[ 106 ] & 0x08) << 10);
  1889.     state_bs[20] = (state_bs[20] & 0xdfff) | ((pt[ 106 ] & 0x10) << 9);
  1890.     state_bs[21] = (state_bs[21] & 0xdfff) | ((pt[ 106 ] & 0x20) << 8);
  1891.     state_bs[22] = (state_bs[22] & 0xdfff) | ((pt[ 106 ] & 0x40) << 7);
  1892.     state_bs[23] = (state_bs[23] & 0xdfff) | ((pt[ 106 ] & 0x80) << 6);
  1893.     state_bs[24] = (state_bs[24] & 0xdfff) | ((pt[ 107 ] & 0x01) << 13);
  1894.     state_bs[25] = (state_bs[25] & 0xdfff) | ((pt[ 107 ] & 0x02) << 12);
  1895.     state_bs[26] = (state_bs[26] & 0xdfff) | ((pt[ 107 ] & 0x04) << 11);
  1896.     state_bs[27] = (state_bs[27] & 0xdfff) | ((pt[ 107 ] & 0x08) << 10);
  1897.     state_bs[28] = (state_bs[28] & 0xdfff) | ((pt[ 107 ] & 0x10) << 9);
  1898.     state_bs[29] = (state_bs[29] & 0xdfff) | ((pt[ 107 ] & 0x20) << 8);
  1899.     state_bs[30] = (state_bs[30] & 0xdfff) | ((pt[ 107 ] & 0x40) << 7);
  1900.     state_bs[31] = (state_bs[31] & 0xdfff) | ((pt[ 107 ] & 0x80) << 6);
  1901.     state_bs[32] = (state_bs[32] & 0xdfff) | ((pt[ 108 ] & 0x01) << 13);
  1902.     state_bs[33] = (state_bs[33] & 0xdfff) | ((pt[ 108 ] & 0x02) << 12);
  1903.     state_bs[34] = (state_bs[34] & 0xdfff) | ((pt[ 108 ] & 0x04) << 11);
  1904.     state_bs[35] = (state_bs[35] & 0xdfff) | ((pt[ 108 ] & 0x08) << 10);
  1905.     state_bs[36] = (state_bs[36] & 0xdfff) | ((pt[ 108 ] & 0x10) << 9);
  1906.     state_bs[37] = (state_bs[37] & 0xdfff) | ((pt[ 108 ] & 0x20) << 8);
  1907.     state_bs[38] = (state_bs[38] & 0xdfff) | ((pt[ 108 ] & 0x40) << 7);
  1908.     state_bs[39] = (state_bs[39] & 0xdfff) | ((pt[ 108 ] & 0x80) << 6);
  1909.     state_bs[40] = (state_bs[40] & 0xdfff) | ((pt[ 109 ] & 0x01) << 13);
  1910.     state_bs[41] = (state_bs[41] & 0xdfff) | ((pt[ 109 ] & 0x02) << 12);
  1911.     state_bs[42] = (state_bs[42] & 0xdfff) | ((pt[ 109 ] & 0x04) << 11);
  1912.     state_bs[43] = (state_bs[43] & 0xdfff) | ((pt[ 109 ] & 0x08) << 10);
  1913.     state_bs[44] = (state_bs[44] & 0xdfff) | ((pt[ 109 ] & 0x10) << 9);
  1914.     state_bs[45] = (state_bs[45] & 0xdfff) | ((pt[ 109 ] & 0x20) << 8);
  1915.     state_bs[46] = (state_bs[46] & 0xdfff) | ((pt[ 109 ] & 0x40) << 7);
  1916.     state_bs[47] = (state_bs[47] & 0xdfff) | ((pt[ 109 ] & 0x80) << 6);
  1917.     state_bs[48] = (state_bs[48] & 0xdfff) | ((pt[ 110 ] & 0x01) << 13);
  1918.     state_bs[49] = (state_bs[49] & 0xdfff) | ((pt[ 110 ] & 0x02) << 12);
  1919.     state_bs[50] = (state_bs[50] & 0xdfff) | ((pt[ 110 ] & 0x04) << 11);
  1920.     state_bs[51] = (state_bs[51] & 0xdfff) | ((pt[ 110 ] & 0x08) << 10);
  1921.     state_bs[52] = (state_bs[52] & 0xdfff) | ((pt[ 110 ] & 0x10) << 9);
  1922.     state_bs[53] = (state_bs[53] & 0xdfff) | ((pt[ 110 ] & 0x20) << 8);
  1923.     state_bs[54] = (state_bs[54] & 0xdfff) | ((pt[ 110 ] & 0x40) << 7);
  1924.     state_bs[55] = (state_bs[55] & 0xdfff) | ((pt[ 110 ] & 0x80) << 6);
  1925.     state_bs[56] = (state_bs[56] & 0xdfff) | ((pt[ 111 ] & 0x01) << 13);
  1926.     state_bs[57] = (state_bs[57] & 0xdfff) | ((pt[ 111 ] & 0x02) << 12);
  1927.     state_bs[58] = (state_bs[58] & 0xdfff) | ((pt[ 111 ] & 0x04) << 11);
  1928.     state_bs[59] = (state_bs[59] & 0xdfff) | ((pt[ 111 ] & 0x08) << 10);
  1929.     state_bs[60] = (state_bs[60] & 0xdfff) | ((pt[ 111 ] & 0x10) << 9);
  1930.     state_bs[61] = (state_bs[61] & 0xdfff) | ((pt[ 111 ] & 0x20) << 8);
  1931.     state_bs[62] = (state_bs[62] & 0xdfff) | ((pt[ 111 ] & 0x40) << 7);
  1932.     state_bs[63] = (state_bs[63] & 0xdfff) | ((pt[ 111 ] & 0x80) << 6);
  1933.  
  1934.  
  1935.  
  1936.     state_bs[0] = (state_bs[0] & 0xbfff) | ((pt[ 112 ] & 0x01) << 14);
  1937.     state_bs[1] = (state_bs[1] & 0xbfff) | ((pt[ 112 ] & 0x02) << 13);
  1938.     state_bs[2] = (state_bs[2] & 0xbfff) | ((pt[ 112 ] & 0x04) << 12);
  1939.     state_bs[3] = (state_bs[3] & 0xbfff) | ((pt[ 112 ] & 0x08) << 11);
  1940.     state_bs[4] = (state_bs[4] & 0xbfff) | ((pt[ 112 ] & 0x10) << 10);
  1941.     state_bs[5] = (state_bs[5] & 0xbfff) | ((pt[ 112 ] & 0x20) << 9);
  1942.     state_bs[6] = (state_bs[6] & 0xbfff) | ((pt[ 112 ] & 0x40) << 8);
  1943.     state_bs[7] = (state_bs[7] & 0xbfff) | ((pt[ 112 ] & 0x80) << 7);
  1944.     state_bs[8] = (state_bs[8] & 0xbfff) | ((pt[ 113 ] & 0x01) << 14);
  1945.     state_bs[9] = (state_bs[9] & 0xbfff) | ((pt[ 113 ] & 0x02) << 13);
  1946.     state_bs[10] = (state_bs[10] & 0xbfff) | ((pt[ 113 ] & 0x04) << 12);
  1947.     state_bs[11] = (state_bs[11] & 0xbfff) | ((pt[ 113 ] & 0x08) << 11);
  1948.     state_bs[12] = (state_bs[12] & 0xbfff) | ((pt[ 113 ] & 0x10) << 10);
  1949.     state_bs[13] = (state_bs[13] & 0xbfff) | ((pt[ 113 ] & 0x20) << 9);
  1950.     state_bs[14] = (state_bs[14] & 0xbfff) | ((pt[ 113 ] & 0x40) << 8);
  1951.     state_bs[15] = (state_bs[15] & 0xbfff) | ((pt[ 113 ] & 0x80) << 7);
  1952.     state_bs[16] = (state_bs[16] & 0xbfff) | ((pt[ 114 ] & 0x01) << 14);
  1953.     state_bs[17] = (state_bs[17] & 0xbfff) | ((pt[ 114 ] & 0x02) << 13);
  1954.     state_bs[18] = (state_bs[18] & 0xbfff) | ((pt[ 114 ] & 0x04) << 12);
  1955.     state_bs[19] = (state_bs[19] & 0xbfff) | ((pt[ 114 ] & 0x08) << 11);
  1956.     state_bs[20] = (state_bs[20] & 0xbfff) | ((pt[ 114 ] & 0x10) << 10);
  1957.     state_bs[21] = (state_bs[21] & 0xbfff) | ((pt[ 114 ] & 0x20) << 9);
  1958.     state_bs[22] = (state_bs[22] & 0xbfff) | ((pt[ 114 ] & 0x40) << 8);
  1959.     state_bs[23] = (state_bs[23] & 0xbfff) | ((pt[ 114 ] & 0x80) << 7);
  1960.     state_bs[24] = (state_bs[24] & 0xbfff) | ((pt[ 115 ] & 0x01) << 14);
  1961.     state_bs[25] = (state_bs[25] & 0xbfff) | ((pt[ 115 ] & 0x02) << 13);
  1962.     state_bs[26] = (state_bs[26] & 0xbfff) | ((pt[ 115 ] & 0x04) << 12);
  1963.     state_bs[27] = (state_bs[27] & 0xbfff) | ((pt[ 115 ] & 0x08) << 11);
  1964.     state_bs[28] = (state_bs[28] & 0xbfff) | ((pt[ 115 ] & 0x10) << 10);
  1965.     state_bs[29] = (state_bs[29] & 0xbfff) | ((pt[ 115 ] & 0x20) << 9);
  1966.     state_bs[30] = (state_bs[30] & 0xbfff) | ((pt[ 115 ] & 0x40) << 8);
  1967.     state_bs[31] = (state_bs[31] & 0xbfff) | ((pt[ 115 ] & 0x80) << 7);
  1968.     state_bs[32] = (state_bs[32] & 0xbfff) | ((pt[ 116 ] & 0x01) << 14);
  1969.     state_bs[33] = (state_bs[33] & 0xbfff) | ((pt[ 116 ] & 0x02) << 13);
  1970.     state_bs[34] = (state_bs[34] & 0xbfff) | ((pt[ 116 ] & 0x04) << 12);
  1971.     state_bs[35] = (state_bs[35] & 0xbfff) | ((pt[ 116 ] & 0x08) << 11);
  1972.     state_bs[36] = (state_bs[36] & 0xbfff) | ((pt[ 116 ] & 0x10) << 10);
  1973.     state_bs[37] = (state_bs[37] & 0xbfff) | ((pt[ 116 ] & 0x20) << 9);
  1974.     state_bs[38] = (state_bs[38] & 0xbfff) | ((pt[ 116 ] & 0x40) << 8);
  1975.     state_bs[39] = (state_bs[39] & 0xbfff) | ((pt[ 116 ] & 0x80) << 7);
  1976.     state_bs[40] = (state_bs[40] & 0xbfff) | ((pt[ 117 ] & 0x01) << 14);
  1977.     state_bs[41] = (state_bs[41] & 0xbfff) | ((pt[ 117 ] & 0x02) << 13);
  1978.     state_bs[42] = (state_bs[42] & 0xbfff) | ((pt[ 117 ] & 0x04) << 12);
  1979.     state_bs[43] = (state_bs[43] & 0xbfff) | ((pt[ 117 ] & 0x08) << 11);
  1980.     state_bs[44] = (state_bs[44] & 0xbfff) | ((pt[ 117 ] & 0x10) << 10);
  1981.     state_bs[45] = (state_bs[45] & 0xbfff) | ((pt[ 117 ] & 0x20) << 9);
  1982.     state_bs[46] = (state_bs[46] & 0xbfff) | ((pt[ 117 ] & 0x40) << 8);
  1983.     state_bs[47] = (state_bs[47] & 0xbfff) | ((pt[ 117 ] & 0x80) << 7);
  1984.     state_bs[48] = (state_bs[48] & 0xbfff) | ((pt[ 118 ] & 0x01) << 14);
  1985.     state_bs[49] = (state_bs[49] & 0xbfff) | ((pt[ 118 ] & 0x02) << 13);
  1986.     state_bs[50] = (state_bs[50] & 0xbfff) | ((pt[ 118 ] & 0x04) << 12);
  1987.     state_bs[51] = (state_bs[51] & 0xbfff) | ((pt[ 118 ] & 0x08) << 11);
  1988.     state_bs[52] = (state_bs[52] & 0xbfff) | ((pt[ 118 ] & 0x10) << 10);
  1989.     state_bs[53] = (state_bs[53] & 0xbfff) | ((pt[ 118 ] & 0x20) << 9);
  1990.     state_bs[54] = (state_bs[54] & 0xbfff) | ((pt[ 118 ] & 0x40) << 8);
  1991.     state_bs[55] = (state_bs[55] & 0xbfff) | ((pt[ 118 ] & 0x80) << 7);
  1992.     state_bs[56] = (state_bs[56] & 0xbfff) | ((pt[ 119 ] & 0x01) << 14);
  1993.     state_bs[57] = (state_bs[57] & 0xbfff) | ((pt[ 119 ] & 0x02) << 13);
  1994.     state_bs[58] = (state_bs[58] & 0xbfff) | ((pt[ 119 ] & 0x04) << 12);
  1995.     state_bs[59] = (state_bs[59] & 0xbfff) | ((pt[ 119 ] & 0x08) << 11);
  1996.     state_bs[60] = (state_bs[60] & 0xbfff) | ((pt[ 119 ] & 0x10) << 10);
  1997.     state_bs[61] = (state_bs[61] & 0xbfff) | ((pt[ 119 ] & 0x20) << 9);
  1998.     state_bs[62] = (state_bs[62] & 0xbfff) | ((pt[ 119 ] & 0x40) << 8);
  1999.     state_bs[63] = (state_bs[63] & 0xbfff) | ((pt[ 119 ] & 0x80) << 7);
  2000.  
  2001.     state_bs[0] = (state_bs[0] & 0x7fff) | ((pt[ 120 ] & 0x01) << 15);
  2002.     state_bs[1] = (state_bs[1] & 0x7fff) | ((pt[ 120 ] & 0x02) << 14);
  2003.     state_bs[2] = (state_bs[2] & 0x7fff) | ((pt[ 120 ] & 0x04) << 13);
  2004.     state_bs[3] = (state_bs[3] & 0x7fff) | ((pt[ 120 ] & 0x08) << 12);
  2005.     state_bs[4] = (state_bs[4] & 0x7fff) | ((pt[ 120 ] & 0x10) << 11);
  2006.     state_bs[5] = (state_bs[5] & 0x7fff) | ((pt[ 120 ] & 0x20) << 10);
  2007.     state_bs[6] = (state_bs[6] & 0x7fff) | ((pt[ 120 ] & 0x40) << 9);
  2008.     state_bs[7] = (state_bs[7] & 0x7fff) | ((pt[ 120 ] & 0x80) << 8);
  2009.     state_bs[8] = (state_bs[8] & 0x7fff) | ((pt[ 121 ] & 0x01) << 15);
  2010.     state_bs[9] = (state_bs[9] & 0x7fff) | ((pt[ 121 ] & 0x02) << 14);
  2011.     state_bs[10] = (state_bs[10] & 0x7fff) | ((pt[ 121 ] & 0x04) << 13);
  2012.     state_bs[11] = (state_bs[11] & 0x7fff) | ((pt[ 121 ] & 0x08) << 12);
  2013.     state_bs[12] = (state_bs[12] & 0x7fff) | ((pt[ 121 ] & 0x10) << 11);
  2014.     state_bs[13] = (state_bs[13] & 0x7fff) | ((pt[ 121 ] & 0x20) << 10);
  2015.     state_bs[14] = (state_bs[14] & 0x7fff) | ((pt[ 121 ] & 0x40) << 9);
  2016.     state_bs[15] = (state_bs[15] & 0x7fff) | ((pt[ 121 ] & 0x80) << 8);
  2017.     state_bs[16] = (state_bs[16] & 0x7fff) | ((pt[ 122 ] & 0x01) << 15);
  2018.     state_bs[17] = (state_bs[17] & 0x7fff) | ((pt[ 122 ] & 0x02) << 14);
  2019.     state_bs[18] = (state_bs[18] & 0x7fff) | ((pt[ 122 ] & 0x04) << 13);
  2020.     state_bs[19] = (state_bs[19] & 0x7fff) | ((pt[ 122 ] & 0x08) << 12);
  2021.     state_bs[20] = (state_bs[20] & 0x7fff) | ((pt[ 122 ] & 0x10) << 11);
  2022.     state_bs[21] = (state_bs[21] & 0x7fff) | ((pt[ 122 ] & 0x20) << 10);
  2023.     state_bs[22] = (state_bs[22] & 0x7fff) | ((pt[ 122 ] & 0x40) << 9);
  2024.     state_bs[23] = (state_bs[23] & 0x7fff) | ((pt[ 122 ] & 0x80) << 8);
  2025.     state_bs[24] = (state_bs[24] & 0x7fff) | ((pt[ 123 ] & 0x01) << 15);
  2026.     state_bs[25] = (state_bs[25] & 0x7fff) | ((pt[ 123 ] & 0x02) << 14);
  2027.     state_bs[26] = (state_bs[26] & 0x7fff) | ((pt[ 123 ] & 0x04) << 13);
  2028.     state_bs[27] = (state_bs[27] & 0x7fff) | ((pt[ 123 ] & 0x08) << 12);
  2029.     state_bs[28] = (state_bs[28] & 0x7fff) | ((pt[ 123 ] & 0x10) << 11);
  2030.     state_bs[29] = (state_bs[29] & 0x7fff) | ((pt[ 123 ] & 0x20) << 10);
  2031.     state_bs[30] = (state_bs[30] & 0x7fff) | ((pt[ 123 ] & 0x40) << 9);
  2032.     state_bs[31] = (state_bs[31] & 0x7fff) | ((pt[ 123 ] & 0x80) << 8);
  2033.     state_bs[32] = (state_bs[32] & 0x7fff) | ((pt[ 124 ] & 0x01) << 15);
  2034.     state_bs[33] = (state_bs[33] & 0x7fff) | ((pt[ 124 ] & 0x02) << 14);
  2035.     state_bs[34] = (state_bs[34] & 0x7fff) | ((pt[ 124 ] & 0x04) << 13);
  2036.     state_bs[35] = (state_bs[35] & 0x7fff) | ((pt[ 124 ] & 0x08) << 12);
  2037.     state_bs[36] = (state_bs[36] & 0x7fff) | ((pt[ 124 ] & 0x10) << 11);
  2038.     state_bs[37] = (state_bs[37] & 0x7fff) | ((pt[ 124 ] & 0x20) << 10);
  2039.     state_bs[38] = (state_bs[38] & 0x7fff) | ((pt[ 124 ] & 0x40) << 9);
  2040.     state_bs[39] = (state_bs[39] & 0x7fff) | ((pt[ 124 ] & 0x80) << 8);
  2041.     state_bs[40] = (state_bs[40] & 0x7fff) | ((pt[ 125 ] & 0x01) << 15);
  2042.     state_bs[41] = (state_bs[41] & 0x7fff) | ((pt[ 125 ] & 0x02) << 14);
  2043.     state_bs[42] = (state_bs[42] & 0x7fff) | ((pt[ 125 ] & 0x04) << 13);
  2044.     state_bs[43] = (state_bs[43] & 0x7fff) | ((pt[ 125 ] & 0x08) << 12);
  2045.     state_bs[44] = (state_bs[44] & 0x7fff) | ((pt[ 125 ] & 0x10) << 11);
  2046.     state_bs[45] = (state_bs[45] & 0x7fff) | ((pt[ 125 ] & 0x20) << 10);
  2047.     state_bs[46] = (state_bs[46] & 0x7fff) | ((pt[ 125 ] & 0x40) << 9);
  2048.     state_bs[47] = (state_bs[47] & 0x7fff) | ((pt[ 125 ] & 0x80) << 8);
  2049.     state_bs[48] = (state_bs[48] & 0x7fff) | ((pt[ 126 ] & 0x01) << 15);
  2050.     state_bs[49] = (state_bs[49] & 0x7fff) | ((pt[ 126 ] & 0x02) << 14);
  2051.     state_bs[50] = (state_bs[50] & 0x7fff) | ((pt[ 126 ] & 0x04) << 13);
  2052.     state_bs[51] = (state_bs[51] & 0x7fff) | ((pt[ 126 ] & 0x08) << 12);
  2053.     state_bs[52] = (state_bs[52] & 0x7fff) | ((pt[ 126 ] & 0x10) << 11);
  2054.     state_bs[53] = (state_bs[53] & 0x7fff) | ((pt[ 126 ] & 0x20) << 10);
  2055.     state_bs[54] = (state_bs[54] & 0x7fff) | ((pt[ 126 ] & 0x40) << 9);
  2056.     state_bs[55] = (state_bs[55] & 0x7fff) | ((pt[ 126 ] & 0x80) << 8);
  2057.     state_bs[56] = (state_bs[56] & 0x7fff) | ((pt[ 127 ] & 0x01) << 15);
  2058.     state_bs[57] = (state_bs[57] & 0x7fff) | ((pt[ 127 ] & 0x02) << 14);
  2059.     state_bs[58] = (state_bs[58] & 0x7fff) | ((pt[ 127 ] & 0x04) << 13);
  2060.     state_bs[59] = (state_bs[59] & 0x7fff) | ((pt[ 127 ] & 0x08) << 12);
  2061.     state_bs[60] = (state_bs[60] & 0x7fff) | ((pt[ 127 ] & 0x10) << 11);
  2062.     state_bs[61] = (state_bs[61] & 0x7fff) | ((pt[ 127 ] & 0x20) << 10);
  2063.     state_bs[62] = (state_bs[62] & 0x7fff) | ((pt[ 127 ] & 0x40) << 9);
  2064.     state_bs[63] = (state_bs[63] & 0x7fff) | ((pt[ 127 ] & 0x80) << 8);
  2065. }
  2066.  
  2067. /**
  2068.  * Bring bitsliced buffer into normal form
  2069.  * @param state_bs Input: Bitsliced state
  2070.  * @param pt Output: state_bs in normal form
  2071.  */
  2072. static void unslice(const bs_reg_t state_bs[CRYPTO_IN_SIZE_BIT], uint8_t pt[CRYPTO_IN_SIZE * BITSLICE_WIDTH])
  2073. {
  2074.     /// INSERT YOUR CODE HERE ///
  2075.     pt[ 0 ] = (pt [0] & 0xfe) | ((state_bs[0] >> 0) & 0x01);
  2076.     pt[ 8 ] = (pt [8] & 0xfe) | ((state_bs[0] >> 1) & 0x01);
  2077.     pt[ 16 ] = (pt [16] & 0xfe) | ((state_bs[0] >> 2) & 0x01);
  2078.     pt[ 24 ] = (pt [24] & 0xfe) | ((state_bs[0] >> 3) & 0x01);
  2079.     pt[ 32 ] = (pt [32] & 0xfe) | ((state_bs[0] >> 4) & 0x01);
  2080.     pt[ 40 ] = (pt [40] & 0xfe) | ((state_bs[0] >> 5) & 0x01);
  2081.     pt[ 48 ] = (pt [48] & 0xfe) | ((state_bs[0] >> 6) & 0x01);
  2082.     pt[ 56 ] = (pt [56] & 0xfe) | ((state_bs[0] >> 7) & 0x01);
  2083.     pt[ 64 ] = (pt [64] & 0xfe) | ((state_bs[0] >> 8) & 0x01);
  2084.     pt[ 72 ] = (pt [72] & 0xfe) | ((state_bs[0] >> 9) & 0x01);
  2085.     pt[ 80 ] = (pt [80] & 0xfe) | ((state_bs[0] >> 10) & 0x01);
  2086.     pt[ 88 ] = (pt [88] & 0xfe) | ((state_bs[0] >> 11) & 0x01);
  2087.     pt[ 96 ] = (pt [96] & 0xfe) | ((state_bs[0] >> 12) & 0x01);
  2088.     pt[ 104 ] = (pt [104] & 0xfe) | ((state_bs[0] >> 13) & 0x01);
  2089.     pt[ 112 ] = (pt [112] & 0xfe) | ((state_bs[0] >> 14) & 0x01);
  2090.     pt[ 120 ] = (pt [120] & 0xfe) | ((state_bs[0] >> 15) & 0x01);
  2091.     pt[ 0 ] = (pt [0] & 0xfd) | ((state_bs[1] & 0x01) << 1);
  2092.     pt[ 8 ] = (pt [8] & 0xfd) | ((state_bs[1] >> 0) & 0x02);
  2093.     pt[ 16 ] = (pt [16] & 0xfd) | ((state_bs[1] >> 1) & 0x02);
  2094.     pt[ 24 ] = (pt [24] & 0xfd) | ((state_bs[1] >> 2) & 0x02);
  2095.     pt[ 32 ] = (pt [32] & 0xfd) | ((state_bs[1] >> 3) & 0x02);
  2096.     pt[ 40 ] = (pt [40] & 0xfd) | ((state_bs[1] >> 4) & 0x02);
  2097.     pt[ 48 ] = (pt [48] & 0xfd) | ((state_bs[1] >> 5) & 0x02);
  2098.     pt[ 56 ] = (pt [56] & 0xfd) | ((state_bs[1] >> 6) & 0x02);
  2099.     pt[ 64 ] = (pt [64] & 0xfd) | ((state_bs[1] >> 7) & 0x02);
  2100.     pt[ 72 ] = (pt [72] & 0xfd) | ((state_bs[1] >> 8) & 0x02);
  2101.     pt[ 80 ] = (pt [80] & 0xfd) | ((state_bs[1] >> 9) & 0x02);
  2102.     pt[ 88 ] = (pt [88] & 0xfd) | ((state_bs[1] >> 10) & 0x02);
  2103.     pt[ 96 ] = (pt [96] & 0xfd) | ((state_bs[1] >> 11) & 0x02);
  2104.     pt[ 104 ] = (pt [104] & 0xfd) | ((state_bs[1] >> 12) & 0x02);
  2105.     pt[ 112 ] = (pt [112] & 0xfd) | ((state_bs[1] >> 13) & 0x02);
  2106.     pt[ 120 ] = (pt [120] & 0xfd) | ((state_bs[1] >> 14) & 0x02);
  2107.     pt[ 0 ] = (pt [0] & 0xfb) | ((state_bs[2] & 0x01) << 2);
  2108.     pt[ 8 ] = (pt [8] & 0xfb) | ((state_bs[2] & 0x02) << 1);
  2109.     pt[ 16 ] = (pt [16] & 0xfb) | ((state_bs[2] >> 0) & 0x04);
  2110.     pt[ 24 ] = (pt [24] & 0xfb) | ((state_bs[2] >> 1) & 0x04);
  2111.     pt[ 32 ] = (pt [32] & 0xfb) | ((state_bs[2] >> 2) & 0x04);
  2112.     pt[ 40 ] = (pt [40] & 0xfb) | ((state_bs[2] >> 3) & 0x04);
  2113.     pt[ 48 ] = (pt [48] & 0xfb) | ((state_bs[2] >> 4) & 0x04);
  2114.     pt[ 56 ] = (pt [56] & 0xfb) | ((state_bs[2] >> 5) & 0x04);
  2115.     pt[ 64 ] = (pt [64] & 0xfb) | ((state_bs[2] >> 6) & 0x04);
  2116.     pt[ 72 ] = (pt [72] & 0xfb) | ((state_bs[2] >> 7) & 0x04);
  2117.     pt[ 80 ] = (pt [80] & 0xfb) | ((state_bs[2] >> 8) & 0x04);
  2118.     pt[ 88 ] = (pt [88] & 0xfb) | ((state_bs[2] >> 9) & 0x04);
  2119.     pt[ 96 ] = (pt [96] & 0xfb) | ((state_bs[2] >> 10) & 0x04);
  2120.     pt[ 104 ] = (pt [104] & 0xfb) | ((state_bs[2] >> 11) & 0x04);
  2121.     pt[ 112 ] = (pt [112] & 0xfb) | ((state_bs[2] >> 12) & 0x04);
  2122.     pt[ 120 ] = (pt [120] & 0xfb) | ((state_bs[2] >> 13) & 0x04);
  2123.     pt[ 0 ] = (pt [0] & 0xf7) | ((state_bs[3] & 0x01) << 3);
  2124.     pt[ 8 ] = (pt [8] & 0xf7) | ((state_bs[3] & 0x02) << 2);
  2125.     pt[ 16 ] = (pt [16] & 0xf7) | ((state_bs[3] & 0x04) << 1);
  2126.     pt[ 24 ] = (pt [24] & 0xf7) | ((state_bs[3] >> 0) & 0x08);
  2127.     pt[ 32 ] = (pt [32] & 0xf7) | ((state_bs[3] >> 1) & 0x08);
  2128.     pt[ 40 ] = (pt [40] & 0xf7) | ((state_bs[3] >> 2) & 0x08);
  2129.     pt[ 48 ] = (pt [48] & 0xf7) | ((state_bs[3] >> 3) & 0x08);
  2130.     pt[ 56 ] = (pt [56] & 0xf7) | ((state_bs[3] >> 4) & 0x08);
  2131.     pt[ 64 ] = (pt [64] & 0xf7) | ((state_bs[3] >> 5) & 0x08);
  2132.     pt[ 72 ] = (pt [72] & 0xf7) | ((state_bs[3] >> 6) & 0x08);
  2133.     pt[ 80 ] = (pt [80] & 0xf7) | ((state_bs[3] >> 7) & 0x08);
  2134.     pt[ 88 ] = (pt [88] & 0xf7) | ((state_bs[3] >> 8) & 0x08);
  2135.     pt[ 96 ] = (pt [96] & 0xf7) | ((state_bs[3] >> 9) & 0x08);
  2136.     pt[ 104 ] = (pt [104] & 0xf7) | ((state_bs[3] >> 10) & 0x08);
  2137.     pt[ 112 ] = (pt [112] & 0xf7) | ((state_bs[3] >> 11) & 0x08);
  2138.     pt[ 120 ] = (pt [120] & 0xf7) | ((state_bs[3] >> 12) & 0x08);
  2139.     pt[ 0 ] = (pt [0] & 0xef) | ((state_bs[4] & 0x01) << 4);
  2140.     pt[ 8 ] = (pt [8] & 0xef) | ((state_bs[4] & 0x02) << 3);
  2141.     pt[ 16 ] = (pt [16] & 0xef) | ((state_bs[4] & 0x04) << 2);
  2142.     pt[ 24 ] = (pt [24] & 0xef) | ((state_bs[4] & 0x08) << 1);
  2143.     pt[ 32 ] = (pt [32] & 0xef) | ((state_bs[4] >> 0) & 0x10);
  2144.     pt[ 40 ] = (pt [40] & 0xef) | ((state_bs[4] >> 1) & 0x10);
  2145.     pt[ 48 ] = (pt [48] & 0xef) | ((state_bs[4] >> 2) & 0x10);
  2146.     pt[ 56 ] = (pt [56] & 0xef) | ((state_bs[4] >> 3) & 0x10);
  2147.     pt[ 64 ] = (pt [64] & 0xef) | ((state_bs[4] >> 4) & 0x10);
  2148.     pt[ 72 ] = (pt [72] & 0xef) | ((state_bs[4] >> 5) & 0x10);
  2149.     pt[ 80 ] = (pt [80] & 0xef) | ((state_bs[4] >> 6) & 0x10);
  2150.     pt[ 88 ] = (pt [88] & 0xef) | ((state_bs[4] >> 7) & 0x10);
  2151.     pt[ 96 ] = (pt [96] & 0xef) | ((state_bs[4] >> 8) & 0x10);
  2152.     pt[ 104 ] = (pt [104] & 0xef) | ((state_bs[4] >> 9) & 0x10);
  2153.     pt[ 112 ] = (pt [112] & 0xef) | ((state_bs[4] >> 10) & 0x10);
  2154.     pt[ 120 ] = (pt [120] & 0xef) | ((state_bs[4] >> 11) & 0x10);
  2155.     pt[ 0 ] = (pt [0] & 0xdf) | ((state_bs[5] & 0x01) << 5);
  2156.     pt[ 8 ] = (pt [8] & 0xdf) | ((state_bs[5] & 0x02) << 4);
  2157.     pt[ 16 ] = (pt [16] & 0xdf) | ((state_bs[5] & 0x04) << 3);
  2158.     pt[ 24 ] = (pt [24] & 0xdf) | ((state_bs[5] & 0x08) << 2);
  2159.     pt[ 32 ] = (pt [32] & 0xdf) | ((state_bs[5] & 0x10) << 1);
  2160.     pt[ 40 ] = (pt [40] & 0xdf) | ((state_bs[5] >> 0) & 0x20);
  2161.     pt[ 48 ] = (pt [48] & 0xdf) | ((state_bs[5] >> 1) & 0x20);
  2162.     pt[ 56 ] = (pt [56] & 0xdf) | ((state_bs[5] >> 2) & 0x20);
  2163.     pt[ 64 ] = (pt [64] & 0xdf) | ((state_bs[5] >> 3) & 0x20);
  2164.     pt[ 72 ] = (pt [72] & 0xdf) | ((state_bs[5] >> 4) & 0x20);
  2165.     pt[ 80 ] = (pt [80] & 0xdf) | ((state_bs[5] >> 5) & 0x20);
  2166.     pt[ 88 ] = (pt [88] & 0xdf) | ((state_bs[5] >> 6) & 0x20);
  2167.     pt[ 96 ] = (pt [96] & 0xdf) | ((state_bs[5] >> 7) & 0x20);
  2168.     pt[ 104 ] = (pt [104] & 0xdf) | ((state_bs[5] >> 8) & 0x20);
  2169.     pt[ 112 ] = (pt [112] & 0xdf) | ((state_bs[5] >> 9) & 0x20);
  2170.     pt[ 120 ] = (pt [120] & 0xdf) | ((state_bs[5] >> 10) & 0x20);
  2171.     pt[ 0 ] = (pt [0] & 0xbf) | ((state_bs[6] & 0x01) << 6);
  2172.     pt[ 8 ] = (pt [8] & 0xbf) | ((state_bs[6] & 0x02) << 5);
  2173.     pt[ 16 ] = (pt [16] & 0xbf) | ((state_bs[6] & 0x04) << 4);
  2174.     pt[ 24 ] = (pt [24] & 0xbf) | ((state_bs[6] & 0x08) << 3);
  2175.     pt[ 32 ] = (pt [32] & 0xbf) | ((state_bs[6] & 0x10) << 2);
  2176.     pt[ 40 ] = (pt [40] & 0xbf) | ((state_bs[6] & 0x20) << 1);
  2177.     pt[ 48 ] = (pt [48] & 0xbf) | ((state_bs[6] >> 0) & 0x40);
  2178.     pt[ 56 ] = (pt [56] & 0xbf) | ((state_bs[6] >> 1) & 0x40);
  2179.     pt[ 64 ] = (pt [64] & 0xbf) | ((state_bs[6] >> 2) & 0x40);
  2180.     pt[ 72 ] = (pt [72] & 0xbf) | ((state_bs[6] >> 3) & 0x40);
  2181.     pt[ 80 ] = (pt [80] & 0xbf) | ((state_bs[6] >> 4) & 0x40);
  2182.     pt[ 88 ] = (pt [88] & 0xbf) | ((state_bs[6] >> 5) & 0x40);
  2183.     pt[ 96 ] = (pt [96] & 0xbf) | ((state_bs[6] >> 6) & 0x40);
  2184.     pt[ 104 ] = (pt [104] & 0xbf) | ((state_bs[6] >> 7) & 0x40);
  2185.     pt[ 112 ] = (pt [112] & 0xbf) | ((state_bs[6] >> 8) & 0x40);
  2186.     pt[ 120 ] = (pt [120] & 0xbf) | ((state_bs[6] >> 9) & 0x40);
  2187.     pt[ 0 ] = (pt [0] & 0x7f) | ((state_bs[7] & 0x01) << 7);
  2188.     pt[ 8 ] = (pt [8] & 0x7f) | ((state_bs[7] & 0x02) << 6);
  2189.     pt[ 16 ] = (pt [16] & 0x7f) | ((state_bs[7] & 0x04) << 5);
  2190.     pt[ 24 ] = (pt [24] & 0x7f) | ((state_bs[7] & 0x08) << 4);
  2191.     pt[ 32 ] = (pt [32] & 0x7f) | ((state_bs[7] & 0x10) << 3);
  2192.     pt[ 40 ] = (pt [40] & 0x7f) | ((state_bs[7] & 0x20) << 2);
  2193.     pt[ 48 ] = (pt [48] & 0x7f) | ((state_bs[7] & 0x40) << 1);
  2194.     pt[ 56 ] = (pt [56] & 0x7f) | ((state_bs[7] >> 0) & 0x80);
  2195.     pt[ 64 ] = (pt [64] & 0x7f) | ((state_bs[7] >> 1) & 0x80);
  2196.     pt[ 72 ] = (pt [72] & 0x7f) | ((state_bs[7] >> 2) & 0x80);
  2197.     pt[ 80 ] = (pt [80] & 0x7f) | ((state_bs[7] >> 3) & 0x80);
  2198.     pt[ 88 ] = (pt [88] & 0x7f) | ((state_bs[7] >> 4) & 0x80);
  2199.     pt[ 96 ] = (pt [96] & 0x7f) | ((state_bs[7] >> 5) & 0x80);
  2200.     pt[ 104 ] = (pt [104] & 0x7f) | ((state_bs[7] >> 6) & 0x80);
  2201.     pt[ 112 ] = (pt [112] & 0x7f) | ((state_bs[7] >> 7) & 0x80);
  2202.     pt[ 120 ] = (pt [120] & 0x7f) | ((state_bs[7] >> 8) & 0x80);
  2203.     pt[ 1 ] = (pt [1] & 0xfe) | ((state_bs[8] >> 0) & 0x01);
  2204.     pt[ 9 ] = (pt [9] & 0xfe) | ((state_bs[8] >> 1) & 0x01);
  2205.     pt[ 17 ] = (pt [17] & 0xfe) | ((state_bs[8] >> 2) & 0x01);
  2206.     pt[ 25 ] = (pt [25] & 0xfe) | ((state_bs[8] >> 3) & 0x01);
  2207.     pt[ 33 ] = (pt [33] & 0xfe) | ((state_bs[8] >> 4) & 0x01);
  2208.     pt[ 41 ] = (pt [41] & 0xfe) | ((state_bs[8] >> 5) & 0x01);
  2209.     pt[ 49 ] = (pt [49] & 0xfe) | ((state_bs[8] >> 6) & 0x01);
  2210.     pt[ 57 ] = (pt [57] & 0xfe) | ((state_bs[8] >> 7) & 0x01);
  2211.     pt[ 65 ] = (pt [65] & 0xfe) | ((state_bs[8] >> 8) & 0x01);
  2212.     pt[ 73 ] = (pt [73] & 0xfe) | ((state_bs[8] >> 9) & 0x01);
  2213.     pt[ 81 ] = (pt [81] & 0xfe) | ((state_bs[8] >> 10) & 0x01);
  2214.     pt[ 89 ] = (pt [89] & 0xfe) | ((state_bs[8] >> 11) & 0x01);
  2215.     pt[ 97 ] = (pt [97] & 0xfe) | ((state_bs[8] >> 12) & 0x01);
  2216.     pt[ 105 ] = (pt [105] & 0xfe) | ((state_bs[8] >> 13) & 0x01);
  2217.     pt[ 113 ] = (pt [113] & 0xfe) | ((state_bs[8] >> 14) & 0x01);
  2218.     pt[ 121 ] = (pt [121] & 0xfe) | ((state_bs[8] >> 15) & 0x01);
  2219.     pt[ 1 ] = (pt [1] & 0xfd) | ((state_bs[9] & 0x01) << 1);
  2220.     pt[ 9 ] = (pt [9] & 0xfd) | ((state_bs[9] >> 0) & 0x02);
  2221.     pt[ 17 ] = (pt [17] & 0xfd) | ((state_bs[9] >> 1) & 0x02);
  2222.     pt[ 25 ] = (pt [25] & 0xfd) | ((state_bs[9] >> 2) & 0x02);
  2223.     pt[ 33 ] = (pt [33] & 0xfd) | ((state_bs[9] >> 3) & 0x02);
  2224.     pt[ 41 ] = (pt [41] & 0xfd) | ((state_bs[9] >> 4) & 0x02);
  2225.     pt[ 49 ] = (pt [49] & 0xfd) | ((state_bs[9] >> 5) & 0x02);
  2226.     pt[ 57 ] = (pt [57] & 0xfd) | ((state_bs[9] >> 6) & 0x02);
  2227.     pt[ 65 ] = (pt [65] & 0xfd) | ((state_bs[9] >> 7) & 0x02);
  2228.     pt[ 73 ] = (pt [73] & 0xfd) | ((state_bs[9] >> 8) & 0x02);
  2229.     pt[ 81 ] = (pt [81] & 0xfd) | ((state_bs[9] >> 9) & 0x02);
  2230.     pt[ 89 ] = (pt [89] & 0xfd) | ((state_bs[9] >> 10) & 0x02);
  2231.     pt[ 97 ] = (pt [97] & 0xfd) | ((state_bs[9] >> 11) & 0x02);
  2232.     pt[ 105 ] = (pt [105] & 0xfd) | ((state_bs[9] >> 12) & 0x02);
  2233.     pt[ 113 ] = (pt [113] & 0xfd) | ((state_bs[9] >> 13) & 0x02);
  2234.     pt[ 121 ] = (pt [121] & 0xfd) | ((state_bs[9] >> 14) & 0x02);
  2235.     pt[ 1 ] = (pt [1] & 0xfb) | ((state_bs[10] & 0x01) << 2);
  2236.     pt[ 9 ] = (pt [9] & 0xfb) | ((state_bs[10] & 0x02) << 1);
  2237.     pt[ 17 ] = (pt [17] & 0xfb) | ((state_bs[10] >> 0) & 0x04);
  2238.     pt[ 25 ] = (pt [25] & 0xfb) | ((state_bs[10] >> 1) & 0x04);
  2239.     pt[ 33 ] = (pt [33] & 0xfb) | ((state_bs[10] >> 2) & 0x04);
  2240.     pt[ 41 ] = (pt [41] & 0xfb) | ((state_bs[10] >> 3) & 0x04);
  2241.     pt[ 49 ] = (pt [49] & 0xfb) | ((state_bs[10] >> 4) & 0x04);
  2242.     pt[ 57 ] = (pt [57] & 0xfb) | ((state_bs[10] >> 5) & 0x04);
  2243.     pt[ 65 ] = (pt [65] & 0xfb) | ((state_bs[10] >> 6) & 0x04);
  2244.     pt[ 73 ] = (pt [73] & 0xfb) | ((state_bs[10] >> 7) & 0x04);
  2245.     pt[ 81 ] = (pt [81] & 0xfb) | ((state_bs[10] >> 8) & 0x04);
  2246.     pt[ 89 ] = (pt [89] & 0xfb) | ((state_bs[10] >> 9) & 0x04);
  2247.     pt[ 97 ] = (pt [97] & 0xfb) | ((state_bs[10] >> 10) & 0x04);
  2248.     pt[ 105 ] = (pt [105] & 0xfb) | ((state_bs[10] >> 11) & 0x04);
  2249.     pt[ 113 ] = (pt [113] & 0xfb) | ((state_bs[10] >> 12) & 0x04);
  2250.     pt[ 121 ] = (pt [121] & 0xfb) | ((state_bs[10] >> 13) & 0x04);
  2251.     pt[ 1 ] = (pt [1] & 0xf7) | ((state_bs[11] & 0x01) << 3);
  2252.     pt[ 9 ] = (pt [9] & 0xf7) | ((state_bs[11] & 0x02) << 2);
  2253.     pt[ 17 ] = (pt [17] & 0xf7) | ((state_bs[11] & 0x04) << 1);
  2254.     pt[ 25 ] = (pt [25] & 0xf7) | ((state_bs[11] >> 0) & 0x08);
  2255.     pt[ 33 ] = (pt [33] & 0xf7) | ((state_bs[11] >> 1) & 0x08);
  2256.     pt[ 41 ] = (pt [41] & 0xf7) | ((state_bs[11] >> 2) & 0x08);
  2257.     pt[ 49 ] = (pt [49] & 0xf7) | ((state_bs[11] >> 3) & 0x08);
  2258.     pt[ 57 ] = (pt [57] & 0xf7) | ((state_bs[11] >> 4) & 0x08);
  2259.     pt[ 65 ] = (pt [65] & 0xf7) | ((state_bs[11] >> 5) & 0x08);
  2260.     pt[ 73 ] = (pt [73] & 0xf7) | ((state_bs[11] >> 6) & 0x08);
  2261.     pt[ 81 ] = (pt [81] & 0xf7) | ((state_bs[11] >> 7) & 0x08);
  2262.     pt[ 89 ] = (pt [89] & 0xf7) | ((state_bs[11] >> 8) & 0x08);
  2263.     pt[ 97 ] = (pt [97] & 0xf7) | ((state_bs[11] >> 9) & 0x08);
  2264.     pt[ 105 ] = (pt [105] & 0xf7) | ((state_bs[11] >> 10) & 0x08);
  2265.     pt[ 113 ] = (pt [113] & 0xf7) | ((state_bs[11] >> 11) & 0x08);
  2266.     pt[ 121 ] = (pt [121] & 0xf7) | ((state_bs[11] >> 12) & 0x08);
  2267.     pt[ 1 ] = (pt [1] & 0xef) | ((state_bs[12] & 0x01) << 4);
  2268.     pt[ 9 ] = (pt [9] & 0xef) | ((state_bs[12] & 0x02) << 3);
  2269.     pt[ 17 ] = (pt [17] & 0xef) | ((state_bs[12] & 0x04) << 2);
  2270.     pt[ 25 ] = (pt [25] & 0xef) | ((state_bs[12] & 0x08) << 1);
  2271.     pt[ 33 ] = (pt [33] & 0xef) | ((state_bs[12] >> 0) & 0x10);
  2272.     pt[ 41 ] = (pt [41] & 0xef) | ((state_bs[12] >> 1) & 0x10);
  2273.     pt[ 49 ] = (pt [49] & 0xef) | ((state_bs[12] >> 2) & 0x10);
  2274.     pt[ 57 ] = (pt [57] & 0xef) | ((state_bs[12] >> 3) & 0x10);
  2275.     pt[ 65 ] = (pt [65] & 0xef) | ((state_bs[12] >> 4) & 0x10);
  2276.     pt[ 73 ] = (pt [73] & 0xef) | ((state_bs[12] >> 5) & 0x10);
  2277.     pt[ 81 ] = (pt [81] & 0xef) | ((state_bs[12] >> 6) & 0x10);
  2278.     pt[ 89 ] = (pt [89] & 0xef) | ((state_bs[12] >> 7) & 0x10);
  2279.     pt[ 97 ] = (pt [97] & 0xef) | ((state_bs[12] >> 8) & 0x10);
  2280.     pt[ 105 ] = (pt [105] & 0xef) | ((state_bs[12] >> 9) & 0x10);
  2281.     pt[ 113 ] = (pt [113] & 0xef) | ((state_bs[12] >> 10) & 0x10);
  2282.     pt[ 121 ] = (pt [121] & 0xef) | ((state_bs[12] >> 11) & 0x10);
  2283.     pt[ 1 ] = (pt [1] & 0xdf) | ((state_bs[13] & 0x01) << 5);
  2284.     pt[ 9 ] = (pt [9] & 0xdf) | ((state_bs[13] & 0x02) << 4);
  2285.     pt[ 17 ] = (pt [17] & 0xdf) | ((state_bs[13] & 0x04) << 3);
  2286.     pt[ 25 ] = (pt [25] & 0xdf) | ((state_bs[13] & 0x08) << 2);
  2287.     pt[ 33 ] = (pt [33] & 0xdf) | ((state_bs[13] & 0x10) << 1);
  2288.     pt[ 41 ] = (pt [41] & 0xdf) | ((state_bs[13] >> 0) & 0x20);
  2289.     pt[ 49 ] = (pt [49] & 0xdf) | ((state_bs[13] >> 1) & 0x20);
  2290.     pt[ 57 ] = (pt [57] & 0xdf) | ((state_bs[13] >> 2) & 0x20);
  2291.     pt[ 65 ] = (pt [65] & 0xdf) | ((state_bs[13] >> 3) & 0x20);
  2292.     pt[ 73 ] = (pt [73] & 0xdf) | ((state_bs[13] >> 4) & 0x20);
  2293.     pt[ 81 ] = (pt [81] & 0xdf) | ((state_bs[13] >> 5) & 0x20);
  2294.     pt[ 89 ] = (pt [89] & 0xdf) | ((state_bs[13] >> 6) & 0x20);
  2295.     pt[ 97 ] = (pt [97] & 0xdf) | ((state_bs[13] >> 7) & 0x20);
  2296.     pt[ 105 ] = (pt [105] & 0xdf) | ((state_bs[13] >> 8) & 0x20);
  2297.     pt[ 113 ] = (pt [113] & 0xdf) | ((state_bs[13] >> 9) & 0x20);
  2298.     pt[ 121 ] = (pt [121] & 0xdf) | ((state_bs[13] >> 10) & 0x20);
  2299.     pt[ 1 ] = (pt [1] & 0xbf) | ((state_bs[14] & 0x01) << 6);
  2300.     pt[ 9 ] = (pt [9] & 0xbf) | ((state_bs[14] & 0x02) << 5);
  2301.     pt[ 17 ] = (pt [17] & 0xbf) | ((state_bs[14] & 0x04) << 4);
  2302.     pt[ 25 ] = (pt [25] & 0xbf) | ((state_bs[14] & 0x08) << 3);
  2303.     pt[ 33 ] = (pt [33] & 0xbf) | ((state_bs[14] & 0x10) << 2);
  2304.     pt[ 41 ] = (pt [41] & 0xbf) | ((state_bs[14] & 0x20) << 1);
  2305.     pt[ 49 ] = (pt [49] & 0xbf) | ((state_bs[14] >> 0) & 0x40);
  2306.     pt[ 57 ] = (pt [57] & 0xbf) | ((state_bs[14] >> 1) & 0x40);
  2307.     pt[ 65 ] = (pt [65] & 0xbf) | ((state_bs[14] >> 2) & 0x40);
  2308.     pt[ 73 ] = (pt [73] & 0xbf) | ((state_bs[14] >> 3) & 0x40);
  2309.     pt[ 81 ] = (pt [81] & 0xbf) | ((state_bs[14] >> 4) & 0x40);
  2310.     pt[ 89 ] = (pt [89] & 0xbf) | ((state_bs[14] >> 5) & 0x40);
  2311.     pt[ 97 ] = (pt [97] & 0xbf) | ((state_bs[14] >> 6) & 0x40);
  2312.     pt[ 105 ] = (pt [105] & 0xbf) | ((state_bs[14] >> 7) & 0x40);
  2313.     pt[ 113 ] = (pt [113] & 0xbf) | ((state_bs[14] >> 8) & 0x40);
  2314.     pt[ 121 ] = (pt [121] & 0xbf) | ((state_bs[14] >> 9) & 0x40);
  2315.     pt[ 1 ] = (pt [1] & 0x7f) | ((state_bs[15] & 0x01) << 7);
  2316.     pt[ 9 ] = (pt [9] & 0x7f) | ((state_bs[15] & 0x02) << 6);
  2317.     pt[ 17 ] = (pt [17] & 0x7f) | ((state_bs[15] & 0x04) << 5);
  2318.     pt[ 25 ] = (pt [25] & 0x7f) | ((state_bs[15] & 0x08) << 4);
  2319.     pt[ 33 ] = (pt [33] & 0x7f) | ((state_bs[15] & 0x10) << 3);
  2320.     pt[ 41 ] = (pt [41] & 0x7f) | ((state_bs[15] & 0x20) << 2);
  2321.     pt[ 49 ] = (pt [49] & 0x7f) | ((state_bs[15] & 0x40) << 1);
  2322.     pt[ 57 ] = (pt [57] & 0x7f) | ((state_bs[15] >> 0) & 0x80);
  2323.     pt[ 65 ] = (pt [65] & 0x7f) | ((state_bs[15] >> 1) & 0x80);
  2324.     pt[ 73 ] = (pt [73] & 0x7f) | ((state_bs[15] >> 2) & 0x80);
  2325.     pt[ 81 ] = (pt [81] & 0x7f) | ((state_bs[15] >> 3) & 0x80);
  2326.     pt[ 89 ] = (pt [89] & 0x7f) | ((state_bs[15] >> 4) & 0x80);
  2327.     pt[ 97 ] = (pt [97] & 0x7f) | ((state_bs[15] >> 5) & 0x80);
  2328.     pt[ 105 ] = (pt [105] & 0x7f) | ((state_bs[15] >> 6) & 0x80);
  2329.     pt[ 113 ] = (pt [113] & 0x7f) | ((state_bs[15] >> 7) & 0x80);
  2330.     pt[ 121 ] = (pt [121] & 0x7f) | ((state_bs[15] >> 8) & 0x80);
  2331.     pt[ 2 ] = (pt [2] & 0xfe) | ((state_bs[16] >> 0) & 0x01);
  2332.     pt[ 10 ] = (pt [10] & 0xfe) | ((state_bs[16] >> 1) & 0x01);
  2333.     pt[ 18 ] = (pt [18] & 0xfe) | ((state_bs[16] >> 2) & 0x01);
  2334.     pt[ 26 ] = (pt [26] & 0xfe) | ((state_bs[16] >> 3) & 0x01);
  2335.     pt[ 34 ] = (pt [34] & 0xfe) | ((state_bs[16] >> 4) & 0x01);
  2336.     pt[ 42 ] = (pt [42] & 0xfe) | ((state_bs[16] >> 5) & 0x01);
  2337.     pt[ 50 ] = (pt [50] & 0xfe) | ((state_bs[16] >> 6) & 0x01);
  2338.     pt[ 58 ] = (pt [58] & 0xfe) | ((state_bs[16] >> 7) & 0x01);
  2339.     pt[ 66 ] = (pt [66] & 0xfe) | ((state_bs[16] >> 8) & 0x01);
  2340.     pt[ 74 ] = (pt [74] & 0xfe) | ((state_bs[16] >> 9) & 0x01);
  2341.     pt[ 82 ] = (pt [82] & 0xfe) | ((state_bs[16] >> 10) & 0x01);
  2342.     pt[ 90 ] = (pt [90] & 0xfe) | ((state_bs[16] >> 11) & 0x01);
  2343.     pt[ 98 ] = (pt [98] & 0xfe) | ((state_bs[16] >> 12) & 0x01);
  2344.     pt[ 106 ] = (pt [106] & 0xfe) | ((state_bs[16] >> 13) & 0x01);
  2345.     pt[ 114 ] = (pt [114] & 0xfe) | ((state_bs[16] >> 14) & 0x01);
  2346.     pt[ 122 ] = (pt [122] & 0xfe) | ((state_bs[16] >> 15) & 0x01);
  2347.     pt[ 2 ] = (pt [2] & 0xfd) | ((state_bs[17] & 0x01) << 1);
  2348.     pt[ 10 ] = (pt [10] & 0xfd) | ((state_bs[17] >> 0) & 0x02);
  2349.     pt[ 18 ] = (pt [18] & 0xfd) | ((state_bs[17] >> 1) & 0x02);
  2350.     pt[ 26 ] = (pt [26] & 0xfd) | ((state_bs[17] >> 2) & 0x02);
  2351.     pt[ 34 ] = (pt [34] & 0xfd) | ((state_bs[17] >> 3) & 0x02);
  2352.     pt[ 42 ] = (pt [42] & 0xfd) | ((state_bs[17] >> 4) & 0x02);
  2353.     pt[ 50 ] = (pt [50] & 0xfd) | ((state_bs[17] >> 5) & 0x02);
  2354.     pt[ 58 ] = (pt [58] & 0xfd) | ((state_bs[17] >> 6) & 0x02);
  2355.     pt[ 66 ] = (pt [66] & 0xfd) | ((state_bs[17] >> 7) & 0x02);
  2356.     pt[ 74 ] = (pt [74] & 0xfd) | ((state_bs[17] >> 8) & 0x02);
  2357.     pt[ 82 ] = (pt [82] & 0xfd) | ((state_bs[17] >> 9) & 0x02);
  2358.     pt[ 90 ] = (pt [90] & 0xfd) | ((state_bs[17] >> 10) & 0x02);
  2359.     pt[ 98 ] = (pt [98] & 0xfd) | ((state_bs[17] >> 11) & 0x02);
  2360.     pt[ 106 ] = (pt [106] & 0xfd) | ((state_bs[17] >> 12) & 0x02);
  2361.     pt[ 114 ] = (pt [114] & 0xfd) | ((state_bs[17] >> 13) & 0x02);
  2362.     pt[ 122 ] = (pt [122] & 0xfd) | ((state_bs[17] >> 14) & 0x02);
  2363.     pt[ 2 ] = (pt [2] & 0xfb) | ((state_bs[18] & 0x01) << 2);
  2364.     pt[ 10 ] = (pt [10] & 0xfb) | ((state_bs[18] & 0x02) << 1);
  2365.     pt[ 18 ] = (pt [18] & 0xfb) | ((state_bs[18] >> 0) & 0x04);
  2366.     pt[ 26 ] = (pt [26] & 0xfb) | ((state_bs[18] >> 1) & 0x04);
  2367.     pt[ 34 ] = (pt [34] & 0xfb) | ((state_bs[18] >> 2) & 0x04);
  2368.     pt[ 42 ] = (pt [42] & 0xfb) | ((state_bs[18] >> 3) & 0x04);
  2369.     pt[ 50 ] = (pt [50] & 0xfb) | ((state_bs[18] >> 4) & 0x04);
  2370.     pt[ 58 ] = (pt [58] & 0xfb) | ((state_bs[18] >> 5) & 0x04);
  2371.     pt[ 66 ] = (pt [66] & 0xfb) | ((state_bs[18] >> 6) & 0x04);
  2372.     pt[ 74 ] = (pt [74] & 0xfb) | ((state_bs[18] >> 7) & 0x04);
  2373.     pt[ 82 ] = (pt [82] & 0xfb) | ((state_bs[18] >> 8) & 0x04);
  2374.     pt[ 90 ] = (pt [90] & 0xfb) | ((state_bs[18] >> 9) & 0x04);
  2375.     pt[ 98 ] = (pt [98] & 0xfb) | ((state_bs[18] >> 10) & 0x04);
  2376.     pt[ 106 ] = (pt [106] & 0xfb) | ((state_bs[18] >> 11) & 0x04);
  2377.     pt[ 114 ] = (pt [114] & 0xfb) | ((state_bs[18] >> 12) & 0x04);
  2378.     pt[ 122 ] = (pt [122] & 0xfb) | ((state_bs[18] >> 13) & 0x04);
  2379.     pt[ 2 ] = (pt [2] & 0xf7) | ((state_bs[19] & 0x01) << 3);
  2380.     pt[ 10 ] = (pt [10] & 0xf7) | ((state_bs[19] & 0x02) << 2);
  2381.     pt[ 18 ] = (pt [18] & 0xf7) | ((state_bs[19] & 0x04) << 1);
  2382.     pt[ 26 ] = (pt [26] & 0xf7) | ((state_bs[19] >> 0) & 0x08);
  2383.     pt[ 34 ] = (pt [34] & 0xf7) | ((state_bs[19] >> 1) & 0x08);
  2384.     pt[ 42 ] = (pt [42] & 0xf7) | ((state_bs[19] >> 2) & 0x08);
  2385.     pt[ 50 ] = (pt [50] & 0xf7) | ((state_bs[19] >> 3) & 0x08);
  2386.     pt[ 58 ] = (pt [58] & 0xf7) | ((state_bs[19] >> 4) & 0x08);
  2387.     pt[ 66 ] = (pt [66] & 0xf7) | ((state_bs[19] >> 5) & 0x08);
  2388.     pt[ 74 ] = (pt [74] & 0xf7) | ((state_bs[19] >> 6) & 0x08);
  2389.     pt[ 82 ] = (pt [82] & 0xf7) | ((state_bs[19] >> 7) & 0x08);
  2390.     pt[ 90 ] = (pt [90] & 0xf7) | ((state_bs[19] >> 8) & 0x08);
  2391.     pt[ 98 ] = (pt [98] & 0xf7) | ((state_bs[19] >> 9) & 0x08);
  2392.     pt[ 106 ] = (pt [106] & 0xf7) | ((state_bs[19] >> 10) & 0x08);
  2393.     pt[ 114 ] = (pt [114] & 0xf7) | ((state_bs[19] >> 11) & 0x08);
  2394.     pt[ 122 ] = (pt [122] & 0xf7) | ((state_bs[19] >> 12) & 0x08);
  2395.     pt[ 2 ] = (pt [2] & 0xef) | ((state_bs[20] & 0x01) << 4);
  2396.     pt[ 10 ] = (pt [10] & 0xef) | ((state_bs[20] & 0x02) << 3);
  2397.     pt[ 18 ] = (pt [18] & 0xef) | ((state_bs[20] & 0x04) << 2);
  2398.     pt[ 26 ] = (pt [26] & 0xef) | ((state_bs[20] & 0x08) << 1);
  2399.     pt[ 34 ] = (pt [34] & 0xef) | ((state_bs[20] >> 0) & 0x10);
  2400.     pt[ 42 ] = (pt [42] & 0xef) | ((state_bs[20] >> 1) & 0x10);
  2401.     pt[ 50 ] = (pt [50] & 0xef) | ((state_bs[20] >> 2) & 0x10);
  2402.     pt[ 58 ] = (pt [58] & 0xef) | ((state_bs[20] >> 3) & 0x10);
  2403.     pt[ 66 ] = (pt [66] & 0xef) | ((state_bs[20] >> 4) & 0x10);
  2404.     pt[ 74 ] = (pt [74] & 0xef) | ((state_bs[20] >> 5) & 0x10);
  2405.     pt[ 82 ] = (pt [82] & 0xef) | ((state_bs[20] >> 6) & 0x10);
  2406.     pt[ 90 ] = (pt [90] & 0xef) | ((state_bs[20] >> 7) & 0x10);
  2407.     pt[ 98 ] = (pt [98] & 0xef) | ((state_bs[20] >> 8) & 0x10);
  2408.     pt[ 106 ] = (pt [106] & 0xef) | ((state_bs[20] >> 9) & 0x10);
  2409.     pt[ 114 ] = (pt [114] & 0xef) | ((state_bs[20] >> 10) & 0x10);
  2410.     pt[ 122 ] = (pt [122] & 0xef) | ((state_bs[20] >> 11) & 0x10);
  2411.     pt[ 2 ] = (pt [2] & 0xdf) | ((state_bs[21] & 0x01) << 5);
  2412.     pt[ 10 ] = (pt [10] & 0xdf) | ((state_bs[21] & 0x02) << 4);
  2413.     pt[ 18 ] = (pt [18] & 0xdf) | ((state_bs[21] & 0x04) << 3);
  2414.     pt[ 26 ] = (pt [26] & 0xdf) | ((state_bs[21] & 0x08) << 2);
  2415.     pt[ 34 ] = (pt [34] & 0xdf) | ((state_bs[21] & 0x10) << 1);
  2416.     pt[ 42 ] = (pt [42] & 0xdf) | ((state_bs[21] >> 0) & 0x20);
  2417.     pt[ 50 ] = (pt [50] & 0xdf) | ((state_bs[21] >> 1) & 0x20);
  2418.     pt[ 58 ] = (pt [58] & 0xdf) | ((state_bs[21] >> 2) & 0x20);
  2419.     pt[ 66 ] = (pt [66] & 0xdf) | ((state_bs[21] >> 3) & 0x20);
  2420.     pt[ 74 ] = (pt [74] & 0xdf) | ((state_bs[21] >> 4) & 0x20);
  2421.     pt[ 82 ] = (pt [82] & 0xdf) | ((state_bs[21] >> 5) & 0x20);
  2422.     pt[ 90 ] = (pt [90] & 0xdf) | ((state_bs[21] >> 6) & 0x20);
  2423.     pt[ 98 ] = (pt [98] & 0xdf) | ((state_bs[21] >> 7) & 0x20);
  2424.     pt[ 106 ] = (pt [106] & 0xdf) | ((state_bs[21] >> 8) & 0x20);
  2425.     pt[ 114 ] = (pt [114] & 0xdf) | ((state_bs[21] >> 9) & 0x20);
  2426.     pt[ 122 ] = (pt [122] & 0xdf) | ((state_bs[21] >> 10) & 0x20);
  2427.     pt[ 2 ] = (pt [2] & 0xbf) | ((state_bs[22] & 0x01) << 6);
  2428.     pt[ 10 ] = (pt [10] & 0xbf) | ((state_bs[22] & 0x02) << 5);
  2429.     pt[ 18 ] = (pt [18] & 0xbf) | ((state_bs[22] & 0x04) << 4);
  2430.     pt[ 26 ] = (pt [26] & 0xbf) | ((state_bs[22] & 0x08) << 3);
  2431.     pt[ 34 ] = (pt [34] & 0xbf) | ((state_bs[22] & 0x10) << 2);
  2432.     pt[ 42 ] = (pt [42] & 0xbf) | ((state_bs[22] & 0x20) << 1);
  2433.     pt[ 50 ] = (pt [50] & 0xbf) | ((state_bs[22] >> 0) & 0x40);
  2434.     pt[ 58 ] = (pt [58] & 0xbf) | ((state_bs[22] >> 1) & 0x40);
  2435.     pt[ 66 ] = (pt [66] & 0xbf) | ((state_bs[22] >> 2) & 0x40);
  2436.     pt[ 74 ] = (pt [74] & 0xbf) | ((state_bs[22] >> 3) & 0x40);
  2437.     pt[ 82 ] = (pt [82] & 0xbf) | ((state_bs[22] >> 4) & 0x40);
  2438.     pt[ 90 ] = (pt [90] & 0xbf) | ((state_bs[22] >> 5) & 0x40);
  2439.     pt[ 98 ] = (pt [98] & 0xbf) | ((state_bs[22] >> 6) & 0x40);
  2440.     pt[ 106 ] = (pt [106] & 0xbf) | ((state_bs[22] >> 7) & 0x40);
  2441.     pt[ 114 ] = (pt [114] & 0xbf) | ((state_bs[22] >> 8) & 0x40);
  2442.     pt[ 122 ] = (pt [122] & 0xbf) | ((state_bs[22] >> 9) & 0x40);
  2443.     pt[ 2 ] = (pt [2] & 0x7f) | ((state_bs[23] & 0x01) << 7);
  2444.     pt[ 10 ] = (pt [10] & 0x7f) | ((state_bs[23] & 0x02) << 6);
  2445.     pt[ 18 ] = (pt [18] & 0x7f) | ((state_bs[23] & 0x04) << 5);
  2446.     pt[ 26 ] = (pt [26] & 0x7f) | ((state_bs[23] & 0x08) << 4);
  2447.     pt[ 34 ] = (pt [34] & 0x7f) | ((state_bs[23] & 0x10) << 3);
  2448.     pt[ 42 ] = (pt [42] & 0x7f) | ((state_bs[23] & 0x20) << 2);
  2449.     pt[ 50 ] = (pt [50] & 0x7f) | ((state_bs[23] & 0x40) << 1);
  2450.     pt[ 58 ] = (pt [58] & 0x7f) | ((state_bs[23] >> 0) & 0x80);
  2451.     pt[ 66 ] = (pt [66] & 0x7f) | ((state_bs[23] >> 1) & 0x80);
  2452.     pt[ 74 ] = (pt [74] & 0x7f) | ((state_bs[23] >> 2) & 0x80);
  2453.     pt[ 82 ] = (pt [82] & 0x7f) | ((state_bs[23] >> 3) & 0x80);
  2454.     pt[ 90 ] = (pt [90] & 0x7f) | ((state_bs[23] >> 4) & 0x80);
  2455.     pt[ 98 ] = (pt [98] & 0x7f) | ((state_bs[23] >> 5) & 0x80);
  2456.     pt[ 106 ] = (pt [106] & 0x7f) | ((state_bs[23] >> 6) & 0x80);
  2457.     pt[ 114 ] = (pt [114] & 0x7f) | ((state_bs[23] >> 7) & 0x80);
  2458.     pt[ 122 ] = (pt [122] & 0x7f) | ((state_bs[23] >> 8) & 0x80);
  2459.     pt[ 3 ] = (pt [3] & 0xfe) | ((state_bs[24] >> 0) & 0x01);
  2460.     pt[ 11 ] = (pt [11] & 0xfe) | ((state_bs[24] >> 1) & 0x01);
  2461.     pt[ 19 ] = (pt [19] & 0xfe) | ((state_bs[24] >> 2) & 0x01);
  2462.     pt[ 27 ] = (pt [27] & 0xfe) | ((state_bs[24] >> 3) & 0x01);
  2463.     pt[ 35 ] = (pt [35] & 0xfe) | ((state_bs[24] >> 4) & 0x01);
  2464.     pt[ 43 ] = (pt [43] & 0xfe) | ((state_bs[24] >> 5) & 0x01);
  2465.     pt[ 51 ] = (pt [51] & 0xfe) | ((state_bs[24] >> 6) & 0x01);
  2466.     pt[ 59 ] = (pt [59] & 0xfe) | ((state_bs[24] >> 7) & 0x01);
  2467.     pt[ 67 ] = (pt [67] & 0xfe) | ((state_bs[24] >> 8) & 0x01);
  2468.     pt[ 75 ] = (pt [75] & 0xfe) | ((state_bs[24] >> 9) & 0x01);
  2469.     pt[ 83 ] = (pt [83] & 0xfe) | ((state_bs[24] >> 10) & 0x01);
  2470.     pt[ 91 ] = (pt [91] & 0xfe) | ((state_bs[24] >> 11) & 0x01);
  2471.     pt[ 99 ] = (pt [99] & 0xfe) | ((state_bs[24] >> 12) & 0x01);
  2472.     pt[ 107 ] = (pt [107] & 0xfe) | ((state_bs[24] >> 13) & 0x01);
  2473.     pt[ 115 ] = (pt [115] & 0xfe) | ((state_bs[24] >> 14) & 0x01);
  2474.     pt[ 123 ] = (pt [123] & 0xfe) | ((state_bs[24] >> 15) & 0x01);
  2475.     pt[ 3 ] = (pt [3] & 0xfd) | ((state_bs[25] & 0x01) << 1);
  2476.     pt[ 11 ] = (pt [11] & 0xfd) | ((state_bs[25] >> 0) & 0x02);
  2477.     pt[ 19 ] = (pt [19] & 0xfd) | ((state_bs[25] >> 1) & 0x02);
  2478.     pt[ 27 ] = (pt [27] & 0xfd) | ((state_bs[25] >> 2) & 0x02);
  2479.     pt[ 35 ] = (pt [35] & 0xfd) | ((state_bs[25] >> 3) & 0x02);
  2480.     pt[ 43 ] = (pt [43] & 0xfd) | ((state_bs[25] >> 4) & 0x02);
  2481.     pt[ 51 ] = (pt [51] & 0xfd) | ((state_bs[25] >> 5) & 0x02);
  2482.     pt[ 59 ] = (pt [59] & 0xfd) | ((state_bs[25] >> 6) & 0x02);
  2483.     pt[ 67 ] = (pt [67] & 0xfd) | ((state_bs[25] >> 7) & 0x02);
  2484.     pt[ 75 ] = (pt [75] & 0xfd) | ((state_bs[25] >> 8) & 0x02);
  2485.     pt[ 83 ] = (pt [83] & 0xfd) | ((state_bs[25] >> 9) & 0x02);
  2486.     pt[ 91 ] = (pt [91] & 0xfd) | ((state_bs[25] >> 10) & 0x02);
  2487.     pt[ 99 ] = (pt [99] & 0xfd) | ((state_bs[25] >> 11) & 0x02);
  2488.     pt[ 107 ] = (pt [107] & 0xfd) | ((state_bs[25] >> 12) & 0x02);
  2489.     pt[ 115 ] = (pt [115] & 0xfd) | ((state_bs[25] >> 13) & 0x02);
  2490.     pt[ 123 ] = (pt [123] & 0xfd) | ((state_bs[25] >> 14) & 0x02);
  2491.     pt[ 3 ] = (pt [3] & 0xfb) | ((state_bs[26] & 0x01) << 2);
  2492.     pt[ 11 ] = (pt [11] & 0xfb) | ((state_bs[26] & 0x02) << 1);
  2493.     pt[ 19 ] = (pt [19] & 0xfb) | ((state_bs[26] >> 0) & 0x04);
  2494.     pt[ 27 ] = (pt [27] & 0xfb) | ((state_bs[26] >> 1) & 0x04);
  2495.     pt[ 35 ] = (pt [35] & 0xfb) | ((state_bs[26] >> 2) & 0x04);
  2496.     pt[ 43 ] = (pt [43] & 0xfb) | ((state_bs[26] >> 3) & 0x04);
  2497.     pt[ 51 ] = (pt [51] & 0xfb) | ((state_bs[26] >> 4) & 0x04);
  2498.     pt[ 59 ] = (pt [59] & 0xfb) | ((state_bs[26] >> 5) & 0x04);
  2499.     pt[ 67 ] = (pt [67] & 0xfb) | ((state_bs[26] >> 6) & 0x04);
  2500.     pt[ 75 ] = (pt [75] & 0xfb) | ((state_bs[26] >> 7) & 0x04);
  2501.     pt[ 83 ] = (pt [83] & 0xfb) | ((state_bs[26] >> 8) & 0x04);
  2502.     pt[ 91 ] = (pt [91] & 0xfb) | ((state_bs[26] >> 9) & 0x04);
  2503.     pt[ 99 ] = (pt [99] & 0xfb) | ((state_bs[26] >> 10) & 0x04);
  2504.     pt[ 107 ] = (pt [107] & 0xfb) | ((state_bs[26] >> 11) & 0x04);
  2505.     pt[ 115 ] = (pt [115] & 0xfb) | ((state_bs[26] >> 12) & 0x04);
  2506.     pt[ 123 ] = (pt [123] & 0xfb) | ((state_bs[26] >> 13) & 0x04);
  2507.     pt[ 3 ] = (pt [3] & 0xf7) | ((state_bs[27] & 0x01) << 3);
  2508.     pt[ 11 ] = (pt [11] & 0xf7) | ((state_bs[27] & 0x02) << 2);
  2509.     pt[ 19 ] = (pt [19] & 0xf7) | ((state_bs[27] & 0x04) << 1);
  2510.     pt[ 27 ] = (pt [27] & 0xf7) | ((state_bs[27] >> 0) & 0x08);
  2511.     pt[ 35 ] = (pt [35] & 0xf7) | ((state_bs[27] >> 1) & 0x08);
  2512.     pt[ 43 ] = (pt [43] & 0xf7) | ((state_bs[27] >> 2) & 0x08);
  2513.     pt[ 51 ] = (pt [51] & 0xf7) | ((state_bs[27] >> 3) & 0x08);
  2514.     pt[ 59 ] = (pt [59] & 0xf7) | ((state_bs[27] >> 4) & 0x08);
  2515.     pt[ 67 ] = (pt [67] & 0xf7) | ((state_bs[27] >> 5) & 0x08);
  2516.     pt[ 75 ] = (pt [75] & 0xf7) | ((state_bs[27] >> 6) & 0x08);
  2517.     pt[ 83 ] = (pt [83] & 0xf7) | ((state_bs[27] >> 7) & 0x08);
  2518.     pt[ 91 ] = (pt [91] & 0xf7) | ((state_bs[27] >> 8) & 0x08);
  2519.     pt[ 99 ] = (pt [99] & 0xf7) | ((state_bs[27] >> 9) & 0x08);
  2520.     pt[ 107 ] = (pt [107] & 0xf7) | ((state_bs[27] >> 10) & 0x08);
  2521.     pt[ 115 ] = (pt [115] & 0xf7) | ((state_bs[27] >> 11) & 0x08);
  2522.     pt[ 123 ] = (pt [123] & 0xf7) | ((state_bs[27] >> 12) & 0x08);
  2523.     pt[ 3 ] = (pt [3] & 0xef) | ((state_bs[28] & 0x01) << 4);
  2524.     pt[ 11 ] = (pt [11] & 0xef) | ((state_bs[28] & 0x02) << 3);
  2525.     pt[ 19 ] = (pt [19] & 0xef) | ((state_bs[28] & 0x04) << 2);
  2526.     pt[ 27 ] = (pt [27] & 0xef) | ((state_bs[28] & 0x08) << 1);
  2527.     pt[ 35 ] = (pt [35] & 0xef) | ((state_bs[28] >> 0) & 0x10);
  2528.     pt[ 43 ] = (pt [43] & 0xef) | ((state_bs[28] >> 1) & 0x10);
  2529.     pt[ 51 ] = (pt [51] & 0xef) | ((state_bs[28] >> 2) & 0x10);
  2530.     pt[ 59 ] = (pt [59] & 0xef) | ((state_bs[28] >> 3) & 0x10);
  2531.     pt[ 67 ] = (pt [67] & 0xef) | ((state_bs[28] >> 4) & 0x10);
  2532.     pt[ 75 ] = (pt [75] & 0xef) | ((state_bs[28] >> 5) & 0x10);
  2533.     pt[ 83 ] = (pt [83] & 0xef) | ((state_bs[28] >> 6) & 0x10);
  2534.     pt[ 91 ] = (pt [91] & 0xef) | ((state_bs[28] >> 7) & 0x10);
  2535.     pt[ 99 ] = (pt [99] & 0xef) | ((state_bs[28] >> 8) & 0x10);
  2536.     pt[ 107 ] = (pt [107] & 0xef) | ((state_bs[28] >> 9) & 0x10);
  2537.     pt[ 115 ] = (pt [115] & 0xef) | ((state_bs[28] >> 10) & 0x10);
  2538.     pt[ 123 ] = (pt [123] & 0xef) | ((state_bs[28] >> 11) & 0x10);
  2539.     pt[ 3 ] = (pt [3] & 0xdf) | ((state_bs[29] & 0x01) << 5);
  2540.     pt[ 11 ] = (pt [11] & 0xdf) | ((state_bs[29] & 0x02) << 4);
  2541.     pt[ 19 ] = (pt [19] & 0xdf) | ((state_bs[29] & 0x04) << 3);
  2542.     pt[ 27 ] = (pt [27] & 0xdf) | ((state_bs[29] & 0x08) << 2);
  2543.     pt[ 35 ] = (pt [35] & 0xdf) | ((state_bs[29] & 0x10) << 1);
  2544.     pt[ 43 ] = (pt [43] & 0xdf) | ((state_bs[29] >> 0) & 0x20);
  2545.     pt[ 51 ] = (pt [51] & 0xdf) | ((state_bs[29] >> 1) & 0x20);
  2546.     pt[ 59 ] = (pt [59] & 0xdf) | ((state_bs[29] >> 2) & 0x20);
  2547.     pt[ 67 ] = (pt [67] & 0xdf) | ((state_bs[29] >> 3) & 0x20);
  2548.     pt[ 75 ] = (pt [75] & 0xdf) | ((state_bs[29] >> 4) & 0x20);
  2549.     pt[ 83 ] = (pt [83] & 0xdf) | ((state_bs[29] >> 5) & 0x20);
  2550.     pt[ 91 ] = (pt [91] & 0xdf) | ((state_bs[29] >> 6) & 0x20);
  2551.     pt[ 99 ] = (pt [99] & 0xdf) | ((state_bs[29] >> 7) & 0x20);
  2552.     pt[ 107 ] = (pt [107] & 0xdf) | ((state_bs[29] >> 8) & 0x20);
  2553.     pt[ 115 ] = (pt [115] & 0xdf) | ((state_bs[29] >> 9) & 0x20);
  2554.     pt[ 123 ] = (pt [123] & 0xdf) | ((state_bs[29] >> 10) & 0x20);
  2555.     pt[ 3 ] = (pt [3] & 0xbf) | ((state_bs[30] & 0x01) << 6);
  2556.     pt[ 11 ] = (pt [11] & 0xbf) | ((state_bs[30] & 0x02) << 5);
  2557.     pt[ 19 ] = (pt [19] & 0xbf) | ((state_bs[30] & 0x04) << 4);
  2558.     pt[ 27 ] = (pt [27] & 0xbf) | ((state_bs[30] & 0x08) << 3);
  2559.     pt[ 35 ] = (pt [35] & 0xbf) | ((state_bs[30] & 0x10) << 2);
  2560.     pt[ 43 ] = (pt [43] & 0xbf) | ((state_bs[30] & 0x20) << 1);
  2561.     pt[ 51 ] = (pt [51] & 0xbf) | ((state_bs[30] >> 0) & 0x40);
  2562.     pt[ 59 ] = (pt [59] & 0xbf) | ((state_bs[30] >> 1) & 0x40);
  2563.     pt[ 67 ] = (pt [67] & 0xbf) | ((state_bs[30] >> 2) & 0x40);
  2564.     pt[ 75 ] = (pt [75] & 0xbf) | ((state_bs[30] >> 3) & 0x40);
  2565.     pt[ 83 ] = (pt [83] & 0xbf) | ((state_bs[30] >> 4) & 0x40);
  2566.     pt[ 91 ] = (pt [91] & 0xbf) | ((state_bs[30] >> 5) & 0x40);
  2567.     pt[ 99 ] = (pt [99] & 0xbf) | ((state_bs[30] >> 6) & 0x40);
  2568.     pt[ 107 ] = (pt [107] & 0xbf) | ((state_bs[30] >> 7) & 0x40);
  2569.     pt[ 115 ] = (pt [115] & 0xbf) | ((state_bs[30] >> 8) & 0x40);
  2570.     pt[ 123 ] = (pt [123] & 0xbf) | ((state_bs[30] >> 9) & 0x40);
  2571.     pt[ 3 ] = (pt [3] & 0x7f) | ((state_bs[31] & 0x01) << 7);
  2572.     pt[ 11 ] = (pt [11] & 0x7f) | ((state_bs[31] & 0x02) << 6);
  2573.     pt[ 19 ] = (pt [19] & 0x7f) | ((state_bs[31] & 0x04) << 5);
  2574.     pt[ 27 ] = (pt [27] & 0x7f) | ((state_bs[31] & 0x08) << 4);
  2575.     pt[ 35 ] = (pt [35] & 0x7f) | ((state_bs[31] & 0x10) << 3);
  2576.     pt[ 43 ] = (pt [43] & 0x7f) | ((state_bs[31] & 0x20) << 2);
  2577.     pt[ 51 ] = (pt [51] & 0x7f) | ((state_bs[31] & 0x40) << 1);
  2578.     pt[ 59 ] = (pt [59] & 0x7f) | ((state_bs[31] >> 0) & 0x80);
  2579.     pt[ 67 ] = (pt [67] & 0x7f) | ((state_bs[31] >> 1) & 0x80);
  2580.     pt[ 75 ] = (pt [75] & 0x7f) | ((state_bs[31] >> 2) & 0x80);
  2581.     pt[ 83 ] = (pt [83] & 0x7f) | ((state_bs[31] >> 3) & 0x80);
  2582.     pt[ 91 ] = (pt [91] & 0x7f) | ((state_bs[31] >> 4) & 0x80);
  2583.     pt[ 99 ] = (pt [99] & 0x7f) | ((state_bs[31] >> 5) & 0x80);
  2584.     pt[ 107 ] = (pt [107] & 0x7f) | ((state_bs[31] >> 6) & 0x80);
  2585.     pt[ 115 ] = (pt [115] & 0x7f) | ((state_bs[31] >> 7) & 0x80);
  2586.     pt[ 123 ] = (pt [123] & 0x7f) | ((state_bs[31] >> 8) & 0x80);
  2587.     pt[ 4 ] = (pt [4] & 0xfe) | ((state_bs[32] >> 0) & 0x01);
  2588.     pt[ 12 ] = (pt [12] & 0xfe) | ((state_bs[32] >> 1) & 0x01);
  2589.     pt[ 20 ] = (pt [20] & 0xfe) | ((state_bs[32] >> 2) & 0x01);
  2590.     pt[ 28 ] = (pt [28] & 0xfe) | ((state_bs[32] >> 3) & 0x01);
  2591.     pt[ 36 ] = (pt [36] & 0xfe) | ((state_bs[32] >> 4) & 0x01);
  2592.     pt[ 44 ] = (pt [44] & 0xfe) | ((state_bs[32] >> 5) & 0x01);
  2593.     pt[ 52 ] = (pt [52] & 0xfe) | ((state_bs[32] >> 6) & 0x01);
  2594.     pt[ 60 ] = (pt [60] & 0xfe) | ((state_bs[32] >> 7) & 0x01);
  2595.     pt[ 68 ] = (pt [68] & 0xfe) | ((state_bs[32] >> 8) & 0x01);
  2596.     pt[ 76 ] = (pt [76] & 0xfe) | ((state_bs[32] >> 9) & 0x01);
  2597.     pt[ 84 ] = (pt [84] & 0xfe) | ((state_bs[32] >> 10) & 0x01);
  2598.     pt[ 92 ] = (pt [92] & 0xfe) | ((state_bs[32] >> 11) & 0x01);
  2599.     pt[ 100 ] = (pt [100] & 0xfe) | ((state_bs[32] >> 12) & 0x01);
  2600.     pt[ 108 ] = (pt [108] & 0xfe) | ((state_bs[32] >> 13) & 0x01);
  2601.     pt[ 116 ] = (pt [116] & 0xfe) | ((state_bs[32] >> 14) & 0x01);
  2602.     pt[ 124 ] = (pt [124] & 0xfe) | ((state_bs[32] >> 15) & 0x01);
  2603.     pt[ 4 ] = (pt [4] & 0xfd) | ((state_bs[33] & 0x01) << 1);
  2604.     pt[ 12 ] = (pt [12] & 0xfd) | ((state_bs[33] >> 0) & 0x02);
  2605.     pt[ 20 ] = (pt [20] & 0xfd) | ((state_bs[33] >> 1) & 0x02);
  2606.     pt[ 28 ] = (pt [28] & 0xfd) | ((state_bs[33] >> 2) & 0x02);
  2607.     pt[ 36 ] = (pt [36] & 0xfd) | ((state_bs[33] >> 3) & 0x02);
  2608.     pt[ 44 ] = (pt [44] & 0xfd) | ((state_bs[33] >> 4) & 0x02);
  2609.     pt[ 52 ] = (pt [52] & 0xfd) | ((state_bs[33] >> 5) & 0x02);
  2610.     pt[ 60 ] = (pt [60] & 0xfd) | ((state_bs[33] >> 6) & 0x02);
  2611.     pt[ 68 ] = (pt [68] & 0xfd) | ((state_bs[33] >> 7) & 0x02);
  2612.     pt[ 76 ] = (pt [76] & 0xfd) | ((state_bs[33] >> 8) & 0x02);
  2613.     pt[ 84 ] = (pt [84] & 0xfd) | ((state_bs[33] >> 9) & 0x02);
  2614.     pt[ 92 ] = (pt [92] & 0xfd) | ((state_bs[33] >> 10) & 0x02);
  2615.     pt[ 100 ] = (pt [100] & 0xfd) | ((state_bs[33] >> 11) & 0x02);
  2616.     pt[ 108 ] = (pt [108] & 0xfd) | ((state_bs[33] >> 12) & 0x02);
  2617.     pt[ 116 ] = (pt [116] & 0xfd) | ((state_bs[33] >> 13) & 0x02);
  2618.     pt[ 124 ] = (pt [124] & 0xfd) | ((state_bs[33] >> 14) & 0x02);
  2619.     pt[ 4 ] = (pt [4] & 0xfb) | ((state_bs[34] & 0x01) << 2);
  2620.     pt[ 12 ] = (pt [12] & 0xfb) | ((state_bs[34] & 0x02) << 1);
  2621.     pt[ 20 ] = (pt [20] & 0xfb) | ((state_bs[34] >> 0) & 0x04);
  2622.     pt[ 28 ] = (pt [28] & 0xfb) | ((state_bs[34] >> 1) & 0x04);
  2623.     pt[ 36 ] = (pt [36] & 0xfb) | ((state_bs[34] >> 2) & 0x04);
  2624.     pt[ 44 ] = (pt [44] & 0xfb) | ((state_bs[34] >> 3) & 0x04);
  2625.     pt[ 52 ] = (pt [52] & 0xfb) | ((state_bs[34] >> 4) & 0x04);
  2626.     pt[ 60 ] = (pt [60] & 0xfb) | ((state_bs[34] >> 5) & 0x04);
  2627.     pt[ 68 ] = (pt [68] & 0xfb) | ((state_bs[34] >> 6) & 0x04);
  2628.     pt[ 76 ] = (pt [76] & 0xfb) | ((state_bs[34] >> 7) & 0x04);
  2629.     pt[ 84 ] = (pt [84] & 0xfb) | ((state_bs[34] >> 8) & 0x04);
  2630.     pt[ 92 ] = (pt [92] & 0xfb) | ((state_bs[34] >> 9) & 0x04);
  2631.     pt[ 100 ] = (pt [100] & 0xfb) | ((state_bs[34] >> 10) & 0x04);
  2632.     pt[ 108 ] = (pt [108] & 0xfb) | ((state_bs[34] >> 11) & 0x04);
  2633.     pt[ 116 ] = (pt [116] & 0xfb) | ((state_bs[34] >> 12) & 0x04);
  2634.     pt[ 124 ] = (pt [124] & 0xfb) | ((state_bs[34] >> 13) & 0x04);
  2635.     pt[ 4 ] = (pt [4] & 0xf7) | ((state_bs[35] & 0x01) << 3);
  2636.     pt[ 12 ] = (pt [12] & 0xf7) | ((state_bs[35] & 0x02) << 2);
  2637.     pt[ 20 ] = (pt [20] & 0xf7) | ((state_bs[35] & 0x04) << 1);
  2638.     pt[ 28 ] = (pt [28] & 0xf7) | ((state_bs[35] >> 0) & 0x08);
  2639.     pt[ 36 ] = (pt [36] & 0xf7) | ((state_bs[35] >> 1) & 0x08);
  2640.     pt[ 44 ] = (pt [44] & 0xf7) | ((state_bs[35] >> 2) & 0x08);
  2641.     pt[ 52 ] = (pt [52] & 0xf7) | ((state_bs[35] >> 3) & 0x08);
  2642.     pt[ 60 ] = (pt [60] & 0xf7) | ((state_bs[35] >> 4) & 0x08);
  2643.     pt[ 68 ] = (pt [68] & 0xf7) | ((state_bs[35] >> 5) & 0x08);
  2644.     pt[ 76 ] = (pt [76] & 0xf7) | ((state_bs[35] >> 6) & 0x08);
  2645.     pt[ 84 ] = (pt [84] & 0xf7) | ((state_bs[35] >> 7) & 0x08);
  2646.     pt[ 92 ] = (pt [92] & 0xf7) | ((state_bs[35] >> 8) & 0x08);
  2647.     pt[ 100 ] = (pt [100] & 0xf7) | ((state_bs[35] >> 9) & 0x08);
  2648.     pt[ 108 ] = (pt [108] & 0xf7) | ((state_bs[35] >> 10) & 0x08);
  2649.     pt[ 116 ] = (pt [116] & 0xf7) | ((state_bs[35] >> 11) & 0x08);
  2650.     pt[ 124 ] = (pt [124] & 0xf7) | ((state_bs[35] >> 12) & 0x08);
  2651.     pt[ 4 ] = (pt [4] & 0xef) | ((state_bs[36] & 0x01) << 4);
  2652.     pt[ 12 ] = (pt [12] & 0xef) | ((state_bs[36] & 0x02) << 3);
  2653.     pt[ 20 ] = (pt [20] & 0xef) | ((state_bs[36] & 0x04) << 2);
  2654.     pt[ 28 ] = (pt [28] & 0xef) | ((state_bs[36] & 0x08) << 1);
  2655.     pt[ 36 ] = (pt [36] & 0xef) | ((state_bs[36] >> 0) & 0x10);
  2656.     pt[ 44 ] = (pt [44] & 0xef) | ((state_bs[36] >> 1) & 0x10);
  2657.     pt[ 52 ] = (pt [52] & 0xef) | ((state_bs[36] >> 2) & 0x10);
  2658.     pt[ 60 ] = (pt [60] & 0xef) | ((state_bs[36] >> 3) & 0x10);
  2659.     pt[ 68 ] = (pt [68] & 0xef) | ((state_bs[36] >> 4) & 0x10);
  2660.     pt[ 76 ] = (pt [76] & 0xef) | ((state_bs[36] >> 5) & 0x10);
  2661.     pt[ 84 ] = (pt [84] & 0xef) | ((state_bs[36] >> 6) & 0x10);
  2662.     pt[ 92 ] = (pt [92] & 0xef) | ((state_bs[36] >> 7) & 0x10);
  2663.     pt[ 100 ] = (pt [100] & 0xef) | ((state_bs[36] >> 8) & 0x10);
  2664.     pt[ 108 ] = (pt [108] & 0xef) | ((state_bs[36] >> 9) & 0x10);
  2665.     pt[ 116 ] = (pt [116] & 0xef) | ((state_bs[36] >> 10) & 0x10);
  2666.     pt[ 124 ] = (pt [124] & 0xef) | ((state_bs[36] >> 11) & 0x10);
  2667.     pt[ 4 ] = (pt [4] & 0xdf) | ((state_bs[37] & 0x01) << 5);
  2668.     pt[ 12 ] = (pt [12] & 0xdf) | ((state_bs[37] & 0x02) << 4);
  2669.     pt[ 20 ] = (pt [20] & 0xdf) | ((state_bs[37] & 0x04) << 3);
  2670.     pt[ 28 ] = (pt [28] & 0xdf) | ((state_bs[37] & 0x08) << 2);
  2671.     pt[ 36 ] = (pt [36] & 0xdf) | ((state_bs[37] & 0x10) << 1);
  2672.     pt[ 44 ] = (pt [44] & 0xdf) | ((state_bs[37] >> 0) & 0x20);
  2673.     pt[ 52 ] = (pt [52] & 0xdf) | ((state_bs[37] >> 1) & 0x20);
  2674.     pt[ 60 ] = (pt [60] & 0xdf) | ((state_bs[37] >> 2) & 0x20);
  2675.     pt[ 68 ] = (pt [68] & 0xdf) | ((state_bs[37] >> 3) & 0x20);
  2676.     pt[ 76 ] = (pt [76] & 0xdf) | ((state_bs[37] >> 4) & 0x20);
  2677.     pt[ 84 ] = (pt [84] & 0xdf) | ((state_bs[37] >> 5) & 0x20);
  2678.     pt[ 92 ] = (pt [92] & 0xdf) | ((state_bs[37] >> 6) & 0x20);
  2679.     pt[ 100 ] = (pt [100] & 0xdf) | ((state_bs[37] >> 7) & 0x20);
  2680.     pt[ 108 ] = (pt [108] & 0xdf) | ((state_bs[37] >> 8) & 0x20);
  2681.     pt[ 116 ] = (pt [116] & 0xdf) | ((state_bs[37] >> 9) & 0x20);
  2682.     pt[ 124 ] = (pt [124] & 0xdf) | ((state_bs[37] >> 10) & 0x20);
  2683.     pt[ 4 ] = (pt [4] & 0xbf) | ((state_bs[38] & 0x01) << 6);
  2684.     pt[ 12 ] = (pt [12] & 0xbf) | ((state_bs[38] & 0x02) << 5);
  2685.     pt[ 20 ] = (pt [20] & 0xbf) | ((state_bs[38] & 0x04) << 4);
  2686.     pt[ 28 ] = (pt [28] & 0xbf) | ((state_bs[38] & 0x08) << 3);
  2687.     pt[ 36 ] = (pt [36] & 0xbf) | ((state_bs[38] & 0x10) << 2);
  2688.     pt[ 44 ] = (pt [44] & 0xbf) | ((state_bs[38] & 0x20) << 1);
  2689.     pt[ 52 ] = (pt [52] & 0xbf) | ((state_bs[38] >> 0) & 0x40);
  2690.     pt[ 60 ] = (pt [60] & 0xbf) | ((state_bs[38] >> 1) & 0x40);
  2691.     pt[ 68 ] = (pt [68] & 0xbf) | ((state_bs[38] >> 2) & 0x40);
  2692.     pt[ 76 ] = (pt [76] & 0xbf) | ((state_bs[38] >> 3) & 0x40);
  2693.     pt[ 84 ] = (pt [84] & 0xbf) | ((state_bs[38] >> 4) & 0x40);
  2694.     pt[ 92 ] = (pt [92] & 0xbf) | ((state_bs[38] >> 5) & 0x40);
  2695.     pt[ 100 ] = (pt [100] & 0xbf) | ((state_bs[38] >> 6) & 0x40);
  2696.     pt[ 108 ] = (pt [108] & 0xbf) | ((state_bs[38] >> 7) & 0x40);
  2697.     pt[ 116 ] = (pt [116] & 0xbf) | ((state_bs[38] >> 8) & 0x40);
  2698.     pt[ 124 ] = (pt [124] & 0xbf) | ((state_bs[38] >> 9) & 0x40);
  2699.     pt[ 4 ] = (pt [4] & 0x7f) | ((state_bs[39] & 0x01) << 7);
  2700.     pt[ 12 ] = (pt [12] & 0x7f) | ((state_bs[39] & 0x02) << 6);
  2701.     pt[ 20 ] = (pt [20] & 0x7f) | ((state_bs[39] & 0x04) << 5);
  2702.     pt[ 28 ] = (pt [28] & 0x7f) | ((state_bs[39] & 0x08) << 4);
  2703.     pt[ 36 ] = (pt [36] & 0x7f) | ((state_bs[39] & 0x10) << 3);
  2704.     pt[ 44 ] = (pt [44] & 0x7f) | ((state_bs[39] & 0x20) << 2);
  2705.     pt[ 52 ] = (pt [52] & 0x7f) | ((state_bs[39] & 0x40) << 1);
  2706.     pt[ 60 ] = (pt [60] & 0x7f) | ((state_bs[39] >> 0) & 0x80);
  2707.     pt[ 68 ] = (pt [68] & 0x7f) | ((state_bs[39] >> 1) & 0x80);
  2708.     pt[ 76 ] = (pt [76] & 0x7f) | ((state_bs[39] >> 2) & 0x80);
  2709.     pt[ 84 ] = (pt [84] & 0x7f) | ((state_bs[39] >> 3) & 0x80);
  2710.     pt[ 92 ] = (pt [92] & 0x7f) | ((state_bs[39] >> 4) & 0x80);
  2711.     pt[ 100 ] = (pt [100] & 0x7f) | ((state_bs[39] >> 5) & 0x80);
  2712.     pt[ 108 ] = (pt [108] & 0x7f) | ((state_bs[39] >> 6) & 0x80);
  2713.     pt[ 116 ] = (pt [116] & 0x7f) | ((state_bs[39] >> 7) & 0x80);
  2714.     pt[ 124 ] = (pt [124] & 0x7f) | ((state_bs[39] >> 8) & 0x80);
  2715.     pt[ 5 ] = (pt [5] & 0xfe) | ((state_bs[40] >> 0) & 0x01);
  2716.     pt[ 13 ] = (pt [13] & 0xfe) | ((state_bs[40] >> 1) & 0x01);
  2717.     pt[ 21 ] = (pt [21] & 0xfe) | ((state_bs[40] >> 2) & 0x01);
  2718.     pt[ 29 ] = (pt [29] & 0xfe) | ((state_bs[40] >> 3) & 0x01);
  2719.     pt[ 37 ] = (pt [37] & 0xfe) | ((state_bs[40] >> 4) & 0x01);
  2720.     pt[ 45 ] = (pt [45] & 0xfe) | ((state_bs[40] >> 5) & 0x01);
  2721.     pt[ 53 ] = (pt [53] & 0xfe) | ((state_bs[40] >> 6) & 0x01);
  2722.     pt[ 61 ] = (pt [61] & 0xfe) | ((state_bs[40] >> 7) & 0x01);
  2723.     pt[ 69 ] = (pt [69] & 0xfe) | ((state_bs[40] >> 8) & 0x01);
  2724.     pt[ 77 ] = (pt [77] & 0xfe) | ((state_bs[40] >> 9) & 0x01);
  2725.     pt[ 85 ] = (pt [85] & 0xfe) | ((state_bs[40] >> 10) & 0x01);
  2726.     pt[ 93 ] = (pt [93] & 0xfe) | ((state_bs[40] >> 11) & 0x01);
  2727.     pt[ 101 ] = (pt [101] & 0xfe) | ((state_bs[40] >> 12) & 0x01);
  2728.     pt[ 109 ] = (pt [109] & 0xfe) | ((state_bs[40] >> 13) & 0x01);
  2729.     pt[ 117 ] = (pt [117] & 0xfe) | ((state_bs[40] >> 14) & 0x01);
  2730.     pt[ 125 ] = (pt [125] & 0xfe) | ((state_bs[40] >> 15) & 0x01);
  2731.     pt[ 5 ] = (pt [5] & 0xfd) | ((state_bs[41] & 0x01) << 1);
  2732.     pt[ 13 ] = (pt [13] & 0xfd) | ((state_bs[41] >> 0) & 0x02);
  2733.     pt[ 21 ] = (pt [21] & 0xfd) | ((state_bs[41] >> 1) & 0x02);
  2734.     pt[ 29 ] = (pt [29] & 0xfd) | ((state_bs[41] >> 2) & 0x02);
  2735.     pt[ 37 ] = (pt [37] & 0xfd) | ((state_bs[41] >> 3) & 0x02);
  2736.     pt[ 45 ] = (pt [45] & 0xfd) | ((state_bs[41] >> 4) & 0x02);
  2737.     pt[ 53 ] = (pt [53] & 0xfd) | ((state_bs[41] >> 5) & 0x02);
  2738.     pt[ 61 ] = (pt [61] & 0xfd) | ((state_bs[41] >> 6) & 0x02);
  2739.     pt[ 69 ] = (pt [69] & 0xfd) | ((state_bs[41] >> 7) & 0x02);
  2740.     pt[ 77 ] = (pt [77] & 0xfd) | ((state_bs[41] >> 8) & 0x02);
  2741.     pt[ 85 ] = (pt [85] & 0xfd) | ((state_bs[41] >> 9) & 0x02);
  2742.     pt[ 93 ] = (pt [93] & 0xfd) | ((state_bs[41] >> 10) & 0x02);
  2743.     pt[ 101 ] = (pt [101] & 0xfd) | ((state_bs[41] >> 11) & 0x02);
  2744.     pt[ 109 ] = (pt [109] & 0xfd) | ((state_bs[41] >> 12) & 0x02);
  2745.     pt[ 117 ] = (pt [117] & 0xfd) | ((state_bs[41] >> 13) & 0x02);
  2746.     pt[ 125 ] = (pt [125] & 0xfd) | ((state_bs[41] >> 14) & 0x02);
  2747.     pt[ 5 ] = (pt [5] & 0xfb) | ((state_bs[42] & 0x01) << 2);
  2748.     pt[ 13 ] = (pt [13] & 0xfb) | ((state_bs[42] & 0x02) << 1);
  2749.     pt[ 21 ] = (pt [21] & 0xfb) | ((state_bs[42] >> 0) & 0x04);
  2750.     pt[ 29 ] = (pt [29] & 0xfb) | ((state_bs[42] >> 1) & 0x04);
  2751.     pt[ 37 ] = (pt [37] & 0xfb) | ((state_bs[42] >> 2) & 0x04);
  2752.     pt[ 45 ] = (pt [45] & 0xfb) | ((state_bs[42] >> 3) & 0x04);
  2753.     pt[ 53 ] = (pt [53] & 0xfb) | ((state_bs[42] >> 4) & 0x04);
  2754.     pt[ 61 ] = (pt [61] & 0xfb) | ((state_bs[42] >> 5) & 0x04);
  2755.     pt[ 69 ] = (pt [69] & 0xfb) | ((state_bs[42] >> 6) & 0x04);
  2756.     pt[ 77 ] = (pt [77] & 0xfb) | ((state_bs[42] >> 7) & 0x04);
  2757.     pt[ 85 ] = (pt [85] & 0xfb) | ((state_bs[42] >> 8) & 0x04);
  2758.     pt[ 93 ] = (pt [93] & 0xfb) | ((state_bs[42] >> 9) & 0x04);
  2759.     pt[ 101 ] = (pt [101] & 0xfb) | ((state_bs[42] >> 10) & 0x04);
  2760.     pt[ 109 ] = (pt [109] & 0xfb) | ((state_bs[42] >> 11) & 0x04);
  2761.     pt[ 117 ] = (pt [117] & 0xfb) | ((state_bs[42] >> 12) & 0x04);
  2762.     pt[ 125 ] = (pt [125] & 0xfb) | ((state_bs[42] >> 13) & 0x04);
  2763.     pt[ 5 ] = (pt [5] & 0xf7) | ((state_bs[43] & 0x01) << 3);
  2764.     pt[ 13 ] = (pt [13] & 0xf7) | ((state_bs[43] & 0x02) << 2);
  2765.     pt[ 21 ] = (pt [21] & 0xf7) | ((state_bs[43] & 0x04) << 1);
  2766.     pt[ 29 ] = (pt [29] & 0xf7) | ((state_bs[43] >> 0) & 0x08);
  2767.     pt[ 37 ] = (pt [37] & 0xf7) | ((state_bs[43] >> 1) & 0x08);
  2768.     pt[ 45 ] = (pt [45] & 0xf7) | ((state_bs[43] >> 2) & 0x08);
  2769.     pt[ 53 ] = (pt [53] & 0xf7) | ((state_bs[43] >> 3) & 0x08);
  2770.     pt[ 61 ] = (pt [61] & 0xf7) | ((state_bs[43] >> 4) & 0x08);
  2771.     pt[ 69 ] = (pt [69] & 0xf7) | ((state_bs[43] >> 5) & 0x08);
  2772.     pt[ 77 ] = (pt [77] & 0xf7) | ((state_bs[43] >> 6) & 0x08);
  2773.     pt[ 85 ] = (pt [85] & 0xf7) | ((state_bs[43] >> 7) & 0x08);
  2774.     pt[ 93 ] = (pt [93] & 0xf7) | ((state_bs[43] >> 8) & 0x08);
  2775.     pt[ 101 ] = (pt [101] & 0xf7) | ((state_bs[43] >> 9) & 0x08);
  2776.     pt[ 109 ] = (pt [109] & 0xf7) | ((state_bs[43] >> 10) & 0x08);
  2777.     pt[ 117 ] = (pt [117] & 0xf7) | ((state_bs[43] >> 11) & 0x08);
  2778.     pt[ 125 ] = (pt [125] & 0xf7) | ((state_bs[43] >> 12) & 0x08);
  2779.     pt[ 5 ] = (pt [5] & 0xef) | ((state_bs[44] & 0x01) << 4);
  2780.     pt[ 13 ] = (pt [13] & 0xef) | ((state_bs[44] & 0x02) << 3);
  2781.     pt[ 21 ] = (pt [21] & 0xef) | ((state_bs[44] & 0x04) << 2);
  2782.     pt[ 29 ] = (pt [29] & 0xef) | ((state_bs[44] & 0x08) << 1);
  2783.     pt[ 37 ] = (pt [37] & 0xef) | ((state_bs[44] >> 0) & 0x10);
  2784.     pt[ 45 ] = (pt [45] & 0xef) | ((state_bs[44] >> 1) & 0x10);
  2785.     pt[ 53 ] = (pt [53] & 0xef) | ((state_bs[44] >> 2) & 0x10);
  2786.     pt[ 61 ] = (pt [61] & 0xef) | ((state_bs[44] >> 3) & 0x10);
  2787.     pt[ 69 ] = (pt [69] & 0xef) | ((state_bs[44] >> 4) & 0x10);
  2788.     pt[ 77 ] = (pt [77] & 0xef) | ((state_bs[44] >> 5) & 0x10);
  2789.     pt[ 85 ] = (pt [85] & 0xef) | ((state_bs[44] >> 6) & 0x10);
  2790.     pt[ 93 ] = (pt [93] & 0xef) | ((state_bs[44] >> 7) & 0x10);
  2791.     pt[ 101 ] = (pt [101] & 0xef) | ((state_bs[44] >> 8) & 0x10);
  2792.     pt[ 109 ] = (pt [109] & 0xef) | ((state_bs[44] >> 9) & 0x10);
  2793.     pt[ 117 ] = (pt [117] & 0xef) | ((state_bs[44] >> 10) & 0x10);
  2794.     pt[ 125 ] = (pt [125] & 0xef) | ((state_bs[44] >> 11) & 0x10);
  2795.     pt[ 5 ] = (pt [5] & 0xdf) | ((state_bs[45] & 0x01) << 5);
  2796.     pt[ 13 ] = (pt [13] & 0xdf) | ((state_bs[45] & 0x02) << 4);
  2797.     pt[ 21 ] = (pt [21] & 0xdf) | ((state_bs[45] & 0x04) << 3);
  2798.     pt[ 29 ] = (pt [29] & 0xdf) | ((state_bs[45] & 0x08) << 2);
  2799.     pt[ 37 ] = (pt [37] & 0xdf) | ((state_bs[45] & 0x10) << 1);
  2800.     pt[ 45 ] = (pt [45] & 0xdf) | ((state_bs[45] >> 0) & 0x20);
  2801.     pt[ 53 ] = (pt [53] & 0xdf) | ((state_bs[45] >> 1) & 0x20);
  2802.     pt[ 61 ] = (pt [61] & 0xdf) | ((state_bs[45] >> 2) & 0x20);
  2803.     pt[ 69 ] = (pt [69] & 0xdf) | ((state_bs[45] >> 3) & 0x20);
  2804.     pt[ 77 ] = (pt [77] & 0xdf) | ((state_bs[45] >> 4) & 0x20);
  2805.     pt[ 85 ] = (pt [85] & 0xdf) | ((state_bs[45] >> 5) & 0x20);
  2806.     pt[ 93 ] = (pt [93] & 0xdf) | ((state_bs[45] >> 6) & 0x20);
  2807.     pt[ 101 ] = (pt [101] & 0xdf) | ((state_bs[45] >> 7) & 0x20);
  2808.     pt[ 109 ] = (pt [109] & 0xdf) | ((state_bs[45] >> 8) & 0x20);
  2809.     pt[ 117 ] = (pt [117] & 0xdf) | ((state_bs[45] >> 9) & 0x20);
  2810.     pt[ 125 ] = (pt [125] & 0xdf) | ((state_bs[45] >> 10) & 0x20);
  2811.     pt[ 5 ] = (pt [5] & 0xbf) | ((state_bs[46] & 0x01) << 6);
  2812.     pt[ 13 ] = (pt [13] & 0xbf) | ((state_bs[46] & 0x02) << 5);
  2813.     pt[ 21 ] = (pt [21] & 0xbf) | ((state_bs[46] & 0x04) << 4);
  2814.     pt[ 29 ] = (pt [29] & 0xbf) | ((state_bs[46] & 0x08) << 3);
  2815.     pt[ 37 ] = (pt [37] & 0xbf) | ((state_bs[46] & 0x10) << 2);
  2816.     pt[ 45 ] = (pt [45] & 0xbf) | ((state_bs[46] & 0x20) << 1);
  2817.     pt[ 53 ] = (pt [53] & 0xbf) | ((state_bs[46] >> 0) & 0x40);
  2818.     pt[ 61 ] = (pt [61] & 0xbf) | ((state_bs[46] >> 1) & 0x40);
  2819.     pt[ 69 ] = (pt [69] & 0xbf) | ((state_bs[46] >> 2) & 0x40);
  2820.     pt[ 77 ] = (pt [77] & 0xbf) | ((state_bs[46] >> 3) & 0x40);
  2821.     pt[ 85 ] = (pt [85] & 0xbf) | ((state_bs[46] >> 4) & 0x40);
  2822.     pt[ 93 ] = (pt [93] & 0xbf) | ((state_bs[46] >> 5) & 0x40);
  2823.     pt[ 101 ] = (pt [101] & 0xbf) | ((state_bs[46] >> 6) & 0x40);
  2824.     pt[ 109 ] = (pt [109] & 0xbf) | ((state_bs[46] >> 7) & 0x40);
  2825.     pt[ 117 ] = (pt [117] & 0xbf) | ((state_bs[46] >> 8) & 0x40);
  2826.     pt[ 125 ] = (pt [125] & 0xbf) | ((state_bs[46] >> 9) & 0x40);
  2827.     pt[ 5 ] = (pt [5] & 0x7f) | ((state_bs[47] & 0x01) << 7);
  2828.     pt[ 13 ] = (pt [13] & 0x7f) | ((state_bs[47] & 0x02) << 6);
  2829.     pt[ 21 ] = (pt [21] & 0x7f) | ((state_bs[47] & 0x04) << 5);
  2830.     pt[ 29 ] = (pt [29] & 0x7f) | ((state_bs[47] & 0x08) << 4);
  2831.     pt[ 37 ] = (pt [37] & 0x7f) | ((state_bs[47] & 0x10) << 3);
  2832.     pt[ 45 ] = (pt [45] & 0x7f) | ((state_bs[47] & 0x20) << 2);
  2833.     pt[ 53 ] = (pt [53] & 0x7f) | ((state_bs[47] & 0x40) << 1);
  2834.     pt[ 61 ] = (pt [61] & 0x7f) | ((state_bs[47] >> 0) & 0x80);
  2835.     pt[ 69 ] = (pt [69] & 0x7f) | ((state_bs[47] >> 1) & 0x80);
  2836.     pt[ 77 ] = (pt [77] & 0x7f) | ((state_bs[47] >> 2) & 0x80);
  2837.     pt[ 85 ] = (pt [85] & 0x7f) | ((state_bs[47] >> 3) & 0x80);
  2838.     pt[ 93 ] = (pt [93] & 0x7f) | ((state_bs[47] >> 4) & 0x80);
  2839.     pt[ 101 ] = (pt [101] & 0x7f) | ((state_bs[47] >> 5) & 0x80);
  2840.     pt[ 109 ] = (pt [109] & 0x7f) | ((state_bs[47] >> 6) & 0x80);
  2841.     pt[ 117 ] = (pt [117] & 0x7f) | ((state_bs[47] >> 7) & 0x80);
  2842.     pt[ 125 ] = (pt [125] & 0x7f) | ((state_bs[47] >> 8) & 0x80);
  2843.     pt[ 6 ] = (pt [6] & 0xfe) | ((state_bs[48] >> 0) & 0x01);
  2844.     pt[ 14 ] = (pt [14] & 0xfe) | ((state_bs[48] >> 1) & 0x01);
  2845.     pt[ 22 ] = (pt [22] & 0xfe) | ((state_bs[48] >> 2) & 0x01);
  2846.     pt[ 30 ] = (pt [30] & 0xfe) | ((state_bs[48] >> 3) & 0x01);
  2847.     pt[ 38 ] = (pt [38] & 0xfe) | ((state_bs[48] >> 4) & 0x01);
  2848.     pt[ 46 ] = (pt [46] & 0xfe) | ((state_bs[48] >> 5) & 0x01);
  2849.     pt[ 54 ] = (pt [54] & 0xfe) | ((state_bs[48] >> 6) & 0x01);
  2850.     pt[ 62 ] = (pt [62] & 0xfe) | ((state_bs[48] >> 7) & 0x01);
  2851.     pt[ 70 ] = (pt [70] & 0xfe) | ((state_bs[48] >> 8) & 0x01);
  2852.     pt[ 78 ] = (pt [78] & 0xfe) | ((state_bs[48] >> 9) & 0x01);
  2853.     pt[ 86 ] = (pt [86] & 0xfe) | ((state_bs[48] >> 10) & 0x01);
  2854.     pt[ 94 ] = (pt [94] & 0xfe) | ((state_bs[48] >> 11) & 0x01);
  2855.     pt[ 102 ] = (pt [102] & 0xfe) | ((state_bs[48] >> 12) & 0x01);
  2856.     pt[ 110 ] = (pt [110] & 0xfe) | ((state_bs[48] >> 13) & 0x01);
  2857.     pt[ 118 ] = (pt [118] & 0xfe) | ((state_bs[48] >> 14) & 0x01);
  2858.     pt[ 126 ] = (pt [126] & 0xfe) | ((state_bs[48] >> 15) & 0x01);
  2859.     pt[ 6 ] = (pt [6] & 0xfd) | ((state_bs[49] & 0x01) << 1);
  2860.     pt[ 14 ] = (pt [14] & 0xfd) | ((state_bs[49] >> 0) & 0x02);
  2861.     pt[ 22 ] = (pt [22] & 0xfd) | ((state_bs[49] >> 1) & 0x02);
  2862.     pt[ 30 ] = (pt [30] & 0xfd) | ((state_bs[49] >> 2) & 0x02);
  2863.     pt[ 38 ] = (pt [38] & 0xfd) | ((state_bs[49] >> 3) & 0x02);
  2864.     pt[ 46 ] = (pt [46] & 0xfd) | ((state_bs[49] >> 4) & 0x02);
  2865.     pt[ 54 ] = (pt [54] & 0xfd) | ((state_bs[49] >> 5) & 0x02);
  2866.     pt[ 62 ] = (pt [62] & 0xfd) | ((state_bs[49] >> 6) & 0x02);
  2867.     pt[ 70 ] = (pt [70] & 0xfd) | ((state_bs[49] >> 7) & 0x02);
  2868.     pt[ 78 ] = (pt [78] & 0xfd) | ((state_bs[49] >> 8) & 0x02);
  2869.     pt[ 86 ] = (pt [86] & 0xfd) | ((state_bs[49] >> 9) & 0x02);
  2870.     pt[ 94 ] = (pt [94] & 0xfd) | ((state_bs[49] >> 10) & 0x02);
  2871.     pt[ 102 ] = (pt [102] & 0xfd) | ((state_bs[49] >> 11) & 0x02);
  2872.     pt[ 110 ] = (pt [110] & 0xfd) | ((state_bs[49] >> 12) & 0x02);
  2873.     pt[ 118 ] = (pt [118] & 0xfd) | ((state_bs[49] >> 13) & 0x02);
  2874.     pt[ 126 ] = (pt [126] & 0xfd) | ((state_bs[49] >> 14) & 0x02);
  2875.     pt[ 6 ] = (pt [6] & 0xfb) | ((state_bs[50] & 0x01) << 2);
  2876.     pt[ 14 ] = (pt [14] & 0xfb) | ((state_bs[50] & 0x02) << 1);
  2877.     pt[ 22 ] = (pt [22] & 0xfb) | ((state_bs[50] >> 0) & 0x04);
  2878.     pt[ 30 ] = (pt [30] & 0xfb) | ((state_bs[50] >> 1) & 0x04);
  2879.     pt[ 38 ] = (pt [38] & 0xfb) | ((state_bs[50] >> 2) & 0x04);
  2880.     pt[ 46 ] = (pt [46] & 0xfb) | ((state_bs[50] >> 3) & 0x04);
  2881.     pt[ 54 ] = (pt [54] & 0xfb) | ((state_bs[50] >> 4) & 0x04);
  2882.     pt[ 62 ] = (pt [62] & 0xfb) | ((state_bs[50] >> 5) & 0x04);
  2883.     pt[ 70 ] = (pt [70] & 0xfb) | ((state_bs[50] >> 6) & 0x04);
  2884.     pt[ 78 ] = (pt [78] & 0xfb) | ((state_bs[50] >> 7) & 0x04);
  2885.     pt[ 86 ] = (pt [86] & 0xfb) | ((state_bs[50] >> 8) & 0x04);
  2886.     pt[ 94 ] = (pt [94] & 0xfb) | ((state_bs[50] >> 9) & 0x04);
  2887.     pt[ 102 ] = (pt [102] & 0xfb) | ((state_bs[50] >> 10) & 0x04);
  2888.     pt[ 110 ] = (pt [110] & 0xfb) | ((state_bs[50] >> 11) & 0x04);
  2889.     pt[ 118 ] = (pt [118] & 0xfb) | ((state_bs[50] >> 12) & 0x04);
  2890.     pt[ 126 ] = (pt [126] & 0xfb) | ((state_bs[50] >> 13) & 0x04);
  2891.     pt[ 6 ] = (pt [6] & 0xf7) | ((state_bs[51] & 0x01) << 3);
  2892.     pt[ 14 ] = (pt [14] & 0xf7) | ((state_bs[51] & 0x02) << 2);
  2893.     pt[ 22 ] = (pt [22] & 0xf7) | ((state_bs[51] & 0x04) << 1);
  2894.     pt[ 30 ] = (pt [30] & 0xf7) | ((state_bs[51] >> 0) & 0x08);
  2895.     pt[ 38 ] = (pt [38] & 0xf7) | ((state_bs[51] >> 1) & 0x08);
  2896.     pt[ 46 ] = (pt [46] & 0xf7) | ((state_bs[51] >> 2) & 0x08);
  2897.     pt[ 54 ] = (pt [54] & 0xf7) | ((state_bs[51] >> 3) & 0x08);
  2898.     pt[ 62 ] = (pt [62] & 0xf7) | ((state_bs[51] >> 4) & 0x08);
  2899.     pt[ 70 ] = (pt [70] & 0xf7) | ((state_bs[51] >> 5) & 0x08);
  2900.     pt[ 78 ] = (pt [78] & 0xf7) | ((state_bs[51] >> 6) & 0x08);
  2901.     pt[ 86 ] = (pt [86] & 0xf7) | ((state_bs[51] >> 7) & 0x08);
  2902.     pt[ 94 ] = (pt [94] & 0xf7) | ((state_bs[51] >> 8) & 0x08);
  2903.     pt[ 102 ] = (pt [102] & 0xf7) | ((state_bs[51] >> 9) & 0x08);
  2904.     pt[ 110 ] = (pt [110] & 0xf7) | ((state_bs[51] >> 10) & 0x08);
  2905.     pt[ 118 ] = (pt [118] & 0xf7) | ((state_bs[51] >> 11) & 0x08);
  2906.     pt[ 126 ] = (pt [126] & 0xf7) | ((state_bs[51] >> 12) & 0x08);
  2907.     pt[ 6 ] = (pt [6] & 0xef) | ((state_bs[52] & 0x01) << 4);
  2908.     pt[ 14 ] = (pt [14] & 0xef) | ((state_bs[52] & 0x02) << 3);
  2909.     pt[ 22 ] = (pt [22] & 0xef) | ((state_bs[52] & 0x04) << 2);
  2910.     pt[ 30 ] = (pt [30] & 0xef) | ((state_bs[52] & 0x08) << 1);
  2911.     pt[ 38 ] = (pt [38] & 0xef) | ((state_bs[52] >> 0) & 0x10);
  2912.     pt[ 46 ] = (pt [46] & 0xef) | ((state_bs[52] >> 1) & 0x10);
  2913.     pt[ 54 ] = (pt [54] & 0xef) | ((state_bs[52] >> 2) & 0x10);
  2914.     pt[ 62 ] = (pt [62] & 0xef) | ((state_bs[52] >> 3) & 0x10);
  2915.     pt[ 70 ] = (pt [70] & 0xef) | ((state_bs[52] >> 4) & 0x10);
  2916.     pt[ 78 ] = (pt [78] & 0xef) | ((state_bs[52] >> 5) & 0x10);
  2917.     pt[ 86 ] = (pt [86] & 0xef) | ((state_bs[52] >> 6) & 0x10);
  2918.     pt[ 94 ] = (pt [94] & 0xef) | ((state_bs[52] >> 7) & 0x10);
  2919.     pt[ 102 ] = (pt [102] & 0xef) | ((state_bs[52] >> 8) & 0x10);
  2920.     pt[ 110 ] = (pt [110] & 0xef) | ((state_bs[52] >> 9) & 0x10);
  2921.     pt[ 118 ] = (pt [118] & 0xef) | ((state_bs[52] >> 10) & 0x10);
  2922.     pt[ 126 ] = (pt [126] & 0xef) | ((state_bs[52] >> 11) & 0x10);
  2923.     pt[ 6 ] = (pt [6] & 0xdf) | ((state_bs[53] & 0x01) << 5);
  2924.     pt[ 14 ] = (pt [14] & 0xdf) | ((state_bs[53] & 0x02) << 4);
  2925.     pt[ 22 ] = (pt [22] & 0xdf) | ((state_bs[53] & 0x04) << 3);
  2926.     pt[ 30 ] = (pt [30] & 0xdf) | ((state_bs[53] & 0x08) << 2);
  2927.     pt[ 38 ] = (pt [38] & 0xdf) | ((state_bs[53] & 0x10) << 1);
  2928.     pt[ 46 ] = (pt [46] & 0xdf) | ((state_bs[53] >> 0) & 0x20);
  2929.     pt[ 54 ] = (pt [54] & 0xdf) | ((state_bs[53] >> 1) & 0x20);
  2930.     pt[ 62 ] = (pt [62] & 0xdf) | ((state_bs[53] >> 2) & 0x20);
  2931.     pt[ 70 ] = (pt [70] & 0xdf) | ((state_bs[53] >> 3) & 0x20);
  2932.     pt[ 78 ] = (pt [78] & 0xdf) | ((state_bs[53] >> 4) & 0x20);
  2933.     pt[ 86 ] = (pt [86] & 0xdf) | ((state_bs[53] >> 5) & 0x20);
  2934.     pt[ 94 ] = (pt [94] & 0xdf) | ((state_bs[53] >> 6) & 0x20);
  2935.     pt[ 102 ] = (pt [102] & 0xdf) | ((state_bs[53] >> 7) & 0x20);
  2936.     pt[ 110 ] = (pt [110] & 0xdf) | ((state_bs[53] >> 8) & 0x20);
  2937.     pt[ 118 ] = (pt [118] & 0xdf) | ((state_bs[53] >> 9) & 0x20);
  2938.     pt[ 126 ] = (pt [126] & 0xdf) | ((state_bs[53] >> 10) & 0x20);
  2939.     pt[ 6 ] = (pt [6] & 0xbf) | ((state_bs[54] & 0x01) << 6);
  2940.     pt[ 14 ] = (pt [14] & 0xbf) | ((state_bs[54] & 0x02) << 5);
  2941.     pt[ 22 ] = (pt [22] & 0xbf) | ((state_bs[54] & 0x04) << 4);
  2942.     pt[ 30 ] = (pt [30] & 0xbf) | ((state_bs[54] & 0x08) << 3);
  2943.     pt[ 38 ] = (pt [38] & 0xbf) | ((state_bs[54] & 0x10) << 2);
  2944.     pt[ 46 ] = (pt [46] & 0xbf) | ((state_bs[54] & 0x20) << 1);
  2945.     pt[ 54 ] = (pt [54] & 0xbf) | ((state_bs[54] >> 0) & 0x40);
  2946.     pt[ 62 ] = (pt [62] & 0xbf) | ((state_bs[54] >> 1) & 0x40);
  2947.     pt[ 70 ] = (pt [70] & 0xbf) | ((state_bs[54] >> 2) & 0x40);
  2948.     pt[ 78 ] = (pt [78] & 0xbf) | ((state_bs[54] >> 3) & 0x40);
  2949.     pt[ 86 ] = (pt [86] & 0xbf) | ((state_bs[54] >> 4) & 0x40);
  2950.     pt[ 94 ] = (pt [94] & 0xbf) | ((state_bs[54] >> 5) & 0x40);
  2951.     pt[ 102 ] = (pt [102] & 0xbf) | ((state_bs[54] >> 6) & 0x40);
  2952.     pt[ 110 ] = (pt [110] & 0xbf) | ((state_bs[54] >> 7) & 0x40);
  2953.     pt[ 118 ] = (pt [118] & 0xbf) | ((state_bs[54] >> 8) & 0x40);
  2954.     pt[ 126 ] = (pt [126] & 0xbf) | ((state_bs[54] >> 9) & 0x40);
  2955.     pt[ 6 ] = (pt [6] & 0x7f) | ((state_bs[55] & 0x01) << 7);
  2956.     pt[ 14 ] = (pt [14] & 0x7f) | ((state_bs[55] & 0x02) << 6);
  2957.     pt[ 22 ] = (pt [22] & 0x7f) | ((state_bs[55] & 0x04) << 5);
  2958.     pt[ 30 ] = (pt [30] & 0x7f) | ((state_bs[55] & 0x08) << 4);
  2959.     pt[ 38 ] = (pt [38] & 0x7f) | ((state_bs[55] & 0x10) << 3);
  2960.     pt[ 46 ] = (pt [46] & 0x7f) | ((state_bs[55] & 0x20) << 2);
  2961.     pt[ 54 ] = (pt [54] & 0x7f) | ((state_bs[55] & 0x40) << 1);
  2962.     pt[ 62 ] = (pt [62] & 0x7f) | ((state_bs[55] >> 0) & 0x80);
  2963.     pt[ 70 ] = (pt [70] & 0x7f) | ((state_bs[55] >> 1) & 0x80);
  2964.     pt[ 78 ] = (pt [78] & 0x7f) | ((state_bs[55] >> 2) & 0x80);
  2965.     pt[ 86 ] = (pt [86] & 0x7f) | ((state_bs[55] >> 3) & 0x80);
  2966.     pt[ 94 ] = (pt [94] & 0x7f) | ((state_bs[55] >> 4) & 0x80);
  2967.     pt[ 102 ] = (pt [102] & 0x7f) | ((state_bs[55] >> 5) & 0x80);
  2968.     pt[ 110 ] = (pt [110] & 0x7f) | ((state_bs[55] >> 6) & 0x80);
  2969.     pt[ 118 ] = (pt [118] & 0x7f) | ((state_bs[55] >> 7) & 0x80);
  2970.     pt[ 126 ] = (pt [126] & 0x7f) | ((state_bs[55] >> 8) & 0x80);
  2971.     pt[ 7 ] = (pt [7] & 0xfe) | ((state_bs[56] >> 0) & 0x01);
  2972.     pt[ 15 ] = (pt [15] & 0xfe) | ((state_bs[56] >> 1) & 0x01);
  2973.     pt[ 23 ] = (pt [23] & 0xfe) | ((state_bs[56] >> 2) & 0x01);
  2974.     pt[ 31 ] = (pt [31] & 0xfe) | ((state_bs[56] >> 3) & 0x01);
  2975.     pt[ 39 ] = (pt [39] & 0xfe) | ((state_bs[56] >> 4) & 0x01);
  2976.     pt[ 47 ] = (pt [47] & 0xfe) | ((state_bs[56] >> 5) & 0x01);
  2977.     pt[ 55 ] = (pt [55] & 0xfe) | ((state_bs[56] >> 6) & 0x01);
  2978.     pt[ 63 ] = (pt [63] & 0xfe) | ((state_bs[56] >> 7) & 0x01);
  2979.     pt[ 71 ] = (pt [71] & 0xfe) | ((state_bs[56] >> 8) & 0x01);
  2980.     pt[ 79 ] = (pt [79] & 0xfe) | ((state_bs[56] >> 9) & 0x01);
  2981.     pt[ 87 ] = (pt [87] & 0xfe) | ((state_bs[56] >> 10) & 0x01);
  2982.     pt[ 95 ] = (pt [95] & 0xfe) | ((state_bs[56] >> 11) & 0x01);
  2983.     pt[ 103 ] = (pt [103] & 0xfe) | ((state_bs[56] >> 12) & 0x01);
  2984.     pt[ 111 ] = (pt [111] & 0xfe) | ((state_bs[56] >> 13) & 0x01);
  2985.     pt[ 119 ] = (pt [119] & 0xfe) | ((state_bs[56] >> 14) & 0x01);
  2986.     pt[ 127 ] = (pt [127] & 0xfe) | ((state_bs[56] >> 15) & 0x01);
  2987.     pt[ 7 ] = (pt [7] & 0xfd) | ((state_bs[57] & 0x01) << 1);
  2988.     pt[ 15 ] = (pt [15] & 0xfd) | ((state_bs[57] >> 0) & 0x02);
  2989.     pt[ 23 ] = (pt [23] & 0xfd) | ((state_bs[57] >> 1) & 0x02);
  2990.     pt[ 31 ] = (pt [31] & 0xfd) | ((state_bs[57] >> 2) & 0x02);
  2991.     pt[ 39 ] = (pt [39] & 0xfd) | ((state_bs[57] >> 3) & 0x02);
  2992.     pt[ 47 ] = (pt [47] & 0xfd) | ((state_bs[57] >> 4) & 0x02);
  2993.     pt[ 55 ] = (pt [55] & 0xfd) | ((state_bs[57] >> 5) & 0x02);
  2994.     pt[ 63 ] = (pt [63] & 0xfd) | ((state_bs[57] >> 6) & 0x02);
  2995.     pt[ 71 ] = (pt [71] & 0xfd) | ((state_bs[57] >> 7) & 0x02);
  2996.     pt[ 79 ] = (pt [79] & 0xfd) | ((state_bs[57] >> 8) & 0x02);
  2997.     pt[ 87 ] = (pt [87] & 0xfd) | ((state_bs[57] >> 9) & 0x02);
  2998.     pt[ 95 ] = (pt [95] & 0xfd) | ((state_bs[57] >> 10) & 0x02);
  2999.     pt[ 103 ] = (pt [103] & 0xfd) | ((state_bs[57] >> 11) & 0x02);
  3000.     pt[ 111 ] = (pt [111] & 0xfd) | ((state_bs[57] >> 12) & 0x02);
  3001.     pt[ 119 ] = (pt [119] & 0xfd) | ((state_bs[57] >> 13) & 0x02);
  3002.     pt[ 127 ] = (pt [127] & 0xfd) | ((state_bs[57] >> 14) & 0x02);
  3003.     pt[ 7 ] = (pt [7] & 0xfb) | ((state_bs[58] & 0x01) << 2);
  3004.     pt[ 15 ] = (pt [15] & 0xfb) | ((state_bs[58] & 0x02) << 1);
  3005.     pt[ 23 ] = (pt [23] & 0xfb) | ((state_bs[58] >> 0) & 0x04);
  3006.     pt[ 31 ] = (pt [31] & 0xfb) | ((state_bs[58] >> 1) & 0x04);
  3007.     pt[ 39 ] = (pt [39] & 0xfb) | ((state_bs[58] >> 2) & 0x04);
  3008.     pt[ 47 ] = (pt [47] & 0xfb) | ((state_bs[58] >> 3) & 0x04);
  3009.     pt[ 55 ] = (pt [55] & 0xfb) | ((state_bs[58] >> 4) & 0x04);
  3010.     pt[ 63 ] = (pt [63] & 0xfb) | ((state_bs[58] >> 5) & 0x04);
  3011.     pt[ 71 ] = (pt [71] & 0xfb) | ((state_bs[58] >> 6) & 0x04);
  3012.     pt[ 79 ] = (pt [79] & 0xfb) | ((state_bs[58] >> 7) & 0x04);
  3013.     pt[ 87 ] = (pt [87] & 0xfb) | ((state_bs[58] >> 8) & 0x04);
  3014.     pt[ 95 ] = (pt [95] & 0xfb) | ((state_bs[58] >> 9) & 0x04);
  3015.     pt[ 103 ] = (pt [103] & 0xfb) | ((state_bs[58] >> 10) & 0x04);
  3016.     pt[ 111 ] = (pt [111] & 0xfb) | ((state_bs[58] >> 11) & 0x04);
  3017.     pt[ 119 ] = (pt [119] & 0xfb) | ((state_bs[58] >> 12) & 0x04);
  3018.     pt[ 127 ] = (pt [127] & 0xfb) | ((state_bs[58] >> 13) & 0x04);
  3019.     pt[ 7 ] = (pt [7] & 0xf7) | ((state_bs[59] & 0x01) << 3);
  3020.     pt[ 15 ] = (pt [15] & 0xf7) | ((state_bs[59] & 0x02) << 2);
  3021.     pt[ 23 ] = (pt [23] & 0xf7) | ((state_bs[59] & 0x04) << 1);
  3022.     pt[ 31 ] = (pt [31] & 0xf7) | ((state_bs[59] >> 0) & 0x08);
  3023.     pt[ 39 ] = (pt [39] & 0xf7) | ((state_bs[59] >> 1) & 0x08);
  3024.     pt[ 47 ] = (pt [47] & 0xf7) | ((state_bs[59] >> 2) & 0x08);
  3025.     pt[ 55 ] = (pt [55] & 0xf7) | ((state_bs[59] >> 3) & 0x08);
  3026.     pt[ 63 ] = (pt [63] & 0xf7) | ((state_bs[59] >> 4) & 0x08);
  3027.     pt[ 71 ] = (pt [71] & 0xf7) | ((state_bs[59] >> 5) & 0x08);
  3028.     pt[ 79 ] = (pt [79] & 0xf7) | ((state_bs[59] >> 6) & 0x08);
  3029.     pt[ 87 ] = (pt [87] & 0xf7) | ((state_bs[59] >> 7) & 0x08);
  3030.     pt[ 95 ] = (pt [95] & 0xf7) | ((state_bs[59] >> 8) & 0x08);
  3031.     pt[ 103 ] = (pt [103] & 0xf7) | ((state_bs[59] >> 9) & 0x08);
  3032.     pt[ 111 ] = (pt [111] & 0xf7) | ((state_bs[59] >> 10) & 0x08);
  3033.     pt[ 119 ] = (pt [119] & 0xf7) | ((state_bs[59] >> 11) & 0x08);
  3034.     pt[ 127 ] = (pt [127] & 0xf7) | ((state_bs[59] >> 12) & 0x08);
  3035.     pt[ 7 ] = (pt [7] & 0xef) | ((state_bs[60] & 0x01) << 4);
  3036.     pt[ 15 ] = (pt [15] & 0xef) | ((state_bs[60] & 0x02) << 3);
  3037.     pt[ 23 ] = (pt [23] & 0xef) | ((state_bs[60] & 0x04) << 2);
  3038.     pt[ 31 ] = (pt [31] & 0xef) | ((state_bs[60] & 0x08) << 1);
  3039.     pt[ 39 ] = (pt [39] & 0xef) | ((state_bs[60] >> 0) & 0x10);
  3040.     pt[ 47 ] = (pt [47] & 0xef) | ((state_bs[60] >> 1) & 0x10);
  3041.     pt[ 55 ] = (pt [55] & 0xef) | ((state_bs[60] >> 2) & 0x10);
  3042.     pt[ 63 ] = (pt [63] & 0xef) | ((state_bs[60] >> 3) & 0x10);
  3043.     pt[ 71 ] = (pt [71] & 0xef) | ((state_bs[60] >> 4) & 0x10);
  3044.     pt[ 79 ] = (pt [79] & 0xef) | ((state_bs[60] >> 5) & 0x10);
  3045.     pt[ 87 ] = (pt [87] & 0xef) | ((state_bs[60] >> 6) & 0x10);
  3046.     pt[ 95 ] = (pt [95] & 0xef) | ((state_bs[60] >> 7) & 0x10);
  3047.     pt[ 103 ] = (pt [103] & 0xef) | ((state_bs[60] >> 8) & 0x10);
  3048.     pt[ 111 ] = (pt [111] & 0xef) | ((state_bs[60] >> 9) & 0x10);
  3049.     pt[ 119 ] = (pt [119] & 0xef) | ((state_bs[60] >> 10) & 0x10);
  3050.     pt[ 127 ] = (pt [127] & 0xef) | ((state_bs[60] >> 11) & 0x10);
  3051.     pt[ 7 ] = (pt [7] & 0xdf) | ((state_bs[61] & 0x01) << 5);
  3052.     pt[ 15 ] = (pt [15] & 0xdf) | ((state_bs[61] & 0x02) << 4);
  3053.     pt[ 23 ] = (pt [23] & 0xdf) | ((state_bs[61] & 0x04) << 3);
  3054.     pt[ 31 ] = (pt [31] & 0xdf) | ((state_bs[61] & 0x08) << 2);
  3055.     pt[ 39 ] = (pt [39] & 0xdf) | ((state_bs[61] & 0x10) << 1);
  3056.     pt[ 47 ] = (pt [47] & 0xdf) | ((state_bs[61] >> 0) & 0x20);
  3057.     pt[ 55 ] = (pt [55] & 0xdf) | ((state_bs[61] >> 1) & 0x20);
  3058.     pt[ 63 ] = (pt [63] & 0xdf) | ((state_bs[61] >> 2) & 0x20);
  3059.     pt[ 71 ] = (pt [71] & 0xdf) | ((state_bs[61] >> 3) & 0x20);
  3060.     pt[ 79 ] = (pt [79] & 0xdf) | ((state_bs[61] >> 4) & 0x20);
  3061.     pt[ 87 ] = (pt [87] & 0xdf) | ((state_bs[61] >> 5) & 0x20);
  3062.     pt[ 95 ] = (pt [95] & 0xdf) | ((state_bs[61] >> 6) & 0x20);
  3063.     pt[ 103 ] = (pt [103] & 0xdf) | ((state_bs[61] >> 7) & 0x20);
  3064.     pt[ 111 ] = (pt [111] & 0xdf) | ((state_bs[61] >> 8) & 0x20);
  3065.     pt[ 119 ] = (pt [119] & 0xdf) | ((state_bs[61] >> 9) & 0x20);
  3066.     pt[ 127 ] = (pt [127] & 0xdf) | ((state_bs[61] >> 10) & 0x20);
  3067.     pt[ 7 ] = (pt [7] & 0xbf) | ((state_bs[62] & 0x01) << 6);
  3068.     pt[ 15 ] = (pt [15] & 0xbf) | ((state_bs[62] & 0x02) << 5);
  3069.     pt[ 23 ] = (pt [23] & 0xbf) | ((state_bs[62] & 0x04) << 4);
  3070.     pt[ 31 ] = (pt [31] & 0xbf) | ((state_bs[62] & 0x08) << 3);
  3071.     pt[ 39 ] = (pt [39] & 0xbf) | ((state_bs[62] & 0x10) << 2);
  3072.     pt[ 47 ] = (pt [47] & 0xbf) | ((state_bs[62] & 0x20) << 1);
  3073.     pt[ 55 ] = (pt [55] & 0xbf) | ((state_bs[62] >> 0) & 0x40);
  3074.     pt[ 63 ] = (pt [63] & 0xbf) | ((state_bs[62] >> 1) & 0x40);
  3075.     pt[ 71 ] = (pt [71] & 0xbf) | ((state_bs[62] >> 2) & 0x40);
  3076.     pt[ 79 ] = (pt [79] & 0xbf) | ((state_bs[62] >> 3) & 0x40);
  3077.     pt[ 87 ] = (pt [87] & 0xbf) | ((state_bs[62] >> 4) & 0x40);
  3078.     pt[ 95 ] = (pt [95] & 0xbf) | ((state_bs[62] >> 5) & 0x40);
  3079.     pt[ 103 ] = (pt [103] & 0xbf) | ((state_bs[62] >> 6) & 0x40);
  3080.     pt[ 111 ] = (pt [111] & 0xbf) | ((state_bs[62] >> 7) & 0x40);
  3081.     pt[ 119 ] = (pt [119] & 0xbf) | ((state_bs[62] >> 8) & 0x40);
  3082.     pt[ 127 ] = (pt [127] & 0xbf) | ((state_bs[62] >> 9) & 0x40);
  3083.     pt[ 7 ] = (pt [7] & 0x7f) | ((state_bs[63] & 0x01) << 7);
  3084.     pt[ 15 ] = (pt [15] & 0x7f) | ((state_bs[63] & 0x02) << 6);
  3085.     pt[ 23 ] = (pt [23] & 0x7f) | ((state_bs[63] & 0x04) << 5);
  3086.     pt[ 31 ] = (pt [31] & 0x7f) | ((state_bs[63] & 0x08) << 4);
  3087.     pt[ 39 ] = (pt [39] & 0x7f) | ((state_bs[63] & 0x10) << 3);
  3088.     pt[ 47 ] = (pt [47] & 0x7f) | ((state_bs[63] & 0x20) << 2);
  3089.     pt[ 55 ] = (pt [55] & 0x7f) | ((state_bs[63] & 0x40) << 1);
  3090.     pt[ 63 ] = (pt [63] & 0x7f) | ((state_bs[63] >> 0) & 0x80);
  3091.     pt[ 71 ] = (pt [71] & 0x7f) | ((state_bs[63] >> 1) & 0x80);
  3092.     pt[ 79 ] = (pt [79] & 0x7f) | ((state_bs[63] >> 2) & 0x80);
  3093.     pt[ 87 ] = (pt [87] & 0x7f) | ((state_bs[63] >> 3) & 0x80);
  3094.     pt[ 95 ] = (pt [95] & 0x7f) | ((state_bs[63] >> 4) & 0x80);
  3095.     pt[ 103 ] = (pt [103] & 0x7f) | ((state_bs[63] >> 5) & 0x80);
  3096.     pt[ 111 ] = (pt [111] & 0x7f) | ((state_bs[63] >> 6) & 0x80);
  3097.     pt[ 119 ] = (pt [119] & 0x7f) | ((state_bs[63] >> 7) & 0x80);
  3098.     pt[ 127 ] = (pt [127] & 0x7f) | ((state_bs[63] >> 8) & 0x80);
  3099. }
  3100.  
  3101. /**
  3102.  * Perform next key schedule step
  3103.  * @param key Key register to be updated
  3104.  * @param r Round counter
  3105.  * @warning For correct function, has to be called with incremented r each time
  3106.  * @note You are free to change or optimize this function
  3107.  */
  3108. static void update_round_key(uint8_t key[CRYPTO_KEY_SIZE], const uint8_t r)
  3109. {
  3110.     const uint8_t sbox[16] = {
  3111.         0xC, 0x5, 0x6, 0xB, 0x9, 0x0, 0xA, 0xD, 0x3, 0xE, 0xF, 0x8, 0x4, 0x7, 0x1, 0x2,
  3112.     };
  3113.  
  3114.     uint8_t tmp = 0;
  3115.     const uint8_t tmp2 = key[2];
  3116.     const uint8_t tmp1 = key[1];
  3117.     const uint8_t tmp0 = key[0];
  3118.  
  3119.     // rotate right by 19 bit
  3120.     key[0] = key[2] >> 3 | key[3] << 5;
  3121.     key[1] = key[3] >> 3 | key[4] << 5;
  3122.     key[2] = key[4] >> 3 | key[5] << 5;
  3123.     key[3] = key[5] >> 3 | key[6] << 5;
  3124.     key[4] = key[6] >> 3 | key[7] << 5;
  3125.     key[5] = key[7] >> 3 | key[8] << 5;
  3126.     key[6] = key[8] >> 3 | key[9] << 5;
  3127.     key[7] = key[9] >> 3 | tmp0 << 5;
  3128.     key[8] = tmp0 >> 3   | tmp1 << 5;
  3129.     key[9] = tmp1 >> 3   | tmp2 << 5;
  3130.  
  3131.     // perform sbox lookup on MSbits
  3132.     tmp = sbox[key[9] >> 4];
  3133.     key[9] &= 0x0F;
  3134.     key[9] |= tmp << 4;
  3135.  
  3136.     // XOR round counter k19 ... k15
  3137.     key[1] ^= r << 7;
  3138.     key[2] ^= r >> 1;
  3139. }
  3140.  
  3141. void crypto_func(uint8_t pt[CRYPTO_IN_SIZE * BITSLICE_WIDTH], uint8_t key[CRYPTO_KEY_SIZE])
  3142. {
  3143.     // State buffer and additional backbuffer of same size (you can remove the backbuffer if you do not need it)
  3144.     bs_reg_t state[CRYPTO_IN_SIZE_BIT] = {0};
  3145.     bs_reg_t bb[CRYPTO_IN_SIZE_BIT];
  3146.     //uint8_t i = 1;
  3147.  
  3148.     // Bring into bitslicing form
  3149.     enslice(pt, state);
  3150.  
  3151.     /// INSERT YOUR CODE HERE ///
  3152.     //for(i = 1; i <=31; i++){
  3153.         add_round_key(state, key + 2); //state holds the latest output
  3154.         sbox_layer(state, bb); //bb now holds the latest output
  3155.         pbox_layer(bb, state); //state now holds the latest output
  3156.         update_round_key(key, 1);
  3157.  
  3158.         add_round_key(state, key + 2); //state holds the latest output
  3159.         sbox_layer(state, bb); //bb now holds the latest output
  3160.         pbox_layer(bb, state); //state now holds the latest output
  3161.         update_round_key(key, 2);
  3162.  
  3163.         add_round_key(state, key + 2); //state holds the latest output
  3164.         sbox_layer(state, bb); //bb now holds the latest output
  3165.         pbox_layer(bb, state); //state now holds the latest output
  3166.         update_round_key(key, 3);
  3167.  
  3168.         add_round_key(state, key + 2); //state holds the latest output
  3169.         sbox_layer(state, bb); //bb now holds the latest output
  3170.         pbox_layer(bb, state); //state now holds the latest output
  3171.         update_round_key(key, 4);
  3172.  
  3173.         add_round_key(state, key + 2); //state holds the latest output
  3174.         sbox_layer(state, bb); //bb now holds the latest output
  3175.         pbox_layer(bb, state); //state now holds the latest output
  3176.         update_round_key(key, 5);
  3177.  
  3178.         add_round_key(state, key + 2); //state holds the latest output
  3179.         sbox_layer(state, bb); //bb now holds the latest output
  3180.         pbox_layer(bb, state); //state now holds the latest output
  3181.         update_round_key(key, 6);
  3182.  
  3183.         add_round_key(state, key + 2); //state holds the latest output
  3184.         sbox_layer(state, bb); //bb now holds the latest output
  3185.         pbox_layer(bb, state); //state now holds the latest output
  3186.         update_round_key(key, 7);
  3187.  
  3188.         add_round_key(state, key + 2); //state holds the latest output
  3189.         sbox_layer(state, bb); //bb now holds the latest output
  3190.         pbox_layer(bb, state); //state now holds the latest output
  3191.         update_round_key(key, 8);
  3192.  
  3193.         add_round_key(state, key + 2); //state holds the latest output
  3194.         sbox_layer(state, bb); //bb now holds the latest output
  3195.         pbox_layer(bb, state); //state now holds the latest output
  3196.         update_round_key(key, 9);
  3197.  
  3198.         add_round_key(state, key + 2); //state holds the latest output
  3199.         sbox_layer(state, bb); //bb now holds the latest output
  3200.         pbox_layer(bb, state); //state now holds the latest output
  3201.         update_round_key(key, 10);
  3202.  
  3203.         add_round_key(state, key + 2); //state holds the latest output
  3204.         sbox_layer(state, bb); //bb now holds the latest output
  3205.         pbox_layer(bb, state); //state now holds the latest output
  3206.         update_round_key(key, 11);
  3207.  
  3208.         add_round_key(state, key + 2); //state holds the latest output
  3209.         sbox_layer(state, bb); //bb now holds the latest output
  3210.         pbox_layer(bb, state); //state now holds the latest output
  3211.         update_round_key(key, 12);
  3212.  
  3213.         add_round_key(state, key + 2); //state holds the latest output
  3214.         sbox_layer(state, bb); //bb now holds the latest output
  3215.         pbox_layer(bb, state); //state now holds the latest output
  3216.         update_round_key(key, 13);
  3217.  
  3218.         add_round_key(state, key + 2); //state holds the latest output
  3219.         sbox_layer(state, bb); //bb now holds the latest output
  3220.         pbox_layer(bb, state); //state now holds the latest output
  3221.         update_round_key(key, 14);
  3222.  
  3223.         add_round_key(state, key + 2); //state holds the latest output
  3224.         sbox_layer(state, bb); //bb now holds the latest output
  3225.         pbox_layer(bb, state); //state now holds the latest output
  3226.         update_round_key(key, 15);
  3227.  
  3228.         add_round_key(state, key + 2); //state holds the latest output
  3229.         sbox_layer(state, bb); //bb now holds the latest output
  3230.         pbox_layer(bb, state); //state now holds the latest output
  3231.         update_round_key(key, 16);
  3232.  
  3233.         add_round_key(state, key + 2); //state holds the latest output
  3234.         sbox_layer(state, bb); //bb now holds the latest output
  3235.         pbox_layer(bb, state); //state now holds the latest output
  3236.         update_round_key(key, 17);
  3237.  
  3238.         add_round_key(state, key + 2); //state holds the latest output
  3239.         sbox_layer(state, bb); //bb now holds the latest output
  3240.         pbox_layer(bb, state); //state now holds the latest output
  3241.         update_round_key(key, 18);
  3242.  
  3243.         add_round_key(state, key + 2); //state holds the latest output
  3244.         sbox_layer(state, bb); //bb now holds the latest output
  3245.         pbox_layer(bb, state); //state now holds the latest output
  3246.         update_round_key(key, 19);
  3247.  
  3248.         add_round_key(state, key + 2); //state holds the latest output
  3249.         sbox_layer(state, bb); //bb now holds the latest output
  3250.         pbox_layer(bb, state); //state now holds the latest output
  3251.         update_round_key(key, 20);
  3252.  
  3253.         add_round_key(state, key + 2); //state holds the latest output
  3254.         sbox_layer(state, bb); //bb now holds the latest output
  3255.         pbox_layer(bb, state); //state now holds the latest output
  3256.         update_round_key(key, 21);
  3257.  
  3258.         add_round_key(state, key + 2); //state holds the latest output
  3259.         sbox_layer(state, bb); //bb now holds the latest output
  3260.         pbox_layer(bb, state); //state now holds the latest output
  3261.         update_round_key(key, 22);
  3262.  
  3263.         add_round_key(state, key + 2); //state holds the latest output
  3264.         sbox_layer(state, bb); //bb now holds the latest output
  3265.         pbox_layer(bb, state); //state now holds the latest output
  3266.         update_round_key(key, 23);
  3267.  
  3268.         add_round_key(state, key + 2); //state holds the latest output
  3269.         sbox_layer(state, bb); //bb now holds the latest output
  3270.         pbox_layer(bb, state); //state now holds the latest output
  3271.         update_round_key(key, 24);
  3272.  
  3273.         add_round_key(state, key + 2); //state holds the latest output
  3274.         sbox_layer(state, bb); //bb now holds the latest output
  3275.         pbox_layer(bb, state); //state now holds the latest output
  3276.         update_round_key(key, 25);
  3277.  
  3278.         add_round_key(state, key + 2); //state holds the latest output
  3279.         sbox_layer(state, bb); //bb now holds the latest output
  3280.         pbox_layer(bb, state); //state now holds the latest output
  3281.         update_round_key(key, 26);
  3282.  
  3283.         add_round_key(state, key + 2); //state holds the latest output
  3284.         sbox_layer(state, bb); //bb now holds the latest output
  3285.         pbox_layer(bb, state); //state now holds the latest output
  3286.         update_round_key(key, 27);
  3287.  
  3288.         add_round_key(state, key + 2); //state holds the latest output
  3289.         sbox_layer(state, bb); //bb now holds the latest output
  3290.         pbox_layer(bb, state); //state now holds the latest output
  3291.         update_round_key(key, 28);
  3292.  
  3293.         add_round_key(state, key + 2); //state holds the latest output
  3294.         sbox_layer(state, bb); //bb now holds the latest output
  3295.         pbox_layer(bb, state); //state now holds the latest output
  3296.         update_round_key(key, 29);
  3297.  
  3298.         add_round_key(state, key + 2); //state holds the latest output
  3299.         sbox_layer(state, bb); //bb now holds the latest output
  3300.         pbox_layer(bb, state); //state now holds the latest output
  3301.         update_round_key(key, 30);
  3302.  
  3303.         add_round_key(state, key + 2); //state holds the latest output
  3304.         sbox_layer(state, bb); //bb now holds the latest output
  3305.         pbox_layer(bb, state); //state now holds the latest output
  3306.         update_round_key(key, 31);
  3307.  
  3308.     //}
  3309.  
  3310.     add_round_key(state, key + 2); //state holds the latest output
  3311.  
  3312.     // Convert back to normal form
  3313.     unslice(state, pt);
  3314. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top