aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/CHStone
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-08-11 18:21:49 +0200
committerYann Herklotz <git@yannherklotz.com>2020-08-11 18:21:49 +0200
commiteea5ca4078823230ff3a20cb1f7ec1cd541d2713 (patch)
tree755a8eb2fe58fbd1d33ac2d889351caabee3c0d9 /benchmarks/CHStone
parentbf8bf2926375772b116bc2d7046b3da6c6f5a031 (diff)
downloadvericert-eea5ca4078823230ff3a20cb1f7ec1cd541d2713.tar.gz
vericert-eea5ca4078823230ff3a20cb1f7ec1cd541d2713.zip
Add benchmark changes
Diffstat (limited to 'benchmarks/CHStone')
-rwxr-xr-xbenchmarks/CHStone/adpcm/adpcm.c1337
-rwxr-xr-xbenchmarks/CHStone/aes/aes.c749
-rwxr-xr-xbenchmarks/CHStone/gsm/gsm.c523
-rwxr-xr-xbenchmarks/CHStone/mips/mips.c469
-rwxr-xr-xbenchmarks/CHStone/sha/sha_driver.c1313
5 files changed, 3466 insertions, 925 deletions
diff --git a/benchmarks/CHStone/adpcm/adpcm.c b/benchmarks/CHStone/adpcm/adpcm.c
index 613b1bd..bcdc6dd 100755
--- a/benchmarks/CHStone/adpcm/adpcm.c
+++ b/benchmarks/CHStone/adpcm/adpcm.c
@@ -1,21 +1,21 @@
/*
-+--------------------------------------------------------------------------+
-| CHStone : a suite of benchmark programs for C-based High-Level Synthesis |
-| ======================================================================== |
-| |
-| * Collected and Modified : Y. Hara, H. Tomiyama, S. Honda, |
-| H. Takada and K. Ishii |
-| Nagoya University, Japan |
-| |
-| * Remark : |
-| 1. This source code is modified to unify the formats of the benchmark |
-| programs in CHStone. |
-| 2. Test vectors are added for CHStone. |
-| 3. If "main_result" is 0 at the end of the program, the program is |
-| correctly executed. |
-| 4. Please follow the copyright of each benchmark program. |
-+--------------------------------------------------------------------------+
-*/
+ +--------------------------------------------------------------------------+
+ | CHStone : a suite of benchmark programs for C-based High-Level Synthesis |
+ | ======================================================================== |
+ | |
+ | * Collected and Modified : Y. Hara, H. Tomiyama, S. Honda, |
+ | H. Takada and K. Ishii |
+ | Nagoya University, Japan |
+ | |
+ | * Remark : |
+ | 1. This source code is modified to unify the formats of the benchmark |
+ | programs in CHStone. |
+ | 2. Test vectors are added for CHStone. |
+ | 3. If "main_result" is 0 at the end of the program, the program is |
+ | correctly executed. |
+ | 4. Please follow the copyright of each benchmark program. |
+ +--------------------------------------------------------------------------+
+ */
/*************************************************************************/
/* */
/* SNU-RT Benchmark Suite for Worst Case Timing Analysis */
@@ -62,7 +62,9 @@
/* */
/* */
/*************************************************************************/
-#include <stdio.h>
+
+#define SIZE 100
+#define IN_END 100
int encode (int, int);
void decode (int);
@@ -77,162 +79,12 @@ int uppol1 (int al1, int apl2, int plt, int plt1);
int logsch (int ih, int nbh);
void reset ();
-/* G722 C code */
-
-/* variables for transimit quadrature mirror filter here */
-int tqmf[24];
-
-/* QMF filter coefficients:
-scaled by a factor of 4 compared to G722 CCITT recomendation */
-const int h[24] = {
- 12, -44, -44, 212, 48, -624, 128, 1448,
- -840, -3220, 3804, 15504, 15504, 3804, -3220, -840,
- 1448, 128, -624, 48, 212, -44, -44, 12
-};
-
-int xl, xh;
-
-/* variables for receive quadrature mirror filter here */
-int accumc[11], accumd[11];
-
-/* outputs of decode() */
-int xout1, xout2;
-
-int xs, xd;
-
-/* variables for encoder (hi and lo) here */
-
-int il, szl, spl, sl, el;
-
-const int qq4_code4_table[16] = {
- 0, -20456, -12896, -8968, -6288, -4240, -2584, -1200,
- 20456, 12896, 8968, 6288, 4240, 2584, 1200, 0
-};
-
-
-const int qq6_code6_table[64] = {
- -136, -136, -136, -136, -24808, -21904, -19008, -16704,
- -14984, -13512, -12280, -11192, -10232, -9360, -8576, -7856,
- -7192, -6576, -6000, -5456, -4944, -4464, -4008, -3576,
- -3168, -2776, -2400, -2032, -1688, -1360, -1040, -728,
- 24808, 21904, 19008, 16704, 14984, 13512, 12280, 11192,
- 10232, 9360, 8576, 7856, 7192, 6576, 6000, 5456,
- 4944, 4464, 4008, 3576, 3168, 2776, 2400, 2032,
- 1688, 1360, 1040, 728, 432, 136, -432, -136
-};
-
-int delay_bpl[6];
-
-int delay_dltx[6];
-
-const int wl_code_table[16] = {
- -60, 3042, 1198, 538, 334, 172, 58, -30,
- 3042, 1198, 538, 334, 172, 58, -30, -60
-};
-
-const int ilb_table[32] = {
- 2048, 2093, 2139, 2186, 2233, 2282, 2332, 2383,
- 2435, 2489, 2543, 2599, 2656, 2714, 2774, 2834,
- 2896, 2960, 3025, 3091, 3158, 3228, 3298, 3371,
- 3444, 3520, 3597, 3676, 3756, 3838, 3922, 4008
-};
-
-int nbl; /* delay line */
-int al1, al2;
-int plt, plt1, plt2;
-int dlt;
-int rlt, rlt1, rlt2;
-
-/* decision levels - pre-multiplied by 8, 0 to indicate end */
-const int decis_levl[30] = {
- 280, 576, 880, 1200, 1520, 1864, 2208, 2584,
- 2960, 3376, 3784, 4240, 4696, 5200, 5712, 6288,
- 6864, 7520, 8184, 8968, 9752, 10712, 11664, 12896,
- 14120, 15840, 17560, 20456, 23352, 32767
-};
-
-int detl;
-
-/* quantization table 31 long to make quantl look-up easier,
-last entry is for mil=30 case when wd is max */
-const int quant26bt_pos[31] = {
- 61, 60, 59, 58, 57, 56, 55, 54,
- 53, 52, 51, 50, 49, 48, 47, 46,
- 45, 44, 43, 42, 41, 40, 39, 38,
- 37, 36, 35, 34, 33, 32, 32
-};
-
-/* quantization table 31 long to make quantl look-up easier,
-last entry is for mil=30 case when wd is max */
-const int quant26bt_neg[31] = {
- 63, 62, 31, 30, 29, 28, 27, 26,
- 25, 24, 23, 22, 21, 20, 19, 18,
- 17, 16, 15, 14, 13, 12, 11, 10,
- 9, 8, 7, 6, 5, 4, 4
-};
-
-
-int deth;
-int sh; /* this comes from adaptive predictor */
-int eh;
-
-const int qq2_code2_table[4] = {
- -7408, -1616, 7408, 1616
-};
-
-const int wh_code_table[4] = {
- 798, -214, 798, -214
-};
-
-
-int dh, ih;
-int nbh, szh;
-int sph, ph, yh, rh;
-
-int delay_dhx[6];
-
-int delay_bph[6];
-
-int ah1, ah2;
-int ph1, ph2;
-int rh1, rh2;
-
-/* variables for decoder here */
-int ilr, rl;
-int dec_deth, dec_detl, dec_dlt;
-
-int dec_del_bpl[6];
-
-int dec_del_dltx[6];
-
-int dec_plt, dec_plt1, dec_plt2;
-int dec_szl, dec_spl, dec_sl;
-int dec_rlt1, dec_rlt2, dec_rlt;
-int dec_al1, dec_al2;
-int dl;
-int dec_nbl, dec_dh, dec_nbh;
-
-/* variables used in filtez */
-int dec_del_bph[6];
-
-int dec_del_dhx[6];
-
-int dec_szh;
-/* variables used in filtep */
-int dec_rh1, dec_rh2;
-int dec_ah1, dec_ah2;
-int dec_ph, dec_sph;
-
-int dec_sh;
-
-int dec_ph1, dec_ph2;
-
/* G722 encode function two ints in, one 8 bit output */
/* put input samples in xin1 = first value, xin2 = second value */
/* returns il and ih stored together */
-int
+ int
abs (int n)
{
int m;
@@ -244,347 +96,17 @@ abs (int n)
return m;
}
-int
-encode (int xin1, int xin2)
-{
- int i;
- const int *h_ptr;
- int *tqmf_ptr, *tqmf_ptr1;
- long int xa, xb;
- int decis;
-
-/* transmit quadrature mirror filters implemented here */
- h_ptr = h;
- tqmf_ptr = tqmf;
- xa = (long) (*tqmf_ptr++) * (*h_ptr++);
- xb = (long) (*tqmf_ptr++) * (*h_ptr++);
-/* main multiply accumulate loop for samples and coefficients */
- for (i = 0; i < 10; i++)
- {
- xa += (long) (*tqmf_ptr++) * (*h_ptr++);
- xb += (long) (*tqmf_ptr++) * (*h_ptr++);
- }
-/* final mult/accumulate */
- xa += (long) (*tqmf_ptr++) * (*h_ptr++);
- xb += (long) (*tqmf_ptr) * (*h_ptr++);
-
-/* update delay line tqmf */
- tqmf_ptr1 = tqmf_ptr - 2;
- for (i = 0; i < 22; i++)
- *tqmf_ptr-- = *tqmf_ptr1--;
- *tqmf_ptr-- = xin1;
- *tqmf_ptr = xin2;
-
-/* scale outputs */
- xl = (xa + xb) >> 15;
- xh = (xa - xb) >> 15;
-
-/* end of quadrature mirror filter code */
-
-/* starting with lower sub band encoder */
-
-/* filtez - compute predictor output section - zero section */
- szl = filtez (delay_bpl, delay_dltx);
-
-/* filtep - compute predictor output signal (pole section) */
- spl = filtep (rlt1, al1, rlt2, al2);
-
-/* compute the predictor output value in the lower sub_band encoder */
- sl = szl + spl;
- el = xl - sl;
-
-/* quantl: quantize the difference signal */
- il = quantl (el, detl);
-
-/* computes quantized difference signal */
-/* for invqbl, truncate by 2 lsbs, so mode = 3 */
- dlt = ((long) detl * qq4_code4_table[il >> 2]) >> 15;
-
-/* logscl: updates logarithmic quant. scale factor in low sub band */
- nbl = logscl (il, nbl);
-
-/* scalel: compute the quantizer scale factor in the lower sub band */
-/* calling parameters nbl and 8 (constant such that scalel can be scaleh) */
- detl = scalel (nbl, 8);
-
-/* parrec - simple addition to compute recontructed signal for adaptive pred */
- plt = dlt + szl;
-
-/* upzero: update zero section predictor coefficients (sixth order)*/
-/* calling parameters: dlt, dlt1, dlt2, ..., dlt6 from dlt */
-/* bpli (linear_buffer in which all six values are delayed */
-/* return params: updated bpli, delayed dltx */
- upzero (dlt, delay_dltx, delay_bpl);
-
-/* uppol2- update second predictor coefficient apl2 and delay it as al2 */
-/* calling parameters: al1, al2, plt, plt1, plt2 */
- al2 = uppol2 (al1, al2, plt, plt1, plt2);
-
-/* uppol1 :update first predictor coefficient apl1 and delay it as al1 */
-/* calling parameters: al1, apl2, plt, plt1 */
- al1 = uppol1 (al1, al2, plt, plt1);
-
-/* recons : compute recontructed signal for adaptive predictor */
- rlt = sl + dlt;
-
-/* done with lower sub_band encoder; now implement delays for next time*/
- rlt2 = rlt1;
- rlt1 = rlt;
- plt2 = plt1;
- plt1 = plt;
-
-/* high band encode */
-
- szh = filtez (delay_bph, delay_dhx);
-
- sph = filtep (rh1, ah1, rh2, ah2);
-
-/* predic: sh = sph + szh */
- sh = sph + szh;
-/* subtra: eh = xh - sh */
- eh = xh - sh;
-
-/* quanth - quantization of difference signal for higher sub-band */
-/* quanth: in-place for speed params: eh, deth (has init. value) */
- if (eh >= 0)
- {
- ih = 3; /* 2,3 are pos codes */
- }
- else
- {
- ih = 1; /* 0,1 are neg codes */
- }
- decis = (564L * (long) deth) >> 12L;
- if (abs (eh) > decis)
- ih--; /* mih = 2 case */
-
-/* compute the quantized difference signal, higher sub-band*/
- dh = ((long) deth * qq2_code2_table[ih]) >> 15L;
-
-/* logsch: update logarithmic quantizer scale factor in hi sub-band*/
- nbh = logsch (ih, nbh);
-
-/* note : scalel and scaleh use same code, different parameters */
- deth = scalel (nbh, 10);
-
-/* parrec - add pole predictor output to quantized diff. signal */
- ph = dh + szh;
-
-/* upzero: update zero section predictor coefficients (sixth order) */
-/* calling parameters: dh, dhi, bphi */
-/* return params: updated bphi, delayed dhx */
- upzero (dh, delay_dhx, delay_bph);
-
-/* uppol2: update second predictor coef aph2 and delay as ah2 */
-/* calling params: ah1, ah2, ph, ph1, ph2 */
- ah2 = uppol2 (ah1, ah2, ph, ph1, ph2);
-
-/* uppol1: update first predictor coef. aph2 and delay it as ah1 */
- ah1 = uppol1 (ah1, ah2, ph, ph1);
-
-/* recons for higher sub-band */
- yh = sh + dh;
-
-/* done with higher sub-band encoder, now Delay for next time */
- rh2 = rh1;
- rh1 = yh;
- ph2 = ph1;
- ph1 = ph;
-
-/* multiplex ih and il to get signals together */
- return (il | (ih << 6));
-}
-
-/* decode function, result in xout1 and xout2 */
-
-void
-decode (int input)
-{
- int i;
- long int xa1, xa2; /* qmf accumulators */
- const int *h_ptr;
- int *ac_ptr, *ac_ptr1, *ad_ptr, *ad_ptr1;
-
-/* split transmitted word from input into ilr and ih */
- ilr = input & 0x3f;
- ih = input >> 6;
-
-/* LOWER SUB_BAND DECODER */
-
-/* filtez: compute predictor output for zero section */
- dec_szl = filtez (dec_del_bpl, dec_del_dltx);
-
-/* filtep: compute predictor output signal for pole section */
- dec_spl = filtep (dec_rlt1, dec_al1, dec_rlt2, dec_al2);
-
- dec_sl = dec_spl + dec_szl;
-
-/* compute quantized difference signal for adaptive predic */
- dec_dlt = ((long) dec_detl * qq4_code4_table[ilr >> 2]) >> 15;
-
-/* compute quantized difference signal for decoder output */
- dl = ((long) dec_detl * qq6_code6_table[il]) >> 15;
-
- rl = dl + dec_sl;
-
-/* logscl: quantizer scale factor adaptation in the lower sub-band */
- dec_nbl = logscl (ilr, dec_nbl);
-
-/* scalel: computes quantizer scale factor in the lower sub band */
- dec_detl = scalel (dec_nbl, 8);
-
-/* parrec - add pole predictor output to quantized diff. signal */
-/* for partially reconstructed signal */
- dec_plt = dec_dlt + dec_szl;
-
-/* upzero: update zero section predictor coefficients */
- upzero (dec_dlt, dec_del_dltx, dec_del_bpl);
-
-/* uppol2: update second predictor coefficient apl2 and delay it as al2 */
- dec_al2 = uppol2 (dec_al1, dec_al2, dec_plt, dec_plt1, dec_plt2);
-
-/* uppol1: update first predictor coef. (pole setion) */
- dec_al1 = uppol1 (dec_al1, dec_al2, dec_plt, dec_plt1);
-
-/* recons : compute recontructed signal for adaptive predictor */
- dec_rlt = dec_sl + dec_dlt;
-
-/* done with lower sub band decoder, implement delays for next time */
- dec_rlt2 = dec_rlt1;
- dec_rlt1 = dec_rlt;
- dec_plt2 = dec_plt1;
- dec_plt1 = dec_plt;
-
-/* HIGH SUB-BAND DECODER */
-
-/* filtez: compute predictor output for zero section */
- dec_szh = filtez (dec_del_bph, dec_del_dhx);
-
-/* filtep: compute predictor output signal for pole section */
- dec_sph = filtep (dec_rh1, dec_ah1, dec_rh2, dec_ah2);
-
-/* predic:compute the predictor output value in the higher sub_band decoder */
- dec_sh = dec_sph + dec_szh;
-
-/* in-place compute the quantized difference signal */
- dec_dh = ((long) dec_deth * qq2_code2_table[ih]) >> 15L;
-
-/* logsch: update logarithmic quantizer scale factor in hi sub band */
- dec_nbh = logsch (ih, dec_nbh);
-
-/* scalel: compute the quantizer scale factor in the higher sub band */
- dec_deth = scalel (dec_nbh, 10);
-
-/* parrec: compute partially recontructed signal */
- dec_ph = dec_dh + dec_szh;
-
-/* upzero: update zero section predictor coefficients */
- upzero (dec_dh, dec_del_dhx, dec_del_bph);
-
-/* uppol2: update second predictor coefficient aph2 and delay it as ah2 */
- dec_ah2 = uppol2 (dec_ah1, dec_ah2, dec_ph, dec_ph1, dec_ph2);
-
-/* uppol1: update first predictor coef. (pole setion) */
- dec_ah1 = uppol1 (dec_ah1, dec_ah2, dec_ph, dec_ph1);
-
-/* recons : compute recontructed signal for adaptive predictor */
- rh = dec_sh + dec_dh;
-
-/* done with high band decode, implementing delays for next time here */
- dec_rh2 = dec_rh1;
- dec_rh1 = rh;
- dec_ph2 = dec_ph1;
- dec_ph1 = dec_ph;
-
-/* end of higher sub_band decoder */
-
-/* end with receive quadrature mirror filters */
- xd = rl - rh;
- xs = rl + rh;
-
-/* receive quadrature mirror filters implemented here */
- h_ptr = h;
- ac_ptr = accumc;
- ad_ptr = accumd;
- xa1 = (long) xd *(*h_ptr++);
- xa2 = (long) xs *(*h_ptr++);
-/* main multiply accumulate loop for samples and coefficients */
- for (i = 0; i < 10; i++)
- {
- xa1 += (long) (*ac_ptr++) * (*h_ptr++);
- xa2 += (long) (*ad_ptr++) * (*h_ptr++);
- }
-/* final mult/accumulate */
- xa1 += (long) (*ac_ptr) * (*h_ptr++);
- xa2 += (long) (*ad_ptr) * (*h_ptr++);
-
-/* scale by 2^14 */
- xout1 = xa1 >> 14;
- xout2 = xa2 >> 14;
-
-/* update delay lines */
- ac_ptr1 = ac_ptr - 1;
- ad_ptr1 = ad_ptr - 1;
- for (i = 0; i < 10; i++)
- {
- *ac_ptr-- = *ac_ptr1--;
- *ad_ptr-- = *ad_ptr1--;
- }
- *ac_ptr = xd;
- *ad_ptr = xs;
-}
-
-/* clear all storage locations */
-
-void
-reset ()
-{
- int i;
-
- detl = dec_detl = 32; /* reset to min scale factor */
- deth = dec_deth = 8;
- nbl = al1 = al2 = plt1 = plt2 = rlt1 = rlt2 = 0;
- nbh = ah1 = ah2 = ph1 = ph2 = rh1 = rh2 = 0;
- dec_nbl = dec_al1 = dec_al2 = dec_plt1 = dec_plt2 = dec_rlt1 = dec_rlt2 = 0;
- dec_nbh = dec_ah1 = dec_ah2 = dec_ph1 = dec_ph2 = dec_rh1 = dec_rh2 = 0;
-
- for (i = 0; i < 6; i++)
- {
- delay_dltx[i] = 0;
- delay_dhx[i] = 0;
- dec_del_dltx[i] = 0;
- dec_del_dhx[i] = 0;
- }
-
- for (i = 0; i < 6; i++)
- {
- delay_bpl[i] = 0;
- delay_bph[i] = 0;
- dec_del_bpl[i] = 0;
- dec_del_bph[i] = 0;
- }
-
- for (i = 0; i < 24; i++)
- tqmf[i] = 0; // i<23
-
- for (i = 0; i < 11; i++)
- {
- accumc[i] = 0;
- accumd[i] = 0;
- }
-}
-
/* filtez - compute predictor output signal (zero section) */
/* input: bpl1-6 and dlt1-6, output: szl */
-int
+ int
filtez (int *bpl, int *dlt)
{
int i;
- long int zl;
- zl = (long) (*bpl++) * (*dlt++);
- for (i = 1; i < 6; i++)
- zl += (long) (*bpl++) * (*dlt++);
+ int zl = 0;
+ //zl = (int) (*bpl++) * (*dlt++);
+ for (i = 1; i < 7; i++)
+ zl += (int) (*bpl++) * (*dlt++);
return ((int) (zl >> 14)); /* x2 here */
}
@@ -592,34 +114,61 @@ filtez (int *bpl, int *dlt)
/* filtep - compute predictor output signal (pole section) */
/* input rlt1-2 and al1-2, output spl */
-int
+ int
filtep (int rlt1, int al1, int rlt2, int al2)
{
- long int pl, pl2;
- pl = 2 * rlt1;
- pl = (long) al1 *pl;
- pl2 = 2 * rlt2;
- pl += (long) al2 *pl2;
+ int pl, pl2;
+ pl = rlt1 << 1 ;
+ pl = (int) al1 *pl;
+ pl2 = rlt2 << 1 ;
+ pl += (int) al2 *pl2;
return ((int) (pl >> 15));
}
/* quantl - quantize the difference signal in the lower sub-band */
-int
+ int
quantl (int el, int detl)
{
+
+ const int decis_levl[30] = {
+ 280, 576, 880, 1200, 1520, 1864, 2208, 2584,
+ 2960, 3376, 3784, 4240, 4696, 5200, 5712, 6288,
+ 6864, 7520, 8184, 8968, 9752, 10712, 11664, 12896,
+ 14120, 15840, 17560, 20456, 23352, 32767
+ };
+ /* decision levels - pre-multiplied by 8, 0 to indicate end */
+ /* quantization table 31 long to make quantl look-up easier,
+ last entry is for mil=30 case when wd is max */
+ const int quant26bt_pos[31] = {
+ 61, 60, 59, 58, 57, 56, 55, 54,
+ 53, 52, 51, 50, 49, 48, 47, 46,
+ 45, 44, 43, 42, 41, 40, 39, 38,
+ 37, 36, 35, 34, 33, 32, 32
+ };
+
+ /* quantization table 31 long to make quantl look-up easier,
+ last entry is for mil=30 case when wd is max */
+ const int quant26bt_neg[31] = {
+ 63, 62, 31, 30, 29, 28, 27, 26,
+ 25, 24, 23, 22, 21, 20, 19, 18,
+ 17, 16, 15, 14, 13, 12, 11, 10,
+ 9, 8, 7, 6, 5, 4, 4
+ };
+
+
int ril, mil;
- long int wd, decis;
+ int wd, decis;
-/* abs of difference signal */
+ /* abs of difference signal */
wd = abs (el);
-/* determine mil based on decision levels and detl gain */
+ /* determine mil based on decision levels and detl gain */
for (mil = 0; mil < 30; mil++)
- {
- decis = (decis_levl[mil] * (long) detl) >> 15L;
- if (wd <= decis)
- break;
- }
-/* if mil=30 then wd is less than all decision levels */
+ {
+ decis = (decis_levl[mil] * (int) detl) >> 15L;
+ if (wd <= decis)
+ break;
+ }
+ /* if mil=30 then wd is less than all decision levels */
if (el >= 0)
ril = quant26bt_pos[mil];
else
@@ -630,11 +179,19 @@ quantl (int el, int detl)
/* logscl - update log quantizer scale factor in lower sub-band */
/* note that nbl is passed and returned */
-int
+ int
logscl (int il, int nbl)
{
- long int wd;
- wd = ((long) nbl * 127L) >> 7L; /* leak factor 127/128 */
+ const int wl_code_table[16] = {
+ -60, 3042, 1198, 538, 334, 172, 58, -30,
+ 3042, 1198, 538, 334, 172, 58, -30, -60
+ };
+
+ int wd;
+ int tmp = nbl;
+ int val = tmp << 7;
+ val -= tmp;
+ wd = (val) >> 7L; /* leak factor 127/128 */
nbl = (int) wd + wl_code_table[il >> 2];
if (nbl < 0)
nbl = 0;
@@ -645,10 +202,17 @@ logscl (int il, int nbl)
/* scalel: compute quantizer scale factor in lower or upper sub-band*/
-int
+ int
scalel (int nbl, int shift_constant)
{
+ const int ilb_table[32] = {
+ 2048, 2093, 2139, 2186, 2233, 2282, 2332, 2383,
+ 2435, 2489, 2543, 2599, 2656, 2714, 2774, 2834,
+ 2896, 2960, 3025, 3091, 3158, 3228, 3298, 3371,
+ 3444, 3520, 3597, 3676, 3756, 3838, 3922, 4008
+ };
int wd1, wd2, wd3;
+
wd1 = (nbl >> 6) & 31;
wd2 = nbl >> 11;
wd3 = ilb_table[wd1] >> (shift_constant + 1 - wd2);
@@ -658,31 +222,37 @@ scalel (int nbl, int shift_constant)
/* upzero - inputs: dlt, dlti[0-5], bli[0-5], outputs: updated bli[0-5] */
/* also implements delay of bli and update of dlti from dlt */
-void
+ void
upzero (int dlt, int *dlti, int *bli)
{
int i, wd2, wd3;
-/*if dlt is zero, then no sum into bli */
+ /*if dlt is zero, then no sum into bli */
if (dlt == 0)
+ {
+ for (i = 0; i < 6; i++)
{
- for (i = 0; i < 6; i++)
- {
- bli[i] = (int) ((255L * bli[i]) >> 8L); /* leak factor of 255/256 */
- }
+ int tmp = bli[i];
+ int val = tmp << 8;
+ val -= tmp;
+ bli[i] = (int) (val) >> 8L; /* leak factor of 255/256 */
}
+ }
else
+ {
+ for (i = 0; i < 6; i++)
{
- for (i = 0; i < 6; i++)
- {
- if ((long) dlt * dlti[i] >= 0)
- wd2 = 128;
- else
- wd2 = -128;
- wd3 = (int) ((255L * bli[i]) >> 8L); /* leak factor of 255/256 */
- bli[i] = wd2 + wd3;
- }
+ if ((int) dlt * dlti[i] >= 0)
+ wd2 = 128;
+ else
+ wd2 = -128;
+ int tmp = bli[i];
+ int val = tmp << 8;
+ val -= tmp;
+ wd3 = (int) (val) >> 8L; /* leak factor of 255/256 */
+ bli[i] = wd2 + wd3;
}
-/* implement delay line for dlt */
+ }
+ /* implement delay line for dlt */
dlti[5] = dlti[4];
dlti[4] = dlti[3];
dlti[3] = dlti[2];
@@ -694,26 +264,29 @@ upzero (int dlt, int *dlti, int *bli)
/* uppol2 - update second predictor coefficient (pole section) */
/* inputs: al1, al2, plt, plt1, plt2. outputs: apl2 */
-int
+ int
uppol2 (int al1, int al2, int plt, int plt1, int plt2)
{
- long int wd2, wd4;
+ int wd2, wd4;
int apl2;
- wd2 = 4L * (long) al1;
- if ((long) plt * plt1 >= 0L)
+ wd2 = (int) al1 << 2;
+ if ((int) plt * plt1 >= 0L)
wd2 = -wd2; /* check same sign */
wd2 = wd2 >> 7; /* gain of 1/128 */
- if ((long) plt * plt2 >= 0L)
- {
- wd4 = wd2 + 128; /* same sign case */
- }
+ if ((int) plt * plt2 >= 0L)
+ {
+ wd4 = wd2 + 128; /* same sign case */
+ }
else
- {
- wd4 = wd2 - 128;
- }
- apl2 = wd4 + (127L * (long) al2 >> 7L); /* leak factor of 127/128 */
-
-/* apl2 is limited to +-.75 */
+ {
+ wd4 = wd2 - 128;
+ }
+ int tmp = al2;
+ int val = tmp << 7;
+ val -= tmp;
+ apl2 = wd4 + (val >> 7L); /* leak factor of 127/128 */
+
+ /* apl2 is limited to +-.75 */
if (apl2 > 12288)
apl2 = 12288;
if (apl2 < -12288)
@@ -724,21 +297,24 @@ uppol2 (int al1, int al2, int plt, int plt1, int plt2)
/* uppol1 - update first predictor coefficient (pole section) */
/* inputs: al1, apl2, plt, plt1. outputs: apl1 */
-int
+ int
uppol1 (int al1, int apl2, int plt, int plt1)
{
- long int wd2;
+ int wd2;
int wd3, apl1;
- wd2 = ((long) al1 * 255L) >> 8L; /* leak factor of 255/256 */
- if ((long) plt * plt1 >= 0L)
- {
- apl1 = (int) wd2 + 192; /* same sign case */
- }
+ int tmp = al1;
+ int val = tmp << 8;
+ val -= tmp;
+ wd2 = (val) >> 8L; /* leak factor of 255/256 */
+ if ((int) plt * plt1 >= 0L)
+ {
+ apl1 = (int) wd2 + 192; /* same sign case */
+ }
else
- {
- apl1 = (int) wd2 - 192;
- }
-/* note: wd3= .9375-.75 is always positive */
+ {
+ apl1 = (int) wd2 - 192;
+ }
+ /* note: wd3= .9375-.75 is always positive */
wd3 = 15360 - apl2; /* limit value */
if (apl1 > wd3)
apl1 = wd3;
@@ -750,11 +326,18 @@ uppol1 (int al1, int apl2, int plt, int plt1)
/* logsch - update log quantizer scale factor in higher sub-band */
/* note that nbh is passed and returned */
-int
+ int
logsch (int ih, int nbh)
{
int wd;
- wd = ((long) nbh * 127L) >> 7L; /* leak factor 127/128 */
+ const int wh_code_table[4] = {
+ 798, -214, 798, -214
+ };
+
+ int tmp = nbh;
+ int val = tmp << 7;
+ val -= tmp;
+ wd = (val) >> 7L; /* leak factor 127/128 */
nbh = wd + wh_code_table[ih];
if (nbh < 0)
nbh = 0;
@@ -764,119 +347,549 @@ logsch (int ih, int nbh)
}
/*
-+--------------------------------------------------------------------------+
-| * Test Vectors (added for CHStone) |
-| test_data : input data |
-| test_compressed : expected output data for "encode" |
-| test_result : expected output data for "decode" |
-+--------------------------------------------------------------------------+
-*/
+ +--------------------------------------------------------------------------+
+ | * Test Vectors (added for CHStone) |
+ | test_data : input data |
+ | test_compressed : expected output data for "encode" |
+ | test_result : expected output data for "decode" |
+ +--------------------------------------------------------------------------+
+ */
+
+/* G722 C code */
-#define SIZE 100
-#define IN_END 100
-const int test_data[SIZE] = {
- 0x44, 0x44, 0x44, 0x44, 0x44,
- 0x44, 0x44, 0x44, 0x44, 0x44,
- 0x44, 0x44, 0x44, 0x44, 0x44,
- 0x44, 0x44, 0x43, 0x43, 0x43,
- 0x43, 0x43, 0x43, 0x43, 0x42,
- 0x42, 0x42, 0x42, 0x42, 0x42,
- 0x41, 0x41, 0x41, 0x41, 0x41,
- 0x40, 0x40, 0x40, 0x40, 0x40,
- 0x40, 0x40, 0x40, 0x3f, 0x3f,
- 0x3f, 0x3f, 0x3f, 0x3e, 0x3e,
- 0x3e, 0x3e, 0x3e, 0x3e, 0x3d,
- 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,
- 0x3c, 0x3c, 0x3c, 0x3c, 0x3c,
- 0x3c, 0x3c, 0x3c, 0x3c, 0x3b,
- 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
- 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
- 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
- 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
- 0x3b, 0x3b, 0x3c, 0x3c, 0x3c,
- 0x3c, 0x3c, 0x3c, 0x3c, 0x3c
-};
-int compressed[SIZE], result[SIZE];
-const int test_compressed[SIZE] = {
- 0xfd, 0xde, 0x77, 0xba, 0xf2,
- 0x90, 0x20, 0xa0, 0xec, 0xed,
- 0xef, 0xf1, 0xf3, 0xf4, 0xf5,
- 0xf5, 0xf5, 0xf5, 0xf6, 0xf6,
- 0xf6, 0xf7, 0xf8, 0xf7, 0xf8,
- 0xf7, 0xf9, 0xf8, 0xf7, 0xf9,
- 0xf8, 0xf8, 0xf6, 0xf8, 0xf8,
- 0xf7, 0xf9, 0xf9, 0xf9, 0xf8,
- 0xf7, 0xfa, 0xf8, 0xf8, 0xf7,
- 0xfb, 0xfa, 0xf9, 0xf8, 0xf8
-};
-const int test_result[SIZE] = {
- 0, 0xffffffff, 0xffffffff, 0, 0,
- 0xffffffff, 0, 0, 0xffffffff, 0xffffffff,
- 0, 0, 0x1, 0x1, 0,
- 0xfffffffe, 0xffffffff, 0xfffffffe, 0, 0xfffffffc,
- 0x1, 0x1, 0x1, 0xfffffffb, 0x2,
- 0x2, 0x3, 0xb, 0x14, 0x14,
- 0x16, 0x18, 0x20, 0x21, 0x26,
- 0x27, 0x2e, 0x2f, 0x33, 0x32,
- 0x35, 0x33, 0x36, 0x34, 0x37,
- 0x34, 0x37, 0x35, 0x38, 0x36,
- 0x39, 0x38, 0x3b, 0x3a, 0x3f,
- 0x3f, 0x40, 0x3a, 0x3d, 0x3e,
- 0x41, 0x3c, 0x3e, 0x3f, 0x42,
- 0x3e, 0x3b, 0x37, 0x3b, 0x3e,
- 0x41, 0x3b, 0x3b, 0x3a, 0x3b,
- 0x36, 0x39, 0x3b, 0x3f, 0x3c,
- 0x3b, 0x37, 0x3b, 0x3d, 0x41,
- 0x3d, 0x3e, 0x3c, 0x3e, 0x3b,
- 0x3a, 0x37, 0x3b, 0x3e, 0x41,
- 0x3c, 0x3b, 0x39, 0x3a, 0x36
-};
-
-void
-adpcm_main ()
+ void
+adpcm_main (const int test_data[SIZE], int compressed[SIZE], int result[SIZE])
{
+ /* variables for transimit quadrature mirror filter here */
+ int tqmf[24];
+
+ /* QMF filter coefficients:
+ scaled by a factor of 4 compared to G722 CCITT recomendation */
+ const int h[24] = {
+ 12, -44, -44, 212, 48, -624, 128, 1448,
+ -840, -3220, 3804, 15504, 15504, 3804, -3220, -840,
+ 1448, 128, -624, 48, 212, -44, -44, 12
+ };
+
+
+ /* variables for receive quadrature mirror filter here */
+ int accumc[11], accumd[11];
+
+ const int qq2_code2_table[4] = {
+ -7408, -1616, 7408, 1616
+ };
+
+ const int qq4_code4_table[16] = {
+ 0, -20456, -12896, -8968, -6288, -4240, -2584, -1200,
+ 20456, 12896, 8968, 6288, 4240, 2584, 1200, 0
+ };
+ const int qq6_code6_table[64] = {
+ -136, -136, -136, -136, -24808, -21904, -19008, -16704,
+ -14984, -13512, -12280, -11192, -10232, -9360, -8576, -7856,
+ -7192, -6576, -6000, -5456, -4944, -4464, -4008, -3576,
+ -3168, -2776, -2400, -2032, -1688, -1360, -1040, -728,
+ 24808, 21904, 19008, 16704, 14984, 13512, 12280, 11192,
+ 10232, 9360, 8576, 7856, 7192, 6576, 6000, 5456,
+ 4944, 4464, 4008, 3576, 3168, 2776, 2400, 2032,
+ 1688, 1360, 1040, 728, 432, 136, -432, -136
+ };
+
+
+ int delay_dhx[6];
+
+ int delay_bph[6];
+
+ int dec_del_bpl[6];
+
+ int dec_del_dltx[6];
+
+ /* variables used in filtez */
+ int dec_del_bph[6];
+
+ int dec_del_dhx[6];
+
+ int delay_bpl[6];
+
+ int delay_dltx[6];
+ /* outputs of decode() */
+ int xout1, xout2;
+
+ int xs, xd;
+
+ /* variables for encoder (hi and lo) here */
+
+ int il, szl, spl, sl, el;
+
+
+ int nbl; /* delay line */
+ int al1, al2;
+ int plt, plt1, plt2;
+ int dlt;
+ int rlt, rlt1, rlt2;
+
+ int detl;
+
+ int deth;
+ int sh; /* this comes from adaptive predictor */
+ int eh;
+
+ int ah1, ah2;
+ int ph1, ph2;
+ int rh1, rh2;
+
+ int dh, ih;
+ int nbh, szh;
+ int sph, ph, yh, rh;
+
+ /* variables for decoder here */
+ int ilr, rl;
+ int dec_deth, dec_detl, dec_dlt;
+ int dec_plt, dec_plt1, dec_plt2;
+ int dec_szl, dec_spl, dec_sl;
+ int dec_rlt1, dec_rlt2, dec_rlt;
+ int dec_al1, dec_al2;
+ int dl;
+ int dec_nbl, dec_dh, dec_nbh;
+
+ int dec_szh;
+ /* variables used in filtep */
+ int dec_rh1, dec_rh2;
+ int dec_ah1, dec_ah2;
+ int dec_ph, dec_sph;
+
+ int dec_sh;
+
+ int dec_ph1, dec_ph2;
int i, j;
-/* reset, initialize required memory */
- reset ();
+ /* reset, initialize required memory */
- j = 10;
+ detl = dec_detl = 32; /* reset to min scale factor */
+ deth = dec_deth = 8;
+ nbl = al1 = al2 = plt1 = plt2 = rlt1 = rlt2 = 0;
+ nbh = ah1 = ah2 = ph1 = ph2 = rh1 = rh2 = 0;
+ dec_nbl = dec_al1 = dec_al2 = dec_plt1 = dec_plt2 = dec_rlt1 = dec_rlt2 = 0;
+ dec_nbh = dec_ah1 = dec_ah2 = dec_ph1 = dec_ph2 = dec_rh1 = dec_rh2 = 0;
+
+ for (i = 0; i < 6; i++)
+ {
+ delay_dltx[i] = 0;
+ delay_dhx[i] = 0;
+ dec_del_dltx[i] = 0;
+ dec_del_dhx[i] = 0;
+ }
+
+ for (i = 0; i < 6; i++)
+ {
+ delay_bpl[i] = 0;
+ delay_bph[i] = 0;
+ dec_del_bpl[i] = 0;
+ dec_del_bph[i] = 0;
+ }
+
+ for (i = 0; i < 24; i++)
+ tqmf[i] = 0; // i<23
+
+ for (i = 0; i < 11; i++)
+ {
+ accumc[i] = 0;
+ accumd[i] = 0;
+ }
for (i = 0; i < IN_END; i += 2)
+ {
+ int xin1 = test_data[i + 0];
+ int xin2 = test_data[i + 1];
+ const int *h_ptr;
+ int *tqmf_ptr, *tqmf_ptr1;
+ int xa = 0, xb = 0;
+ int decis;
+
+ /* transmit quadrature mirror filters implemented here */
+ h_ptr = h;
+ tqmf_ptr = tqmf;
+ /* main multiply accumulate loop for samples and coefficients */
+ for (int j = 0; j < 12; j++)
+ {
+ int opA1, opB1;
+ int opA2, opB2;
+ if(j==11){
+ opA1 = (*tqmf_ptr++);
+ opB1 = (*h_ptr++);
+ opA2 = (*tqmf_ptr);
+ opB2 = (*h_ptr++);
+ }
+ else{
+ opA1 = (*tqmf_ptr++);
+ opB1 = (*h_ptr++);
+ opA2 = (*tqmf_ptr++);
+ opB2 = (*h_ptr++);
+ }
+ xa += (int) opA1 * opB1;
+ xb += (int) opA2 * opB2;
+ }
+
+ /* update delay line tqmf */
+ tqmf_ptr1 = tqmf_ptr - 2;
+ for (int j = 0; j < 22; j++)
+ *tqmf_ptr-- = *tqmf_ptr1--;
+ *tqmf_ptr-- = xin1;
+ *tqmf_ptr = xin2;
+
+ /* scale outputs */
+ int xl = (xa + xb) >> 15;
+ int xh = (xa - xb) >> 15;
+
+ /* end of quadrature mirror filter code */
+
+ /* starting with lower sub band encoder */
+
+ /* filtez - compute predictor output section - zero section */
+ szl = filtez (delay_bpl, delay_dltx);
+
+ /* filtep - compute predictor output signal (pole section) */
+ spl = filtep (rlt1, al1, rlt2, al2);
+
+ /* compute the predictor output value in the lower sub_band encoder */
+ sl = szl + spl;
+ el = xl - sl;
+
+ /* quantl: quantize the difference signal */
+ il = quantl (el, detl);
+
+ /* computes quantized difference signal */
+ /* for invqbl, truncate by 2 lsbs, so mode = 3 */
+ dlt = ((int) detl * qq4_code4_table[il >> 2]) >> 15;
+
+ /* logscl: updates logarithmic quant. scale factor in low sub band */
+ nbl = logscl (il, nbl);
+
+ /* scalel: compute the quantizer scale factor in the lower sub band */
+ /* calling parameters nbl and 8 (constant such that scalel can be scaleh) */
+ detl = scalel (nbl, 8);
+
+ /* parrec - simple addition to compute recontructed signal for adaptive pred */
+ plt = dlt + szl;
+
+ /* upzero: update zero section predictor coefficients (sixth order)*/
+ /* calling parameters: dlt, dlt1, dlt2, ..., dlt6 from dlt */
+ /* bpli (linear_buffer in which all six values are delayed */
+ /* return params: updated bpli, delayed dltx */
+ upzero (dlt, delay_dltx, delay_bpl);
+
+ /* uppol2- update second predictor coefficient apl2 and delay it as al2 */
+ /* calling parameters: al1, al2, plt, plt1, plt2 */
+ al2 = uppol2 (al1, al2, plt, plt1, plt2);
+
+ /* uppol1 :update first predictor coefficient apl1 and delay it as al1 */
+ /* calling parameters: al1, apl2, plt, plt1 */
+ al1 = uppol1 (al1, al2, plt, plt1);
+
+ /* recons : compute recontructed signal for adaptive predictor */
+ rlt = sl + dlt;
+
+ /* done with lower sub_band encoder; now implement delays for next time*/
+ rlt2 = rlt1;
+ rlt1 = rlt;
+ plt2 = plt1;
+ plt1 = plt;
+
+ /* high band encode */
+
+ szh = filtez (delay_bph, delay_dhx);
+
+ sph = filtep (rh1, ah1, rh2, ah2);
+
+ /* predic: sh = sph + szh */
+ sh = sph + szh;
+ /* subtra: eh = xh - sh */
+ eh = xh - sh;
+
+ /* quanth - quantization of difference signal for higher sub-band */
+ /* quanth: in-place for speed params: eh, deth (has init. value) */
+ if (eh >= 0)
+ {
+ ih = 3; /* 2,3 are pos codes */
+ }
+ else
{
- compressed[i / 2] = encode (test_data[i], test_data[i + 1]);
+ ih = 1; /* 0,1 are neg codes */
}
+ decis = (564L * (int) deth) >> 12L;
+ if (abs (eh) > decis)
+ ih--; /* mih = 2 case */
+
+ /* compute the quantized difference signal, higher sub-band*/
+ dh = ((int) deth * qq2_code2_table[ih]) >> 15L;
+
+ /* logsch: update logarithmic quantizer scale factor in hi sub-band*/
+ nbh = logsch (ih, nbh);
+
+ /* note : scalel and scaleh use same code, different parameters */
+ deth = scalel (nbh, 10);
+
+ /* parrec - add pole predictor output to quantized diff. signal */
+ ph = dh + szh;
+
+ /* upzero: update zero section predictor coefficients (sixth order) */
+ /* calling parameters: dh, dhi, bphi */
+ /* return params: updated bphi, delayed dhx */
+ upzero (dh, delay_dhx, delay_bph);
+
+ /* uppol2: update second predictor coef aph2 and delay as ah2 */
+ /* calling params: ah1, ah2, ph, ph1, ph2 */
+ ah2 = uppol2 (ah1, ah2, ph, ph1, ph2);
+
+ /* uppol1: update first predictor coef. aph2 and delay it as ah1 */
+ ah1 = uppol1 (ah1, ah2, ph, ph1);
+
+ /* recons for higher sub-band */
+ yh = sh + dh;
+
+ /* done with higher sub-band encoder, now Delay for next time */
+ rh2 = rh1;
+ rh1 = yh;
+ ph2 = ph1;
+ ph1 = ph;
+
+ /* multiplex ih and il to get signals together */
+ compressed[i/2] = (il | (ih << 6));
+ }
for (i = 0; i < IN_END; i += 2)
+ {
+ int input = compressed[i / 2];
+
+ int xa1, xa2; /* qmf accumulators */
+ const int *h_ptr;
+ int *ac_ptr, *ac_ptr1, *ad_ptr, *ad_ptr1;
+
+ /* split transmitted word from input into ilr and ih */
+ ilr = input & 0x3f;
+ ih = input >> 6;
+
+ /* LOWER SUB_BAND DECODER */
+
+ /* filtez: compute predictor output for zero section */
+ dec_szl = filtez (dec_del_bpl, dec_del_dltx);
+
+ /* filtep: compute predictor output signal for pole section */
+ dec_spl = filtep (dec_rlt1, dec_al1, dec_rlt2, dec_al2);
+
+ dec_sl = dec_spl + dec_szl;
+
+ /* compute quantized difference signal for adaptive predic */
+ dec_dlt = ((int) dec_detl * qq4_code4_table[ilr >> 2]) >> 15;
+
+ /* compute quantized difference signal for decoder output */
+ dl = ((int) dec_detl * qq6_code6_table[il]) >> 15;
+
+ rl = dl + dec_sl;
+
+ /* logscl: quantizer scale factor adaptation in the lower sub-band */
+ dec_nbl = logscl (ilr, dec_nbl);
+
+ /* scalel: computes quantizer scale factor in the lower sub band */
+ dec_detl = scalel (dec_nbl, 8);
+
+ /* parrec - add pole predictor output to quantized diff. signal */
+ /* for partially reconstructed signal */
+ dec_plt = dec_dlt + dec_szl;
+
+ /* upzero: update zero section predictor coefficients */
+ upzero (dec_dlt, dec_del_dltx, dec_del_bpl);
+
+ /* uppol2: update second predictor coefficient apl2 and delay it as al2 */
+ dec_al2 = uppol2 (dec_al1, dec_al2, dec_plt, dec_plt1, dec_plt2);
+
+ /* uppol1: update first predictor coef. (pole setion) */
+ dec_al1 = uppol1 (dec_al1, dec_al2, dec_plt, dec_plt1);
+
+ /* recons : compute recontructed signal for adaptive predictor */
+ dec_rlt = dec_sl + dec_dlt;
+
+ /* done with lower sub band decoder, implement delays for next time */
+ dec_rlt2 = dec_rlt1;
+ dec_rlt1 = dec_rlt;
+ dec_plt2 = dec_plt1;
+ dec_plt1 = dec_plt;
+
+ /* HIGH SUB-BAND DECODER */
+
+ /* filtez: compute predictor output for zero section */
+ dec_szh = filtez (dec_del_bph, dec_del_dhx);
+
+ /* filtep: compute predictor output signal for pole section */
+ dec_sph = filtep (dec_rh1, dec_ah1, dec_rh2, dec_ah2);
+
+ /* predic:compute the predictor output value in the higher sub_band decoder */
+ dec_sh = dec_sph + dec_szh;
+
+ /* in-place compute the quantized difference signal */
+ dec_dh = ((int) dec_deth * qq2_code2_table[ih]) >> 15L;
+
+ /* logsch: update logarithmic quantizer scale factor in hi sub band */
+ dec_nbh = logsch (ih, dec_nbh);
+
+ /* scalel: compute the quantizer scale factor in the higher sub band */
+ dec_deth = scalel (dec_nbh, 10);
+
+ /* parrec: compute partially recontructed signal */
+ dec_ph = dec_dh + dec_szh;
+
+ /* upzero: update zero section predictor coefficients */
+ upzero (dec_dh, dec_del_dhx, dec_del_bph);
+
+ /* uppol2: update second predictor coefficient aph2 and delay it as ah2 */
+ dec_ah2 = uppol2 (dec_ah1, dec_ah2, dec_ph, dec_ph1, dec_ph2);
+
+ /* uppol1: update first predictor coef. (pole setion) */
+ dec_ah1 = uppol1 (dec_ah1, dec_ah2, dec_ph, dec_ph1);
+
+ /* recons : compute recontructed signal for adaptive predictor */
+ rh = dec_sh + dec_dh;
+
+ /* done with high band decode, implementing delays for next time here */
+ dec_rh2 = dec_rh1;
+ dec_rh1 = rh;
+ dec_ph2 = dec_ph1;
+ dec_ph1 = dec_ph;
+
+ /* end of higher sub_band decoder */
+
+ /* end with receive quadrature mirror filters */
+ xd = rl - rh;
+ xs = rl + rh;
+
+ /* receive quadrature mirror filters implemented here */
+ h_ptr = h;
+ ac_ptr = accumc;
+ ad_ptr = accumd;
+ /* main multiply accumulate loop for samples and coefficients */
+ for (int j = 0; j < 12; j++)
+ {
+ int opA1, opB1;
+ int opA2, opB2;
+ if(i==0){
+ opA1 = xd;
+ opB1 = (*h_ptr++);
+ opA2 = xs;
+ opB2 = (*h_ptr++);
+ }
+ else if(i==11){
+ opA1 = (*ac_ptr++);
+ opB1 = (*h_ptr++);
+ opA2 = (*ad_ptr++);
+ opB2 = (*h_ptr++);
+ }
+ else{
+ opA1 = (*ac_ptr);
+ opB1 = (*h_ptr++);
+ opA2 = (*ad_ptr);
+ opB2 = (*h_ptr++);
+ }
+ xa1 += (int) opA1 * opB1;
+ xa2 += (int) opA2 * opB2;
+ }
+
+ /* scale by 2^14 */
+ xout1 = xa1 >> 14;
+ xout2 = xa2 >> 14;
+
+ /* update delay lines */
+ ac_ptr1 = ac_ptr - 1;
+ ad_ptr1 = ad_ptr - 1;
+ for (j = 0; j < 10; j++)
{
- decode (compressed[i / 2]);
- result[i] = xout1;
- result[i + 1] = xout2;
+ *ac_ptr-- = *ac_ptr1--;
+ *ad_ptr-- = *ad_ptr1--;
}
+ *ac_ptr = xd;
+ *ad_ptr = xs;
+ result[i] = xout1;
+ result[i + 1] = xout2;
+ }
}
-int
+ int
main ()
{
int i;
int main_result;
- main_result = 0;
- adpcm_main ();
- for (i = 0; i < IN_END / 2; i++)
- {
- if (compressed[i] != test_compressed[i])
- {
- main_result += 1;
- }
- }
- for (i = 0; i < IN_END; i++)
- {
- if (result[i] != test_result[i])
- {
- main_result += 1;
- }
- }
- printf ("%d\n", main_result);
- return main_result;
+ const int test_data[SIZE] = {
+ 0x44, 0x44, 0x44, 0x44, 0x44,
+ 0x44, 0x44, 0x44, 0x44, 0x44,
+ 0x44, 0x44, 0x44, 0x44, 0x44,
+ 0x44, 0x44, 0x43, 0x43, 0x43,
+ 0x43, 0x43, 0x43, 0x43, 0x42,
+ 0x42, 0x42, 0x42, 0x42, 0x42,
+ 0x41, 0x41, 0x41, 0x41, 0x41,
+ 0x40, 0x40, 0x40, 0x40, 0x40,
+ 0x40, 0x40, 0x40, 0x3f, 0x3f,
+ 0x3f, 0x3f, 0x3f, 0x3e, 0x3e,
+ 0x3e, 0x3e, 0x3e, 0x3e, 0x3d,
+ 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,
+ 0x3c, 0x3c, 0x3c, 0x3c, 0x3c,
+ 0x3c, 0x3c, 0x3c, 0x3c, 0x3b,
+ 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+ 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+ 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+ 0x3b, 0x3b, 0x3b, 0x3b, 0x3b,
+ 0x3b, 0x3b, 0x3c, 0x3c, 0x3c,
+ 0x3c, 0x3c, 0x3c, 0x3c, 0x3c
+ };
+ int compressed[SIZE], result[SIZE];
+ const int test_compressed[SIZE] = {
+ 0xfd, 0xde, 0x77, 0xba, 0xf2,
+ 0x90, 0x20, 0xa0, 0xec, 0xed,
+ 0xef, 0xf1, 0xf3, 0xf4, 0xf5,
+ 0xf5, 0xf5, 0xf5, 0xf6, 0xf6,
+ 0xf6, 0xf7, 0xf8, 0xf7, 0xf8,
+ 0xf7, 0xf9, 0xf8, 0xf7, 0xf9,
+ 0xf8, 0xf8, 0xf6, 0xf8, 0xf8,
+ 0xf7, 0xf9, 0xf9, 0xf9, 0xf8,
+ 0xf7, 0xfa, 0xf8, 0xf8, 0xf7,
+ 0xfb, 0xfa, 0xf9, 0xf8, 0xf8
+ };
+ const int test_result[SIZE] = {
+ 0, 0xffffffff, 0xffffffff, 0, 0,
+ 0xffffffff, 0, 0, 0xffffffff, 0xffffffff,
+ 0, 0, 0x1, 0x1, 0,
+ 0xfffffffe, 0xffffffff, 0xfffffffe, 0, 0xfffffffc,
+ 0x1, 0x1, 0x1, 0xfffffffb, 0x2,
+ 0x2, 0x3, 0xb, 0x14, 0x14,
+ 0x16, 0x18, 0x20, 0x21, 0x26,
+ 0x27, 0x2e, 0x2f, 0x33, 0x32,
+ 0x35, 0x33, 0x36, 0x34, 0x37,
+ 0x34, 0x37, 0x35, 0x38, 0x36,
+ 0x39, 0x38, 0x3b, 0x3a, 0x3f,
+ 0x3f, 0x40, 0x3a, 0x3d, 0x3e,
+ 0x41, 0x3c, 0x3e, 0x3f, 0x42,
+ 0x3e, 0x3b, 0x37, 0x3b, 0x3e,
+ 0x41, 0x3b, 0x3b, 0x3a, 0x3b,
+ 0x36, 0x39, 0x3b, 0x3f, 0x3c,
+ 0x3b, 0x37, 0x3b, 0x3d, 0x41,
+ 0x3d, 0x3e, 0x3c, 0x3e, 0x3b,
+ 0x3a, 0x37, 0x3b, 0x3e, 0x41,
+ 0x3c, 0x3b, 0x39, 0x3a, 0x36
+ };
+
+ main_result = 0;
+ adpcm_main (test_data,compressed,result);
+ for (i = 0; i < IN_END / 2; i++)
+ {
+ if (compressed[i] != test_compressed[i])
+ {
+ main_result += 1;
+ }
+ }/*
+ for (i = 0; i < IN_END; i++)
+ {
+ if (result[i] != test_result[i])
+ {
+ main_result += 1;
}
+ }*/
+ return main_result;
+}
diff --git a/benchmarks/CHStone/aes/aes.c b/benchmarks/CHStone/aes/aes.c
index a0cdf2d..efbb5d8 100755
--- a/benchmarks/CHStone/aes/aes.c
+++ b/benchmarks/CHStone/aes/aes.c
@@ -62,17 +62,707 @@
#include <stdio.h>
-int main_result;
+int
+SubByte (int in, const int Sbox[16][16])
+{
+ return Sbox[(in / 16)][(in % 16)];
+}
+
+
+/* **************** key expand ************************ */
+int
+KeySchedule (int type, int key[32], int word[4][120], const int Sbox[16][16])
+{
+ int nk, nb, round_val;
+ int i, j, temp[4];
+ const int Rcon0[30] = {
+ 0x01, 0x02, 0x04, 0x08,
+ 0x10, 0x20, 0x40, 0x80,
+ 0x1b, 0x36, 0x6c, 0xd8,
+ 0xab, 0x4d, 0x9a, 0x2f,
+ 0x5e, 0xbc, 0x63, 0xc6,
+ 0x97, 0x35, 0x6a, 0xd4,
+ 0xb3, 0x7d, 0xfa, 0xef,
+ 0xc5, 0x91,
+ };
+
+
+ switch (type)
+ {
+ case 128128:
+ nk = 4;
+ nb = 4;
+ round_val = 10;
+ break;
+ case 128192:
+ nk = 4;
+ nb = 6;
+ round_val = 12;
+ break;
+ case 128256:
+ nk = 4;
+ nb = 8;
+ round_val = 14;
+ break;
+ case 192128:
+ nk = 6;
+ nb = 4;
+ round_val = 12;
+ break;
+ case 192192:
+ nk = 6;
+ nb = 6;
+ round_val = 12;
+ break;
+ case 192256:
+ nk = 6;
+ nb = 8;
+ round_val = 14;
+ break;
+ case 256128:
+ nk = 8;
+ nb = 4;
+ round_val = 14;
+ break;
+ case 256192:
+ nk = 8;
+ nb = 6;
+ round_val = 14;
+ break;
+ case 256256:
+ nk = 8;
+ nb = 8;
+ round_val = 14;
+ break;
+ default:
+ return -1;
+ }
+ for (j = 0; j < nk; ++j)
+ for (i = 0; i < 4; ++i)
+/* 0 word */
+ word[i][j] = key[i + j * 4];
+
+/* expanded key is generated */
+ for (j = nk; j < nb * (round_val + 1); ++j)
+ {
+
+/* RotByte */
+ if ((j % nk) == 0)
+ {
+ temp[0] = SubByte (word[1][j - 1], Sbox) ^ Rcon0[(j / nk) - 1];
+ temp[1] = SubByte (word[2][j - 1], Sbox);
+ temp[2] = SubByte (word[3][j - 1], Sbox);
+ temp[3] = SubByte (word[0][j - 1], Sbox);
+ }
+ if ((j % nk) != 0)
+ {
+ temp[0] = word[0][j - 1];
+ temp[1] = word[1][j - 1];
+ temp[2] = word[2][j - 1];
+ temp[3] = word[3][j - 1];
+ }
+ if (nk > 6 && j % nk == 4)
+ for (i = 0; i < 4; ++i)
+ temp[i] = SubByte (temp[i], Sbox);
+ for (i = 0; i < 4; ++i)
+ word[i][j] = word[i][j - nk] ^ temp[i];
+ }
+ return 0;
+}
+
+/* ********* ByteSub & ShiftRow ********* */
+void
+ByteSub_ShiftRow (int statemt[32], int nb, const int Sbox[16][16])
+{
+ int temp;
+
+ switch (nb)
+ {
+ case 4:
+ temp = Sbox[statemt[1] >> 4][statemt[1] & 0xf];
+ statemt[1] = Sbox[statemt[5] >> 4][statemt[5] & 0xf];
+ statemt[5] = Sbox[statemt[9] >> 4][statemt[9] & 0xf];
+ statemt[9] = Sbox[statemt[13] >> 4][statemt[13] & 0xf];
+ statemt[13] = temp;
+
+ temp = Sbox[statemt[2] >> 4][statemt[2] & 0xf];
+ statemt[2] = Sbox[statemt[10] >> 4][statemt[10] & 0xf];
+ statemt[10] = temp;
+ temp = Sbox[statemt[6] >> 4][statemt[6] & 0xf];
+ statemt[6] = Sbox[statemt[14] >> 4][statemt[14] & 0xf];
+ statemt[14] = temp;
+
+ temp = Sbox[statemt[3] >> 4][statemt[3] & 0xf];
+ statemt[3] = Sbox[statemt[15] >> 4][statemt[15] & 0xf];
+ statemt[15] = Sbox[statemt[11] >> 4][statemt[11] & 0xf];
+ statemt[11] = Sbox[statemt[7] >> 4][statemt[7] & 0xf];
+ statemt[7] = temp;
+
+ statemt[0] = Sbox[statemt[0] >> 4][statemt[0] & 0xf];
+ statemt[4] = Sbox[statemt[4] >> 4][statemt[4] & 0xf];
+ statemt[8] = Sbox[statemt[8] >> 4][statemt[8] & 0xf];
+ statemt[12] = Sbox[statemt[12] >> 4][statemt[12] & 0xf];
+ break;
+ case 6:
+ temp = Sbox[statemt[1] >> 4][statemt[1] & 0xf];
+ statemt[1] = Sbox[statemt[5] >> 4][statemt[5] & 0xf];
+ statemt[5] = Sbox[statemt[9] >> 4][statemt[9] & 0xf];
+ statemt[9] = Sbox[statemt[13] >> 4][statemt[13] & 0xf];
+ statemt[13] = Sbox[statemt[17] >> 4][statemt[17] & 0xf];
+ statemt[17] = Sbox[statemt[21] >> 4][statemt[21] & 0xf];
+ statemt[21] = temp;
+
+ temp = Sbox[statemt[2] >> 4][statemt[2] & 0xf];
+ statemt[2] = Sbox[statemt[10] >> 4][statemt[10] & 0xf];
+ statemt[10] = Sbox[statemt[18] >> 4][statemt[18] & 0xf];
+ statemt[18] = temp;
+ temp = Sbox[statemt[6] >> 4][statemt[6] & 0xf];
+ statemt[6] = Sbox[statemt[14] >> 4][statemt[14] & 0xf];
+ statemt[14] = Sbox[statemt[22] >> 4][statemt[22] & 0xf];
+ statemt[22] = temp;
+
+ temp = Sbox[statemt[3] >> 4][statemt[3] & 0xf];
+ statemt[3] = Sbox[statemt[15] >> 4][statemt[15] & 0xf];
+ statemt[15] = temp;
+ temp = Sbox[statemt[7] >> 4][statemt[7] & 0xf];
+ statemt[7] = Sbox[statemt[19] >> 4][statemt[19] & 0xf];
+ statemt[19] = temp;
+ temp = Sbox[statemt[11] >> 4][statemt[11] & 0xf];
+ statemt[11] = Sbox[statemt[23] >> 4][statemt[23] & 0xf];
+ statemt[23] = temp;
+
+ statemt[0] = Sbox[statemt[0] >> 4][statemt[0] & 0xf];
+ statemt[4] = Sbox[statemt[4] >> 4][statemt[4] & 0xf];
+ statemt[8] = Sbox[statemt[8] >> 4][statemt[8] & 0xf];
+ statemt[12] = Sbox[statemt[12] >> 4][statemt[12] & 0xf];
+ statemt[16] = Sbox[statemt[16] >> 4][statemt[16] & 0xf];
+ statemt[20] = Sbox[statemt[20] >> 4][statemt[20] & 0xf];
+ break;
+ case 8:
+ temp = Sbox[statemt[1] >> 4][statemt[1] & 0xf];
+ statemt[1] = Sbox[statemt[5] >> 4][statemt[5] & 0xf];
+ statemt[5] = Sbox[statemt[9] >> 4][statemt[9] & 0xf];
+ statemt[9] = Sbox[statemt[13] >> 4][statemt[13] & 0xf];
+ statemt[13] = Sbox[statemt[17] >> 4][statemt[17] & 0xf];
+ statemt[17] = Sbox[statemt[21] >> 4][statemt[21] & 0xf];
+ statemt[21] = Sbox[statemt[25] >> 4][statemt[25] & 0xf];
+ statemt[25] = Sbox[statemt[29] >> 4][statemt[29] & 0xf];
+ statemt[29] = temp;
+
+ temp = Sbox[statemt[2] >> 4][statemt[2] & 0xf];
+ statemt[2] = Sbox[statemt[14] >> 4][statemt[14] & 0xf];
+ statemt[14] = Sbox[statemt[26] >> 4][statemt[26] & 0xf];
+ statemt[26] = Sbox[statemt[6] >> 4][statemt[6] & 0xf];
+ statemt[6] = Sbox[statemt[18] >> 4][statemt[18] & 0xf];
+ statemt[18] = Sbox[statemt[30] >> 4][statemt[30] & 0xf];
+ statemt[30] = Sbox[statemt[10] >> 4][statemt[10] & 0xf];
+ statemt[10] = Sbox[statemt[22] >> 4][statemt[22] & 0xf];
+ statemt[22] = temp;
+
+ temp = Sbox[statemt[3] >> 4][statemt[3] & 0xf];
+ statemt[3] = Sbox[statemt[19] >> 4][statemt[19] & 0xf];
+ statemt[19] = temp;
+ temp = Sbox[statemt[7] >> 4][statemt[7] & 0xf];
+ statemt[7] = Sbox[statemt[23] >> 4][statemt[23] & 0xf];
+ statemt[23] = temp;
+ temp = Sbox[statemt[11] >> 4][statemt[11] & 0xf];
+ statemt[11] = Sbox[statemt[27] >> 4][statemt[27] & 0xf];
+ statemt[27] = temp;
+ temp = Sbox[statemt[15] >> 4][statemt[15] & 0xf];
+ statemt[15] = Sbox[statemt[31] >> 4][statemt[31] & 0xf];
+ statemt[31] = temp;
+
+ statemt[0] = Sbox[statemt[0] >> 4][statemt[0] & 0xf];
+ statemt[4] = Sbox[statemt[4] >> 4][statemt[4] & 0xf];
+ statemt[8] = Sbox[statemt[8] >> 4][statemt[8] & 0xf];
+ statemt[12] = Sbox[statemt[12] >> 4][statemt[12] & 0xf];
+ statemt[16] = Sbox[statemt[16] >> 4][statemt[16] & 0xf];
+ statemt[20] = Sbox[statemt[20] >> 4][statemt[20] & 0xf];
+ statemt[24] = Sbox[statemt[24] >> 4][statemt[24] & 0xf];
+ statemt[28] = Sbox[statemt[28] >> 4][statemt[28] & 0xf];
+ break;
+ }
+}
+
+/* ********* InversShiftRow & ByteSub ********* */
+void
+InversShiftRow_ByteSub (int statemt[32], int nb, const int invSbox[16][16])
+{
+ int temp;
+
+ switch (nb)
+ {
+ case 4:
+ temp = invSbox[statemt[13] >> 4][statemt[13] & 0xf];
+ statemt[13] = invSbox[statemt[9] >> 4][statemt[9] & 0xf];
+ statemt[9] = invSbox[statemt[5] >> 4][statemt[5] & 0xf];
+ statemt[5] = invSbox[statemt[1] >> 4][statemt[1] & 0xf];
+ statemt[1] = temp;
+
+ temp = invSbox[statemt[14] >> 4][statemt[14] & 0xf];
+ statemt[14] = invSbox[statemt[6] >> 4][statemt[6] & 0xf];
+ statemt[6] = temp;
+ temp = invSbox[statemt[2] >> 4][statemt[2] & 0xf];
+ statemt[2] = invSbox[statemt[10] >> 4][statemt[10] & 0xf];
+ statemt[10] = temp;
+
+ temp = invSbox[statemt[15] >> 4][statemt[15] & 0xf];
+ statemt[15] = invSbox[statemt[3] >> 4][statemt[3] & 0xf];
+ statemt[3] = invSbox[statemt[7] >> 4][statemt[7] & 0xf];
+ statemt[7] = invSbox[statemt[11] >> 4][statemt[11] & 0xf];
+ statemt[11] = temp;
+
+ statemt[0] = invSbox[statemt[0] >> 4][statemt[0] & 0xf];
+ statemt[4] = invSbox[statemt[4] >> 4][statemt[4] & 0xf];
+ statemt[8] = invSbox[statemt[8] >> 4][statemt[8] & 0xf];
+ statemt[12] = invSbox[statemt[12] >> 4][statemt[12] & 0xf];
+ break;
+ case 6:
+ temp = invSbox[statemt[21] >> 4][statemt[21] & 0xf];
+ statemt[21] = invSbox[statemt[17] >> 4][statemt[17] & 0xf];
+ statemt[17] = invSbox[statemt[13] >> 4][statemt[13] & 0xf];
+ statemt[13] = invSbox[statemt[9] >> 4][statemt[9] & 0xf];
+ statemt[9] = invSbox[statemt[5] >> 4][statemt[5] & 0xf];
+ statemt[5] = invSbox[statemt[1] >> 4][statemt[1] & 0xf];
+ statemt[1] = temp;
+
+ temp = invSbox[statemt[22] >> 4][statemt[22] & 0xf];
+ statemt[22] = invSbox[statemt[14] >> 4][statemt[14] & 0xf];
+ statemt[14] = invSbox[statemt[6] >> 4][statemt[6] & 0xf];
+ statemt[6] = temp;
+ temp = invSbox[statemt[18] >> 4][statemt[18] & 0xf];
+ statemt[18] = invSbox[statemt[10] >> 4][statemt[10] & 0xf];
+ statemt[10] = invSbox[statemt[2] >> 4][statemt[2] & 0xf];
+ statemt[2] = temp;
+
+ temp = invSbox[statemt[15] >> 4][statemt[15] & 0xf];
+ statemt[15] = invSbox[statemt[3] >> 4][statemt[3] & 0xf];
+ statemt[3] = temp;
+ temp = invSbox[statemt[19] >> 4][statemt[19] & 0xf];
+ statemt[19] = invSbox[statemt[7] >> 4][statemt[7] & 0xf];
+ statemt[7] = temp;
+ temp = invSbox[statemt[23] >> 4][statemt[23] & 0xf];
+ statemt[23] = invSbox[statemt[11] >> 4][statemt[11] & 0xf];
+ statemt[11] = temp;
+
+ statemt[0] = invSbox[statemt[0] >> 4][statemt[0] & 0xf];
+ statemt[4] = invSbox[statemt[4] >> 4][statemt[4] & 0xf];
+ statemt[8] = invSbox[statemt[8] >> 4][statemt[8] & 0xf];
+ statemt[12] = invSbox[statemt[12] >> 4][statemt[12] & 0xf];
+ statemt[16] = invSbox[statemt[16] >> 4][statemt[16] & 0xf];
+ statemt[20] = invSbox[statemt[20] >> 4][statemt[20] & 0xf];
+ break;
+ case 8:
+ temp = invSbox[statemt[29] >> 4][statemt[29] & 0xf];
+ statemt[29] = invSbox[statemt[25] >> 4][statemt[25] & 0xf];
+ statemt[25] = invSbox[statemt[21] >> 4][statemt[21] & 0xf];
+ statemt[21] = invSbox[statemt[17] >> 4][statemt[17] & 0xf];
+ statemt[17] = invSbox[statemt[13] >> 4][statemt[13] & 0xf];
+ statemt[13] = invSbox[statemt[9] >> 4][statemt[9] & 0xf];
+ statemt[9] = invSbox[statemt[5] >> 4][statemt[5] & 0xf];
+ statemt[5] = invSbox[statemt[1] >> 4][statemt[1] & 0xf];
+ statemt[1] = temp;
+
+ temp = invSbox[statemt[30] >> 4][statemt[30] & 0xf];
+ statemt[30] = invSbox[statemt[18] >> 4][statemt[18] & 0xf];
+ statemt[18] = invSbox[statemt[6] >> 4][statemt[6] & 0xf];
+ statemt[6] = invSbox[statemt[26] >> 4][statemt[26] & 0xf];
+ statemt[26] = invSbox[statemt[14] >> 4][statemt[14] & 0xf];
+ statemt[14] = invSbox[statemt[2] >> 4][statemt[2] & 0xf];
+ statemt[2] = invSbox[statemt[22] >> 4][statemt[22] & 0xf];
+ statemt[22] = invSbox[statemt[10] >> 4][statemt[10] & 0xf];
+ statemt[10] = temp;
+
+ temp = invSbox[statemt[31] >> 4][statemt[31] & 0xf];
+ statemt[31] = invSbox[statemt[15] >> 4][statemt[15] & 0xf];
+ statemt[15] = temp;
+ temp = invSbox[statemt[27] >> 4][statemt[27] & 0xf];
+ statemt[27] = invSbox[statemt[11] >> 4][statemt[11] & 0xf];
+ statemt[11] = temp;
+ temp = invSbox[statemt[23] >> 4][statemt[23] & 0xf];
+ statemt[23] = invSbox[statemt[7] >> 4][statemt[7] & 0xf];
+ statemt[7] = temp;
+ temp = invSbox[statemt[19] >> 4][statemt[19] & 0xf];
+ statemt[19] = invSbox[statemt[3] >> 4][statemt[3] & 0xf];
+ statemt[3] = temp;
+
+ statemt[0] = invSbox[statemt[0] >> 4][statemt[0] & 0xf];
+ statemt[4] = invSbox[statemt[4] >> 4][statemt[4] & 0xf];
+ statemt[8] = invSbox[statemt[8] >> 4][statemt[8] & 0xf];
+ statemt[12] = invSbox[statemt[12] >> 4][statemt[12] & 0xf];
+ statemt[16] = invSbox[statemt[16] >> 4][statemt[16] & 0xf];
+ statemt[20] = invSbox[statemt[20] >> 4][statemt[20] & 0xf];
+ statemt[24] = invSbox[statemt[24] >> 4][statemt[24] & 0xf];
+ statemt[28] = invSbox[statemt[28] >> 4][statemt[28] & 0xf];
+ break;
+ }
+}
+
+/* ******** MixColumn ********** */
+int
+MixColumn_AddRoundKey (int statemt[32], int nb, int n, int word[4][120])
+{
+ int ret[8 * 4], j;
+ register int x;
+
+ for (j = 0; j < nb; ++j)
+ {
+ ret[j * 4] = (statemt[j * 4] << 1);
+ if ((ret[j * 4] >> 8) == 1)
+ ret[j * 4] ^= 283;
+ x = statemt[1 + j * 4];
+ x ^= (x << 1);
+ if ((x >> 8) == 1)
+ ret[j * 4] ^= (x ^ 283);
+ else
+ ret[j * 4] ^= x;
+ ret[j * 4] ^=
+ statemt[2 + j * 4] ^ statemt[3 + j * 4] ^ word[0][j + nb * n];
+
+ ret[1 + j * 4] = (statemt[1 + j * 4] << 1);
+ if ((ret[1 + j * 4] >> 8) == 1)
+ ret[1 + j * 4] ^= 283;
+ x = statemt[2 + j * 4];
+ x ^= (x << 1);
+ if ((x >> 8) == 1)
+ ret[1 + j * 4] ^= (x ^ 283);
+ else
+ ret[1 + j * 4] ^= x;
+ ret[1 + j * 4] ^=
+ statemt[3 + j * 4] ^ statemt[j * 4] ^ word[1][j + nb * n];
+
+ ret[2 + j * 4] = (statemt[2 + j * 4] << 1);
+ if ((ret[2 + j * 4] >> 8) == 1)
+ ret[2 + j * 4] ^= 283;
+ x = statemt[3 + j * 4];
+ x ^= (x << 1);
+ if ((x >> 8) == 1)
+ ret[2 + j * 4] ^= (x ^ 283);
+ else
+ ret[2 + j * 4] ^= x;
+ ret[2 + j * 4] ^=
+ statemt[j * 4] ^ statemt[1 + j * 4] ^ word[2][j + nb * n];
+
+ ret[3 + j * 4] = (statemt[3 + j * 4] << 1);
+ if ((ret[3 + j * 4] >> 8) == 1)
+ ret[3 + j * 4] ^= 283;
+ x = statemt[j * 4];
+ x ^= (x << 1);
+ if ((x >> 8) == 1)
+ ret[3 + j * 4] ^= (x ^ 283);
+ else
+ ret[3 + j * 4] ^= x;
+ ret[3 + j * 4] ^=
+ statemt[1 + j * 4] ^ statemt[2 + j * 4] ^ word[3][j + nb * n];
+ }
+ for (j = 0; j < nb; ++j)
+ {
+ statemt[j * 4] = ret[j * 4];
+ statemt[1 + j * 4] = ret[1 + j * 4];
+ statemt[2 + j * 4] = ret[2 + j * 4];
+ statemt[3 + j * 4] = ret[3 + j * 4];
+ }
+ return 0;
+}
+
+/* ******** InversMixColumn ********** */
+int
+AddRoundKey_InversMixColumn (int statemt[32], int nb, int n, int word[4][120])
+{
+ int ret[8 * 4], i, j;
+ register int x;
+
+ for (j = 0; j < nb; ++j)
+ {
+ statemt[j * 4] ^= word[0][j + nb * n];
+ statemt[1 + j * 4] ^= word[1][j + nb * n];
+ statemt[2 + j * 4] ^= word[2][j + nb * n];
+ statemt[3 + j * 4] ^= word[3][j + nb * n];
+ }
+ for (j = 0; j < nb; ++j)
+ for (i = 0; i < 4; ++i)
+ {
+ x = (statemt[i + j * 4] << 1);
+ if ((x >> 8) == 1)
+ x ^= 283;
+ x ^= statemt[i + j * 4];
+ x = (x << 1);
+ if ((x >> 8) == 1)
+ x ^= 283;
+ x ^= statemt[i + j * 4];
+ x = (x << 1);
+ if ((x >> 8) == 1)
+ x ^= 283;
+ ret[i + j * 4] = x;
+
+ x = (statemt[(i + 1) % 4 + j * 4] << 1);
+ if ((x >> 8) == 1)
+ x ^= 283;
+ x = (x << 1);
+ if ((x >> 8) == 1)
+ x ^= 283;
+ x ^= statemt[(i + 1) % 4 + j * 4];
+ x = (x << 1);
+ if ((x >> 8) == 1)
+ x ^= 283;
+ x ^= statemt[(i + 1) % 4 + j * 4];
+ ret[i + j * 4] ^= x;
-#include "aes.h"
-#include "aes_enc.c"
-#include "aes_dec.c"
-#include "aes_key.c"
-#include "aes_func.c"
+ x = (statemt[(i + 2) % 4 + j * 4] << 1);
+ if ((x >> 8) == 1)
+ x ^= 283;
+ x ^= statemt[(i + 2) % 4 + j * 4];
+ x = (x << 1);
+ if ((x >> 8) == 1)
+ x ^= 283;
+ x = (x << 1);
+ if ((x >> 8) == 1)
+ x ^= 283;
+ x ^= statemt[(i + 2) % 4 + j * 4];
+ ret[i + j * 4] ^= x;
+
+ x = (statemt[(i + 3) % 4 + j * 4] << 1);
+ if ((x >> 8) == 1)
+ x ^= 283;
+ x = (x << 1);
+ if ((x >> 8) == 1)
+ x ^= 283;
+ x = (x << 1);
+ if ((x >> 8) == 1)
+ x ^= 283;
+ x ^= statemt[(i + 3) % 4 + j * 4];
+ ret[i + j * 4] ^= x;
+ }
+ for (i = 0; i < nb; ++i)
+ {
+ statemt[i * 4] = ret[i * 4];
+ statemt[1 + i * 4] = ret[1 + i * 4];
+ statemt[2 + i * 4] = ret[2 + i * 4];
+ statemt[3 + i * 4] = ret[3 + i * 4];
+ }
+ return 0;
+}
+
+/* ******** AddRoundKey ********** */
+int
+AddRoundKey (int statemt[32], int type, int n, int word[4][120])
+{
+ int j, nb;
+ switch (type)
+ {
+ case 128128:
+ case 192128:
+ case 256128:
+ nb = 4;
+ break;
+ case 128192:
+ case 192192:
+ case 256192:
+ nb = 6;
+ break;
+ case 128256:
+ case 192256:
+ case 256256:
+ nb = 8;
+ break;
+ }
+ for (j = 0; j < nb; ++j)
+ {
+ statemt[j * 4] ^= word[0][j + nb * n];
+ statemt[1 + j * 4] ^= word[1][j + nb * n];
+ statemt[2 + j * 4] ^= word[2][j + nb * n];
+ statemt[3 + j * 4] ^= word[3][j + nb * n];
+ }
+ return 0;
+}
+int
+encrypt (int statemt[32], int key[32], int type, int *main_result, const int Sbox[16][16])
+{
+ int i;
+ int nb;
+ int round_val;
+ int word[4][120];
+/*
++--------------------------------------------------------------------------+
+| * Test Vector (added for CHStone) |
+| out_enc_statemt : expected output data for "encrypt" |
++--------------------------------------------------------------------------+
+*/
+ const int out_enc_statemt[16] =
+ { 0x39, 0x25, 0x84, 0x1d, 0x2, 0xdc, 0x9, 0xfb, 0xdc, 0x11, 0x85, 0x97,
+ 0x19, 0x6a, 0xb, 0x32
+ };
+
+ KeySchedule (type, key, word, Sbox);
+ switch (type)
+ {
+ case 128128:
+ round_val = 0;
+ nb = 4;
+ break;
+ case 192128:
+ round_val = 2;
+ nb = 4;
+ break;
+ case 256128:
+ round_val = 4;
+ nb = 4;
+ break;
+ case 128192:
+ case 192192:
+ round_val = 2;
+ nb = 6;
+ break;
+ case 256192:
+ round_val = 4;
+ nb = 6;
+ break;
+ case 128256:
+ case 192256:
+ case 256256:
+ round_val = 4;
+ nb = 8;
+ break;
+ }
+ AddRoundKey (statemt, type, 0, word);
+ for (i = 1; i <= round_val + 9; ++i)
+ {
+ ByteSub_ShiftRow (statemt, nb, Sbox);
+ MixColumn_AddRoundKey (statemt, nb, i, word);
+ }
+ ByteSub_ShiftRow (statemt, nb, Sbox);
+ AddRoundKey (statemt, type, i, word);
+/*
+ printf ("encrypted message \t");
+ for (i = 0; i < nb * 4; ++i)
+ {
+ if (statemt[i] < 16)
+ printf ("0");
+ printf ("%x", statemt[i]);
+ }
+*/
+ for (i = 0; i < 16; i++)
+ *main_result += (statemt[i] != out_enc_statemt[i]);
+
+ return 0;
+}
+
+int
+decrypt (int statemt[32], int key[32], int type, int *main_result, const int Sbox[16][16])
+{
+ int i;
+ int nb;
+ int round_val;
+ int word[4][120];
+ const int invSbox[16][16] = {
+ {0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e,
+ 0x81, 0xf3, 0xd7, 0xfb},
+ {0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44,
+ 0xc4, 0xde, 0xe9, 0xcb},
+ {0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b,
+ 0x42, 0xfa, 0xc3, 0x4e},
+ {0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49,
+ 0x6d, 0x8b, 0xd1, 0x25},
+ {0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc,
+ 0x5d, 0x65, 0xb6, 0x92},
+ {0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57,
+ 0xa7, 0x8d, 0x9d, 0x84},
+ {0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05,
+ 0xb8, 0xb3, 0x45, 0x06},
+ {0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03,
+ 0x01, 0x13, 0x8a, 0x6b},
+ {0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce,
+ 0xf0, 0xb4, 0xe6, 0x73},
+ {0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8,
+ 0x1c, 0x75, 0xdf, 0x6e},
+ {0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e,
+ 0xaa, 0x18, 0xbe, 0x1b},
+ {0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe,
+ 0x78, 0xcd, 0x5a, 0xf4},
+ {0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59,
+ 0x27, 0x80, 0xec, 0x5f},
+ {0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f,
+ 0x93, 0xc9, 0x9c, 0xef},
+ {0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c,
+ 0x83, 0x53, 0x99, 0x61},
+ {0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63,
+ 0x55, 0x21, 0x0c, 0x7d}
+ };
+/*
++--------------------------------------------------------------------------+
+| * Test Vector (added for CHStone) |
+| out_enc_statemt : expected output data for "decrypt" |
++--------------------------------------------------------------------------+
+*/
+ const int out_dec_statemt[16] =
+ { 0x32, 0x43, 0xf6, 0xa8, 0x88, 0x5a, 0x30, 0x8d, 0x31, 0x31, 0x98, 0xa2,
+ 0xe0, 0x37, 0x7, 0x34
+ };
+ KeySchedule (type, key, word, Sbox);
+
+ switch (type)
+ {
+ case 128128:
+ round_val = 10;
+ nb = 4;
+ break;
+ case 128192:
+ case 192192:
+ round_val = 12;
+ nb = 6;
+ break;
+ case 192128:
+ round_val = 12;
+ nb = 4;
+ break;
+ case 128256:
+ case 192256:
+ round_val = 14;
+ nb = 8;
+ break;
+ case 256128:
+ round_val = 14;
+ nb = 4;
+ break;
+ case 256192:
+ round_val = 14;
+ nb = 6;
+ break;
+ case 256256:
+ round_val = 14;
+ nb = 8;
+ break;
+ }
+
+ AddRoundKey (statemt, type, round_val, word);
+
+ InversShiftRow_ByteSub (statemt, nb, invSbox);
+
+ for (i = round_val - 1; i >= 1; --i)
+ {
+ AddRoundKey_InversMixColumn (statemt, nb, i, word);
+ InversShiftRow_ByteSub (statemt, nb, invSbox);
+ }
+
+ AddRoundKey (statemt, type, 0, word);
+/*
+ printf ("\ndecrypto message\t");
+ for (i = 0; i < ((type % 1000) / 8); ++i)
+ {
+ if (statemt[i] < 16)
+ printf ("0");
+ printf ("%x", statemt[i]);
+ }
+*/
+ for (i = 0; i < 16; i++)
+ *main_result += (statemt[i] != out_dec_statemt[i]);
+
+ return 0;
+}
/* ***************** main **************************** */
int
-aes_main (void)
+aes_main (int *res)
{
/*
+--------------------------------------------------------------------------+
@@ -80,6 +770,8 @@ aes_main (void)
| statemt, key : input data |
+--------------------------------------------------------------------------+
*/
+ int key[32];
+ int statemt[32];
statemt[0] = 50;
statemt[1] = 67;
statemt[2] = 246;
@@ -113,17 +805,52 @@ aes_main (void)
key[13] = 207;
key[14] = 79;
key[15] = 60;
+const int Sbox[16][16] = {
+ {0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b,
+ 0xfe, 0xd7, 0xab, 0x76},
+ {0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf,
+ 0x9c, 0xa4, 0x72, 0xc0},
+ {0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1,
+ 0x71, 0xd8, 0x31, 0x15},
+ {0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2,
+ 0xeb, 0x27, 0xb2, 0x75},
+ {0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3,
+ 0x29, 0xe3, 0x2f, 0x84},
+ {0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39,
+ 0x4a, 0x4c, 0x58, 0xcf},
+ {0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f,
+ 0x50, 0x3c, 0x9f, 0xa8},
+ {0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21,
+ 0x10, 0xff, 0xf3, 0xd2},
+ {0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d,
+ 0x64, 0x5d, 0x19, 0x73},
+ {0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14,
+ 0xde, 0x5e, 0x0b, 0xdb},
+ {0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62,
+ 0x91, 0x95, 0xe4, 0x79},
+ {0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea,
+ 0x65, 0x7a, 0xae, 0x08},
+ {0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f,
+ 0x4b, 0xbd, 0x8b, 0x8a},
+ {0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9,
+ 0x86, 0xc1, 0x1d, 0x9e},
+ {0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9,
+ 0xce, 0x55, 0x28, 0xdf},
+ {0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f,
+ 0xb0, 0x54, 0xbb, 0x16}
+};
- encrypt (statemt, key, 128128);
- decrypt (statemt, key, 128128);
+ encrypt (statemt, key, 128128, res, Sbox);
+ decrypt (statemt, key, 128128, res, Sbox);
return 0;
}
int
main ()
{
+ int main_result;
main_result = 0;
- aes_main ();
- printf ("\n%d\n", main_result);
+ aes_main (&main_result);
+ //printf ("\n%d\n", main_result);
return main_result;
}
diff --git a/benchmarks/CHStone/gsm/gsm.c b/benchmarks/CHStone/gsm/gsm.c
index 282437a..ff472c3 100755
--- a/benchmarks/CHStone/gsm/gsm.c
+++ b/benchmarks/CHStone/gsm/gsm.c
@@ -16,95 +16,514 @@
| 4. Please follow the copyright of each benchmark program. |
+--------------------------------------------------------------------------+
*/
-#include <stdio.h>
-#include "lpc.c"
+//#include <stdio.h>
+typedef int word; /* 16 bit signed int */
+typedef long longword; /* 32 bit signed int */
+#define MIN_WORD ((-32767)-1)
+#define MAX_WORD ( 32767)
+
+#define SASR(x, by) ((x) >> (by))
+
+#define GSM_MULT_R(a, b) gsm_mult_r(a, b)
+#define GSM_MULT(a, b) gsm_mult(a, b)
+#define GSM_ADD(a, b) gsm_add(a, b)
+#define GSM_ABS(a) gsm_abs(a)
+
+#define saturate(x) \
+ ((x) < MIN_WORD ? MIN_WORD : (x) > MAX_WORD ? MAX_WORD: (x))
+
+word
+gsm_add (word a, word b)
+{
+ longword sum;
+ sum = (longword) a + (longword) b;
+ return saturate (sum);
+}
+
+word
+gsm_mult (word a, word b)
+{
+ if (a == MIN_WORD && b == MIN_WORD)
+ return MAX_WORD;
+ else
+ return SASR ((longword) a * (longword) b, 15);
+}
+
+word
+gsm_mult_r (word a, word b)
+{
+ longword prod;
+ if (b == MIN_WORD && a == MIN_WORD)
+ return MAX_WORD;
+ else
+ {
+ prod = (longword) a *(longword) b + 16384;
+ prod >>= 15;
+ return prod & 0xFFFF;
+ }
+}
+
+word
+gsm_abs (word a)
+{
+ return a < 0 ? (a == MIN_WORD ? MAX_WORD : -a) : a;
+}
+
+word
+gsm_norm (longword a)
/*
-+--------------------------------------------------------------------------+
-| * Test Vectors (added for CHStone) |
-| inData : input data |
-| outData, outLARc : expected output data |
-+--------------------------------------------------------------------------+
-*/
+ * the number of left shifts needed to normalize the 32 bit
+ * variable L_var1 for positive values on the interval
+ *
+ * with minimum of
+ * minimum of 1073741824 (01000000000000000000000000000000) and
+ * maximum of 2147483647 (01111111111111111111111111111111)
+ *
+ *
+ * and for negative values on the interval with
+ * minimum of -2147483648 (-10000000000000000000000000000000) and
+ * maximum of -1073741824 ( -1000000000000000000000000000000).
+ *
+ * in order to normalize the result, the following
+ * operation must be done: L_norm_var1 = L_var1 << norm( L_var1 );
+ *
+ * (That's 'ffs', only from the left, not the right..)
+ */
+{
+ const unsigned int bitoff[256] = {
+ 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+
+ if (a < 0)
+ {
+ if (a <= -1073741824)
+ return 0;
+ a = ~a;
+ }
+
+ return a & 0xffff0000 ?
+ (a & 0xff000000 ? -1 + bitoff[0xFF & (a >> 24)] :
+ 7 + bitoff[0xFF & (a >> 16)])
+ : (a & 0xff00 ? 15 + bitoff[0xFF & (a >> 8)] : 23 + bitoff[0xFF & a]);
+}
+
+word
+gsm_div (word num, word denum)
+{
+ longword L_num;
+ longword L_denum;
+ word div;
+ int k;
+
+ L_num = num;
+ L_denum = denum;
+ div = 0;
+ k = 15;
+ /* The parameter num sometimes becomes zero.
+ * Although this is explicitly guarded against in 4.2.5,
+ * we assume that the result should then be zero as well.
+ */
+
+ if (num == 0)
+ return 0;
+
+ while (k--)
+ {
+ div <<= 1;
+ L_num <<= 1;
+
+ if (L_num >= L_denum)
+ {
+ L_num -= L_denum;
+ div++;
+ }
+ }
+
+ return div;
+}
+
+void
+Autocorrelation (word * s /* [0..159] IN/OUT */ ,
+ longword * L_ACF /* [0..8] OUT */ )
+/*
+ * The goal is to compute the array L_ACF[k]. The signal s[i] must
+ * be scaled in order to avoid an overflow situation.
+ */
+{
+ register int k, i;
+
+ word temp;
+ word smax;
+ word scalauto, n;
+ word *sp;
+ word sl;
+
+ /* Search for the maximum.
+ */
+ smax = 0;
+ for (k = 0; k <= 159; k++)
+ {
+ temp = GSM_ABS (s[k]);
+ if (temp > smax)
+ smax = temp;
+ }
+
+ /* Computation of the scaling factor.
+ */
+ if (smax == 0)
+ scalauto = 0;
+ else
+ scalauto = 4 - gsm_norm ((longword) smax << 16); /* sub(4,..) */
+
+ if (scalauto > 0 && scalauto <= 4)
+ {
+ n = scalauto;
+ for (k = 0; k <= 159; k++)
+ s[k] = GSM_MULT_R (s[k], 16384 >> (n - 1));
+ }
+
+ /* Compute the L_ACF[..].
+ */
+ {
+ sp = s;
+ sl = *sp;
+
+#define STEP(k) L_ACF[k] += ((longword)sl * sp[ -(k) ]);
+
+#define NEXTI sl = *++sp
+ for (k = 8; k >= 0; k--)
+ L_ACF[k] = 0;
+
+ STEP (0);
+ NEXTI;
+ STEP (0);
+ STEP (1);
+ NEXTI;
+ STEP (0);
+ STEP (1);
+ STEP (2);
+ NEXTI;
+ STEP (0);
+ STEP (1);
+ STEP (2);
+ STEP (3);
+ NEXTI;
+ STEP (0);
+ STEP (1);
+ STEP (2);
+ STEP (3);
+ STEP (4);
+ NEXTI;
+ STEP (0);
+ STEP (1);
+ STEP (2);
+ STEP (3);
+ STEP (4);
+ STEP (5);
+ NEXTI;
+ STEP (0);
+ STEP (1);
+ STEP (2);
+ STEP (3);
+ STEP (4);
+ STEP (5);
+ STEP (6);
+ NEXTI;
+ STEP (0);
+ STEP (1);
+ STEP (2);
+ STEP (3);
+ STEP (4);
+ STEP (5);
+ STEP (6);
+ STEP (7);
+
+ for (i = 8; i <= 159; i++)
+ {
+
+ NEXTI;
+
+ STEP (0);
+ STEP (1);
+ STEP (2);
+ STEP (3);
+ STEP (4);
+ STEP (5);
+ STEP (6);
+ STEP (7);
+ STEP (8);
+ }
+
+ for (k = 8; k >= 0; k--)
+ L_ACF[k] <<= 1;
+
+ }
+ /* Rescaling of the array s[0..159]
+ */
+ if (scalauto > 0)
+ for (k = 159; k >= 0; k--)
+ *s++ <<= scalauto;
+}
+
+/* 4.2.5 */
+
+void
+Reflection_coefficients (longword * L_ACF /* 0...8 IN */ ,
+ register word * r /* 0...7 OUT */ )
+{
+ register int i, m, n;
+ register word temp;
+ word ACF[9]; /* 0..8 */
+ word P[9]; /* 0..8 */
+ word K[9]; /* 2..8 */
+
+ /* Schur recursion with 16 bits arithmetic.
+ */
+
+ if (L_ACF[0] == 0)
+ {
+ for (i = 8; i > 0; i--)
+ *r++ = 0;
+ return;
+ }
+
+ temp = gsm_norm (L_ACF[0]);
+ for (i = 0; i <= 8; i++)
+ ACF[i] = SASR (L_ACF[i] << temp, 16);
+
+ /* Initialize array P[..] and K[..] for the recursion.
+ */
+
+ for (i = 1; i <= 7; i++)
+ K[i] = ACF[i];
+ for (i = 0; i <= 8; i++)
+ P[i] = ACF[i];
+
+ /* Compute reflection coefficients
+ */
+ for (n = 1; n <= 8; n++, r++)
+ {
+
+ temp = P[1];
+ temp = GSM_ABS (temp);
+ if (P[0] < temp)
+ {
+ for (i = n; i <= 8; i++)
+ *r++ = 0;
+ return;
+ }
+
+ *r = gsm_div (temp, P[0]);
+
+ if (P[1] > 0)
+ *r = -*r; /* r[n] = sub(0, r[n]) */
+ if (n == 8)
+ return;
+
+ /* Schur recursion
+ */
+ temp = GSM_MULT_R (P[1], *r);
+ P[0] = GSM_ADD (P[0], temp);
+
+ for (m = 1; m <= 8 - n; m++)
+ {
+ temp = GSM_MULT_R (K[m], *r);
+ P[m] = GSM_ADD (P[m + 1], temp);
+
+ temp = GSM_MULT_R (P[m + 1], *r);
+ K[m] = GSM_ADD (K[m], temp);
+ }
+ }
+}
+
+/* 4.2.6 */
+
+void
+Transformation_to_Log_Area_Ratios (register word * r /* 0..7 IN/OUT */ )
+/*
+ * The following scaling for r[..] and LAR[..] has been used:
+ *
+ * r[..] = integer( real_r[..]*32768. ); -1 <= real_r < 1.
+ * LAR[..] = integer( real_LAR[..] * 16384 );
+ * with -1.625 <= real_LAR <= 1.625
+ */
+{
+ register word temp;
+ register int i;
+
+
+ /* Computation of the LAR[0..7] from the r[0..7]
+ */
+ for (i = 1; i <= 8; i++, r++)
+ {
+
+ temp = *r;
+ temp = GSM_ABS (temp);
+
+ if (temp < 22118)
+ {
+ temp >>= 1;
+ }
+ else if (temp < 31130)
+ {
+ temp -= 11059;
+ }
+ else
+ {
+ temp -= 26112;
+ temp <<= 2;
+ }
+
+ *r = *r < 0 ? -temp : temp;
+ }
+}
+
+/* 4.2.7 */
+
+void
+Quantization_and_coding (register word * LAR /* [0..7] IN/OUT */ )
+{
+ register word temp;
+
+
+ /* This procedure needs four tables; the following equations
+ * give the optimum scaling for the constants:
+ *
+ * A[0..7] = integer( real_A[0..7] * 1024 )
+ * B[0..7] = integer( real_B[0..7] * 512 )
+ * MAC[0..7] = maximum of the LARc[0..7]
+ * MIC[0..7] = minimum of the LARc[0..7]
+ */
+
+# undef STEP
+# define STEP( A, B, MAC, MIC ) \
+ temp = GSM_MULT( A, *LAR ); \
+ temp = GSM_ADD( temp, B ); \
+ temp = GSM_ADD( temp, 256 ); \
+ temp = SASR( temp, 9 ); \
+ *LAR = temp>MAC ? MAC - MIC : (temp<MIC ? 0 : temp - MIC); \
+ LAR++;
+
+ STEP (20480, 0, 31, -32);
+ STEP (20480, 0, 31, -32);
+ STEP (20480, 2048, 15, -16);
+ STEP (20480, -2560, 15, -16);
+
+ STEP (13964, 94, 7, -8);
+ STEP (15360, -1792, 7, -8);
+ STEP (8534, -341, 3, -4);
+ STEP (9036, -1144, 3, -4);
+
+# undef STEP
+}
+
+void
+Gsm_LPC_Analysis (word * s /* 0..159 signals IN/OUT */ ,
+ word * LARc /* 0..7 LARc's OUT */ )
+{
+ longword L_ACF[9];
+
+ Autocorrelation (s, L_ACF);
+ Reflection_coefficients (L_ACF, LARc);
+ Transformation_to_Log_Area_Ratios (LARc);
+ Quantization_and_coding (LARc);
+}
+
#define N 160
#define M 8
-const word inData[N] =
+
+int
+main ()
+{
+ const word inData[N] =
{ 81, 10854, 1893, -10291, 7614, 29718, 20475, -29215, -18949, -29806,
- -32017, 1596, 15744, -3088, -17413, -22123, 6798, -13276, 3819, -16273,
+ -32017, 1596, 15744, -3088, -17413, -22123, 6798, -13276, 3819, -16273,
-1573, -12523, -27103,
- -193, -25588, 4698, -30436, 15264, -1393, 11418, 11370, 4986, 7869, -1903,
+ -193, -25588, 4698, -30436, 15264, -1393, 11418, 11370, 4986, 7869, -1903,
9123, -31726,
- -25237, -14155, 17982, 32427, -12439, -15931, -21622, 7896, 1689, 28113,
+ -25237, -14155, 17982, 32427, -12439, -15931, -21622, 7896, 1689, 28113,
3615, 22131, -5572,
- -20110, 12387, 9177, -24544, 12480, 21546, -17842, -13645, 20277, 9987,
+ -20110, 12387, 9177, -24544, 12480, 21546, -17842, -13645, 20277, 9987,
17652, -11464, -17326,
- -10552, -27100, 207, 27612, 2517, 7167, -29734, -22441, 30039, -2368, 12813,
+ -10552, -27100, 207, 27612, 2517, 7167, -29734, -22441, 30039, -2368, 12813,
300, -25555, 9087,
- 29022, -6559, -20311, -14347, -7555, -21709, -3676, -30082, -3190, -30979,
+ 29022, -6559, -20311, -14347, -7555, -21709, -3676, -30082, -3190, -30979,
8580, 27126, 3414,
- -4603, -22303, -17143, 13788, -1096, -14617, 22071, -13552, 32646, 16689,
+ -4603, -22303, -17143, 13788, -1096, -14617, 22071, -13552, 32646, 16689,
-8473, -12733, 10503,
- 20745, 6696, -26842, -31015, 3792, -19864, -20431, -30307, 32421, -13237,
+ 20745, 6696, -26842, -31015, 3792, -19864, -20431, -30307, 32421, -13237,
9006, 18249, 2403,
- -7996, -14827, -5860, 7122, 29817, -31894, 17955, 28836, -31297, 31821,
+ -7996, -14827, -5860, 7122, 29817, -31894, 17955, 28836, -31297, 31821,
-27502, 12276, -5587,
- -22105, 9192, -22549, 15675, -12265, 7212, -23749, -12856, -5857, 7521,
+ -22105, 9192, -22549, 15675, -12265, 7212, -23749, -12856, -5857, 7521,
17349, 13773, -3091,
- -17812, -9655, 26667, 7902, 2487, 3177, 29412, -20224, -2776, 24084, -7963,
+ -17812, -9655, 26667, 7902, 2487, 3177, 29412, -20224, -2776, 24084, -7963,
-10438, -11938,
- -14833, -6658, 32058, 4020, 10461, 15159
-};
+ -14833, -6658, 32058, 4020, 10461, 15159
+ };
-const word outData[N] =
+ const word outData[N] =
{ 80, 10848, 1888, -10288, 7616, 29712, 20480, -29216, -18944, -29808,
- -32016, 1600, 15744, -3088, -17408, -22128, 6800, -13280, 3824, -16272,
+ -32016, 1600, 15744, -3088, -17408, -22128, 6800, -13280, 3824, -16272,
-1568, -12528, -27104,
- -192, -25584, 4704, -30432, 15264, -1392, 11424, 11376, 4992, 7872, -1904,
+ -192, -25584, 4704, -30432, 15264, -1392, 11424, 11376, 4992, 7872, -1904,
9120, -31728, -25232,
- -14160, 17984, 32432, -12432, -15936, -21616, 7904, 1696, 28112, 3616,
+ -14160, 17984, 32432, -12432, -15936, -21616, 7904, 1696, 28112, 3616,
22128, -5568, -20112,
- 12384, 9184, -24544, 12480, 21552, -17840, -13648, 20272, 9984, 17648,
+ 12384, 9184, -24544, 12480, 21552, -17840, -13648, 20272, 9984, 17648,
-11456, -17328, -10544,
- -27104, 208, 27616, 2512, 7168, -29728, -22448, 30032, -2368, 12816, 304,
+ -27104, 208, 27616, 2512, 7168, -29728, -22448, 30032, -2368, 12816, 304,
-25552, 9088, 29024,
- -6560, -20304, -14352, -7552, -21712, -3680, -30080, -3184, -30976, 8576,
+ -6560, -20304, -14352, -7552, -21712, -3680, -30080, -3184, -30976, 8576,
27120, 3408, -4608,
- -22304, -17136, 13792, -1088, -14624, 22064, -13552, 32640, 16688, -8480,
+ -22304, -17136, 13792, -1088, -14624, 22064, -13552, 32640, 16688, -8480,
-12736, 10496, 20752,
- 6704, -26848, -31008, 3792, -19856, -20432, -30304, 32416, -13232, 9008,
+ 6704, -26848, -31008, 3792, -19856, -20432, -30304, 32416, -13232, 9008,
18256, 2400, -8000,
- -14832, -5856, 7120, 29824, -31888, 17952, 28832, -31296, 31824, -27504,
+ -14832, -5856, 7120, 29824, -31888, 17952, 28832, -31296, 31824, -27504,
12272, -5584, -22112,
- 9200, -22544, 15680, -12272, 7216, -23744, -12848, -5856, 7520, 17344,
+ 9200, -22544, 15680, -12272, 7216, -23744, -12848, -5856, 7520, 17344,
13776, -3088, -17808,
- -9648, 26672, 7904, 2480, 3184, 29408, -20224, -2768, 24080, -7968, -10432,
+ -9648, 26672, 7904, 2480, 3184, 29408, -20224, -2768, 24080, -7968, -10432,
-11936, -14832,
- -6656, 32064, 4016, 10464, 15152
-};
+ -6656, 32064, 4016, 10464, 15152
+ };
-const word outLARc[M] = { 32, 33, 22, 13, 7, 5, 3, 2 };
+ const word outLARc[M] = { 32, 33, 22, 13, 7, 5, 3, 2 };
-
-int
-main ()
-{
int i;
int main_result;
word so[N];
word LARc[M];
- main_result = 0;
+ main_result = 0;
- for (i = 0; i < N; i++)
- so[i] = inData[i];
+ for (i = 0; i < N; i++)
+ so[i] = inData[i];
- Gsm_LPC_Analysis (so, LARc);
+ Gsm_LPC_Analysis (so, LARc);
- for (i = 0; i < N; i++)
- main_result += (so[i] != outData[i]);
- for (i = 0; i < M; i++)
- main_result += (LARc[i] != outLARc[i]);
+ for (i = 0; i < N; i++)
+ main_result += (so[i] != outData[i]);
+ for (i = 0; i < M; i++)
+ main_result += (LARc[i] != outLARc[i]);
- printf ("%d\n", main_result);
- return main_result;
- }
+ //printf ("%d\n", main_result);
+ return main_result;
+}
diff --git a/benchmarks/CHStone/mips/mips.c b/benchmarks/CHStone/mips/mips.c
index 09591fe..9482a5e 100755
--- a/benchmarks/CHStone/mips/mips.c
+++ b/benchmarks/CHStone/mips/mips.c
@@ -34,9 +34,43 @@
* agents, transferees, successors, and assigns.
*
*/
-#include <stdio.h>
-int main_result;
+/*
++--------------------------------------------------------------------------+
+| CHStone : a suite of benchmark programs for C-based High-Level Synthesis |
+| ======================================================================== |
+| |
+| * Collected and Modified : Y. Hara, H. Tomiyama, S. Honda, |
+| H. Takada and K. Ishii |
+| Nagoya University, Japan |
+| |
+| * Remark : |
+| 1. This source code is modified to unify the formats of the benchmark |
+| programs in CHStone. |
+| 2. Test vectors are added for CHStone. |
+| 3. If "main_result" is 0 at the end of the program, the program is |
+| correctly executed. |
+| 4. Please follow the copyright of each benchmark program. |
++--------------------------------------------------------------------------+
+*/
+/*
+ * Copyright (C) 2008
+ * Y. Hara, H. Tomiyama, S. Honda, H. Takada and K. Ishii
+ * Nagoya University, Japan
+ * All rights reserved.
+ *
+ * Disclaimer of Warranty
+ *
+ * These software programs are available to the user without any license fee or
+ * royalty on an "as is" basis. The authors disclaims any and all warranties,
+ * whether express, implied, or statuary, including any implied warranties or
+ * merchantability or of fitness for a particular purpose. In no event shall the
+ * copyright-holder be liable for any incidental, punitive, or consequential damages
+ * of any kind whatsoever arising from the use of these programs. This disclaimer
+ * of warranty extends to the user of these programs and user's customers, employees,
+ * agents, transferees, successors, and assigns.
+ *
+ */
#define R 0
#define ADDU 33
@@ -80,7 +114,6 @@ int main_result;
#define SLTI 10
#define SLTIU 11
-#include "imem.h"
/*
+--------------------------------------------------------------------------+
| * Test Vectors (added for CHStone) |
@@ -88,16 +121,65 @@ int main_result;
| outData : expected output data |
+--------------------------------------------------------------------------+
*/
-const int A[8] = { 22, 5, -9, 3, -17, 38, 0, 11 };
-const int outData[8] = { -17, -9, 0, 3, 5, 11, 22, 38 };
-
#define IADDR(x) (((x)&0x000000ff)>>2)
#define DADDR(x) (((x)&0x000000ff)>>2)
int
main ()
{
- long long hilo;
+ const unsigned int imem[44] = {
+ 0x8fa40000, // [0x00400000] lw $4, 0($29) ; 175: lw $a0 0($sp) # argc
+ 0x27a50004, // [0x00400004] addiu $5, $29, 4 ; 176: addiu $a1 $sp 4 # argv
+ 0x24a60004, // [0x00400008] addiu $6, $5, 4 ; 177: addiu $a2 $a1 4 # envp
+ 0x00041080, // [0x0040000c] sll $2, $4, 2 ; 178: sll $v0 $a0 2
+ 0x00c23021, // [0x00400010] addu $6, $6, $2 ; 179: addu $a2 $a2 $v0
+ 0x0c100016, // [0x00400014] jal 0x00400058 [main] ; 180: jal main
+ 0x00000000, // [0x00400018] nop ; 181: nop
+ 0x3402000a, // [0x0040001c] ori $2, $0, 10 ; 183: li $v0 10
+ 0x0000000c, // [0x00400020] syscall ; 184: syscall # syscall 10 (exit)
+ 0x3c011001, // [0x00400024] lui $1, 4097 [A] ; 4: la $t0,A ; C&S
+ 0x34280000, // [0x00400028] ori $8, $1, 0 [A]
+ 0x00044880, // [0x0040002c] sll $9, $4, 2 ; 5: sll $t1,$a0,2
+ 0x01094821, // [0x00400030] addu $9, $8, $9 ; 6: addu $t1,$t0,$t1
+ 0x8d2a0000, // [0x00400034] lw $10, 0($9) ; 7: lw $t2,($t1)
+ 0x00055880, // [0x00400038] sll $11, $5, 2 ; 8: sll $t3,$a1,2
+ 0x010b5821, // [0x0040003c] addu $11, $8, $11 ; 9: addu $t3,$t0,$t3
+ 0x8d6c0000, // [0x00400040] lw $12, 0($11) ; 10: lw $t4,($t3)
+ 0x018a682a, // [0x00400044] slt $13, $12, $10 ; 11: slt $t5,$t4,$t2
+ 0x11a00003, // [0x00400048] beq $13, $0, 12 [L1-0x00400048] ; 12: beq $t5,$zero,L1
+ 0xad2c0000, // [0x0040004c] sw $12, 0($9) ; 13: sw $t4,($t1)
+ 0xad6a0000, // [0x00400050] sw $10, 0($11) ; 14: sw $t2,($t3)
+ 0x03e00008, // [0x00400054] jr $31 ; 15: jr $ra ; L1
+ 0x27bdfff4, // [0x00400058] addiu $29, $29, -12 ; 17: addiu $sp,$sp,-12 ; main
+ 0xafbf0008, // [0x0040005c] sw $31, 8($29) ; 18: sw $ra,8($sp)
+ 0xafb10004, // [0x00400060] sw $17, 4($29) ; 19: sw $s1,4($sp)
+ 0xafb00000, // [0x00400064] sw $16, 0($29) ; 20: sw $s0,0($sp)
+ 0x24100000, // [0x00400068] addiu $16, $0, 0 ; 21: addiu $s0,$zero,0
+ 0x2a080008, // [0x0040006c] slti $8, $16, 8 ; 22: slti $t0,$s0,8 ; L5
+ 0x1100000b, // [0x00400070] beq $8, $0, 44 [L2-0x00400070] ; 23: beq $t0,$zero,L2
+ 0x26110001, // [0x00400074] addiu $17, $16, 1 ; 24: addiu $s1,$s0,1
+ 0x2a280008, // [0x00400078] slti $8, $17, 8 ; 25: slti $t0,$s1,8 ; L4
+ 0x11000006, // [0x0040007c] beq $8, $0, 24 [L3-0x0040007c] ; 26: beq $t0,$zero,L3
+ 0x26040000, // [0x00400080] addiu $4, $16, 0 ; 27: addiu $a0,$s0,0
+ 0x26250000, // [0x00400084] addiu $5, $17, 0 ; 28: addiu $a1,$s1,0
+ 0x0c100009, // [0x00400088] jal 0x00400024 [compare_swap] ; 29: jal compare_swap
+ 0x26310001, // [0x0040008c] addiu $17, $17, 1 ; 30: addiu $s1,$s1,1
+ 0x0810001e, // [0x00400090] j 0x00400078 [L4] ; 31: j L4
+ 0x26100001, // [0x00400094] addiu $16, $16, 1 ; 32: addiu $s0,$s0,1 ; L3
+ 0x0810001b, // [0x00400098] j 0x0040006c [L5] ; 33: j L5
+ 0x8fbf0008, // [0x0040009c] lw $31, 8($29) ; 34: lw $ra,8($sp) ; L2
+ 0x8fb10004, // [0x004000a0] lw $17, 4($29) ; 35: lw $s1,4($sp)
+ 0x8fb00000, // [0x004000a4] lw $16, 0($29) ; 36: lw $s0,0($sp)
+ 0x27bd000c, // [0x004000a8] addiu $29, $29, 12 ; 37: addiu $sp,$sp,12
+ 0x03e00008, // [0x004000ac] jr $31 ; 38: jr $ra
+ };
+
+ const int A[8] = { 22, 5, -9, 3, -17, 38, 0, 11 };
+ const int outData[8] = { -17, -9, 0, 3, 5, 11, 22, 38 };
+
+ int main_result;
+
+ int hilo;
int reg[32];
int Hi = 0;
int Lo = 0;
@@ -112,195 +194,194 @@ main ()
int rd;
int shamt;
int funct;
- short address;
+ int address;
int tgtadr;
- while (1)
+ while (1)
+ {
+ int i;
+ int n_inst;
+
+ n_inst = 0;
+ main_result = 0;
+
+ for (i = 0; i < 32; i++)
+ {
+ reg[i] = 0;
+ }
+ reg[29] = 0x7fffeffc;
+
+ for (i = 0; i < 8; i++)
+ {
+ dmem[i] = A[i];
+ }
+
+ pc = 0x00400000;
+
+ do
+ {
+ ins = imem[IADDR (pc)];
+ pc = pc + 4;
+
+ op = ins >> 26;
+
+ switch (op)
+ {
+ case R:
+ funct = ins & 0x3f;
+ shamt = (ins >> 6) & 0x1f;
+ rd = (ins >> 11) & 0x1f;
+ rt = (ins >> 16) & 0x1f;
+ rs = (ins >> 21) & 0x1f;
+
+ switch (funct)
+ {
+
+ case ADDU:
+ reg[rd] = reg[rs] + reg[rt];
+ break;
+ case SUBU:
+ reg[rd] = reg[rs] - reg[rt];
+ break;
+ /*
+ case MULT:
+ hilo = (long long) reg[rs] * (long long) reg[rt];
+ Lo = hilo & 0x00000000ffffffffULL;
+ Hi = ((int) (hilo >> 32)) & 0xffffffffUL;
+ break;
+ case MULTU:
+ hilo =
+ (unsigned long long) ((unsigned int) (reg[rs])) *
+ (unsigned long long) ((unsigned int) (reg[rt]));
+ Lo = hilo & 0x00000000ffffffffULL;
+ Hi = ((int) (hilo >> 32)) & 0xffffffffUL;
+ break;
+ */
+ case MFHI:
+ reg[rd] = Hi;
+ break;
+ case MFLO:
+ reg[rd] = Lo;
+ break;
+
+ case AND:
+ reg[rd] = reg[rs] & reg[rt];
+ break;
+ case OR:
+ reg[rd] = reg[rs] | reg[rt];
+ break;
+ case XOR:
+ reg[rd] = reg[rs] ^ reg[rt];
+ break;
+ case SLL:
+ reg[rd] = reg[rt] << shamt;
+ break;
+ case SRL:
+ reg[rd] = reg[rt] >> shamt;
+ break;
+ case SLLV:
+ reg[rd] = reg[rt] << reg[rs];
+ break;
+ case SRLV:
+ reg[rd] = reg[rt] >> reg[rs];
+ break;
+
+ case SLT:
+ reg[rd] = reg[rs] < reg[rt];
+ break;
+ case SLTU:
+ reg[rd] = (unsigned int) reg[rs] < (unsigned int) reg[rt];
+ break;
+
+ case JR:
+ pc = reg[rs];
+ break;
+ default:
+ pc = 0; // error
+ break;
+ }
+ break;
+
+ case J:
+ tgtadr = ins & 0x3ffffff;
+ pc = tgtadr << 2;
+ break;
+ case JAL:
+ tgtadr = ins & 0x3ffffff;
+ reg[31] = pc;
+ pc = tgtadr << 2;
+ break;
+
+ default:
+
+ address = ins & 0xffff;
+ rt = (ins >> 16) & 0x1f;
+ rs = (ins >> 21) & 0x1f;
+ switch (op)
+ {
+ case ADDIU:
+ reg[rt] = reg[rs] + address;
+ break;
+
+ case ANDI:
+ reg[rt] = reg[rs] & (unsigned ) address;
+ break;
+ case ORI:
+ reg[rt] = reg[rs] | (unsigned ) address;
+ break;
+ case XORI:
+ reg[rt] = reg[rs] ^ (unsigned ) address;
+ break;
+
+ case LW:
+ reg[rt] = dmem[DADDR (reg[rs] + address)];
+ break;
+ case SW:
+ dmem[DADDR (reg[rs] + address)] = reg[rt];
+ break;
+
+ case LUI:
+ reg[rt] = address << 16;
+ break;
+
+ case BEQ:
+ if (reg[rs] == reg[rt])
+ pc = pc - 4 + (address << 2);
+ break;
+ case BNE:
+ if (reg[rs] != reg[rt])
+ pc = pc - 4 + (address << 2);
+ break;
+ case BGEZ:
+ if (reg[rs] >= 0)
+ pc = pc - 4 + (address << 2);
+ break;
+
+ case SLTI:
+ reg[rt] = reg[rs] < address;
+ break;
+
+ case SLTIU:
+ reg[rt] = (unsigned int) reg[rs] < (unsigned int) address;
+ break;
+
+ default:
+ pc = 0; /* error */
+ break;
+ }
+ break;
+ }
+ reg[0] = 0;
+ n_inst = n_inst + 1;
+ }
+ while (pc != 0);
+
+ main_result += (n_inst != 611);
+ for (j = 0; j < 8; j++)
{
- int i;
- int n_inst;
-
- n_inst = 0;
- main_result = 0;
-
- for (i = 0; i < 32; i++)
- {
- reg[i] = 0;
- }
- reg[29] = 0x7fffeffc;
-
- for (i = 0; i < 64; i++)
- {
- dmem[i] = A[i];
- }
-
- pc = 0x00400000;
-
- do
- {
- ins = imem[IADDR (pc)];
- pc = pc + 4;
-
- op = ins >> 26;
-
- switch (op)
- {
- case R:
- funct = ins & 0x3f;
- shamt = (ins >> 6) & 0x1f;
- rd = (ins >> 11) & 0x1f;
- rt = (ins >> 16) & 0x1f;
- rs = (ins >> 21) & 0x1f;
-
- switch (funct)
- {
-
- case ADDU:
- reg[rd] = reg[rs] + reg[rt];
- break;
- case SUBU:
- reg[rd] = reg[rs] - reg[rt];
- break;
-
- case MULT:
- hilo = (long long) reg[rs] * (long long) reg[rt];
- Lo = hilo & 0x00000000ffffffffULL;
- Hi = ((int) (hilo >> 32)) & 0xffffffffUL;
- break;
- case MULTU:
- hilo =
- (unsigned long long) ((unsigned int) (reg[rs])) *
- (unsigned long long) ((unsigned int) (reg[rt]));
- Lo = hilo & 0x00000000ffffffffULL;
- Hi = ((int) (hilo >> 32)) & 0xffffffffUL;
- break;
-
- case MFHI:
- reg[rd] = Hi;
- break;
- case MFLO:
- reg[rd] = Lo;
- break;
-
- case AND:
- reg[rd] = reg[rs] & reg[rt];
- break;
- case OR:
- reg[rd] = reg[rs] | reg[rt];
- break;
- case XOR:
- reg[rd] = reg[rs] ^ reg[rt];
- break;
- case SLL:
- reg[rd] = reg[rt] << shamt;
- break;
- case SRL:
- reg[rd] = reg[rt] >> shamt;
- break;
- case SLLV:
- reg[rd] = reg[rt] << reg[rs];
- break;
- case SRLV:
- reg[rd] = reg[rt] >> reg[rs];
- break;
-
- case SLT:
- reg[rd] = reg[rs] < reg[rt];
- break;
- case SLTU:
- reg[rd] = (unsigned int) reg[rs] < (unsigned int) reg[rt];
- break;
-
- case JR:
- pc = reg[rs];
- break;
- default:
- pc = 0; // error
- break;
- }
- break;
-
- case J:
- tgtadr = ins & 0x3ffffff;
- pc = tgtadr << 2;
- break;
- case JAL:
- tgtadr = ins & 0x3ffffff;
- reg[31] = pc;
- pc = tgtadr << 2;
- break;
-
- default:
-
- address = ins & 0xffff;
- rt = (ins >> 16) & 0x1f;
- rs = (ins >> 21) & 0x1f;
- switch (op)
- {
- case ADDIU:
- reg[rt] = reg[rs] + address;
- break;
-
- case ANDI:
- reg[rt] = reg[rs] & (unsigned short) address;
- break;
- case ORI:
- reg[rt] = reg[rs] | (unsigned short) address;
- break;
- case XORI:
- reg[rt] = reg[rs] ^ (unsigned short) address;
- break;
-
- case LW:
- reg[rt] = dmem[DADDR (reg[rs] + address)];
- break;
- case SW:
- dmem[DADDR (reg[rs] + address)] = reg[rt];
- break;
-
- case LUI:
- reg[rt] = address << 16;
- break;
-
- case BEQ:
- if (reg[rs] == reg[rt])
- pc = pc - 4 + (address << 2);
- break;
- case BNE:
- if (reg[rs] != reg[rt])
- pc = pc - 4 + (address << 2);
- break;
- case BGEZ:
- if (reg[rs] >= 0)
- pc = pc - 4 + (address << 2);
- break;
-
- case SLTI:
- reg[rt] = reg[rs] < address;
- break;
-
- case SLTIU:
- reg[rt] = (unsigned int) reg[rs] < (unsigned short) address;
- break;
-
- default:
- pc = 0; /* error */
- break;
- }
- break;
- }
- reg[0] = 0;
- n_inst = n_inst + 1;
- }
- while (pc != 0);
-
- main_result += (n_inst != 611);
- for (j = 0; j < 8; j++)
- {
- main_result += (dmem[j] != outData[j]);
- }
-
- printf ("%d\n", main_result);
- return main_result;
+ main_result += (dmem[j] == outData[j]);
}
+
+ return main_result;
+ }
}
diff --git a/benchmarks/CHStone/sha/sha_driver.c b/benchmarks/CHStone/sha/sha_driver.c
index 5cbb394..d533c52 100755
--- a/benchmarks/CHStone/sha/sha_driver.c
+++ b/benchmarks/CHStone/sha/sha_driver.c
@@ -25,25 +25,1326 @@
/* activated by defining USE_MODIFIED_SHA */
#include <stdio.h>
-#include "sha.h"
-#include "sha.c"
+/* NIST Secure Hash Algorithm */
+/* heavily modified from Peter C. Gutmann's implementation */
+
+/* Useful defines & typedefs */
+
+typedef unsigned char BYTE;
+typedef unsigned int INT32;
+
+#define SHA_BLOCKSIZE 64
+
+void sha_init (INT32 sha_info_digest[5], INT32 * sha_info_count_lo, INT32 * sha_info_count_hi);
+void sha_update (const BYTE *, int, INT32 sha_info_digest[5], INT32 * sha_info_count_lo, INT32 * sha_info_count_hi, INT32 sha_info_data[16]);
+void sha_final (INT32 sha_info_digest[5], INT32 * sha_info_count_lo, INT32 * sha_info_count_hi, INT32 sha_info_data[16]);
+
+void sha_stream (INT32 sha_info_digest[5]);
+void sha_print ();
+
+#define BLOCK_SIZE 8192
+#define VSIZE 2
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) |
+| indata, in_i : input data |
++--------------------------------------------------------------------------+
+*/
+#define f1(x,y,z) ((x & y) | (~x & z))
+#define f2(x,y,z) (x ^ y ^ z)
+#define f3(x,y,z) ((x & y) | (x & z) | (y & z))
+#define f4(x,y,z) (x ^ y ^ z)
+
+/* SHA constants */
+
+#define CONST1 0x5a827999L
+#define CONST2 0x6ed9eba1L
+#define CONST3 0x8f1bbcdcL
+#define CONST4 0xca62c1d6L
+
+/* 32-bit rotate */
+
+#define ROT32(x,n) ((x << n) | (x >> (32 - n)))
+
+#define FUNC(n,i) \
+ temp = ROT32(A,5) + f##n(B,C,D) + E + W[i] + CONST##n; \
+ E = D; D = C; C = ROT32(B,30); B = A; A = temp
+
+void
+local_memset (INT32 * s, int c, int n, int e)
+{
+ INT32 uc;
+ INT32 *p;
+ int m;
+
+ m = n >> 2;
+ uc = c;
+ p = (INT32 *) s;
+ while (e-- > 0)
+ {
+ p++;
+ }
+ while (m-- > 0)
+ {
+ *p++ = uc;
+ }
+}
+
+void
+local_memcpy (INT32 * s1, const BYTE * s2, int n)
+{
+ INT32 *p1;
+ BYTE *p2;
+ INT32 tmp;
+ int m;
+ m = n >> 2;
+ p1 = (INT32 *) s1;
+ p2 = (BYTE *) s2;
+
+ while (m-- > 0)
+ {
+ tmp = 0;
+ tmp |= 0xFF & *p2++;
+ tmp |= (0xFF & *p2++) << 8;
+ tmp |= (0xFF & *p2++) << 16;
+ tmp |= (0xFF & *p2++) << 24;
+ *p1 = tmp;
+ p1++;
+ }
+}
+
+/* do SHA transformation */
+
+static void
+sha_transform (INT32 sha_info_digest[5], INT32 sha_info_data[16])
+{
+ int i;
+ INT32 temp, A, B, C, D, E, W[80];
+
+ for (i = 0; i < 16; ++i)
+ {
+ W[i] = sha_info_data[i];
+ }
+ for (i = 16; i < 80; ++i)
+ {
+ W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
+ }
+ A = sha_info_digest[0];
+ B = sha_info_digest[1];
+ C = sha_info_digest[2];
+ D = sha_info_digest[3];
+ E = sha_info_digest[4];
+
+ for (i = 0; i < 20; ++i)
+ {
+ FUNC (1, i);
+ }
+ for (i = 20; i < 40; ++i)
+ {
+ FUNC (2, i);
+ }
+ for (i = 40; i < 60; ++i)
+ {
+ FUNC (3, i);
+ }
+ for (i = 60; i < 80; ++i)
+ {
+ FUNC (4, i);
+ }
+
+ sha_info_digest[0] += A;
+ sha_info_digest[1] += B;
+ sha_info_digest[2] += C;
+ sha_info_digest[3] += D;
+ sha_info_digest[4] += E;
+}
+
+/* initialize the SHA digest */
+
+void
+sha_init (INT32 sha_info_digest[5], INT32 * sha_info_count_lo, INT32 * sha_info_count_hi)
+{
+ sha_info_digest[0] = 0x67452301L;
+ sha_info_digest[1] = 0xefcdab89L;
+ sha_info_digest[2] = 0x98badcfeL;
+ sha_info_digest[3] = 0x10325476L;
+ sha_info_digest[4] = 0xc3d2e1f0L;
+ *sha_info_count_lo = 0L;
+ *sha_info_count_hi = 0L;
+}
+
+/* update the SHA digest */
+
+void
+sha_update (const BYTE * buffer, int count, INT32 sha_info_digest[5], INT32 * sha_info_count_lo, INT32 * sha_info_count_hi, INT32 sha_info_data[16])
+{
+ if ((*sha_info_count_lo + ((INT32) count << 3)) < *sha_info_count_lo)
+ {
+ *sha_info_count_hi = *sha_info_count_hi + 1 ;
+ }
+ *sha_info_count_lo += (INT32) count << 3;
+ *sha_info_count_hi += (INT32) count >> 29;
+ while (count >= SHA_BLOCKSIZE)
+ {
+ local_memcpy (sha_info_data, buffer, SHA_BLOCKSIZE);
+ sha_transform (sha_info_digest, sha_info_data);
+ buffer += SHA_BLOCKSIZE;
+ count -= SHA_BLOCKSIZE;
+ }
+ local_memcpy (sha_info_data, buffer, count);
+}
+
+/* finish computing the SHA digest */
+
+void
+sha_final (INT32 sha_info_digest[5], INT32 * sha_info_count_lo, INT32 * sha_info_count_hi, INT32 sha_info_data[16])
+{
+ int count;
+ INT32 lo_bit_count;
+ INT32 hi_bit_count;
+
+
+ lo_bit_count = *sha_info_count_lo;
+ hi_bit_count = *sha_info_count_hi;
+ count = (int) ((lo_bit_count >> 3) & 0x3f);
+ sha_info_data[count++] = 0x80;
+ if (count > 56)
+ {
+ local_memset (sha_info_data, 0, 64 - count, count);
+ sha_transform (sha_info_digest, sha_info_data);
+ local_memset (sha_info_data, 0, 56, 0);
+ }
+ else
+ {
+ local_memset (sha_info_data, 0, 56 - count, count);
+ }
+ sha_info_data[14] = hi_bit_count;
+ sha_info_data[15] = lo_bit_count;
+ sha_transform (sha_info_digest, sha_info_data);
+}
+
+/* compute the SHA digest of a FILE stream */
+void
+sha_stream (INT32 sha_info_digest[5])
+{
+ int i, j;
+ const BYTE *p;
+ INT32 sha_info_count_lo, sha_info_count_hi; /* 64-bit bit count */
+ INT32 sha_info_data[16];
+ const BYTE indata[VSIZE][BLOCK_SIZE] = {
+ {75, 117, 114, 116, 86, 111, 110, 110, 101, 103, 117, 116, 115, 67, 111,
+ 109, 109, 101, 110, 99, 101, 109, 101, 110, 116, 65, 100, 100, 114, 101,
+ 115, 115, 97, 116, 77, 73, 84, 76, 97, 100, 105, 101, 115, 97, 110, 100,
+ 103, 101, 110, 116, 108, 101, 109, 101, 110, 111, 102, 116, 104, 101, 99,
+ 108, 97, 115, 115, 111, 102, 57, 55, 87, 101, 97, 114, 115, 117, 110, 115,
+ 99, 114, 101, 101, 110, 73, 102, 73, 99, 111, 117, 108, 100, 111, 102, 102,
+ 101, 114, 121, 111, 117, 111, 110, 108, 121, 111, 110, 101, 116, 105, 112,
+ 102, 111, 114, 116, 104, 101, 102, 117, 116, 117, 114, 101, 115, 117, 110,
+ 115, 99, 114, 101, 101, 110, 119, 111, 117, 108, 100, 98, 101, 105, 116,
+ 84, 104, 101, 108, 111, 110, 103, 116, 101, 114, 109, 98, 101, 110, 101,
+ 102, 105, 116, 115, 111, 102, 115, 117, 110, 115, 99, 114, 101, 101, 110,
+ 104, 97, 118, 101, 98, 101, 101, 110, 112, 114, 111, 118, 101, 100, 98,
+ 121, 115, 99, 105, 101, 110, 116, 105, 115, 116, 115, 119, 104, 101, 114,
+ 101, 97, 115, 116, 104, 101, 114, 101, 115, 116, 111, 102, 109, 121, 97,
+ 100, 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109,
+ 111, 114, 101, 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110,
+ 109, 121, 111, 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103,
+ 101, 120, 112, 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108,
+ 100, 105, 115, 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118,
+ 105, 99, 101, 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112,
+ 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102,
+ 121, 111, 117, 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101,
+ 114, 109, 105, 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116,
+ 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111,
+ 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121,
+ 111, 117, 114, 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104,
+ 101, 121, 118, 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117,
+ 115, 116, 109, 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111,
+ 117, 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111,
+ 116, 111, 115, 111, 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110,
+ 100, 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117,
+ 99, 97, 110, 116, 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119,
+ 109, 117, 99, 104, 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121,
+ 108, 97, 121, 98, 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100,
+ 104, 111, 119, 102, 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114,
+ 101, 97, 108, 108, 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97,
+ 114, 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117,
+ 105, 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119, 111, 114, 114,
+ 121, 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116, 117, 114, 101,
+ 79, 114, 119, 111, 114, 114, 121, 98, 117, 116, 107, 110, 111, 119, 116,
+ 104, 97, 116, 75, 117, 114, 116, 86, 111, 110, 110, 101, 103, 117, 75, 117,
+ 114, 116, 86, 111, 110, 110, 101, 103, 117, 116, 115, 67, 111, 109, 109,
+ 101, 110, 99, 101, 109, 101, 110, 116, 65, 100, 100, 114, 101, 115, 115,
+ 97, 116, 77, 73, 84, 76, 97, 100, 105, 101, 115, 97, 110, 100, 103, 101,
+ 110, 116, 108, 101, 109, 101, 110, 111, 102, 116, 104, 101, 99, 108, 97,
+ 115, 115, 111, 102, 57, 55, 87, 101, 97, 114, 115, 117, 110, 115, 99, 114,
+ 101, 101, 110, 73, 102, 73, 99, 111, 117, 108, 100, 111, 102, 102, 101,
+ 114, 121, 111, 117, 111, 110, 108, 121, 111, 110, 101, 116, 105, 112, 102,
+ 111, 114, 116, 104, 101, 102, 117, 116, 117, 114, 101, 115, 117, 110, 115,
+ 99, 114, 101, 101, 110, 119, 111, 117, 108, 100, 98, 101, 105, 116, 84,
+ 104, 101, 108, 111, 110, 103, 116, 101, 114, 109, 98, 101, 110, 101, 102,
+ 105, 116, 115, 111, 102, 115, 117, 110, 115, 99, 114, 101, 101, 110, 104,
+ 97, 118, 101, 98, 101, 101, 110, 112, 114, 111, 118, 101, 100, 98, 121,
+ 115, 99, 105, 101, 110, 116, 105, 115, 116, 115, 119, 104, 101, 114, 101,
+ 97, 115, 116, 104, 101, 114, 101, 115, 116, 111, 102, 109, 121, 97, 100,
+ 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109, 111,
+ 114, 101, 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110, 109,
+ 121, 111, 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103, 101,
+ 120, 112, 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108, 100,
+ 105, 115, 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118, 105,
+ 99, 101, 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112, 111,
+ 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121,
+ 111, 117, 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101, 114,
+ 109, 105, 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116, 117,
+ 110, 100, 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111, 119,
+ 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111,
+ 117, 114, 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101,
+ 121, 118, 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115,
+ 116, 109, 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117,
+ 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116,
+ 111, 115, 111, 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110, 100,
+ 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99,
+ 97, 110, 116, 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119, 109,
+ 117, 99, 104, 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121, 108,
+ 97, 121, 98, 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100, 104,
+ 111, 119, 102, 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114, 101,
+ 97, 108, 108, 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97, 114,
+ 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117, 105,
+ 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119, 111, 114, 114, 121,
+ 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116, 117, 114, 101, 79,
+ 114, 119, 111, 114, 114, 121, 98, 117, 116, 107, 110, 111, 119, 116, 104,
+ 97, 116, 75, 117, 114, 116, 86, 111, 110, 110, 101, 103, 117, 116, 115, 67,
+ 111, 109, 109, 101, 110, 99, 101, 109, 101, 110, 116, 65, 100, 100, 114,
+ 101, 115, 115, 97, 116, 77, 73, 84, 76, 97, 100, 105, 101, 115, 97, 110,
+ 100, 103, 101, 110, 116, 108, 101, 109, 101, 110, 111, 102, 116, 104, 101,
+ 99, 108, 97, 115, 115, 111, 102, 57, 55, 87, 101, 97, 114, 115, 117, 110,
+ 115, 99, 114, 101, 101, 110, 73, 102, 73, 99, 111, 117, 108, 100, 111, 102,
+ 102, 101, 114, 121, 111, 117, 111, 110, 108, 121, 111, 110, 101, 116, 105,
+ 112, 102, 111, 114, 116, 104, 101, 102, 117, 116, 117, 114, 101, 115, 117,
+ 110, 115, 99, 114, 101, 101, 110, 119, 111, 117, 108, 100, 98, 101, 105,
+ 116, 84, 104, 101, 108, 111, 110, 103, 116, 101, 114, 109, 98, 101, 110,
+ 101, 102, 105, 116, 115, 111, 102, 115, 117, 110, 115, 99, 114, 101, 101,
+ 110, 104, 97, 118, 101, 98, 101, 101, 110, 112, 114, 111, 118, 101, 100,
+ 98, 121, 115, 99, 105, 101, 110, 116, 105, 115, 116, 115, 119, 104, 101,
+ 114, 101, 97, 115, 116, 104, 101, 114, 101, 115, 116, 111, 102, 109, 121,
+ 97, 100, 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115,
+ 109, 111, 114, 101, 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97,
+ 110, 109, 121, 111, 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110,
+ 103, 101, 120, 112, 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108,
+ 108, 100, 105, 115, 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100,
+ 118, 105, 99, 101, 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101,
+ 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111,
+ 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118,
+ 101, 114, 109, 105, 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111,
+ 116, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112,
+ 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102,
+ 121, 111, 117, 114, 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116,
+ 104, 101, 121, 118, 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114,
+ 117, 115, 116, 109, 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121,
+ 111, 117, 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104,
+ 111, 116, 111, 115, 111, 102, 121, 111, 117, 114, 115, 101, 108, 102, 97,
+ 110, 100, 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111,
+ 117, 99, 97, 110, 116, 103, 114, 97, 115, 112, 110, 111, 119, 104, 111,
+ 119, 109, 117, 99, 104, 112, 111, 115, 115, 105, 98, 105, 108, 105, 116,
+ 121, 108, 97, 121, 98, 101, 102, 111, 114, 101, 121, 111, 117, 97, 110,
+ 100, 104, 111, 119, 102, 97, 98, 117, 108, 111, 117, 115, 121, 111, 117,
+ 114, 101, 97, 108, 108, 121, 108, 111, 111, 107, 101, 100, 89, 111, 117,
+ 97, 114, 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117,
+ 105, 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119, 111, 114, 114,
+ 121, 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116, 117, 114, 101,
+ 79, 114, 119, 111, 114, 114, 121, 98, 117, 116, 107, 110, 111, 119, 116,
+ 104, 97, 116, 75, 117, 114, 116, 86, 111, 110, 110, 101, 103, 117, 116,
+ 115, 67, 111, 109, 109, 101, 110, 99, 101, 109, 101, 110, 116, 65, 100,
+ 100, 114, 101, 115, 115, 97, 116, 77, 73, 84, 76, 97, 100, 105, 101, 115,
+ 97, 110, 100, 103, 101, 110, 116, 108, 101, 109, 101, 110, 111, 102, 116,
+ 104, 101, 99, 108, 97, 115, 115, 111, 102, 57, 55, 87, 101, 97, 114, 115,
+ 117, 110, 115, 99, 114, 101, 101, 110, 73, 102, 73, 99, 111, 117, 108, 100,
+ 111, 102, 102, 101, 114, 121, 111, 117, 111, 110, 108, 121, 111, 110, 101,
+ 116, 105, 112, 102, 111, 114, 116, 104, 101, 102, 117, 116, 117, 114, 101,
+ 115, 117, 110, 115, 99, 114, 101, 101, 110, 119, 111, 117, 108, 100, 98,
+ 101, 105, 116, 84, 104, 101, 108, 111, 110, 103, 116, 101, 114, 109, 98,
+ 101, 110, 101, 102, 105, 116, 115, 111, 102, 115, 117, 110, 115, 99, 114,
+ 101, 101, 110, 104, 97, 118, 101, 98, 101, 101, 110, 112, 114, 111, 118,
+ 101, 100, 98, 121, 115, 99, 105, 101, 110, 116, 105, 115, 116, 115, 119,
+ 104, 101, 114, 101, 97, 115, 116, 104, 101, 114, 101, 115, 116, 111, 102,
+ 109, 121, 97, 100, 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115,
+ 105, 115, 109, 111, 114, 101, 114, 101, 108, 105, 97, 98, 108, 101, 116,
+ 104, 97, 110, 109, 121, 111, 119, 110, 109, 101, 97, 110, 100, 101, 114,
+ 105, 110, 103, 101, 120, 112, 101, 114, 105, 101, 110, 99, 101, 73, 119,
+ 105, 108, 108, 100, 105, 115, 112, 101, 110, 115, 101, 116, 104, 105, 115,
+ 97, 100, 118, 105, 99, 101, 110, 111, 119, 69, 110, 106, 111, 121, 116,
+ 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116,
+ 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 79, 104, 110,
+ 101, 118, 101, 114, 109, 105, 110, 100, 89, 111, 117, 119, 105, 108, 108,
+ 110, 111, 116, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 116, 104,
+ 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121,
+ 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 117, 110, 116, 105,
+ 108, 116, 104, 101, 121, 118, 101, 102, 97, 100, 101, 100, 66, 117, 116,
+ 116, 114, 117, 115, 116, 109, 101, 105, 110, 50, 48, 121, 101, 97, 114,
+ 115, 121, 111, 117, 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116,
+ 112, 104, 111, 116, 111, 115, 111, 102, 121, 111, 117, 114, 115, 101, 108,
+ 102, 97, 110, 100, 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121,
+ 121, 111, 117, 99, 97, 110, 116, 103, 114, 97, 115, 112, 110, 111, 119,
+ 104, 111, 119, 109, 117, 99, 104, 112, 111, 115, 115, 105, 98, 105, 108,
+ 105, 116, 121, 108, 97, 121, 98, 101, 102, 111, 114, 101, 121, 111, 117,
+ 97, 110, 100, 104, 111, 119, 102, 97, 98, 117, 108, 111, 117, 115, 121,
+ 111, 117, 114, 101, 97, 108, 108, 121, 108, 111, 111, 107, 101, 100, 89,
+ 111, 117, 97, 114, 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121,
+ 111, 117, 105, 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119, 111,
+ 114, 114, 121, 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116, 117,
+ 114, 101, 79, 114, 119, 111, 114, 114, 121, 75, 117, 114, 116, 86, 111,
+ 110, 110, 101, 103, 117, 116, 115, 67, 111, 109, 109, 101, 110, 99, 101,
+ 109, 101, 110, 116, 65, 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84,
+ 76, 97, 100, 105, 101, 115, 97, 110, 100, 103, 101, 110, 116, 108, 101,
+ 109, 101, 110, 111, 102, 116, 104, 101, 99, 108, 97, 115, 115, 111, 102,
+ 57, 55, 87, 101, 97, 114, 115, 117, 110, 115, 99, 114, 101, 101, 110, 73,
+ 102, 73, 99, 111, 117, 108, 100, 111, 102, 102, 101, 114, 121, 111, 117,
+ 111, 110, 108, 121, 111, 110, 101, 116, 105, 112, 102, 111, 114, 116, 104,
+ 101, 102, 117, 116, 117, 114, 101, 115, 117, 110, 115, 99, 114, 101, 101,
+ 110, 119, 111, 117, 108, 100, 98, 101, 105, 116, 84, 104, 101, 108, 111,
+ 110, 103, 116, 101, 114, 109, 98, 101, 110, 101, 102, 105, 116, 115, 111,
+ 102, 115, 117, 110, 115, 99, 114, 101, 101, 110, 104, 97, 118, 101, 98,
+ 101, 101, 110, 112, 114, 111, 118, 101, 100, 98, 121, 115, 99, 105, 101,
+ 110, 116, 105, 115, 116, 115, 119, 104, 101, 114, 101, 97, 115, 116, 104,
+ 101, 114, 101, 115, 116, 111, 102, 109, 121, 97, 100, 118, 105, 99, 101,
+ 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109, 111, 114, 101, 114,
+ 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110, 109, 121, 111, 119,
+ 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103, 101, 120, 112, 101,
+ 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108, 100, 105, 115, 112,
+ 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118, 105, 99, 101, 110,
+ 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112, 111, 119, 101, 114,
+ 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114,
+ 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101, 114, 109, 105, 110,
+ 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116, 117, 110, 100, 101,
+ 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111, 119, 101, 114, 97,
+ 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114, 121,
+ 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101, 121, 118, 101,
+ 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115, 116, 109, 101,
+ 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117, 108, 108, 108,
+ 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116, 111, 115, 111,
+ 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110, 100, 114, 101, 99,
+ 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99, 97, 110, 116,
+ 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119, 109, 117, 99, 104,
+ 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121, 108, 97, 121, 98,
+ 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100, 104, 111, 119, 102,
+ 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114, 101, 97, 108, 108,
+ 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97, 114, 101, 110, 111,
+ 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117, 105, 109, 97, 103, 105,
+ 110, 101, 68, 111, 110, 116, 119, 111, 114, 114, 121, 97, 98, 111, 117,
+ 116, 116, 104, 101, 102, 117, 116, 117, 114, 101, 79, 114, 119, 111, 114,
+ 114, 121, 98, 117, 116, 107, 110, 111, 119, 116, 104, 97, 116, 75, 117,
+ 114, 116, 86, 111, 110, 110, 101, 103, 117, 75, 117, 114, 116, 86, 111,
+ 110, 110, 101, 103, 117, 116, 115, 67, 111, 109, 109, 101, 110, 99, 101,
+ 109, 101, 110, 116, 65, 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84,
+ 76, 97, 100, 105, 101, 115, 97, 110, 100, 103, 101, 110, 116, 108, 101,
+ 109, 101, 110, 111, 102, 116, 104, 101, 99, 108, 97, 115, 115, 111, 102,
+ 57, 55, 87, 101, 97, 114, 115, 117, 110, 115, 99, 114, 101, 101, 110, 73,
+ 102, 73, 99, 111, 117, 108, 100, 111, 102, 102, 101, 114, 121, 111, 117,
+ 111, 110, 108, 121, 111, 110, 101, 116, 105, 112, 102, 111, 114, 116, 104,
+ 101, 102, 117, 116, 117, 114, 101, 115, 117, 110, 115, 99, 114, 101, 101,
+ 110, 119, 111, 117, 108, 100, 98, 101, 105, 116, 84, 104, 101, 108, 111,
+ 110, 103, 116, 101, 114, 109, 98, 101, 110, 101, 102, 105, 116, 115, 111,
+ 102, 115, 117, 110, 115, 99, 114, 101, 101, 110, 104, 97, 118, 101, 98,
+ 101, 101, 110, 112, 114, 111, 118, 101, 100, 98, 121, 115, 99, 105, 101,
+ 110, 116, 105, 115, 116, 115, 119, 104, 101, 114, 101, 97, 115, 116, 104,
+ 101, 114, 101, 115, 116, 111, 102, 109, 121, 97, 100, 118, 105, 99, 101,
+ 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109, 111, 114, 101, 114,
+ 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110, 109, 121, 111, 119,
+ 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103, 101, 120, 112, 101,
+ 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108, 100, 105, 115, 112,
+ 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118, 105, 99, 101, 110,
+ 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112, 111, 119, 101, 114,
+ 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114,
+ 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101, 114, 109, 105, 110,
+ 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116, 117, 110, 100, 101,
+ 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111, 119, 101, 114, 97,
+ 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114, 121,
+ 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101, 121, 118, 101,
+ 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115, 116, 109, 101,
+ 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117, 108, 108, 108,
+ 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116, 111, 115, 111,
+ 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110, 100, 114, 101, 99,
+ 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99, 97, 110, 116,
+ 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119, 109, 117, 99, 104,
+ 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121, 108, 97, 121, 98,
+ 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100, 104, 111, 119, 102,
+ 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114, 101, 97, 108, 108,
+ 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97, 114, 101, 110, 111,
+ 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117, 105, 109, 97, 103, 105,
+ 110, 101, 68, 111, 110, 116, 119, 111, 114, 114, 121, 97, 98, 111, 117,
+ 116, 116, 104, 101, 102, 117, 116, 117, 114, 101, 79, 114, 119, 111, 114,
+ 114, 121, 98, 117, 116, 107, 110, 111, 119, 116, 104, 97, 116, 75, 117,
+ 114, 116, 86, 111, 110, 110, 101, 103, 117, 116, 115, 67, 111, 109, 109,
+ 101, 110, 99, 101, 109, 101, 110, 116, 65, 100, 100, 114, 101, 115, 115,
+ 97, 116, 77, 73, 84, 76, 97, 100, 105, 101, 115, 97, 110, 100, 103, 101,
+ 110, 116, 108, 101, 109, 101, 110, 111, 102, 116, 104, 101, 99, 108, 97,
+ 115, 115, 111, 102, 57, 55, 87, 101, 97, 114, 115, 117, 110, 115, 99, 114,
+ 101, 101, 110, 73, 102, 73, 99, 111, 117, 108, 100, 111, 102, 102, 101,
+ 114, 121, 111, 117, 111, 110, 108, 121, 111, 110, 101, 116, 105, 112, 102,
+ 111, 114, 116, 104, 101, 102, 117, 116, 117, 114, 101, 115, 117, 110, 115,
+ 99, 114, 101, 101, 110, 119, 111, 117, 108, 100, 98, 101, 105, 116, 84,
+ 104, 101, 108, 111, 110, 103, 116, 101, 114, 109, 98, 101, 110, 101, 102,
+ 105, 116, 115, 111, 102, 115, 117, 110, 115, 99, 114, 101, 101, 110, 104,
+ 97, 118, 101, 98, 101, 101, 110, 112, 114, 111, 118, 101, 100, 98, 121,
+ 115, 99, 105, 101, 110, 116, 105, 115, 116, 115, 119, 104, 101, 114, 101,
+ 97, 115, 116, 104, 101, 114, 101, 115, 116, 111, 102, 109, 121, 97, 100,
+ 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109, 111,
+ 114, 101, 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110, 109,
+ 121, 111, 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103, 101,
+ 120, 112, 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108, 100,
+ 105, 115, 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118, 105,
+ 99, 101, 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112, 111,
+ 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121,
+ 111, 117, 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101, 114,
+ 109, 105, 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116, 117,
+ 110, 100, 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111, 119,
+ 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111,
+ 117, 114, 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101,
+ 121, 118, 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115,
+ 116, 109, 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117,
+ 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116,
+ 111, 115, 111, 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110, 100,
+ 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99,
+ 97, 110, 116, 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119, 109,
+ 117, 99, 104, 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121, 108,
+ 97, 121, 98, 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100, 104,
+ 111, 119, 102, 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114, 101,
+ 97, 108, 108, 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97, 114,
+ 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117, 105,
+ 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119, 111, 114, 114, 121,
+ 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116, 117, 114, 101, 79,
+ 114, 119, 111, 114, 114, 121, 98, 117, 116, 107, 110, 111, 119, 116, 104,
+ 97, 116, 75, 117, 114, 116, 86, 111, 110, 110, 101, 103, 117, 116, 115, 67,
+ 111, 109, 109, 101, 110, 99, 101, 109, 101, 110, 116, 65, 100, 100, 114,
+ 101, 115, 115, 97, 116, 77, 73, 84, 76, 97, 100, 105, 101, 115, 97, 110,
+ 100, 103, 101, 110, 116, 108, 101, 109, 101, 110, 111, 102, 116, 104, 101,
+ 99, 108, 97, 115, 115, 111, 102, 57, 55, 87, 101, 97, 114, 115, 117, 110,
+ 115, 99, 114, 101, 101, 110, 73, 102, 73, 99, 111, 117, 108, 100, 111, 102,
+ 102, 101, 114, 121, 111, 117, 111, 110, 108, 121, 111, 110, 101, 116, 105,
+ 112, 102, 111, 114, 116, 104, 101, 102, 117, 116, 117, 114, 101, 115, 117,
+ 110, 115, 99, 114, 101, 101, 110, 119, 111, 117, 108, 100, 98, 101, 105,
+ 116, 84, 104, 101, 108, 111, 110, 103, 116, 101, 114, 109, 98, 101, 110,
+ 101, 102, 105, 116, 115, 111, 102, 115, 117, 110, 115, 99, 114, 101, 101,
+ 110, 104, 97, 118, 101, 98, 101, 101, 110, 112, 114, 111, 118, 101, 100,
+ 98, 121, 115, 99, 105, 101, 110, 116, 105, 115, 116, 115, 119, 104, 101,
+ 114, 101, 97, 115, 116, 104, 101, 114, 101, 115, 116, 111, 102, 109, 121,
+ 97, 100, 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115,
+ 109, 111, 114, 101, 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97,
+ 110, 109, 121, 111, 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110,
+ 103, 101, 120, 112, 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108,
+ 108, 100, 105, 115, 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100,
+ 118, 105, 99, 101, 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101,
+ 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111,
+ 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118,
+ 101, 114, 109, 105, 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111,
+ 116, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112,
+ 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102,
+ 121, 111, 117, 114, 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116,
+ 104, 101, 121, 118, 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114,
+ 117, 115, 116, 109, 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121,
+ 111, 117, 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104,
+ 111, 116, 111, 115, 111, 102, 121, 111, 117, 114, 115, 101, 108, 102, 97,
+ 110, 100, 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111,
+ 117, 99, 97, 110, 116, 103, 114, 97, 115, 112, 110, 111, 119, 104, 111,
+ 119, 109, 117, 99, 104, 112, 111, 115, 115, 105, 98, 105, 108, 105, 116,
+ 121, 108, 97, 121, 98, 101, 102, 111, 114, 101, 121, 111, 117, 97, 110,
+ 100, 104, 111, 119, 102, 97, 98, 117, 108, 111, 117, 115, 121, 111, 117,
+ 114, 101, 97, 108, 108, 121, 108, 111, 111, 107, 101, 100, 89, 111, 117,
+ 97, 114, 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117,
+ 105, 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119, 111, 114, 114,
+ 121, 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116, 117, 114, 101,
+ 79, 114, 119, 111, 114, 114, 121, 98, 117, 116, 107, 110, 111, 119, 116,
+ 104, 97, 116, 116, 115, 67, 111, 109, 109, 101, 110, 99, 101, 109, 101,
+ 110, 116, 65, 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84, 76, 97,
+ 100, 105, 101, 115, 97, 110, 100, 103, 101, 110, 116, 108, 101, 109, 101,
+ 110, 111, 102, 116, 104, 101, 99, 108, 97, 115, 115, 111, 102, 57, 55, 87,
+ 101, 97, 114, 115, 117, 110, 115, 99, 114, 101, 101, 110, 73, 102, 73, 99,
+ 111, 117, 108, 100, 111, 102, 102, 101, 114, 121, 111, 117, 111, 110, 108,
+ 121, 111, 110, 101, 116, 105, 112, 102, 111, 114, 116, 104, 101, 102, 117,
+ 116, 117, 114, 101, 75, 117, 114, 116, 86, 111, 110, 110, 101, 103, 117,
+ 116, 115, 67, 111, 109, 109, 101, 110, 99, 101, 109, 101, 110, 116, 65,
+ 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84, 76, 97, 100, 105, 101,
+ 115, 97, 110, 100, 103, 101, 110, 116, 108, 101, 109, 101, 110, 111, 102,
+ 116, 104, 101, 99, 108, 97, 115, 115, 111, 102, 57, 55, 87, 101, 97, 114,
+ 115, 117, 110, 115, 99, 114, 101, 101, 110, 73, 102, 73, 99, 111, 117, 108,
+ 100, 111, 102, 102, 101, 114, 121, 111, 117, 111, 110, 108, 121, 111, 110,
+ 101, 116, 105, 112, 102, 111, 114, 116, 104, 101, 102, 117, 116, 117, 114,
+ 101, 115, 117, 110, 115, 99, 114, 101, 101, 110, 119, 111, 117, 108, 100,
+ 98, 101, 105, 116, 84, 104, 101, 108, 111, 110, 103, 116, 101, 114, 109,
+ 98, 101, 110, 101, 102, 105, 116, 115, 111, 102, 115, 117, 110, 115, 99,
+ 114, 101, 101, 110, 104, 97, 118, 101, 98, 101, 101, 110, 112, 114, 111,
+ 118, 101, 100, 98, 121, 115, 99, 105, 101, 110, 116, 105, 115, 116, 115,
+ 119, 104, 101, 114, 101, 97, 115, 116, 104, 101, 114, 101, 115, 116, 111,
+ 102, 109, 121, 97, 100, 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97,
+ 115, 105, 115, 109, 111, 114, 101, 114, 101, 108, 105, 97, 98, 108, 101,
+ 116, 104, 97, 110, 109, 121, 111, 119, 110, 109, 101, 97, 110, 100, 101,
+ 114, 105, 110, 103, 101, 120, 112, 101, 114, 105, 101, 110, 99, 101, 73,
+ 119, 105, 108, 108, 100, 105, 115, 112, 101, 110, 115, 101, 116, 104, 105,
+ 115, 97, 100, 118, 105, 99, 101, 110, 111, 119, 69, 110, 106, 111, 121,
+ 116, 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117,
+ 116, 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 79, 104,
+ 110, 101, 118, 101, 114, 109, 105, 110, 100, 89, 111, 117, 119, 105, 108,
+ 108, 110, 111, 116, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 116,
+ 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116,
+ 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 117, 110, 116,
+ 105, 108, 116, 104, 101, 121, 118, 101, 102, 97, 100, 101, 100, 66, 117,
+ 116, 116, 114, 117, 115, 116, 109, 101, 105, 110, 50, 48, 121, 101, 97,
+ 114, 115, 121, 111, 117, 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97,
+ 116, 112, 104, 111, 116, 111, 115, 111, 102, 121, 111, 117, 114, 115, 101,
+ 108, 102, 97, 110, 100, 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97,
+ 121, 121, 111, 117, 99, 97, 110, 116, 103, 114, 97, 115, 112, 110, 111,
+ 119, 104, 111, 119, 109, 117, 99, 104, 112, 111, 115, 115, 105, 98, 105,
+ 108, 105, 116, 121, 108, 97, 121, 98, 101, 102, 111, 114, 101, 121, 111,
+ 117, 97, 110, 100, 104, 111, 119, 102, 97, 98, 117, 108, 111, 117, 115,
+ 121, 111, 117, 114, 101, 97, 108, 108, 121, 108, 111, 111, 107, 101, 100,
+ 89, 111, 117, 97, 114, 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115,
+ 121, 111, 117, 105, 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119,
+ 111, 114, 114, 121, 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116,
+ 117, 114, 101, 79, 114, 119, 111, 114, 114, 121, 98, 117, 116, 107, 110,
+ 111, 119, 116, 104, 97, 116, 75, 117, 114, 116, 86, 111, 110, 110, 101,
+ 103, 117, 116, 115, 67, 111, 109, 109, 101, 110, 99, 101, 109, 101, 110,
+ 116, 65, 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84, 76, 97, 100,
+ 105, 101, 115, 97, 110, 100, 103, 101, 110, 116, 108, 101, 109, 101, 110,
+ 111, 102, 116, 104, 101, 99, 108, 97, 115, 115, 111, 102, 57, 55, 87, 101,
+ 97, 114, 115, 117, 110, 115, 99, 114, 101, 101, 110, 73, 102, 73, 99, 111,
+ 117, 108, 100, 111, 102, 102, 101, 114, 121, 111, 117, 111, 110, 108, 121,
+ 111, 110, 101, 116, 105, 112, 102, 111, 114, 116, 104, 101, 102, 117, 116,
+ 117, 114, 101, 115, 117, 110, 115, 99, 114, 101, 101, 110, 119, 111, 117,
+ 108, 100, 98, 101, 105, 116, 84, 104, 101, 108, 111, 110, 103, 116, 101,
+ 114, 109, 98, 101, 110, 101, 102, 105, 116, 115, 111, 102, 115, 117, 110,
+ 115, 99, 114, 101, 101, 110, 104, 97, 118, 101, 98, 101, 101, 110, 112,
+ 114, 111, 118, 101, 100, 98, 121, 115, 99, 105, 101, 110, 116, 105, 115,
+ 116, 115, 119, 104, 101, 114, 101, 97, 115, 116, 104, 101, 114, 101, 115,
+ 116, 111, 102, 109, 121, 97, 100, 118, 105, 99, 101, 104, 97, 115, 110,
+ 111, 98, 97, 115, 105, 115, 109, 111, 114, 101, 114, 101, 108, 105, 97, 98,
+ 108, 101, 116, 104, 97, 110, 109, 121, 111, 119, 110, 109, 101, 97, 110,
+ 100, 101, 114, 105, 110, 103, 101, 120, 112, 101, 114, 105, 101, 110, 99,
+ 101, 73, 119, 105, 108, 108, 100, 105, 115, 112, 101, 110, 115, 101, 116,
+ 104, 105, 115, 97, 100, 118, 105, 99, 101, 110, 111, 119, 69, 110, 106,
+ 111, 121, 116, 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101,
+ 97, 117, 116, 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104,
+ 79, 104, 110, 101, 118, 101, 114, 109, 105, 110, 100, 89, 111, 117, 119,
+ 105, 108, 108, 110, 111, 116, 117, 110, 100, 101, 114, 115, 116, 97, 110,
+ 100, 116, 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97,
+ 117, 116, 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 117,
+ 110, 116, 105, 108, 116, 104, 101, 121, 118, 101, 102, 97, 100, 101, 100,
+ 66, 117, 116, 116, 114, 117, 115, 116, 109, 101, 105, 110, 50, 48, 121,
+ 101, 97, 114, 115, 121, 111, 117, 108, 108, 108, 111, 111, 107, 98, 97, 99,
+ 107, 97, 116, 112, 104, 111, 116, 111, 115, 111, 102, 121, 111, 117, 114,
+ 115, 101, 108, 102, 97, 110, 100, 114, 101, 99, 97, 108, 108, 105, 110, 97,
+ 119, 97, 121, 121, 111, 117, 99, 97, 110, 116, 103, 114, 97, 115, 112, 110,
+ 111, 119, 104, 111, 119, 109, 117, 99, 104, 112, 111, 115, 115, 105, 98,
+ 105, 108, 105, 116, 121, 108, 97, 121, 98, 101, 102, 111, 114, 101, 121,
+ 111, 117, 97, 110, 100, 104, 111, 119, 102, 97, 98, 117, 108, 111, 117,
+ 115, 121, 111, 117, 114, 101, 97, 108, 108, 121, 108, 111, 111, 107, 101,
+ 100, 89, 111, 117, 97, 114, 101, 110, 111, 116, 97, 115, 102, 97, 116, 97,
+ 115, 121, 111, 117, 105, 109, 97, 103, 105, 110, 101, 68, 111, 110, 116,
+ 119, 111, 114, 114, 121, 97, 98, 111, 117, 116, 116, 104, 101, 102, 117,
+ 116, 117, 114, 101, 79, 114, 119, 111, 114, 114, 121, 98, 117, 116, 107,
+ 110, 111, 119, 116, 104, 97, 116, 75, 117, 114, 116, 86, 111, 110, 110,
+ 101, 103, 117, 116, 115, 67, 111, 109, 109, 101, 110, 99, 101, 109, 101,
+ 110, 116, 65, 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84, 76, 97,
+ 100, 105, 101, 115, 97, 110, 100, 103, 101, 110, 116, 108, 101, 109, 101,
+ 110, 111, 102, 116, 104, 101, 99, 108, 97, 115, 115, 111, 102, 57, 55, 87,
+ 101, 97, 114, 115, 117, 110, 115, 99, 114, 101, 101, 110, 73, 102, 73, 99,
+ 111, 117, 108, 100, 111, 102, 102, 101, 114, 121, 111, 117, 111, 110, 108,
+ 121, 111, 110, 101, 116, 105, 112, 102, 111, 114, 116, 104, 101, 102, 117,
+ 116, 117, 114, 101, 115, 117, 110, 115, 99, 114, 101, 101, 110, 119, 111,
+ 117, 108, 100, 98, 101, 105, 116, 84, 104, 101, 108, 111, 110, 103, 116,
+ 101, 114, 109, 98, 101, 110, 101, 102, 105, 116, 115, 111, 102, 115, 117,
+ 110, 115, 99, 114, 101, 101, 110, 104, 97, 118, 101, 98, 101, 101, 110,
+ 112, 114, 111, 118, 101, 100, 98, 121, 115, 99, 105, 101, 110, 116, 105,
+ 115, 116, 115, 119, 104, 101, 114, 101, 97, 115, 116, 104, 101, 114, 101,
+ 115, 116, 111, 102, 109, 121, 97, 100, 118, 105, 99, 101, 104, 97, 115,
+ 110, 111, 98, 97, 115, 105, 115, 109, 111, 114, 101, 114, 101, 108, 105,
+ 97, 98, 108, 101, 116, 104, 97, 110, 109, 121, 111, 119, 110, 109, 101, 97,
+ 110, 100, 101, 114, 105, 110, 103, 101, 120, 112, 101, 114, 105, 101, 110,
+ 99, 101, 73, 119, 105, 108, 108, 100, 105, 115, 112, 101, 110, 115, 101,
+ 116, 104, 105, 115, 97, 100, 118, 105, 99, 101, 110, 111, 119, 69, 110,
+ 106, 111, 121, 116, 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98,
+ 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116,
+ 104, 79, 104, 110, 101, 118, 101, 114, 109, 105, 110, 100, 89, 111, 117,
+ 119, 105, 108, 108, 110, 111, 116, 117, 110, 100, 101, 114, 115, 116, 97,
+ 110, 100, 116, 104, 101, 112, 111, 119, 101, 114, 97, 75, 117, 114, 116,
+ 86, 111, 110, 110, 101, 103, 117, 116, 115, 67, 111, 109, 109, 101, 110,
+ 99, 101, 109, 101, 110, 116, 65, 100, 100, 114, 101, 115, 115, 97, 116, 77,
+ 73, 84, 76, 97, 100, 105, 101, 115, 97, 110, 100, 103, 101, 110, 116, 108,
+ 101, 109, 101, 110, 111, 102, 116, 104, 101, 99, 108, 97, 115, 115, 111,
+ 102, 57, 55, 87, 101, 97, 114, 115, 117, 110, 115, 99, 114, 101, 101, 110,
+ 73, 102, 73, 99, 111, 117, 108, 100, 111, 102, 102, 101, 114, 121, 111,
+ 117, 111, 110, 108, 121, 111, 110, 101, 116, 105, 112, 102, 111, 114, 116,
+ 104, 101, 102, 117, 116, 117, 114, 101, 115, 117, 110, 115, 99, 114, 101,
+ 101, 110, 119, 111, 117, 108, 100, 98, 101, 105, 116, 84, 104, 101, 108,
+ 111, 110, 103, 116, 101, 114, 109, 98, 101, 110, 101, 102, 105, 116, 115,
+ 111, 102, 115, 117, 110, 115, 99, 114, 101, 101, 110, 104, 97, 118, 101,
+ 98, 101, 101, 110, 112, 114, 111, 118, 101, 100, 98, 121, 115, 99, 105,
+ 101, 110, 116, 105, 115, 116, 115, 119, 104, 101, 114, 101, 97, 115, 116,
+ 104, 101, 114, 101, 115, 116, 111, 102, 109, 121, 97, 100, 118, 105, 99,
+ 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109, 111, 114, 101,
+ 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110, 109, 121, 111,
+ 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103, 101, 120, 112,
+ 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108, 100, 105, 115,
+ 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118, 105, 99, 101,
+ 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112, 111, 119, 101,
+ 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117,
+ 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101, 114, 109, 105,
+ 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116, 117, 110, 100,
+ 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111, 119, 101, 114,
+ 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114,
+ 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101, 121, 118,
+ 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115, 116, 109,
+ 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117, 108, 108,
+ 108, 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116, 111, 115,
+ 111, 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110, 100, 114, 101,
+ 99, 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99, 97, 110,
+ 116, 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119, 109, 117, 99,
+ 104, 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121, 108, 97, 121,
+ 98, 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100, 104, 111, 119,
+ 102, 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114, 101, 97, 108,
+ 108, 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97, 114, 101, 110,
+ 111, 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117, 105, 109, 97, 103,
+ 105, 110, 101, 68, 111, 110, 116, 119, 111, 114, 114, 121, 97, 98, 111,
+ 117, 116, 116, 104, 101, 102, 117, 116, 117, 114, 101, 79, 114, 119, 111,
+ 114, 114, 121, 98, 117, 116, 107, 110, 111, 119, 116, 104, 97, 116, 75,
+ 117, 114, 116, 86, 111, 110, 110, 101, 103, 117, 75, 117, 114, 116, 86,
+ 111, 110, 110, 101, 103, 117, 116, 115, 67, 111, 109, 109, 101, 110, 99,
+ 101, 109, 101, 110, 116, 65, 100, 100, 114, 101, 115, 115, 97, 116, 77, 73,
+ 84, 76, 97, 100, 105, 101, 115, 97, 110, 100, 103, 101, 110, 116, 108, 101,
+ 109, 101, 110, 111, 102, 116, 104, 101, 99, 108, 97, 115, 115, 111, 102,
+ 57, 55, 87, 101, 97, 114, 115, 117, 110, 115, 99, 114, 101, 101, 110, 73,
+ 102, 73, 99, 111, 117, 108, 100, 111, 102, 102, 101, 114, 121, 111, 117,
+ 111, 110, 108, 121, 111, 110, 101, 116, 105, 112, 102, 111, 114, 116, 104,
+ 101, 102, 117, 116, 117, 114, 101, 115, 117, 110, 115, 99, 114, 101, 101,
+ 110, 119, 111, 117, 108, 100, 98, 101, 105, 116, 84, 104, 101, 108, 111,
+ 110, 103, 116, 101, 114, 109, 98, 101, 110, 101, 102, 105, 116, 115, 111,
+ 102, 115, 117, 110, 115, 99, 114, 101, 101, 110, 104, 97, 118, 101, 98,
+ 101, 101, 110, 112, 114, 111, 118, 101, 100, 98, 121, 115, 99, 105, 101,
+ 110, 116, 105, 115, 116, 115, 119, 104, 101, 114, 101, 97, 115, 116, 104,
+ 101, 114, 101, 115, 116, 111, 102, 109, 121, 97, 100, 118, 105, 99, 101,
+ 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109, 111, 114, 101, 114,
+ 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110, 109, 121, 111, 119,
+ 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103, 101, 120, 112, 101,
+ 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108, 100, 105, 115, 112,
+ 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118, 105, 99, 101, 110,
+ 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112, 111, 119, 101, 114,
+ 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114,
+ 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101, 114, 109, 105, 110,
+ 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116, 117, 110, 100, 101,
+ 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111, 119, 101, 114, 97,
+ 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114, 121,
+ 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101, 121, 118, 101,
+ 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115, 116, 109, 101,
+ 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117, 108, 108, 108,
+ 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116, 111, 115, 111,
+ 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110, 100, 114, 101, 99,
+ 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99, 97, 110, 116,
+ 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119, 109, 117, 99, 104,
+ 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121, 108, 97, 121, 98,
+ 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100, 104, 111, 119, 102,
+ 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114, 101, 97, 108, 108,
+ 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97, 114, 101, 110, 111,
+ 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117, 105, 109, 97, 103, 105,
+ 110, 101, 68, 111, 110, 116, 119, 111, 114, 114, 121, 97, 98, 111, 117,
+ 116, 116, 104, 101, 102, 117, 116, 117, 114, 101, 79, 114, 119, 111, 114,
+ 114, 121, 98, 117, 116, 107, 110, 111, 119, 116, 104, 97, 116, 75, 117,
+ 114, 116, 86, 111, 110, 110, 101, 103, 117, 116, 115, 67, 111, 109, 109,
+ 101, 110, 99, 101, 109, 101, 110, 116, 65, 100, 100, 114, 101, 115, 115,
+ 97, 116, 77, 73, 84, 76, 97, 100, 105, 101, 115, 97, 110, 100, 103, 101,
+ 110, 116, 108, 101, 109, 101, 110, 111, 102, 116, 104, 101, 99, 108, 97,
+ 115, 115, 111, 102, 57, 55, 87, 101, 97, 114, 115, 117, 110, 115, 99, 114,
+ 101, 101, 110, 73, 102, 73, 99, 111, 117, 108, 100, 111, 102, 102, 101,
+ 114, 121, 111, 117, 111, 110, 108, 121, 111, 110, 101, 116, 105, 112, 102,
+ 111, 114, 116, 104, 101, 102, 117, 116, 117, 114, 101, 115, 117, 110, 115,
+ 99, 114, 101, 101, 110, 119, 111, 117, 108, 100, 98, 101, 105, 116, 84,
+ 104, 101, 108, 111, 110, 103, 116, 101, 114, 109, 98, 101, 110, 101, 102,
+ 105, 116, 115, 111, 102, 115, 117, 110, 115, 99, 114, 101, 101, 110, 104,
+ 97, 118, 101, 98, 101, 101, 110, 112, 114, 111, 118, 101, 100, 98, 121,
+ 115, 99, 105, 101, 110, 116, 105, 115, 116, 115, 119, 104, 101, 114, 101,
+ 97, 115, 116, 104, 101, 114, 101, 115, 116, 111, 102, 109, 121, 97, 100,
+ 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109, 111,
+ 114, 101, 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110, 109,
+ 121, 111, 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103, 101,
+ 120, 112, 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108, 100,
+ 105, 115, 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118, 105,
+ 99, 101, 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112, 111,
+ 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121,
+ 111, 117, 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101, 114,
+ 109, 105, 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116, 117,
+ 110, 100, 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111, 119,
+ 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111,
+ 117, 114, 121, 111, 117},
+ {116, 104, 117, 110, 116, 105, 108, 116, 104, 101, 121, 118, 101, 102, 97,
+ 100, 101, 100, 66, 117, 116, 116, 114, 117, 115, 116, 109, 101, 105, 110,
+ 50, 48, 121, 101, 97, 114, 115, 121, 111, 117, 108, 108, 108, 111, 111,
+ 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116, 111, 115, 111, 102, 121,
+ 111, 117, 114, 115, 101, 108, 102, 97, 110, 100, 114, 101, 99, 97, 108,
+ 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99, 97, 110, 116, 103, 114,
+ 97, 115, 112, 110, 111, 119, 104, 111, 119, 109, 117, 99, 104, 112, 111,
+ 115, 115, 105, 98, 105, 108, 105, 116, 121, 108, 97, 121, 98, 101, 102,
+ 111, 114, 101, 121, 111, 117, 97, 110, 100, 104, 111, 119, 102, 97, 98,
+ 117, 108, 111, 117, 115, 121, 111, 117, 114, 101, 97, 108, 108, 121, 108,
+ 111, 111, 107, 101, 100, 89, 111, 117, 97, 114, 101, 110, 111, 116, 97,
+ 115, 102, 97, 116, 97, 115, 121, 111, 117, 105, 109, 97, 103, 105, 110,
+ 101, 68, 111, 110, 116, 119, 111, 114, 114, 121, 97, 98, 111, 117, 116,
+ 116, 104, 101, 102, 117, 116, 117, 114, 101, 79, 114, 119, 111, 114, 114,
+ 121, 98, 117, 116, 107, 110, 111, 119, 116, 104, 97, 116, 75, 117, 114,
+ 116, 86, 111, 110, 110, 101, 103, 117, 116, 115, 67, 111, 109, 109, 101,
+ 110, 99, 101, 109, 101, 110, 116, 65, 100, 100, 114, 101, 115, 115, 97,
+ 116, 77, 73, 84, 76, 97, 100, 105, 101, 115, 97, 110, 100, 103, 101, 110,
+ 116, 108, 101, 109, 101, 110, 111, 102, 116, 104, 101, 99, 108, 97, 115,
+ 115, 111, 102, 57, 55, 87, 101, 97, 114, 115, 117, 110, 115, 99, 114, 101,
+ 101, 110, 73, 102, 73, 99, 111, 117, 108, 100, 111, 102, 102, 101, 114,
+ 121, 111, 117, 111, 110, 108, 121, 111, 110, 101, 116, 105, 112, 102, 111,
+ 114, 116, 104, 101, 102, 117, 116, 117, 114, 101, 115, 117, 110, 115, 99,
+ 114, 101, 101, 110, 119, 111, 117, 108, 100, 98, 101, 105, 116, 84, 104,
+ 101, 108, 111, 110, 103, 116, 101, 114, 109, 98, 101, 110, 101, 102, 105,
+ 116, 115, 111, 102, 115, 117, 110, 115, 99, 114, 101, 101, 110, 104, 97,
+ 118, 101, 98, 101, 101, 110, 112, 114, 111, 118, 101, 100, 98, 121, 115,
+ 99, 105, 101, 110, 116, 105, 115, 116, 115, 119, 104, 101, 114, 101, 97,
+ 115, 116, 104, 101, 114, 101, 115, 116, 111, 102, 109, 121, 97, 100, 118,
+ 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109, 111, 114,
+ 101, 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110, 109, 121,
+ 111, 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103, 101, 120,
+ 112, 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108, 100, 105,
+ 115, 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118, 105, 99,
+ 101, 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112, 111, 119,
+ 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111,
+ 117, 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101, 114, 109,
+ 105, 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116, 117, 110,
+ 100, 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111, 119, 101,
+ 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117,
+ 114, 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101, 121,
+ 118, 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115, 116,
+ 109, 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117, 108,
+ 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116, 111,
+ 115, 111, 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110, 100, 114,
+ 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99, 97,
+ 110, 116, 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119, 109, 117,
+ 99, 104, 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121, 108, 97,
+ 121, 98, 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100, 104, 111,
+ 119, 102, 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114, 101, 97,
+ 108, 108, 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97, 114, 101,
+ 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117, 105, 109, 97,
+ 103, 105, 110, 101, 68, 111, 110, 116, 119, 111, 114, 114, 121, 97, 98,
+ 111, 117, 116, 116, 104, 101, 102, 117, 116, 117, 114, 101, 79, 114, 119,
+ 111, 114, 114, 121, 98, 117, 116, 107, 110, 111, 119, 116, 104, 97, 116,
+ 116, 115, 67, 111, 109, 109, 101, 110, 99, 101, 109, 101, 110, 116, 65,
+ 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84, 76, 97, 100, 105, 101,
+ 115, 97, 110, 100, 103, 101, 110, 116, 108, 101, 109, 101, 110, 111, 102,
+ 116, 104, 101, 99, 108, 97, 115, 115, 111, 102, 57, 55, 87, 101, 97, 114,
+ 115, 117, 110, 115, 99, 114, 101, 101, 110, 73, 102, 73, 99, 111, 117, 108,
+ 100, 111, 102, 102, 101, 114, 121, 111, 117, 111, 110, 108, 121, 111, 110,
+ 101, 116, 105, 112, 102, 111, 114, 116, 104, 101, 102, 117, 116, 117, 114,
+ 101, 75, 117, 114, 116, 86, 111, 110, 110, 101, 103, 117, 116, 115, 67,
+ 111, 109, 109, 101, 110, 99, 101, 109, 101, 110, 116, 65, 100, 100, 114,
+ 101, 115, 115, 97, 116, 77, 73, 84, 76, 97, 100, 105, 101, 115, 97, 110,
+ 100, 103, 101, 110, 116, 108, 101, 109, 101, 110, 111, 102, 116, 104, 101,
+ 99, 108, 97, 115, 115, 111, 102, 57, 55, 87, 101, 97, 114, 115, 117, 110,
+ 115, 99, 114, 101, 101, 110, 73, 102, 73, 99, 111, 117, 108, 100, 111, 102,
+ 102, 101, 114, 121, 111, 117, 111, 110, 108, 121, 111, 110, 101, 116, 105,
+ 112, 102, 111, 114, 116, 104, 101, 102, 117, 116, 117, 114, 101, 115, 117,
+ 110, 115, 99, 114, 101, 101, 110, 119, 111, 117, 108, 100, 98, 101, 105,
+ 116, 84, 104, 101, 108, 111, 110, 103, 116, 101, 114, 109, 98, 101, 110,
+ 101, 102, 105, 116, 115, 111, 102, 115, 117, 110, 115, 99, 114, 101, 101,
+ 110, 104, 97, 118, 101, 98, 101, 101, 110, 112, 114, 111, 118, 101, 100,
+ 98, 121, 115, 99, 105, 101, 110, 116, 105, 115, 116, 115, 119, 104, 101,
+ 114, 101, 97, 115, 116, 104, 101, 114, 101, 115, 116, 111, 102, 109, 121,
+ 97, 100, 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115,
+ 109, 111, 114, 101, 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97,
+ 110, 109, 121, 111, 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110,
+ 103, 101, 120, 112, 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108,
+ 108, 100, 105, 115, 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100,
+ 118, 105, 99, 101, 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101,
+ 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111,
+ 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118,
+ 101, 114, 109, 105, 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111,
+ 116, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112,
+ 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102,
+ 121, 111, 117, 114, 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116,
+ 104, 101, 121, 118, 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114,
+ 117, 115, 116, 109, 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121,
+ 111, 117, 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104,
+ 111, 116, 111, 115, 111, 102, 121, 111, 117, 114, 115, 101, 108, 102, 97,
+ 110, 100, 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111,
+ 117, 99, 97, 110, 116, 103, 114, 97, 115, 112, 110, 111, 119, 104, 111,
+ 119, 109, 117, 99, 104, 112, 111, 115, 115, 105, 98, 105, 108, 105, 116,
+ 121, 108, 97, 121, 98, 101, 102, 111, 114, 101, 121, 111, 117, 97, 110,
+ 100, 104, 111, 119, 102, 97, 98, 117, 108, 111, 117, 115, 121, 111, 117,
+ 114, 101, 97, 108, 108, 121, 108, 111, 111, 107, 101, 100, 89, 111, 117,
+ 97, 114, 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117,
+ 105, 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119, 111, 114, 114,
+ 121, 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116, 117, 114, 101,
+ 79, 114, 119, 111, 114, 114, 121, 98, 117, 116, 107, 110, 111, 119, 116,
+ 104, 97, 116, 75, 117, 114, 116, 86, 111, 110, 110, 101, 103, 117, 116,
+ 115, 67, 111, 109, 109, 101, 110, 99, 101, 109, 101, 110, 116, 65, 100,
+ 100, 114, 101, 115, 115, 97, 116, 77, 73, 84, 76, 97, 100, 105, 101, 115,
+ 97, 110, 100, 103, 101, 110, 116, 108, 101, 109, 101, 110, 111, 102, 116,
+ 104, 101, 99, 108, 97, 115, 115, 111, 102, 57, 55, 87, 101, 97, 114, 115,
+ 117, 110, 115, 99, 114, 101, 101, 110, 73, 102, 73, 99, 111, 117, 108, 100,
+ 111, 102, 102, 101, 114, 121, 111, 117, 111, 110, 108, 121, 111, 110, 101,
+ 116, 105, 112, 102, 111, 114, 116, 104, 101, 102, 117, 116, 117, 114, 101,
+ 115, 117, 110, 115, 99, 114, 101, 101, 110, 119, 111, 117, 108, 100, 98,
+ 101, 105, 116, 84, 104, 101, 108, 111, 110, 103, 116, 101, 114, 109, 98,
+ 101, 110, 101, 102, 105, 116, 115, 111, 102, 115, 117, 110, 115, 99, 114,
+ 101, 101, 110, 104, 97, 118, 101, 98, 101, 101, 110, 112, 114, 111, 118,
+ 101, 100, 98, 121, 115, 99, 105, 101, 110, 116, 105, 115, 116, 115, 119,
+ 104, 101, 114, 101, 97, 115, 116, 104, 101, 114, 101, 115, 116, 111, 102,
+ 109, 121, 97, 100, 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115,
+ 105, 115, 109, 111, 114, 101, 114, 101, 108, 105, 97, 98, 108, 101, 116,
+ 104, 97, 110, 109, 121, 111, 119, 110, 109, 101, 97, 110, 100, 101, 114,
+ 105, 110, 103, 101, 120, 112, 101, 114, 105, 101, 110, 99, 101, 73, 119,
+ 105, 108, 108, 100, 105, 115, 112, 101, 110, 115, 101, 116, 104, 105, 115,
+ 97, 100, 118, 105, 99, 101, 110, 111, 119, 69, 110, 106, 111, 121, 116,
+ 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116,
+ 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 79, 104, 110,
+ 101, 118, 101, 114, 109, 105, 110, 100, 89, 111, 117, 119, 105, 108, 108,
+ 110, 111, 116, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 116, 104,
+ 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121,
+ 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 117, 110, 116, 105,
+ 108, 116, 104, 101, 121, 118, 101, 102, 97, 100, 101, 100, 66, 117, 116,
+ 116, 114, 117, 115, 116, 109, 101, 105, 110, 50, 48, 121, 101, 97, 114,
+ 115, 121, 111, 117, 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116,
+ 112, 104, 111, 116, 111, 115, 111, 102, 121, 111, 117, 114, 115, 101, 108,
+ 102, 97, 110, 100, 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121,
+ 121, 111, 117, 99, 97, 110, 116, 103, 114, 97, 115, 112, 110, 111, 119,
+ 104, 111, 119, 109, 117, 99, 104, 112, 111, 115, 115, 105, 98, 105, 108,
+ 105, 116, 121, 108, 97, 121, 98, 101, 102, 111, 114, 101, 121, 111, 117,
+ 97, 110, 100, 104, 111, 119, 102, 97, 98, 117, 108, 111, 117, 115, 121,
+ 111, 117, 114, 101, 97, 108, 108, 121, 108, 111, 111, 107, 101, 100, 89,
+ 111, 117, 97, 114, 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121,
+ 111, 117, 105, 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119, 111,
+ 114, 114, 121, 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116, 117,
+ 114, 101, 79, 114, 119, 111, 114, 114, 121, 98, 117, 116, 107, 110, 111,
+ 119, 116, 104, 97, 116, 75, 117, 114, 116, 86, 111, 110, 110, 101, 103,
+ 117, 116, 115, 67, 111, 109, 109, 101, 110, 99, 101, 109, 101, 110, 116,
+ 65, 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84, 76, 97, 100, 105,
+ 101, 115, 97, 110, 100, 103, 101, 110, 116, 108, 101, 109, 101, 110, 111,
+ 102, 116, 104, 101, 99, 108, 97, 115, 115, 111, 102, 57, 55, 87, 101, 97,
+ 114, 115, 117, 110, 115, 99, 114, 101, 101, 110, 73, 102, 73, 99, 111, 117,
+ 108, 100, 111, 102, 102, 101, 114, 121, 111, 117, 111, 110, 108, 121, 111,
+ 110, 101, 116, 105, 112, 102, 111, 114, 116, 104, 101, 102, 117, 116, 117,
+ 114, 101, 115, 117, 110, 115, 99, 114, 101, 101, 110, 119, 111, 117, 108,
+ 100, 98, 101, 105, 116, 84, 104, 101, 108, 111, 110, 103, 116, 101, 114,
+ 109, 98, 101, 110, 101, 102, 105, 116, 115, 111, 102, 115, 117, 110, 115,
+ 99, 114, 101, 101, 110, 104, 97, 118, 101, 98, 101, 101, 110, 112, 114,
+ 111, 118, 101, 100, 98, 121, 115, 99, 105, 101, 110, 116, 105, 115, 116,
+ 115, 119, 104, 101, 114, 101, 97, 115, 116, 104, 101, 114, 101, 115, 116,
+ 111, 102, 109, 121, 97, 100, 118, 105, 99, 101, 104, 97, 115, 110, 111, 98,
+ 97, 115, 105, 115, 109, 111, 114, 101, 114, 101, 108, 105, 97, 98, 108,
+ 101, 116, 104, 97, 110, 109, 121, 111, 119, 110, 109, 101, 97, 110, 100,
+ 101, 114, 105, 110, 103, 101, 120, 112, 101, 114, 105, 101, 110, 99, 101,
+ 73, 119, 105, 108, 108, 100, 105, 115, 112, 101, 110, 115, 101, 116, 104,
+ 105, 115, 97, 100, 118, 105, 99, 101, 110, 111, 119, 69, 110, 106, 111,
+ 121, 116, 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97,
+ 117, 116, 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 79,
+ 104, 110, 101, 118, 101, 114, 109, 105, 110, 100, 89, 111, 117, 119, 105,
+ 108, 108, 110, 111, 116, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100,
+ 116, 104, 101, 112, 111, 119, 101, 114, 97, 75, 117, 114, 116, 86, 111,
+ 110, 110, 101, 103, 117, 116, 115, 67, 111, 109, 109, 101, 110, 99, 101,
+ 109, 101, 110, 116, 65, 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84,
+ 76, 97, 100, 105, 101, 115, 97, 110, 100, 103, 101, 110, 116, 108, 101,
+ 109, 101, 110, 111, 102, 116, 104, 101, 99, 108, 97, 115, 115, 111, 102,
+ 57, 55, 87, 101, 97, 114, 115, 117, 110, 115, 99, 114, 101, 101, 110, 73,
+ 102, 73, 99, 111, 117, 108, 100, 111, 102, 102, 101, 114, 121, 111, 117,
+ 111, 110, 108, 121, 111, 110, 101, 116, 105, 112, 102, 111, 114, 116, 104,
+ 101, 102, 117, 116, 117, 114, 101, 115, 117, 110, 115, 99, 114, 101, 101,
+ 110, 119, 111, 117, 108, 100, 98, 101, 105, 116, 84, 104, 101, 108, 111,
+ 110, 103, 116, 101, 114, 109, 98, 101, 110, 101, 102, 105, 116, 115, 111,
+ 102, 115, 117, 110, 115, 99, 114, 101, 101, 110, 104, 97, 118, 101, 98,
+ 101, 101, 110, 112, 114, 111, 118, 101, 100, 98, 121, 115, 99, 105, 101,
+ 110, 116, 105, 115, 116, 115, 119, 104, 101, 114, 101, 97, 115, 116, 104,
+ 101, 114, 101, 115, 116, 111, 102, 109, 121, 97, 100, 118, 105, 99, 101,
+ 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109, 111, 114, 101, 114,
+ 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110, 109, 121, 111, 119,
+ 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103, 101, 120, 112, 101,
+ 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108, 100, 105, 115, 112,
+ 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118, 105, 99, 101, 110,
+ 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112, 111, 119, 101, 114,
+ 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114,
+ 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101, 114, 109, 105, 110,
+ 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116, 117, 110, 100, 101,
+ 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111, 119, 101, 114, 97,
+ 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114, 121,
+ 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101, 121, 118, 101,
+ 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115, 116, 109, 101,
+ 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117, 108, 108, 108,
+ 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116, 111, 115, 111,
+ 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110, 100, 114, 101, 99,
+ 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99, 97, 110, 116,
+ 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119, 109, 117, 99, 104,
+ 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121, 108, 97, 121, 98,
+ 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100, 104, 111, 119, 102,
+ 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114, 101, 97, 108, 108,
+ 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97, 114, 101, 110, 111,
+ 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117, 105, 109, 97, 103, 105,
+ 110, 101, 68, 111, 110, 116, 119, 111, 114, 114, 121, 97, 98, 111, 117,
+ 116, 116, 104, 101, 102, 117, 116, 117, 114, 101, 79, 114, 119, 111, 114,
+ 114, 121, 98, 117, 116, 107, 110, 111, 119, 116, 104, 97, 116, 75, 117,
+ 114, 116, 86, 111, 110, 110, 101, 103, 117, 75, 117, 114, 116, 86, 111,
+ 110, 110, 101, 103, 117, 116, 115, 67, 111, 109, 109, 101, 110, 99, 101,
+ 109, 101, 110, 116, 65, 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84,
+ 76, 97, 100, 105, 101, 115, 97, 110, 100, 103, 101, 110, 116, 108, 101,
+ 109, 101, 110, 111, 102, 116, 104, 101, 99, 108, 97, 115, 115, 111, 102,
+ 57, 55, 87, 101, 97, 114, 115, 117, 110, 115, 99, 114, 101, 101, 110, 73,
+ 102, 73, 99, 111, 117, 108, 100, 111, 102, 102, 101, 114, 121, 111, 117,
+ 111, 110, 108, 121, 111, 110, 101, 116, 105, 112, 102, 111, 114, 116, 104,
+ 101, 102, 117, 116, 117, 114, 101, 115, 117, 110, 115, 99, 114, 101, 101,
+ 110, 119, 111, 117, 108, 100, 98, 101, 105, 116, 84, 104, 101, 108, 111,
+ 110, 103, 116, 101, 114, 109, 98, 101, 110, 101, 102, 105, 116, 115, 111,
+ 102, 115, 117, 110, 115, 99, 114, 101, 101, 110, 104, 97, 118, 101, 98,
+ 101, 101, 110, 112, 114, 111, 118, 101, 100, 98, 121, 115, 99, 105, 101,
+ 110, 116, 105, 115, 116, 115, 119, 104, 101, 114, 101, 97, 115, 116, 104,
+ 101, 114, 101, 115, 116, 111, 102, 109, 121, 97, 100, 118, 105, 99, 101,
+ 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109, 111, 114, 101, 114,
+ 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110, 109, 121, 111, 119,
+ 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103, 101, 120, 112, 101,
+ 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108, 100, 105, 115, 112,
+ 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118, 105, 99, 101, 110,
+ 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112, 111, 119, 101, 114,
+ 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114,
+ 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101, 114, 109, 105, 110,
+ 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116, 117, 110, 100, 101,
+ 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111, 119, 101, 114, 97,
+ 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114, 121,
+ 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101, 121, 118, 101,
+ 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115, 116, 109, 101,
+ 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117, 108, 108, 108,
+ 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116, 111, 115, 111,
+ 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110, 100, 114, 101, 99,
+ 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99, 97, 110, 116,
+ 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119, 109, 117, 99, 104,
+ 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121, 108, 97, 121, 98,
+ 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100, 104, 111, 119, 102,
+ 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114, 101, 97, 108, 108,
+ 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97, 114, 101, 110, 111,
+ 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117, 105, 109, 97, 103, 105,
+ 110, 101, 68, 111, 110, 116, 119, 111, 114, 114, 121, 97, 98, 111, 117,
+ 116, 116, 104, 101, 102, 117, 116, 117, 114, 101, 79, 114, 119, 111, 114,
+ 114, 121, 98, 117, 116, 107, 110, 111, 119, 116, 104, 97, 116, 75, 117,
+ 114, 116, 86, 111, 110, 110, 101, 103, 117, 116, 115, 67, 111, 109, 109,
+ 101, 110, 99, 101, 109, 101, 110, 116, 65, 100, 100, 114, 101, 115, 115,
+ 97, 116, 77, 73, 84, 76, 97, 100, 105, 101, 115, 97, 110, 100, 103, 101,
+ 110, 116, 108, 101, 109, 101, 110, 111, 102, 116, 104, 101, 99, 108, 97,
+ 115, 115, 111, 102, 57, 55, 87, 101, 97, 114, 115, 117, 110, 115, 99, 114,
+ 101, 101, 110, 73, 102, 73, 99, 111, 117, 108, 100, 111, 102, 102, 101,
+ 114, 121, 111, 117, 111, 110, 108, 121, 111, 110, 101, 116, 105, 112, 102,
+ 111, 114, 116, 104, 101, 102, 117, 116, 117, 114, 101, 115, 117, 110, 115,
+ 99, 114, 101, 101, 110, 119, 111, 117, 108, 100, 98, 101, 105, 116, 84,
+ 104, 101, 108, 111, 110, 103, 116, 101, 114, 109, 98, 101, 110, 101, 102,
+ 105, 116, 115, 111, 102, 115, 117, 110, 115, 99, 114, 101, 101, 110, 104,
+ 97, 118, 101, 98, 101, 101, 110, 112, 114, 111, 118, 101, 100, 98, 121,
+ 115, 99, 105, 101, 110, 116, 105, 115, 116, 115, 119, 104, 101, 114, 101,
+ 97, 115, 116, 104, 101, 114, 101, 115, 116, 111, 102, 109, 121, 97, 100,
+ 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109, 111,
+ 114, 101, 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110, 109,
+ 121, 111, 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103, 101,
+ 120, 112, 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108, 100,
+ 105, 115, 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118, 105,
+ 99, 101, 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112, 111,
+ 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121,
+ 111, 117, 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101, 114,
+ 109, 105, 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116, 117,
+ 110, 100, 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111, 119,
+ 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111,
+ 117, 114, 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101,
+ 121, 118, 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115,
+ 116, 109, 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117,
+ 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116,
+ 111, 115, 111, 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110, 100,
+ 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99,
+ 97, 110, 116, 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119, 109,
+ 117, 99, 104, 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121, 108,
+ 97, 121, 98, 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100, 104,
+ 111, 119, 102, 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114, 101,
+ 97, 108, 108, 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97, 114,
+ 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117, 105,
+ 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119, 111, 114, 114, 121,
+ 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116, 117, 114, 101, 79,
+ 114, 119, 111, 114, 114, 121, 98, 117, 116, 107, 110, 111, 119, 116, 104,
+ 97, 116, 75, 117, 114, 116, 86, 111, 110, 110, 101, 103, 117, 116, 115, 67,
+ 111, 109, 109, 101, 110, 99, 101, 109, 101, 110, 116, 65, 100, 100, 114,
+ 101, 115, 115, 97, 116, 77, 73, 84, 76, 97, 100, 105, 101, 115, 97, 110,
+ 100, 103, 101, 110, 116, 108, 101, 109, 101, 110, 111, 102, 116, 104, 101,
+ 99, 108, 97, 115, 115, 111, 102, 57, 55, 87, 101, 97, 114, 115, 117, 110,
+ 115, 99, 114, 101, 101, 110, 73, 102, 73, 99, 111, 117, 108, 100, 111, 102,
+ 102, 101, 114, 121, 111, 117, 111, 110, 108, 121, 111, 110, 101, 116, 105,
+ 112, 102, 111, 114, 116, 104, 101, 102, 117, 116, 117, 114, 101, 115, 117,
+ 110, 115, 99, 114, 101, 101, 110, 119, 111, 117, 108, 100, 98, 101, 105,
+ 116, 84, 104, 101, 108, 111, 110, 103, 116, 101, 114, 109, 98, 101, 110,
+ 101, 102, 105, 116, 115, 111, 102, 115, 117, 110, 115, 99, 114, 101, 101,
+ 110, 104, 97, 118, 101, 98, 101, 101, 110, 112, 114, 111, 118, 101, 100,
+ 98, 121, 115, 99, 105, 101, 110, 116, 105, 115, 116, 115, 119, 104, 101,
+ 114, 101, 97, 115, 116, 104, 101, 114, 101, 115, 116, 111, 102, 109, 121,
+ 97, 100, 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115,
+ 109, 111, 114, 101, 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97,
+ 110, 109, 121, 111, 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110,
+ 103, 101, 120, 112, 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108,
+ 108, 100, 105, 115, 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100,
+ 118, 105, 99, 101, 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101,
+ 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111,
+ 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118,
+ 101, 114, 109, 105, 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111,
+ 116, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112,
+ 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102,
+ 121, 111, 117, 114, 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116,
+ 104, 101, 121, 118, 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114,
+ 117, 115, 116, 109, 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121,
+ 111, 117, 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104,
+ 111, 116, 111, 115, 111, 102, 121, 111, 117, 114, 115, 101, 108, 102, 97,
+ 110, 100, 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111,
+ 117, 99, 97, 110, 116, 103, 114, 97, 115, 112, 110, 111, 119, 104, 111,
+ 119, 109, 117, 99, 104, 112, 111, 115, 115, 105, 98, 105, 108, 105, 116,
+ 121, 108, 97, 121, 98, 101, 102, 111, 114, 101, 121, 111, 117, 97, 110,
+ 100, 104, 111, 119, 102, 97, 98, 117, 108, 111, 117, 115, 121, 111, 117,
+ 114, 101, 97, 108, 108, 121, 108, 111, 111, 107, 101, 100, 89, 111, 117,
+ 97, 114, 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117,
+ 105, 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119, 111, 114, 114,
+ 121, 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116, 117, 114, 101,
+ 79, 114, 119, 111, 114, 114, 121, 98, 117, 116, 107, 110, 111, 119, 116,
+ 104, 97, 116, 116, 115, 67, 111, 109, 109, 101, 110, 99, 101, 109, 101,
+ 110, 116, 65, 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84, 76, 97,
+ 100, 105, 101, 115, 97, 110, 100, 103, 101, 110, 116, 108, 101, 109, 101,
+ 110, 111, 102, 116, 104, 101, 99, 108, 97, 115, 115, 111, 102, 57, 55, 87,
+ 101, 97, 114, 115, 117, 110, 115, 99, 114, 101, 101, 110, 73, 102, 73, 99,
+ 111, 117, 108, 100, 111, 102, 102, 101, 114, 121, 111, 117, 111, 110, 108,
+ 121, 111, 110, 101, 116, 105, 112, 102, 111, 114, 116, 104, 101, 102, 117,
+ 116, 117, 114, 101, 75, 117, 114, 116, 86, 111, 110, 110, 101, 103, 117,
+ 116, 115, 67, 111, 109, 109, 101, 110, 99, 101, 109, 101, 110, 116, 65,
+ 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84, 76, 97, 100, 105, 101,
+ 115, 97, 110, 100, 103, 101, 110, 116, 108, 101, 109, 101, 110, 111, 102,
+ 116, 104, 101, 99, 108, 97, 115, 115, 111, 102, 57, 55, 87, 101, 97, 114,
+ 115, 117, 110, 115, 99, 114, 101, 101, 110, 73, 102, 73, 99, 111, 117, 108,
+ 100, 111, 102, 102, 101, 114, 121, 111, 117, 111, 110, 108, 121, 111, 110,
+ 101, 116, 105, 112, 102, 111, 114, 116, 104, 101, 102, 117, 116, 117, 114,
+ 101, 115, 117, 110, 115, 99, 114, 101, 101, 110, 119, 111, 117, 108, 100,
+ 98, 101, 105, 116, 84, 104, 101, 108, 111, 110, 103, 116, 101, 114, 109,
+ 98, 101, 110, 101, 102, 105, 116, 115, 111, 102, 115, 117, 110, 115, 99,
+ 114, 101, 101, 110, 104, 97, 118, 101, 98, 101, 101, 110, 112, 114, 111,
+ 118, 101, 100, 98, 121, 115, 99, 105, 101, 110, 116, 105, 115, 116, 115,
+ 119, 104, 101, 114, 101, 97, 115, 116, 104, 101, 114, 101, 115, 116, 111,
+ 102, 109, 121, 97, 100, 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97,
+ 115, 105, 115, 109, 111, 114, 101, 114, 101, 108, 105, 97, 98, 108, 101,
+ 116, 104, 97, 110, 109, 121, 111, 119, 110, 109, 101, 97, 110, 100, 101,
+ 114, 105, 110, 103, 101, 120, 112, 101, 114, 105, 101, 110, 99, 101, 73,
+ 119, 105, 108, 108, 100, 105, 115, 112, 101, 110, 115, 101, 116, 104, 105,
+ 115, 97, 100, 118, 105, 99, 101, 110, 111, 119, 69, 110, 106, 111, 121,
+ 116, 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117,
+ 116, 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 79, 104,
+ 110, 101, 118, 101, 114, 109, 105, 110, 100, 89, 111, 117, 119, 105, 108,
+ 108, 110, 111, 116, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 116,
+ 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116,
+ 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 117, 110, 116,
+ 105, 108, 116, 104, 101, 121, 118, 101, 102, 97, 100, 101, 100, 66, 117,
+ 116, 116, 114, 117, 115, 116, 109, 101, 105, 110, 50, 48, 121, 101, 97,
+ 114, 115, 121, 111, 117, 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97,
+ 116, 112, 104, 111, 116, 111, 115, 111, 102, 121, 111, 117, 114, 115, 101,
+ 108, 102, 97, 110, 100, 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97,
+ 121, 121, 111, 117, 99, 97, 110, 116, 103, 114, 97, 115, 112, 110, 111,
+ 119, 104, 111, 119, 109, 117, 99, 104, 112, 111, 115, 115, 105, 98, 105,
+ 108, 105, 116, 121, 108, 97, 121, 98, 101, 102, 111, 114, 101, 121, 111,
+ 117, 97, 110, 100, 104, 111, 119, 102, 97, 98, 117, 108, 111, 117, 115,
+ 121, 111, 117, 114, 101, 97, 108, 108, 121, 108, 111, 111, 107, 101, 100,
+ 89, 111, 117, 97, 114, 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115,
+ 121, 111, 117, 105, 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119,
+ 111, 114, 114, 121, 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116,
+ 117, 114, 101, 79, 114, 119, 111, 114, 114, 121, 98, 117, 116, 107, 110,
+ 111, 119, 116, 104, 97, 116, 75, 117, 114, 116, 86, 111, 110, 110, 101,
+ 103, 117, 116, 115, 67, 111, 109, 109, 101, 110, 99, 101, 109, 101, 110,
+ 116, 65, 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84, 76, 97, 100,
+ 105, 101, 115, 97, 110, 100, 103, 101, 110, 116, 108, 101, 109, 101, 110,
+ 111, 102, 116, 104, 101, 99, 108, 97, 115, 115, 111, 102, 57, 55, 87, 101,
+ 97, 114, 115, 117, 110, 115, 99, 114, 101, 101, 110, 73, 102, 73, 99, 111,
+ 117, 108, 100, 111, 102, 102, 101, 114, 121, 111, 117, 111, 110, 108, 121,
+ 111, 110, 101, 116, 105, 112, 102, 111, 114, 116, 104, 101, 102, 117, 116,
+ 117, 114, 101, 115, 117, 110, 115, 99, 114, 101, 101, 110, 119, 111, 117,
+ 108, 100, 98, 101, 105, 116, 84, 104, 101, 108, 111, 110, 103, 116, 101,
+ 114, 109, 98, 101, 110, 101, 102, 105, 116, 115, 111, 102, 115, 117, 110,
+ 115, 99, 114, 101, 101, 110, 104, 97, 118, 101, 98, 101, 101, 110, 112,
+ 114, 111, 118, 101, 100, 98, 121, 115, 99, 105, 101, 110, 116, 105, 115,
+ 116, 115, 119, 104, 101, 114, 101, 97, 115, 116, 104, 101, 114, 101, 115,
+ 116, 111, 102, 109, 121, 97, 100, 118, 105, 99, 101, 104, 97, 115, 110,
+ 111, 98, 97, 115, 105, 115, 109, 111, 114, 101, 114, 101, 108, 105, 97, 98,
+ 108, 101, 116, 104, 97, 110, 109, 121, 111, 119, 110, 109, 101, 97, 110,
+ 100, 101, 114, 105, 110, 103, 101, 120, 112, 101, 114, 105, 101, 110, 99,
+ 101, 73, 119, 105, 108, 108, 100, 105, 115, 112, 101, 110, 115, 101, 116,
+ 104, 105, 115, 97, 100, 118, 105, 99, 101, 110, 111, 119, 69, 110, 106,
+ 111, 121, 116, 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101,
+ 97, 117, 116, 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104,
+ 79, 104, 110, 101, 118, 101, 114, 109, 105, 110, 100, 89, 111, 117, 119,
+ 105, 108, 108, 110, 111, 116, 117, 110, 100, 101, 114, 115, 116, 97, 110,
+ 100, 116, 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97,
+ 117, 116, 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 117,
+ 110, 116, 105, 108, 116, 104, 101, 121, 118, 101, 102, 97, 100, 101, 100,
+ 66, 117, 116, 116, 114, 117, 115, 116, 109, 101, 105, 110, 50, 48, 121,
+ 101, 97, 114, 115, 121, 111, 117, 108, 108, 108, 111, 111, 107, 98, 97, 99,
+ 107, 97, 116, 112, 104, 111, 116, 111, 115, 111, 102, 121, 111, 117, 114,
+ 115, 101, 108, 102, 97, 110, 100, 114, 101, 99, 97, 108, 108, 105, 110, 97,
+ 119, 97, 121, 121, 111, 117, 99, 97, 110, 116, 103, 114, 97, 115, 112, 110,
+ 111, 119, 104, 111, 119, 109, 117, 99, 104, 112, 111, 115, 115, 105, 98,
+ 105, 108, 105, 116, 121, 108, 97, 121, 98, 101, 102, 111, 114, 101, 121,
+ 111, 117, 97, 110, 100, 104, 111, 119, 102, 97, 98, 117, 108, 111, 117,
+ 115, 121, 111, 117, 114, 101, 97, 108, 108, 121, 108, 111, 111, 107, 101,
+ 100, 89, 111, 117, 97, 114, 101, 110, 111, 116, 97, 115, 102, 97, 116, 97,
+ 115, 121, 111, 117, 105, 109, 97, 103, 105, 110, 101, 68, 111, 110, 116,
+ 119, 111, 114, 114, 121, 97, 98, 111, 117, 116, 116, 104, 101, 102, 117,
+ 116, 117, 114, 101, 79, 114, 119, 111, 114, 114, 121, 98, 117, 116, 107,
+ 110, 111, 119, 116, 104, 97, 116, 75, 117, 114, 116, 86, 111, 110, 110,
+ 101, 103, 117, 116, 115, 67, 111, 109, 109, 101, 110, 99, 101, 109, 101,
+ 110, 116, 65, 100, 100, 114, 101, 115, 115, 97, 116, 77, 73, 84, 76, 97,
+ 100, 105, 101, 115, 97, 110, 100, 103, 101, 110, 116, 108, 101, 109, 101,
+ 110, 111, 102, 116, 104, 101, 99, 108, 97, 115, 115, 111, 102, 57, 55, 87,
+ 101, 97, 114, 115, 117, 110, 115, 99, 114, 101, 101, 110, 73, 102, 73, 99,
+ 111, 117, 108, 100, 111, 102, 102, 101, 114, 121, 111, 117, 111, 110, 108,
+ 121, 111, 110, 101, 116, 105, 112, 102, 111, 114, 116, 104, 101, 102, 117,
+ 116, 117, 114, 101, 115, 117, 110, 115, 99, 114, 101, 101, 110, 119, 111,
+ 117, 108, 100, 98, 101, 105, 116, 84, 104, 101, 108, 111, 110, 103, 116,
+ 101, 114, 109, 98, 101, 110, 101, 102, 105, 116, 115, 111, 102, 115, 117,
+ 110, 115, 99, 114, 101, 101, 110, 104, 97, 118, 101, 98, 101, 101, 110,
+ 112, 114, 111, 118, 101, 100, 98, 121, 115, 99, 105, 101, 110, 116, 105,
+ 115, 116, 115, 119, 104, 101, 114, 101, 97, 115, 116, 104, 101, 114, 101,
+ 115, 116, 111, 102, 109, 121, 97, 100, 118, 105, 99, 101, 104, 97, 115,
+ 110, 111, 98, 97, 115, 105, 115, 109, 111, 114, 101, 114, 101, 108, 105,
+ 97, 98, 108, 101, 116, 104, 97, 110, 109, 121, 111, 119, 110, 109, 101, 97,
+ 110, 100, 101, 114, 105, 110, 103, 101, 120, 112, 101, 114, 105, 101, 110,
+ 99, 101, 73, 119, 105, 108, 108, 100, 105, 115, 112, 101, 110, 115, 101,
+ 116, 104, 105, 115, 97, 100, 118, 105, 99, 101, 110, 111, 119, 69, 110,
+ 106, 111, 121, 116, 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98,
+ 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116,
+ 104, 79, 104, 110, 101, 118, 101, 114, 109, 105, 110, 100, 89, 111, 117,
+ 119, 105, 108, 108, 110, 111, 116, 117, 110, 100, 101, 114, 115, 116, 97,
+ 110, 100, 116, 104, 101, 112, 111, 119, 101, 114, 97, 110, 100, 98, 101,
+ 97, 117, 116, 121, 111, 102, 121, 111, 117, 114, 121, 111, 117, 116, 104,
+ 117, 110, 116, 105, 108, 116, 104, 101, 121, 118, 101, 102, 97, 100, 101,
+ 100, 66, 117, 116, 116, 114, 117, 115, 116, 109, 101, 105, 110, 50, 48,
+ 121, 101, 97, 114, 115, 121, 111, 117, 108, 108, 108, 111, 111, 107, 98,
+ 97, 99, 107, 97, 116, 112, 104, 111, 116, 111, 115, 111, 102, 121, 111,
+ 117, 114, 115, 101, 108, 102, 97, 110, 100, 114, 101, 99, 97, 108, 108,
+ 105, 110, 97, 119, 97, 121, 121, 111, 117, 99, 97, 110, 116, 103, 114, 97,
+ 115, 112, 110, 111, 119, 104, 111, 119, 109, 117, 99, 104, 112, 111, 115,
+ 115, 105, 98, 105, 108, 105, 116, 121, 108, 97, 121, 98, 101, 102, 111,
+ 114, 101, 121, 111, 117, 97, 110, 100, 104, 111, 119, 102, 97, 98, 117,
+ 108, 111, 117, 115, 121, 111, 117, 114, 101, 97, 108, 108, 121, 108, 111,
+ 111, 107, 101, 100, 89, 111, 117, 97, 114, 101, 110, 111, 116, 97, 115,
+ 102, 97, 116, 97, 115, 121, 111, 117, 105, 109, 97, 103, 105, 110, 101, 68,
+ 111, 110, 116, 119, 111, 114, 114, 121, 97, 98, 111, 117, 116, 116, 104,
+ 101, 102, 117, 116, 117, 114, 101, 79, 114, 119, 111, 114, 114, 121, 98,
+ 117, 116, 107, 110, 111, 119, 116, 104, 97, 116, 115, 117, 110, 115, 99,
+ 114, 101, 101, 110, 119, 111, 117, 108, 100, 98, 101, 105, 116, 84, 104,
+ 101, 108, 111, 110, 103, 116, 101, 114, 109, 98, 101, 110, 101, 102, 105,
+ 116, 115, 111, 102, 115, 117, 110, 115, 99, 114, 101, 101, 110, 104, 97,
+ 118, 101, 98, 101, 101, 110, 112, 114, 111, 118, 101, 100, 98, 121, 115,
+ 99, 105, 101, 110, 116, 105, 115, 116, 115, 119, 104, 101, 114, 101, 97,
+ 115, 116, 104, 101, 114, 101, 115, 116, 111, 102, 109, 121, 97, 100, 118,
+ 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115, 109, 111, 114,
+ 101, 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97, 110, 109, 121,
+ 111, 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110, 103, 101, 120,
+ 112, 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108, 108, 100, 105,
+ 115, 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100, 118, 105, 99,
+ 101, 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101, 112, 111, 119,
+ 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111,
+ 117, 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118, 101, 114, 109,
+ 105, 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111, 116, 117, 110,
+ 100, 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112, 111, 119, 101,
+ 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117,
+ 114, 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101, 121,
+ 118, 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115, 116,
+ 109, 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117, 108,
+ 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116, 111,
+ 115, 111, 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110, 100, 114,
+ 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99, 97,
+ 110, 116, 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119, 109, 117,
+ 99, 104, 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121, 108, 97,
+ 121, 98, 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100, 104, 111,
+ 119, 102, 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114, 101, 97,
+ 108, 108, 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97, 114, 101,
+ 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117, 105, 109, 97,
+ 103, 105, 110, 101, 68, 111, 110, 116, 119, 111, 114, 114, 121, 97, 98,
+ 111, 117, 116, 116, 104, 101, 102, 117, 116, 117, 114, 101, 79, 114, 119,
+ 111, 114, 114, 121, 98, 117, 116, 107, 110, 111, 119, 116, 104, 97, 116,
+ 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111, 117, 114, 121,
+ 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101, 121, 118, 101,
+ 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115, 116, 109, 101,
+ 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117, 108, 108, 108,
+ 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104, 111, 116, 111, 115, 111,
+ 102, 121, 111, 117, 114, 115, 101, 108, 102, 97, 110, 100, 114, 101, 99,
+ 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111, 117, 99, 97, 110, 116,
+ 103, 114, 97, 115, 112, 110, 111, 119, 104, 111, 119, 109, 117, 99, 104,
+ 112, 111, 115, 115, 105, 98, 105, 108, 105, 116, 121, 108, 97, 121, 98,
+ 101, 102, 111, 114, 101, 121, 111, 117, 97, 110, 100, 104, 111, 119, 102,
+ 97, 98, 117, 108, 111, 117, 115, 121, 111, 117, 114, 101, 97, 108, 108,
+ 121, 108, 111, 111, 107, 101, 100, 89, 111, 117, 97, 114, 101, 110, 111,
+ 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117, 105, 109, 97, 103, 105,
+ 110, 101, 68, 111, 110, 116, 119, 111, 114, 114, 121, 97, 98, 111, 117,
+ 116, 116, 104, 101, 102, 117, 116, 117, 114, 101, 79, 114, 119, 111, 114,
+ 114, 121, 98, 117, 116, 107, 110, 111, 119, 116, 104, 97, 116, 115, 117,
+ 110, 115, 99, 114, 101, 101, 110, 119, 111, 117, 108, 100, 98, 101, 105,
+ 116, 84, 104, 101, 108, 111, 110, 103, 116, 101, 114, 109, 98, 101, 110,
+ 101, 102, 105, 116, 115, 111, 102, 115, 117, 110, 115, 99, 114, 101, 101,
+ 110, 104, 97, 118, 101, 98, 101, 101, 110, 112, 114, 111, 118, 101, 100,
+ 98, 121, 115, 99, 105, 101, 110, 116, 105, 115, 116, 115, 119, 104, 101,
+ 114, 101, 97, 115, 116, 104, 101, 114, 101, 115, 116, 111, 102, 109, 121,
+ 97, 100, 118, 105, 99, 101, 104, 97, 115, 110, 111, 98, 97, 115, 105, 115,
+ 109, 111, 114, 101, 114, 101, 108, 105, 97, 98, 108, 101, 116, 104, 97,
+ 110, 109, 121, 111, 119, 110, 109, 101, 97, 110, 100, 101, 114, 105, 110,
+ 103, 101, 120, 112, 101, 114, 105, 101, 110, 99, 101, 73, 119, 105, 108,
+ 108, 100, 105, 115, 112, 101, 110, 115, 101, 116, 104, 105, 115, 97, 100,
+ 118, 105, 99, 101, 110, 111, 119, 69, 110, 106, 111, 121, 116, 104, 101,
+ 112, 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111,
+ 102, 121, 111, 117, 114, 121, 111, 117, 116, 104, 79, 104, 110, 101, 118,
+ 101, 114, 109, 105, 110, 100, 89, 111, 117, 119, 105, 108, 108, 110, 111,
+ 116, 117, 110, 100, 101, 114, 115, 116, 97, 110, 100, 116, 104, 101, 112,
+ 111, 119, 101, 114, 97, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102,
+ 121, 111, 117, 114, 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116,
+ 104, 101, 121, 118, 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114,
+ 117, 115, 116, 109, 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121,
+ 111, 117, 108, 108, 108, 111, 111, 107, 98, 97, 99, 107, 97, 116, 112, 104,
+ 111, 116, 111, 115, 111, 102, 121, 111, 117, 114, 115, 101, 108, 102, 97,
+ 110, 100, 114, 101, 99, 97, 108, 108, 105, 110, 97, 119, 97, 121, 121, 111,
+ 117, 99, 97, 110, 116, 103, 114, 97, 115, 112, 110, 111, 119, 104, 111,
+ 119, 109, 117, 99, 104, 112, 111, 115, 115, 105, 98, 105, 108, 105, 116,
+ 121, 108, 97, 121, 98, 101, 102, 111, 114, 101, 121, 111, 117, 97, 110,
+ 100, 104, 111, 119, 102, 97, 98, 117, 108, 111, 117, 115, 121, 111, 117,
+ 114, 101, 97, 108, 108, 121, 108, 111, 111, 107, 101, 100, 89, 111, 117,
+ 97, 114, 101, 110, 111, 116, 97, 115, 102, 97, 116, 97, 115, 121, 111, 117,
+ 105, 109, 97, 103, 105, 110, 101, 68, 111, 110, 116, 119, 111, 114, 114,
+ 121, 97, 98, 111, 117, 116, 116, 104, 101, 102, 117, 116, 117, 114, 101,
+ 79, 114, 119, 111, 114, 114, 121, 98, 117, 116, 107, 110, 111, 119, 116,
+ 104, 97, 116, 110, 100, 98, 101, 97, 117, 116, 121, 111, 102, 121, 111,
+ 117, 114, 121, 111, 117, 116, 104, 117, 110, 116, 105, 108, 116, 104, 101,
+ 121, 118, 101, 102, 97, 100, 101, 100, 66, 117, 116, 116, 114, 117, 115,
+ 116, 109, 101, 105, 110, 50, 48, 121, 101, 97, 114, 115, 121, 111, 117,
+ 108, 108, 108, 111, 111}
+};
+const int in_i[VSIZE] = { 8192, 8192 };
+
+ sha_init(sha_info_digest, &sha_info_count_lo, &sha_info_count_hi);
+ for (j = 0; j < VSIZE; j++)
+ {
+ i = in_i[j];
+ p = &indata[j][0];
+ sha_update (p, i, sha_info_digest, &sha_info_count_lo, &sha_info_count_hi, sha_info_data);
+ }
+ sha_final (sha_info_digest, &sha_info_count_lo, &sha_info_count_hi, sha_info_data);
+}
/*
+--------------------------------------------------------------------------+
| * Test Vector (added for CHStone) |
| outData : expected output data |
+--------------------------------------------------------------------------+
*/
-const INT32 outData[5] =
- { 0x006a5a37UL, 0x93dc9485UL, 0x2c412112UL, 0x63f7ba43UL, 0xad73f922UL };
-
int
main ()
{
+ const INT32 outData[5] =
+ { 0x006a5a37UL, 0x93dc9485UL, 0x2c412112UL, 0x63f7ba43UL, 0xad73f922UL };
+ INT32 sha_info_digest[5]; /* message digest */
+
int i;
int main_result;
main_result = 0;
- sha_stream ();
+ sha_stream (sha_info_digest);
for (i = 0; i < 5; i++)
{