diff options
Diffstat (limited to 'benchmarks')
36 files changed, 8622 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/gsm2/gsm.c b/benchmarks/CHStone/gsm2/gsm.c new file mode 100755 index 0000000..4e1c2d1 --- /dev/null +++ b/benchmarks/CHStone/gsm2/gsm.c @@ -0,0 +1,558 @@ +/* ++--------------------------------------------------------------------------+ +| 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. | ++--------------------------------------------------------------------------+ +*/ +//#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) +/* + * 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; + +int mask[36] = { +0, +0,1, +0,1,2, +0,1,2,3, +0,1,2,3,4, +0,1,2,3,4,5, +0,1,2,3,4,5,6, +0,1,2,3,4,5,6,7 +}; +int i; +int j; +for(i=1; i < 8; i++){ + for(j=0;j<i;j++){ + STEP (j); + } + NEXTI; +} + /* + 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; + for(j=0;j<9;j++) STEP(j); + /* + 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++; + +int in1[8] = {20480,20480,20480,20480,13964,15360,8534,9036}; +int in2[8] = {0,0,2048,-2560,94,-1792,-341,-1144}; +int in3[8] = {31,31,15,15,7,7,3,3}; +int in4[8] = {-32,-32,-16,-16,8,-8,-4,-4}; +int k=0; +for(k=0; k<8; k++) + STEP(in1[k],in2[k],in3[k],in4[k]); + /* + 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 + +int +main () +{ + + /* here, do your time-consuming job */ + + const word inData[N] = + { 81, 10854, 1893, -10291, 7614, 29718, 20475, -29215, -18949, -29806, + -32017, 1596, 15744, -3088, -17413, -22123, 6798, -13276, 3819, -16273, + -1573, -12523, -27103, + -193, -25588, 4698, -30436, 15264, -1393, 11418, 11370, 4986, 7869, -1903, + 9123, -31726, + -25237, -14155, 17982, 32427, -12439, -15931, -21622, 7896, 1689, 28113, + 3615, 22131, -5572, + -20110, 12387, 9177, -24544, 12480, 21546, -17842, -13645, 20277, 9987, + 17652, -11464, -17326, + -10552, -27100, 207, 27612, 2517, 7167, -29734, -22441, 30039, -2368, 12813, + 300, -25555, 9087, + 29022, -6559, -20311, -14347, -7555, -21709, -3676, -30082, -3190, -30979, + 8580, 27126, 3414, + -4603, -22303, -17143, 13788, -1096, -14617, 22071, -13552, 32646, 16689, + -8473, -12733, 10503, + 20745, 6696, -26842, -31015, 3792, -19864, -20431, -30307, 32421, -13237, + 9006, 18249, 2403, + -7996, -14827, -5860, 7122, 29817, -31894, 17955, 28836, -31297, 31821, + -27502, 12276, -5587, + -22105, 9192, -22549, 15675, -12265, 7212, -23749, -12856, -5857, 7521, + 17349, 13773, -3091, + -17812, -9655, 26667, 7902, 2487, 3177, 29412, -20224, -2776, 24084, -7963, + -10438, -11938, + -14833, -6658, 32058, 4020, 10461, 15159 + }; + + const word outData[N] = + { 80, 10848, 1888, -10288, 7616, 29712, 20480, -29216, -18944, -29808, + -32016, 1600, 15744, -3088, -17408, -22128, 6800, -13280, 3824, -16272, + -1568, -12528, -27104, + -192, -25584, 4704, -30432, 15264, -1392, 11424, 11376, 4992, 7872, -1904, + 9120, -31728, -25232, + -14160, 17984, 32432, -12432, -15936, -21616, 7904, 1696, 28112, 3616, + 22128, -5568, -20112, + 12384, 9184, -24544, 12480, 21552, -17840, -13648, 20272, 9984, 17648, + -11456, -17328, -10544, + -27104, 208, 27616, 2512, 7168, -29728, -22448, 30032, -2368, 12816, 304, + -25552, 9088, 29024, + -6560, -20304, -14352, -7552, -21712, -3680, -30080, -3184, -30976, 8576, + 27120, 3408, -4608, + -22304, -17136, 13792, -1088, -14624, 22064, -13552, 32640, 16688, -8480, + -12736, 10496, 20752, + 6704, -26848, -31008, 3792, -19856, -20432, -30304, 32416, -13232, 9008, + 18256, 2400, -8000, + -14832, -5856, 7120, 29824, -31888, 17952, 28832, -31296, 31824, -27504, + 12272, -5584, -22112, + 9200, -22544, 15680, -12272, 7216, -23744, -12848, -5856, 7520, 17344, + 13776, -3088, -17808, + -9648, 26672, 7904, 2480, 3184, 29408, -20224, -2768, 24080, -7968, -10432, + -11936, -14832, + -6656, 32064, 4016, 10464, 15152 + }; + + const word outLARc[M] = { 32, 33, 22, 13, 7, 5, 3, 2 }; + + int i; + int main_result; + word so[N]; + word LARc[M]; + main_result = 0; + + for (i = 0; i < N; i++) + so[i] = inData[i]; + + 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]); + + 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_coqup.c b/benchmarks/CHStone/sha/sha_coqup.c new file mode 100755 index 0000000..3c4d7c8 --- /dev/null +++ b/benchmarks/CHStone/sha/sha_coqup.c @@ -0,0 +1,1353 @@ +/* ++--------------------------------------------------------------------------+ +| 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. | ++--------------------------------------------------------------------------+ +*/ +/* NIST Secure Hash Algorithm */ +/* heavily modified by Uwe Hollerbach uh@alumni.caltech edu */ +/* from Peter C. Gutmann's implementation as found in */ +/* Applied Cryptography by Bruce Schneier */ + +/* NIST's proposed modification to SHA of 7/11/94 may be */ +/* activated by defining USE_MODIFIED_SHA */ + +/* NIST Secure Hash Algorithm */ +/* heavily modified from Peter C. Gutmann's implementation */ + +/* Useful defines & typedefs */ + +typedef unsigned int 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 | ++--------------------------------------------------------------------------+ +*/ +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_info_digest); + + for (i = 0; i < 5; i++) + { + main_result += (sha_info_digest[i] != outData[i]); + } + + 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++) { diff --git a/benchmarks/polybench-syn/data-mining/covariance.c b/benchmarks/polybench-syn/data-mining/covariance.c new file mode 100644 index 0000000..63f2320 --- /dev/null +++ b/benchmarks/polybench-syn/data-mining/covariance.c @@ -0,0 +1,108 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* covariance.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE +static +void init_array (int m, int n, + int *float_n, + int data[ 32 + 0][28 + 0]) +{ + int i, j; + int ONE = 1; + int DIV = 28; + + *float_n = (int)n; + + for (i = 0; i < 32; plus(i)) + for (j = 0; j < 28; plus(j)) + data[i][j] = ((int) i*j) / DIV; +} + + + + +static +int print_array(int m, + int cov[ 28 + 0][28 + 0]) + +{ + int i, j; + int ONE = 1; + int res = 0; + for (i = 0; i < m; plus(i)) + for (j = 0; j < m; plus(j)) { + res ^= cov[i][j]; + } + return res; +} + + + + +static +void kernel_covariance(int m, int n, + int float_n, + int data[ 32 + 0][28 + 0], + int cov[ 28 + 0][28 + 0], + int mean[ 28 + 0]) +{ + int i, j, k; + int ONE = 1; + +#pragma scop + for (j = 0; j < m; plus(j)) + { + mean[j] = 0; + for (i = 0; i < n; plus(i)) + mean[j] += data[i][j]; + mean[j] /= float_n; + } + + for (i = 0; i < n; plus(i)) + for (j = 0; j < m; plus(j)) + data[i][j] -= mean[j]; + + for (i = 0; i < m; plus(i)) + for (j = i; j < m; plus(j)) + { + cov[i][j] = 0; + for (k = 0; k < n; plus(k)) + cov[i][j] += data[k][i] * data[k][j]; + cov[i][j] /= (float_n - ONE); + cov[j][i] = cov[i][j]; + } +#pragma endscop + +} + + +int main() +{ + + int n = 32; + int m = 28; + + + int float_n; + int data[32 + 0][28 + 0]; + int mean[28 + 0]; + int cov[28 + 0][28 + 0]; + + init_array (m, n, &float_n, data); + + kernel_covariance (m, n, float_n, + data, + cov, + mean); + + return print_array(m, cov); + +} diff --git a/benchmarks/polybench-syn/linear-algebra/blas/gemm.c b/benchmarks/polybench-syn/linear-algebra/blas/gemm.c new file mode 100644 index 0000000..5a28f08 --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/blas/gemm.c @@ -0,0 +1,111 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* gemm.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE +static +void init_array(int ni, int nj, int nk, + int *alpha, + int *beta, + int C[ 20 + 0][25 + 0], + int A[ 20 + 0][30 + 0], + int B[ 30 + 0][25 + 0]) +{ + int i, j; + int ONE = 1; + + *alpha = 2; + *beta = 2; + for (i = 0; i < ni; plus(i)) + for (j = 0; j < nj; plus(j)) + C[i][j] = (int) ((i*j+ONE) % ni) / ni; + for (i = 0; i < ni; plus(i)) + for (j = 0; j < nk; plus(j)) + A[i][j] = (int) (i*(j+ONE) % nk) / nk; + for (i = 0; i < nk; plus(i)) + for (j = 0; j < nj; plus(j)) + B[i][j] = (int) (i*(j+ONE+ONE) % nj) / nj; +} + + + + +static +int print_array(int ni, int nj, + int C[ 20 + 0][25 + 0]) +{ + int i, j; + int ONE = 1; + int res = 0; + for (i = 0; i < ni; plus(i)) + for (j = 0; j < nj; plus(j)) { + res ^= C[i][j]; + } + return res; +} + +static +void kernel_gemm(int ni, int nj, int nk, + int alpha, + int beta, + int C[ 20 + 0][25 + 0], + int A[ 20 + 0][30 + 0], + int B[ 30 + 0][25 + 0]) +{ + int i, j, k; + int ONE = 1; + +#pragma scop + for (i = 0; i < ni; plus(i)) { + for (j = 0; j < nj; plus(j)) + C[i][j] *= beta; + for (k = 0; k < nk; plus(k)) { + for (j = 0; j < nj; plus(j)) + C[i][j] += alpha * A[i][k] * B[k][j]; + } + } +#pragma endscop + +} + + +int main() +{ + + int ni = 20; + int nj = 25; + int nk = 30; + + + int alpha; + int beta; + int C[20 + 0][25 + 0]; + int A[20 + 0][30 + 0]; + int B[30 + 0][25 + 0]; + + + init_array (ni, nj, nk, &alpha, &beta, + C, + A, + B); + + + kernel_gemm (ni, nj, nk, + alpha, beta, + C, + A, + B); + + + return + print_array(ni, nj, C); + + +} diff --git a/benchmarks/polybench-syn/linear-algebra/blas/gemver.c b/benchmarks/polybench-syn/linear-algebra/blas/gemver.c new file mode 100644 index 0000000..a2711cb --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/blas/gemver.c @@ -0,0 +1,152 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* gemver.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE +static +void init_array (int n, + int *alpha, + int *beta, + int A[ 40 + 0][40 + 0], + int u1[ 40 + 0], + int v1[ 40 + 0], + int u2[ 40 + 0], + int v2[ 40 + 0], + int w[ 40 + 0], + int x[ 40 + 0], + int y[ 40 + 0], + int z[ 40 + 0]) +{ + int i, j; + int ONE = 1; + + *alpha = 3; + *beta = 2; + + int fn = (int)n; + + for (i = 0; i < n; plus(i)) + { + u1[i] = i; + u2[i] = ((i+ONE)/fn)/2; + v1[i] = ((i+ONE)/fn)/4; + v2[i] = ((i+ONE)/fn)/6; + y[i] = ((i+ONE)/fn)/8; + z[i] = ((i+ONE)/fn)/9; + x[i] = 0; + w[i] = 0; + for (j = 0; j < n; plus(j)) + A[i][j] = (int) (i*j % n) / n; + } +} + + + + +static +int print_array(int n, + int w[ 40 + 0]) +{ + int i; + int ONE = 1; + int res = 0; + + for (i = 0; i < n; plus(i)) { + res ^= w[i]; + } + return res; +} + + + + +static +void kernel_gemver(int n, + int alpha, + int beta, + int A[ 40 + 0][40 + 0], + int u1[ 40 + 0], + int v1[ 40 + 0], + int u2[ 40 + 0], + int v2[ 40 + 0], + int w[ 40 + 0], + int x[ 40 + 0], + int y[ 40 + 0], + int z[ 40 + 0]) +{ + int i, j; + int ONE = 1; + +#pragma scop + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) + A[i][j] = A[i][j] + u1[i] * v1[j] + u2[i] * v2[j]; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) + x[i] = x[i] + beta * A[j][i] * y[j]; + + for (i = 0; i < n; plus(i)) + x[i] = x[i] + z[i]; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) + w[i] = w[i] + alpha * A[i][j] * x[j]; + +#pragma endscop +} + + +int main() +{ + + int n = 40; + + + int alpha; + int beta; + int A[40 + 0][40 + 0]; + int u1[40 + 0]; + int v1[40 + 0]; + int u2[40 + 0]; + int v2[40 + 0]; + int w[40 + 0]; + int x[40 + 0]; + int y[40 + 0]; + int z[40 + 0]; + + + + init_array (n, &alpha, &beta, + A, + u1, + v1, + u2, + v2, + w, + x, + y, + z); + + kernel_gemver (n, alpha, beta, + A, + u1, + v1, + u2, + v2, + w, + x, + y, + z); + + return print_array(n, w); + +} diff --git a/benchmarks/polybench-syn/linear-algebra/blas/gesummv.c b/benchmarks/polybench-syn/linear-algebra/blas/gesummv.c new file mode 100644 index 0000000..606a581 --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/blas/gesummv.c @@ -0,0 +1,115 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* gesummv.c: this file is part of PolyBench/C */ + + +#define plus(i) i = i + ONE + +static +void init_array(int n, + int *alpha, + int *beta, + int A[ 30 + 0][30 + 0], + int B[ 30 + 0][30 + 0], + int x[ 30 + 0]) +{ + int i, j; + int ONE = 1; + + *alpha = 3; + *beta = 2; + for (i = 0; i < n; plus(i)) + { + x[i] = (int)( i % n) / n; + for (j = 0; j < n; plus(j)) { + A[i][j] = (int) ((i*j+ONE) % n) / n; + B[i][j] = (int) ((i*j+ONE+ONE) % n) / n; + } + } +} + + + + +static +int print_array(int n, + int y[ 30 + 0]) + +{ + int i; + int ONE = 1; + int res = 0; + + for (i = 0; i < n; plus(i)) { + res ^= y[i]; + } + return res; +} + +static +void kernel_gesummv(int n, + int alpha, + int beta, + int A[ 30 + 0][30 + 0], + int B[ 30 + 0][30 + 0], + int tmp[ 30 + 0], + int x[ 30 + 0], + int y[ 30 + 0]) +{ + int i, j; + int ONE = 1; + +#pragma scop + for (i = 0; i < n; plus(i)) + { + tmp[i] = 0; + y[i] = 0; + for (j = 0; j < n; plus(j)) + { + tmp[i] = A[i][j] * x[j] + tmp[i]; + y[i] = B[i][j] * x[j] + y[i]; + } + y[i] = alpha * tmp[i] + beta * y[i]; + } +#pragma endscop + +} + + +int main() +{ + + int n = 30; + + + int alpha; + int beta; + int A[30 + 0][30 + 0]; + int B[30 + 0][30 + 0]; + int tmp[30 + 0]; + int x[30 + 0]; + int y[30 + 0]; + + init_array (n, &alpha, &beta, + A, + B, + x); + + kernel_gesummv (n, alpha, beta, + A, + B, + tmp, + x, + y); + + + return print_array(n, y); + +} diff --git a/benchmarks/polybench-syn/linear-algebra/blas/symm.c b/benchmarks/polybench-syn/linear-algebra/blas/symm.c new file mode 100644 index 0000000..a5e8539 --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/blas/symm.c @@ -0,0 +1,110 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* symm.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE +static +void init_array(int m, int n, + int *alpha, + int *beta, + int C[ 20 + 0][30 + 0], + int A[ 20 + 0][20 + 0], + int B[ 20 + 0][30 + 0]) +{ + int i, j; + int ONE = 1; + int HUND = 100; + + *alpha = 3; + *beta = 2; + for (i = 0; i < m; plus(i)) + for (j = 0; j < n; plus(j)) { + C[i][j] = (int) ((i+j) % HUND) / m; + B[i][j] = (int) ((n+i-j) % HUND) / m; + } + for (i = 0; i < m; plus(i)) { + for (j = 0; j <=i; plus(j)) + A[i][j] = (int) ((i+j) % HUND) / m; + for (j = i+ONE; j < m; plus(j)) + A[i][j] = -999; + } +} + +static +int print_array(int m, int n, + int C[ 20 + 0][30 + 0]) +{ + int i, j; + int ONE = 1; + int res = 0; + + for (i = 0; i < m; plus(i)) + for (j = 0; j < n; plus(j)) { + res ^= C[i][j]; + } + return res; +} + + +static +void kernel_symm(int m, int n, + int alpha, + int beta, + int C[ 20 + 0][30 + 0], + int A[ 20 + 0][20 + 0], + int B[ 20 + 0][30 + 0]) +{ + int ONE = 1; + int i, j, k; + int temp2; +#pragma scop + for (i = 0; i < m; plus(i)) + for (j = 0; j < n; plus(j) ) + { + temp2 = 0; + for (k = 0; k < i; plus(k)) { + C[k][j] += alpha*B[i][j] * A[i][k]; + temp2 += B[k][j] * A[i][k]; + } + C[i][j] = beta * C[i][j] + alpha*B[i][j] * A[i][i] + alpha * temp2; + } +#pragma endscop + +} + + +int main() +{ + + int m = 20; + int n = 30; + + int alpha; + int beta; + int C[20 + 0][30 + 0]; + int A[20 + 0][20 + 0]; + int B[20 + 0][30 + 0]; + + + init_array (m, n, &alpha, &beta, + C, + A, + B); + + kernel_symm (m, n, + alpha, beta, + C, + A, + B); + + return + print_array(m, n, C); + +} diff --git a/benchmarks/polybench-syn/linear-algebra/blas/syr2k.c b/benchmarks/polybench-syn/linear-algebra/blas/syr2k.c new file mode 100644 index 0000000..82b4d3b --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/blas/syr2k.c @@ -0,0 +1,120 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* syr2k.c: this file is part of PolyBench/C */ + + +#define plus(i) i = i + ONE +static +void init_array(int n, int m, + int *alpha, + int *beta, + int C[ 30 + 0][30 + 0], + int A[ 30 + 0][20 + 0], + int B[ 30 + 0][20 + 0]) +{ + int i, j; + int ONE = 1; + + *alpha = 3; + *beta = 2; + for (i = 0; i < n; plus(i)) + for (j = 0; j < m; plus(j)) { + A[i][j] = (int) ((i*j+ONE)%n) / n; + B[i][j] = (int) ((i*j+ONE+ONE)%m) / m; + } + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) { + C[i][j] = (int) ((i*j+4-ONE)%n) / m; + } +} + + + + +static +int print_array(int n, + int C[ 30 + 0][30 + 0]) +{ + int i, j; + int ONE = 1; + int res = 0; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) { + res ^= C[i][j]; + } + return res; +} + + +static +void kernel_syr2k(int n, int m, + int alpha, + int beta, + int C[ 30 + 0][30 + 0], + int A[ 30 + 0][20 + 0], + int B[ 30 + 0][20 + 0]) +{ + int i, j, k; + int ONE = 1; + +#pragma scop + for (i = 0; i < n; plus(i)) { + for (j = 0; j <= i; plus(j)) + C[i][j] *= beta; + for (k = 0; k < m; plus(k)) + for (j = 0; j <= i; plus(j)) + { + C[i][j] += A[j][k]*alpha*B[i][k] + B[j][k]*alpha*A[i][k]; + } + } +#pragma endscop + +} + + +int main() +{ + + int n = 30; + int m = 20; + + + int alpha; + int beta; + int C[30 + 0][30 + 0]; + int A[30 + 0][20 + 0]; + int B[30 + 0][20 + 0]; + + + init_array (n, m, &alpha, &beta, + C, + A, + B); + + + ; + + + kernel_syr2k (n, m, + alpha, beta, + C, + A, + B); + + + ; + ; + + + + return print_array(n, C); + +} diff --git a/benchmarks/polybench-syn/linear-algebra/blas/syrk.c b/benchmarks/polybench-syn/linear-algebra/blas/syrk.c new file mode 100644 index 0000000..dbf2e6b --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/blas/syrk.c @@ -0,0 +1,106 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* syrk.c: this file is part of PolyBench/C */ + + +#define plus(i) i = i + ONE +static +void init_array(int n, int m, + int *alpha, + int *beta, + int C[ 30 + 0][30 + 0], + int A[ 30 + 0][20 + 0]) +{ + int i, j; + int ONE = 1; + + *alpha = 3; + *beta = 2; + for (i = 0; i < n; plus(i)) + for (j = 0; j < m; plus(j)) + A[i][j] = (int) ((i*j+ONE)%n) / n; + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) + C[i][j] = (int) ((i*j+ONE+ONE)%m) / m; +} + + +static +int print_array(int n, + int C[ 30 + 0][30 + 0]) +{ + int i, j; + int ONE = 1; + int res = 0; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) { + res ^= C[i][j]; + } + return res; +} + + + + +static +void kernel_syrk(int n, int m, + int alpha, + int beta, + int C[ 30 + 0][30 + 0], + int A[ 30 + 0][20 + 0]) +{ + int i, j, k; + int ONE = 1; + +#pragma scop + for (i = 0; i < n; plus(i)) { + for (j = 0; j <= i; plus(j)) + C[i][j] *= beta; + for (k = 0; k < m; plus(k)) { + for (j = 0; j <= i; plus(j)) + C[i][j] += alpha * A[i][k] * A[j][k]; + } + } +#pragma endscop + +} + + +int main() +{ + + int n = 30; + int m = 20; + + + int alpha; + int beta; + int C[30 + 0][30 + 0]; + int A[30 + 0][20 + 0]; + + + init_array (n, m, &alpha, &beta, C, A); + + + ; + + + kernel_syrk (n, m, alpha, beta, C, A); + + + ; + ; + + + + return print_array(n, C); + +} diff --git a/benchmarks/polybench-syn/linear-algebra/blas/trmm.c b/benchmarks/polybench-syn/linear-algebra/blas/trmm.c new file mode 100644 index 0000000..79b384d --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/blas/trmm.c @@ -0,0 +1,96 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* trmm.c: this file is part of PolyBench/C */ + + +#define plus(i) i = i + ONE +static +void init_array(int m, int n, + int *alpha, + int A[ 20 + 0][20 + 0], + int B[ 20 + 0][30 + 0]) +{ + int i, j; + int ONE = 1; + + *alpha = 3; + for (i = 0; i < m; plus(i)) { + for (j = 0; j < i; plus(j)) { + A[i][j] = (int)((i+j) % m)/m; + } + A[i][i] = 1; + for (j = 0; j < n; plus(j)) { + B[i][j] = (int)((n+(i-j)) % n)/n; + } + } + +} + + + + +static +int print_array(int m, int n, + int B[ 20 + 0][30 + 0]) +{ + int i, j; + int ONE = 1; + int res = 0; + + for (i = 0; i < m; plus(i)) + for (j = 0; j < n; plus(j)) { + res ^= B[i][j]; + } + return res; +} + + + + +static +void kernel_trmm(int m, int n, + int alpha, + int A[ 20 + 0][20 + 0], + int B[ 20 + 0][30 + 0]) +{ + int i, j, k; + int ONE = 1; +#pragma scop + for (i = 0; i < m; plus(i)) + for (j = 0; j < n; plus(j)) { + for (k = i+ONE; k < m; plus(k)) + B[i][j] += A[k][i] * B[k][j]; + B[i][j] = alpha * B[i][j]; + } +#pragma endscop + +} + + +int main() +{ + + int m = 20; + int n = 30; + + + int alpha; + int A[20 + 0][20 + 0]; + int B[20 + 0][30 + 0]; + + + init_array (m, n, &alpha, A, B); + + + kernel_trmm (m, n, alpha, A, B); + + return print_array(m, n, B); + +} diff --git a/benchmarks/polybench-syn/linear-algebra/blas/trmm.preproc.c b/benchmarks/polybench-syn/linear-algebra/blas/trmm.preproc.c new file mode 100644 index 0000000..9b8edfe --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/blas/trmm.preproc.c @@ -0,0 +1,144 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* trmm.c: this file is part of PolyBench/C */ + +#include <stdio.h> +#include <unistd.h> +#include <string.h> +#include <math.h> + +/* Include polybench common header. */ +#include<polybench.h> +# 1 "trmm.c" +# 1 "<built-in>" 1 +# 1 "<built-in>" 3 +# 362 "<built-in>" 3 +# 1 "<command line>" 1 +# 1 "<built-in>" 2 +# 1 "trmm.c" 2 +# 1 "utilities/polybench.h" 1 +# 30 "utilities/polybench.h" +# 1 "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h" 1 3 4 +# 31 "utilities/polybench.h" 2 +# 231 "utilities/polybench.h" +extern void* polybench_alloc_data(unsigned long long int n, int elt_size); +extern void polybench_free_data(void* ptr); + + + + +extern void polybench_flush_cache(); +extern void polybench_prepare_instruments(); +# 2 "trmm.c" 2 + + +# 1 "./linear-algebra/blas/trmm/trmm.h" 1 +# 5 "trmm.c" 2 + + + +static +void init_array(int m, int n, + int *alpha, + int A[ 20 + 0][20 + 0], + int B[ 20 + 0][30 + 0]) +{ + int i, j; + + *alpha = 1.5; + for (i = 0; i < m; i++) { + for (j = 0; j < i; j++) { + A[i][j] = (int)((i+j) % m)/m; + } + A[i][i] = 1.0; + for (j = 0; j < n; j++) { + B[i][j] = (int)((n+(i-j)) % n)/n; + } + } + +} + + + + +static +void print_array(int m, int n, + int B[ 20 + 0][30 + 0]) +{ + int i, j; + + fprintf(stderr, "==BEGIN DUMP_ARRAYS==\n"); + fprintf(stderr, "begin dump: %s", "B"); + for (i = 0; i < m; i++) + for (j = 0; j < n; j++) { + if ((i * m + j) % 20 == 0) fprintf (stderr, "\n"); + fprintf (stderr, "%d ", B[i][j]); + } + fprintf(stderr, "\nend dump: %s\n", "B"); + fprintf(stderr, "==END DUMP_ARRAYS==\n"); +} + + + + +static +void kernel_trmm(int m, int n, + int alpha, + int A[ 20 + 0][20 + 0], + int B[ 20 + 0][30 + 0]) +{ + int i, j, k; +# 68 "trmm.c" +#pragma scop + for (i = 0; i < m; i++) + for (j = 0; j < n; j++) { + for (k = i+1; k < m; k++) + B[i][j] += A[k][i] * B[k][j]; + B[i][j] = alpha * B[i][j]; + } +#pragma endscop + +} + + +int main(int argc, char** argv) +{ + + int m = 20; + int n = 30; + + + int alpha; + int (*A)[20 + 0][20 + 0]; A = (int(*)[20 + 0][20 + 0])polybench_alloc_data ((20 + 0) * (20 + 0), sizeof(int));; + int (*B)[20 + 0][30 + 0]; B = (int(*)[20 + 0][30 + 0])polybench_alloc_data ((20 + 0) * (30 + 0), sizeof(int));; + + + init_array (m, n, &alpha, *A, *B); + + + ; + + + kernel_trmm (m, n, alpha, *A, *B); + + + ; + ; + + + + if (argc > 42 && ! strcmp(argv[0], "")) print_array(m, n, *B); + + + free((void*)A);; + free((void*)B);; + + return 0; +} diff --git a/benchmarks/polybench-syn/linear-algebra/kernels/2mm.c b/benchmarks/polybench-syn/linear-algebra/kernels/2mm.c new file mode 100644 index 0000000..391e9ac --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/kernels/2mm.c @@ -0,0 +1,128 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* 2mm.c: this file is part of PolyBench/C */ + + +#define plus(i) i = i + ONE +static +void init_array(int ni, int nj, int nk, int nl, + int *alpha, + int *beta, + int A[ 16 + 0][22 + 0], + int B[ 22 + 0][18 + 0], + int C[ 18 + 0][24 + 0], + int D[ 16 + 0][24 + 0]) +{ + int i, j; + int ONE = 1; + + *alpha = 2; + *beta = 2; + for (i = 0; i < ni; plus(i)) + for (j = 0; j < nk; plus(j)) + A[i][j] = (int) ((i*j+ONE) % ni) / ni; + for (i = 0; i < nk; plus(i)) + for (j = 0; j < nj; plus(j)) + B[i][j] = (int) (i*(j+ONE) % nj) / nj; + for (i = 0; i < nj; plus(i)) + for (j = 0; j < nl; plus(j)) + C[i][j] = (int) ((i*(j+ONE+ONE+ONE)+ONE) % nl) / nl; + for (i = 0; i < ni; plus(i)) + for (j = 0; j < nl; plus(j)) + D[i][j] = (int) (i*(j+ONE+ONE) % nk) / nk; +} + +static +int print_array(int ni, int nl, + int D[ 16 + 0][24 + 0]) +{ + int i, j; + int ONE = 1; + int res = 0; + for (i = 0; i < ni; plus(i)) + for (j = 0; j < nl; plus(j)) { + res ^= D[i][j]; + } + return res; +} + + + + +static +void kernel_2mm(int ni, int nj, int nk, int nl, + int alpha, + int beta, + int tmp[ 16 + 0][18 + 0], + int A[ 16 + 0][22 + 0], + int B[ 22 + 0][18 + 0], + int C[ 18 + 0][24 + 0], + int D[ 16 + 0][24 + 0]) +{ + int ONE = 1; + int i, j, k; + +#pragma scop + + for (i = 0; i < ni; plus(i)) + for (j = 0; j < nj; plus(j)) + { + tmp[i][j] = 0; + for (k = 0; k < nk; plus(k)) + tmp[i][j] += alpha * A[i][k] * B[k][j]; + } + for (i = 0; i < ni; plus(i)) + for (j = 0; j < nl; plus(j)) + { + D[i][j] *= beta; + for (k = 0; k < nj; plus(k)) + D[i][j] += tmp[i][k] * C[k][j]; + } +#pragma endscop + +} + + +int main() +{ + + int ni = 16; + int nj = 18; + int nk = 22; + int nl = 24; + + int alpha; + int beta; + int tmp[16 + 0][18 + 0]; + int A[16 + 0][22 + 0]; + int B[22 + 0][18 + 0]; + int C[18 + 0][24 + 0]; + int D[16 + 0][24 + 0]; + + + init_array (ni, nj, nk, nl, &alpha, &beta, + A, + B, + C, + D); + + + kernel_2mm (ni, nj, nk, nl, + alpha, beta, + tmp, + A, + B, + C, + D); + + + return print_array(ni, nl, D); + +} diff --git a/benchmarks/polybench-syn/linear-algebra/kernels/3mm.c b/benchmarks/polybench-syn/linear-algebra/kernels/3mm.c new file mode 100644 index 0000000..e565fb5 --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/kernels/3mm.c @@ -0,0 +1,141 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* 3mm.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE +static +void init_array(int ni, int nj, int nk, int nl, int nm, + int A[ 16 + 0][20 + 0], + int B[ 20 + 0][18 + 0], + int C[ 18 + 0][24 + 0], + int D[ 24 + 0][22 + 0]) +{ + int i, j; + int ONE = 1; + int TWO = 2; + int THREE = 3; + int FIVE = 5; + + for (i = 0; i < ni; plus(i)) + for (j = 0; j < nk; plus(j)) + A[i][j] = (int) ((i*j+ONE) % ni) / (5*ni); + for (i = 0; i < nk; plus(i)) + for (j = 0; j < nj; plus(j)) + B[i][j] = (int) ((i*(j+ONE)+TWO) % nj) / (5*nj); + for (i = 0; i < nj; plus(i)) + for (j = 0; j < nm; plus(j)) + C[i][j] = (int) (i*(j+THREE) % nl) / (5*nl); + for (i = 0; i < nm; plus(i)) + for (j = 0; j < nl; plus(j)) + D[i][j] = (int) ((i*(j+TWO)+TWO) % nk) / (5*nk); +} + + + + +static +int print_array(int ni, int nl, + int G[ 16 + 0][22 + 0]) +{ + int i, j; + int ONE = 1; + int res = 0; + + for (i = 0; i < ni; plus(i)) + for (j = 0; j < nl; plus(j)) { + res ^= G[i][j]; + } + return res; +} + + + + +static +void kernel_3mm(int ni, int nj, int nk, int nl, int nm, + int E[ 16 + 0][18 + 0], + int A[ 16 + 0][20 + 0], + int B[ 20 + 0][18 + 0], + int F[ 18 + 0][22 + 0], + int C[ 18 + 0][24 + 0], + int D[ 24 + 0][22 + 0], + int G[ 16 + 0][22 + 0]) +{ + int ONE = 1; + int i, j, k; + +#pragma scop + + for (i = 0; i < ni; plus(i)) + for (j = 0; j < nj; plus(j)) + { + E[i][j] = 0; + for (k = 0; k < nk; plus(k)) + E[i][j] += A[i][k] * B[k][j]; + } + + for (i = 0; i < nj; plus(i)) + for (j = 0; j < nl; plus(j)) + { + F[i][j] = 0; + for (k = 0; k < nm; plus(k)) + F[i][j] += C[i][k] * D[k][j]; + } + + for (i = 0; i < ni; plus(i)) + for (j = 0; j < nl; plus(j)) + { + G[i][j] = 0; + for (k = 0; k < nj; plus(k)) + G[i][j] += E[i][k] * F[k][j]; + } +#pragma endscop + +} + + +int main() +{ + + int ni = 16; + int nj = 18; + int nk = 20; + int nl = 22; + int nm = 24; + + + int E[16 + 0][18 + 0]; + int A[16 + 0][20 + 0]; + int B[20 + 0][18 + 0]; + int F[18 + 0][22 + 0]; + int C[18 + 0][24 + 0]; + int D[24 + 0][22 + 0]; + int G[16 + 0][22 + 0]; + + + init_array (ni, nj, nk, nl, nm, + A, + B, + C, + D); + + kernel_3mm (ni, nj, nk, nl, nm, + E, + A, + B, + F, + C, + D, + G); + + + return print_array(ni, nl, G); + +} diff --git a/benchmarks/polybench-syn/linear-algebra/kernels/atas.c b/benchmarks/polybench-syn/linear-algebra/kernels/atas.c new file mode 100644 index 0000000..a051046 --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/kernels/atas.c @@ -0,0 +1,100 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* atax.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE +static +void init_array (int m, int n, + int A[ 38 + 0][42 + 0], + int x[ 42 + 0]) +{ + int ONE = 1; + int i, j; + int fn; + fn = (int)n; + + for (i = 0; i < n; plus(i)) + x[i] = ONE + (i / fn); + for (i = 0; i < m; plus(i)) + for (j = 0; j < n; plus(j)) + A[i][j] = (int) ((i+j) % n) / (5*m); +} + + + + +static +int print_array(int n, + int y[ 42 + 0]) + +{ + int i; + int ONE = 1; + int res = 0; + + for (i = 0; i < n; plus(i)) { + res ^= y[i]; + } + return res; +} + + + + +static +void kernel_atax(int m, int n, + int A[ 38 + 0][42 + 0], + int x[ 42 + 0], + int y[ 42 + 0], + int tmp[ 38 + 0]) +{ + int i, j; + int ONE = 1; + +#pragma scop + for (i = 0; i < n; plus(i)) + y[i] = 0; + for (i = 0; i < m; plus(i)) + { + tmp[i] = 0; + for (j = 0; j < n; plus(j)) + tmp[i] = tmp[i] + A[i][j] * x[j]; + for (j = 0; j < n; plus(j)) + y[j] = y[j] + A[i][j] * tmp[i]; + } +#pragma endscop + +} + + +int main() +{ + + int m = 38; + int n = 42; + + + int A[38 + 0][42 + 0]; + int x[42 + 0]; + int y[42 + 0]; + int tmp[38 + 0]; + + init_array (m, n, A, x); + + kernel_atax (m, n, + A, + x, + y, + tmp); + + + return print_array(n, y); + +} diff --git a/benchmarks/polybench-syn/linear-algebra/kernels/bicg.c b/benchmarks/polybench-syn/linear-algebra/kernels/bicg.c new file mode 100644 index 0000000..48b7658 --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/kernels/bicg.c @@ -0,0 +1,115 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* bicg.c: this file is part of PolyBench/C */ + + +#define plus(i) i = i + ONE +static +void init_array (int m, int n, + int A[ 42 + 0][38 + 0], + int r[ 42 + 0], + int p[ 38 + 0]) +{ + int i, j; + int ONE = 1; + + for (i = 0; i < m; plus(i)) + p[i] = (int)(i % m) / m; + for (i = 0; i < n; plus(i)) { + r[i] = (int)(i % n) / n; + for (j = 0; j < m; plus(j)) + A[i][j] = (int) (i*(j+ONE) % n)/n; + } +} + + + + +static +int print_array(int m, int n, + int s[ 38 + 0], + int q[ 42 + 0]) + +{ + int i; + int ONE = 1; + int res = 0; + + for (i = 0; i < m; plus(i)) { + res ^= s[i]; + } + for (i = 0; i < n; plus(i)) { + res ^= q[i]; + } + return res; +} + + + + +static +void kernel_bicg(int m, int n, + int A[ 42 + 0][38 + 0], + int s[ 38 + 0], + int q[ 42 + 0], + int p[ 38 + 0], + int r[ 42 + 0]) +{ + int i, j; + int ONE = 1; + +#pragma scop + for (i = 0; i < m; plus(i)) + s[i] = 0; + for (i = 0; i < n; plus(i)) + { + q[i] = 0; + for (j = 0; j < m; plus(j)) + { + s[j] = s[j] + r[i] * A[i][j]; + q[i] = q[i] + A[i][j] * p[j]; + } + } +#pragma endscop + +} + + +int main() +{ + + int n = 42; + int m = 38; + + + int A[42 + 0][38 + 0]; + int s[38 + 0]; + int q[42 + 0]; + int p[38 + 0]; + int r[42 + 0]; + + + init_array (m, n, + A, + r, + p); + + kernel_bicg (m, n, + A, + s, + q, + p, + r); + + + return print_array(m, n, s, q); + + +} diff --git a/benchmarks/polybench-syn/linear-algebra/kernels/doitgen.c b/benchmarks/polybench-syn/linear-algebra/kernels/doitgen.c new file mode 100644 index 0000000..20de1df --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/kernels/doitgen.c @@ -0,0 +1,100 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* doitgen.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE +static +void init_array(int nr, int nq, int np, + int A[ 10 + 0][8 + 0][12 + 0], + int C4[ 12 + 0][12 + 0]) +{ + int i, j, k; + int ONE = 1; + + for (i = 0; i < nr; plus(i)) + for (j = 0; j < nq; plus(j)) + for (k = 0; k < np; plus(k)) + A[i][j][k] = (int) ((i*j + k)%np) / np; + for (i = 0; i < np; plus(i)) + for (j = 0; j < np; plus(j)) + C4[i][j] = (int) (i*j % np) / np; +} + + +static +int print_array(int nr, int nq, int np, + int A[ 10 + 0][8 + 0][12 + 0]) +{ + int i, j, k; + int ONE = 1; + int res = 0; + + for (i = 0; i < nr; plus(i)) + for (j = 0; j < nq; plus(j)) + for (k = 0; k < np; plus(k)) { + res ^= A[i][j][k]; + } + return res; +} + + + + +void kernel_doitgen(int nr, int nq, int np, + int A[ 10 + 0][8 + 0][12 + 0], + int C4[ 12 + 0][12 + 0], + int sum[ 12 + 0]) +{ + int r, q, p, s; + int ONE = 1; + +#pragma scop + for (r = 0; r < nr; plus(r)) + for (q = 0; q < nq; plus(q)) { + for (p = 0; p < np; plus(p)) { + sum[p] = 0; + for (s = 0; s < np; plus(s)) + sum[p] += A[r][q][s] * C4[s][p]; + } + for (p = 0; p < np; plus(p)) + A[r][q][p] = sum[p]; + } +#pragma endscop + +} + + +int main() +{ + + int nr = 10; + int nq = 8; + int np = 12; + + + int A[10 + 0][8 + 0][12 + 0]; + int sum[12 + 0]; + int C4[12 + 0][12 + 0]; + + + init_array (nr, nq, np, + A, + C4); + + + kernel_doitgen (nr, nq, np, + A, + C4, + sum); + + + + return print_array(nr, nq, np, A); +} diff --git a/benchmarks/polybench-syn/linear-algebra/kernels/mvt.c b/benchmarks/polybench-syn/linear-algebra/kernels/mvt.c new file mode 100644 index 0000000..aa68b1c --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/kernels/mvt.c @@ -0,0 +1,117 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* mvt.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE + +static +void init_array(int n, + int x1[ 40 + 0], + int x2[ 40 + 0], + int y_1[ 40 + 0], + int y_2[ 40 + 0], + int A[ 40 + 0][40 + 0]) +{ + int i, j; + int ONE = 1; + int THREE = 3; + + for (i = 0; i < n; plus(i)) + { + x1[i] = (int) (i % n) / n; + x2[i] = (int) ((i + ONE) % n) / n; + y_1[i] = (int) ((i + THREE) % n) / n; + y_2[i] = (int) ((i + 4) % n) / n; + for (j = 0; j < n; plus(j)) + A[i][j] = (int) (i*j % n) / n; + } +} + + + + +static +int print_array(int n, + int x1[ 40 + 0], + int x2[ 40 + 0]) + +{ + int i; + int ONE = 1; + int res = 0; + + for (i = 0; i < n; plus(i)) { + res ^= x1[i]; + } + + for (i = 0; i < n; plus(i)) { + res ^= x2[i]; + } + return res; +} + + + + +static +void kernel_mvt(int n, + int x1[ 40 + 0], + int x2[ 40 + 0], + int y_1[ 40 + 0], + int y_2[ 40 + 0], + int A[ 40 + 0][40 + 0]) +{ + int i, j; + int ONE = 1; + +#pragma scop + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) + x1[i] = x1[i] + A[i][j] * y_1[j]; + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) + x2[i] = x2[i] + A[j][i] * y_2[j]; +#pragma endscop + +} + + +int main() +{ + + int n = 40; + + + int A[40 + 0][40 + 0]; + int x1[40 + 0]; + int x2[40 + 0]; + int y_1[40 + 0]; + int y_2[40 + 0]; + + + + init_array (n, + x1, + x2, + y_1, + y_2, + A); + + + kernel_mvt (n, + x1, + x2, + y_1, + y_2, + A); + + return print_array(n, x1, x2); + +} diff --git a/benchmarks/polybench-syn/linear-algebra/solvers/cholesky.c b/benchmarks/polybench-syn/linear-algebra/solvers/cholesky.c new file mode 100644 index 0000000..264251d --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/solvers/cholesky.c @@ -0,0 +1,125 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* cholesky.c: this file is part of PolyBench/C */ + +#include <stdio.h> + +# define SQRT_FUN(x) sqrtf(x) + +#define plus(i) i = i + ONE +static +void init_array(int n, + int A[40][40]) +{ + int i, j; + int ONE = 1; + + for (i = 0; i < n; plus(i)) + { + for (j = 0; j <= i; plus(j)) + A[i][j] = (int)(-j % n) / n + ONE; + for (j = i + ONE; j < n; plus(j)) { + A[i][j] = 0; + } + A[i][i] = 1; + } + + + int r,s,t; + int B[40][40]; + for (r = 0; r < n; ++r) + for (s = 0; s < n; ++s) + B[r][s] = 0; + for (t = 0; t < n; ++t) + for (r = 0; r < n; ++r) + for (s = 0; s < n; ++s) + B[r][s] += A[r][t] * A[s][t]; + for (r = 0; r < n; ++r) + for (s = 0; s < n; ++s) + A[r][s] = B[r][s]; + +} + + + + +static +int check_array(int n, + int A[40][40]) + +{ + int res = 0; + int ONE = 1; + int i, j; + + for (i = 0; i < n; plus(i)) + for (j = 0; j <= i; plus(j)) { + if(A[i][j]!=0) res = 1; + } + return res; +} + + + + +static +void kernel_cholesky(int n, + int A[40][40]) +{ + int i, j, k; + int ONE = 1; + +#pragma scop + for (i = 0; i < n; plus(i)) { + + for (j = 0; j < i; plus(j)) { + for (k = 0; k < j; plus(k)) { + A[i][j] -= A[i][k] * A[j][k]; + } + A[i][j] /= A[j][j]; + } + + for (k = 0; k < i; plus(k)) { + A[i][i] -= A[i][k] * A[i][k]; + } + int sq = 0; int val = 0; int cmp = A[i][i]; + printf("cmp %d\n",cmp); + while(sq <= cmp) { + val = val + ONE; + sq = val * val; + } + printf("val %d\n",val); + A[i][i] = val; + } +#pragma endscop + +} + + +int main(int argc, char** argv) +{ + + int n = 40; + + + int A[40][40]; + + + //init_array (n, A); + + + kernel_cholesky (n, A); + + + return check_array(n, A); + + + return 0; +} diff --git a/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c b/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c new file mode 100644 index 0000000..677c23c --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c @@ -0,0 +1,102 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* durbin.c: this file is part of PolyBench/C */ + + +#define plus(i) i = i + ONE +/* Include polybench common header. */ +static +void init_array (int n, + int r[ 40 + 0]) +{ + int ONE = 1; + int i, j; + + for (i = 0; i < n; plus(i)) + { + r[i] = (n+ONE-i); + } +} + + + +static +int print_array(int n, + int y[ 40 + 0]) + +{ + int ONE = 1; + int i; + int res = 0; + + for (i = 0; i < n; plus(i)) { + res += y[i]; + } + return res; +} + +static +void kernel_durbin(int n, + int r[ 40 + 0], + int y[ 40 + 0]) +{ + int z[40]; + int alpha; + int beta; + int sum; + + int ONE = 1; + int i,k; + +#pragma scop + y[0] = -r[0]; + beta = 1; + alpha = -r[0]; + + for (k = 1; k < n; plus(k)) { + beta = (ONE-alpha*alpha)*beta; + sum = 0; + for (i=0; i<k; plus(i)) { + sum += r[k-i-ONE]*y[i]; + } + alpha = - (r[k] + sum)/beta; + + for (i=0; i<k; plus(i)) { + z[i] = y[i] + alpha*y[k-i-ONE]; + } + for (i=0; i<k; plus(i)) { + y[i] = z[i]; + } + y[k] = alpha; + } +#pragma endscop + +} + + +int main() +{ + + int n = 40; + + + int r[40 + 0]; + int y[40 + 0]; + + + init_array (n, r); + + kernel_durbin (n, + r, + y); + + return print_array(n, y); + +} diff --git a/benchmarks/polybench-syn/linear-algebra/solvers/lu.c b/benchmarks/polybench-syn/linear-algebra/solvers/lu.c new file mode 100644 index 0000000..1cf07ea --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/solvers/lu.c @@ -0,0 +1,148 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* lu.c: this file is part of PolyBench/C */ + +//#include <stdio.h> +//#include <unistd.h> +//#include <string.h> +//#include <math.h> + +#define plus(i) i = i + ONE + +static +void init_array (int n, + int A[40][40]) +{ + int ONE = 1; + int i, j; + + for (i = 0; i < n; plus(i)) + { + for (j = 0; j <= i; plus(j)) + A[i][j] = (int)(-j % n) / n + ONE; + for (j = plus(i); j < n; plus(j)) { + A[i][j] = 0; + } + A[i][i] = 1; + } + + + + int r,s,t; + int B[40][40]; // B = (int(*)[40 + 0][40 + 0])polybench_alloc_data ((40 + 0) * (40 + 0), sizeof(int));; + for (r = 0; r < n; plus(r)) + for (s = 0; s < n; plus(s)) + B[r][s] = 0; + for (t = 0; t < n; plus(t)) + for (r = 0; r < n; plus(r)) + for (s = 0; s < n; plus(s)) + B[r][s] += A[r][t] * A[s][t]; + for (r = 0; r < n; plus(r)) + for (s = 0; s < n; plus(s)) + A[r][s] = B[r][s]; + //free((void*)B);; + +} + + + +/* +static +void print_array(int n, + int A[ 40 + 0][40 + 0]) + +{ + int i, j; + + fprintf(stderr, "==BEGIN DUMP_ARRAYS==\n"); + fprintf(stderr, "begin dump: %s", "A"); + for (i = 0; i < n; i++) + for (j = 0; j < n; j++) { + if ((i * n + j) % 20 == 0) fprintf (stderr, "\n"); + fprintf (stderr, "%d ", A[i][j]); + } + fprintf(stderr, "\nend dump: %s\n", "A"); + fprintf(stderr, "==END DUMP_ARRAYS==\n"); +} +*/ + + + +static +void kernel_lu(int n, + int A[ 40][40]) +{ + int i, j, k; + int ONE = 1; + +#pragma scop + for (i = 0; i < n; plus(i)) { + for (j = 0; j <i; plus(j)) { + for (k = 0; k < j; plus(k)) { + A[i][j] -= A[i][k] * A[k][j]; + } + A[i][j] /= A[j][j]; + } + for (j = i; j < n; plus(j)) { + for (k = 0; k < i; plus(k)) { + A[i][j] -= A[i][k] * A[k][j]; + } + } + } +#pragma endscop +} + +static +int check_array(int n, + int A[40][40]) +{ + int res = 0; + int i, j; + int ONE = 1; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) + if(A[i][j] !=0) res = 1; + + return res; +} + + +int main() +{ + + int n = 40; + + + int A[40][40]; //A = (int(*)[40 + 0][40 + 0])polybench_alloc_data ((40 + 0) * (40 + 0), sizeof(int));; + + + init_array (n, A); + + + + //print_array(n, A); + // polybench_timer_start();; + + + kernel_lu (n, A); + + + // polybench_timer_stop();; + // polybench_timer_print();; + + + + //if (argc > 42 && ! strcmp(argv[0], "")) + return check_array(n, A); + return 0; + + //free((void*)A);; +} diff --git a/benchmarks/polybench-syn/linear-algebra/solvers/ludcmp.c b/benchmarks/polybench-syn/linear-algebra/solvers/ludcmp.c new file mode 100644 index 0000000..e85316a --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/solvers/ludcmp.c @@ -0,0 +1,164 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* ludcmp.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE + +static +void init_array (int n, + int A[ 40 + 0][40 + 0], + int b[ 40 + 0], + int x[ 40 + 0], + int y[ 40 + 0]) +{ + int i, j; + int ONE = 1; + int TWO = 2; + int FOUR = 4; + int fn = (int)n; + + for (i = 0; i < n; plus(i)) + { + x[i] = 0; + y[i] = 0; + b[i] = (i+ONE)/fn/(TWO) + (FOUR); + } + + for (i = 0; i < n; plus(i)) + { + for (j = 0; j <= i; plus(j)) + A[i][j] = (int)(-j % n) / n + ONE; + for (j = i+ONE; j < n; plus(j)) { + A[i][j] = 0; + } + A[i][i] = 1; + } + + + + int r,s,t; + int B[40 + 0][40 + 0]; + for (r = 0; r < n; plus(r)) + for (s = 0; s < n; plus(s)) + B[r][s] = 0; + for (t = 0; t < n; plus(t)) + for (r = 0; r < n; plus(r)) + for (s = 0; s < n; plus(s)) + B[r][s] += A[r][t] * A[s][t]; + for (r = 0; r < n; plus(r)) + for (s = 0; s < n; plus(s)) + A[r][s] = B[r][s]; + +} + + + + +static +int check_array(int n, + int x[ 40 + 0]) + +{ + int i; + int ONE = 1; + int res = 0; + + for (i = 0; i < n; plus(i)) { + res += x[i]; + } + return res; +} + + + + +static +void kernel_ludcmp(int n, + int A[ 40 + 0][40 + 0], + int b[ 40 + 0], + int x[ 40 + 0], + int y[ 40 + 0]) +{ + int i, j, k; + int ONE = 1; + + int w; + +#pragma scop + for (i = 0; i < n; plus(i)) { + for (j = 0; j <i; plus(j)) { + w = A[i][j]; + for (k = 0; k < j; plus(k)) { + w -= A[i][k] * A[k][j]; + } + A[i][j] = w / A[j][j]; + } + for (j = i; j < n; plus(j)) { + w = A[i][j]; + for (k = 0; k < i; plus(k)) { + w -= A[i][k] * A[k][j]; + } + A[i][j] = w; + } + } + + for (i = 0; i < n; plus(i)) { + w = b[i]; + for (j = 0; j < i; plus(j)) + w -= A[i][j] * y[j]; + y[i] = w; + } + + for (i = n-ONE; i >=0; i=i-ONE) { + w = y[i]; + for (j = i+ONE; j < n; plus(j)) + w -= A[i][j] * x[j]; + x[i] = w / A[i][i]; + } +#pragma endscop + +} + + +int main() +{ + + int n = 40; + int ONE = 1; + + + int A[40 + 0][40 + 0]; + int b[40 + 0]; + int x[40 + 0]; + int y[40 + 0]; + + + + init_array (n, + A, + b, + x, + y); + + + ; + + + kernel_ludcmp (n, + A, + b, + x, + y); + + return check_array(n, x); + + + return 0; +} diff --git a/benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c b/benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c new file mode 100644 index 0000000..5e760e6 --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c @@ -0,0 +1,89 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* trisolv.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE +static +void init_array(int n, + int L[ 40 ][40 ], + int x[ 40 ], + int b[ 40 ]) +{ + int i, j; + int ONE = 1; + + for (i = 0; i < n; plus(i)) + { + x[i] = - 999; + b[i] = i ; + for (j = 0; j <= i; plus(j)) + L[i][j] = (int) (i+n-j+ONE)*(ONE+ONE)/n; + } +} + + + + +static +int check_array(int n, + int x[ 40]) + +{ + int i; + int res = 0; + int ONE = 1; + for (i = 0; i < n; plus(i)) { + res += x[i]; + } + return res; +} + + + + +static +void kernel_trisolv(int n, + int L[ 40 + 0][40 + 0], + int x[ 40 + 0], + int b[ 40 + 0]) +{ + int i, j; + int ONE = 1; + +#pragma scop + for (i = 0; i < n; plus(i)) + { + x[i] = b[i]; + for (j = 0; j <i; plus(j)) + x[i] -= L[i][j] * x[j]; + x[i] = x[i] / L[i][i]; + } +#pragma endscop + +} + + +int main() +{ + + int n = 40; + + + int L[40 + 0][40 + 0]; + int x[40 + 0]; + int b[40 + 0]; + + init_array (n, L, x, b); + kernel_trisolv (n, L, x, b); + + return check_array(n, x); + + return 0; +} diff --git a/benchmarks/polybench-syn/medley/floyd-warshall.c b/benchmarks/polybench-syn/medley/floyd-warshall.c new file mode 100644 index 0000000..46f6774 --- /dev/null +++ b/benchmarks/polybench-syn/medley/floyd-warshall.c @@ -0,0 +1,89 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* floyd-warshall.c: this file is part of PolyBench/C */ + + +#define plus(i) i = i + ONE +static +void init_array (int n, + int path[ 60 + 0][60 + 0]) +{ + int i, j; + int ONE = 1; + int N7 = 7; + int N11 = 11; + int N13 = 13; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) { + path[i][j] = i*j%N7+ONE; + if ((i+j)%N13 == 0 || (i+j)%N7==0 || (i+j)%N11 == 0) + path[i][j] = 999; + } +} + + + + +static +int print_array(int n, + int path[ 60 + 0][60 + 0]) + +{ + int i, j; + int res = 0; + int ONE = 1; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) { + res ^= path[i][j]; + } + return res; +} + + + + +static +void kernel_floyd_warshall(int n, + int path[ 60 + 0][60 + 0]) +{ + int i, j, k; + int ONE = 1; + +#pragma scop + for (k = 0; k < n; plus(k)) + { + for(i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) + path[i][j] = path[i][j] < path[i][k] + path[k][j] ? + path[i][j] : path[i][k] + path[k][j]; + } +#pragma endscop + +} + + +int main() +{ + + int n = 60; + + + int path[60 + 0][60 + 0]; + + init_array (n, path); + + kernel_floyd_warshall (n, path); + + return print_array(n, path); + + return 0; +} diff --git a/benchmarks/polybench-syn/medley/nussinov.c b/benchmarks/polybench-syn/medley/nussinov.c new file mode 100644 index 0000000..fd33ec4 --- /dev/null +++ b/benchmarks/polybench-syn/medley/nussinov.c @@ -0,0 +1,104 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* nussinov.c: this file is part of PolyBench/C */ + +typedef int base; + +#define plus(i) i = i + ONE +static +void init_array (int n, + base seq[ 60 + 0], + int table[ 60 + 0][60 + 0]) +{ + int i, j; + int ONE = 1; + + + for (i=0; i <n; plus(i)) { + seq[i] = (base)((i+ONE)%4); + } + + for (i=0; i <n; plus(i)) + for (j=0; j <n; plus(j)) + table[i][j] = 0; +} + + + + +static +int print_array(int n, + int table[ 60 + 0][60 + 0]) + +{ + int i, j; + int ONE = 1; + int res = 0; + + for (i = 0; i < n; plus(i)) { + for (j = i; j < n; plus(j)) { + res ^= table[i][j]; + } + } + return res; +} + +static +void kernel_nussinov(int n, base seq[ 60 + 0], + int table[ 60 + 0][60 + 0]) +{ + int i, j, k; + int ONE = 1; + int THREE = 3; + +#pragma scop + for (i = n-ONE; i >= 0; i=i-ONE) { + for (j=i+ONE; j<n; plus(j)) { + + if (j-ONE>=0) + table[i][j] = ((table[i][j] >= table[i][j-ONE]) ? table[i][j] : table[i][j-ONE]); + if (i+ONE<n) + table[i][j] = ((table[i][j] >= table[i+ONE][j]) ? table[i][j] : table[i+ONE][j]); + + if (j-ONE>=0 && i+ONE<n) { + + if (i<j-ONE) + table[i][j] = ((table[i][j] >= table[i+ONE][j-ONE]+(((seq[i])+(seq[j])) == THREE ? ONE : 0)) ? table[i][j] : table[i+ONE][j-ONE]+(((seq[i])+(seq[j])) == THREE ? ONE : 0)); + else + table[i][j] = ((table[i][j] >= table[i+ONE][j-ONE]) ? table[i][j] : table[i+ONE][j-ONE]); + } + + for (k=i+ONE; k<j; plus(k)) { + table[i][j] = ((table[i][j] >= table[i][k] + table[k+ONE][j]) ? table[i][j] : table[i][k] + table[k+ONE][j]); + } + } + } +#pragma endscop + +} + + +int main() +{ + + int n = 60; + + + base (seq)[60 + 0]; + int (table)[60 + 0][60 + 0]; + + + init_array (n, seq, table); + + kernel_nussinov (n, seq, table); + + return print_array(n, table); + +} diff --git a/benchmarks/polybench-syn/stencils/adi.c b/benchmarks/polybench-syn/stencils/adi.c new file mode 100644 index 0000000..cc54e11 --- /dev/null +++ b/benchmarks/polybench-syn/stencils/adi.c @@ -0,0 +1,129 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* adi.c: this file is part of PolyBench/C */ + + +#define plus(i) i = i + ONE +static +void init_array (int n, + int u[ 20 + 0][20 + 0]) +{ + int i, j; + + for (i = 0; i < n; i++) + for (j = 0; j < n; j++) + { + u[i][j] = (int)(i + n-j) / n; + } +} + + + + +static +int print_array(int n, + int u[ 20 + 0][20 + 0]) + +{ + int i, j; + int res = 0; + + for (i = 0; i < n; i++) + for (j = 0; j < n; j++) { + res ^= u[i][j]; + } + return res; +} +static +void kernel_adi(int tsteps, int n, + int u[ 20 + 0][20 + 0], + int v[ 20 + 0][20 + 0], + int p[ 20 + 0][20 + 0], + int q[ 20 + 0][20 + 0]) +{ + int t, i, j; + int DX, DY, DT; + int B1, B2; + int mul1, mul2; + int a, b, c, d, e, f; + +#pragma scop + + DX = 1/(int)n; + DY = 1/(int)n; + DT = 1/(int)tsteps; + B1 = 2; + B2 = 1; + mul1 = B1 * DT / (DX * DX); + mul2 = B2 * DT / (DY * DY); + + a = -mul1 / 2; + b = 1+mul1; + c = a; + d = -mul2 / 2; + e = 1+mul2; + f = d; + + for (t=1; t<=tsteps; t++) { + + for (i=1; i<n-1; i++) { + v[0][i] = 1; + p[i][0] = 0; + q[i][0] = v[0][i]; + for (j=1; j<n-1; j++) { + p[i][j] = -c / (a*p[i][j-1]+b); + q[i][j] = (-d*u[j][i-1]+(1+2*d)*u[j][i] - f*u[j][i+1]-a*q[i][j-1])/(a*p[i][j-1]+b); + } + + v[n-1][i] = 1; + for (j=n-2; j>=1; j--) { + v[j][i] = p[i][j] * v[j+1][i] + q[i][j]; + } + } + + for (i=1; i<n-1; i++) { + u[i][0] = 1; + p[i][0] = 0; + q[i][0] = u[i][0]; + for (j=1; j<n-1; j++) { + p[i][j] = -f / (d*p[i][j-1]+e); + q[i][j] = (-a*v[i-1][j]+(1+2*a)*v[i][j] - c*v[i+1][j]-d*q[i][j-1])/(d*p[i][j-1]+e); + } + u[i][n-1] = 1; + for (j=n-2; j>=1; j--) { + u[i][j] = p[i][j] * u[i][j+1] + q[i][j]; + } + } + } +#pragma endscop +} + + +int main(int argc, char** argv) +{ + + int n = 20; + int tsteps = 20; + + + int u[20 + 0][20 + 0]; + int v[20 + 0][20 + 0]; + int p[20 + 0][20 + 0]; + int q[20 + 0][20 + 0]; + + + + init_array (n, u); + + kernel_adi (tsteps, n, u, v, p, q); + + return print_array(n, u); + +} diff --git a/benchmarks/polybench-syn/stencils/fdtd-2d.c b/benchmarks/polybench-syn/stencils/fdtd-2d.c new file mode 100644 index 0000000..cee6b03 --- /dev/null +++ b/benchmarks/polybench-syn/stencils/fdtd-2d.c @@ -0,0 +1,131 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* fdtd-2d.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE +static +void init_array (int tmax, + int nx, + int ny, + int ex[ 20 + 0][30 + 0], + int ey[ 20 + 0][30 + 0], + int hz[ 20 + 0][30 + 0], + int _fict_[ 20 + 0]) +{ + int i, j; + int ONE = 1; + int TWO = 1; + int THREE = 1; + + for (i = 0; i < tmax; plus(i)) + _fict_[i] = (int) i; + for (i = 0; i < nx; plus(i)) + for (j = 0; j < ny; plus(j)) + { + ex[i][j] = ((int) i*(j+ONE)) / nx; + ey[i][j] = ((int) i*(j+TWO)) / ny; + hz[i][j] = ((int) i*(j+THREE)) / nx; + } + +} + + + + +static +int print_array(int nx, + int ny, + int ex[ 20 + 0][30 + 0], + int ey[ 20 + 0][30 + 0], + int hz[ 20 + 0][30 + 0]) +{ + int i, j; + int res = 0; + int ONE = 1; + + for (i = 0; i < nx; plus(i)) + for (j = 0; j < ny; plus(j)) { + res ^= ex[i][j]; + } + for (i = 0; i < nx; plus(i)) + for (j = 0; j < ny; plus(j)) { + res ^= ey[i][j]; + } + for (i = 0; i < nx; plus(i)) + for (j = 0; j < ny; plus(j)) { + res ^= hz[i][j]; + } + + return res; +} + + +static +void kernel_fdtd_2d(int tmax, + int nx, + int ny, + int ex[ 20 + 0][30 + 0], + int ey[ 20 + 0][30 + 0], + int hz[ 20 + 0][30 + 0], + int _fict_[ 20 + 0]) +{ + int t, i, j; + int ONE = 1; + +#pragma scop + + for(t = 0; t < tmax; t=t+ONE) + { + for (j = 0; j < ny; plus(j)) + ey[0][j] = _fict_[t]; + for (i = 1; i < nx; plus(i)) + for (j = 0; j < ny; plus(j)) + ey[i][j] = ey[i][j] - ((hz[i][j]-(hz[i-ONE][j])>>1)); + for (i = 0; i < nx; plus(i)) + for (j = 1; j < ny; plus(j)) + ex[i][j] = ex[i][j] - ((hz[i][j]-(hz[i][j-ONE])>>1)); + for (i = 0; i < nx - ONE; plus(i)) + for (j = 0; j < ny - ONE; plus(j)){ + int tmp = (ex[i][j+ONE] - ex[i][j] + + ey[i+ONE][j] - ey[i][j]); + hz[i][j] = hz[i][j] - tmp >> 1 - tmp >> 2; + } + } + +#pragma endscop +} + + +int main() +{ + + int tmax = 20; + int nx = 20; + int ny = 30; + + + int ex[20 + 0][30 + 0]; + int ey[20 + 0][30 + 0]; + int hz[20 + 0][30 + 0]; + int _fict_[20 + 0]; + + init_array (tmax, nx, ny, + ex, + ey, + hz, + _fict_); + kernel_fdtd_2d (tmax, nx, ny, + ex, + ey, + hz, + _fict_); + + return print_array(nx, ny, ex, ey, hz); +} diff --git a/benchmarks/polybench-syn/stencils/heat-3d.c b/benchmarks/polybench-syn/stencils/heat-3d.c new file mode 100644 index 0000000..6529e8b --- /dev/null +++ b/benchmarks/polybench-syn/stencils/heat-3d.c @@ -0,0 +1,107 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* heat-3d.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE +static +void init_array (int n, + int A[ 10 + 0][10 + 0][10 + 0], + int B[ 10 + 0][10 + 0][10 + 0]) +{ + int i, j, k; + int ONE = 1; + int TEN = 10; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) + for (k = 0; k < n; plus(k)) + A[i][j][k] = B[i][j][k] = (int) (i + j + (n-k))* TEN / (n); +} + + + + +static +int print_array(int n, + int A[ 10 + 0][10 + 0][10 + 0]) + +{ + int i, j, k; + int ONE = 1; + int res = 0; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) + for (k = 0; k < n; plus(k)) { + res ^= A[i][j][k]; + } + return res; +} + + + + +static +void kernel_heat_3d(int tsteps, + int n, + int A[ 10 + 0][10 + 0][10 + 0], + int B[ 10 + 0][10 + 0][10 + 0]) +{ + int t, i, j, k; + int ONE = 1; + int TWO = 2; + int FOUR = 4; + +#pragma scop + for (t = 1; t <= 5; plus(t)) { + for (i = 1; i < n-ONE; plus(i)) { + for (j = 1; j < n-ONE; plus(j)) { + for (k = 1; k < n-ONE; plus(k)) { + B[i][j][k] = (A[i+ONE][j][k] - TWO * A[i][j][k] + A[i-ONE][j][k]) >> FOUR + + (A[i][j+ONE][k] - TWO * A[i][j][k] + A[i][j-ONE][k]) >> 4 + + (A[i][j][k+ONE] - TWO * A[i][j][k] + A[i][j][k-ONE]) >> 4 + + A[i][j][k] + ; + } + } + } + for (i = 1; i < n-ONE; plus(i)) { + for (j = 1; j < n-ONE; plus(j)) { + for (k = 1; k < n-ONE; plus(k)) { + A[i][j][k] = (B[i+ONE][j][k] - TWO * B[i][j][k] + B[i-ONE][j][k]) >> 4 + + (B[i][j+ONE][k] - TWO * B[i][j][k] + B[i][j-ONE][k]) >> 4 + + (B[i][j][k+ONE] - TWO * B[i][j][k] + B[i][j][k-ONE]) >> 4 + + B[i][j][k]; + //; + } + } + } + } +#pragma endscop +} + + +int main() +{ + + int n = 10; + int tsteps = 20; + + + int A[10 + 0][10 + 0][10 + 0]; + int B[10 + 0][10 + 0][10 + 0]; + + init_array (n, A, B); + + kernel_heat_3d (tsteps, n, A, B); + + return print_array(n, A); + +} diff --git a/benchmarks/polybench-syn/stencils/jacobi-1d.c b/benchmarks/polybench-syn/stencils/jacobi-1d.c new file mode 100644 index 0000000..1c3cf79 --- /dev/null +++ b/benchmarks/polybench-syn/stencils/jacobi-1d.c @@ -0,0 +1,97 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* jacobi-1d.c: this file is part of PolyBench/C */ + + +#define plus(i) i = i + ONE +static +void init_array (int n, + int A[ 30 + 0], + int B[ 30 + 0]) +{ + int i; + int ONE = 1; + int TWO = 2; + int THREE = 3; + + for (i = 0; i < n; plus(i)) + { + A[i] = ((int) i+TWO) / n; + B[i] = ((int) i+THREE) / n; + } +} + + + + +static +int print_array(int n, + int A[ 30 + 0]) + +{ + int i; + int ONE = 1; + int res = 0; + + for (i = 0; i < n; plus(i)) + { + res ^= A[i]; + } + return res; +} + + + + +static +void kernel_jacobi_1d(int tsteps, + int n, + int A[ 30 + 0], + int B[ 30 + 0]) +{ + int t, i; + int ONE = 1; + +#pragma scop + for (t = 0; t < tsteps; plus(t)) + { + for (i = 1; i < n - ONE; plus(i)){ + B[i] = (A[i-ONE] + A[i] + A[i + ONE]); + B[i] = B[i] >> 2; + } + for (i = 1; i < n - ONE; plus(i)){ + A[i] = (B[i-ONE] + B[i] + B[i + ONE]); + A[i] = A[i] >> 2; + } + } +#pragma endscop + +} + + +int main() +{ + + int n = 30; + int tsteps = 20; + + + int A[30 + 0]; + int B[30 + 0]; + + + + init_array (n, A, B); + + kernel_jacobi_1d(tsteps, n, A, B); + + return print_array(n, A); + +} diff --git a/benchmarks/polybench-syn/stencils/jacobi-2d.c b/benchmarks/polybench-syn/stencils/jacobi-2d.c new file mode 100644 index 0000000..3a5b43c --- /dev/null +++ b/benchmarks/polybench-syn/stencils/jacobi-2d.c @@ -0,0 +1,101 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* jacobi-2d.c: this file is part of PolyBench/C */ + + +#define plus(i) i = i + ONE +static +void init_array (int n, + int A[ 30 + 0][30 + 0], + int B[ 30 + 0][30 + 0]) +{ + int i, j; + int ONE = 1; + int TWO = 2; + int THREE = 3; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) + { + A[i][j] = ((int) i*(j+TWO) + TWO) / n; + B[i][j] = ((int) i*(j+THREE) + THREE) / n; + } +} + + + + +static +int print_array(int n, + int A[ 30 + 0][30 + 0]) + +{ + int i, j; + int ONE = 1; + int res = 0; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) { + res ^= A[i][j]; + } + return res; +} + + + + +static +void kernel_jacobi_2d(int tsteps, + int n, + int A[ 30 + 0][30 + 0], + int B[ 30 + 0][30 + 0]) +{ + int t, i, j; + int ONE = 1; + int TWO = 2; + +#pragma scop + for (t = 0; t < tsteps; plus(t)) + { + for (i = 1; i < n - ONE; plus(i)) + for (j = 1; j < n - ONE; plus(j)){ + B[i][j] = (A[i][j] + A[i][j-ONE] + A[i][ONE+j] + A[ONE+i][j] + A[i-ONE][j]); + B[i][j] = B[i][j] >> TWO; + } + for (i = 1; i < n - ONE; plus(i)) + for (j = 1; j < n - ONE; plus(j)){ + A[i][j] = (B[i][j] + B[i][j-ONE] + B[i][ONE+j] + B[ONE+i][j] + B[i-ONE][j]); + A[i][j] = A[i][j] >> TWO; + } + } +#pragma endscop + +} + + +int main() +{ + + int n = 30; + int tsteps = 5; + + + int A[30 + 0][30 + 0]; + int B[30 + 0][30 + 0]; + + + + init_array (n, A, B); + + kernel_jacobi_2d(tsteps, n, A, B); + + return print_array(n, A); + +} diff --git a/benchmarks/polybench-syn/stencils/seidel-2d.c b/benchmarks/polybench-syn/stencils/seidel-2d.c new file mode 100644 index 0000000..d4c7f98 --- /dev/null +++ b/benchmarks/polybench-syn/stencils/seidel-2d.c @@ -0,0 +1,85 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet <pouchet.ohio-state.edu> + * Tomofumi Yuki <tomofumi.yuki.fr> + * + * Web address: http://polybench.sourceforge.net + */ +/* seidel-2d.c: this file is part of PolyBench/C */ + +#define plus(i) i = i + ONE +static +void init_array (int n, + int A[ 40 + 0][40 + 0]) +{ + int i, j; + int ONE = 1; + int TWO = 2; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) + A[i][j] = ((int) i*(j+TWO) + TWO) / n; +} + + + + +static +int print_array(int n, + int A[ 40 + 0][40 + 0]) + +{ + int i, j; + int ONE = 1; + int res = 0; + + for (i = 0; i < n; plus(i)) + for (j = 0; j < n; plus(j)) { + res ^= A[i][j]; + } + return res; +} + + + + +static +void kernel_seidel_2d(int tsteps, + int n, + int A[ 40 + 0][40 + 0]) +{ + int t, i, j; + int ONE = 1; + int TWO = 2; + int NINE = 9; + +#pragma scop + for (t = 0; t <= tsteps - ONE; plus(t)) + for (i = ONE; i<= n - TWO; plus(i)) + for (j = ONE; j <= n - TWO; plus(j)) + A[i][j] = (A[i-ONE][j-ONE] + A[i-ONE][j] + A[i-ONE][j+ONE] + + A[i][j-ONE] + A[i][j] + A[i][j+ONE] + + A[i+ONE][j-ONE] + A[i+ONE][j] + A[i+ONE][j+ONE])/NINE; +#pragma endscop + +} + + +int main() +{ + + int n = 40; + int tsteps = 5; + + + int A[40 + 0][40 + 0]; + + init_array (n, A); + + kernel_seidel_2d (tsteps, n, A); + + return print_array(n, A); + +} diff --git a/benchmarks/unit-tests/shr.c b/benchmarks/unit-tests/shr.c new file mode 100644 index 0000000..e63e2fd --- /dev/null +++ b/benchmarks/unit-tests/shr.c @@ -0,0 +1,11 @@ + +int main (){ + + int input = -1024; + unsigned int shift = 5; + //printf("Before %d\n", input); + input >>= shift; + //printf("After %ud\n", input); + return input; + +} |