aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-06-19 11:17:51 +0100
committerYann Herklotz <git@yannherklotz.com>2020-06-19 11:17:51 +0100
commit04dcea14217395ee09915aafb4532a6dd495fa53 (patch)
tree92f8b63f62e8a2c77748110a89b9e22a6f7b888c
parent63e84ca844c04562e05c1aae2606526d7288675f (diff)
downloadvericert-04dcea14217395ee09915aafb4532a6dd495fa53.tar.gz
vericert-04dcea14217395ee09915aafb4532a6dd495fa53.zip
Add CHstone
-rw-r--r--benchmarks/CHStone/.DS_Storebin0 -> 6148 bytes
-rwxr-xr-xbenchmarks/CHStone/adpcm/adpcm.c882
-rwxr-xr-xbenchmarks/CHStone/aes/aes.c129
-rwxr-xr-xbenchmarks/CHStone/aes/aes.h83
-rwxr-xr-xbenchmarks/CHStone/aes/aes_dec.c136
-rwxr-xr-xbenchmarks/CHStone/aes/aes_enc.c130
-rwxr-xr-xbenchmarks/CHStone/aes/aes_func.c542
-rwxr-xr-xbenchmarks/CHStone/aes/aes_key.c163
-rwxr-xr-xbenchmarks/CHStone/blowfish/bf.c866
-rwxr-xr-xbenchmarks/CHStone/blowfish/bf_cfb64.c151
-rwxr-xr-xbenchmarks/CHStone/blowfish/bf_enc.c137
-rwxr-xr-xbenchmarks/CHStone/blowfish/bf_locl.h104
-rwxr-xr-xbenchmarks/CHStone/blowfish/bf_pi.h341
-rwxr-xr-xbenchmarks/CHStone/blowfish/bf_skey.c151
-rwxr-xr-xbenchmarks/CHStone/blowfish/blowfish.h97
-rwxr-xr-xbenchmarks/CHStone/dfadd/SPARC-GCC.h88
-rwxr-xr-xbenchmarks/CHStone/dfadd/dfadd.c230
-rwxr-xr-xbenchmarks/CHStone/dfadd/milieu.h53
-rwxr-xr-xbenchmarks/CHStone/dfadd/softfloat-macros146
-rwxr-xr-xbenchmarks/CHStone/dfadd/softfloat-specialize123
-rwxr-xr-xbenchmarks/CHStone/dfadd/softfloat.c417
-rwxr-xr-xbenchmarks/CHStone/dfadd/softfloat.h77
-rwxr-xr-xbenchmarks/CHStone/dfdiv/SPARC-GCC.h88
-rwxr-xr-xbenchmarks/CHStone/dfdiv/dfdiv.c159
-rwxr-xr-xbenchmarks/CHStone/dfdiv/milieu.h53
-rwxr-xr-xbenchmarks/CHStone/dfdiv/softfloat-macros247
-rwxr-xr-xbenchmarks/CHStone/dfdiv/softfloat-specialize123
-rwxr-xr-xbenchmarks/CHStone/dfdiv/softfloat.c316
-rwxr-xr-xbenchmarks/CHStone/dfdiv/softfloat.h77
-rwxr-xr-xbenchmarks/CHStone/dfmul/SPARC-GCC.h88
-rwxr-xr-xbenchmarks/CHStone/dfmul/dfmul.c152
-rwxr-xr-xbenchmarks/CHStone/dfmul/milieu.h53
-rwxr-xr-xbenchmarks/CHStone/dfmul/softfloat-macros176
-rwxr-xr-xbenchmarks/CHStone/dfmul/softfloat-specialize122
-rwxr-xr-xbenchmarks/CHStone/dfmul/softfloat.c300
-rwxr-xr-xbenchmarks/CHStone/dfmul/softfloat.h77
-rwxr-xr-xbenchmarks/CHStone/dfsin/SPARC-GCC.h90
-rwxr-xr-xbenchmarks/CHStone/dfsin/dfsin.c185
-rwxr-xr-xbenchmarks/CHStone/dfsin/milieu.h53
-rwxr-xr-xbenchmarks/CHStone/dfsin/softfloat-macros299
-rwxr-xr-xbenchmarks/CHStone/dfsin/softfloat-specialize122
-rwxr-xr-xbenchmarks/CHStone/dfsin/softfloat.c650
-rwxr-xr-xbenchmarks/CHStone/dfsin/softfloat.h77
-rwxr-xr-xbenchmarks/CHStone/gsm/add.c158
-rwxr-xr-xbenchmarks/CHStone/gsm/gsm.c110
-rwxr-xr-xbenchmarks/CHStone/gsm/lpc.c323
-rwxr-xr-xbenchmarks/CHStone/gsm/private.h43
-rwxr-xr-xbenchmarks/CHStone/jpeg/chenidct.c231
-rwxr-xr-xbenchmarks/CHStone/jpeg/decode.c464
-rwxr-xr-xbenchmarks/CHStone/jpeg/decode.h108
-rwxr-xr-xbenchmarks/CHStone/jpeg/global.h59
-rwxr-xr-xbenchmarks/CHStone/jpeg/huffman.c349
-rwxr-xr-xbenchmarks/CHStone/jpeg/huffman.h39
-rwxr-xr-xbenchmarks/CHStone/jpeg/init.h1264
-rwxr-xr-xbenchmarks/CHStone/jpeg/jfif_read.c109
-rwxr-xr-xbenchmarks/CHStone/jpeg/jpeg2bmp.c87
-rwxr-xr-xbenchmarks/CHStone/jpeg/main.c60
-rwxr-xr-xbenchmarks/CHStone/jpeg/marker.c612
-rwxr-xr-xbenchmarks/CHStone/mips/imem.h82
-rwxr-xr-xbenchmarks/CHStone/mips/mips.c306
-rwxr-xr-xbenchmarks/CHStone/motion/config.h51
-rwxr-xr-xbenchmarks/CHStone/motion/getbits.c199
-rwxr-xr-xbenchmarks/CHStone/motion/getvlc.c94
-rwxr-xr-xbenchmarks/CHStone/motion/getvlc.h73
-rwxr-xr-xbenchmarks/CHStone/motion/global.h80
-rwxr-xr-xbenchmarks/CHStone/motion/motion.c172
-rwxr-xr-xbenchmarks/CHStone/motion/mpeg2.c395
-rwxr-xr-xbenchmarks/CHStone/motion/mpeg2dec.h53
-rwxr-xr-xbenchmarks/CHStone/sha/sha.c217
-rwxr-xr-xbenchmarks/CHStone/sha/sha.h1137
-rwxr-xr-xbenchmarks/CHStone/sha/sha_driver.c56
-rw-r--r--test/matrix.c2
72 files changed, 15485 insertions, 1 deletions
diff --git a/benchmarks/CHStone/.DS_Store b/benchmarks/CHStone/.DS_Store
new file mode 100644
index 0000000..2c999f0
--- /dev/null
+++ b/benchmarks/CHStone/.DS_Store
Binary files differ
diff --git a/benchmarks/CHStone/adpcm/adpcm.c b/benchmarks/CHStone/adpcm/adpcm.c
new file mode 100755
index 0000000..613b1bd
--- /dev/null
+++ b/benchmarks/CHStone/adpcm/adpcm.c
@@ -0,0 +1,882 @@
+/*
++--------------------------------------------------------------------------+
+| 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 */
+/* ===================================================== */
+/* Collected and Modified by S.-S. Lim */
+/* sslim@archi.snu.ac.kr */
+/* Real-Time Research Group */
+/* Seoul National University */
+/* */
+/* */
+/* < Features > - restrictions for our experimental environment */
+/* */
+/* 1. Completely structured. */
+/* - There are no unconditional jumps. */
+/* - There are no exit from loop bodies. */
+/* (There are no 'break' or 'return' in loop bodies) */
+/* 2. No 'switch' statements. */
+/* 3. No 'do..while' statements. */
+/* 4. Expressions are restricted. */
+/* - There are no multiple expressions joined by 'or', */
+/* 'and' operations. */
+/* 5. No library calls. */
+/* - All the functions needed are implemented in the */
+/* source file. */
+/* */
+/* */
+/*************************************************************************/
+/* */
+/* FILE: adpcm.c */
+/* SOURCE : C Algorithms for Real-Time DSP by P. M. Embree */
+/* */
+/* DESCRIPTION : */
+/* */
+/* CCITT G.722 ADPCM (Adaptive Differential Pulse Code Modulation) */
+/* algorithm. */
+/* 16khz sample rate data is stored in the array test_data[SIZE]. */
+/* Results are stored in the array compressed[SIZE] and result[SIZE].*/
+/* Execution time is determined by the constant SIZE (default value */
+/* is 2000). */
+/* */
+/* REMARK : */
+/* */
+/* EXECUTION TIME : */
+/* */
+/* */
+/*************************************************************************/
+#include <stdio.h>
+
+int encode (int, int);
+void decode (int);
+int filtez (int *bpl, int *dlt);
+void upzero (int dlt, int *dlti, int *bli);
+int filtep (int rlt1, int al1, int rlt2, int al2);
+int quantl (int el, int detl);
+int logscl (int il, int nbl);
+int scalel (int nbl, int shift_constant);
+int uppol2 (int al1, int al2, int plt, int plt1, int plt2);
+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
+abs (int n)
+{
+ int m;
+
+ if (n >= 0)
+ m = n;
+ else
+ m = -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
+filtez (int *bpl, int *dlt)
+{
+ int i;
+ long int zl;
+ zl = (long) (*bpl++) * (*dlt++);
+ for (i = 1; i < 6; i++)
+ zl += (long) (*bpl++) * (*dlt++);
+
+ return ((int) (zl >> 14)); /* x2 here */
+}
+
+/* filtep - compute predictor output signal (pole section) */
+/* input rlt1-2 and al1-2, output spl */
+
+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;
+ return ((int) (pl >> 15));
+}
+
+/* quantl - quantize the difference signal in the lower sub-band */
+int
+quantl (int el, int detl)
+{
+ int ril, mil;
+ long int wd, decis;
+
+/* abs of difference signal */
+ wd = abs (el);
+/* 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 */
+ if (el >= 0)
+ ril = quant26bt_pos[mil];
+ else
+ ril = quant26bt_neg[mil];
+ return (ril);
+}
+
+/* logscl - update log quantizer scale factor in lower sub-band */
+/* note that nbl is passed and returned */
+
+int
+logscl (int il, int nbl)
+{
+ long int wd;
+ wd = ((long) nbl * 127L) >> 7L; /* leak factor 127/128 */
+ nbl = (int) wd + wl_code_table[il >> 2];
+ if (nbl < 0)
+ nbl = 0;
+ if (nbl > 18432)
+ nbl = 18432;
+ return (nbl);
+}
+
+/* scalel: compute quantizer scale factor in lower or upper sub-band*/
+
+int
+scalel (int nbl, int shift_constant)
+{
+ int wd1, wd2, wd3;
+ wd1 = (nbl >> 6) & 31;
+ wd2 = nbl >> 11;
+ wd3 = ilb_table[wd1] >> (shift_constant + 1 - wd2);
+ return (wd3 << 3);
+}
+
+/* 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
+upzero (int dlt, int *dlti, int *bli)
+{
+ int i, wd2, wd3;
+/*if dlt is zero, then no sum into bli */
+ if (dlt == 0)
+ {
+ for (i = 0; i < 6; i++)
+ {
+ bli[i] = (int) ((255L * bli[i]) >> 8L); /* leak factor of 255/256 */
+ }
+ }
+ else
+ {
+ 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;
+ }
+ }
+/* implement delay line for dlt */
+ dlti[5] = dlti[4];
+ dlti[4] = dlti[3];
+ dlti[3] = dlti[2];
+ dlti[2] = dlti[1];
+ dlti[1] = dlti[0];
+ dlti[0] = dlt;
+}
+
+/* uppol2 - update second predictor coefficient (pole section) */
+/* inputs: al1, al2, plt, plt1, plt2. outputs: apl2 */
+
+int
+uppol2 (int al1, int al2, int plt, int plt1, int plt2)
+{
+ long int wd2, wd4;
+ int apl2;
+ wd2 = 4L * (long) al1;
+ if ((long) 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 */
+ }
+ else
+ {
+ wd4 = wd2 - 128;
+ }
+ apl2 = wd4 + (127L * (long) al2 >> 7L); /* leak factor of 127/128 */
+
+/* apl2 is limited to +-.75 */
+ if (apl2 > 12288)
+ apl2 = 12288;
+ if (apl2 < -12288)
+ apl2 = -12288;
+ return (apl2);
+}
+
+/* uppol1 - update first predictor coefficient (pole section) */
+/* inputs: al1, apl2, plt, plt1. outputs: apl1 */
+
+int
+uppol1 (int al1, int apl2, int plt, int plt1)
+{
+ long 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 */
+ }
+ else
+ {
+ apl1 = (int) wd2 - 192;
+ }
+/* note: wd3= .9375-.75 is always positive */
+ wd3 = 15360 - apl2; /* limit value */
+ if (apl1 > wd3)
+ apl1 = wd3;
+ if (apl1 < -wd3)
+ apl1 = -wd3;
+ return (apl1);
+}
+
+/* logsch - update log quantizer scale factor in higher sub-band */
+/* note that nbh is passed and returned */
+
+int
+logsch (int ih, int nbh)
+{
+ int wd;
+ wd = ((long) nbh * 127L) >> 7L; /* leak factor 127/128 */
+ nbh = wd + wh_code_table[ih];
+ if (nbh < 0)
+ nbh = 0;
+ if (nbh > 22528)
+ nbh = 22528;
+ return (nbh);
+}
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) |
+| test_data : input data |
+| test_compressed : expected output data for "encode" |
+| test_result : expected output data for "decode" |
++--------------------------------------------------------------------------+
+*/
+
+#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 ()
+{
+ int i, j;
+
+/* reset, initialize required memory */
+ reset ();
+
+ j = 10;
+
+ for (i = 0; i < IN_END; i += 2)
+ {
+ compressed[i / 2] = encode (test_data[i], test_data[i + 1]);
+ }
+ for (i = 0; i < IN_END; i += 2)
+ {
+ decode (compressed[i / 2]);
+ result[i] = xout1;
+ result[i + 1] = xout2;
+ }
+}
+
+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;
+ }
diff --git a/benchmarks/CHStone/aes/aes.c b/benchmarks/CHStone/aes/aes.c
new file mode 100755
index 0000000..a0cdf2d
--- /dev/null
+++ b/benchmarks/CHStone/aes/aes.c
@@ -0,0 +1,129 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* aes.c */
+/*
+ * Copyright (C) 2005
+ * Akira Iwata & Masayuki Sato
+ * Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan.
+ *
+ * All rights reserved.
+ *
+ * This software is written by Masayuki Sato.
+ * And if you want to contact us, send an email to Kimitake Wakayama
+ * (wakayama@elcom.nitech.ac.jp)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software must
+ * display the following acknowledgment:
+ * "This product includes software developed by Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * AKIRA IWATA LABORATORY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL AKIRA IWATA LABORATORY BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+#include <stdio.h>
+
+
+int main_result;
+
+#include "aes.h"
+#include "aes_enc.c"
+#include "aes_dec.c"
+#include "aes_key.c"
+#include "aes_func.c"
+
+/* ***************** main **************************** */
+int
+aes_main (void)
+{
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) |
+| statemt, key : input data |
++--------------------------------------------------------------------------+
+*/
+ statemt[0] = 50;
+ statemt[1] = 67;
+ statemt[2] = 246;
+ statemt[3] = 168;
+ statemt[4] = 136;
+ statemt[5] = 90;
+ statemt[6] = 48;
+ statemt[7] = 141;
+ statemt[8] = 49;
+ statemt[9] = 49;
+ statemt[10] = 152;
+ statemt[11] = 162;
+ statemt[12] = 224;
+ statemt[13] = 55;
+ statemt[14] = 7;
+ statemt[15] = 52;
+
+ key[0] = 43;
+ key[1] = 126;
+ key[2] = 21;
+ key[3] = 22;
+ key[4] = 40;
+ key[5] = 174;
+ key[6] = 210;
+ key[7] = 166;
+ key[8] = 171;
+ key[9] = 247;
+ key[10] = 21;
+ key[11] = 136;
+ key[12] = 9;
+ key[13] = 207;
+ key[14] = 79;
+ key[15] = 60;
+
+ encrypt (statemt, key, 128128);
+ decrypt (statemt, key, 128128);
+ return 0;
+}
+
+int
+main ()
+{
+ main_result = 0;
+ aes_main ();
+ printf ("\n%d\n", main_result);
+ return main_result;
+ }
diff --git a/benchmarks/CHStone/aes/aes.h b/benchmarks/CHStone/aes/aes.h
new file mode 100755
index 0000000..792d08f
--- /dev/null
+++ b/benchmarks/CHStone/aes/aes.h
@@ -0,0 +1,83 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* aes.h */
+/*
+ * Copyright (C) 2005
+ * Akira Iwata & Masayuki Sato
+ * Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan.
+ *
+ * All rights reserved.
+ *
+ * This software is written by Masayuki Sato.
+ * And if you want to contact us, send an email to Kimitake Wakayama
+ * (wakayama@elcom.nitech.ac.jp)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software must
+ * display the following acknowledgment:
+ * "This product includes software developed by Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * AKIRA IWATA LABORATORY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL AKIRA IWATA LABORATORY BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* ************* data type define ************************* */
+int type;
+int nb;
+int round_val;
+int key[32];
+int statemt[32];
+int word[4][120];
+
+
+/* key generate */
+int KeySchedule (int, int *);
+int SubByte (int);
+
+/* encrypto decrypto */
+void ByteSub_ShiftRow (int *, int);
+void InversShiftRow_ByteSub (int *, int);
+int MixColumn_AddRoundKey (int *, int, int);
+int AddRoundKey_InversMixColumn (int *, int, int);
+int AddRoundKey (int *, int, int);
+int encrypt (int *, int *, int);
+int decrypt (int *, int *, int);
diff --git a/benchmarks/CHStone/aes/aes_dec.c b/benchmarks/CHStone/aes/aes_dec.c
new file mode 100755
index 0000000..25173f3
--- /dev/null
+++ b/benchmarks/CHStone/aes/aes_dec.c
@@ -0,0 +1,136 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* aes_dec.c */
+/*
+ * Copyright (C) 2005
+ * Akira Iwata & Masayuki Sato
+ * Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan.
+ *
+ * All rights reserved.
+ *
+ * This software is written by Masayuki Sato.
+ * And if you want to contact us, send an email to Kimitake Wakayama
+ * (wakayama@elcom.nitech.ac.jp)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software must
+ * display the following acknowledgment:
+ * "This product includes software developed by Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * AKIRA IWATA LABORATORY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL AKIRA IWATA LABORATORY BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+int
+decrypt (int statemt[32], int key[32], int type)
+{
+ int i;
+/*
++--------------------------------------------------------------------------+
+| * 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);
+
+ 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);
+
+ InversShiftRow_ByteSub (statemt, nb);
+
+ for (i = round_val - 1; i >= 1; --i)
+ {
+ AddRoundKey_InversMixColumn (statemt, nb, i);
+ InversShiftRow_ByteSub (statemt, nb);
+ }
+
+ AddRoundKey (statemt, type, 0);
+
+ 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;
+}
diff --git a/benchmarks/CHStone/aes/aes_enc.c b/benchmarks/CHStone/aes/aes_enc.c
new file mode 100755
index 0000000..edeb665
--- /dev/null
+++ b/benchmarks/CHStone/aes/aes_enc.c
@@ -0,0 +1,130 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* aes_enc.c */
+/*
+ * Copyright (C) 2005
+ * Akira Iwata & Masayuki Sato
+ * Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan.
+ *
+ * All rights reserved.
+ *
+ * This software is written by Masayuki Sato.
+ * And if you want to contact us, send an email to Kimitake Wakayama
+ * (wakayama@elcom.nitech.ac.jp)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software must
+ * display the following acknowledgment:
+ * "This product includes software developed by Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * AKIRA IWATA LABORATORY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL AKIRA IWATA LABORATORY BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+/* ******* encrypto ************ */
+int
+encrypt (int statemt[32], int key[32], int type)
+{
+ int i;
+/*
++--------------------------------------------------------------------------+
+| * 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);
+ 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);
+ for (i = 1; i <= round_val + 9; ++i)
+ {
+ ByteSub_ShiftRow (statemt, nb);
+ MixColumn_AddRoundKey (statemt, nb, i);
+ }
+ ByteSub_ShiftRow (statemt, nb);
+ AddRoundKey (statemt, type, i);
+
+ 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;
+}
diff --git a/benchmarks/CHStone/aes/aes_func.c b/benchmarks/CHStone/aes/aes_func.c
new file mode 100755
index 0000000..9450ddd
--- /dev/null
+++ b/benchmarks/CHStone/aes/aes_func.c
@@ -0,0 +1,542 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* aes_function.c */
+/*
+ * Copyright (C) 2005
+ * Akira Iwata & Masayuki Sato
+ * Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan.
+ *
+ * All rights reserved.
+ *
+ * This software is written by Masayuki Sato.
+ * And if you want to contact us, send an email to Kimitake Wakayama
+ * (wakayama@elcom.nitech.ac.jp)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software must
+ * display the following acknowledgment:
+ * "This product includes software developed by Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * AKIRA IWATA LABORATORY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL AKIRA IWATA LABORATORY BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+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}
+};
+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}
+};
+
+/* ********* ByteSub & ShiftRow ********* */
+void
+ByteSub_ShiftRow (int statemt[32], int nb)
+{
+ 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;
+ }
+}
+
+int
+SubByte (int in)
+{
+ return Sbox[(in / 16)][(in % 16)];
+}
+
+/* ********* InversShiftRow & ByteSub ********* */
+void
+InversShiftRow_ByteSub (int statemt[32], int nb)
+{
+ 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 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 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;
+
+ 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 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;
+}
diff --git a/benchmarks/CHStone/aes/aes_key.c b/benchmarks/CHStone/aes/aes_key.c
new file mode 100755
index 0000000..cac8412
--- /dev/null
+++ b/benchmarks/CHStone/aes/aes_key.c
@@ -0,0 +1,163 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* aes_key.c */
+/*
+ * Copyright (C) 2005
+ * Akira Iwata & Masayuki Sato
+ * Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan.
+ *
+ * All rights reserved.
+ *
+ * This software is written by Masayuki Sato.
+ * And if you want to contact us, send an email to Kimitake Wakayama
+ * (wakayama@elcom.nitech.ac.jp)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software must
+ * display the following acknowledgment:
+ * "This product includes software developed by Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Akira Iwata Laboratory,
+ * Nagoya Institute of Technology in Japan (http://mars.elcom.nitech.ac.jp/)."
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * AKIRA IWATA LABORATORY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL AKIRA IWATA LABORATORY BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* **************key generate & key display *******************/
+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,
+};
+
+/* **************** key expand ************************ */
+int
+KeySchedule (int type, int key[32])
+{
+ int nk, nb, round_val;
+ int i, j, temp[4];
+
+ 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]) ^ Rcon0[(j / nk) - 1];
+ temp[1] = SubByte (word[2][j - 1]);
+ temp[2] = SubByte (word[3][j - 1]);
+ temp[3] = SubByte (word[0][j - 1]);
+ }
+ 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]);
+ for (i = 0; i < 4; ++i)
+ word[i][j] = word[i][j - nk] ^ temp[i];
+ }
+ return 0;
+}
diff --git a/benchmarks/CHStone/blowfish/bf.c b/benchmarks/CHStone/blowfish/bf.c
new file mode 100755
index 0000000..0698744
--- /dev/null
+++ b/benchmarks/CHStone/blowfish/bf.c
@@ -0,0 +1,866 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* crypto/bf/bf.c */
+/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@mincom.oz.au).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@mincom.oz.au).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@mincom.oz.au)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@mincom.oz.au)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+#include <stdio.h>
+
+#include "blowfish.h"
+#include "bf_locl.h"
+#include "bf_pi.h"
+#include "bf_skey.c"
+#include "bf_cfb64.c"
+#include "bf_enc.c"
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) |
+| in_key : input data |
+| out_key : expected output data |
++--------------------------------------------------------------------------+
+*/
+#define KEYSIZE 5200
+const unsigned char in_key[KEYSIZE] = {
+ 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
+};
+
+const unsigned char out_key[KEYSIZE] = {
+ 5, 140, 229, 49, 55, 247, 179, 22, 234, 116, 197, 105, 104, 250, 30, 106,
+ 253, 124, 41, 105, 239, 252, 189, 239, 182, 63, 187, 140, 239, 253, 142,
+ 216, 26, 137, 170, 225, 52, 248, 13, 173, 77, 52, 249, 67, 194, 246, 207,
+ 5, 77, 17, 170, 24, 33, 72, 252, 9, 28, 7, 33, 144, 57, 125, 250, 143, 48,
+ 87, 203, 193, 205, 203, 207, 202, 214, 135, 56, 19, 76, 251, 100, 122,
+ 141, 135, 103, 210, 173, 79, 109, 16, 204, 155, 2, 12, 35, 122, 247, 66,
+ 212, 30, 183, 207, 142, 201, 255, 49, 229, 209, 56, 213, 171, 232, 181,
+ 122, 62, 42, 75, 53, 136, 234, 3, 44, 18, 8, 134, 160, 193, 222, 92, 151,
+ 93, 238, 76, 67, 186, 145, 29, 184, 214, 173, 178, 49, 41, 251, 128, 185,
+ 191, 49, 112, 223, 252, 85, 219, 95, 68, 104, 210, 3, 19, 55, 127, 76, 74,
+ 12, 180, 22, 124, 252, 46, 170, 55, 0, 55, 202, 144, 232, 179, 200, 201,
+ 206, 37, 219, 195, 98, 77, 154, 157, 22, 39, 169, 66, 87, 204, 150, 25,
+ 81, 214, 145, 163, 154, 166, 220, 26, 93, 42, 35, 1, 143, 178, 133, 3, 11,
+ 53, 184, 8, 143, 207, 230, 43, 188, 71, 56, 56, 241, 230, 126, 180, 101,
+ 134, 122, 171, 217, 173, 221, 56, 46, 166, 240, 159, 29, 181, 228, 119,
+ 240, 208, 10, 188, 164, 1, 57, 74, 15, 9, 138, 82, 251, 149, 246, 57, 28,
+ 70, 243, 168, 144, 194, 107, 213, 112, 103, 186, 175, 59, 187, 250, 90,
+ 239, 73, 230, 133, 173, 195, 92, 211, 142, 163, 226, 184, 237, 115, 57,
+ 16, 17, 43, 188, 186, 133, 165, 50, 195, 19, 68, 36, 153, 178, 15, 52, 85,
+ 52, 123, 93, 125, 86, 36, 138, 53, 59, 161, 161, 26, 178, 203, 228, 27,
+ 37, 140, 67, 236, 7, 182, 88, 71, 139, 228, 22, 15, 147, 220, 18, 132,
+ 111, 13, 249, 40, 1, 111, 5, 140, 38, 107, 6, 249, 230, 130, 71, 178, 81,
+ 39, 40, 28, 217, 216, 118, 159, 228, 208, 121, 10, 56, 105, 11, 1, 167,
+ 105, 64, 209, 44, 86, 191, 237, 254, 101, 25, 126, 161, 37, 54, 12, 87,
+ 156, 150, 155, 69, 52, 112, 234, 143, 149, 41, 15, 45, 211, 165, 189, 162,
+ 137, 166, 188, 175, 128, 224, 32, 153, 128, 190, 169, 130, 127, 191, 238,
+ 223, 146, 155, 177, 142, 176, 78, 229, 52, 96, 141, 119, 223, 36, 10, 24,
+ 15, 245, 128, 7, 196, 106, 100, 30, 32, 63, 132, 88, 133, 250, 195, 137,
+ 34, 92, 219, 20, 117, 81, 216, 181, 116, 241, 78, 131, 178, 34, 138, 206,
+ 10, 144, 51, 210, 108, 111, 122, 116, 49, 213, 152, 232, 228, 20, 245,
+ 122, 212, 225, 173, 190, 152, 21, 61, 61, 179, 173, 71, 110, 38, 7, 198,
+ 157, 153, 207, 87, 17, 42, 42, 215, 18, 208, 90, 172, 157, 23, 46, 37,
+ 166, 218, 65, 25, 136, 173, 85, 149, 105, 54, 20, 218, 6, 65, 184, 239,
+ 46, 38, 157, 68, 240, 228, 117, 224, 19, 153, 3, 34, 233, 47, 57, 103, 79,
+ 17, 208, 223, 92, 30, 111, 127, 61, 205, 212, 232, 5, 207, 107, 158, 81,
+ 192, 135, 67, 75, 60, 118, 68, 51, 30, 200, 176, 187, 62, 1, 100, 173, 63,
+ 118, 31, 108, 139, 138, 248, 233, 81, 244, 36, 241, 231, 58, 154, 201,
+ 110, 9, 39, 86, 227, 73, 60, 61, 40, 80, 195, 224, 187, 55, 154, 72, 104,
+ 218, 60, 253, 248, 216, 90, 44, 213, 78, 177, 148, 76, 244, 57, 170, 1,
+ 166, 75, 206, 123, 166, 206, 135, 221, 33, 130, 26, 148, 148, 224, 117,
+ 56, 75, 151, 50, 90, 49, 4, 48, 255, 147, 42, 183, 58, 76, 131, 16, 109,
+ 222, 86, 85, 134, 253, 209, 74, 17, 220, 238, 82, 200, 140, 89, 210, 117,
+ 174, 180, 68, 6, 163, 9, 249, 249, 51, 124, 182, 53, 6, 61, 39, 190, 10,
+ 40, 63, 207, 92, 189, 30, 69, 49, 8, 233, 116, 121, 80, 149, 169, 72, 164,
+ 203, 152, 71, 201, 169, 144, 205, 83, 10, 214, 213, 0, 147, 32, 62, 91,
+ 162, 164, 160, 211, 196, 159, 166, 9, 73, 221, 79, 117, 116, 20, 103, 112,
+ 80, 147, 226, 205, 25, 108, 210, 61, 163, 46, 57, 102, 185, 126, 3, 6, 27,
+ 118, 139, 113, 67, 62, 4, 242, 88, 152, 95, 92, 142, 233, 139, 34, 177,
+ 244, 130, 12, 4, 83, 29, 168, 171, 15, 70, 115, 216, 36, 218, 106, 213,
+ 92, 215, 215, 43, 155, 200, 77, 198, 68, 37, 255, 215, 62, 154, 52, 251,
+ 198, 148, 55, 207, 79, 99, 243, 135, 43, 64, 204, 179, 106, 144, 78, 120,
+ 94, 233, 160, 200, 92, 191, 50, 43, 129, 229, 168, 194, 48, 131, 78, 228,
+ 163, 157, 96, 175, 203, 189, 205, 81, 238, 82, 61, 84, 84, 111, 217, 163,
+ 7, 18, 77, 156, 41, 209, 47, 10, 250, 58, 236, 187, 248, 212, 131, 60, 52,
+ 126, 180, 113, 207, 135, 112, 192, 190, 177, 68, 171, 77, 219, 253, 105,
+ 12, 157, 222, 32, 159, 92, 185, 88, 192, 113, 39, 18, 77, 215, 112, 223,
+ 114, 128, 102, 42, 219, 15, 127, 23, 114, 152, 125, 254, 12, 52, 78, 242,
+ 74, 130, 125, 138, 18, 44, 152, 12, 236, 117, 194, 83, 192, 255, 109, 223,
+ 237, 31, 203, 170, 40, 188, 90, 46, 196, 124, 243, 153, 127, 247, 116,
+ 174, 67, 233, 199, 148, 111, 68, 60, 78, 196, 119, 159, 218, 85, 112, 9,
+ 20, 70, 168, 77, 46, 26, 39, 19, 10, 172, 159, 135, 10, 126, 25, 133, 207,
+ 193, 32, 153, 125, 101, 51, 85, 78, 78, 76, 145, 186, 102, 249, 78, 182,
+ 138, 224, 17, 207, 21, 205, 50, 139, 223, 5, 196, 78, 254, 239, 82, 129,
+ 222, 22, 146, 245, 178, 205, 169, 168, 138, 147, 24, 111, 69, 94, 113,
+ 190, 157, 82, 233, 87, 134, 149, 253, 91, 161, 128, 45, 254, 81, 75, 102,
+ 26, 154, 159, 73, 163, 198, 6, 27, 84, 136, 165, 116, 190, 234, 17, 160,
+ 0, 237, 120, 150, 252, 123, 174, 238, 136, 29, 226, 211, 20, 86, 104, 122,
+ 135, 241, 17, 229, 207, 122, 66, 137, 164, 26, 1, 90, 106, 143, 182, 69,
+ 160, 186, 10, 231, 57, 79, 226, 209, 186, 123, 82, 231, 228, 66, 239, 214,
+ 104, 200, 97, 1, 229, 102, 128, 77, 105, 54, 118, 58, 85, 36, 239, 133,
+ 35, 4, 208, 141, 19, 177, 172, 108, 109, 158, 39, 67, 70, 48, 175, 212,
+ 181, 75, 50, 248, 98, 94, 161, 124, 249, 187, 158, 137, 78, 35, 142, 90,
+ 130, 113, 121, 63, 37, 75, 93, 174, 22, 116, 115, 105, 215, 221, 147, 117,
+ 40, 142, 38, 105, 43, 154, 169, 39, 80, 46, 54, 6, 153, 143, 248, 193,
+ 110, 232, 77, 140, 97, 20, 122, 253, 82, 80, 205, 249, 140, 168, 142, 2,
+ 223, 155, 128, 75, 248, 75, 168, 70, 113, 130, 196, 104, 101, 111, 182,
+ 38, 250, 55, 24, 156, 73, 175, 78, 54, 10, 2, 142, 253, 206, 4, 203, 177,
+ 223, 95, 231, 45, 12, 123, 121, 237, 149, 191, 49, 93, 82, 157, 85, 85,
+ 150, 34, 241, 236, 87, 9, 188, 172, 151, 95, 88, 0, 96, 233, 215, 130,
+ 247, 157, 10, 30, 153, 249, 198, 159, 188, 47, 80, 175, 219, 171, 55, 172,
+ 214, 231, 54, 88, 50, 87, 113, 84, 10, 35, 170, 122, 95, 172, 73, 224, 97,
+ 98, 40, 154, 135, 94, 138, 109, 51, 189, 149, 176, 52, 157, 107, 24, 24,
+ 29, 162, 83, 20, 228, 197, 163, 163, 238, 110, 166, 213, 132, 35, 170, 64,
+ 242, 159, 44, 95, 224, 242, 254, 122, 158, 181, 214, 216, 224, 3, 35, 116,
+ 226, 246, 19, 248, 231, 154, 189, 72, 33, 31, 169, 34, 204, 99, 76, 10,
+ 53, 126, 52, 168, 112, 187, 51, 173, 10, 102, 170, 247, 18, 78, 234, 54,
+ 211, 165, 112, 68, 85, 113, 248, 165, 90, 95, 20, 73, 121, 40, 238, 115,
+ 29, 127, 223, 179, 252, 77, 107, 41, 233, 119, 239, 75, 208, 61, 188, 201,
+ 35, 230, 215, 3, 203, 141, 124, 210, 180, 252, 0, 244, 148, 190, 96, 45,
+ 218, 234, 120, 143, 136, 0, 63, 71, 215, 9, 233, 27, 226, 29, 255, 112,
+ 64, 236, 165, 65, 39, 106, 34, 34, 251, 252, 188, 32, 22, 248, 150, 68,
+ 92, 9, 7, 51, 205, 132, 0, 6, 163, 147, 64, 96, 168, 207, 235, 109, 138,
+ 29, 14, 222, 104, 141, 97, 183, 117, 142, 38, 24, 192, 54, 206, 104, 2,
+ 60, 14, 77, 234, 182, 41, 16, 192, 3, 11, 212, 104, 224, 47, 27, 103, 213,
+ 167, 183, 122, 62, 130, 179, 122, 238, 33, 222, 93, 207, 238, 117, 105,
+ 121, 98, 103, 89, 63, 132, 168, 32, 102, 244, 240, 17, 11, 169, 78, 167,
+ 247, 253, 226, 174, 213, 116, 125, 99, 26, 104, 54, 38, 252, 208, 135,
+ 176, 93, 10, 29, 99, 217, 155, 198, 41, 244, 42, 99, 20, 233, 212, 193,
+ 175, 27, 123, 120, 187, 155, 167, 14, 70, 225, 203, 18, 129, 59, 177, 135,
+ 0, 253, 4, 127, 159, 55, 87, 215, 194, 208, 4, 233, 94, 45, 130, 213, 231,
+ 90, 204, 99, 90, 41, 166, 93, 8, 26, 16, 124, 14, 31, 133, 16, 184, 128,
+ 209, 178, 247, 223, 211, 9, 126, 96, 26, 86, 43, 126, 17, 122, 13, 90,
+ 107, 153, 193, 86, 38, 19, 217, 117, 72, 241, 184, 164, 142, 164, 169,
+ 236, 226, 114, 169, 22, 230, 168, 113, 128, 3, 166, 49, 94, 71, 45, 161,
+ 32, 77, 164, 126, 197, 226, 131, 188, 176, 114, 127, 31, 162, 200, 168,
+ 107, 131, 88, 62, 248, 72, 131, 225, 113, 146, 189, 252, 104, 148, 17, 54,
+ 60, 191, 206, 161, 113, 85, 201, 26, 201, 124, 23, 145, 134, 18, 187, 143,
+ 35, 246, 74, 116, 43, 37, 104, 247, 250, 47, 59, 251, 147, 96, 205, 207,
+ 132, 202, 97, 188, 169, 134, 15, 95, 186, 31, 156, 183, 0, 241, 131, 134,
+ 0, 60, 150, 147, 59, 17, 154, 73, 245, 18, 60, 180, 181, 113, 199, 143,
+ 96, 162, 197, 249, 64, 37, 174, 217, 48, 23, 125, 141, 213, 227, 250, 139,
+ 194, 76, 234, 22, 185, 238, 114, 88, 11, 63, 8, 88, 218, 81, 49, 31, 214,
+ 212, 61, 39, 191, 199, 97, 63, 47, 94, 252, 197, 2, 95, 243, 50, 151, 254,
+ 53, 244, 196, 57, 60, 48, 84, 14, 85, 210, 163, 49, 214, 71, 191, 159,
+ 239, 165, 66, 155, 85, 240, 92, 90, 58, 120, 18, 203, 188, 80, 38, 188,
+ 177, 112, 176, 104, 159, 214, 211, 49, 92, 122, 65, 176, 56, 70, 32, 153,
+ 69, 12, 137, 199, 159, 70, 242, 180, 60, 116, 235, 100, 88, 250, 67, 225,
+ 104, 129, 73, 155, 170, 100, 123, 243, 47, 17, 10, 137, 184, 62, 3, 243,
+ 52, 244, 147, 118, 184, 23, 7, 22, 68, 206, 41, 167, 203, 166, 226, 214,
+ 179, 243, 249, 22, 118, 224, 103, 56, 56, 6, 246, 47, 40, 107, 192, 56,
+ 21, 52, 166, 220, 103, 219, 84, 210, 20, 25, 86, 38, 177, 157, 192, 163,
+ 67, 170, 96, 42, 119, 203, 205, 140, 216, 235, 228, 138, 42, 179, 125, 73,
+ 112, 199, 180, 38, 159, 100, 92, 144, 158, 240, 183, 206, 42, 240, 206,
+ 246, 182, 64, 57, 73, 102, 164, 229, 140, 89, 219, 234, 99, 169, 110, 124,
+ 93, 187, 91, 5, 197, 88, 41, 1, 66, 146, 14, 130, 112, 190, 28, 17, 121,
+ 217, 113, 31, 235, 205, 164, 192, 101, 248, 130, 49, 57, 239, 87, 6, 117,
+ 129, 118, 61, 213, 219, 48, 69, 113, 183, 50, 63, 154, 227, 103, 129, 67,
+ 113, 152, 247, 179, 81, 136, 234, 96, 146, 93, 139, 195, 107, 218, 150,
+ 43, 129, 31, 83, 57, 171, 234, 11, 90, 70, 168, 0, 210, 130, 61, 110, 215,
+ 251, 161, 61, 146, 115, 154, 161, 173, 138, 66, 246, 61, 16, 80, 74, 118,
+ 103, 144, 216, 219, 112, 55, 213, 48, 245, 201, 240, 77, 95, 231, 217,
+ 204, 206, 52, 227, 247, 58, 129, 101, 231, 39, 179, 187, 66, 114, 90, 193,
+ 69, 203, 202, 252, 98, 130, 146, 161, 54, 73, 171, 169, 201, 24, 125, 17,
+ 232, 185, 65, 27, 212, 225, 142, 96, 83, 23, 141, 91, 154, 161, 82, 253,
+ 250, 154, 50, 85, 221, 27, 181, 168, 115, 243, 249, 24, 229, 154, 136,
+ 115, 110, 22, 215, 166, 63, 19, 19, 201, 187, 59, 84, 17, 129, 112, 146,
+ 99, 19, 176, 207, 119, 11, 221, 214, 6, 22, 135, 225, 145, 116, 61, 101,
+ 128, 86, 218, 210, 110, 98, 19, 196, 117, 248, 198, 13, 150, 109, 30, 110,
+ 52, 63, 220, 170, 214, 226, 98, 151, 123, 196, 233, 165, 198, 142, 75, 5,
+ 188, 241, 159, 34, 56, 101, 61, 61, 208, 140, 179, 25, 137, 133, 126, 176,
+ 166, 24, 206, 133, 61, 93, 128, 255, 216, 97, 7, 51, 251, 48, 77, 208,
+ 139, 158, 187, 216, 216, 159, 10, 114, 243, 31, 248, 81, 160, 119, 189,
+ 223, 75, 79, 45, 13, 135, 193, 229, 247, 146, 241, 114, 63, 65, 34, 103,
+ 96, 197, 5, 15, 228, 45, 208, 200, 201, 149, 74, 46, 99, 182, 201, 143,
+ 184, 44, 158, 59, 55, 53, 10, 249, 119, 8, 239, 174, 244, 168, 15, 150,
+ 65, 182, 186, 50, 9, 197, 176, 240, 243, 177, 181, 82, 251, 12, 35, 244,
+ 23, 158, 62, 152, 43, 237, 51, 211, 29, 207, 90, 156, 11, 80, 199, 193,
+ 116, 230, 151, 152, 253, 244, 86, 155, 8, 246, 184, 99, 43, 64, 196, 93,
+ 91, 169, 5, 237, 2, 58, 208, 89, 225, 206, 31, 28, 145, 32, 74, 48, 19,
+ 51, 198, 183, 239, 52, 216, 188, 152, 93, 110, 140, 45, 146, 49, 31, 172,
+ 117, 50, 8, 68, 204, 3, 219, 117, 40, 195, 232, 179, 200, 186, 120, 55, 1,
+ 98, 168, 120, 112, 182, 218, 222, 77, 113, 255, 189, 0, 145, 88, 72, 199,
+ 87, 204, 105, 46, 188, 77, 77, 183, 21, 86, 50, 217, 195, 10, 215, 29,
+ 174, 155, 62, 219, 72, 127, 181, 80, 179, 177, 175, 56, 213, 65, 60, 99,
+ 177, 55, 13, 205, 246, 35, 202, 103, 215, 113, 109, 185, 87, 185, 90, 1,
+ 74, 88, 149, 187, 230, 81, 3, 135, 170, 73, 70, 113, 118, 183, 250, 209,
+ 208, 248, 17, 196, 36, 188, 128, 185, 49, 134, 150, 109, 195, 14, 193,
+ 142, 43, 5, 117, 148, 15, 44, 146, 145, 162, 124, 202, 239, 125, 205, 130,
+ 189, 221, 253, 171, 73, 36, 127, 35, 12, 230, 153, 159, 37, 227, 82, 188,
+ 226, 108, 182, 130, 61, 109, 126, 142, 254, 243, 43, 88, 172, 30, 193,
+ 120, 152, 144, 252, 40, 31, 19, 181, 118, 27, 67, 167, 254, 242, 98, 87,
+ 192, 22, 173, 173, 129, 9, 112, 118, 90, 142, 175, 41, 80, 198, 23, 17,
+ 83, 197, 163, 252, 4, 122, 249, 125, 71, 27, 87, 71, 25, 237, 131, 144,
+ 189, 244, 140, 222, 11, 95, 136, 166, 112, 88, 4, 27, 250, 7, 221, 159,
+ 118, 34, 181, 112, 11, 64, 222, 95, 71, 127, 210, 89, 11, 73, 127, 217,
+ 215, 250, 135, 223, 224, 155, 28, 210, 170, 127, 45, 124, 148, 155, 124,
+ 131, 63, 122, 133, 21, 47, 147, 36, 189, 176, 145, 73, 8, 31, 197, 138,
+ 43, 160, 163, 46, 72, 48, 26, 56, 171, 138, 52, 22, 183, 191, 234, 107,
+ 230, 202, 87, 255, 108, 172, 132, 164, 154, 136, 200, 85, 131, 4, 188,
+ 106, 1, 213, 42, 49, 221, 70, 222, 112, 99, 71, 105, 206, 13, 103, 223,
+ 37, 104, 36, 97, 253, 149, 222, 81, 232, 233, 228, 223, 136, 123, 201, 10,
+ 51, 175, 80, 168, 198, 238, 40, 161, 113, 170, 46, 144, 194, 218, 152, 80,
+ 2, 228, 221, 68, 191, 91, 81, 21, 216, 68, 156, 117, 145, 88, 111, 241,
+ 201, 33, 158, 35, 245, 69, 140, 162, 43, 108, 46, 119, 69, 224, 121, 136,
+ 77, 60, 118, 219, 151, 147, 79, 161, 234, 193, 46, 216, 223, 241, 235, 15,
+ 227, 27, 71, 234, 235, 163, 143, 130, 106, 244, 202, 23, 222, 185, 52,
+ 109, 150, 43, 81, 68, 218, 162, 175, 76, 165, 133, 232, 172, 104, 240,
+ 226, 134, 16, 186, 202, 60, 42, 91, 209, 128, 4, 255, 126, 156, 142, 240,
+ 143, 224, 240, 6, 99, 63, 215, 74, 71, 57, 18, 25, 69, 147, 86, 156, 252,
+ 157, 227, 171, 157, 16, 97, 101, 77, 70, 218, 212, 50, 68, 151, 107, 173,
+ 140, 221, 186, 217, 39, 38, 23, 217, 75, 251, 73, 178, 6, 226, 9, 187,
+ 228, 75, 198, 93, 191, 180, 26, 29, 61, 215, 135, 0, 236, 65, 44, 44, 178,
+ 24, 2, 98, 92, 151, 250, 68, 45, 196, 178, 174, 95, 57, 217, 88, 109, 163,
+ 237, 97, 202, 146, 231, 39, 197, 27, 242, 111, 191, 11, 209, 2, 157, 4,
+ 26, 53, 147, 250, 142, 66, 205, 77, 230, 84, 149, 54, 61, 20, 212, 64, 63,
+ 241, 99, 236, 186, 120, 28, 46, 209, 123, 254, 86, 98, 0, 138, 191, 2,
+ 182, 250, 179, 66, 223, 193, 128, 255, 15, 99, 4, 10, 178, 133, 157, 14,
+ 32, 203, 42, 221, 160, 7, 178, 47, 76, 139, 131, 108, 252, 88, 144, 41,
+ 19, 219, 168, 209, 248, 193, 129, 87, 178, 121, 56, 132, 81, 36, 95, 30,
+ 94, 242, 77, 224, 115, 59, 208, 142, 175, 107, 199, 192, 102, 148, 26, 36,
+ 167, 213, 108, 105, 185, 99, 180, 100, 172, 163, 239, 248, 232, 54, 169,
+ 182, 252, 134, 84, 112, 66, 26, 26, 83, 143, 162, 198, 214, 2, 238, 137,
+ 195, 165, 17, 35, 221, 8, 101, 32, 60, 84, 138, 142, 102, 241, 35, 254,
+ 168, 190, 110, 62, 58, 48, 228, 105, 219, 58, 159, 176, 162, 226, 32, 85,
+ 218, 125, 124, 221, 39, 175, 59, 247, 110, 182, 130, 30, 74, 16, 141, 232,
+ 113, 203, 141, 234, 42, 90, 251, 56, 93, 1, 155, 255, 4, 61, 67, 16, 45,
+ 233, 195, 74, 14, 148, 118, 247, 224, 170, 141, 226, 83, 190, 209, 90, 52,
+ 225, 120, 201, 238, 76, 205, 12, 56, 42, 84, 122, 94, 236, 24, 124, 135,
+ 162, 216, 144, 5, 231, 108, 160, 33, 196, 99, 2, 253, 175, 57, 59, 5, 5,
+ 229, 22, 241, 38, 124, 184, 65, 82, 96, 211, 145, 15, 28, 127, 144, 231,
+ 172, 111, 184, 251, 71, 214, 144, 96, 120, 141, 128, 86, 97, 84, 138, 124,
+ 170, 163, 19, 11, 182, 182, 109, 254, 119, 233, 73, 111, 148, 9, 76, 180,
+ 118, 20, 29, 186, 3, 239, 245, 179, 123, 131, 15, 203, 215, 64, 58, 103,
+ 141, 29, 1, 206, 182, 168, 211, 118, 152, 246, 68, 115, 160, 39, 15, 34,
+ 137, 174, 170, 139, 118, 205, 18, 166, 228, 84, 142, 89, 177, 201, 13,
+ 163, 68, 179, 220, 63, 186, 100, 26, 205, 147, 241, 125, 188, 114, 166,
+ 168, 214, 101, 148, 64, 255, 32, 213, 2, 39, 51, 54, 98, 73, 189, 113, 14,
+ 105, 86, 224, 105, 177, 50, 53, 137, 173, 153, 113, 215, 6, 112, 129, 113,
+ 254, 98, 74, 119, 15, 247, 114, 237, 165, 134, 247, 227, 116, 181, 89,
+ 189, 44, 82, 7, 197, 140, 154, 123, 157, 101, 147, 57, 162, 143, 248, 143,
+ 130, 105, 154, 245, 198, 109, 38, 139, 206, 255, 170, 63, 33, 132, 120,
+ 225, 213, 29, 186, 168, 204, 124, 239, 196, 135, 24, 6, 101, 214, 62, 42,
+ 239, 45, 29, 249, 186, 168, 116, 84, 54, 130, 98, 170, 116, 128, 114, 163,
+ 19, 211, 28, 142, 7, 105, 152, 188, 17, 41, 9, 40, 31, 137, 69, 98, 99,
+ 209, 80, 30, 210, 31, 112, 147, 223, 106, 65, 74, 102, 16, 105, 32, 209,
+ 115, 183, 70, 46, 253, 79, 186, 27, 17, 53, 145, 57, 16, 18, 249, 21, 170,
+ 9, 110, 191, 115, 34, 71, 119, 189, 22, 154, 231, 154, 248, 11, 228, 71,
+ 198, 15, 26, 224, 38, 25, 169, 76, 164, 50, 170, 185, 112, 186, 131, 212,
+ 191, 1, 32, 168, 92, 20, 231, 64, 167, 193, 191, 176, 62, 89, 182, 142,
+ 23, 3, 83, 15, 121, 74, 177, 116, 92, 88, 175, 236, 69, 253, 16, 29, 223,
+ 197, 138, 120, 154, 185, 221, 48, 133, 126, 27, 237, 128, 103, 148, 210,
+ 131, 95, 107, 23, 46, 56, 167, 145, 190, 69, 86, 188, 247, 95, 173, 187,
+ 35, 43, 163, 180, 201, 209, 192, 209, 145, 82, 43, 252, 82, 23, 13, 182,
+ 165, 210, 194, 92, 116, 250, 100, 67, 159, 132, 149, 100, 137, 84, 28,
+ 207, 105, 13, 61, 46, 125, 9, 113, 107, 194, 192, 145, 215, 180, 70, 27,
+ 25, 232, 220, 143, 29, 64, 188, 208, 11, 5, 217, 195, 95, 11, 226, 99,
+ 226, 202, 117, 107, 141, 55, 47, 110, 185, 198, 214, 148, 177, 209, 150,
+ 115, 19, 201, 205, 173, 240, 126, 174, 139, 213, 215, 4, 20, 93, 40, 108,
+ 184, 252, 100, 117, 54, 120, 127, 71, 164, 252, 248, 73, 134, 43, 50, 223,
+ 72, 139, 146, 185, 113, 37, 173, 162, 140, 210, 36, 197, 16, 159, 116,
+ 146, 212, 97, 129, 248, 252, 137, 148, 96, 130, 108, 207, 41, 123, 207,
+ 247, 99, 253, 174, 13, 172, 214, 186, 194, 207, 255, 160, 146, 197, 250,
+ 218, 110, 193, 19, 126, 76, 99, 88, 109, 50, 133, 187, 206, 116, 15, 209,
+ 124, 81, 188, 88, 28, 239, 241, 68, 71, 30, 125, 130, 30, 163, 109, 156,
+ 140, 112, 238, 93, 40, 208, 8, 228, 161, 227, 255, 189, 175, 5, 196, 237,
+ 181, 101, 119, 83, 186, 137, 212, 113, 131, 49, 155, 122, 115, 159, 54,
+ 15, 118, 9, 86, 194, 205, 140, 33, 3, 2, 8, 209, 31, 160, 5, 26, 29, 179,
+ 252, 153, 210, 92, 242, 83, 22, 96, 77, 61, 123, 228, 118, 67, 79, 2, 24,
+ 232, 6, 212, 50, 214, 184, 47, 24, 75, 218, 160, 190, 132, 42, 190, 85,
+ 178, 230, 70, 209, 83, 40, 150, 176, 134, 124, 95, 64, 234, 163, 212, 96,
+ 199, 78, 199, 173, 26, 35, 27, 118, 73, 145, 184, 139, 43, 35, 76, 147,
+ 177, 162, 94, 229, 98, 171, 14, 46, 208, 6, 112, 65, 174, 229, 128, 49,
+ 29, 201, 75, 48, 215, 137, 188, 236, 13, 212, 21, 119, 253, 188, 78, 111,
+ 121, 178, 2, 90, 201, 58, 247, 93, 183, 16, 138, 238, 202, 46, 77, 40, 28,
+ 186, 126, 229, 217, 198, 190, 166, 118, 52, 100, 235, 95, 215, 152, 60,
+ 22, 123, 235, 208, 48, 195, 127, 216, 189, 98, 138, 170, 244, 222, 121,
+ 203, 204, 165, 17, 105, 49, 91, 184, 121, 158, 51, 149, 156, 199, 28, 160,
+ 162, 7, 203, 60, 123, 240, 151, 247, 50, 224, 222, 134, 205, 115, 72, 108,
+ 1, 46, 27, 124, 178, 175, 222, 19, 123, 65, 53, 77, 88, 82, 193, 241, 10,
+ 101, 131, 207, 118, 110, 113, 49, 17, 170, 118, 1, 15, 99, 195, 210, 237,
+ 181, 230, 52, 59, 177, 115, 59, 235, 209, 57, 128, 200, 222, 8, 111, 7,
+ 77, 244, 9, 109, 251, 236, 126, 225, 19, 96, 91, 89, 98, 39, 224, 173, 70,
+ 143, 68, 105, 177, 253, 12, 92, 79, 88, 206, 36, 131, 100, 187, 83, 223,
+ 162, 171, 84, 29, 69, 232, 111, 240, 37, 4, 142, 117, 49, 86, 204, 217,
+ 36, 58, 36, 14, 110, 221, 16, 25, 187, 243, 29, 69, 19, 77, 43, 10, 81,
+ 35, 229, 229, 56, 247, 67, 129, 100, 210, 148, 41, 239, 233, 71, 138, 191,
+ 3, 74, 15, 159, 223, 60, 201, 210, 159, 75, 30, 216, 131, 177, 171, 63,
+ 243, 189, 39, 156, 255, 115, 181, 240, 9, 216, 184, 228, 203, 135, 242,
+ 108, 108, 167, 18, 50, 171, 23, 139, 149, 232, 41, 184, 38, 216, 232, 103,
+ 50, 116, 146, 141, 187, 204, 60, 249, 140, 13, 13, 105, 140, 113, 184,
+ 121, 234, 199, 32, 171, 19, 246, 192, 99, 194, 54, 160, 95, 177, 99, 92,
+ 180, 157, 84, 10, 127, 141, 252, 62, 59, 139, 84, 155, 77, 212, 14, 91,
+ 176, 163, 216, 2, 156, 228, 233, 33, 150, 223, 181, 194, 96, 50, 46, 77,
+ 160, 238, 166, 35, 0, 180, 8, 126, 15, 94, 8, 10, 38, 95, 85, 133, 163,
+ 151, 19, 253, 34, 103, 42, 122, 214, 221, 45, 138, 213, 160, 207, 94, 118,
+ 33, 129, 192, 22, 161, 183, 211, 192, 141, 206, 197, 141, 46, 254, 124,
+ 75, 232, 26, 175, 77, 184, 238, 26, 89, 141, 118, 139, 73, 181, 113, 225,
+ 249, 132, 108, 8, 9, 207, 153, 76, 233, 21, 53, 169, 217, 101, 134, 227,
+ 215, 199, 229, 87, 31, 234, 39, 17, 136, 196, 90, 14, 77, 253, 208, 19,
+ 229, 43, 254, 2, 113, 83, 70, 76, 39, 39, 71, 135, 1, 178, 143, 91, 205,
+ 28, 102, 87, 226, 70, 75, 174, 75, 163, 126, 86, 62, 65, 135, 139, 132,
+ 134, 62, 92, 186, 0, 3, 87, 253, 109, 166, 56, 186, 124, 224, 49, 171, 32,
+ 239, 46, 163, 105, 168, 243, 142, 111, 100, 207, 208, 8, 112, 94, 145, 30,
+ 25, 113, 225, 69, 233, 223, 242, 33, 197, 204, 3, 84, 51, 189, 88, 153,
+ 88, 61, 135, 22, 226, 177, 222, 149, 70, 166, 199, 39, 103, 175, 198, 18,
+ 183, 119, 92, 85, 53, 170, 105, 116, 97, 211, 71, 207, 5, 107, 245, 154,
+ 212, 3, 134, 206, 43, 122, 224, 195, 26, 189, 26, 215, 179, 199, 18, 252,
+ 178, 101, 185, 194, 169, 155, 177, 136, 211, 180, 234, 88, 224, 23, 219,
+ 175, 50, 35, 74, 241, 147, 108, 127, 110, 211, 241, 159, 208, 233, 194,
+ 169, 5, 116, 155, 160, 122, 144, 98, 200, 215, 49, 9, 131, 140, 124, 155,
+ 82, 222, 231, 224, 203, 65, 115, 94, 200, 113, 140, 192, 125, 35, 167,
+ 131, 152, 158, 65, 193, 57, 81, 172, 232, 45, 184, 65, 58, 12, 211, 106,
+ 227, 253, 78, 175, 84, 208, 243, 113, 100, 64, 105, 39, 245, 223, 115,
+ 252, 106, 79, 192, 166, 25, 149, 141, 240, 215, 189, 183, 193, 74, 191,
+ 115, 80, 98, 25, 182, 1, 164, 156, 11, 19, 71, 109, 217, 109, 255, 1, 216,
+ 241, 149, 113, 74, 90, 43, 10, 200, 231, 40, 73, 231, 71, 206, 127, 243,
+ 159, 186, 171, 57, 116, 9, 90, 16, 50, 170, 7, 5, 80, 60, 128, 74, 68,
+ 178, 98, 246, 112, 186, 72, 226, 183, 192, 4, 57, 30, 221, 49, 203, 237,
+ 3, 37, 253, 47, 199, 202, 40, 56, 101, 177, 150, 211, 151, 165, 103, 235,
+ 211, 209, 137, 48, 3, 46, 6, 198, 36, 167, 251, 190, 73, 214, 8, 208, 249,
+ 5, 7, 245, 169, 195, 230, 116, 108, 129, 180, 55, 109, 203, 124, 11, 179,
+ 45, 168, 54, 20, 54, 230, 253, 127, 195, 122, 236, 175, 164, 205, 245, 77,
+ 195, 114, 11, 195, 143, 245, 123, 232, 241, 92, 213, 199, 27, 170, 230,
+ 32, 66, 175, 127, 90, 147, 1, 233, 76, 20, 229, 86, 126, 167, 191, 216,
+ 117, 85, 248, 188, 214, 233, 139, 85, 194, 8, 214, 157, 235, 168, 178, 35,
+ 192, 177, 124, 140, 70, 212, 118, 116, 122, 237, 20, 105, 229, 14, 177,
+ 231, 201, 99, 140, 97, 104, 26, 226, 67, 233, 25, 176, 52, 80, 136, 220,
+ 144, 204, 192, 104, 0, 152, 83, 175, 255, 123, 40, 116, 20, 191, 79, 68,
+ 61, 224, 212, 76, 214, 190, 234, 87, 66, 224, 51, 187, 102, 40, 48, 155,
+ 106, 216, 105, 212, 109, 233, 114, 120, 225, 157, 130, 13, 58, 44, 111,
+ 223, 211, 69, 108, 65, 17, 213, 188, 75, 197, 242, 40, 74, 33, 98, 9, 18,
+ 204, 193, 122, 100, 206, 204, 189, 243, 173, 71, 110, 230, 243, 103, 165,
+ 99, 18, 87, 209, 183, 34, 195, 2, 199, 193, 182, 151, 146, 107, 202, 166,
+ 222, 79, 196, 141, 89, 197, 254, 184, 16, 52, 3, 216, 9, 53, 77, 29, 222,
+ 128, 148, 43, 117, 43, 166, 59, 153, 207, 153, 90, 211, 120, 255, 110, 91,
+ 98, 130, 171, 149, 92, 43, 179, 43, 26, 185, 15, 7, 16, 93, 111, 85, 162,
+ 32, 143, 14, 0, 173, 1, 70, 197, 216, 170, 231, 142, 174, 238, 209, 32,
+ 22, 228, 208, 39, 98, 15, 50, 13, 69, 220, 169, 208, 68, 64, 101, 209,
+ 117, 175, 93, 212, 253, 73, 75, 249, 1, 53, 180, 94, 123, 82, 168, 32, 65,
+ 138, 136, 252, 90, 66, 193, 185, 60, 248, 172, 161, 228, 128, 130, 110,
+ 118, 92, 198, 57, 51, 83, 82, 240, 65, 116, 148, 223, 206, 148, 124, 109,
+ 54, 202, 28, 169, 202, 100, 27, 235, 237, 49, 50, 188, 72, 88, 186, 97,
+ 40, 18, 81, 157, 120, 109, 193, 46, 3, 80, 53, 182, 31, 214, 165, 32, 151,
+ 94, 4, 113, 78, 220, 205, 36, 133, 237, 151, 1, 50, 160, 63, 210, 65, 84,
+ 148, 88, 33, 14, 208, 92, 174, 117, 164, 181, 197, 155, 238, 144, 246, 26,
+ 12, 208, 60, 58, 95, 121, 105, 133, 29, 64, 24, 41, 221, 184, 39, 77, 169,
+ 113, 139, 160, 37, 232, 100, 83, 184, 209, 4, 53, 48, 235, 62, 103, 247,
+ 21, 56, 60, 109, 154, 76, 6, 93, 94, 69, 19, 75, 204, 65, 9, 223, 116,
+ 251, 245, 114, 21, 244, 247, 46, 152, 61, 215, 105, 247, 45, 61, 11, 115,
+ 163, 17, 55, 206, 54, 15, 173, 115, 127, 12, 2, 62, 227, 160, 3, 42, 253,
+ 55, 165, 149, 2, 231, 134, 121, 66, 79, 25, 123, 217, 139, 173, 87, 232,
+ 232, 94, 148, 169, 166, 32, 36, 158, 203, 141, 145, 26, 124, 178, 84, 239,
+ 23, 204, 104, 198, 186, 144, 151, 81, 151, 236, 130, 249, 72, 85, 103,
+ 109, 183, 120, 149, 45, 62, 90, 238, 145, 34, 109, 209, 126, 129, 207,
+ 129, 76, 92, 184, 58, 121, 107, 49, 39, 74, 160, 210, 35
+};
+
+#define N 40
+
+int
+blowfish_main ()
+{
+ unsigned char ukey[8];
+ unsigned char indata[N];
+ unsigned char outdata[N];
+ unsigned char ivec[8];
+ int num;
+ int i, j, k, l;
+ int encordec;
+ int check;
+
+ num = 0;
+ k = 0;
+ l = 0;
+ encordec = 1;
+ check = 0;
+ for (i = 0; i < 8; i++)
+ {
+ ukey[i] = 0;
+ ivec[i] = 0;
+ }
+ BF_set_key (8, ukey);
+ i = 0;
+ while (k < KEYSIZE)
+ {
+ while (k < KEYSIZE && i < N)
+ indata[i++] = in_key[k++];
+
+ BF_cfb64_encrypt (indata, outdata, i, ivec, &num, encordec);
+
+ for (j = 0; j < i; j++)
+ check += (outdata[j] != out_key[l++]);
+
+ i = 0;
+ }
+ return check;
+}
+
+int
+main ()
+{
+ int main_result;
+
+ main_result = 0;
+ main_result = blowfish_main ();
+
+ printf ("%d\n", main_result);
+
+ return main_result;
+ }
diff --git a/benchmarks/CHStone/blowfish/bf_cfb64.c b/benchmarks/CHStone/blowfish/bf_cfb64.c
new file mode 100755
index 0000000..25fd9f2
--- /dev/null
+++ b/benchmarks/CHStone/blowfish/bf_cfb64.c
@@ -0,0 +1,151 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* crypto/bf/bf_cfb64.c */
+/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@mincom.oz.au).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@mincom.oz.au).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@mincom.oz.au)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@mincom.oz.au)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+/* The input and output encrypted as though 64bit cfb mode is being
+ * used. The extra state information to record how much of the
+ * 64bit block we have used is contained in *num;
+ */
+
+void
+BF_cfb64_encrypt (in, out, length, ivec, num, encrypt)
+ unsigned char *in;
+ unsigned char *out;
+ long length;
+ unsigned char *ivec;
+ int *num;
+ int encrypt;
+{
+ register BF_LONG v0, v1, t;
+ register int n;
+ register long l;
+ BF_LONG ti[2];
+ unsigned char *iv, c, cc;
+
+ n = *num;
+ l = length;
+ iv = (unsigned char *) ivec;
+ if (encrypt)
+ {
+ while (l--)
+ {
+ if (n == 0)
+ {
+ n2l (iv, v0);
+ ti[0] = v0;
+ n2l (iv, v1);
+ ti[1] = v1;
+ BF_encrypt ((unsigned long *) ti, BF_ENCRYPT);
+ iv = (unsigned char *) ivec;
+ t = ti[0];
+ l2n (t, iv);
+ t = ti[1];
+ l2n (t, iv);
+
+ iv = (unsigned char *) ivec;
+ }
+ c = *(in++) ^ iv[n];
+ *(out++) = c;
+ iv[n] = c;
+ n = (n + 1) & 0x07;
+ }
+ }
+ else
+ {
+ while (l--)
+ {
+ if (n == 0)
+ {
+ n2l (iv, v0);
+ ti[0] = v0;
+ n2l (iv, v1);
+ ti[1] = v1;
+ BF_encrypt ((unsigned long *) ti, BF_ENCRYPT);
+ iv = (unsigned char *) ivec;
+ t = ti[0];
+ l2n (t, iv);
+ t = ti[1];
+ l2n (t, iv);
+ iv = (unsigned char *) ivec;
+ }
+ cc = *(in++);
+ c = iv[n];
+ iv[n] = cc;
+ *(out++) = c ^ cc;
+ n = (n + 1) & 0x07;
+ }
+ }
+ v0 = v1 = ti[0] = ti[1] = t = c = cc = 0;
+ *num = n;
+}
diff --git a/benchmarks/CHStone/blowfish/bf_enc.c b/benchmarks/CHStone/blowfish/bf_enc.c
new file mode 100755
index 0000000..98b12ee
--- /dev/null
+++ b/benchmarks/CHStone/blowfish/bf_enc.c
@@ -0,0 +1,137 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* crypto/bf/bf_enc.c */
+/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@mincom.oz.au).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@mincom.oz.au).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@mincom.oz.au)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@mincom.oz.au)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+/* Blowfish as implemented from 'Blowfish: Springer-Verlag paper'
+ * (From LECTURE NOTES IN COIMPUTER SCIENCE 809, FAST SOFTWARE ENCRYPTION,
+ * CAMBRIDGE SECURITY WORKSHOP, CAMBRIDGE, U.K., DECEMBER 9-11, 1993)
+ */
+
+void
+BF_encrypt (data, encrypt)
+ BF_LONG *data;
+ int encrypt;
+{
+ register BF_LONG l, r, *p, *s;
+ p = key_P;
+ s = &(key_S[0]);
+ l = data[0];
+ r = data[1];
+
+ if (encrypt)
+ {
+ l ^= p[0];
+
+ BF_ENC (r, l, s, p[1]);
+ BF_ENC (l, r, s, p[2]);
+ BF_ENC (r, l, s, p[3]);
+ BF_ENC (l, r, s, p[4]);
+ BF_ENC (r, l, s, p[5]);
+ BF_ENC (l, r, s, p[6]);
+ BF_ENC (r, l, s, p[7]);
+ BF_ENC (l, r, s, p[8]);
+ BF_ENC (r, l, s, p[9]);
+ BF_ENC (l, r, s, p[10]);
+ BF_ENC (r, l, s, p[11]);
+ BF_ENC (l, r, s, p[12]);
+ BF_ENC (r, l, s, p[13]);
+ BF_ENC (l, r, s, p[14]);
+ BF_ENC (r, l, s, p[15]);
+ BF_ENC (l, r, s, p[16]);
+ r ^= p[BF_ROUNDS + 1];
+ }
+ else
+ {
+ l ^= p[BF_ROUNDS + 1];
+ BF_ENC (r, l, s, p[16]);
+ BF_ENC (l, r, s, p[15]);
+ BF_ENC (r, l, s, p[14]);
+ BF_ENC (l, r, s, p[13]);
+ BF_ENC (r, l, s, p[12]);
+ BF_ENC (l, r, s, p[11]);
+ BF_ENC (r, l, s, p[10]);
+ BF_ENC (l, r, s, p[9]);
+ BF_ENC (r, l, s, p[8]);
+ BF_ENC (l, r, s, p[7]);
+ BF_ENC (r, l, s, p[6]);
+ BF_ENC (l, r, s, p[5]);
+ BF_ENC (r, l, s, p[4]);
+ BF_ENC (l, r, s, p[3]);
+ BF_ENC (r, l, s, p[2]);
+ BF_ENC (l, r, s, p[1]);
+ r ^= p[0];
+ }
+ data[1] = l & 0xffffffff;
+ data[0] = r & 0xffffffff;
+}
diff --git a/benchmarks/CHStone/blowfish/bf_locl.h b/benchmarks/CHStone/blowfish/bf_locl.h
new file mode 100755
index 0000000..4cfdf3c
--- /dev/null
+++ b/benchmarks/CHStone/blowfish/bf_locl.h
@@ -0,0 +1,104 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* crypto/bf/bf_local.h */
+/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@mincom.oz.au).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@mincom.oz.au).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@mincom.oz.au)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@mincom.oz.au)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+/* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+ *
+ * Always modify bf_locl.org since bf_locl.h is automatically generated from
+ * it during SSLeay configuration.
+ *
+ * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+ */
+
+#undef n2l
+#define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24L, \
+ l|=((unsigned long)(*((c)++)))<<16L, \
+ l|=((unsigned long)(*((c)++)))<< 8L, \
+ l|=((unsigned long)(*((c)++))))
+
+#undef l2n
+#define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \
+ *((c)++)=(unsigned char)(((l)>>16L)&0xff), \
+ *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
+ *((c)++)=(unsigned char)(((l) )&0xff))
+
+/* This will always work, even on 64 bit machines and strangly enough,
+ * on the Alpha it is faster than the pointer versions (both 32 and 64
+ * versions of BF_LONG) */
+#define BF_ENC(LL,R,S,P) \
+ LL^=P; \
+ LL^=((( S[ (R>>24L) ] + \
+ S[0x0100+((R>>16L)&0xff)])^ \
+ S[0x0200+((R>> 8L)&0xff)])+ \
+ S[0x0300+((R )&0xff)])&0xffffffff;
diff --git a/benchmarks/CHStone/blowfish/bf_pi.h b/benchmarks/CHStone/blowfish/bf_pi.h
new file mode 100755
index 0000000..5f05eb9
--- /dev/null
+++ b/benchmarks/CHStone/blowfish/bf_pi.h
@@ -0,0 +1,341 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* crypto/bf/bf_pi.h */
+/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@mincom.oz.au).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@mincom.oz.au).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@mincom.oz.au)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@mincom.oz.au)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+const BF_LONG bf_init_P[BF_ROUNDS + 2] = {
+ 0x243f6a88L, 0x85a308d3L, 0x13198a2eL, 0x03707344L,
+ 0xa4093822L, 0x299f31d0L, 0x082efa98L, 0xec4e6c89L,
+ 0x452821e6L, 0x38d01377L, 0xbe5466cfL, 0x34e90c6cL,
+ 0xc0ac29b7L, 0xc97c50ddL, 0x3f84d5b5L, 0xb5470917L,
+ 0x9216d5d9L, 0x8979fb1b
+};
+const BF_LONG bf_init_S[4 * 256] = {
+ 0xd1310ba6L, 0x98dfb5acL, 0x2ffd72dbL, 0xd01adfb7L,
+ 0xb8e1afedL, 0x6a267e96L, 0xba7c9045L, 0xf12c7f99L,
+ 0x24a19947L, 0xb3916cf7L, 0x0801f2e2L, 0x858efc16L,
+ 0x636920d8L, 0x71574e69L, 0xa458fea3L, 0xf4933d7eL,
+ 0x0d95748fL, 0x728eb658L, 0x718bcd58L, 0x82154aeeL,
+ 0x7b54a41dL, 0xc25a59b5L, 0x9c30d539L, 0x2af26013L,
+ 0xc5d1b023L, 0x286085f0L, 0xca417918L, 0xb8db38efL,
+ 0x8e79dcb0L, 0x603a180eL, 0x6c9e0e8bL, 0xb01e8a3eL,
+ 0xd71577c1L, 0xbd314b27L, 0x78af2fdaL, 0x55605c60L,
+ 0xe65525f3L, 0xaa55ab94L, 0x57489862L, 0x63e81440L,
+ 0x55ca396aL, 0x2aab10b6L, 0xb4cc5c34L, 0x1141e8ceL,
+ 0xa15486afL, 0x7c72e993L, 0xb3ee1411L, 0x636fbc2aL,
+ 0x2ba9c55dL, 0x741831f6L, 0xce5c3e16L, 0x9b87931eL,
+ 0xafd6ba33L, 0x6c24cf5cL, 0x7a325381L, 0x28958677L,
+ 0x3b8f4898L, 0x6b4bb9afL, 0xc4bfe81bL, 0x66282193L,
+ 0x61d809ccL, 0xfb21a991L, 0x487cac60L, 0x5dec8032L,
+ 0xef845d5dL, 0xe98575b1L, 0xdc262302L, 0xeb651b88L,
+ 0x23893e81L, 0xd396acc5L, 0x0f6d6ff3L, 0x83f44239L,
+ 0x2e0b4482L, 0xa4842004L, 0x69c8f04aL, 0x9e1f9b5eL,
+ 0x21c66842L, 0xf6e96c9aL, 0x670c9c61L, 0xabd388f0L,
+ 0x6a51a0d2L, 0xd8542f68L, 0x960fa728L, 0xab5133a3L,
+ 0x6eef0b6cL, 0x137a3be4L, 0xba3bf050L, 0x7efb2a98L,
+ 0xa1f1651dL, 0x39af0176L, 0x66ca593eL, 0x82430e88L,
+ 0x8cee8619L, 0x456f9fb4L, 0x7d84a5c3L, 0x3b8b5ebeL,
+ 0xe06f75d8L, 0x85c12073L, 0x401a449fL, 0x56c16aa6L,
+ 0x4ed3aa62L, 0x363f7706L, 0x1bfedf72L, 0x429b023dL,
+ 0x37d0d724L, 0xd00a1248L, 0xdb0fead3L, 0x49f1c09bL,
+ 0x075372c9L, 0x80991b7bL, 0x25d479d8L, 0xf6e8def7L,
+ 0xe3fe501aL, 0xb6794c3bL, 0x976ce0bdL, 0x04c006baL,
+ 0xc1a94fb6L, 0x409f60c4L, 0x5e5c9ec2L, 0x196a2463L,
+ 0x68fb6fafL, 0x3e6c53b5L, 0x1339b2ebL, 0x3b52ec6fL,
+ 0x6dfc511fL, 0x9b30952cL, 0xcc814544L, 0xaf5ebd09L,
+ 0xbee3d004L, 0xde334afdL, 0x660f2807L, 0x192e4bb3L,
+ 0xc0cba857L, 0x45c8740fL, 0xd20b5f39L, 0xb9d3fbdbL,
+ 0x5579c0bdL, 0x1a60320aL, 0xd6a100c6L, 0x402c7279L,
+ 0x679f25feL, 0xfb1fa3ccL, 0x8ea5e9f8L, 0xdb3222f8L,
+ 0x3c7516dfL, 0xfd616b15L, 0x2f501ec8L, 0xad0552abL,
+ 0x323db5faL, 0xfd238760L, 0x53317b48L, 0x3e00df82L,
+ 0x9e5c57bbL, 0xca6f8ca0L, 0x1a87562eL, 0xdf1769dbL,
+ 0xd542a8f6L, 0x287effc3L, 0xac6732c6L, 0x8c4f5573L,
+ 0x695b27b0L, 0xbbca58c8L, 0xe1ffa35dL, 0xb8f011a0L,
+ 0x10fa3d98L, 0xfd2183b8L, 0x4afcb56cL, 0x2dd1d35bL,
+ 0x9a53e479L, 0xb6f84565L, 0xd28e49bcL, 0x4bfb9790L,
+ 0xe1ddf2daL, 0xa4cb7e33L, 0x62fb1341L, 0xcee4c6e8L,
+ 0xef20cadaL, 0x36774c01L, 0xd07e9efeL, 0x2bf11fb4L,
+ 0x95dbda4dL, 0xae909198L, 0xeaad8e71L, 0x6b93d5a0L,
+ 0xd08ed1d0L, 0xafc725e0L, 0x8e3c5b2fL, 0x8e7594b7L,
+ 0x8ff6e2fbL, 0xf2122b64L, 0x8888b812L, 0x900df01cL,
+ 0x4fad5ea0L, 0x688fc31cL, 0xd1cff191L, 0xb3a8c1adL,
+ 0x2f2f2218L, 0xbe0e1777L, 0xea752dfeL, 0x8b021fa1L,
+ 0xe5a0cc0fL, 0xb56f74e8L, 0x18acf3d6L, 0xce89e299L,
+ 0xb4a84fe0L, 0xfd13e0b7L, 0x7cc43b81L, 0xd2ada8d9L,
+ 0x165fa266L, 0x80957705L, 0x93cc7314L, 0x211a1477L,
+ 0xe6ad2065L, 0x77b5fa86L, 0xc75442f5L, 0xfb9d35cfL,
+ 0xebcdaf0cL, 0x7b3e89a0L, 0xd6411bd3L, 0xae1e7e49L,
+ 0x00250e2dL, 0x2071b35eL, 0x226800bbL, 0x57b8e0afL,
+ 0x2464369bL, 0xf009b91eL, 0x5563911dL, 0x59dfa6aaL,
+ 0x78c14389L, 0xd95a537fL, 0x207d5ba2L, 0x02e5b9c5L,
+ 0x83260376L, 0x6295cfa9L, 0x11c81968L, 0x4e734a41L,
+ 0xb3472dcaL, 0x7b14a94aL, 0x1b510052L, 0x9a532915L,
+ 0xd60f573fL, 0xbc9bc6e4L, 0x2b60a476L, 0x81e67400L,
+ 0x08ba6fb5L, 0x571be91fL, 0xf296ec6bL, 0x2a0dd915L,
+ 0xb6636521L, 0xe7b9f9b6L, 0xff34052eL, 0xc5855664L,
+ 0x53b02d5dL, 0xa99f8fa1L, 0x08ba4799L, 0x6e85076aL,
+ 0x4b7a70e9L, 0xb5b32944L, 0xdb75092eL, 0xc4192623L,
+ 0xad6ea6b0L, 0x49a7df7dL, 0x9cee60b8L, 0x8fedb266L,
+ 0xecaa8c71L, 0x699a17ffL, 0x5664526cL, 0xc2b19ee1L,
+ 0x193602a5L, 0x75094c29L, 0xa0591340L, 0xe4183a3eL,
+ 0x3f54989aL, 0x5b429d65L, 0x6b8fe4d6L, 0x99f73fd6L,
+ 0xa1d29c07L, 0xefe830f5L, 0x4d2d38e6L, 0xf0255dc1L,
+ 0x4cdd2086L, 0x8470eb26L, 0x6382e9c6L, 0x021ecc5eL,
+ 0x09686b3fL, 0x3ebaefc9L, 0x3c971814L, 0x6b6a70a1L,
+ 0x687f3584L, 0x52a0e286L, 0xb79c5305L, 0xaa500737L,
+ 0x3e07841cL, 0x7fdeae5cL, 0x8e7d44ecL, 0x5716f2b8L,
+ 0xb03ada37L, 0xf0500c0dL, 0xf01c1f04L, 0x0200b3ffL,
+ 0xae0cf51aL, 0x3cb574b2L, 0x25837a58L, 0xdc0921bdL,
+ 0xd19113f9L, 0x7ca92ff6L, 0x94324773L, 0x22f54701L,
+ 0x3ae5e581L, 0x37c2dadcL, 0xc8b57634L, 0x9af3dda7L,
+ 0xa9446146L, 0x0fd0030eL, 0xecc8c73eL, 0xa4751e41L,
+ 0xe238cd99L, 0x3bea0e2fL, 0x3280bba1L, 0x183eb331L,
+ 0x4e548b38L, 0x4f6db908L, 0x6f420d03L, 0xf60a04bfL,
+ 0x2cb81290L, 0x24977c79L, 0x5679b072L, 0xbcaf89afL,
+ 0xde9a771fL, 0xd9930810L, 0xb38bae12L, 0xdccf3f2eL,
+ 0x5512721fL, 0x2e6b7124L, 0x501adde6L, 0x9f84cd87L,
+ 0x7a584718L, 0x7408da17L, 0xbc9f9abcL, 0xe94b7d8cL,
+ 0xec7aec3aL, 0xdb851dfaL, 0x63094366L, 0xc464c3d2L,
+ 0xef1c1847L, 0x3215d908L, 0xdd433b37L, 0x24c2ba16L,
+ 0x12a14d43L, 0x2a65c451L, 0x50940002L, 0x133ae4ddL,
+ 0x71dff89eL, 0x10314e55L, 0x81ac77d6L, 0x5f11199bL,
+ 0x043556f1L, 0xd7a3c76bL, 0x3c11183bL, 0x5924a509L,
+ 0xf28fe6edL, 0x97f1fbfaL, 0x9ebabf2cL, 0x1e153c6eL,
+ 0x86e34570L, 0xeae96fb1L, 0x860e5e0aL, 0x5a3e2ab3L,
+ 0x771fe71cL, 0x4e3d06faL, 0x2965dcb9L, 0x99e71d0fL,
+ 0x803e89d6L, 0x5266c825L, 0x2e4cc978L, 0x9c10b36aL,
+ 0xc6150ebaL, 0x94e2ea78L, 0xa5fc3c53L, 0x1e0a2df4L,
+ 0xf2f74ea7L, 0x361d2b3dL, 0x1939260fL, 0x19c27960L,
+ 0x5223a708L, 0xf71312b6L, 0xebadfe6eL, 0xeac31f66L,
+ 0xe3bc4595L, 0xa67bc883L, 0xb17f37d1L, 0x018cff28L,
+ 0xc332ddefL, 0xbe6c5aa5L, 0x65582185L, 0x68ab9802L,
+ 0xeecea50fL, 0xdb2f953bL, 0x2aef7dadL, 0x5b6e2f84L,
+ 0x1521b628L, 0x29076170L, 0xecdd4775L, 0x619f1510L,
+ 0x13cca830L, 0xeb61bd96L, 0x0334fe1eL, 0xaa0363cfL,
+ 0xb5735c90L, 0x4c70a239L, 0xd59e9e0bL, 0xcbaade14L,
+ 0xeecc86bcL, 0x60622ca7L, 0x9cab5cabL, 0xb2f3846eL,
+ 0x648b1eafL, 0x19bdf0caL, 0xa02369b9L, 0x655abb50L,
+ 0x40685a32L, 0x3c2ab4b3L, 0x319ee9d5L, 0xc021b8f7L,
+ 0x9b540b19L, 0x875fa099L, 0x95f7997eL, 0x623d7da8L,
+ 0xf837889aL, 0x97e32d77L, 0x11ed935fL, 0x16681281L,
+ 0x0e358829L, 0xc7e61fd6L, 0x96dedfa1L, 0x7858ba99L,
+ 0x57f584a5L, 0x1b227263L, 0x9b83c3ffL, 0x1ac24696L,
+ 0xcdb30aebL, 0x532e3054L, 0x8fd948e4L, 0x6dbc3128L,
+ 0x58ebf2efL, 0x34c6ffeaL, 0xfe28ed61L, 0xee7c3c73L,
+ 0x5d4a14d9L, 0xe864b7e3L, 0x42105d14L, 0x203e13e0L,
+ 0x45eee2b6L, 0xa3aaabeaL, 0xdb6c4f15L, 0xfacb4fd0L,
+ 0xc742f442L, 0xef6abbb5L, 0x654f3b1dL, 0x41cd2105L,
+ 0xd81e799eL, 0x86854dc7L, 0xe44b476aL, 0x3d816250L,
+ 0xcf62a1f2L, 0x5b8d2646L, 0xfc8883a0L, 0xc1c7b6a3L,
+ 0x7f1524c3L, 0x69cb7492L, 0x47848a0bL, 0x5692b285L,
+ 0x095bbf00L, 0xad19489dL, 0x1462b174L, 0x23820e00L,
+ 0x58428d2aL, 0x0c55f5eaL, 0x1dadf43eL, 0x233f7061L,
+ 0x3372f092L, 0x8d937e41L, 0xd65fecf1L, 0x6c223bdbL,
+ 0x7cde3759L, 0xcbee7460L, 0x4085f2a7L, 0xce77326eL,
+ 0xa6078084L, 0x19f8509eL, 0xe8efd855L, 0x61d99735L,
+ 0xa969a7aaL, 0xc50c06c2L, 0x5a04abfcL, 0x800bcadcL,
+ 0x9e447a2eL, 0xc3453484L, 0xfdd56705L, 0x0e1e9ec9L,
+ 0xdb73dbd3L, 0x105588cdL, 0x675fda79L, 0xe3674340L,
+ 0xc5c43465L, 0x713e38d8L, 0x3d28f89eL, 0xf16dff20L,
+ 0x153e21e7L, 0x8fb03d4aL, 0xe6e39f2bL, 0xdb83adf7L,
+ 0xe93d5a68L, 0x948140f7L, 0xf64c261cL, 0x94692934L,
+ 0x411520f7L, 0x7602d4f7L, 0xbcf46b2eL, 0xd4a20068L,
+ 0xd4082471L, 0x3320f46aL, 0x43b7d4b7L, 0x500061afL,
+ 0x1e39f62eL, 0x97244546L, 0x14214f74L, 0xbf8b8840L,
+ 0x4d95fc1dL, 0x96b591afL, 0x70f4ddd3L, 0x66a02f45L,
+ 0xbfbc09ecL, 0x03bd9785L, 0x7fac6dd0L, 0x31cb8504L,
+ 0x96eb27b3L, 0x55fd3941L, 0xda2547e6L, 0xabca0a9aL,
+ 0x28507825L, 0x530429f4L, 0x0a2c86daL, 0xe9b66dfbL,
+ 0x68dc1462L, 0xd7486900L, 0x680ec0a4L, 0x27a18deeL,
+ 0x4f3ffea2L, 0xe887ad8cL, 0xb58ce006L, 0x7af4d6b6L,
+ 0xaace1e7cL, 0xd3375fecL, 0xce78a399L, 0x406b2a42L,
+ 0x20fe9e35L, 0xd9f385b9L, 0xee39d7abL, 0x3b124e8bL,
+ 0x1dc9faf7L, 0x4b6d1856L, 0x26a36631L, 0xeae397b2L,
+ 0x3a6efa74L, 0xdd5b4332L, 0x6841e7f7L, 0xca7820fbL,
+ 0xfb0af54eL, 0xd8feb397L, 0x454056acL, 0xba489527L,
+ 0x55533a3aL, 0x20838d87L, 0xfe6ba9b7L, 0xd096954bL,
+ 0x55a867bcL, 0xa1159a58L, 0xcca92963L, 0x99e1db33L,
+ 0xa62a4a56L, 0x3f3125f9L, 0x5ef47e1cL, 0x9029317cL,
+ 0xfdf8e802L, 0x04272f70L, 0x80bb155cL, 0x05282ce3L,
+ 0x95c11548L, 0xe4c66d22L, 0x48c1133fL, 0xc70f86dcL,
+ 0x07f9c9eeL, 0x41041f0fL, 0x404779a4L, 0x5d886e17L,
+ 0x325f51ebL, 0xd59bc0d1L, 0xf2bcc18fL, 0x41113564L,
+ 0x257b7834L, 0x602a9c60L, 0xdff8e8a3L, 0x1f636c1bL,
+ 0x0e12b4c2L, 0x02e1329eL, 0xaf664fd1L, 0xcad18115L,
+ 0x6b2395e0L, 0x333e92e1L, 0x3b240b62L, 0xeebeb922L,
+ 0x85b2a20eL, 0xe6ba0d99L, 0xde720c8cL, 0x2da2f728L,
+ 0xd0127845L, 0x95b794fdL, 0x647d0862L, 0xe7ccf5f0L,
+ 0x5449a36fL, 0x877d48faL, 0xc39dfd27L, 0xf33e8d1eL,
+ 0x0a476341L, 0x992eff74L, 0x3a6f6eabL, 0xf4f8fd37L,
+ 0xa812dc60L, 0xa1ebddf8L, 0x991be14cL, 0xdb6e6b0dL,
+ 0xc67b5510L, 0x6d672c37L, 0x2765d43bL, 0xdcd0e804L,
+ 0xf1290dc7L, 0xcc00ffa3L, 0xb5390f92L, 0x690fed0bL,
+ 0x667b9ffbL, 0xcedb7d9cL, 0xa091cf0bL, 0xd9155ea3L,
+ 0xbb132f88L, 0x515bad24L, 0x7b9479bfL, 0x763bd6ebL,
+ 0x37392eb3L, 0xcc115979L, 0x8026e297L, 0xf42e312dL,
+ 0x6842ada7L, 0xc66a2b3bL, 0x12754cccL, 0x782ef11cL,
+ 0x6a124237L, 0xb79251e7L, 0x06a1bbe6L, 0x4bfb6350L,
+ 0x1a6b1018L, 0x11caedfaL, 0x3d25bdd8L, 0xe2e1c3c9L,
+ 0x44421659L, 0x0a121386L, 0xd90cec6eL, 0xd5abea2aL,
+ 0x64af674eL, 0xda86a85fL, 0xbebfe988L, 0x64e4c3feL,
+ 0x9dbc8057L, 0xf0f7c086L, 0x60787bf8L, 0x6003604dL,
+ 0xd1fd8346L, 0xf6381fb0L, 0x7745ae04L, 0xd736fcccL,
+ 0x83426b33L, 0xf01eab71L, 0xb0804187L, 0x3c005e5fL,
+ 0x77a057beL, 0xbde8ae24L, 0x55464299L, 0xbf582e61L,
+ 0x4e58f48fL, 0xf2ddfda2L, 0xf474ef38L, 0x8789bdc2L,
+ 0x5366f9c3L, 0xc8b38e74L, 0xb475f255L, 0x46fcd9b9L,
+ 0x7aeb2661L, 0x8b1ddf84L, 0x846a0e79L, 0x915f95e2L,
+ 0x466e598eL, 0x20b45770L, 0x8cd55591L, 0xc902de4cL,
+ 0xb90bace1L, 0xbb8205d0L, 0x11a86248L, 0x7574a99eL,
+ 0xb77f19b6L, 0xe0a9dc09L, 0x662d09a1L, 0xc4324633L,
+ 0xe85a1f02L, 0x09f0be8cL, 0x4a99a025L, 0x1d6efe10L,
+ 0x1ab93d1dL, 0x0ba5a4dfL, 0xa186f20fL, 0x2868f169L,
+ 0xdcb7da83L, 0x573906feL, 0xa1e2ce9bL, 0x4fcd7f52L,
+ 0x50115e01L, 0xa70683faL, 0xa002b5c4L, 0x0de6d027L,
+ 0x9af88c27L, 0x773f8641L, 0xc3604c06L, 0x61a806b5L,
+ 0xf0177a28L, 0xc0f586e0L, 0x006058aaL, 0x30dc7d62L,
+ 0x11e69ed7L, 0x2338ea63L, 0x53c2dd94L, 0xc2c21634L,
+ 0xbbcbee56L, 0x90bcb6deL, 0xebfc7da1L, 0xce591d76L,
+ 0x6f05e409L, 0x4b7c0188L, 0x39720a3dL, 0x7c927c24L,
+ 0x86e3725fL, 0x724d9db9L, 0x1ac15bb4L, 0xd39eb8fcL,
+ 0xed545578L, 0x08fca5b5L, 0xd83d7cd3L, 0x4dad0fc4L,
+ 0x1e50ef5eL, 0xb161e6f8L, 0xa28514d9L, 0x6c51133cL,
+ 0x6fd5c7e7L, 0x56e14ec4L, 0x362abfceL, 0xddc6c837L,
+ 0xd79a3234L, 0x92638212L, 0x670efa8eL, 0x406000e0L,
+ 0x3a39ce37L, 0xd3faf5cfL, 0xabc27737L, 0x5ac52d1bL,
+ 0x5cb0679eL, 0x4fa33742L, 0xd3822740L, 0x99bc9bbeL,
+ 0xd5118e9dL, 0xbf0f7315L, 0xd62d1c7eL, 0xc700c47bL,
+ 0xb78c1b6bL, 0x21a19045L, 0xb26eb1beL, 0x6a366eb4L,
+ 0x5748ab2fL, 0xbc946e79L, 0xc6a376d2L, 0x6549c2c8L,
+ 0x530ff8eeL, 0x468dde7dL, 0xd5730a1dL, 0x4cd04dc6L,
+ 0x2939bbdbL, 0xa9ba4650L, 0xac9526e8L, 0xbe5ee304L,
+ 0xa1fad5f0L, 0x6a2d519aL, 0x63ef8ce2L, 0x9a86ee22L,
+ 0xc089c2b8L, 0x43242ef6L, 0xa51e03aaL, 0x9cf2d0a4L,
+ 0x83c061baL, 0x9be96a4dL, 0x8fe51550L, 0xba645bd6L,
+ 0x2826a2f9L, 0xa73a3ae1L, 0x4ba99586L, 0xef5562e9L,
+ 0xc72fefd3L, 0xf752f7daL, 0x3f046f69L, 0x77fa0a59L,
+ 0x80e4a915L, 0x87b08601L, 0x9b09e6adL, 0x3b3ee593L,
+ 0xe990fd5aL, 0x9e34d797L, 0x2cf0b7d9L, 0x022b8b51L,
+ 0x96d5ac3aL, 0x017da67dL, 0xd1cf3ed6L, 0x7c7d2d28L,
+ 0x1f9f25cfL, 0xadf2b89bL, 0x5ad6b472L, 0x5a88f54cL,
+ 0xe029ac71L, 0xe019a5e6L, 0x47b0acfdL, 0xed93fa9bL,
+ 0xe8d3c48dL, 0x283b57ccL, 0xf8d56629L, 0x79132e28L,
+ 0x785f0191L, 0xed756055L, 0xf7960e44L, 0xe3d35e8cL,
+ 0x15056dd4L, 0x88f46dbaL, 0x03a16125L, 0x0564f0bdL,
+ 0xc3eb9e15L, 0x3c9057a2L, 0x97271aecL, 0xa93a072aL,
+ 0x1b3f6d9bL, 0x1e6321f5L, 0xf59c66fbL, 0x26dcf319L,
+ 0x7533d928L, 0xb155fdf5L, 0x03563482L, 0x8aba3cbbL,
+ 0x28517711L, 0xc20ad9f8L, 0xabcc5167L, 0xccad925fL,
+ 0x4de81751L, 0x3830dc8eL, 0x379d5862L, 0x9320f991L,
+ 0xea7a90c2L, 0xfb3e7bceL, 0x5121ce64L, 0x774fbe32L,
+ 0xa8b6e37eL, 0xc3293d46L, 0x48de5369L, 0x6413e680L,
+ 0xa2ae0810L, 0xdd6db224L, 0x69852dfdL, 0x09072166L,
+ 0xb39a460aL, 0x6445c0ddL, 0x586cdecfL, 0x1c20c8aeL,
+ 0x5bbef7ddL, 0x1b588d40L, 0xccd2017fL, 0x6bb4e3bbL,
+ 0xdda26a7eL, 0x3a59ff45L, 0x3e350a44L, 0xbcb4cdd5L,
+ 0x72eacea8L, 0xfa6484bbL, 0x8d6612aeL, 0xbf3c6f47L,
+ 0xd29be463L, 0x542f5d9eL, 0xaec2771bL, 0xf64e6370L,
+ 0x740e0d8dL, 0xe75b1357L, 0xf8721671L, 0xaf537d5dL,
+ 0x4040cb08L, 0x4eb4e2ccL, 0x34d2466aL, 0x0115af84L,
+ 0xe1b00428L, 0x95983a1dL, 0x06b89fb4L, 0xce6ea048L,
+ 0x6f3f3b82L, 0x3520ab82L, 0x011a1d4bL, 0x277227f8L,
+ 0x611560b1L, 0xe7933fdcL, 0xbb3a792bL, 0x344525bdL,
+ 0xa08839e1L, 0x51ce794bL, 0x2f32c9b7L, 0xa01fbac9L,
+ 0xe01cc87eL, 0xbcc7d1f6L, 0xcf0111c3L, 0xa1e8aac7L,
+ 0x1a908749L, 0xd44fbd9aL, 0xd0dadecbL, 0xd50ada38L,
+ 0x0339c32aL, 0xc6913667L, 0x8df9317cL, 0xe0b12b4fL,
+ 0xf79e59b7L, 0x43f5bb3aL, 0xf2d519ffL, 0x27d9459cL,
+ 0xbf97222cL, 0x15e6fc2aL, 0x0f91fc71L, 0x9b941525L,
+ 0xfae59361L, 0xceb69cebL, 0xc2a86459L, 0x12baa8d1L,
+ 0xb6c1075eL, 0xe3056a0cL, 0x10d25065L, 0xcb03a442L,
+ 0xe0ec6e0eL, 0x1698db3bL, 0x4c98a0beL, 0x3278e964L,
+ 0x9f1f9532L, 0xe0d392dfL, 0xd3a0342bL, 0x8971f21eL,
+ 0x1b0a7441L, 0x4ba3348cL, 0xc5be7120L, 0xc37632d8L,
+ 0xdf359f8dL, 0x9b992f2eL, 0xe60b6f47L, 0x0fe3f11dL,
+ 0xe54cda54L, 0x1edad891L, 0xce6279cfL, 0xcd3e7e6fL,
+ 0x1618b166L, 0xfd2c1d05L, 0x848fd2c5L, 0xf6fb2299L,
+ 0xf523f357L, 0xa6327623L, 0x93a83531L, 0x56cccd02L,
+ 0xacf08162L, 0x5a75ebb5L, 0x6e163697L, 0x88d273ccL,
+ 0xde966292L, 0x81b949d0L, 0x4c50901bL, 0x71c65614L,
+ 0xe6c6c7bdL, 0x327a140aL, 0x45e1d006L, 0xc3f27b9aL,
+ 0xc9aa53fdL, 0x62a80f00L, 0xbb25bfe2L, 0x35bdd2f6L,
+ 0x71126905L, 0xb2040222L, 0xb6cbcf7cL, 0xcd769c2bL,
+ 0x53113ec0L, 0x1640e3d3L, 0x38abbd60L, 0x2547adf0L,
+ 0xba38209cL, 0xf746ce76L, 0x77afa1c5L, 0x20756060L,
+ 0x85cbfe4eL, 0x8ae88dd8L, 0x7aaaf9b0L, 0x4cf9aa7eL,
+ 0x1948c25cL, 0x02fb8a8cL, 0x01c36ae4L, 0xd6ebe1f9L,
+ 0x90d4f869L, 0xa65cdea0L, 0x3f09252dL, 0xc208e69fL,
+ 0xb74e6132L, 0xce77e25bL, 0x578fdfe3L, 0x3ac372e6L
+};
diff --git a/benchmarks/CHStone/blowfish/bf_skey.c b/benchmarks/CHStone/blowfish/bf_skey.c
new file mode 100755
index 0000000..774b6b5
--- /dev/null
+++ b/benchmarks/CHStone/blowfish/bf_skey.c
@@ -0,0 +1,151 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* crypto/bf/bf_skey.c */
+/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@mincom.oz.au).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@mincom.oz.au).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@mincom.oz.au)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@mincom.oz.au)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+void
+local_memcpy (BF_LONG * s1, const BF_LONG * s2, int n)
+{
+ BF_LONG *p1;
+ const BF_LONG *p2;
+
+ p1 = s1;
+ p2 = s2;
+
+ while (n-- > 0)
+ {
+ *p1 = *p2;
+ p1++;
+ p2++;
+ }
+}
+
+void
+BF_set_key (int len, unsigned char *data)
+{
+ int i;
+ BF_LONG *p, ri, in[2];
+ unsigned char *d, *end;
+
+ local_memcpy (key_P, bf_init_P, BF_ROUNDS + 2);
+ local_memcpy (key_S, bf_init_S, 4 * 256);
+ p = key_P;
+
+ if (len > ((BF_ROUNDS + 2) * 4))
+ len = (BF_ROUNDS + 2) * 4;
+
+ d = data;
+ end = &(data[len]);
+ for (i = 0; i < (BF_ROUNDS + 2); i++)
+ {
+ ri = *(d++);
+ if (d >= end)
+ d = data;
+
+ ri <<= 8;
+ ri |= *(d++);
+ if (d >= end)
+ d = data;
+
+ ri <<= 8;
+ ri |= *(d++);
+ if (d >= end)
+ d = data;
+
+ ri <<= 8;
+ ri |= *(d++);
+ if (d >= end)
+ d = data;
+
+ p[i] ^= ri;
+ }
+
+ in[0] = 0L;
+ in[1] = 0L;
+ for (i = 0; i < (BF_ROUNDS + 2); i += 2)
+ {
+ BF_encrypt (in, BF_ENCRYPT);
+ p[i] = in[0];
+ p[i + 1] = in[1];
+ }
+
+ p = key_S;
+ for (i = 0; i < 4 * 256; i += 2)
+ {
+ BF_encrypt (in, BF_ENCRYPT);
+ p[i] = in[0];
+ p[i + 1] = in[1];
+ }
+
+}
diff --git a/benchmarks/CHStone/blowfish/blowfish.h b/benchmarks/CHStone/blowfish/blowfish.h
new file mode 100755
index 0000000..d6d508f
--- /dev/null
+++ b/benchmarks/CHStone/blowfish/blowfish.h
@@ -0,0 +1,97 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* crypto/bf/blowfish.h */
+/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@mincom.oz.au).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@mincom.oz.au).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@mincom.oz.au)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@mincom.oz.au)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#ifndef HEADER_BLOWFISH_H
+#define HEADER_BLOWFISH_H
+
+#define BF_ENCRYPT 1
+
+/* If you make this 'unsigned int' the pointer variants will work on
+ * the Alpha, otherwise they will not. Strangly using the '8 byte'
+ * BF_LONG and the default 'non-pointer' inner loop is the best configuration
+ * for the Alpha */
+#define BF_LONG unsigned long
+
+#define BF_ROUNDS 16
+BF_LONG key_P[BF_ROUNDS + 2];
+BF_LONG key_S[4 * 256];
+
+void BF_set_key (int len, unsigned char *data);
+void BF_encrypt (BF_LONG * data, int encrypt);
+void BF_cfb64_encrypt (unsigned char *in, unsigned char *out, long length,
+ unsigned char *ivec, int *num, int encrypt);
+
+#endif
diff --git a/benchmarks/CHStone/dfadd/SPARC-GCC.h b/benchmarks/CHStone/dfadd/SPARC-GCC.h
new file mode 100755
index 0000000..523e274
--- /dev/null
+++ b/benchmarks/CHStone/dfadd/SPARC-GCC.h
@@ -0,0 +1,88 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Each of the following `typedef's defines the most convenient type that holds
+| integers of at least as many bits as specified. For example, `uint8' should
+| be the most convenient type that can hold unsigned integers of as many as
+| 8 bits. The `flag' type must be able to hold either a 0 or 1. For most
+| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
+| to the same as `int'.
+*----------------------------------------------------------------------------*/
+typedef int flag;
+typedef int int8;
+typedef int int16;
+
+/*----------------------------------------------------------------------------
+| Each of the following `typedef's defines a type that holds integers
+| of _exactly_ the number of bits specified. For instance, for most
+| implementation of C, `bits16' and `sbits16' should be `typedef'ed to
+| `unsigned short int' and `signed short int' (or `short int'), respectively.
+*----------------------------------------------------------------------------*/
+typedef unsigned short int bits16;
+typedef unsigned int bits32;
+typedef unsigned long long int bits64;
+typedef signed long long int sbits64;
+
+/*----------------------------------------------------------------------------
+| The `LIT64' macro takes as its argument a textual integer literal and
+| if necessary ``marks'' the literal as having a 64-bit integer type.
+| For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
+| appended with the letters `LL' standing for `long long', which is `gcc's
+| name for the 64-bit integer type. Some compilers may allow `LIT64' to be
+| defined as the identity macro: `#define LIT64( a ) a'.
+*----------------------------------------------------------------------------*/
+#define LIT64( a ) a##LL
+
+/*----------------------------------------------------------------------------
+| The macro `INLINE' can be used before functions that should be inlined. If
+| a compiler does not support explicit inlining, this macro should be defined
+| to be `static'.
+*----------------------------------------------------------------------------*/
+#define INLINE
diff --git a/benchmarks/CHStone/dfadd/dfadd.c b/benchmarks/CHStone/dfadd/dfadd.c
new file mode 100755
index 0000000..f364124
--- /dev/null
+++ b/benchmarks/CHStone/dfadd/dfadd.c
@@ -0,0 +1,230 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+#include <stdio.h>
+#include "softfloat.c"
+
+double
+ullong_to_double (unsigned long long x)
+{
+ union
+ {
+ double d;
+ unsigned long long ll;
+ } t;
+
+ t.ll = x;
+ return t.d;
+}
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) |
+| a_input, b_input : input data |
+| z_output : expected output data |
++--------------------------------------------------------------------------+
+*/
+#define N 46
+const float64 a_input[N] = {
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x3FF8000000000000ULL, /* 1.5 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x3FF8000000000000ULL, /* 1.5 */
+ 0xFFF8000000000000ULL, /* nan */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0x8000000000000000ULL, /* -0.0 */
+ 0xBFF8000000000000ULL, /* -1.5 */
+ 0xFFF8000000000000ULL, /* nan */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0x8000000000000000ULL, /* -0.0 */
+ 0xBFF8000000000000ULL, /* -1.5 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x3FF8000000000000ULL, /* 1.5 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0x8000000000000000ULL, /* -0.0 */
+ 0xBFF8000000000000ULL, /* -1.5 */
+ 0xFFF8000000000000ULL, /* nan */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0xC000000000000000ULL /* -2.0 */
+};
+
+const float64 b_input[N] = {
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x3FF8000000000000ULL, /* 1.5 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0x8000000000000000ULL, /* -0.0 */
+ 0xBFF8000000000000ULL, /* -1.5 */
+ 0xFFF8000000000000ULL, /* nan */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0x8000000000000000ULL, /* -inf */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0xFFF8000000000000ULL, /* nan */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0x8000000000000000ULL, /* -0.0 */
+ 0xBFF8000000000000ULL, /* -1.5 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x3FF8000000000000ULL /* 1.5 */
+};
+
+const float64 z_output[N] = {
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0x400C000000000000ULL, /* 3.5 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0x400C000000000000ULL, /* 3.5 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x4004000000000000ULL, /* 2.5 */
+ 0xFFF8000000000000ULL, /* nan */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0xC00C000000000000ULL, /* -3.5 */
+ 0xFFF8000000000000ULL, /* nan */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0xC00C000000000000ULL, /* -3.5 */
+ 0xFFF8000000000000ULL, /* nan */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0x8000000000000000ULL, /* -0.0 */
+ 0xC004000000000000ULL, /* -2.5 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FFFFFFFFFFFFFFFULL, /* nan */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0xFFF8000000000000ULL, /* nan */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0xBFE0000000000000ULL, /* -0.5 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x3FE0000000000000ULL, /* 0.5 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FFFFFFFFFFFFFFFULL, /* nan */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x3FE0000000000000ULL, /* 0.5 */
+ 0xFFF8000000000000ULL, /* nan */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0xBFE0000000000000ULL /* -0.5 */
+};
+
+int
+main ()
+{
+ int main_result;
+ int i;
+ float64 x1, x2;
+ main_result = 0;
+ for (i = 0; i < N; i++)
+ {
+ float64 result;
+ x1 = a_input[i];
+ x2 = b_input[i];
+ result = float64_add (x1, x2);
+ main_result += (result != z_output[i]);
+
+ printf
+ ("a_input=%016llx b_input=%016llx expected=%016llx output=%016llx (%lf)\n",
+ a_input[i], b_input[i], z_output[i], result,
+ ullong_to_double (result));
+ }
+ printf ("%d\n", main_result);
+ return main_result;
+ }
diff --git a/benchmarks/CHStone/dfadd/milieu.h b/benchmarks/CHStone/dfadd/milieu.h
new file mode 100755
index 0000000..4d92d5e
--- /dev/null
+++ b/benchmarks/CHStone/dfadd/milieu.h
@@ -0,0 +1,53 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Include common integer types and flags.
+*----------------------------------------------------------------------------*/
+#include "SPARC-GCC.h"
diff --git a/benchmarks/CHStone/dfadd/softfloat-macros b/benchmarks/CHStone/dfadd/softfloat-macros
new file mode 100755
index 0000000..ce88997
--- /dev/null
+++ b/benchmarks/CHStone/dfadd/softfloat-macros
@@ -0,0 +1,146 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
+Arithmetic Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal notice) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Shifts `a' right by the number of bits given in `count'. If any nonzero
+| bits are shifted off, they are ``jammed'' into the least significant bit of
+| the result by setting the least significant bit to 1. The value of `count'
+| can be arbitrarily large; in particular, if `count' is greater than 64, the
+| result will be either 0 or 1, depending on whether `a' is zero or nonzero.
+| The result is stored in the location pointed to by `zPtr'.
+*----------------------------------------------------------------------------*/
+
+INLINE void
+shift64RightJamming (bits64 a, int16 count, bits64 * zPtr)
+{
+ bits64 z;
+
+ if (count == 0)
+ {
+ z = a;
+ }
+ else if (count < 64)
+ {
+ z = (a >> count) | ((a << ((-count) & 63)) != 0);
+ }
+ else
+ {
+ z = (a != 0);
+ }
+ *zPtr = z;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the number of leading 0 bits before the most-significant 1 bit of
+| `a'. If `a' is zero, 32 is returned.
+*----------------------------------------------------------------------------*/
+
+static int8
+countLeadingZeros32 (bits32 a)
+{
+ static const int8 countLeadingZerosHigh[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
+ };
+ int8 shiftCount;
+
+ shiftCount = 0;
+ if (a < 0x10000)
+ {
+ shiftCount += 16;
+ a <<= 16;
+ }
+ if (a < 0x1000000)
+ {
+ shiftCount += 8;
+ a <<= 8;
+ }
+ shiftCount += countLeadingZerosHigh[a >> 24];
+ return shiftCount;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the number of leading 0 bits before the most-significant 1 bit of
+| `a'. If `a' is zero, 64 is returned.
+*----------------------------------------------------------------------------*/
+
+static int8
+countLeadingZeros64 (bits64 a)
+{
+ int8 shiftCount;
+
+ shiftCount = 0;
+ if (a < ((bits64) 1) << 32)
+ {
+ shiftCount += 32;
+ }
+ else
+ {
+ a >>= 32;
+ }
+ shiftCount += countLeadingZeros32 (a);
+ return shiftCount;
+
+}
diff --git a/benchmarks/CHStone/dfadd/softfloat-specialize b/benchmarks/CHStone/dfadd/softfloat-specialize
new file mode 100755
index 0000000..3c51059
--- /dev/null
+++ b/benchmarks/CHStone/dfadd/softfloat-specialize
@@ -0,0 +1,123 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
+Arithmetic Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Underflow tininess-detection mode, statically initialized to default value.
+| (The declaration in `softfloat.h' must match the `int8' type here.)
+*----------------------------------------------------------------------------*/
+#define float_detect_tininess float_tininess_before_rounding
+
+/*----------------------------------------------------------------------------
+| Raises the exceptions specified by `flags'. Floating-point traps can be
+| defined here if desired. It is currently not possible for such a trap
+| to substitute a result value. If traps are not implemented, this routine
+| should be simply `float_exception_flags |= flags;'.
+*----------------------------------------------------------------------------*/
+
+void
+float_raise (int8 flags)
+{
+ float_exception_flags |= flags;
+
+}
+
+
+/*----------------------------------------------------------------------------
+| The pattern for a default generated double-precision NaN.
+*----------------------------------------------------------------------------*/
+#define float64_default_nan LIT64( 0x7FFFFFFFFFFFFFFF )
+
+/*----------------------------------------------------------------------------
+| Returns 1 if the double-precision floating-point value `a' is a NaN;
+| otherwise returns 0.
+*----------------------------------------------------------------------------*/
+
+flag
+float64_is_nan (float64 a)
+{
+
+ return (LIT64 (0xFFE0000000000000) < (bits64) (a << 1));
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns 1 if the double-precision floating-point value `a' is a signaling
+| NaN; otherwise returns 0.
+*----------------------------------------------------------------------------*/
+
+flag
+float64_is_signaling_nan (float64 a)
+{
+
+ return (((a >> 51) & 0xFFF) == 0xFFE) && (a & LIT64 (0x0007FFFFFFFFFFFF));
+
+}
+
+/*----------------------------------------------------------------------------
+| Takes two double-precision floating-point values `a' and `b', one of which
+| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+
+static float64
+propagateFloat64NaN (float64 a, float64 b)
+{
+ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN;
+
+ aIsNaN = float64_is_nan (a);
+ aIsSignalingNaN = float64_is_signaling_nan (a);
+ bIsNaN = float64_is_nan (b);
+ bIsSignalingNaN = float64_is_signaling_nan (b);
+ a |= LIT64 (0x0008000000000000);
+ b |= LIT64 (0x0008000000000000);
+ if (aIsSignalingNaN | bIsSignalingNaN)
+ float_raise (float_flag_invalid);
+ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a;
+
+}
diff --git a/benchmarks/CHStone/dfadd/softfloat.c b/benchmarks/CHStone/dfadd/softfloat.c
new file mode 100755
index 0000000..baeedab
--- /dev/null
+++ b/benchmarks/CHStone/dfadd/softfloat.c
@@ -0,0 +1,417 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C source file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+#include "milieu.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Floating-point rounding mode, extended double-precision rounding precision,
+| and exception flags.
+*----------------------------------------------------------------------------*/
+int8 float_rounding_mode = float_round_nearest_even;
+int8 float_exception_flags = 0;
+
+/*----------------------------------------------------------------------------
+| Primitive arithmetic functions, including multi-word arithmetic, and
+| division and square root approximations. (Can be specialized to target if
+| desired.)
+*----------------------------------------------------------------------------*/
+#include "softfloat-macros"
+
+/*----------------------------------------------------------------------------
+| Functions and definitions to determine: (1) whether tininess for underflow
+| is detected before or after rounding by default, (2) what (if anything)
+| happens when exceptions are raised, (3) how signaling NaNs are distinguished
+| from quiet NaNs, (4) the default generated quiet NaNs, and (5) how NaNs
+| are propagated from function inputs to output. These details are target-
+| specific.
+*----------------------------------------------------------------------------*/
+#include "softfloat-specialize"
+
+/*----------------------------------------------------------------------------
+| Returns the fraction bits of the double-precision floating-point value `a'.
+*----------------------------------------------------------------------------*/
+
+INLINE bits64
+extractFloat64Frac (float64 a)
+{
+
+ return a & LIT64 (0x000FFFFFFFFFFFFF);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the exponent bits of the double-precision floating-point value `a'.
+*----------------------------------------------------------------------------*/
+
+INLINE int16
+extractFloat64Exp (float64 a)
+{
+
+ return (a >> 52) & 0x7FF;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the sign bit of the double-precision floating-point value `a'.
+*----------------------------------------------------------------------------*/
+
+INLINE flag
+extractFloat64Sign (float64 a)
+{
+
+ return a >> 63;
+
+}
+
+/*----------------------------------------------------------------------------
+| Packs the sign `zSign', exponent `zExp', and significand `zSig' into a
+| double-precision floating-point value, returning the result. After being
+| shifted into the proper positions, the three fields are simply added
+| together to form the result. This means that any integer portion of `zSig'
+| will be added into the exponent. Since a properly normalized significand
+| will have an integer portion equal to 1, the `zExp' input should be 1 less
+| than the desired result exponent whenever `zSig' is a complete, normalized
+| significand.
+*----------------------------------------------------------------------------*/
+
+INLINE float64
+packFloat64 (flag zSign, int16 zExp, bits64 zSig)
+{
+
+ return (((bits64) zSign) << 63) + (((bits64) zExp) << 52) + zSig;
+
+}
+
+/*----------------------------------------------------------------------------
+| Takes an abstract floating-point value having sign `zSign', exponent `zExp',
+| and significand `zSig', and returns the proper double-precision floating-
+| point value corresponding to the abstract input. Ordinarily, the abstract
+| value is simply rounded and packed into the double-precision format, with
+| the inexact exception raised if the abstract input cannot be represented
+| exactly. However, if the abstract value is too large, the overflow and
+| inexact exceptions are raised and an infinity or maximal finite value is
+| returned. If the abstract value is too small, the input value is rounded
+| to a subnormal number, and the underflow and inexact exceptions are raised
+| if the abstract input cannot be represented exactly as a subnormal double-
+| precision floating-point number.
+| The input significand `zSig' has its binary point between bits 62
+| and 61, which is 10 bits to the left of the usual location. This shifted
+| significand must be normalized or smaller. If `zSig' is not normalized,
+| `zExp' must be 0; in that case, the result returned is a subnormal number,
+| and it must not require rounding. In the usual case that `zSig' is
+| normalized, `zExp' must be 1 less than the ``true'' floating-point exponent.
+| The handling of underflow and overflow follows the IEC/IEEE Standard for
+| Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+static float64
+roundAndPackFloat64 (flag zSign, int16 zExp, bits64 zSig)
+{
+ int8 roundingMode;
+ flag roundNearestEven, isTiny;
+ int16 roundIncrement, roundBits;
+
+ roundingMode = float_rounding_mode;
+ roundNearestEven = (roundingMode == float_round_nearest_even);
+ roundIncrement = 0x200;
+ if (!roundNearestEven)
+ {
+ if (roundingMode == float_round_to_zero)
+ {
+ roundIncrement = 0;
+ }
+ else
+ {
+ roundIncrement = 0x3FF;
+ if (zSign)
+ {
+ if (roundingMode == float_round_up)
+ roundIncrement = 0;
+ }
+ else
+ {
+ if (roundingMode == float_round_down)
+ roundIncrement = 0;
+ }
+ }
+ }
+ roundBits = zSig & 0x3FF;
+ if (0x7FD <= (bits16) zExp)
+ {
+ if ((0x7FD < zExp)
+ || ((zExp == 0x7FD) && ((sbits64) (zSig + roundIncrement) < 0)))
+ {
+ float_raise (float_flag_overflow | float_flag_inexact);
+ return packFloat64 (zSign, 0x7FF, 0) - (roundIncrement == 0);
+ }
+ if (zExp < 0)
+ {
+ isTiny = (float_detect_tininess == float_tininess_before_rounding)
+ || (zExp < -1)
+ || (zSig + roundIncrement < LIT64 (0x8000000000000000));
+ shift64RightJamming (zSig, -zExp, &zSig);
+ zExp = 0;
+ roundBits = zSig & 0x3FF;
+ if (isTiny && roundBits)
+ float_raise (float_flag_underflow);
+ }
+ }
+ if (roundBits)
+ float_exception_flags |= float_flag_inexact;
+ zSig = (zSig + roundIncrement) >> 10;
+ zSig &= ~(((roundBits ^ 0x200) == 0) & roundNearestEven);
+ if (zSig == 0)
+ zExp = 0;
+ return packFloat64 (zSign, zExp, zSig);
+
+}
+
+/*----------------------------------------------------------------------------
+| Takes an abstract floating-point value having sign `zSign', exponent `zExp',
+| and significand `zSig', and returns the proper double-precision floating-
+| point value corresponding to the abstract input. This routine is just like
+| `roundAndPackFloat64' except that `zSig' does not have to be normalized.
+| Bit 63 of `zSig' must be zero, and `zExp' must be 1 less than the ``true''
+| floating-point exponent.
+*----------------------------------------------------------------------------*/
+
+static float64
+normalizeRoundAndPackFloat64 (flag zSign, int16 zExp, bits64 zSig)
+{
+ int8 shiftCount;
+
+ shiftCount = countLeadingZeros64 (zSig) - 1;
+ return roundAndPackFloat64 (zSign, zExp - shiftCount, zSig << shiftCount);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the result of adding the absolute values of the double-precision
+| floating-point values `a' and `b'. If `zSign' is 1, the sum is negated
+| before being returned. `zSign' is ignored if the result is a NaN.
+| The addition is performed according to the IEC/IEEE Standard for Binary
+| Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+static float64
+addFloat64Sigs (float64 a, float64 b, flag zSign)
+{
+ int16 aExp, bExp, zExp;
+ bits64 aSig, bSig, zSig;
+ int16 expDiff;
+
+ aSig = extractFloat64Frac (a);
+ aExp = extractFloat64Exp (a);
+ bSig = extractFloat64Frac (b);
+ bExp = extractFloat64Exp (b);
+ expDiff = aExp - bExp;
+ aSig <<= 9;
+ bSig <<= 9;
+ if (0 < expDiff)
+ {
+ if (aExp == 0x7FF)
+ {
+ if (aSig)
+ return propagateFloat64NaN (a, b);
+ return a;
+ }
+ if (bExp == 0)
+ --expDiff;
+ else
+ bSig |= LIT64 (0x2000000000000000);
+ shift64RightJamming (bSig, expDiff, &bSig);
+ zExp = aExp;
+ }
+ else if (expDiff < 0)
+ {
+ if (bExp == 0x7FF)
+ {
+ if (bSig)
+ return propagateFloat64NaN (a, b);
+ return packFloat64 (zSign, 0x7FF, 0);
+ }
+ if (aExp == 0)
+ ++expDiff;
+ else
+ {
+ aSig |= LIT64 (0x2000000000000000);
+ }
+ shift64RightJamming (aSig, -expDiff, &aSig);
+ zExp = bExp;
+ }
+ else
+ {
+ if (aExp == 0x7FF)
+ {
+ if (aSig | bSig)
+ return propagateFloat64NaN (a, b);
+ return a;
+ }
+ if (aExp == 0)
+ return packFloat64 (zSign, 0, (aSig + bSig) >> 9);
+ zSig = LIT64 (0x4000000000000000) + aSig + bSig;
+ zExp = aExp;
+ goto roundAndPack;
+ }
+ aSig |= LIT64 (0x2000000000000000);
+ zSig = (aSig + bSig) << 1;
+ --zExp;
+ if ((sbits64) zSig < 0)
+ {
+ zSig = aSig + bSig;
+ ++zExp;
+ }
+roundAndPack:
+ return roundAndPackFloat64 (zSign, zExp, zSig);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the result of subtracting the absolute values of the double-
+| precision floating-point values `a' and `b'. If `zSign' is 1, the
+| difference is negated before being returned. `zSign' is ignored if the
+| result is a NaN. The subtraction is performed according to the IEC/IEEE
+| Standard for Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+static float64
+subFloat64Sigs (float64 a, float64 b, flag zSign)
+{
+ int16 aExp, bExp, zExp;
+ bits64 aSig, bSig, zSig;
+ int16 expDiff;
+
+ aSig = extractFloat64Frac (a);
+ aExp = extractFloat64Exp (a);
+ bSig = extractFloat64Frac (b);
+ bExp = extractFloat64Exp (b);
+ expDiff = aExp - bExp;
+ aSig <<= 10;
+ bSig <<= 10;
+ if (0 < expDiff)
+ goto aExpBigger;
+ if (expDiff < 0)
+ goto bExpBigger;
+ if (aExp == 0x7FF)
+ {
+ if (aSig | bSig)
+ return propagateFloat64NaN (a, b);
+ float_raise (float_flag_invalid);
+ return float64_default_nan;
+ }
+ if (aExp == 0)
+ {
+ aExp = 1;
+ bExp = 1;
+ }
+ if (bSig < aSig)
+ goto aBigger;
+ if (aSig < bSig)
+ goto bBigger;
+ return packFloat64 (float_rounding_mode == float_round_down, 0, 0);
+bExpBigger:
+ if (bExp == 0x7FF)
+ {
+ if (bSig)
+ return propagateFloat64NaN (a, b);
+ return packFloat64 (zSign ^ 1, 0x7FF, 0);
+ }
+ if (aExp == 0)
+ ++expDiff;
+ else
+ aSig |= LIT64 (0x4000000000000000);
+ shift64RightJamming (aSig, -expDiff, &aSig);
+ bSig |= LIT64 (0x4000000000000000);
+bBigger:
+ zSig = bSig - aSig;
+ zExp = bExp;
+ zSign ^= 1;
+ goto normalizeRoundAndPack;
+aExpBigger:
+ if (aExp == 0x7FF)
+ {
+ if (aSig)
+ return propagateFloat64NaN (a, b);
+ return a;
+ }
+ if (bExp == 0)
+ --expDiff;
+ else
+ bSig |= LIT64 (0x4000000000000000);
+ shift64RightJamming (bSig, expDiff, &bSig);
+ aSig |= LIT64 (0x4000000000000000);
+aBigger:
+ zSig = aSig - bSig;
+ zExp = aExp;
+normalizeRoundAndPack:
+ --zExp;
+ return normalizeRoundAndPackFloat64 (zSign, zExp, zSig);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the result of adding the double-precision floating-point values `a'
+| and `b'. The operation is performed according to the IEC/IEEE Standard for
+| Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+float64
+float64_add (float64 a, float64 b)
+{
+ flag aSign, bSign;
+
+ aSign = extractFloat64Sign (a);
+ bSign = extractFloat64Sign (b);
+ if (aSign == bSign)
+ return addFloat64Sigs (a, b, aSign);
+ else
+ return subFloat64Sigs (a, b, aSign);
+
+}
diff --git a/benchmarks/CHStone/dfadd/softfloat.h b/benchmarks/CHStone/dfadd/softfloat.h
new file mode 100755
index 0000000..6d075ca
--- /dev/null
+++ b/benchmarks/CHStone/dfadd/softfloat.h
@@ -0,0 +1,77 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point types.
+*----------------------------------------------------------------------------*/
+typedef unsigned int float32;
+typedef unsigned long long float64;
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point underflow tininess-detection mode.
+*----------------------------------------------------------------------------*/
+#define float_tininess_after_rounding 0
+#define float_tininess_before_rounding 1
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point rounding mode.
+*----------------------------------------------------------------------------*/
+#define float_round_nearest_even 0
+#define float_round_to_zero 1
+#define float_round_up 2
+#define float_round_down 3
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point exception flags.
+*----------------------------------------------------------------------------*/
+#define float_flag_inexact 1
+#define float_flag_divbyzero 2
+#define float_flag_underflow 4
+#define float_flag_overflow 8
+#define float_flag_invalid 16
diff --git a/benchmarks/CHStone/dfdiv/SPARC-GCC.h b/benchmarks/CHStone/dfdiv/SPARC-GCC.h
new file mode 100755
index 0000000..523e274
--- /dev/null
+++ b/benchmarks/CHStone/dfdiv/SPARC-GCC.h
@@ -0,0 +1,88 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Each of the following `typedef's defines the most convenient type that holds
+| integers of at least as many bits as specified. For example, `uint8' should
+| be the most convenient type that can hold unsigned integers of as many as
+| 8 bits. The `flag' type must be able to hold either a 0 or 1. For most
+| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
+| to the same as `int'.
+*----------------------------------------------------------------------------*/
+typedef int flag;
+typedef int int8;
+typedef int int16;
+
+/*----------------------------------------------------------------------------
+| Each of the following `typedef's defines a type that holds integers
+| of _exactly_ the number of bits specified. For instance, for most
+| implementation of C, `bits16' and `sbits16' should be `typedef'ed to
+| `unsigned short int' and `signed short int' (or `short int'), respectively.
+*----------------------------------------------------------------------------*/
+typedef unsigned short int bits16;
+typedef unsigned int bits32;
+typedef unsigned long long int bits64;
+typedef signed long long int sbits64;
+
+/*----------------------------------------------------------------------------
+| The `LIT64' macro takes as its argument a textual integer literal and
+| if necessary ``marks'' the literal as having a 64-bit integer type.
+| For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
+| appended with the letters `LL' standing for `long long', which is `gcc's
+| name for the 64-bit integer type. Some compilers may allow `LIT64' to be
+| defined as the identity macro: `#define LIT64( a ) a'.
+*----------------------------------------------------------------------------*/
+#define LIT64( a ) a##LL
+
+/*----------------------------------------------------------------------------
+| The macro `INLINE' can be used before functions that should be inlined. If
+| a compiler does not support explicit inlining, this macro should be defined
+| to be `static'.
+*----------------------------------------------------------------------------*/
+#define INLINE
diff --git a/benchmarks/CHStone/dfdiv/dfdiv.c b/benchmarks/CHStone/dfdiv/dfdiv.c
new file mode 100755
index 0000000..7fd9823
--- /dev/null
+++ b/benchmarks/CHStone/dfdiv/dfdiv.c
@@ -0,0 +1,159 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+#include <stdio.h>
+#include "softfloat.c"
+
+double
+ullong_to_double (unsigned long long x)
+{
+ union
+ {
+ double d;
+ unsigned long long ll;
+ } t;
+
+ t.ll = x;
+ return t.d;
+}
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) |
+| a_input, b_input : input data |
+| z_output : expected output data |
++--------------------------------------------------------------------------+
+*/
+#define N 22
+
+const float64 a_input[N] = {
+ 0x7FFF000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x8000000000000000ULL, /* -0.0 */
+ 0x4008000000000000ULL, /* 3.0 */
+ 0xC008000000000000ULL, /* -3.0 */
+ 0x4008000000000000ULL, /* 3.0 */
+ 0xC008000000000000ULL, /* -3.0 */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0xBFF0000000000000ULL, /* -1.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0xBFF0000000000000ULL /* -1.0 */
+};
+
+const float64 b_input[N] = {
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0xC000000000000000ULL, /* 2.0 */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0x4010000000000000ULL, /* 4.0 */
+ 0x4010000000000000ULL, /* 4.0 */
+ 0xC010000000000000ULL, /* -4.0 */
+ 0xC010000000000000ULL, /* -4.0 */
+ 0x3FF8000000000000ULL, /* 1.5 */
+ 0x3FF8000000000000ULL, /* 1.5 */
+ 0xBFF8000000000000ULL, /* -1.5 */
+ 0xBFF8000000000000ULL /* -1.5 */
+};
+
+const float64 z_output[N] = {
+ 0x7FFF000000000000ULL, /* nan */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x7FFFFFFFFFFFFFFFULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x7FF8000000000000ULL, /* nan */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x7FFFFFFFFFFFFFFFULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x8000000000000000ULL, /* -0.0 */
+ 0x3FF8000000000000ULL, /* 1.5 */
+ 0xBFF8000000000000ULL, /* -1.5 */
+ 0xBFF8000000000000ULL, /* 1.5 */
+ 0x3FF8000000000000ULL, /* -1.5 */
+ 0x3FE0000000000000ULL, /* 0.5 */
+ 0xBFE0000000000000ULL, /* 5.0 */
+ 0xBFE0000000000000ULL, /* -5.0 */
+ 0x3FE0000000000000ULL, /* 0.5 */
+ 0x3FE5555555555555ULL, /* 0.666667 */
+ 0xBFE5555555555555ULL, /* -0.666667 */
+ 0xBFE5555555555555ULL, /* -0.666667 */
+ 0x3FE5555555555555ULL /* 0.666667 */
+};
+
+int
+main ()
+{
+ int main_result;
+ int i;
+ float64 x1, x2;
+ main_result = 0;
+ for (i = 0; i < N; i++)
+ {
+ float64 result;
+ x1 = a_input[i];
+ x2 = b_input[i];
+ result = float64_div (x1, x2);
+ main_result += (result != z_output[i]);
+
+ printf
+ ("a_input=%016llx b_input=%016llx expected=%016llx output=%016llx (%lf)\n",
+ a_input[i], b_input[i], z_output[i], result,
+ ullong_to_double (result));
+ }
+ printf ("%d\n", main_result);
+ return main_result;
+ }
diff --git a/benchmarks/CHStone/dfdiv/milieu.h b/benchmarks/CHStone/dfdiv/milieu.h
new file mode 100755
index 0000000..4d92d5e
--- /dev/null
+++ b/benchmarks/CHStone/dfdiv/milieu.h
@@ -0,0 +1,53 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Include common integer types and flags.
+*----------------------------------------------------------------------------*/
+#include "SPARC-GCC.h"
diff --git a/benchmarks/CHStone/dfdiv/softfloat-macros b/benchmarks/CHStone/dfdiv/softfloat-macros
new file mode 100755
index 0000000..a735f74
--- /dev/null
+++ b/benchmarks/CHStone/dfdiv/softfloat-macros
@@ -0,0 +1,247 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
+Arithmetic Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal notice) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Shifts `a' right by the number of bits given in `count'. If any nonzero
+| bits are shifted off, they are ``jammed'' into the least significant bit of
+| the result by setting the least significant bit to 1. The value of `count'
+| can be arbitrarily large; in particular, if `count' is greater than 64, the
+| result will be either 0 or 1, depending on whether `a' is zero or nonzero.
+| The result is stored in the location pointed to by `zPtr'.
+*----------------------------------------------------------------------------*/
+
+INLINE void
+shift64RightJamming (bits64 a, int16 count, bits64 * zPtr)
+{
+ bits64 z;
+
+ if (count == 0)
+ {
+ z = a;
+ }
+ else if (count < 64)
+ {
+ z = (a >> count) | ((a << ((-count) & 63)) != 0);
+ }
+ else
+ {
+ z = (a != 0);
+ }
+ *zPtr = z;
+
+}
+
+/*----------------------------------------------------------------------------
+| Adds the 128-bit value formed by concatenating `a0' and `a1' to the 128-bit
+| value formed by concatenating `b0' and `b1'. Addition is modulo 2^128, so
+| any carry out is lost. The result is broken into two 64-bit pieces which
+| are stored at the locations pointed to by `z0Ptr' and `z1Ptr'.
+*----------------------------------------------------------------------------*/
+
+INLINE void
+add128 (bits64 a0, bits64 a1, bits64 b0, bits64 b1, bits64 * z0Ptr,
+ bits64 * z1Ptr)
+{
+ bits64 z1;
+
+ z1 = a1 + b1;
+ *z1Ptr = z1;
+ *z0Ptr = a0 + b0 + (z1 < a1);
+
+}
+
+/*----------------------------------------------------------------------------
+| Subtracts the 128-bit value formed by concatenating `b0' and `b1' from the
+| 128-bit value formed by concatenating `a0' and `a1'. Subtraction is modulo
+| 2^128, so any borrow out (carry out) is lost. The result is broken into two
+| 64-bit pieces which are stored at the locations pointed to by `z0Ptr' and
+| `z1Ptr'.
+*----------------------------------------------------------------------------*/
+
+INLINE void
+sub128 (bits64 a0, bits64 a1, bits64 b0, bits64 b1, bits64 * z0Ptr,
+ bits64 * z1Ptr)
+{
+
+ *z1Ptr = a1 - b1;
+ *z0Ptr = a0 - b0 - (a1 < b1);
+
+}
+
+/*----------------------------------------------------------------------------
+| Multiplies `a' by `b' to obtain a 128-bit product. The product is broken
+| into two 64-bit pieces which are stored at the locations pointed to by
+| `z0Ptr' and `z1Ptr'.
+*----------------------------------------------------------------------------*/
+
+INLINE void
+mul64To128 (bits64 a, bits64 b, bits64 * z0Ptr, bits64 * z1Ptr)
+{
+ bits32 aHigh, aLow, bHigh, bLow;
+ bits64 z0, zMiddleA, zMiddleB, z1;
+
+ aLow = a;
+ aHigh = a >> 32;
+ bLow = b;
+ bHigh = b >> 32;
+ z1 = ((bits64) aLow) * bLow;
+ zMiddleA = ((bits64) aLow) * bHigh;
+ zMiddleB = ((bits64) aHigh) * bLow;
+ z0 = ((bits64) aHigh) * bHigh;
+ zMiddleA += zMiddleB;
+ z0 += (((bits64) (zMiddleA < zMiddleB)) << 32) + (zMiddleA >> 32);
+ zMiddleA <<= 32;
+ z1 += zMiddleA;
+ z0 += (z1 < zMiddleA);
+ *z1Ptr = z1;
+ *z0Ptr = z0;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns an approximation to the 64-bit integer quotient obtained by dividing
+| `b' into the 128-bit value formed by concatenating `a0' and `a1'. The
+| divisor `b' must be at least 2^63. If q is the exact quotient truncated
+| toward zero, the approximation returned lies between q and q + 2 inclusive.
+| If the exact quotient q is larger than 64 bits, the maximum positive 64-bit
+| unsigned integer is returned.
+*----------------------------------------------------------------------------*/
+
+static bits64
+estimateDiv128To64 (bits64 a0, bits64 a1, bits64 b)
+{
+ bits64 b0, b1;
+ bits64 rem0, rem1, term0, term1;
+ bits64 z;
+
+ if (b <= a0)
+ return LIT64 (0xFFFFFFFFFFFFFFFF);
+ b0 = b >> 32;
+ z = (b0 << 32 <= a0) ? LIT64 (0xFFFFFFFF00000000) : (a0 / b0) << 32;
+ mul64To128 (b, z, &term0, &term1);
+ sub128 (a0, a1, term0, term1, &rem0, &rem1);
+ while (((sbits64) rem0) < 0)
+ {
+ z -= LIT64 (0x100000000);
+ b1 = b << 32;
+ add128 (rem0, rem1, b0, b1, &rem0, &rem1);
+ }
+ rem0 = (rem0 << 32) | (rem1 >> 32);
+ z |= (b0 << 32 <= rem0) ? 0xFFFFFFFF : rem0 / b0;
+ return z;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the number of leading 0 bits before the most-significant 1 bit of
+| `a'. If `a' is zero, 32 is returned.
+*----------------------------------------------------------------------------*/
+
+static int8
+countLeadingZeros32 (bits32 a)
+{
+ static const int8 countLeadingZerosHigh[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
+ };
+ int8 shiftCount;
+
+ shiftCount = 0;
+ if (a < 0x10000)
+ {
+ shiftCount += 16;
+ a <<= 16;
+ }
+ if (a < 0x1000000)
+ {
+ shiftCount += 8;
+ a <<= 8;
+ }
+ shiftCount += countLeadingZerosHigh[a >> 24];
+ return shiftCount;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the number of leading 0 bits before the most-significant 1 bit of
+| `a'. If `a' is zero, 64 is returned.
+*----------------------------------------------------------------------------*/
+
+static int8
+countLeadingZeros64 (bits64 a)
+{
+ int8 shiftCount;
+
+ shiftCount = 0;
+ if (a < ((bits64) 1) << 32)
+ {
+ shiftCount += 32;
+ }
+ else
+ {
+ a >>= 32;
+ }
+ shiftCount += countLeadingZeros32 (a);
+ return shiftCount;
+
+}
diff --git a/benchmarks/CHStone/dfdiv/softfloat-specialize b/benchmarks/CHStone/dfdiv/softfloat-specialize
new file mode 100755
index 0000000..3c51059
--- /dev/null
+++ b/benchmarks/CHStone/dfdiv/softfloat-specialize
@@ -0,0 +1,123 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
+Arithmetic Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Underflow tininess-detection mode, statically initialized to default value.
+| (The declaration in `softfloat.h' must match the `int8' type here.)
+*----------------------------------------------------------------------------*/
+#define float_detect_tininess float_tininess_before_rounding
+
+/*----------------------------------------------------------------------------
+| Raises the exceptions specified by `flags'. Floating-point traps can be
+| defined here if desired. It is currently not possible for such a trap
+| to substitute a result value. If traps are not implemented, this routine
+| should be simply `float_exception_flags |= flags;'.
+*----------------------------------------------------------------------------*/
+
+void
+float_raise (int8 flags)
+{
+ float_exception_flags |= flags;
+
+}
+
+
+/*----------------------------------------------------------------------------
+| The pattern for a default generated double-precision NaN.
+*----------------------------------------------------------------------------*/
+#define float64_default_nan LIT64( 0x7FFFFFFFFFFFFFFF )
+
+/*----------------------------------------------------------------------------
+| Returns 1 if the double-precision floating-point value `a' is a NaN;
+| otherwise returns 0.
+*----------------------------------------------------------------------------*/
+
+flag
+float64_is_nan (float64 a)
+{
+
+ return (LIT64 (0xFFE0000000000000) < (bits64) (a << 1));
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns 1 if the double-precision floating-point value `a' is a signaling
+| NaN; otherwise returns 0.
+*----------------------------------------------------------------------------*/
+
+flag
+float64_is_signaling_nan (float64 a)
+{
+
+ return (((a >> 51) & 0xFFF) == 0xFFE) && (a & LIT64 (0x0007FFFFFFFFFFFF));
+
+}
+
+/*----------------------------------------------------------------------------
+| Takes two double-precision floating-point values `a' and `b', one of which
+| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+
+static float64
+propagateFloat64NaN (float64 a, float64 b)
+{
+ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN;
+
+ aIsNaN = float64_is_nan (a);
+ aIsSignalingNaN = float64_is_signaling_nan (a);
+ bIsNaN = float64_is_nan (b);
+ bIsSignalingNaN = float64_is_signaling_nan (b);
+ a |= LIT64 (0x0008000000000000);
+ b |= LIT64 (0x0008000000000000);
+ if (aIsSignalingNaN | bIsSignalingNaN)
+ float_raise (float_flag_invalid);
+ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a;
+
+}
diff --git a/benchmarks/CHStone/dfdiv/softfloat.c b/benchmarks/CHStone/dfdiv/softfloat.c
new file mode 100755
index 0000000..8604da3
--- /dev/null
+++ b/benchmarks/CHStone/dfdiv/softfloat.c
@@ -0,0 +1,316 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C source file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+#include "milieu.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Floating-point rounding mode, extended double-precision rounding precision,
+| and exception flags.
+*----------------------------------------------------------------------------*/
+int8 float_rounding_mode = float_round_nearest_even;
+int8 float_exception_flags = 0;
+
+/*----------------------------------------------------------------------------
+| Primitive arithmetic functions, including multi-word arithmetic, and
+| division and square root approximations. (Can be specialized to target if
+| desired.)
+*----------------------------------------------------------------------------*/
+#include "softfloat-macros"
+
+/*----------------------------------------------------------------------------
+| Functions and definitions to determine: (1) whether tininess for underflow
+| is detected before or after rounding by default, (2) what (if anything)
+| happens when exceptions are raised, (3) how signaling NaNs are distinguished
+| from quiet NaNs, (4) the default generated quiet NaNs, and (5) how NaNs
+| are propagated from function inputs to output. These details are target-
+| specific.
+*----------------------------------------------------------------------------*/
+#include "softfloat-specialize"
+
+/*----------------------------------------------------------------------------
+| Returns the fraction bits of the double-precision floating-point value `a'.
+*----------------------------------------------------------------------------*/
+
+INLINE bits64
+extractFloat64Frac (float64 a)
+{
+
+ return a & LIT64 (0x000FFFFFFFFFFFFF);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the exponent bits of the double-precision floating-point value `a'.
+*----------------------------------------------------------------------------*/
+
+INLINE int16
+extractFloat64Exp (float64 a)
+{
+
+ return (a >> 52) & 0x7FF;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the sign bit of the double-precision floating-point value `a'.
+*----------------------------------------------------------------------------*/
+
+INLINE flag
+extractFloat64Sign (float64 a)
+{
+
+ return a >> 63;
+
+}
+
+/*----------------------------------------------------------------------------
+| Normalizes the subnormal double-precision floating-point value represented
+| by the denormalized significand `aSig'. The normalized exponent and
+| significand are stored at the locations pointed to by `zExpPtr' and
+| `zSigPtr', respectively.
+*----------------------------------------------------------------------------*/
+
+static void
+normalizeFloat64Subnormal (bits64 aSig, int16 * zExpPtr, bits64 * zSigPtr)
+{
+ int8 shiftCount;
+
+ shiftCount = countLeadingZeros64 (aSig) - 11;
+ *zSigPtr = aSig << shiftCount;
+ *zExpPtr = 1 - shiftCount;
+
+}
+
+/*----------------------------------------------------------------------------
+| Packs the sign `zSign', exponent `zExp', and significand `zSig' into a
+| double-precision floating-point value, returning the result. After being
+| shifted into the proper positions, the three fields are simply added
+| together to form the result. This means that any integer portion of `zSig'
+| will be added into the exponent. Since a properly normalized significand
+| will have an integer portion equal to 1, the `zExp' input should be 1 less
+| than the desired result exponent whenever `zSig' is a complete, normalized
+| significand.
+*----------------------------------------------------------------------------*/
+
+INLINE float64
+packFloat64 (flag zSign, int16 zExp, bits64 zSig)
+{
+
+ return (((bits64) zSign) << 63) + (((bits64) zExp) << 52) + zSig;
+
+}
+
+/*----------------------------------------------------------------------------
+| Takes an abstract floating-point value having sign `zSign', exponent `zExp',
+| and significand `zSig', and returns the proper double-precision floating-
+| point value corresponding to the abstract input. Ordinarily, the abstract
+| value is simply rounded and packed into the double-precision format, with
+| the inexact exception raised if the abstract input cannot be represented
+| exactly. However, if the abstract value is too large, the overflow and
+| inexact exceptions are raised and an infinity or maximal finite value is
+| returned. If the abstract value is too small, the input value is rounded
+| to a subnormal number, and the underflow and inexact exceptions are raised
+| if the abstract input cannot be represented exactly as a subnormal double-
+| precision floating-point number.
+| The input significand `zSig' has its binary point between bits 62
+| and 61, which is 10 bits to the left of the usual location. This shifted
+| significand must be normalized or smaller. If `zSig' is not normalized,
+| `zExp' must be 0; in that case, the result returned is a subnormal number,
+| and it must not require rounding. In the usual case that `zSig' is
+| normalized, `zExp' must be 1 less than the ``true'' floating-point exponent.
+| The handling of underflow and overflow follows the IEC/IEEE Standard for
+| Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+static float64
+roundAndPackFloat64 (flag zSign, int16 zExp, bits64 zSig)
+{
+ int8 roundingMode;
+ flag roundNearestEven, isTiny;
+ int16 roundIncrement, roundBits;
+
+ roundingMode = float_rounding_mode;
+ roundNearestEven = (roundingMode == float_round_nearest_even);
+ roundIncrement = 0x200;
+ if (!roundNearestEven)
+ {
+ if (roundingMode == float_round_to_zero)
+ {
+ roundIncrement = 0;
+ }
+ else
+ {
+ roundIncrement = 0x3FF;
+ if (zSign)
+ {
+ if (roundingMode == float_round_up)
+ roundIncrement = 0;
+ }
+ else
+ {
+ if (roundingMode == float_round_down)
+ roundIncrement = 0;
+ }
+ }
+ }
+ roundBits = zSig & 0x3FF;
+ if (0x7FD <= (bits16) zExp)
+ {
+ if ((0x7FD < zExp)
+ || ((zExp == 0x7FD) && ((sbits64) (zSig + roundIncrement) < 0)))
+ {
+ float_raise (float_flag_overflow | float_flag_inexact);
+ return packFloat64 (zSign, 0x7FF, 0) - (roundIncrement == 0);
+ }
+ if (zExp < 0)
+ {
+ isTiny = (float_detect_tininess == float_tininess_before_rounding)
+ || (zExp < -1)
+ || (zSig + roundIncrement < LIT64 (0x8000000000000000));
+ shift64RightJamming (zSig, -zExp, &zSig);
+ zExp = 0;
+ roundBits = zSig & 0x3FF;
+ if (isTiny && roundBits)
+ float_raise (float_flag_underflow);
+ }
+ }
+ if (roundBits)
+ float_exception_flags |= float_flag_inexact;
+ zSig = (zSig + roundIncrement) >> 10;
+ zSig &= ~(((roundBits ^ 0x200) == 0) & roundNearestEven);
+ if (zSig == 0)
+ zExp = 0;
+ return packFloat64 (zSign, zExp, zSig);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the result of dividing the double-precision floating-point value `a'
+| by the corresponding value `b'. The operation is performed according to
+| the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+float64
+float64_div (float64 a, float64 b)
+{
+ flag aSign, bSign, zSign;
+ int16 aExp, bExp, zExp;
+ bits64 aSig, bSig, zSig;
+ bits64 rem0, rem1, term0, term1;
+
+ aSig = extractFloat64Frac (a);
+ aExp = extractFloat64Exp (a);
+ aSign = extractFloat64Sign (a);
+ bSig = extractFloat64Frac (b);
+ bExp = extractFloat64Exp (b);
+ bSign = extractFloat64Sign (b);
+ zSign = aSign ^ bSign;
+ if (aExp == 0x7FF)
+ {
+ if (aSig)
+ return propagateFloat64NaN (a, b);
+ if (bExp == 0x7FF)
+ {
+ if (bSig)
+ return propagateFloat64NaN (a, b);
+ float_raise (float_flag_invalid);
+ return float64_default_nan;
+ }
+ return packFloat64 (zSign, 0x7FF, 0);
+ }
+ if (bExp == 0x7FF)
+ {
+ if (bSig)
+ return propagateFloat64NaN (a, b);
+ return packFloat64 (zSign, 0, 0);
+ }
+ if (bExp == 0)
+ {
+ if (bSig == 0)
+ {
+ if ((aExp | aSig) == 0)
+ {
+ float_raise (float_flag_invalid);
+ return float64_default_nan;
+ }
+ float_raise (float_flag_divbyzero);
+ return packFloat64 (zSign, 0x7FF, 0);
+ }
+ normalizeFloat64Subnormal (bSig, &bExp, &bSig);
+ }
+ if (aExp == 0)
+ {
+ if (aSig == 0)
+ return packFloat64 (zSign, 0, 0);
+ normalizeFloat64Subnormal (aSig, &aExp, &aSig);
+ }
+ zExp = aExp - bExp + 0x3FD;
+ aSig = (aSig | LIT64 (0x0010000000000000)) << 10;
+ bSig = (bSig | LIT64 (0x0010000000000000)) << 11;
+ if (bSig <= (aSig + aSig))
+ {
+ aSig >>= 1;
+ ++zExp;
+ }
+ zSig = estimateDiv128To64 (aSig, 0, bSig);
+ if ((zSig & 0x1FF) <= 2)
+ {
+ mul64To128 (bSig, zSig, &term0, &term1);
+ sub128 (aSig, 0, term0, term1, &rem0, &rem1);
+ while ((sbits64) rem0 < 0)
+ {
+ --zSig;
+ add128 (rem0, rem1, 0, bSig, &rem0, &rem1);
+ }
+ zSig |= (rem1 != 0);
+ }
+ return roundAndPackFloat64 (zSign, zExp, zSig);
+
+}
diff --git a/benchmarks/CHStone/dfdiv/softfloat.h b/benchmarks/CHStone/dfdiv/softfloat.h
new file mode 100755
index 0000000..6d075ca
--- /dev/null
+++ b/benchmarks/CHStone/dfdiv/softfloat.h
@@ -0,0 +1,77 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point types.
+*----------------------------------------------------------------------------*/
+typedef unsigned int float32;
+typedef unsigned long long float64;
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point underflow tininess-detection mode.
+*----------------------------------------------------------------------------*/
+#define float_tininess_after_rounding 0
+#define float_tininess_before_rounding 1
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point rounding mode.
+*----------------------------------------------------------------------------*/
+#define float_round_nearest_even 0
+#define float_round_to_zero 1
+#define float_round_up 2
+#define float_round_down 3
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point exception flags.
+*----------------------------------------------------------------------------*/
+#define float_flag_inexact 1
+#define float_flag_divbyzero 2
+#define float_flag_underflow 4
+#define float_flag_overflow 8
+#define float_flag_invalid 16
diff --git a/benchmarks/CHStone/dfmul/SPARC-GCC.h b/benchmarks/CHStone/dfmul/SPARC-GCC.h
new file mode 100755
index 0000000..523e274
--- /dev/null
+++ b/benchmarks/CHStone/dfmul/SPARC-GCC.h
@@ -0,0 +1,88 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Each of the following `typedef's defines the most convenient type that holds
+| integers of at least as many bits as specified. For example, `uint8' should
+| be the most convenient type that can hold unsigned integers of as many as
+| 8 bits. The `flag' type must be able to hold either a 0 or 1. For most
+| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
+| to the same as `int'.
+*----------------------------------------------------------------------------*/
+typedef int flag;
+typedef int int8;
+typedef int int16;
+
+/*----------------------------------------------------------------------------
+| Each of the following `typedef's defines a type that holds integers
+| of _exactly_ the number of bits specified. For instance, for most
+| implementation of C, `bits16' and `sbits16' should be `typedef'ed to
+| `unsigned short int' and `signed short int' (or `short int'), respectively.
+*----------------------------------------------------------------------------*/
+typedef unsigned short int bits16;
+typedef unsigned int bits32;
+typedef unsigned long long int bits64;
+typedef signed long long int sbits64;
+
+/*----------------------------------------------------------------------------
+| The `LIT64' macro takes as its argument a textual integer literal and
+| if necessary ``marks'' the literal as having a 64-bit integer type.
+| For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
+| appended with the letters `LL' standing for `long long', which is `gcc's
+| name for the 64-bit integer type. Some compilers may allow `LIT64' to be
+| defined as the identity macro: `#define LIT64( a ) a'.
+*----------------------------------------------------------------------------*/
+#define LIT64( a ) a##LL
+
+/*----------------------------------------------------------------------------
+| The macro `INLINE' can be used before functions that should be inlined. If
+| a compiler does not support explicit inlining, this macro should be defined
+| to be `static'.
+*----------------------------------------------------------------------------*/
+#define INLINE
diff --git a/benchmarks/CHStone/dfmul/dfmul.c b/benchmarks/CHStone/dfmul/dfmul.c
new file mode 100755
index 0000000..f98c5a7
--- /dev/null
+++ b/benchmarks/CHStone/dfmul/dfmul.c
@@ -0,0 +1,152 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+#include <stdio.h>
+#include "softfloat.c"
+
+double
+ullong_to_double (unsigned long long x)
+{
+ union
+ {
+ double d;
+ unsigned long long ll;
+ } t;
+
+ t.ll = x;
+ return t.d;
+}
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) |
+| a_input, b_input : input data |
+| z_output : expected output data |
++--------------------------------------------------------------------------+
+*/
+#define N 20
+const float64 a_input[N] = {
+ 0x7FF0000000000000ULL, /* inf */
+ 0x7FFF000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x8000000000000000ULL, /* -0.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0x3FD0000000000000ULL, /* 0.25 */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0xBFD0000000000000ULL, /* -0.25 */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0xBFD0000000000000ULL, /* -0.25 */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0x3FD0000000000000ULL, /* 0.25 */
+ 0x0000000000000000ULL /* 0.0 */
+};
+
+const float64 b_input[N] = {
+ 0xFFFFFFFFFFFFFFFFULL, /* nan */
+ 0xFFF0000000000000ULL, /* -inf */
+ 0x0000000000000000ULL, /* nan */
+ 0x3FF0000000000000ULL, /* -inf */
+ 0xFFFF000000000000ULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x3FF0000000000000ULL, /* 1.0 */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x8000000000000000ULL, /* -0.0 */
+ 0x3FD0000000000000ULL, /* 0.25 */
+ 0x4000000000000000ULL, /* 2.0 */
+ 0xBFD0000000000000ULL, /* -0.25 */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0xBFD0000000000000ULL, /* -0.25 */
+ 0x4000000000000000ULL, /* -2.0 */
+ 0x3FD0000000000000ULL, /* 0.25 */
+ 0xC000000000000000ULL, /* -2.0 */
+ 0x0000000000000000ULL /* 0.0 */
+};
+
+const float64 z_output[N] = {
+ 0xFFFFFFFFFFFFFFFFULL, /* nan */
+ 0x7FFF000000000000ULL, /* nan */
+ 0x7FFFFFFFFFFFFFFFULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0xFFFF000000000000ULL, /* nan */
+ 0x7FFFFFFFFFFFFFFFULL, /* nan */
+ 0x7FF0000000000000ULL, /* inf */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x8000000000000000ULL, /* -0.0 */
+ 0x0000000000000000ULL, /* 0.0 */
+ 0x8000000000000000ULL, /* -0.0 */
+ 0x3FE0000000000000ULL, /* 0.5 */
+ 0x3FE0000000000000ULL, /* 0.5 */
+ 0x3FE0000000000000ULL, /* 0.5 */
+ 0x3FE0000000000000ULL, /* 0.5 */
+ 0xBFE0000000000000ULL, /* -0.5 */
+ 0xBFE0000000000000ULL, /* -0.5 */
+ 0xBFE0000000000000ULL, /* -0.5 */
+ 0xBFE0000000000000ULL, /* -0.5 */
+ 0x0000000000000000ULL /* 0.0 */
+};
+
+int
+main ()
+{
+ int main_result;
+ int i;
+ float64 x1, x2;
+ main_result = 0;
+ for (i = 0; i < N; i++)
+ {
+ float64 result;
+ x1 = a_input[i];
+ x2 = b_input[i];
+ result = float64_mul (x1, x2);
+ main_result += (result != z_output[i]);
+
+ printf
+ ("a_input=%016llx b_input=%016llx expected=%016llx output=%016llx (%lf)\n",
+ a_input[i], b_input[i], z_output[i], result,
+ ullong_to_double (result));
+ }
+ printf ("%d\n", main_result);
+ return main_result;
+ }
diff --git a/benchmarks/CHStone/dfmul/milieu.h b/benchmarks/CHStone/dfmul/milieu.h
new file mode 100755
index 0000000..4d92d5e
--- /dev/null
+++ b/benchmarks/CHStone/dfmul/milieu.h
@@ -0,0 +1,53 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Include common integer types and flags.
+*----------------------------------------------------------------------------*/
+#include "SPARC-GCC.h"
diff --git a/benchmarks/CHStone/dfmul/softfloat-macros b/benchmarks/CHStone/dfmul/softfloat-macros
new file mode 100755
index 0000000..c8c4835
--- /dev/null
+++ b/benchmarks/CHStone/dfmul/softfloat-macros
@@ -0,0 +1,176 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
+Arithmetic Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal notice) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Shifts `a' right by the number of bits given in `count'. If any nonzero
+| bits are shifted off, they are ``jammed'' into the least significant bit of
+| the result by setting the least significant bit to 1. The value of `count'
+| can be arbitrarily large; in particular, if `count' is greater than 64, the
+| result will be either 0 or 1, depending on whether `a' is zero or nonzero.
+| The result is stored in the location pointed to by `zPtr'.
+*----------------------------------------------------------------------------*/
+
+INLINE void
+shift64RightJamming (bits64 a, int16 count, bits64 * zPtr)
+{
+ bits64 z;
+
+ if (count == 0)
+ {
+ z = a;
+ }
+ else if (count < 64)
+ {
+ z = (a >> count) | ((a << ((-count) & 63)) != 0);
+ }
+ else
+ {
+ z = (a != 0);
+ }
+ *zPtr = z;
+
+}
+
+/*----------------------------------------------------------------------------
+| Multiplies `a' by `b' to obtain a 128-bit product. The product is broken
+| into two 64-bit pieces which are stored at the locations pointed to by
+| `z0Ptr' and `z1Ptr'.
+*----------------------------------------------------------------------------*/
+
+INLINE void
+mul64To128 (bits64 a, bits64 b, bits64 * z0Ptr, bits64 * z1Ptr)
+{
+ bits32 aHigh, aLow, bHigh, bLow;
+ bits64 z0, zMiddleA, zMiddleB, z1;
+
+ aLow = a;
+ aHigh = a >> 32;
+ bLow = b;
+ bHigh = b >> 32;
+ z1 = ((bits64) aLow) * bLow;
+ zMiddleA = ((bits64) aLow) * bHigh;
+ zMiddleB = ((bits64) aHigh) * bLow;
+ z0 = ((bits64) aHigh) * bHigh;
+ zMiddleA += zMiddleB;
+ z0 += (((bits64) (zMiddleA < zMiddleB)) << 32) + (zMiddleA >> 32);
+ zMiddleA <<= 32;
+ z1 += zMiddleA;
+ z0 += (z1 < zMiddleA);
+ *z1Ptr = z1;
+ *z0Ptr = z0;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the number of leading 0 bits before the most-significant 1 bit of
+| `a'. If `a' is zero, 32 is returned.
+*----------------------------------------------------------------------------*/
+
+static int8
+countLeadingZeros32 (bits32 a)
+{
+ static const int8 countLeadingZerosHigh[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
+ };
+ int8 shiftCount;
+
+ shiftCount = 0;
+ if (a < 0x10000)
+ {
+ shiftCount += 16;
+ a <<= 16;
+ }
+ if (a < 0x1000000)
+ {
+ shiftCount += 8;
+ a <<= 8;
+ }
+ shiftCount += countLeadingZerosHigh[a >> 24];
+ return shiftCount;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the number of leading 0 bits before the most-significant 1 bit of
+| `a'. If `a' is zero, 64 is returned.
+*----------------------------------------------------------------------------*/
+
+static int8
+countLeadingZeros64 (bits64 a)
+{
+ int8 shiftCount;
+
+ shiftCount = 0;
+ if (a < ((bits64) 1) << 32)
+ {
+ shiftCount += 32;
+ }
+ else
+ {
+ a >>= 32;
+ }
+ shiftCount += countLeadingZeros32 (a);
+ return shiftCount;
+
+}
diff --git a/benchmarks/CHStone/dfmul/softfloat-specialize b/benchmarks/CHStone/dfmul/softfloat-specialize
new file mode 100755
index 0000000..962bb79
--- /dev/null
+++ b/benchmarks/CHStone/dfmul/softfloat-specialize
@@ -0,0 +1,122 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
+Arithmetic Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Underflow tininess-detection mode, statically initialized to default value.
+| (The declaration in `softfloat.h' must match the `int8' type here.)
+*----------------------------------------------------------------------------*/
+#define float_detect_tininess float_tininess_before_rounding
+
+/*----------------------------------------------------------------------------
+| Raises the exceptions specified by `flags'. Floating-point traps can be
+| defined here if desired. It is currently not possible for such a trap
+| to substitute a result value. If traps are not implemented, this routine
+| should be simply `float_exception_flags |= flags;'.
+*----------------------------------------------------------------------------*/
+
+void
+float_raise (int8 flags)
+{
+ float_exception_flags |= flags;
+
+}
+
+/*----------------------------------------------------------------------------
+| The pattern for a default generated double-precision NaN.
+*----------------------------------------------------------------------------*/
+#define float64_default_nan LIT64( 0x7FFFFFFFFFFFFFFF )
+
+/*----------------------------------------------------------------------------
+| Returns 1 if the double-precision floating-point value `a' is a NaN;
+| otherwise returns 0.
+*----------------------------------------------------------------------------*/
+
+flag
+float64_is_nan (float64 a)
+{
+
+ return (LIT64 (0xFFE0000000000000) < (bits64) (a << 1));
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns 1 if the double-precision floating-point value `a' is a signaling
+| NaN; otherwise returns 0.
+*----------------------------------------------------------------------------*/
+
+flag
+float64_is_signaling_nan (float64 a)
+{
+
+ return (((a >> 51) & 0xFFF) == 0xFFE) && (a & LIT64 (0x0007FFFFFFFFFFFF));
+
+}
+
+/*----------------------------------------------------------------------------
+| Takes two double-precision floating-point values `a' and `b', one of which
+| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+
+static float64
+propagateFloat64NaN (float64 a, float64 b)
+{
+ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN;
+
+ aIsNaN = float64_is_nan (a);
+ aIsSignalingNaN = float64_is_signaling_nan (a);
+ bIsNaN = float64_is_nan (b);
+ bIsSignalingNaN = float64_is_signaling_nan (b);
+ a |= LIT64 (0x0008000000000000);
+ b |= LIT64 (0x0008000000000000);
+ if (aIsSignalingNaN | bIsSignalingNaN)
+ float_raise (float_flag_invalid);
+ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a;
+
+}
diff --git a/benchmarks/CHStone/dfmul/softfloat.c b/benchmarks/CHStone/dfmul/softfloat.c
new file mode 100755
index 0000000..f965efd
--- /dev/null
+++ b/benchmarks/CHStone/dfmul/softfloat.c
@@ -0,0 +1,300 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C source file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+#include "milieu.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Floating-point rounding mode, extended double-precision rounding precision,
+| and exception flags.
+*----------------------------------------------------------------------------*/
+int8 float_rounding_mode = float_round_nearest_even;
+int8 float_exception_flags = 0;
+
+/*----------------------------------------------------------------------------
+| Primitive arithmetic functions, including multi-word arithmetic, and
+| division and square root approximations. (Can be specialized to target if
+| desired.)
+*----------------------------------------------------------------------------*/
+#include "softfloat-macros"
+
+/*----------------------------------------------------------------------------
+| Functions and definitions to determine: (1) whether tininess for underflow
+| is detected before or after rounding by default, (2) what (if anything)
+| happens when exceptions are raised, (3) how signaling NaNs are distinguished
+| from quiet NaNs, (4) the default generated quiet NaNs, and (5) how NaNs
+| are propagated from function inputs to output. These details are target-
+| specific.
+*----------------------------------------------------------------------------*/
+#include "softfloat-specialize"
+
+/*----------------------------------------------------------------------------
+| Returns the fraction bits of the double-precision floating-point value `a'.
+*----------------------------------------------------------------------------*/
+
+INLINE bits64
+extractFloat64Frac (float64 a)
+{
+
+ return a & LIT64 (0x000FFFFFFFFFFFFF);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the exponent bits of the double-precision floating-point value `a'.
+*----------------------------------------------------------------------------*/
+
+INLINE int16
+extractFloat64Exp (float64 a)
+{
+
+ return (a >> 52) & 0x7FF;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the sign bit of the double-precision floating-point value `a'.
+*----------------------------------------------------------------------------*/
+
+INLINE flag
+extractFloat64Sign (float64 a)
+{
+
+ return a >> 63;
+
+}
+
+/*----------------------------------------------------------------------------
+| Normalizes the subnormal double-precision floating-point value represented
+| by the denormalized significand `aSig'. The normalized exponent and
+| significand are stored at the locations pointed to by `zExpPtr' and
+| `zSigPtr', respectively.
+*----------------------------------------------------------------------------*/
+
+static void
+normalizeFloat64Subnormal (bits64 aSig, int16 * zExpPtr, bits64 * zSigPtr)
+{
+ int8 shiftCount;
+
+ shiftCount = countLeadingZeros64 (aSig) - 11;
+ *zSigPtr = aSig << shiftCount;
+ *zExpPtr = 1 - shiftCount;
+
+}
+
+/*----------------------------------------------------------------------------
+| Packs the sign `zSign', exponent `zExp', and significand `zSig' into a
+| double-precision floating-point value, returning the result. After being
+| shifted into the proper positions, the three fields are simply added
+| together to form the result. This means that any integer portion of `zSig'
+| will be added into the exponent. Since a properly normalized significand
+| will have an integer portion equal to 1, the `zExp' input should be 1 less
+| than the desired result exponent whenever `zSig' is a complete, normalized
+| significand.
+*----------------------------------------------------------------------------*/
+
+INLINE float64
+packFloat64 (flag zSign, int16 zExp, bits64 zSig)
+{
+
+ return (((bits64) zSign) << 63) + (((bits64) zExp) << 52) + zSig;
+
+}
+
+/*----------------------------------------------------------------------------
+| Takes an abstract floating-point value having sign `zSign', exponent `zExp',
+| and significand `zSig', and returns the proper double-precision floating-
+| point value corresponding to the abstract input. Ordinarily, the abstract
+| value is simply rounded and packed into the double-precision format, with
+| the inexact exception raised if the abstract input cannot be represented
+| exactly. However, if the abstract value is too large, the overflow and
+| inexact exceptions are raised and an infinity or maximal finite value is
+| returned. If the abstract value is too small, the input value is rounded
+| to a subnormal number, and the underflow and inexact exceptions are raised
+| if the abstract input cannot be represented exactly as a subnormal double-
+| precision floating-point number.
+| The input significand `zSig' has its binary point between bits 62
+| and 61, which is 10 bits to the left of the usual location. This shifted
+| significand must be normalized or smaller. If `zSig' is not normalized,
+| `zExp' must be 0; in that case, the result returned is a subnormal number,
+| and it must not require rounding. In the usual case that `zSig' is
+| normalized, `zExp' must be 1 less than the ``true'' floating-point exponent.
+| The handling of underflow and overflow follows the IEC/IEEE Standard for
+| Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+static float64
+roundAndPackFloat64 (flag zSign, int16 zExp, bits64 zSig)
+{
+ int8 roundingMode;
+ flag roundNearestEven, isTiny;
+ int16 roundIncrement, roundBits;
+
+ roundingMode = float_rounding_mode;
+ roundNearestEven = (roundingMode == float_round_nearest_even);
+ roundIncrement = 0x200;
+ if (!roundNearestEven)
+ {
+ if (roundingMode == float_round_to_zero)
+ {
+ roundIncrement = 0;
+ }
+ else
+ {
+ roundIncrement = 0x3FF;
+ if (zSign)
+ {
+ if (roundingMode == float_round_up)
+ roundIncrement = 0;
+ }
+ else
+ {
+ if (roundingMode == float_round_down)
+ roundIncrement = 0;
+ }
+ }
+ }
+ roundBits = zSig & 0x3FF;
+ if (0x7FD <= (bits16) zExp)
+ {
+ if ((0x7FD < zExp)
+ || ((zExp == 0x7FD) && ((sbits64) (zSig + roundIncrement) < 0)))
+ {
+ float_raise (float_flag_overflow | float_flag_inexact);
+ return packFloat64 (zSign, 0x7FF, 0) - (roundIncrement == 0);
+ }
+ if (zExp < 0)
+ {
+ isTiny = (float_detect_tininess == float_tininess_before_rounding)
+ || (zExp < -1)
+ || (zSig + roundIncrement < LIT64 (0x8000000000000000));
+ shift64RightJamming (zSig, -zExp, &zSig);
+ zExp = 0;
+ roundBits = zSig & 0x3FF;
+ if (isTiny && roundBits)
+ float_raise (float_flag_underflow);
+ }
+ }
+ if (roundBits)
+ float_exception_flags |= float_flag_inexact;
+ zSig = (zSig + roundIncrement) >> 10;
+ zSig &= ~(((roundBits ^ 0x200) == 0) & roundNearestEven);
+ if (zSig == 0)
+ zExp = 0;
+ return packFloat64 (zSign, zExp, zSig);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the result of multiplying the double-precision floating-point values
+| `a' and `b'. The operation is performed according to the IEC/IEEE Standard
+| for Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+float64
+float64_mul (float64 a, float64 b)
+{
+ flag aSign, bSign, zSign;
+ int16 aExp, bExp, zExp;
+ bits64 aSig, bSig, zSig0, zSig1;
+
+ aSig = extractFloat64Frac (a);
+ aExp = extractFloat64Exp (a);
+ aSign = extractFloat64Sign (a);
+ bSig = extractFloat64Frac (b);
+ bExp = extractFloat64Exp (b);
+ bSign = extractFloat64Sign (b);
+ zSign = aSign ^ bSign;
+ if (aExp == 0x7FF)
+ {
+ if (aSig || ((bExp == 0x7FF) && bSig))
+ return propagateFloat64NaN (a, b);
+ if ((bExp | bSig) == 0)
+ {
+ float_raise (float_flag_invalid);
+ return float64_default_nan;
+ }
+ return packFloat64 (zSign, 0x7FF, 0);
+ }
+ if (bExp == 0x7FF)
+ {
+ if (bSig)
+ return propagateFloat64NaN (a, b);
+ if ((aExp | aSig) == 0)
+ {
+ float_raise (float_flag_invalid);
+ return float64_default_nan;
+ }
+ return packFloat64 (zSign, 0x7FF, 0);
+ }
+ if (aExp == 0)
+ {
+ if (aSig == 0)
+ return packFloat64 (zSign, 0, 0);
+ normalizeFloat64Subnormal (aSig, &aExp, &aSig);
+ }
+ if (bExp == 0)
+ {
+ if (bSig == 0)
+ return packFloat64 (zSign, 0, 0);
+ normalizeFloat64Subnormal (bSig, &bExp, &bSig);
+ }
+ zExp = aExp + bExp - 0x3FF;
+ aSig = (aSig | LIT64 (0x0010000000000000)) << 10;
+ bSig = (bSig | LIT64 (0x0010000000000000)) << 11;
+ mul64To128 (aSig, bSig, &zSig0, &zSig1);
+ zSig0 |= (zSig1 != 0);
+ if (0 <= (sbits64) (zSig0 << 1))
+ {
+ zSig0 <<= 1;
+ --zExp;
+ }
+ return roundAndPackFloat64 (zSign, zExp, zSig0);
+
+}
diff --git a/benchmarks/CHStone/dfmul/softfloat.h b/benchmarks/CHStone/dfmul/softfloat.h
new file mode 100755
index 0000000..6d075ca
--- /dev/null
+++ b/benchmarks/CHStone/dfmul/softfloat.h
@@ -0,0 +1,77 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point types.
+*----------------------------------------------------------------------------*/
+typedef unsigned int float32;
+typedef unsigned long long float64;
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point underflow tininess-detection mode.
+*----------------------------------------------------------------------------*/
+#define float_tininess_after_rounding 0
+#define float_tininess_before_rounding 1
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point rounding mode.
+*----------------------------------------------------------------------------*/
+#define float_round_nearest_even 0
+#define float_round_to_zero 1
+#define float_round_up 2
+#define float_round_down 3
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point exception flags.
+*----------------------------------------------------------------------------*/
+#define float_flag_inexact 1
+#define float_flag_divbyzero 2
+#define float_flag_underflow 4
+#define float_flag_overflow 8
+#define float_flag_invalid 16
diff --git a/benchmarks/CHStone/dfsin/SPARC-GCC.h b/benchmarks/CHStone/dfsin/SPARC-GCC.h
new file mode 100755
index 0000000..36965ea
--- /dev/null
+++ b/benchmarks/CHStone/dfsin/SPARC-GCC.h
@@ -0,0 +1,90 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Each of the following `typedef's defines the most convenient type that holds
+| integers of at least as many bits as specified. For example, `uint8' should
+| be the most convenient type that can hold unsigned integers of as many as
+| 8 bits. The `flag' type must be able to hold either a 0 or 1. For most
+| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
+| to the same as `int'.
+*----------------------------------------------------------------------------*/
+typedef int flag;
+typedef int int8;
+typedef int int16;
+typedef unsigned int uint32;
+typedef signed int int32;
+
+/*----------------------------------------------------------------------------
+| Each of the following `typedef's defines a type that holds integers
+| of _exactly_ the number of bits specified. For instance, for most
+| implementation of C, `bits16' and `sbits16' should be `typedef'ed to
+| `unsigned short int' and `signed short int' (or `short int'), respectively.
+*----------------------------------------------------------------------------*/
+typedef unsigned short int bits16;
+typedef unsigned int bits32;
+typedef unsigned long long int bits64;
+typedef signed long long int sbits64;
+
+/*----------------------------------------------------------------------------
+| The `LIT64' macro takes as its argument a textual integer literal and
+| if necessary ``marks'' the literal as having a 64-bit integer type.
+| For example, the GNU C Compiler (`gcc') requires that 64-bit literals be
+| appended with the letters `LL' standing for `long long', which is `gcc's
+| name for the 64-bit integer type. Some compilers may allow `LIT64' to be
+| defined as the identity macro: `#define LIT64( a ) a'.
+*----------------------------------------------------------------------------*/
+#define LIT64( a ) a##LL
+
+/*----------------------------------------------------------------------------
+| The macro `INLINE' can be used before functions that should be inlined. If
+| a compiler does not support explicit inlining, this macro should be defined
+| to be `static'.
+*----------------------------------------------------------------------------*/
+#define INLINE
diff --git a/benchmarks/CHStone/dfsin/dfsin.c b/benchmarks/CHStone/dfsin/dfsin.c
new file mode 100755
index 0000000..70f588d
--- /dev/null
+++ b/benchmarks/CHStone/dfsin/dfsin.c
@@ -0,0 +1,185 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+#include <stdio.h>
+#include "softfloat.c"
+
+float64
+float64_abs (float64 x)
+{
+ return (x & 0x7fffffffffffffffULL);
+}
+
+float64
+local_sin (float64 rad)
+{
+ float64 app;
+ float64 diff;
+ float64 m_rad2;
+ int inc;
+
+ app = diff = rad;
+ inc = 1;
+ m_rad2 = float64_neg (float64_mul (rad, rad));
+ do
+ {
+ diff = float64_div (float64_mul (diff, m_rad2),
+ int32_to_float64 ((2 * inc) * (2 * inc + 1)));
+ app = float64_add (app, diff);
+ inc++;
+ }
+ while (float64_ge (float64_abs (diff), 0x3ee4f8b588e368f1ULL)); /* 0.00001 */
+ return app;
+}
+
+double
+ullong_to_double (unsigned long long x)
+{
+ union
+ {
+ double d;
+ unsigned long long ll;
+ } t;
+
+ t.ll = x;
+ return t.d;
+}
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) |
+| test_in : input data |
+| test_out : expected output data |
++--------------------------------------------------------------------------+
+*/
+#define N 36
+const float64 test_in[N] = {
+ 0x0000000000000000ULL, /* 0 */
+ 0x3fc65717fced55c1ULL, /* PI/18 */
+ 0x3fd65717fced55c1ULL, /* PI/9 */
+ 0x3fe0c151fdb20051ULL, /* PI/6 */
+ 0x3fe65717fced55c1ULL, /* 2PI/9 */
+ 0x3febecddfc28ab31ULL, /* 5PI/18 */
+ 0x3ff0c151fdb20051ULL, /* PI/3 */
+ 0x3ff38c34fd4fab09ULL, /* 7PI/18 */
+ 0x3ff65717fced55c1ULL, /* 4PI/9 */
+ 0x3ff921fafc8b0079ULL, /* PI/2 */
+ 0x3ffbecddfc28ab31ULL, /* 5PI/9 */
+ 0x3ffeb7c0fbc655e9ULL, /* 11PI/18 */
+ 0x4000c151fdb20051ULL, /* 2PI/3 */
+ 0x400226c37d80d5adULL, /* 13PI/18 */
+ 0x40038c34fd4fab09ULL, /* 7PI/9 */
+ 0x4004f1a67d1e8065ULL, /* 5PI/6 */
+ 0x40065717fced55c1ULL, /* 8PI/9 */
+ 0x4007bc897cbc2b1dULL, /* 17PI/18 */
+ 0x400921fafc8b0079ULL, /* PI */
+ 0x400a876c7c59d5d5ULL, /* 19PI/18 */
+ 0x400becddfc28ab31ULL, /* 10PI/9 */
+ 0x400d524f7bf7808dULL, /* 7PI/6 */
+ 0x400eb7c0fbc655e9ULL, /* 11PI/9 */
+ 0x40100e993dca95a3ULL, /* 23PI/18 */
+ 0x4010c151fdb20051ULL, /* 8PI/6 */
+ 0x4011740abd996affULL, /* 25PI/18 */
+ 0x401226c37d80d5adULL, /* 13PI/9 */
+ 0x4012d97c3d68405bULL, /* 3PI/2 */
+ 0x40138c34fd4fab09ULL, /* 14PI/9 */
+ 0x40143eedbd3715b7ULL, /* 29PI/18 */
+ 0x4014f1a67d1e8065ULL, /* 15PI/9 */
+ 0x4015a45f3d05eb13ULL, /* 31PI/18 */
+ 0x40165717fced55c1ULL, /* 16PI/9 */
+ 0x401709d0bcd4c06fULL, /* 33PI/18 */
+ 0x4017bc897cbc2b1dULL, /* 17PI/9 */
+ 0x40186f423ca395cbULL
+}; /* 35PI/18 */
+
+const float64 test_out[N] = {
+ 0x0000000000000000ULL, /* 0.000000 */
+ 0x3fc63a1a335aadcdULL, /* 0.173648 */
+ 0x3fd5e3a82b09bf3eULL, /* 0.342020 */
+ 0x3fdfffff91f9aa91ULL, /* 0.500000 */
+ 0x3fe491b716c242e3ULL, /* 0.642787 */
+ 0x3fe8836f672614a6ULL, /* 0.766044 */
+ 0x3febb67ac40b2bedULL, /* 0.866025 */
+ 0x3fee11f6127e28adULL, /* 0.939693 */
+ 0x3fef838b6adffac0ULL, /* 0.984808 */
+ 0x3fefffffe1cbd7aaULL, /* 1.000000 */
+ 0x3fef838bb0147989ULL, /* 0.984808 */
+ 0x3fee11f692d962b4ULL, /* 0.939693 */
+ 0x3febb67b77c0142dULL, /* 0.866026 */
+ 0x3fe883709d4ea869ULL, /* 0.766045 */
+ 0x3fe491b81d72d8e8ULL, /* 0.642788 */
+ 0x3fe00000ea5f43c8ULL, /* 0.500000 */
+ 0x3fd5e3aa4e0590c5ULL, /* 0.342021 */
+ 0x3fc63a1d2189552cULL, /* 0.173648 */
+ 0x3ea6aedffc454b91ULL, /* 0.000001 */
+ 0xbfc63a1444ddb37cULL, /* -0.173647 */
+ 0xbfd5e3a4e68f8f3eULL, /* -0.342019 */
+ 0xbfdffffd494cf96bULL, /* -0.499999 */
+ 0xbfe491b61cb9a3d3ULL, /* -0.642787 */
+ 0xbfe8836eb2dcf815ULL, /* -0.766044 */
+ 0xbfebb67a740aae32ULL, /* -0.866025 */
+ 0xbfee11f5912d2157ULL, /* -0.939692 */
+ 0xbfef838b1ac64afcULL, /* -0.984808 */
+ 0xbfefffffc2e5dc8fULL, /* -1.000000 */
+ 0xbfef838b5ea2e7eaULL, /* -0.984808 */
+ 0xbfee11f7112dae27ULL, /* -0.939693 */
+ 0xbfebb67c2c31cb4aULL, /* -0.866026 */
+ 0xbfe883716e6fd781ULL, /* -0.766045 */
+ 0xbfe491b9cd1b5d56ULL, /* -0.642789 */
+ 0xbfe000021d0ca30dULL, /* -0.500001 */
+ 0xbfd5e3ad0a69caf7ULL, /* -0.342021 */
+ 0xbfc63a23c48863ddULL
+}; /* -0.173649 */
+
+int
+main ()
+{
+ int main_result;
+ int i;
+ main_result = 0;
+ for (i = 0; i < N; i++)
+ {
+ float64 result;
+ result = local_sin (test_in[i]);
+ main_result += (result != test_out[i]);
+
+ printf
+ ("input=%016llx expected=%016llx output=%016llx (%lf)\n",
+ test_in[i], test_out[i], result, ullong_to_double (result));
+ }
+ printf ("%d\n", main_result);
+ return main_result;
+ }
diff --git a/benchmarks/CHStone/dfsin/milieu.h b/benchmarks/CHStone/dfsin/milieu.h
new file mode 100755
index 0000000..4d92d5e
--- /dev/null
+++ b/benchmarks/CHStone/dfsin/milieu.h
@@ -0,0 +1,53 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Include common integer types and flags.
+*----------------------------------------------------------------------------*/
+#include "SPARC-GCC.h"
diff --git a/benchmarks/CHStone/dfsin/softfloat-macros b/benchmarks/CHStone/dfsin/softfloat-macros
new file mode 100755
index 0000000..4ebb069
--- /dev/null
+++ b/benchmarks/CHStone/dfsin/softfloat-macros
@@ -0,0 +1,299 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
+Arithmetic Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal notice) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Shifts `a' right by the number of bits given in `count'. If any nonzero
+| bits are shifted off, they are ``jammed'' into the least significant bit of
+| the result by setting the least significant bit to 1. The value of `count'
+| can be arbitrarily large; in particular, if `count' is greater than 64, the
+| result will be either 0 or 1, depending on whether `a' is zero or nonzero.
+| The result is stored in the location pointed to by `zPtr'.
+*----------------------------------------------------------------------------*/
+
+INLINE void
+shift64RightJamming (bits64 a, int16 count, bits64 * zPtr)
+{
+ bits64 z;
+
+ if (count == 0)
+ {
+ z = a;
+ }
+ else if (count < 64)
+ {
+ z = (a >> count) | ((a << ((-count) & 63)) != 0);
+ }
+ else
+ {
+ z = (a != 0);
+ }
+ *zPtr = z;
+
+}
+
+/*----------------------------------------------------------------------------
+| Shifts the 128-bit value formed by concatenating `a0' and `a1' right by 64
+| _plus_ the number of bits given in `count'. The shifted result is at most
+| 64 nonzero bits; this is stored at the location pointed to by `z0Ptr'. The
+| bits shifted off form a second 64-bit result as follows: The _last_ bit
+| shifted off is the most-significant bit of the extra result, and the other
+| 63 bits of the extra result are all zero if and only if _all_but_the_last_
+| bits shifted off were all zero. This extra result is stored in the location
+| pointed to by `z1Ptr'. The value of `count' can be arbitrarily large.
+| (This routine makes more sense if `a0' and `a1' are considered to form
+| a fixed-point value with binary point between `a0' and `a1'. This fixed-
+| point value is shifted right by the number of bits given in `count', and
+| the integer part of the result is returned at the location pointed to by
+| `z0Ptr'. The fractional part of the result may be slightly corrupted as
+| described above, and is returned at the location pointed to by `z1Ptr'.)
+*----------------------------------------------------------------------------*/
+
+INLINE void
+shift64ExtraRightJamming (bits64 a0, bits64 a1, int16 count, bits64 * z0Ptr,
+ bits64 * z1Ptr)
+{
+ bits64 z0, z1;
+ int8 negCount;
+ negCount = (-count) & 63;
+
+ if (count == 0)
+ {
+ z1 = a1;
+ z0 = a0;
+ }
+ else if (count < 64)
+ {
+ z1 = (a0 << negCount) | (a1 != 0);
+ z0 = a0 >> count;
+ }
+ else
+ {
+ if (count == 64)
+ {
+ z1 = a0 | (a1 != 0);
+ }
+ else
+ {
+ z1 = ((a0 | a1) != 0);
+ }
+ z0 = 0;
+ }
+ *z1Ptr = z1;
+ *z0Ptr = z0;
+
+}
+
+/*----------------------------------------------------------------------------
+| Adds the 128-bit value formed by concatenating `a0' and `a1' to the 128-bit
+| value formed by concatenating `b0' and `b1'. Addition is modulo 2^128, so
+| any carry out is lost. The result is broken into two 64-bit pieces which
+| are stored at the locations pointed to by `z0Ptr' and `z1Ptr'.
+*----------------------------------------------------------------------------*/
+
+INLINE void
+add128 (bits64 a0, bits64 a1, bits64 b0, bits64 b1, bits64 * z0Ptr,
+ bits64 * z1Ptr)
+{
+ bits64 z1;
+
+ z1 = a1 + b1;
+ *z1Ptr = z1;
+ *z0Ptr = a0 + b0 + (z1 < a1);
+
+}
+
+/*----------------------------------------------------------------------------
+| Subtracts the 128-bit value formed by concatenating `b0' and `b1' from the
+| 128-bit value formed by concatenating `a0' and `a1'. Subtraction is modulo
+| 2^128, so any borrow out (carry out) is lost. The result is broken into two
+| 64-bit pieces which are stored at the locations pointed to by `z0Ptr' and
+| `z1Ptr'.
+*----------------------------------------------------------------------------*/
+
+INLINE void
+sub128 (bits64 a0, bits64 a1, bits64 b0, bits64 b1, bits64 * z0Ptr,
+ bits64 * z1Ptr)
+{
+
+ *z1Ptr = a1 - b1;
+ *z0Ptr = a0 - b0 - (a1 < b1);
+
+}
+
+/*----------------------------------------------------------------------------
+| Multiplies `a' by `b' to obtain a 128-bit product. The product is broken
+| into two 64-bit pieces which are stored at the locations pointed to by
+| `z0Ptr' and `z1Ptr'.
+*----------------------------------------------------------------------------*/
+
+INLINE void
+mul64To128 (bits64 a, bits64 b, bits64 * z0Ptr, bits64 * z1Ptr)
+{
+ bits32 aHigh, aLow, bHigh, bLow;
+ bits64 z0, zMiddleA, zMiddleB, z1;
+
+ aLow = a;
+ aHigh = a >> 32;
+ bLow = b;
+ bHigh = b >> 32;
+ z1 = ((bits64) aLow) * bLow;
+ zMiddleA = ((bits64) aLow) * bHigh;
+ zMiddleB = ((bits64) aHigh) * bLow;
+ z0 = ((bits64) aHigh) * bHigh;
+ zMiddleA += zMiddleB;
+ z0 += (((bits64) (zMiddleA < zMiddleB)) << 32) + (zMiddleA >> 32);
+ zMiddleA <<= 32;
+ z1 += zMiddleA;
+ z0 += (z1 < zMiddleA);
+ *z1Ptr = z1;
+ *z0Ptr = z0;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns an approximation to the 64-bit integer quotient obtained by dividing
+| `b' into the 128-bit value formed by concatenating `a0' and `a1'. The
+| divisor `b' must be at least 2^63. If q is the exact quotient truncated
+| toward zero, the approximation returned lies between q and q + 2 inclusive.
+| If the exact quotient q is larger than 64 bits, the maximum positive 64-bit
+| unsigned integer is returned.
+*----------------------------------------------------------------------------*/
+
+static bits64
+estimateDiv128To64 (bits64 a0, bits64 a1, bits64 b)
+{
+ bits64 b0, b1;
+ bits64 rem0, rem1, term0, term1;
+ bits64 z;
+
+ if (b <= a0)
+ return LIT64 (0xFFFFFFFFFFFFFFFF);
+ b0 = b >> 32;
+ z = (b0 << 32 <= a0) ? LIT64 (0xFFFFFFFF00000000) : (a0 / b0) << 32;
+ mul64To128 (b, z, &term0, &term1);
+ sub128 (a0, a1, term0, term1, &rem0, &rem1);
+ while (((sbits64) rem0) < 0)
+ {
+ z -= LIT64 (0x100000000);
+ b1 = b << 32;
+ add128 (rem0, rem1, b0, b1, &rem0, &rem1);
+ }
+ rem0 = (rem0 << 32) | (rem1 >> 32);
+ z |= (b0 << 32 <= rem0) ? 0xFFFFFFFF : rem0 / b0;
+ return z;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the number of leading 0 bits before the most-significant 1 bit of
+| `a'. If `a' is zero, 32 is returned.
+*----------------------------------------------------------------------------*/
+
+static int8
+countLeadingZeros32 (bits32 a)
+{
+ static const int8 countLeadingZerosHigh[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
+ };
+ int8 shiftCount;
+
+ shiftCount = 0;
+ if (a < 0x10000)
+ {
+ shiftCount += 16;
+ a <<= 16;
+ }
+ if (a < 0x1000000)
+ {
+ shiftCount += 8;
+ a <<= 8;
+ }
+ shiftCount += countLeadingZerosHigh[a >> 24];
+ return shiftCount;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the number of leading 0 bits before the most-significant 1 bit of
+| `a'. If `a' is zero, 64 is returned.
+*----------------------------------------------------------------------------*/
+
+static int8
+countLeadingZeros64 (bits64 a)
+{
+ int8 shiftCount;
+
+ shiftCount = 0;
+ if (a < ((bits64) 1) << 32)
+ {
+ shiftCount += 32;
+ }
+ else
+ {
+ a >>= 32;
+ }
+ shiftCount += countLeadingZeros32 (a);
+ return shiftCount;
+
+}
diff --git a/benchmarks/CHStone/dfsin/softfloat-specialize b/benchmarks/CHStone/dfsin/softfloat-specialize
new file mode 100755
index 0000000..962bb79
--- /dev/null
+++ b/benchmarks/CHStone/dfsin/softfloat-specialize
@@ -0,0 +1,122 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
+Arithmetic Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Underflow tininess-detection mode, statically initialized to default value.
+| (The declaration in `softfloat.h' must match the `int8' type here.)
+*----------------------------------------------------------------------------*/
+#define float_detect_tininess float_tininess_before_rounding
+
+/*----------------------------------------------------------------------------
+| Raises the exceptions specified by `flags'. Floating-point traps can be
+| defined here if desired. It is currently not possible for such a trap
+| to substitute a result value. If traps are not implemented, this routine
+| should be simply `float_exception_flags |= flags;'.
+*----------------------------------------------------------------------------*/
+
+void
+float_raise (int8 flags)
+{
+ float_exception_flags |= flags;
+
+}
+
+/*----------------------------------------------------------------------------
+| The pattern for a default generated double-precision NaN.
+*----------------------------------------------------------------------------*/
+#define float64_default_nan LIT64( 0x7FFFFFFFFFFFFFFF )
+
+/*----------------------------------------------------------------------------
+| Returns 1 if the double-precision floating-point value `a' is a NaN;
+| otherwise returns 0.
+*----------------------------------------------------------------------------*/
+
+flag
+float64_is_nan (float64 a)
+{
+
+ return (LIT64 (0xFFE0000000000000) < (bits64) (a << 1));
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns 1 if the double-precision floating-point value `a' is a signaling
+| NaN; otherwise returns 0.
+*----------------------------------------------------------------------------*/
+
+flag
+float64_is_signaling_nan (float64 a)
+{
+
+ return (((a >> 51) & 0xFFF) == 0xFFE) && (a & LIT64 (0x0007FFFFFFFFFFFF));
+
+}
+
+/*----------------------------------------------------------------------------
+| Takes two double-precision floating-point values `a' and `b', one of which
+| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+
+static float64
+propagateFloat64NaN (float64 a, float64 b)
+{
+ flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN;
+
+ aIsNaN = float64_is_nan (a);
+ aIsSignalingNaN = float64_is_signaling_nan (a);
+ bIsNaN = float64_is_nan (b);
+ bIsSignalingNaN = float64_is_signaling_nan (b);
+ a |= LIT64 (0x0008000000000000);
+ b |= LIT64 (0x0008000000000000);
+ if (aIsSignalingNaN | bIsSignalingNaN)
+ float_raise (float_flag_invalid);
+ return bIsSignalingNaN ? b : aIsSignalingNaN ? a : bIsNaN ? b : a;
+
+}
diff --git a/benchmarks/CHStone/dfsin/softfloat.c b/benchmarks/CHStone/dfsin/softfloat.c
new file mode 100755
index 0000000..97979d0
--- /dev/null
+++ b/benchmarks/CHStone/dfsin/softfloat.c
@@ -0,0 +1,650 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C source file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+#include "milieu.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Floating-point rounding mode, extended double-precision rounding precision,
+| and exception flags.
+*----------------------------------------------------------------------------*/
+int8 float_rounding_mode = float_round_nearest_even;
+int8 float_exception_flags = 0;
+
+/*----------------------------------------------------------------------------
+| Primitive arithmetic functions, including multi-word arithmetic, and
+| division and square root approximations. (Can be specialized to target if
+| desired.)
+*----------------------------------------------------------------------------*/
+#include "softfloat-macros"
+
+/*----------------------------------------------------------------------------
+| Functions and definitions to determine: (1) whether tininess for underflow
+| is detected before or after rounding by default, (2) what (if anything)
+| happens when exceptions are raised, (3) how signaling NaNs are distinguished
+| from quiet NaNs, (4) the default generated quiet NaNs, and (5) how NaNs
+| are propagated from function inputs to output. These details are target-
+| specific.
+*----------------------------------------------------------------------------*/
+#include "softfloat-specialize"
+
+/*----------------------------------------------------------------------------
+| Returns the fraction bits of the double-precision floating-point value `a'.
+*----------------------------------------------------------------------------*/
+
+INLINE bits64
+extractFloat64Frac (float64 a)
+{
+
+ return a & LIT64 (0x000FFFFFFFFFFFFF);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the exponent bits of the double-precision floating-point value `a'.
+*----------------------------------------------------------------------------*/
+
+INLINE int16
+extractFloat64Exp (float64 a)
+{
+
+ return (a >> 52) & 0x7FF;
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the sign bit of the double-precision floating-point value `a'.
+*----------------------------------------------------------------------------*/
+
+INLINE flag
+extractFloat64Sign (float64 a)
+{
+
+ return a >> 63;
+
+}
+
+/*----------------------------------------------------------------------------
+| Normalizes the subnormal double-precision floating-point value represented
+| by the denormalized significand `aSig'. The normalized exponent and
+| significand are stored at the locations pointed to by `zExpPtr' and
+| `zSigPtr', respectively.
+*----------------------------------------------------------------------------*/
+
+static void
+normalizeFloat64Subnormal (bits64 aSig, int16 * zExpPtr, bits64 * zSigPtr)
+{
+ int8 shiftCount;
+
+ shiftCount = countLeadingZeros64 (aSig) - 11;
+ *zSigPtr = aSig << shiftCount;
+ *zExpPtr = 1 - shiftCount;
+
+}
+
+/*----------------------------------------------------------------------------
+| Packs the sign `zSign', exponent `zExp', and significand `zSig' into a
+| double-precision floating-point value, returning the result. After being
+| shifted into the proper positions, the three fields are simply added
+| together to form the result. This means that any integer portion of `zSig'
+| will be added into the exponent. Since a properly normalized significand
+| will have an integer portion equal to 1, the `zExp' input should be 1 less
+| than the desired result exponent whenever `zSig' is a complete, normalized
+| significand.
+*----------------------------------------------------------------------------*/
+
+INLINE float64
+packFloat64 (flag zSign, int16 zExp, bits64 zSig)
+{
+
+ return (((bits64) zSign) << 63) + (((bits64) zExp) << 52) + zSig;
+
+}
+
+/*----------------------------------------------------------------------------
+| Takes an abstract floating-point value having sign `zSign', exponent `zExp',
+| and significand `zSig', and returns the proper double-precision floating-
+| point value corresponding to the abstract input. Ordinarily, the abstract
+| value is simply rounded and packed into the double-precision format, with
+| the inexact exception raised if the abstract input cannot be represented
+| exactly. However, if the abstract value is too large, the overflow and
+| inexact exceptions are raised and an infinity or maximal finite value is
+| returned. If the abstract value is too small, the input value is rounded
+| to a subnormal number, and the underflow and inexact exceptions are raised
+| if the abstract input cannot be represented exactly as a subnormal double-
+| precision floating-point number.
+| The input significand `zSig' has its binary point between bits 62
+| and 61, which is 10 bits to the left of the usual location. This shifted
+| significand must be normalized or smaller. If `zSig' is not normalized,
+| `zExp' must be 0; in that case, the result returned is a subnormal number,
+| and it must not require rounding. In the usual case that `zSig' is
+| normalized, `zExp' must be 1 less than the ``true'' floating-point exponent.
+| The handling of underflow and overflow follows the IEC/IEEE Standard for
+| Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+static float64
+roundAndPackFloat64 (flag zSign, int16 zExp, bits64 zSig)
+{
+ int8 roundingMode;
+ flag roundNearestEven, isTiny;
+ int16 roundIncrement, roundBits;
+
+ roundingMode = float_rounding_mode;
+ roundNearestEven = (roundingMode == float_round_nearest_even);
+ roundIncrement = 0x200;
+ if (!roundNearestEven)
+ {
+ if (roundingMode == float_round_to_zero)
+ {
+ roundIncrement = 0;
+ }
+ else
+ {
+ roundIncrement = 0x3FF;
+ if (zSign)
+ {
+ if (roundingMode == float_round_up)
+ roundIncrement = 0;
+ }
+ else
+ {
+ if (roundingMode == float_round_down)
+ roundIncrement = 0;
+ }
+ }
+ }
+ roundBits = zSig & 0x3FF;
+ if (0x7FD <= (bits16) zExp)
+ {
+ if ((0x7FD < zExp)
+ || ((zExp == 0x7FD) && ((sbits64) (zSig + roundIncrement) < 0)))
+ {
+ float_raise (float_flag_overflow | float_flag_inexact);
+ return packFloat64 (zSign, 0x7FF, 0) - (roundIncrement == 0);
+ }
+ if (zExp < 0)
+ {
+ isTiny = (float_detect_tininess == float_tininess_before_rounding)
+ || (zExp < -1)
+ || (zSig + roundIncrement < LIT64 (0x8000000000000000));
+ shift64RightJamming (zSig, -zExp, &zSig);
+ zExp = 0;
+ roundBits = zSig & 0x3FF;
+ if (isTiny && roundBits)
+ float_raise (float_flag_underflow);
+ }
+ }
+ if (roundBits)
+ float_exception_flags |= float_flag_inexact;
+ zSig = (zSig + roundIncrement) >> 10;
+ zSig &= ~(((roundBits ^ 0x200) == 0) & roundNearestEven);
+ if (zSig == 0)
+ zExp = 0;
+ return packFloat64 (zSign, zExp, zSig);
+
+}
+
+/*----------------------------------------------------------------------------
+| Takes an abstract floating-point value having sign `zSign', exponent `zExp',
+| and significand `zSig', and returns the proper double-precision floating-
+| point value corresponding to the abstract input. This routine is just like
+| `roundAndPackFloat64' except that `zSig' does not have to be normalized.
+| Bit 63 of `zSig' must be zero, and `zExp' must be 1 less than the ``true''
+| floating-point exponent.
+*----------------------------------------------------------------------------*/
+
+static float64
+normalizeRoundAndPackFloat64 (flag zSign, int16 zExp, bits64 zSig)
+{
+ int8 shiftCount;
+
+ shiftCount = countLeadingZeros64 (zSig) - 1;
+ return roundAndPackFloat64 (zSign, zExp - shiftCount, zSig << shiftCount);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the result of converting the 32-bit two's complement integer `a'
+| to the double-precision floating-point format. The conversion is performed
+| according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+float64
+int32_to_float64 (int32 a)
+{
+ flag zSign;
+ uint32 absA;
+ int8 shiftCount;
+ bits64 zSig;
+
+ if (a == 0)
+ return 0;
+ zSign = (a < 0);
+ absA = zSign ? -a : a;
+ shiftCount = countLeadingZeros32 (absA) + 21;
+ zSig = absA;
+ return packFloat64 (zSign, 0x432 - shiftCount, zSig << shiftCount);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the result of adding the absolute values of the double-precision
+| floating-point values `a' and `b'. If `zSign' is 1, the sum is negated
+| before being returned. `zSign' is ignored if the result is a NaN.
+| The addition is performed according to the IEC/IEEE Standard for Binary
+| Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+static float64
+addFloat64Sigs (float64 a, float64 b, flag zSign)
+{
+ int16 aExp, bExp, zExp;
+ bits64 aSig, bSig, zSig;
+ int16 expDiff;
+
+ aSig = extractFloat64Frac (a);
+ aExp = extractFloat64Exp (a);
+ bSig = extractFloat64Frac (b);
+ bExp = extractFloat64Exp (b);
+ expDiff = aExp - bExp;
+ aSig <<= 9;
+ bSig <<= 9;
+ if (0 < expDiff)
+ {
+ if (aExp == 0x7FF)
+ {
+ if (aSig)
+ return propagateFloat64NaN (a, b);
+ return a;
+ }
+ if (bExp == 0)
+ --expDiff;
+ else
+ bSig |= LIT64 (0x2000000000000000);
+ shift64RightJamming (bSig, expDiff, &bSig);
+ zExp = aExp;
+ }
+ else if (expDiff < 0)
+ {
+ if (bExp == 0x7FF)
+ {
+ if (bSig)
+ return propagateFloat64NaN (a, b);
+ return packFloat64 (zSign, 0x7FF, 0);
+ }
+ if (aExp == 0)
+ ++expDiff;
+ else
+ {
+ aSig |= LIT64 (0x2000000000000000);
+ }
+ shift64RightJamming (aSig, -expDiff, &aSig);
+ zExp = bExp;
+ }
+ else
+ {
+ if (aExp == 0x7FF)
+ {
+ if (aSig | bSig)
+ return propagateFloat64NaN (a, b);
+ return a;
+ }
+ if (aExp == 0)
+ return packFloat64 (zSign, 0, (aSig + bSig) >> 9);
+ zSig = LIT64 (0x4000000000000000) + aSig + bSig;
+ zExp = aExp;
+ goto roundAndPack;
+ }
+ aSig |= LIT64 (0x2000000000000000);
+ zSig = (aSig + bSig) << 1;
+ --zExp;
+ if ((sbits64) zSig < 0)
+ {
+ zSig = aSig + bSig;
+ ++zExp;
+ }
+roundAndPack:
+ return roundAndPackFloat64 (zSign, zExp, zSig);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the result of subtracting the absolute values of the double-
+| precision floating-point values `a' and `b'. If `zSign' is 1, the
+| difference is negated before being returned. `zSign' is ignored if the
+| result is a NaN. The subtraction is performed according to the IEC/IEEE
+| Standard for Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+static float64
+subFloat64Sigs (float64 a, float64 b, flag zSign)
+{
+ int16 aExp, bExp, zExp;
+ bits64 aSig, bSig, zSig;
+ int16 expDiff;
+
+ aSig = extractFloat64Frac (a);
+ aExp = extractFloat64Exp (a);
+ bSig = extractFloat64Frac (b);
+ bExp = extractFloat64Exp (b);
+ expDiff = aExp - bExp;
+ aSig <<= 10;
+ bSig <<= 10;
+ if (0 < expDiff)
+ goto aExpBigger;
+ if (expDiff < 0)
+ goto bExpBigger;
+ if (aExp == 0x7FF)
+ {
+ if (aSig | bSig)
+ return propagateFloat64NaN (a, b);
+ float_raise (float_flag_invalid);
+ return float64_default_nan;
+ }
+ if (aExp == 0)
+ {
+ aExp = 1;
+ bExp = 1;
+ }
+ if (bSig < aSig)
+ goto aBigger;
+ if (aSig < bSig)
+ goto bBigger;
+ return packFloat64 (float_rounding_mode == float_round_down, 0, 0);
+bExpBigger:
+ if (bExp == 0x7FF)
+ {
+ if (bSig)
+ return propagateFloat64NaN (a, b);
+ return packFloat64 (zSign ^ 1, 0x7FF, 0);
+ }
+ if (aExp == 0)
+ ++expDiff;
+ else
+ aSig |= LIT64 (0x4000000000000000);
+ shift64RightJamming (aSig, -expDiff, &aSig);
+ bSig |= LIT64 (0x4000000000000000);
+bBigger:
+ zSig = bSig - aSig;
+ zExp = bExp;
+ zSign ^= 1;
+ goto normalizeRoundAndPack;
+aExpBigger:
+ if (aExp == 0x7FF)
+ {
+ if (aSig)
+ return propagateFloat64NaN (a, b);
+ return a;
+ }
+ if (bExp == 0)
+ --expDiff;
+ else
+ bSig |= LIT64 (0x4000000000000000);
+ shift64RightJamming (bSig, expDiff, &bSig);
+ aSig |= LIT64 (0x4000000000000000);
+aBigger:
+ zSig = aSig - bSig;
+ zExp = aExp;
+normalizeRoundAndPack:
+ --zExp;
+ return normalizeRoundAndPackFloat64 (zSign, zExp, zSig);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the result of adding the double-precision floating-point values `a'
+| and `b'. The operation is performed according to the IEC/IEEE Standard for
+| Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+float64
+float64_add (float64 a, float64 b)
+{
+ flag aSign, bSign;
+
+ aSign = extractFloat64Sign (a);
+ bSign = extractFloat64Sign (b);
+ if (aSign == bSign)
+ return addFloat64Sigs (a, b, aSign);
+ else
+ return subFloat64Sigs (a, b, aSign);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the result of multiplying the double-precision floating-point values
+| `a' and `b'. The operation is performed according to the IEC/IEEE Standard
+| for Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+float64
+float64_mul (float64 a, float64 b)
+{
+ flag aSign, bSign, zSign;
+ int16 aExp, bExp, zExp;
+ bits64 aSig, bSig, zSig0, zSig1;
+
+ aSig = extractFloat64Frac (a);
+ aExp = extractFloat64Exp (a);
+ aSign = extractFloat64Sign (a);
+ bSig = extractFloat64Frac (b);
+ bExp = extractFloat64Exp (b);
+ bSign = extractFloat64Sign (b);
+ zSign = aSign ^ bSign;
+ if (aExp == 0x7FF)
+ {
+ if (aSig || ((bExp == 0x7FF) && bSig))
+ return propagateFloat64NaN (a, b);
+ if ((bExp | bSig) == 0)
+ {
+ float_raise (float_flag_invalid);
+ return float64_default_nan;
+ }
+ return packFloat64 (zSign, 0x7FF, 0);
+ }
+ if (bExp == 0x7FF)
+ {
+ if (bSig)
+ return propagateFloat64NaN (a, b);
+ if ((aExp | aSig) == 0)
+ {
+ float_raise (float_flag_invalid);
+ return float64_default_nan;
+ }
+ return packFloat64 (zSign, 0x7FF, 0);
+ }
+ if (aExp == 0)
+ {
+ if (aSig == 0)
+ return packFloat64 (zSign, 0, 0);
+ normalizeFloat64Subnormal (aSig, &aExp, &aSig);
+ }
+ if (bExp == 0)
+ {
+ if (bSig == 0)
+ return packFloat64 (zSign, 0, 0);
+ normalizeFloat64Subnormal (bSig, &bExp, &bSig);
+ }
+ zExp = aExp + bExp - 0x3FF;
+ aSig = (aSig | LIT64 (0x0010000000000000)) << 10;
+ bSig = (bSig | LIT64 (0x0010000000000000)) << 11;
+ mul64To128 (aSig, bSig, &zSig0, &zSig1);
+ zSig0 |= (zSig1 != 0);
+ if (0 <= (sbits64) (zSig0 << 1))
+ {
+ zSig0 <<= 1;
+ --zExp;
+ }
+ return roundAndPackFloat64 (zSign, zExp, zSig0);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns the result of dividing the double-precision floating-point value `a'
+| by the corresponding value `b'. The operation is performed according to
+| the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
+*----------------------------------------------------------------------------*/
+
+float64
+float64_div (float64 a, float64 b)
+{
+ flag aSign, bSign, zSign;
+ int16 aExp, bExp, zExp;
+ bits64 aSig, bSig, zSig;
+ bits64 rem0, rem1, term0, term1;
+
+ aSig = extractFloat64Frac (a);
+ aExp = extractFloat64Exp (a);
+ aSign = extractFloat64Sign (a);
+ bSig = extractFloat64Frac (b);
+ bExp = extractFloat64Exp (b);
+ bSign = extractFloat64Sign (b);
+ zSign = aSign ^ bSign;
+ if (aExp == 0x7FF)
+ {
+ if (aSig)
+ return propagateFloat64NaN (a, b);
+ if (bExp == 0x7FF)
+ {
+ if (bSig)
+ return propagateFloat64NaN (a, b);
+ float_raise (float_flag_invalid);
+ return float64_default_nan;
+ }
+ return packFloat64 (zSign, 0x7FF, 0);
+ }
+ if (bExp == 0x7FF)
+ {
+ if (bSig)
+ return propagateFloat64NaN (a, b);
+ return packFloat64 (zSign, 0, 0);
+ }
+ if (bExp == 0)
+ {
+ if (bSig == 0)
+ {
+ if ((aExp | aSig) == 0)
+ {
+ float_raise (float_flag_invalid);
+ return float64_default_nan;
+ }
+ float_raise (float_flag_divbyzero);
+ return packFloat64 (zSign, 0x7FF, 0);
+ }
+ normalizeFloat64Subnormal (bSig, &bExp, &bSig);
+ }
+ if (aExp == 0)
+ {
+ if (aSig == 0)
+ return packFloat64 (zSign, 0, 0);
+ normalizeFloat64Subnormal (aSig, &aExp, &aSig);
+ }
+ zExp = aExp - bExp + 0x3FD;
+ aSig = (aSig | LIT64 (0x0010000000000000)) << 10;
+ bSig = (bSig | LIT64 (0x0010000000000000)) << 11;
+ if (bSig <= (aSig + aSig))
+ {
+ aSig >>= 1;
+ ++zExp;
+ }
+ zSig = estimateDiv128To64 (aSig, 0, bSig);
+ if ((zSig & 0x1FF) <= 2)
+ {
+ mul64To128 (bSig, zSig, &term0, &term1);
+ sub128 (aSig, 0, term0, term1, &rem0, &rem1);
+ while ((sbits64) rem0 < 0)
+ {
+ --zSig;
+ add128 (rem0, rem1, 0, bSig, &rem0, &rem1);
+ }
+ zSig |= (rem1 != 0);
+ }
+ return roundAndPackFloat64 (zSign, zExp, zSig);
+
+}
+
+/*----------------------------------------------------------------------------
+| Returns 1 if the double-precision floating-point value `a' is less than or
+| equal to the corresponding value `b', and 0 otherwise. The comparison is
+| performed according to the IEC/IEEE Standard for Binary Floating-Point
+| Arithmetic.
+*----------------------------------------------------------------------------*/
+
+flag
+float64_le (float64 a, float64 b)
+{
+ flag aSign, bSign;
+
+ if (((extractFloat64Exp (a) == 0x7FF) && extractFloat64Frac (a))
+ || ((extractFloat64Exp (b) == 0x7FF) && extractFloat64Frac (b)))
+ {
+ float_raise (float_flag_invalid);
+ return 0;
+ }
+ aSign = extractFloat64Sign (a);
+ bSign = extractFloat64Sign (b);
+ if (aSign != bSign)
+ return aSign || ((bits64) ((a | b) << 1) == 0);
+ return (a == b) || (aSign ^ (a < b));
+
+}
+
+flag
+float64_ge (float64 a, float64 b)
+{
+ return float64_le (b, a);
+}
+
+// added by hiroyuki@acm.org
+float64
+float64_neg (float64 x)
+{
+ return (((~x) & 0x8000000000000000ULL) | (x & 0x7fffffffffffffffULL));
+}
diff --git a/benchmarks/CHStone/dfsin/softfloat.h b/benchmarks/CHStone/dfsin/softfloat.h
new file mode 100755
index 0000000..6d075ca
--- /dev/null
+++ b/benchmarks/CHStone/dfsin/softfloat.h
@@ -0,0 +1,77 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*============================================================================
+
+This C header file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
+Package, Release 2b.
+
+Written by John R. Hauser. This work was made possible in part by the
+International Computer Science Institute, located at Suite 600, 1947 Center
+Street, Berkeley, California 94704. Funding was partially provided by the
+National Science Foundation under grant MIP-9311980. The original version
+of this code was written as part of a project to build a fixed-point vector
+processor in collaboration with the University of California at Berkeley,
+overseen by Profs. Nelson Morgan and John Wawrzynek. More information
+is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
+arithmetic/SoftFloat.html'.
+
+THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
+been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
+RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
+AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
+COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
+EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
+INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
+OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
+
+Derivative works are acceptable, even for commercial purposes, so long as
+(1) the source code for the derivative work includes prominent notice that
+the work is derivative, and (2) the source code includes prominent notice with
+these four paragraphs for those parts of this code that are retained.
+
+=============================================================================*/
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point types.
+*----------------------------------------------------------------------------*/
+typedef unsigned int float32;
+typedef unsigned long long float64;
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point underflow tininess-detection mode.
+*----------------------------------------------------------------------------*/
+#define float_tininess_after_rounding 0
+#define float_tininess_before_rounding 1
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point rounding mode.
+*----------------------------------------------------------------------------*/
+#define float_round_nearest_even 0
+#define float_round_to_zero 1
+#define float_round_up 2
+#define float_round_down 3
+
+/*----------------------------------------------------------------------------
+| Software IEC/IEEE floating-point exception flags.
+*----------------------------------------------------------------------------*/
+#define float_flag_inexact 1
+#define float_flag_divbyzero 2
+#define float_flag_underflow 4
+#define float_flag_overflow 8
+#define float_flag_invalid 16
diff --git a/benchmarks/CHStone/gsm/add.c b/benchmarks/CHStone/gsm/add.c
new file mode 100755
index 0000000..6d20e62
--- /dev/null
+++ b/benchmarks/CHStone/gsm/add.c
@@ -0,0 +1,158 @@
+/*
++--------------------------------------------------------------------------+
+| 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 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
+ * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/add.c,v 1.5 1994/12/30 22:35:09 jutta Exp $ */
+
+/*
+ * See private.h for the more commonly used macro versions.
+ */
+
+#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;
+}
+
+const unsigned char 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
+};
+
+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..)
+ */
+{
+
+ 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;
+}
diff --git a/benchmarks/CHStone/gsm/gsm.c b/benchmarks/CHStone/gsm/gsm.c
new file mode 100755
index 0000000..282437a
--- /dev/null
+++ b/benchmarks/CHStone/gsm/gsm.c
@@ -0,0 +1,110 @@
+/*
++--------------------------------------------------------------------------+
+| 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>
+#include "lpc.c"
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) |
+| inData : input data |
+| outData, outLARc : expected output data |
++--------------------------------------------------------------------------+
+*/
+#define N 160
+#define M 8
+
+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
+main ()
+{
+ 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]);
+
+ printf ("%d\n", main_result);
+ return main_result;
+ }
diff --git a/benchmarks/CHStone/gsm/lpc.c b/benchmarks/CHStone/gsm/lpc.c
new file mode 100755
index 0000000..d70ab0e
--- /dev/null
+++ b/benchmarks/CHStone/gsm/lpc.c
@@ -0,0 +1,323 @@
+/*
++--------------------------------------------------------------------------+
+| 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 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
+ * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /home/kbs/jutta/src/gsm/gsm-1.0/src/RCS/lpc.c,v 1.5 1994/12/30 23:14:54 jutta Exp $ */
+
+#include "private.h"
+#include "add.c"
+
+
+/*
+ * 4.2.4 .. 4.2.7 LPC ANALYSIS SECTION
+ */
+
+/* 4.2.4 */
+
+
+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);
+}
diff --git a/benchmarks/CHStone/gsm/private.h b/benchmarks/CHStone/gsm/private.h
new file mode 100755
index 0000000..b99f548
--- /dev/null
+++ b/benchmarks/CHStone/gsm/private.h
@@ -0,0 +1,43 @@
+/*
++--------------------------------------------------------------------------+
+| 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 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
+ * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/*$Header: /home/kbs/jutta/src/gsm/gsm-1.0/inc/RCS/private.h,v 1.4 1994/11/28 20:25:03 jutta Exp $*/
+
+#ifndef PRIVATE_H
+#define PRIVATE_H
+
+typedef short 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)
+
+#endif /* PRIVATE_H */
diff --git a/benchmarks/CHStone/jpeg/chenidct.c b/benchmarks/CHStone/jpeg/chenidct.c
new file mode 100755
index 0000000..1e0278e
--- /dev/null
+++ b/benchmarks/CHStone/jpeg/chenidct.c
@@ -0,0 +1,231 @@
+/*
++--------------------------------------------------------------------------+
+| 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 |
+| |
+| * Remarks : |
+| 1. This source code is reformatted to follow CHStone's style. |
+| 2. Test vectors are added for CHStone. |
+| 3. If "main_result" is 0 at the end of the program, the program is |
+| successfully executed. |
+| 4. Follow the copyright of each benchmark program. |
++--------------------------------------------------------------------------+
+*/
+/*
+ * IDCT transformation of Chen algorithm
+ *
+ * @(#) $Id: chenidct.c,v 1.2 2003/07/18 10:19:21 honda Exp $
+ */
+/*************************************************************
+Copyright (C) 1990, 1991, 1993 Andy C. Hung, all rights reserved.
+PUBLIC DOMAIN LICENSE: Stanford University Portable Video Research
+Group. If you use this software, you agree to the following: This
+program package is purely experimental, and is licensed "as is".
+Permission is granted to use, modify, and distribute this program
+without charge for any purpose, provided this license/ disclaimer
+notice appears in the copies. No warranty or maintenance is given,
+either expressed or implied. In no event shall the author(s) be
+liable to you or a third party for any special, incidental,
+consequential, or other damages, arising out of the use or inability
+to use the program for any purpose (or the loss of data), even if we
+have been advised of such possibilities. Any public reference or
+advertisement of this source code should refer to it as the Portable
+Video Research Group (PVRG) code, and not by any author(s) (or
+Stanford University) name.
+*************************************************************/
+/*
+************************************************************
+chendct.c
+
+A simple DCT algorithm that seems to have fairly nice arithmetic
+properties.
+
+W. H. Chen, C. H. Smith and S. C. Fralick "A fast computational
+algorithm for the discrete cosine transform," IEEE Trans. Commun.,
+vol. COM-25, pp. 1004-1009, Sept 1977.
+
+************************************************************
+*/
+
+#define LS(r,s) ((r) << (s))
+#define RS(r,s) ((r) >> (s)) /* Caution with rounding... */
+
+#define MSCALE(expr) RS((expr),9)
+
+/* Cos constants */
+
+#define c1d4 362L
+
+#define c1d8 473L
+#define c3d8 196L
+
+#define c1d16 502L
+#define c3d16 426L
+#define c5d16 284L
+#define c7d16 100L
+
+
+/*
+ *
+ * ChenIDCT() implements the Chen inverse dct. Note that there are two
+ * input vectors that represent x=input, and y=output, and must be
+ * defined (and storage allocated) before this routine is called.
+ */
+void
+ChenIDct (int *x, int *y)
+{
+ register int i;
+ register int *aptr;
+ register int a0, a1, a2, a3;
+ register int b0, b1, b2, b3;
+ register int c0, c1, c2, c3;
+
+ /* Loop over columns */
+
+ for (i = 0; i < 8; i++)
+ {
+ aptr = x + i;
+ b0 = LS (*aptr, 2);
+ aptr += 8;
+ a0 = LS (*aptr, 2);
+ aptr += 8;
+ b2 = LS (*aptr, 2);
+ aptr += 8;
+ a1 = LS (*aptr, 2);
+ aptr += 8;
+ b1 = LS (*aptr, 2);
+ aptr += 8;
+ a2 = LS (*aptr, 2);
+ aptr += 8;
+ b3 = LS (*aptr, 2);
+ aptr += 8;
+ a3 = LS (*aptr, 2);
+
+ /* Split into even mode b0 = x0 b1 = x4 b2 = x2 b3 = x6.
+ And the odd terms a0 = x1 a1 = x3 a2 = x5 a3 = x7.
+ */
+
+ c0 = MSCALE ((c7d16 * a0) - (c1d16 * a3));
+ c1 = MSCALE ((c3d16 * a2) - (c5d16 * a1));
+ c2 = MSCALE ((c3d16 * a1) + (c5d16 * a2));
+ c3 = MSCALE ((c1d16 * a0) + (c7d16 * a3));
+
+ /* First Butterfly on even terms. */
+
+ a0 = MSCALE (c1d4 * (b0 + b1));
+ a1 = MSCALE (c1d4 * (b0 - b1));
+
+ a2 = MSCALE ((c3d8 * b2) - (c1d8 * b3));
+ a3 = MSCALE ((c1d8 * b2) + (c3d8 * b3));
+
+ b0 = a0 + a3;
+ b1 = a1 + a2;
+ b2 = a1 - a2;
+ b3 = a0 - a3;
+
+ /* Second Butterfly */
+
+ a0 = c0 + c1;
+ a1 = c0 - c1;
+ a2 = c3 - c2;
+ a3 = c3 + c2;
+
+ c0 = a0;
+ c1 = MSCALE (c1d4 * (a2 - a1));
+ c2 = MSCALE (c1d4 * (a2 + a1));
+ c3 = a3;
+
+ aptr = y + i;
+ *aptr = b0 + c3;
+ aptr += 8;
+ *aptr = b1 + c2;
+ aptr += 8;
+ *aptr = b2 + c1;
+ aptr += 8;
+ *aptr = b3 + c0;
+ aptr += 8;
+ *aptr = b3 - c0;
+ aptr += 8;
+ *aptr = b2 - c1;
+ aptr += 8;
+ *aptr = b1 - c2;
+ aptr += 8;
+ *aptr = b0 - c3;
+ }
+
+ /* Loop over rows */
+
+ for (i = 0; i < 8; i++)
+ {
+ aptr = y + LS (i, 3);
+ b0 = *(aptr++);
+ a0 = *(aptr++);
+ b2 = *(aptr++);
+ a1 = *(aptr++);
+ b1 = *(aptr++);
+ a2 = *(aptr++);
+ b3 = *(aptr++);
+ a3 = *(aptr);
+
+ /*
+ Split into even mode b0 = x0 b1 = x4 b2 = x2 b3 = x6.
+ And the odd terms a0 = x1 a1 = x3 a2 = x5 a3 = x7.
+ */
+
+ c0 = MSCALE ((c7d16 * a0) - (c1d16 * a3));
+ c1 = MSCALE ((c3d16 * a2) - (c5d16 * a1));
+ c2 = MSCALE ((c3d16 * a1) + (c5d16 * a2));
+ c3 = MSCALE ((c1d16 * a0) + (c7d16 * a3));
+
+ /* First Butterfly on even terms. */
+
+ a0 = MSCALE (c1d4 * (b0 + b1));
+ a1 = MSCALE (c1d4 * (b0 - b1));
+
+ a2 = MSCALE ((c3d8 * b2) - (c1d8 * b3));
+ a3 = MSCALE ((c1d8 * b2) + (c3d8 * b3));
+
+ /* Calculate last set of b's */
+
+ b0 = a0 + a3;
+ b1 = a1 + a2;
+ b2 = a1 - a2;
+ b3 = a0 - a3;
+
+ /* Second Butterfly */
+
+ a0 = c0 + c1;
+ a1 = c0 - c1;
+ a2 = c3 - c2;
+ a3 = c3 + c2;
+
+ c0 = a0;
+ c1 = MSCALE (c1d4 * (a2 - a1));
+ c2 = MSCALE (c1d4 * (a2 + a1));
+ c3 = a3;
+
+ aptr = y + LS (i, 3);
+ *(aptr++) = b0 + c3;
+ *(aptr++) = b1 + c2;
+ *(aptr++) = b2 + c1;
+ *(aptr++) = b3 + c0;
+ *(aptr++) = b3 - c0;
+ *(aptr++) = b2 - c1;
+ *(aptr++) = b1 - c2;
+ *(aptr) = b0 - c3;
+ }
+
+ /*
+ Retrieve correct accuracy. We have additional factor
+ of 16 that must be removed.
+ */
+
+ for (i = 0, aptr = y; i < 64; i++, aptr++)
+ *aptr = (((*aptr < 0) ? (*aptr - 8) : (*aptr + 8)) / 16);
+}
+
+ /*END*/
diff --git a/benchmarks/CHStone/jpeg/decode.c b/benchmarks/CHStone/jpeg/decode.c
new file mode 100755
index 0000000..a670381
--- /dev/null
+++ b/benchmarks/CHStone/jpeg/decode.c
@@ -0,0 +1,464 @@
+/*
++--------------------------------------------------------------------------+
+| 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) 1990, 1991, 1993 Andy C. Hung, all rights reserved.
+PUBLIC DOMAIN LICENSE: Stanford University Portable Video Research
+Group. If you use this software, you agree to the following: This
+program package is purely experimental, and is licensed "as is".
+Permission is granted to use, modify, and distribute this program
+without charge for any purpose, provided this license/ disclaimer
+notice appears in the copies. No warranty or maintenance is given,
+either expressed or implied. In no event shall the author(s) be
+liable to you or a third party for any special, incidental,
+consequential, or other damages, arising out of the use or inability
+to use the program for any purpose (or the loss of data), even if we
+have been advised of such possibilities. Any public reference or
+advertisement of this source code should refer to it as the Portable
+Video Research Group (PVRG) code, and not by any author(s) (or
+Stanford University) name.
+*************************************************************/
+
+/*
+************************************************************
+decode.c (original: transform.c)
+
+This file contains the reference DCT, the zig-zag and quantization
+algorithms.
+
+************************************************************
+*/
+/*
+ * Decoder
+ *
+ * @(#) $Id: decode.c,v 1.2 2003/07/18 10:19:21 honda Exp $
+ */
+void ChenIDct (int *x, int *y);
+
+int rgb_buf[4][RGB_NUM][DCTSIZE2];
+
+const int zigzag_index[64] = /* Is zig-zag map for matrix -> scan array */
+{ 0, 1, 5, 6, 14, 15, 27, 28,
+ 2, 4, 7, 13, 16, 26, 29, 42,
+ 3, 8, 12, 17, 25, 30, 41, 43,
+ 9, 11, 18, 24, 31, 40, 44, 53,
+ 10, 19, 23, 32, 39, 45, 52, 54,
+ 20, 22, 33, 38, 46, 51, 55, 60,
+ 21, 34, 37, 47, 50, 56, 59, 61,
+ 35, 36, 48, 49, 57, 58, 62, 63
+};
+
+
+/*
+ * IZigzagMatrix() performs an inverse zig-zag translation on the
+ * input imatrix and places the output in omatrix.
+ */
+void
+IZigzagMatrix (int *imatrix, int *omatrix)
+{
+ int i;
+
+ for (i = 0; i < DCTSIZE2; i++)
+
+ {
+
+*(omatrix++) = imatrix[zigzag_index[i]];
+
+}
+}
+
+
+/*
+ * IQuantize() takes an input matrix and does an inverse quantization
+ * and puts the output int qmatrix.
+ */
+void
+IQuantize (int *matrix, unsigned int *qmatrix)
+{
+ int *mptr;
+
+ for (mptr = matrix; mptr < matrix + DCTSIZE2; mptr++)
+ {
+ *mptr = *mptr * (*qmatrix);
+ qmatrix++;
+ }
+}
+
+
+/*
+ * PostshiftIDctMatrix() adds 128 (2048) to all 64 elements of an 8x8 matrix.
+ * This results in strictly positive values for all pixel coefficients.
+ */
+void
+PostshiftIDctMatrix (int *matrix, int shift)
+{
+ int *mptr;
+ for (mptr = matrix; mptr < matrix + DCTSIZE2; mptr++)
+ {
+ *mptr += shift;
+ }
+}
+
+
+/*
+ * BoundIDctMatrix bounds the inverse dct matrix so that no pixel has a
+ * value greater than 255 (4095) or less than 0.
+ */
+void
+BoundIDctMatrix (int *matrix, int Bound)
+{
+ int *mptr;
+
+ for (mptr = matrix; mptr < matrix + DCTSIZE2; mptr++)
+ {
+ if (*mptr < 0)
+ {
+ *mptr = 0;
+ }
+ else if (*mptr > Bound)
+ {
+ *mptr = Bound;
+ }
+ }
+}
+
+
+
+void
+WriteOneBlock (int *store, unsigned char *out_buf, int width, int height,
+ int voffs, int hoffs)
+{
+ int i, e;
+
+
+ /* Find vertical buffer offs. */
+ for (i = voffs; i < voffs + DCTSIZE; i++)
+ {
+ if (i < height)
+ {
+ int diff;
+ diff = width * i;
+ for (e = hoffs; e < hoffs + DCTSIZE; e++)
+ {
+ if (e < width)
+ {
+ out_buf[diff + e] = (unsigned char) (*(store++));
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+
+
+}
+
+/*
+ * WriteBlock() writes an array of data in the integer array pointed to
+ * by store out to the driver specified by the IOB. The integer array is
+ * stored in row-major form, that is, the first row of (8) elements, the
+ * second row of (8) elements....
+ * ONLY for MCU 1:1:1
+ */
+void
+WriteBlock (int *store, int *p_out_vpos, int *p_out_hpos,
+ unsigned char *p_out_buf)
+{
+ int voffs, hoffs;
+
+ /*
+ * Get vertical offsets
+ */
+ voffs = *p_out_vpos * DCTSIZE;
+ hoffs = *p_out_hpos * DCTSIZE;
+
+ /*
+ * Write block
+ */
+ WriteOneBlock (store,
+ p_out_buf,
+ p_jinfo_image_width, p_jinfo_image_height, voffs, hoffs);
+
+ /*
+ * Add positions
+ */
+ (*p_out_hpos)++;
+ (*p_out_vpos)++;
+
+ if (*p_out_hpos < p_jinfo_MCUWidth)
+ {
+ (*p_out_vpos)--;
+ }
+ else
+ {
+ *p_out_hpos = 0; /* If at end of image (width) */
+ }
+}
+
+/*
+ * 4:1:1
+ */
+void
+Write4Blocks (int *store1, int *store2, int *store3, int *store4,
+ int *p_out_vpos, int *p_out_hpos, unsigned char *p_out_buf)
+{
+ int voffs, hoffs;
+
+ /*
+ * OX
+ * XX
+ */
+ voffs = *p_out_vpos * DCTSIZE;
+ hoffs = *p_out_hpos * DCTSIZE;
+ WriteOneBlock (store1, p_out_buf,
+ p_jinfo_image_width, p_jinfo_image_height, voffs, hoffs);
+
+ /*
+ * XO
+ * XX
+ */
+ hoffs += DCTSIZE;
+ WriteOneBlock (store2, p_out_buf,
+ p_jinfo_image_width, p_jinfo_image_height, voffs, hoffs);
+
+ /*
+ * XX
+ * OX
+ */
+ voffs += DCTSIZE;
+ hoffs -= DCTSIZE;
+ WriteOneBlock (store3, p_out_buf,
+ p_jinfo_image_width, p_jinfo_image_height, voffs, hoffs);
+
+
+ /*
+ * XX
+ * XO
+ */
+ hoffs += DCTSIZE;
+ WriteOneBlock (store4,
+ p_out_buf, p_jinfo_image_width, p_jinfo_image_height,
+ voffs, hoffs);
+
+ /*
+ * Add positions
+ */
+ *p_out_hpos = *p_out_hpos + 2;
+ *p_out_vpos = *p_out_vpos + 2;
+
+
+ if (*p_out_hpos < p_jinfo_MCUWidth)
+ {
+ *p_out_vpos = *p_out_vpos - 2;
+ }
+ else
+ {
+ *p_out_hpos = 0; /* If at end of image (width) */
+ }
+}
+
+
+/*
+ * Transform from Yuv into RGB
+ */
+void
+YuvToRgb (int p, int *y_buf, int *u_buf, int *v_buf)
+{
+ int r, g, b;
+ int y, u, v;
+ int i;
+
+ for (i = 0; i < DCTSIZE2; i++)
+ {
+ y = y_buf[i];
+ u = u_buf[i] - 128;
+ v = v_buf[i] - 128;
+
+ r = (y * 256 + v * 359 + 128) >> 8;
+ g = (y * 256 - u * 88 - v * 182 + 128) >> 8;
+ b = (y * 256 + u * 454 + 128) >> 8;
+
+ if (r < 0)
+ r = 0;
+ else if (r > 255)
+ r = 255;
+
+ if (g < 0)
+ g = 0;
+ else if (g > 255)
+ g = 255;
+
+ if (b < 0)
+ b = 0;
+ else if (b > 255)
+ b = 255;
+
+ rgb_buf[p][0][i] = r;
+ rgb_buf[p][1][i] = g;
+ rgb_buf[p][2][i] = b;
+
+ }
+}
+
+
+/*
+ * Decode one block
+ */
+void
+decode_block (int comp_no, int *out_buf, int *HuffBuff)
+{
+ int QuantBuff[DCTSIZE2];
+ unsigned int *p_quant_tbl;
+
+ DecodeHuffMCU (HuffBuff, comp_no);
+
+ IZigzagMatrix (HuffBuff, QuantBuff);
+
+ p_quant_tbl =
+ &p_jinfo_quant_tbl_quantval[(int)p_jinfo_comps_info_quant_tbl_no[comp_no]][DCTSIZE2];
+ IQuantize (QuantBuff, p_quant_tbl);
+
+ ChenIDct (QuantBuff, out_buf);
+
+ PostshiftIDctMatrix (out_buf, IDCT_SHIFT);
+
+ BoundIDctMatrix (out_buf, IDCT_BOUNT);
+
+}
+
+
+void
+decode_start (int *out_data_image_width, int *out_data_image_height,
+ int *out_data_comp_vpos, int *out_data_comp_hpos)
+{
+ int i;
+ int CurrentMCU = 0;
+ int HuffBuff[NUM_COMPONENT][DCTSIZE2];
+ int IDCTBuff[6][DCTSIZE2];
+
+ /* Read buffer */
+ CurHuffReadBuf = p_jinfo_jpeg_data;
+
+ /*
+ * Initial value of DC element is 0
+ */
+ for (i = 0; i < NUM_COMPONENT; i++)
+ {
+ HuffBuff[i][0] = 0;
+ }
+
+ /*
+ * Set the size of image to output buffer
+ */
+ *out_data_image_width = p_jinfo_image_width;
+ *out_data_image_height = p_jinfo_image_height;
+
+ /*
+ * Initialize output buffer
+ */
+ for (i = 0; i < RGB_NUM; i++)
+ {
+ out_data_comp_vpos[i] = 0;
+ out_data_comp_hpos[i] = 0;
+ }
+
+
+ if (p_jinfo_smp_fact == SF1_1_1)
+ {
+ printf ("Decode 1:1:1 NumMCU = %d\n", p_jinfo_NumMCU);
+
+ /*
+ * 1_1_1
+ */
+ while (CurrentMCU < p_jinfo_NumMCU)
+ {
+
+ for (i = 0; i < NUM_COMPONENT; i++)
+ {
+ decode_block (i, IDCTBuff[i], HuffBuff[i]);
+ }
+
+
+ YuvToRgb (0, IDCTBuff[0], IDCTBuff[1], IDCTBuff[2]);
+ /*
+ * Write
+ */
+ for (i = 0; i < RGB_NUM; i++)
+ {
+ WriteBlock (&rgb_buf[0][i][0],
+ &out_data_comp_vpos[i],
+ &out_data_comp_hpos[i], &OutData_comp_buf[i][0]);
+ }
+ CurrentMCU++;
+ }
+
+ }
+ else
+ {
+ printf ("Decode 4:1:1 NumMCU = %d\n", p_jinfo_NumMCU);
+ /*
+ * 4_1_1
+ */
+ while (CurrentMCU < p_jinfo_NumMCU)
+ {
+ /*
+ * Decode Y element
+ * Decoding Y, U and V elements should be sequentially conducted for the use of Huffman table
+ */
+
+ for (i = 0; i < 4; i++)
+ {
+ decode_block (0, IDCTBuff[i], HuffBuff[0]);
+ }
+
+ /* Decode U */
+ decode_block (1, IDCTBuff[4], HuffBuff[1]);
+
+ /* Decode V */
+ decode_block (2, IDCTBuff[5], HuffBuff[2]);
+
+
+ /* Transform from Yuv into RGB */
+
+ for (i = 0; i < 4; i++)
+ {
+ YuvToRgb (i, IDCTBuff[i], IDCTBuff[4], IDCTBuff[5]);
+ }
+
+
+ for (i = 0; i < RGB_NUM; i++)
+ {
+ Write4Blocks (&rgb_buf[0][i][0],
+ &rgb_buf[1][i][0],
+ &rgb_buf[2][i][0],
+ &rgb_buf[3][i][0],
+ &out_data_comp_vpos[i],
+ &out_data_comp_hpos[i], &OutData_comp_buf[i][0]);
+ }
+
+
+ CurrentMCU += 4;
+ }
+ }
+}
diff --git a/benchmarks/CHStone/jpeg/decode.h b/benchmarks/CHStone/jpeg/decode.h
new file mode 100755
index 0000000..bb7f5af
--- /dev/null
+++ b/benchmarks/CHStone/jpeg/decode.h
@@ -0,0 +1,108 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+/*
+ * Header file for decoding
+ *
+ * @(#) $Id: decode.h,v 1.2 2003/07/18 10:19:21 honda Exp $
+ */
+
+#ifndef _DECODE_H_
+#define _DECODE_H_
+
+#define NUM_HUFF_TBLS 2
+#define NUM_QUANT_TBLS 4
+#define DCTSIZE 8
+#define DCTSIZE2 64
+
+
+/*
+ * Fix the number of components as 3
+ */
+#define NUM_COMPONENT 3
+
+#define RGB_NUM 3
+
+/*
+ * Define the sample precision as 8
+ */
+#define IDCT_SHIFT 128
+#define IDCT_BOUNT 255
+#define MARKER_MARKER 0xff
+
+/* SAMPLING_FACTOR */
+#define SF1_1_1 0
+#define SF4_1_1 2
+
+char p_jinfo_data_precision;
+short p_jinfo_image_height;
+short p_jinfo_image_width;
+char p_jinfo_num_components;
+int p_jinfo_smp_fact;
+
+char p_jinfo_comps_info_index[NUM_COMPONENT];
+char p_jinfo_comps_info_id[NUM_COMPONENT];
+char p_jinfo_comps_info_h_samp_factor[NUM_COMPONENT];
+char p_jinfo_comps_info_v_samp_factor[NUM_COMPONENT];
+char p_jinfo_comps_info_quant_tbl_no[NUM_COMPONENT];
+char p_jinfo_comps_info_dc_tbl_no[NUM_COMPONENT];
+char p_jinfo_comps_info_ac_tbl_no[NUM_COMPONENT];
+
+unsigned int p_jinfo_quant_tbl_quantval[NUM_QUANT_TBLS][DCTSIZE2];
+
+int p_jinfo_dc_xhuff_tbl_bits[NUM_HUFF_TBLS][36];
+int p_jinfo_dc_xhuff_tbl_huffval[NUM_HUFF_TBLS][257];
+
+int p_jinfo_ac_xhuff_tbl_bits[NUM_HUFF_TBLS][36];
+int p_jinfo_ac_xhuff_tbl_huffval[NUM_HUFF_TBLS][257];
+
+int p_jinfo_dc_dhuff_tbl_ml[NUM_HUFF_TBLS];
+int p_jinfo_dc_dhuff_tbl_maxcode[NUM_HUFF_TBLS][36];
+int p_jinfo_dc_dhuff_tbl_mincode[NUM_HUFF_TBLS][36];
+int p_jinfo_dc_dhuff_tbl_valptr[NUM_HUFF_TBLS][36];
+
+int p_jinfo_ac_dhuff_tbl_ml[NUM_HUFF_TBLS];
+int p_jinfo_ac_dhuff_tbl_maxcode[NUM_HUFF_TBLS][36];
+int p_jinfo_ac_dhuff_tbl_mincode[NUM_HUFF_TBLS][36];
+int p_jinfo_ac_dhuff_tbl_valptr[NUM_HUFF_TBLS][36];
+
+int p_jinfo_MCUWidth;
+int p_jinfo_MCUHeight;
+int p_jinfo_NumMCU;
+
+unsigned char *p_jinfo_jpeg_data;
+
+#endif /* _DECODE_H_ */
diff --git a/benchmarks/CHStone/jpeg/global.h b/benchmarks/CHStone/jpeg/global.h
new file mode 100755
index 0000000..267a24c
--- /dev/null
+++ b/benchmarks/CHStone/jpeg/global.h
@@ -0,0 +1,59 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+/*
+ * Definition of parameters
+ *
+ * @(#) $Id: global.h,v 1.2 2003/07/18 10:19:21 honda Exp $
+ */
+#ifndef _GLOBAL_H_
+#define _GLOBAL_H_
+
+
+#define EXIT exit(0)
+
+/*
+ * Size of JPEG file
+ */
+#define JPEG_FILE_SIZE (90 * 59)
+
+/*
+ * Size of output buffer
+ */
+#define BMP_OUT_SIZE (90 * 59)
+
+
+#endif /* _GLOBAL_H_ */
diff --git a/benchmarks/CHStone/jpeg/huffman.c b/benchmarks/CHStone/jpeg/huffman.c
new file mode 100755
index 0000000..bf1528f
--- /dev/null
+++ b/benchmarks/CHStone/jpeg/huffman.c
@@ -0,0 +1,349 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*
+ * Huffman decoding module
+ *
+ * @(#) $Id: huffman.c,v 1.2 2003/07/18 10:19:21 honda Exp $
+ */
+
+/*************************************************************
+Copyright (C) 1990, 1991, 1993 Andy C. Hung, all rights reserved.
+PUBLIC DOMAIN LICENSE: Stanford University Portable Video Research
+Group. If you use this software, you agree to the following: This
+program package is purely experimental, and is licensed "as is".
+Permission is granted to use, modify, and distribute this program
+without charge for any purpose, provided this license/ disclaimer
+notice appears in the copies. No warranty or maintenance is given,
+either expressed or implied. In no event shall the author(s) be
+liable to you or a third party for any special, incidental,
+consequential, or other damages, arising out of the use or inability
+to use the program for any purpose (or the loss of data), even if we
+have been advised of such possibilities. Any public reference or
+advertisement of this source code should refer to it as the Portable
+Video Research Group (PVRG) code, and not by any author(s) (or
+Stanford University) name.
+*************************************************************/
+/*
+************************************************************
+huffman.c
+
+This file represents the core Huffman routines, most of them
+implemented with the JPEG reference. These routines are not very fast
+and can be improved, but comprise very little of software run-time.
+
+************************************************************
+*/
+
+/* Used for sign extensions. */
+const static int extend_mask[20] = {
+ 0xFFFFFFFE, 0xFFFFFFFC, 0xFFFFFFF8, 0xFFFFFFF0, 0xFFFFFFE0, 0xFFFFFFC0,
+ 0xFFFFFF80, 0xFFFFFF00, 0xFFFFFE00, 0xFFFFFC00, 0xFFFFF800, 0xFFFFF000,
+ 0xFFFFE000, 0xFFFFC000, 0xFFFF8000, 0xFFFF0000, 0xFFFE0000, 0xFFFC0000,
+ 0xFFF80000, 0xFFF00000
+};
+
+
+/* Masks */
+const int bit_set_mask[32] = { /* This is 2^i at ith position */
+ 0x00000001, 0x00000002, 0x00000004, 0x00000008,
+ 0x00000010, 0x00000020, 0x00000040, 0x00000080,
+ 0x00000100, 0x00000200, 0x00000400, 0x00000800,
+ 0x00001000, 0x00002000, 0x00004000, 0x00008000,
+ 0x00010000, 0x00020000, 0x00040000, 0x00080000,
+ 0x00100000, 0x00200000, 0x00400000, 0x00800000,
+ 0x01000000, 0x02000000, 0x04000000, 0x08000000,
+ 0x10000000, 0x20000000, 0x40000000, 0x80000000
+};
+
+const int lmask[32] = { /* This is 2^{i+1}-1 */
+ 0x00000001, 0x00000003, 0x00000007, 0x0000000f,
+ 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff,
+ 0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff,
+ 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff,
+ 0x0001ffff, 0x0003ffff, 0x0007ffff, 0x000fffff,
+ 0x001fffff, 0x003fffff, 0x007fffff, 0x00ffffff,
+ 0x01ffffff, 0x03ffffff, 0x07ffffff, 0x0fffffff,
+ 0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff
+};
+
+static unsigned int current_read_byte;
+static int read_position = -1;
+
+/*
+ * pgetc() gets a character onto the stream but it checks to see
+ * if there are any marker conflicts.
+ */
+static int
+pgetc ()
+{
+ int temp;
+
+ if ((temp = *CurHuffReadBuf++) == MARKER_MARKER)
+ { /* If MARKER then */
+ if ((temp = *CurHuffReadBuf++))
+ { /* if next is not 0xff, then marker */
+ printf ("Unanticipated marker detected.\n");
+ }
+ else
+ {
+ return (MARKER_MARKER);
+ }
+ }
+ return (temp);
+}
+
+
+/*
+ * buf_getb() gets a bit from the read stream.
+ */
+int
+buf_getb ()
+{
+ if (read_position < 0)
+ {
+ current_read_byte = pgetc ();
+ read_position = 7;
+ }
+
+ if (current_read_byte & bit_set_mask[read_position--])
+ {
+ return (1);
+ }
+ return (0);
+}
+
+
+/*
+ * megetv() gets n bits from the read stream and returns it.
+ *
+ */
+int
+buf_getv (int n)
+{
+ int p, rv;
+
+ n--;
+ p = n - read_position;
+ while (p > 0)
+ {
+ if (read_position > 23)
+ { /* If byte buffer contains almost entire word */
+ rv = (current_read_byte << p); /* Manipulate buffer */
+ current_read_byte = pgetc (); /* Change read bytes */
+
+ rv |= (current_read_byte >> (8 - p));
+ read_position = 7 - p;
+ return (rv & lmask[n]);
+ /* Can return pending residual val */
+ }
+ current_read_byte = (current_read_byte << 8) | pgetc ();
+ read_position += 8; /* else shift in new information */
+ p -= 8;
+ }
+
+ if (!p)
+ { /* If position is zero */
+ read_position = -1;
+ /* Can return current byte */
+ return (current_read_byte & lmask[n]);
+ }
+
+ p = -p;
+ /* Else reverse position and shift */
+ read_position = p - 1;
+ return ((current_read_byte >> p) & lmask[n]);
+}
+
+
+
+/*
+ * Create Table for decoding
+ */
+int
+huff_make_dhuff_tb (int *p_xhtbl_bits, int p_dhtbl_ml,
+ int *p_dhtbl_maxcode, int *p_dhtbl_mincode,
+ int *p_dhtbl_valptr)
+{
+ int i, j, p, code, size, l;
+ int huffsize[257];
+ int huffcode[257];
+ int lastp;
+
+ /*
+ * Get size
+ */
+ for (p = 0, i = 1; i < 17; i++)
+ {
+ for (j = 1; j <= p_xhtbl_bits[i]; j++)
+ {
+ huffsize[p++] = i;
+ }
+ }
+
+ huffsize[p] = 0;
+ lastp = p;
+
+ p = 0;
+ code = 0;
+ size = huffsize[0];
+ while (1)
+ {
+ do
+ {
+ huffcode[p++] = code++;
+ }
+ while ((huffsize[p] == size) && (p < 257));
+ /* Overflow Detection */
+ if (!huffsize[p])
+ { /* All finished. */
+ break;
+ }
+ do
+ {
+ /* Shift next code to expand prefix. */
+ code <<= 1;
+ size++;
+ }
+ while (huffsize[p] != size);
+ }
+
+ for (p_dhtbl_ml = 1, p = 0, l = 1; l <= 16; l++)
+ {
+ if (p_xhtbl_bits[l] == 0)
+ {
+ p_dhtbl_maxcode[l] = -1; /* Watch out JPEG is wrong here */
+ }
+ else
+ { /* We use -1 to indicate skipping. */
+ p_dhtbl_valptr[l] = p;
+ p_dhtbl_mincode[l] = huffcode[p];
+ p += p_xhtbl_bits[l] - 1;
+ p_dhtbl_maxcode[l] = huffcode[p];
+ p_dhtbl_ml = l;
+ p++;
+ }
+ }
+ p_dhtbl_maxcode[p_dhtbl_ml]++;
+ return p_dhtbl_ml;
+}
+
+
+/*
+ *
+ */
+int
+DecodeHuffman (int *Xhuff_huffval, int Dhuff_ml,
+ int *Dhuff_maxcode, int *Dhuff_mincode, int *Dhuff_valptr)
+{
+ int code, l, p;
+
+ code = buf_getb ();
+ for (l = 1; code > Dhuff_maxcode[l]; l++)
+ {
+ code = (code << 1) + buf_getb ();
+ }
+
+ if (code < Dhuff_maxcode[Dhuff_ml])
+ {
+ p = Dhuff_valptr[l] + code - Dhuff_mincode[l];
+ return (Xhuff_huffval[p]);
+ }
+ else
+ {
+ main_result++;
+ printf ("Huffman read error\n");
+ EXIT;
+ }
+
+}
+
+
+/*
+ * Decode one MCU
+ */
+void
+DecodeHuffMCU (int *out_buf, int num_cmp)
+{
+ int s, diff, tbl_no, *mptr, k, n, r;
+
+ /*
+ * Decode DC
+ */
+ tbl_no = p_jinfo_comps_info_dc_tbl_no[num_cmp];
+ s = DecodeHuffman (&p_jinfo_dc_xhuff_tbl_huffval[tbl_no][0],
+ p_jinfo_dc_dhuff_tbl_ml[tbl_no],
+ &p_jinfo_dc_dhuff_tbl_maxcode[tbl_no][0],
+ &p_jinfo_dc_dhuff_tbl_mincode[tbl_no][0],
+ &p_jinfo_dc_dhuff_tbl_valptr[tbl_no][0]);
+
+ if (s)
+ {
+ diff = buf_getv (s);
+ s--;
+ if ((diff & bit_set_mask[s]) == 0)
+ {
+ diff |= extend_mask[s];
+ diff++;
+ }
+
+ diff += *out_buf; /* Change the last DC */
+ *out_buf = diff;
+ }
+
+ /*
+ * Decode AC
+ */
+ /* Set all values to zero */
+ for (mptr = out_buf + 1; mptr < out_buf + DCTSIZE2; mptr++)
+ {
+ *mptr = 0;
+ }
+
+ for (k = 1; k < DCTSIZE2;)
+ { /* JPEG Mistake */
+ r = DecodeHuffman (&p_jinfo_ac_xhuff_tbl_huffval[tbl_no][0],
+ p_jinfo_ac_dhuff_tbl_ml[tbl_no],
+ &p_jinfo_ac_dhuff_tbl_maxcode[tbl_no][0],
+ &p_jinfo_ac_dhuff_tbl_mincode[tbl_no][0],
+ &p_jinfo_ac_dhuff_tbl_valptr[tbl_no][0]);
+
+ s = r & 0xf; /* Find significant bits */
+ n = (r >> 4) & 0xf; /* n = run-length */
+
+ if (s)
+ {
+ if ((k += n) >= DCTSIZE2) /* JPEG Mistake */
+ break;
+ out_buf[k] = buf_getv (s); /* Get s bits */
+ s--; /* Align s */
+ if ((out_buf[k] & bit_set_mask[s]) == 0)
+ { /* Also (1 << s) */
+ out_buf[k] |= extend_mask[s]; /* Also (-1 << s) + 1 */
+ out_buf[k]++; /* Increment 2's c */
+ }
+ k++; /* Goto next element */
+ }
+ else if (n == 15) /* Zero run length code extnd */
+ k += 16;
+ else
+ {
+ break;
+ }
+ }
+}
diff --git a/benchmarks/CHStone/jpeg/huffman.h b/benchmarks/CHStone/jpeg/huffman.h
new file mode 100755
index 0000000..7c0b4fe
--- /dev/null
+++ b/benchmarks/CHStone/jpeg/huffman.h
@@ -0,0 +1,39 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+
+unsigned char *CurHuffReadBuf;
+void DecodeHuffMCU (int *out_buf, int num_cmp);
diff --git a/benchmarks/CHStone/jpeg/init.h b/benchmarks/CHStone/jpeg/init.h
new file mode 100755
index 0000000..2cd639a
--- /dev/null
+++ b/benchmarks/CHStone/jpeg/init.h
@@ -0,0 +1,1264 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+int main_result;
+/*
+ * Output Buffer
+ */
+unsigned char *CurHuffReadBuf;
+int OutData_image_width;
+int OutData_image_height;
+int OutData_comp_vpos[RGB_NUM];
+int OutData_comp_hpos[RGB_NUM];
+unsigned char OutData_comp_buf[RGB_NUM][BMP_OUT_SIZE];
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vector (added for CHStone) |
+| hana_jpg : input data |
+| hana_bmp : expected output data |
+| out_width : expected output data |
+| out_length : expected output data |
++--------------------------------------------------------------------------+
+*/
+#define JPEGSIZE 5207
+
+const unsigned char hana_jpg[JPEGSIZE] = {
+ 255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0,
+ 255, 219, 0, 67, 0, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 3, 3, 3, 4, 6, 4, 4,
+ 4, 4, 4, 8, 6, 6, 5, 6, 9, 8, 10, 10, 9, 8, 9, 9, 10, 12, 15, 12, 10, 11,
+ 14, 11, 9, 9, 13, 17, 13, 14, 15, 16, 16, 17, 16, 10, 12, 18, 19, 18, 16,
+ 19, 15, 16, 16, 16, 255, 219, 0, 67, 1, 3, 3, 3, 4, 3, 4, 8, 4, 4, 8, 16,
+ 11, 9, 11, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 255, 192,
+ 0, 17, 8, 0, 59, 0, 90, 3, 1, 34, 0, 2, 17, 1, 3, 17, 1, 255, 196, 0, 31,
+ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 255, 196, 0, 181, 16, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0,
+ 0, 1, 125, 1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34,
+ 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51,
+ 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53,
+ 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87,
+ 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118,
+ 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148,
+ 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170,
+ 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 250, 255, 196, 0, 31, 1, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
+ 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 255, 196, 0, 181, 17, 0, 2, 1, 2,
+ 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119, 0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18,
+ 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35,
+ 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25,
+ 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72,
+ 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105,
+ 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135,
+ 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164,
+ 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215,
+ 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 255, 218, 0, 12, 3, 1, 0, 2, 17, 3, 17, 0,
+ 63, 0, 245, 175, 0, 90, 234, 23, 179, 175, 138, 60, 79, 49, 241, 164, 122,
+ 155, 207, 169, 233, 190, 34, 176, 103, 22, 122, 108, 86, 241, 42, 91, 218,
+ 172, 12, 73, 44, 199, 204, 38, 64, 25, 100, 44, 120, 227, 11, 192, 232,
+ 186, 55, 237, 59, 163, 77, 227, 77, 59, 91, 241, 127, 133, 53, 77, 6, 210,
+ 214, 226, 246, 59, 184, 68, 240, 221, 88, 75, 114, 4, 136, 51, 144, 86,
+ 40, 144, 60, 152, 44, 85, 190, 81, 236, 191, 42, 120, 51, 246, 139, 241,
+ 15, 194, 95, 136, 109, 164, 69, 172, 234, 103, 194, 209, 222, 44, 113,
+ 218, 195, 117, 152, 35, 182, 145, 140, 140, 33, 141, 183, 4, 67, 191, 32,
+ 32, 0, 2, 112, 58, 87, 176, 248, 23, 246, 198, 240, 192, 241, 97, 241, 71,
+ 136, 252, 49, 44, 26, 191, 142, 174, 35, 182, 186, 213, 18, 255, 0, 203,
+ 182, 210, 116, 245, 142, 59, 104, 164, 114, 220, 200, 4, 176, 179, 72, 89,
+ 64, 10, 196, 142, 165, 31, 183, 13, 142, 165, 207, 25, 41, 107, 54, 155,
+ 190, 154, 53, 183, 158, 189, 254, 243, 23, 36, 210, 232, 125, 11, 169,
+ 106, 22, 30, 53, 248, 24, 38, 241, 78, 129, 164, 120, 150, 77, 70, 218,
+ 59, 233, 45, 116, 235, 105, 239, 237, 117, 11, 121, 68, 91, 175, 227, 138,
+ 117, 142, 72, 144, 13, 211, 24, 147, 44, 129, 65, 82, 225, 129, 63, 40,
+ 248, 147, 246, 97, 240, 171, 147, 166, 232, 207, 172, 75, 127, 115, 49,
+ 107, 59, 171, 11, 121, 47, 116, 187, 168, 229, 93, 233, 17, 92, 151, 183,
+ 117, 31, 46, 114, 193, 128, 29, 73, 192, 250, 171, 197, 158, 10, 186, 215,
+ 190, 201, 27, 248, 170, 214, 238, 65, 99, 117, 53, 190, 149, 103, 107, 29,
+ 197, 148, 147, 136, 213, 51, 5, 199, 221, 183, 60, 67, 34, 146, 225, 136,
+ 50, 47, 40, 94, 188, 39, 225, 135, 197, 79, 140, 176, 124, 71, 130, 211,
+ 196, 99, 86, 159, 69, 180, 105, 45, 102, 210, 172, 109, 18, 91, 149, 115,
+ 132, 134, 109, 235, 242, 172, 70, 86, 96, 29, 159, 14, 85, 143, 64, 113,
+ 234, 202, 24, 90, 139, 146, 178, 77, 108, 180, 244, 210, 253, 29, 255, 0,
+ 34, 188, 217, 243, 79, 194, 205, 67, 199, 31, 3, 190, 37, 233, 94, 43,
+ 131, 69, 125, 40, 67, 168, 191, 135, 239, 110, 174, 173, 159, 236, 241,
+ 201, 36, 138, 178, 197, 185, 134, 3, 170, 236, 111, 80, 59, 87, 214, 31,
+ 181, 100, 43, 96, 154, 69, 151, 136, 252, 9, 160, 155, 93, 80, 197, 168,
+ 182, 165, 22, 158, 12, 223, 104, 82, 67, 66, 210, 224, 97, 242, 1, 32,
+ 158, 71, 110, 227, 99, 225, 111, 195, 47, 9, 124, 69, 182, 241, 47, 138,
+ 124, 117, 62, 191, 110, 214, 126, 54, 215, 230, 184, 133, 84, 186, 49,
+ 105, 150, 35, 148, 25, 141, 220, 40, 100, 37, 121, 4, 177, 7, 28, 142,
+ 183, 195, 254, 40, 93, 65, 109, 62, 10, 124, 74, 181, 212, 181, 211, 169,
+ 217, 223, 237, 212, 46, 237, 161, 49, 106, 145, 197, 181, 68, 222, 100,
+ 96, 32, 102, 89, 16, 2, 131, 118, 118, 147, 142, 181, 231, 82, 192, 202,
+ 174, 14, 88, 106, 83, 183, 58, 222, 215, 181, 250, 124, 204, 181, 148, 79,
+ 132, 60, 73, 6, 179, 172, 71, 125, 171, 92, 218, 172, 150, 146, 48, 54,
+ 168, 23, 228, 183, 128, 28, 2, 61, 115, 236, 59, 241, 197, 105, 124, 33,
+ 248, 7, 226, 175, 142, 26, 243, 190, 157, 172, 219, 218, 195, 164, 95, 90,
+ 166, 161, 110, 8, 55, 17, 217, 73, 159, 223, 68, 135, 135, 59, 148, 166,
+ 222, 196, 231, 156, 96, 253, 17, 241, 19, 224, 159, 130, 60, 47, 225, 247,
+ 240, 87, 135, 109, 174, 19, 89, 240, 237, 188, 122, 197, 173, 197, 201,
+ 149, 238, 27, 79, 9, 251, 213, 184, 145, 155, 203, 126, 89, 134, 17, 114,
+ 24, 2, 0, 193, 175, 9, 248, 125, 225, 111, 136, 86, 158, 59, 143, 226, 15,
+ 194, 45, 64, 75, 60, 18, 173, 172, 208, 41, 62, 75, 220, 5, 18, 36, 5, 65,
+ 7, 107, 14, 65, 207, 94, 135, 156, 15, 3, 15, 149, 213, 193, 98, 161, 78,
+ 178, 82, 77, 116, 118, 252, 236, 244, 234, 236, 52, 239, 45, 116, 177,
+ 206, 252, 109, 248, 11, 241, 19, 225, 127, 137, 181, 75, 123, 171, 53,
+ 185, 210, 34, 188, 91, 125, 62, 234, 88, 214, 41, 111, 34, 194, 149, 109,
+ 153, 224, 224, 149, 61, 6, 83, 35, 174, 43, 153, 241, 119, 129, 103, 155,
+ 91, 130, 230, 195, 77, 145, 85, 236, 149, 183, 5, 192, 70, 249, 186, 254,
+ 149, 236, 63, 23, 62, 62, 248, 235, 226, 183, 138, 117, 111, 2, 248, 219,
+ 81, 183, 209, 111, 109, 138, 219, 195, 107, 12, 42, 177, 249, 232, 160,
+ 237, 103, 112, 100, 206, 125, 255, 0, 168, 166, 124, 46, 182, 241, 206,
+ 177, 225, 123, 203, 31, 22, 232, 179, 51, 8, 100, 251, 45, 210, 91, 179,
+ 41, 116, 24, 32, 176, 24, 239, 235, 94, 102, 115, 86, 80, 197, 63, 171,
+ 167, 238, 232, 211, 243, 252, 215, 153, 162, 105, 232, 217, 243, 118, 155,
+ 109, 168, 104, 183, 209, 221, 106, 154, 68, 179, 36, 51, 110, 144, 148,
+ 59, 91, 25, 245, 234, 43, 170, 127, 17, 248, 118, 87, 105, 23, 69, 218,
+ 28, 150, 3, 106, 240, 15, 227, 81, 106, 186, 55, 140, 91, 117, 245, 213,
+ 181, 203, 218, 41, 44, 226, 60, 16, 7, 81, 144, 57, 238, 63, 173, 114, 15,
+ 29, 225, 118, 41, 109, 49, 82, 78, 56, 35, 138, 186, 120, 135, 107, 232,
+ 95, 59, 167, 162, 71, 175, 252, 36, 248, 117, 23, 142, 110, 175, 111, 245,
+ 221, 91, 75, 131, 79, 179, 184, 210, 172, 94, 57, 228, 88, 111, 36, 138,
+ 226, 238, 24, 68, 214, 202, 227, 27, 17, 88, 163, 21, 99, 176, 180, 125,
+ 177, 159, 76, 248, 161, 251, 63, 77, 240, 239, 193, 86, 151, 250, 198,
+ 137, 246, 189, 19, 83, 179, 63, 216, 186, 234, 152, 24, 58, 205, 3, 77,
+ 246, 121, 192, 97, 34, 49, 198, 229, 35, 49, 185, 115, 128, 75, 40, 174,
+ 43, 225, 191, 196, 141, 91, 224, 103, 237, 16, 254, 19, 240, 214, 166,
+ 151, 94, 22, 131, 86, 26, 114, 63, 136, 165, 251, 39, 217, 44, 174, 30,
+ 48, 242, 121, 178, 48, 91, 96, 170, 204, 204, 220, 35, 162, 124, 195, 161,
+ 31, 80, 124, 70, 241, 238, 129, 227, 77, 99, 226, 46, 145, 225, 189, 111,
+ 67, 212, 252, 5, 160, 248, 106, 53, 54, 241, 95, 219, 205, 97, 121, 175,
+ 221, 195, 33, 134, 75, 73, 28, 200, 177, 165, 188, 44, 243, 74, 177, 21,
+ 95, 181, 48, 15, 181, 208, 77, 95, 75, 131, 142, 30, 120, 88, 202, 26,
+ 187, 62, 139, 170, 111, 206, 235, 95, 145, 206, 225, 107, 167, 184, 191,
+ 9, 53, 95, 136, 94, 41, 176, 240, 150, 161, 241, 147, 90, 125, 87, 76,
+ 241, 78, 153, 53, 200, 177, 147, 88, 91, 120, 227, 211, 225, 182, 30, 93,
+ 225, 89, 8, 89, 28, 128, 177, 186, 225, 84, 44, 141, 185, 195, 144, 107,
+ 133, 241, 63, 131, 252, 45, 225, 79, 7, 252, 93, 213, 254, 25, 252, 110,
+ 187, 212, 124, 41, 164, 91, 163, 201, 165, 65, 165, 189, 244, 241, 134,
+ 141, 2, 180, 23, 48, 76, 130, 53, 243, 131, 196, 102, 117, 97, 9, 140,
+ 151, 105, 79, 205, 94, 37, 224, 255, 0, 218, 3, 226, 135, 132, 237, 204,
+ 154, 110, 175, 12, 73, 225, 189, 30, 255, 0, 195, 22, 139, 61, 162, 200,
+ 35, 181, 188, 27, 198, 192, 197, 112, 194, 101, 80, 197, 155, 5, 66, 140,
+ 101, 74, 191, 216, 191, 0, 97, 248, 106, 158, 17, 240, 214, 157, 226, 77,
+ 31, 195, 26, 110, 179, 166, 218, 71, 164, 160, 179, 215, 173, 34, 150,
+ 123, 80, 136, 208, 164, 114, 207, 44, 114, 44, 178, 15, 32, 20, 36, 111,
+ 149, 55, 43, 72, 133, 86, 45, 176, 83, 134, 99, 21, 218, 27, 182, 157,
+ 245, 91, 93, 91, 201, 239, 170, 220, 119, 186, 185, 243, 175, 236, 205,
+ 241, 115, 84, 211, 60, 75, 226, 175, 12, 205, 225, 13, 10, 254, 67, 225,
+ 141, 79, 83, 182, 214, 103, 210, 252, 235, 187, 27, 183, 178, 49, 237,
+ 146, 108, 17, 36, 119, 18, 152, 213, 132, 216, 5, 192, 195, 28, 152, 100,
+ 245, 239, 139, 31, 23, 188, 45, 165, 120, 167, 192, 158, 44, 188, 210,
+ 117, 63, 13, 120, 78, 232, 141, 91, 73, 241, 110, 159, 108, 210, 75, 103,
+ 108, 97, 73, 161, 211, 132, 32, 180, 78, 161, 39, 65, 54, 228, 149, 200,
+ 86, 85, 137, 62, 250, 117, 223, 19, 126, 27, 104, 95, 11, 126, 29, 205,
+ 171, 124, 26, 159, 72, 22, 240, 222, 221, 232, 254, 39, 104, 164, 130,
+ 226, 125, 82, 1, 32, 46, 207, 28, 95, 187, 23, 81, 249, 155, 55, 72, 129,
+ 163, 66, 162, 63, 47, 228, 101, 225, 172, 190, 32, 120, 147, 74, 253, 157,
+ 252, 33, 225, 127, 8, 120, 114, 226, 13, 78, 230, 75, 155, 9, 117, 185,
+ 70, 251, 59, 107, 187, 89, 150, 215, 206, 93, 225, 151, 115, 71, 34, 194,
+ 97, 10, 165, 159, 45, 183, 106, 200, 225, 97, 231, 87, 13, 40, 81, 165,
+ 83, 155, 221, 190, 158, 77, 45, 21, 254, 87, 208, 19, 229, 247, 100, 181,
+ 71, 180, 191, 138, 190, 28, 124, 97, 240, 166, 166, 218, 110, 163, 225,
+ 63, 23, 226, 194, 86, 210, 237, 109, 35, 184, 210, 181, 24, 111, 23, 206,
+ 142, 127, 49, 38, 103, 104, 196, 204, 71, 150, 238, 155, 74, 200, 187,
+ 129, 24, 145, 190, 120, 248, 81, 30, 177, 240, 51, 196, 241, 248, 162, 63,
+ 14, 31, 21, 232, 158, 60, 16, 190, 146, 209, 197, 45, 180, 107, 34, 57,
+ 96, 232, 133, 73, 249, 6, 236, 185, 0, 97, 65, 202, 247, 224, 188, 89,
+ 227, 125, 79, 196, 62, 31, 240, 80, 248, 104, 182, 182, 122, 164, 250,
+ 121, 183, 212, 53, 75, 109, 62, 11, 9, 44, 46, 45, 148, 91, 11, 81, 44,
+ 103, 118, 197, 141, 12, 104, 50, 89, 145, 87, 146, 14, 23, 217, 254, 22,
+ 252, 92, 212, 254, 37, 105, 62, 9, 240, 63, 198, 175, 20, 88, 105, 22,
+ 186, 173, 221, 237, 196, 23, 45, 26, 193, 62, 187, 36, 141, 36, 150, 202,
+ 229, 0, 85, 89, 218, 72, 240, 170, 35, 89, 84, 194, 24, 22, 104, 152, 99,
+ 136, 204, 105, 84, 148, 83, 79, 154, 250, 63, 55, 109, 53, 236, 155, 186,
+ 123, 124, 139, 148, 90, 213, 30, 91, 241, 191, 192, 227, 198, 63, 29, 99,
+ 241, 87, 140, 252, 61, 171, 106, 30, 16, 181, 69, 184, 155, 74, 211, 154,
+ 43, 123, 216, 146, 77, 162, 73, 150, 104, 241, 230, 149, 37, 24, 130, 65,
+ 35, 30, 160, 31, 163, 147, 91, 208, 63, 103, 61, 54, 210, 24, 53, 29, 116,
+ 248, 86, 221, 99, 183, 187, 99, 122, 147, 53, 189, 195, 141, 240, 12, 156,
+ 182, 70, 198, 220, 49, 180, 239, 3, 60, 241, 242, 143, 197, 125, 127, 198,
+ 191, 14, 60, 99, 175, 120, 32, 107, 142, 154, 204, 22, 232, 47, 5, 204,
+ 106, 239, 119, 28, 203, 230, 184, 202, 145, 26, 96, 48, 4, 46, 57, 192,
+ 24, 10, 180, 219, 157, 31, 197, 145, 252, 26, 183, 215, 174, 126, 214,
+ 186, 31, 137, 109, 163, 50, 221, 92, 147, 60, 108, 209, 185, 117, 216,
+ 217, 38, 38, 12, 164, 21, 235, 128, 120, 202, 168, 60, 245, 243, 8, 194,
+ 83, 83, 131, 114, 87, 191, 91, 46, 151, 107, 166, 218, 141, 45, 57, 145,
+ 139, 251, 69, 235, 127, 8, 100, 214, 102, 241, 15, 193, 141, 70, 69, 143,
+ 87, 187, 55, 50, 90, 1, 50, 71, 106, 199, 230, 144, 4, 147, 59, 84, 185,
+ 97, 176, 112, 14, 236, 113, 138, 226, 173, 245, 77, 45, 224, 141, 231, 75,
+ 51, 43, 32, 46, 65, 31, 123, 28, 254, 181, 205, 216, 232, 118, 250, 204,
+ 26, 132, 207, 43, 70, 34, 150, 53, 14, 79, 10, 165, 176, 196, 143, 166,
+ 51, 93, 58, 248, 35, 193, 177, 1, 25, 241, 205, 190, 80, 109, 224, 140,
+ 113, 95, 53, 136, 157, 28, 68, 220, 154, 229, 242, 95, 211, 28, 106, 36,
+ 189, 228, 104, 120, 139, 68, 240, 236, 218, 254, 189, 175, 219, 199, 125,
+ 118, 250, 20, 51, 217, 106, 54, 128, 44, 114, 193, 59, 32, 132, 93, 198,
+ 28, 98, 72, 197, 195, 16, 241, 252, 173, 28, 143, 184, 54, 217, 3, 47,
+ 167, 255, 0, 195, 51, 252, 103, 240, 183, 132, 45, 180, 129, 175, 70, 60,
+ 11, 175, 219, 219, 107, 23, 215, 48, 68, 183, 54, 49, 125, 166, 40, 81,
+ 174, 21, 35, 111, 50, 227, 116, 45, 28, 112, 190, 232, 199, 239, 72, 220,
+ 140, 236, 79, 85, 240, 155, 192, 94, 36, 248, 239, 227, 115, 226, 63, 138,
+ 222, 15, 210, 188, 103, 225, 209, 167, 90, 233, 87, 218, 159, 159, 113,
+ 99, 169, 216, 139, 118, 145, 98, 185, 131, 12, 102, 149, 209, 218, 72, 75,
+ 48, 201, 138, 221, 23, 146, 190, 91, 125, 87, 169, 221, 124, 61, 208, 116,
+ 37, 241, 38, 159, 113, 172, 125, 143, 225, 214, 181, 169, 89, 189, 182,
+ 150, 162, 206, 11, 120, 132, 155, 47, 141, 234, 161, 43, 57, 66, 175, 187,
+ 4, 12, 220, 177, 149, 118, 59, 19, 244, 88, 92, 5, 227, 42, 148, 253, 232,
+ 183, 165, 157, 180, 79, 85, 217, 173, 246, 236, 101, 15, 121, 221, 187,
+ 31, 157, 186, 151, 134, 244, 175, 15, 252, 111, 214, 252, 49, 109, 226,
+ 75, 88, 180, 109, 51, 86, 46, 215, 154, 181, 161, 120, 166, 142, 57, 190,
+ 209, 230, 203, 110, 132, 153, 35, 223, 19, 110, 10, 195, 247, 123, 179,
+ 145, 149, 60, 255, 0, 133, 188, 89, 225, 47, 5, 120, 246, 223, 197, 46,
+ 250, 117, 197, 173, 182, 163, 30, 167, 120, 52, 221, 171, 5, 180, 176,
+ 220, 187, 197, 29, 188, 50, 163, 6, 10, 198, 57, 85, 36, 18, 33, 135, 112,
+ 113, 148, 108, 108, 124, 114, 248, 187, 115, 227, 47, 138, 26, 204, 182,
+ 183, 22, 23, 246, 16, 234, 218, 140, 182, 141, 110, 100, 184, 183, 157,
+ 82, 105, 19, 122, 151, 102, 97, 20, 209, 110, 99, 252, 59, 93, 73, 29, 90,
+ 190, 191, 248, 17, 99, 240, 91, 226, 175, 130, 252, 3, 167, 94, 91, 106,
+ 58, 183, 136, 252, 42, 126, 203, 107, 172, 106, 74, 182, 186, 181, 148,
+ 43, 20, 160, 180, 51, 8, 26, 41, 146, 34, 27, 202, 71, 50, 21, 242, 178,
+ 75, 188, 106, 66, 192, 97, 175, 94, 113, 163, 45, 34, 238, 190, 251, 61,
+ 47, 125, 63, 34, 105, 223, 225, 56, 63, 137, 223, 181, 231, 136, 173, 124,
+ 20, 159, 15, 188, 21, 224, 175, 176, 120, 163, 93, 191, 154, 247, 81, 131,
+ 84, 179, 51, 44, 250, 117, 216, 221, 109, 118, 173, 3, 164, 145, 92, 35,
+ 20, 129, 214, 66, 87, 113, 38, 48, 202, 118, 71, 179, 240, 131, 246, 190,
+ 209, 135, 129, 99, 180, 241, 118, 171, 167, 248, 126, 235, 70, 54, 22,
+ 179, 88, 89, 233, 65, 173, 245, 37, 120, 165, 142, 226, 243, 80, 136, 33,
+ 204, 177, 76, 98, 144, 199, 167, 180, 55, 19, 202, 228, 186, 108, 59, 224,
+ 209, 248, 69, 31, 198, 251, 247, 248, 235, 240, 218, 247, 225, 247, 133,
+ 53, 159, 18, 220, 106, 15, 52, 150, 118, 44, 91, 77, 146, 123, 189, 56,
+ 37, 137, 51, 25, 85, 228, 182, 149, 32, 40, 159, 48, 101, 242, 229, 50,
+ 254, 240, 146, 190, 53, 225, 191, 217, 231, 197, 183, 130, 111, 5, 232,
+ 176, 105, 122, 214, 165, 118, 145, 73, 127, 107, 127, 102, 34, 107, 75,
+ 61, 204, 178, 94, 136, 228, 30, 100, 139, 28, 138, 177, 174, 192, 173,
+ 190, 100, 119, 88, 149, 177, 93, 21, 225, 139, 167, 40, 253, 86, 242, 91,
+ 91, 107, 107, 253, 109, 249, 26, 55, 173, 203, 190, 63, 147, 194, 94, 32,
+ 159, 92, 240, 45, 182, 177, 117, 174, 105, 183, 159, 101, 107, 143, 20,
+ 221, 219, 201, 13, 210, 222, 134, 80, 176, 165, 185, 40, 99, 145, 109, 98,
+ 134, 9, 139, 135, 145, 118, 207, 8, 39, 49, 172, 30, 123, 161, 248, 255,
+ 0, 79, 208, 190, 37, 90, 93, 120, 243, 80, 187, 241, 70, 164, 179, 67,
+ 105, 44, 170, 208, 37, 138, 105, 236, 136, 178, 67, 36, 49, 41, 140, 108,
+ 141, 66, 24, 208, 43, 43, 171, 46, 85, 148, 20, 232, 190, 18, 233, 22, 19,
+ 248, 139, 195, 186, 166, 189, 125, 119, 241, 23, 91, 214, 36, 109, 23, 74,
+ 209, 44, 238, 37, 180, 183, 150, 242, 101, 142, 210, 7, 184, 213, 46, 21,
+ 69, 172, 66, 8, 96, 43, 176, 75, 35, 131, 130, 16, 57, 97, 235, 127, 15,
+ 191, 102, 15, 1, 107, 218, 70, 159, 227, 13, 103, 199, 17, 248, 118, 218,
+ 107, 251, 171, 125, 98, 222, 61, 122, 217, 172, 109, 90, 123, 185, 160,
+ 183, 242, 222, 69, 75, 136, 151, 207, 107, 114, 171, 49, 222, 235, 33, 71,
+ 217, 42, 24, 95, 154, 88, 106, 217, 142, 33, 212, 130, 73, 71, 163, 118,
+ 221, 245, 122, 233, 247, 187, 92, 109, 205, 73, 52, 112, 159, 180, 76,
+ 214, 223, 26, 52, 75, 127, 29, 248, 30, 116, 213, 45, 52, 61, 58, 219, 81,
+ 187, 138, 86, 138, 25, 237, 30, 103, 154, 39, 181, 68, 0, 79, 42, 44, 80,
+ 164, 142, 143, 38, 232, 252, 232, 136, 47, 146, 170, 159, 6, 255, 0, 105,
+ 239, 134, 243, 233, 147, 252, 33, 248, 137, 225, 139, 88, 188, 63, 172,
+ 162, 91, 76, 237, 113, 4, 86, 176, 202, 84, 1, 40, 138, 11, 120, 140, 101,
+ 157, 228, 98, 230, 70, 35, 229, 11, 183, 21, 133, 240, 87, 192, 122, 205,
+ 255, 0, 196, 171, 157, 77, 245, 75, 91, 189, 23, 78, 188, 212, 52, 213,
+ 143, 86, 189, 123, 8, 181, 59, 116, 156, 194, 84, 79, 131, 36, 140, 64,
+ 36, 171, 35, 44, 96, 176, 40, 119, 21, 175, 160, 254, 42, 124, 25, 240,
+ 54, 161, 226, 79, 22, 120, 151, 194, 22, 218, 101, 150, 143, 165, 104, 16,
+ 106, 87, 26, 180, 214, 144, 182, 159, 114, 38, 51, 171, 181, 172, 251,
+ 133, 191, 150, 190, 83, 44, 159, 189, 1, 29, 25, 73, 219, 144, 106, 143,
+ 182, 197, 77, 212, 131, 73, 252, 45, 61, 83, 183, 69, 117, 183, 77, 203,
+ 167, 52, 157, 228, 174, 124, 105, 162, 217, 104, 62, 31, 241, 198, 163,
+ 225, 157, 75, 78, 185, 188, 240, 164, 183, 147, 192, 147, 153, 149, 132,
+ 160, 51, 24, 208, 72, 188, 54, 85, 125, 137, 235, 197, 116, 210, 248, 171,
+ 193, 145, 74, 241, 218, 124, 57, 240, 66, 192, 140, 86, 37, 151, 81, 136,
+ 56, 64, 120, 12, 51, 215, 24, 205, 114, 119, 83, 104, 118, 218, 101, 173,
+ 135, 135, 181, 24, 111, 210, 61, 106, 98, 247, 162, 221, 98, 70, 144, 163,
+ 50, 196, 2, 73, 34, 50, 140, 42, 239, 86, 32, 239, 63, 221, 57, 230, 87,
+ 224, 172, 90, 138, 141, 65, 36, 213, 81, 110, 135, 156, 21, 108, 114, 0,
+ 110, 112, 14, 121, 28, 215, 203, 213, 163, 5, 94, 113, 196, 62, 70, 159,
+ 71, 117, 191, 147, 53, 229, 228, 118, 134, 214, 79, 107, 238, 119, 90,
+ 127, 237, 67, 226, 207, 14, 253, 162, 251, 194, 122, 128, 211, 117, 59,
+ 57, 163, 179, 91, 120, 150, 72, 161, 212, 52, 255, 0, 58, 57, 54, 249,
+ 138, 222, 110, 76, 176, 167, 152, 133, 215, 122, 72, 251, 183, 124, 203,
+ 95, 91, 120, 235, 226, 182, 187, 251, 65, 252, 57, 241, 247, 134, 36, 54,
+ 62, 30, 211, 167, 210, 180, 245, 134, 59, 109, 92, 189, 226, 52, 134, 50,
+ 200, 98, 36, 51, 196, 179, 71, 42, 23, 9, 26, 108, 148, 169, 70, 18, 185,
+ 135, 243, 87, 197, 150, 208, 233, 30, 40, 213, 236, 244, 224, 241, 69,
+ 105, 171, 92, 193, 15, 206, 204, 202, 145, 202, 225, 6, 226, 73, 56, 0,
+ 114, 78, 120, 175, 71, 241, 87, 142, 60, 75, 163, 124, 40, 248, 105, 226,
+ 205, 62, 246, 20, 213, 167, 93, 71, 125, 211, 217, 195, 35, 22, 142, 242,
+ 225, 81, 240, 232, 64, 117, 18, 48, 14, 6, 225, 198, 15, 202, 184, 250,
+ 220, 28, 30, 30, 148, 169, 211, 217, 107, 110, 143, 163, 91, 55, 103, 115,
+ 153, 70, 215, 71, 14, 247, 239, 167, 178, 136, 108, 160, 134, 226, 19, 34,
+ 59, 164, 140, 88, 31, 153, 74, 25, 20, 237, 96, 70, 255, 0, 187, 242, 178,
+ 183, 25, 25, 7, 220, 180, 159, 138, 95, 25, 252, 35, 225, 143, 12, 106,
+ 179, 105, 215, 118, 154, 53, 149, 196, 112, 104, 83, 203, 160, 188, 22,
+ 242, 219, 178, 207, 137, 140, 177, 42, 52, 219, 213, 174, 66, 230, 66, 89,
+ 188, 210, 138, 91, 204, 106, 241, 237, 42, 202, 219, 86, 240, 55, 137,
+ 124, 65, 169, 198, 110, 181, 47, 237, 11, 52, 55, 82, 177, 105, 8, 154,
+ 87, 50, 252, 196, 231, 44, 70, 73, 235, 201, 245, 53, 250, 241, 251, 46,
+ 120, 51, 194, 159, 19, 127, 100, 175, 135, 58, 39, 142, 244, 11, 61, 95,
+ 79, 248, 133, 21, 254, 153, 226, 59, 105, 99, 11, 29, 244, 54, 82, 92,
+ 195, 104, 219, 83, 2, 41, 162, 142, 222, 221, 82, 120, 246, 202, 60, 136,
+ 142, 252, 198, 164, 112, 80, 157, 69, 55, 26, 78, 221, 31, 224, 215, 174,
+ 182, 42, 20, 212, 147, 103, 139, 124, 51, 248, 187, 240, 63, 196, 191,
+ 179, 222, 141, 31, 143, 60, 79, 6, 144, 218, 149, 238, 255, 0, 20, 233,
+ 186, 78, 157, 115, 21, 198, 155, 34, 106, 41, 155, 217, 238, 109, 34, 79,
+ 46, 60, 203, 4, 210, 203, 136, 247, 60, 251, 81, 188, 194, 174, 155, 90,
+ 191, 141, 62, 53, 107, 62, 63, 241, 62, 183, 240, 231, 196, 90, 52, 122,
+ 77, 150, 155, 109, 226, 27, 13, 82, 71, 123, 141, 63, 196, 23, 130, 38,
+ 104, 173, 196, 247, 18, 199, 111, 28, 47, 20, 82, 44, 215, 94, 99, 21,
+ 243, 144, 12, 111, 98, 60, 7, 246, 143, 240, 174, 141, 240, 67, 94, 241,
+ 133, 159, 194, 168, 238, 252, 59, 13, 183, 194, 253, 42, 40, 214, 218,
+ 250, 118, 249, 53, 13, 83, 236, 151, 170, 219, 221, 183, 137, 97, 102, 82,
+ 27, 56, 99, 188, 97, 192, 106, 250, 79, 224, 53, 133, 190, 141, 224, 45,
+ 37, 52, 255, 0, 53, 33, 183, 211, 124, 111, 97, 21, 188, 147, 60, 176, 44,
+ 26, 110, 191, 103, 5, 146, 249, 78, 74, 102, 56, 222, 65, 187, 27, 152,
+ 187, 179, 150, 102, 36, 251, 56, 58, 142, 165, 71, 42, 155, 171, 39, 110,
+ 186, 255, 0, 193, 185, 74, 45, 251, 183, 216, 249, 203, 69, 214, 254, 35,
+ 124, 36, 241, 183, 139, 126, 40, 124, 61, 248, 113, 105, 55, 135, 100,
+ 176, 213, 175, 244, 109, 42, 235, 81, 138, 88, 244, 221, 8, 36, 145, 163,
+ 195, 229, 177, 119, 142, 25, 100, 89, 102, 182, 143, 39, 109, 187, 69, 33,
+ 30, 90, 200, 188, 183, 236, 231, 241, 195, 196, 182, 158, 57, 79, 22, 252,
+ 75, 142, 77, 107, 69, 213, 100, 107, 75, 97, 45, 157, 180, 112, 199, 42,
+ 92, 91, 76, 211, 196, 27, 8, 178, 169, 181, 133, 154, 115, 202, 60, 48,
+ 177, 147, 120, 221, 95, 161, 186, 191, 134, 180, 43, 79, 140, 86, 218,
+ 173, 190, 155, 18, 92, 233, 222, 13, 212, 45, 109, 155, 146, 171, 20, 119,
+ 90, 100, 136, 133, 79, 202, 193, 93, 152, 141, 192, 227, 115, 14, 132,
+ 138, 248, 3, 254, 10, 15, 105, 107, 99, 251, 84, 106, 144, 88, 192, 150,
+ 201, 168, 89, 105, 51, 92, 136, 70, 207, 50, 71, 15, 11, 177, 199, 115,
+ 28, 49, 169, 61, 78, 223, 82, 73, 188, 109, 57, 101, 235, 218, 210, 119,
+ 138, 150, 207, 211, 202, 221, 204, 185, 164, 157, 174, 86, 241, 47, 196,
+ 45, 47, 91, 240, 221, 247, 137, 165, 188, 54, 222, 34, 213, 36, 125, 67,
+ 82, 152, 238, 158, 223, 77, 105, 84, 236, 88, 213, 219, 106, 221, 74, 192,
+ 5, 110, 145, 168, 223, 33, 221, 177, 89, 62, 29, 124, 126, 248, 161, 163,
+ 248, 7, 195, 126, 31, 240, 212, 94, 26, 183, 240, 127, 132, 111, 174, 190,
+ 221, 29, 252, 182, 182, 246, 186, 164, 87, 27, 217, 172, 36, 134, 119,
+ 223, 117, 14, 201, 110, 1, 17, 36, 178, 55, 218, 48, 225, 217, 147, 119,
+ 133, 248, 143, 82, 212, 52, 45, 90, 218, 29, 30, 250, 226, 206, 56, 212,
+ 0, 176, 200, 84, 115, 201, 39, 212, 156, 156, 147, 201, 239, 87, 238, 47,
+ 38, 215, 116, 61, 107, 82, 212, 132, 111, 117, 97, 48, 72, 37, 142, 37,
+ 132, 128, 102, 42, 119, 108, 3, 127, 3, 248, 179, 220, 245, 38, 190, 82,
+ 56, 186, 145, 147, 196, 197, 217, 207, 123, 105, 190, 191, 153, 151, 51,
+ 86, 72, 181, 226, 27, 159, 9, 61, 237, 205, 143, 134, 116, 211, 165, 232,
+ 230, 241, 238, 237, 172, 45, 231, 51, 45, 185, 110, 6, 231, 32, 9, 37, 85,
+ 194, 177, 140, 121, 101, 149, 202, 110, 82, 9, 245, 27, 31, 218, 63, 196,
+ 150, 86, 86, 246, 118, 255, 0, 13, 180, 198, 138, 8, 146, 36, 59, 227, 92,
+ 170, 128, 7, 27, 184, 224, 116, 174, 55, 226, 47, 134, 116, 29, 31, 65,
+ 180, 155, 76, 211, 34, 183, 112, 150, 232, 89, 51, 150, 4, 57, 203, 115,
+ 243, 28, 168, 228, 228, 245, 231, 147, 94, 205, 225, 143, 2, 120, 90, 243,
+ 195, 122, 77, 221, 206, 154, 239, 52, 246, 48, 73, 35, 125, 166, 81, 185,
+ 154, 53, 36, 224, 54, 58, 154, 240, 49, 82, 133, 71, 205, 53, 125, 94,
+ 247, 253, 25, 221, 74, 181, 88, 212, 146, 82, 63, 255, 217
+};
+
+const unsigned char hana_bmp[RGB_NUM][BMP_OUT_SIZE] = {
+ {188, 209, 190, 153, 143, 103, 149, 192, 172, 157, 189, 192, 164, 195, 188,
+ 181, 193, 167, 188, 210, 177, 142, 37, 10, 31, 40, 39, 52, 32, 29, 34, 14,
+ 10, 18, 14, 26, 7, 108, 181, 190, 181, 127, 91, 99, 73, 36, 11, 36, 66, 93,
+ 90, 65, 51, 32, 36, 35, 38, 53, 56, 35, 25, 25, 32, 49, 41, 54, 32, 31, 31,
+ 34, 24, 25, 38, 43, 32, 11, 9, 13, 20, 25, 23, 17, 16, 18, 30, 25, 33, 45,
+ 36, 29, 166, 193, 101, 90, 170, 129, 146, 213, 169, 88, 145, 199, 207, 165,
+ 137, 113, 201, 155, 139, 209, 191, 201, 171, 103, 51, 29, 17, 9, 29, 43,
+ 33, 36, 24, 14, 24, 24, 4, 108, 185, 180, 186, 188, 183, 195, 192, 108, 48,
+ 75, 103, 85, 69, 49, 46, 55, 44, 42, 50, 51, 41, 30, 18, 14, 30, 48, 48,
+ 54, 34, 40, 38, 36, 31, 28, 52, 55, 45, 15, 14, 16, 23, 21, 15, 11, 17, 25,
+ 31, 26, 44, 73, 34, 39, 145, 132, 46, 181, 205, 209, 187, 170, 140, 56, 52,
+ 142, 122, 176, 198, 83, 154, 215, 200, 209, 184, 164, 196, 174, 128, 55,
+ 89, 76, 28, 38, 47, 46, 35, 27, 39, 31, 16, 58, 116, 137, 169, 184, 180,
+ 175, 166, 120, 73, 91, 97, 84, 32, 36, 62, 58, 40, 41, 48, 45, 32, 20, 15,
+ 16, 12, 27, 24, 36, 40, 16, 34, 24, 22, 33, 61, 65, 55, 18, 21, 22, 29, 19,
+ 18, 15, 21, 28, 33, 29, 48, 75, 36, 38, 111, 15, 62, 226, 207, 187, 205,
+ 188, 61, 2, 13, 31, 9, 105, 140, 49, 24, 191, 209, 198, 186, 184, 147, 117,
+ 89, 58, 138, 179, 135, 62, 52, 51, 23, 20, 34, 28, 26, 10, 42, 112, 151,
+ 157, 139, 122, 113, 54, 79, 84, 96, 46, 19, 32, 53, 58, 40, 40, 39, 38, 21,
+ 21, 17, 23, 6, 110, 101, 14, 18, 7, 15, 27, 7, 27, 64, 70, 63, 22, 30, 32,
+ 38, 22, 8, 10, 18, 20, 26, 27, 43, 58, 44, 40, 139, 140, 129, 156, 113,
+ 177, 215, 174, 111, 101, 36, 14, 20, 139, 98, 106, 81, 37, 97, 223, 200,
+ 217, 149, 153, 148, 131, 70, 146, 178, 172, 131, 80, 13, 17, 43, 16, 18,
+ 20, 24, 98, 130, 163, 144, 85, 71, 81, 78, 88, 68, 29, 39, 56, 59, 49, 40,
+ 41, 39, 20, 11, 63, 80, 1, 89, 179, 186, 96, 0, 37, 15, 21, 20, 27, 64, 76,
+ 73, 29, 31, 33, 43, 34, 13, 12, 19, 16, 16, 14, 28, 38, 60, 50, 179, 196,
+ 217, 132, 55, 121, 213, 180, 177, 183, 174, 102, 161, 182, 140, 147, 197,
+ 206, 164, 214, 217, 175, 40, 141, 174, 183, 123, 68, 97, 119, 123, 126, 49,
+ 21, 39, 17, 23, 28, 14, 123, 149, 194, 193, 95, 75, 73, 70, 63, 59, 50, 48,
+ 55, 58, 42, 48, 54, 32, 36, 12, 85, 159, 110, 125, 177, 187, 137, 25, 54,
+ 58, 55, 18, 19, 59, 77, 76, 34, 30, 32, 48, 47, 34, 18, 13, 13, 12, 5, 12,
+ 18, 52, 57, 136, 134, 175, 214, 134, 161, 190, 141, 177, 189, 141, 164,
+ 203, 179, 185, 144, 73, 141, 206, 148, 181, 192, 113, 69, 149, 176, 141,
+ 116, 83, 46, 101, 112, 79, 31, 25, 40, 30, 26, 12, 98, 162, 195, 215, 122,
+ 55, 65, 61, 68, 64, 46, 68, 65, 67, 80, 56, 36, 44, 47, 27, 55, 177, 200,
+ 175, 169, 178, 156, 114, 126, 107, 61, 46, 50, 60, 78, 76, 46, 42, 48, 59,
+ 58, 45, 25, 20, 22, 26, 19, 19, 15, 56, 58, 41, 114, 196, 195, 208, 197,
+ 186, 176, 174, 204, 121, 136, 208, 205, 201, 86, 12, 190, 180, 177, 148,
+ 178, 221, 145, 97, 146, 136, 153, 169, 138, 147, 191, 167, 57, 47, 168,
+ 124, 33, 5, 54, 189, 180, 197, 188, 136, 68, 54, 63, 50, 78, 83, 74, 80,
+ 90, 58, 44, 60, 45, 44, 18, 128, 194, 176, 201, 203, 196, 175, 142, 107,
+ 61, 44, 61, 74, 86, 83, 62, 64, 71, 72, 63, 63, 55, 57, 52, 49, 39, 36, 24,
+ 61, 57, 19, 75, 194, 165, 168, 186, 196, 187, 203, 207, 86, 65, 130, 192,
+ 214, 184, 144, 174, 180, 209, 147, 76, 108, 116, 155, 154, 187, 172, 179,
+ 180, 187, 199, 204, 57, 54, 165, 127, 47, 90, 67, 189, 179, 170, 214, 195,
+ 159, 103, 40, 32, 64, 97, 66, 53, 53, 67, 77, 46, 47, 39, 10, 53, 122, 151,
+ 202, 213, 214, 188, 161, 145, 106, 60, 58, 78, 93, 97, 101, 102, 86, 85,
+ 71, 57, 50, 55, 54, 54, 52, 43, 40, 21, 22, 113, 11, 46, 66, 104, 140, 164,
+ 167, 177, 210, 71, 115, 105, 190, 163, 181, 187, 184, 142, 177, 107, 207,
+ 128, 113, 121, 156, 153, 143, 161, 154, 165, 182, 182, 55, 45, 116, 42, 52,
+ 120, 94, 125, 180, 187, 186, 199, 191, 186, 78, 0, 43, 96, 118, 82, 19, 76,
+ 76, 71, 55, 29, 9, 8, 59, 111, 168, 189, 205, 187, 166, 138, 111, 50, 41,
+ 55, 76, 94, 107, 116, 101, 92, 72, 51, 50, 47, 39, 43, 37, 29, 40, 25, 27,
+ 100, 68, 51, 46, 56, 81, 92, 152, 176, 202, 71, 142, 207, 196, 197, 144,
+ 181, 181, 105, 120, 79, 64, 179, 112, 102, 97, 64, 63, 51, 94, 180, 164,
+ 147, 37, 68, 169, 94, 100, 97, 138, 1, 68, 178, 181, 173, 166, 182, 163,
+ 51, 119, 165, 187, 187, 65, 39, 79, 82, 71, 15, 14, 10, 12, 64, 144, 185,
+ 176, 116, 70, 60, 41, 39, 25, 23, 43, 63, 86, 110, 110, 100, 75, 49, 27,
+ 32, 27, 18, 21, 36, 37, 29, 32, 93, 62, 34, 31, 71, 62, 102, 175, 144, 106,
+ 58, 201, 170, 191, 189, 167, 110, 170, 174, 134, 121, 84, 161, 120, 85, 62,
+ 64, 43, 9, 78, 186, 185, 170, 20, 100, 180, 159, 176, 172, 189, 100, 106,
+ 169, 170, 153, 180, 189, 187, 191, 150, 103, 138, 155, 125, 49, 77, 61, 62,
+ 72, 23, 18, 21, 27, 39, 82, 80, 53, 53, 71, 84, 58, 33, 4, 18, 35, 63, 101,
+ 120, 107, 70, 39, 28, 29, 25, 28, 24, 32, 33, 34, 31, 98, 59, 32, 17, 34,
+ 28, 69, 121, 26, 46, 76, 172, 107, 19, 142, 153, 136, 146, 214, 165, 187,
+ 207, 179, 126, 63, 81, 38, 45, 38, 97, 173, 184, 155, 24, 100, 206, 176,
+ 198, 206, 226, 152, 107, 129, 153, 146, 188, 187, 170, 179, 179, 124, 155,
+ 179, 154, 93, 73, 65, 81, 66, 57, 20, 58, 60, 36, 47, 56, 25, 49, 74, 90,
+ 85, 44, 8, 12, 24, 48, 83, 122, 120, 87, 37, 29, 28, 23, 23, 20, 29, 31,
+ 23, 20, 97, 51, 9, 15, 14, 16, 23, 88, 32, 37, 75, 48, 18, 17, 24, 197,
+ 200, 170, 196, 191, 202, 205, 182, 100, 56, 35, 28, 113, 92, 71, 93, 86,
+ 86, 34, 78, 186, 194, 182, 193, 180, 165, 78, 86, 122, 64, 105, 195, 163,
+ 148, 188, 148, 150, 150, 118, 120, 95, 73, 77, 75, 70, 63, 79, 95, 64, 82,
+ 59, 31, 20, 43, 70, 93, 84, 29, 29, 44, 62, 78, 112, 120, 93, 44, 34, 34,
+ 35, 17, 17, 28, 20, 23, 26, 85, 58, 21, 24, 29, 17, 13, 31, 13, 21, 89, 31,
+ 45, 19, 21, 146, 225, 210, 206, 185, 66, 164, 183, 191, 149, 60, 66, 119,
+ 52, 74, 55, 142, 158, 20, 75, 154, 161, 201, 147, 138, 182, 143, 122, 84,
+ 21, 116, 174, 174, 168, 198, 128, 73, 78, 166, 159, 78, 73, 53, 36, 113,
+ 124, 88, 128, 127, 106, 66, 9, 23, 20, 41, 74, 89, 65, 52, 62, 73, 63, 91,
+ 111, 98, 54, 70, 61, 63, 60, 50, 29, 22, 25, 28, 37, 80, 25, 23, 16, 4, 11,
+ 22, 13, 22, 86, 29, 18, 50, 25, 8, 119, 163, 160, 185, 161, 158, 189, 179,
+ 132, 119, 116, 39, 129, 171, 137, 180, 174, 19, 117, 194, 192, 193, 174,
+ 159, 119, 165, 177, 168, 44, 121, 161, 185, 200, 194, 167, 82, 82, 162,
+ 162, 74, 51, 55, 15, 99, 156, 118, 127, 177, 163, 72, 9, 13, 10, 5, 37, 71,
+ 77, 70, 109, 141, 123, 133, 137, 117, 73, 79, 69, 83, 80, 82, 67, 47, 28,
+ 26, 13, 77, 23, 18, 15, 16, 16, 34, 33, 21, 85, 14, 0, 37, 44, 0, 179, 225,
+ 187, 206, 209, 141, 149, 78, 57, 63, 72, 129, 159, 164, 109, 97, 115, 31,
+ 36, 91, 25, 93, 215, 108, 100, 180, 181, 120, 68, 82, 168, 195, 194, 149,
+ 185, 179, 131, 72, 131, 75, 55, 46, 32, 61, 144, 150, 129, 196, 182, 121,
+ 87, 81, 6, 5, 20, 38, 56, 100, 153, 172, 204, 204, 198, 212, 86, 32, 65,
+ 51, 59, 57, 59, 52, 51, 44, 43, 30, 32, 20, 50, 70, 49, 19, 26, 40, 69,
+ 100, 75, 50, 40, 18, 100, 192, 104, 100, 105, 118, 131, 129, 42, 76, 35,
+ 73, 124, 146, 104, 1, 28, 75, 98, 197, 166, 177, 212, 201, 175, 174, 192,
+ 142, 99, 33, 87, 216, 189, 193, 209, 185, 188, 126, 126, 92, 86, 58, 35,
+ 28, 116, 174, 181, 188, 180, 166, 136, 86, 16, 1, 0, 6, 23, 63, 103, 136,
+ 174, 192, 155, 198, 173, 35, 16, 42, 51, 40, 38, 58, 43, 44, 26, 29, 25,
+ 14, 37, 75, 35, 59, 19, 59, 61, 101, 55, 81, 79, 29, 48, 86, 109, 81, 66,
+ 187, 143, 182, 142, 13, 2, 39, 78, 144, 105, 28, 34, 84, 27, 93, 253, 169,
+ 242, 93, 216, 161, 155, 194, 231, 139, 7, 91, 205, 204, 226, 184, 223, 234,
+ 190, 112, 92, 43, 37, 20, 132, 194, 198, 203, 174, 138, 58, 7, 0, 26, 102,
+ 110, 91, 121, 120, 132, 109, 171, 167, 165, 217, 176, 82, 77, 68, 51, 22,
+ 38, 44, 44, 5, 22, 29, 29, 7, 99, 30, 139, 101, 53, 60, 100, 135, 76, 64,
+ 32, 36, 51, 54, 87, 111, 147, 240, 186, 172, 205, 46, 0, 46, 21, 11, 62,
+ 37, 45, 26, 0, 46, 194, 186, 60, 239, 98, 140, 192, 121, 19, 178, 164, 94,
+ 183, 67, 87, 194, 194, 196, 190, 83, 34, 32, 56, 85, 171, 182, 175, 206,
+ 153, 61, 1, 6, 64, 161, 198, 179, 172, 179, 170, 112, 162, 221, 191, 185,
+ 181, 136, 90, 86, 57, 29, 27, 44, 43, 53, 20, 12, 18, 33, 96, 56, 156, 139,
+ 132, 61, 47, 117, 113, 101, 36, 27, 5, 63, 166, 123, 21, 163, 207, 224,
+ 180, 129, 212, 159, 193, 205, 42, 20, 51, 23, 27, 17, 48, 240, 52, 177,
+ 177, 149, 64, 1, 140, 186, 180, 204, 211, 213, 101, 187, 198, 150, 58, 112,
+ 129, 86, 55, 63, 77, 74, 102, 146, 154, 99, 53, 48, 28, 87, 179, 177, 175,
+ 178, 175, 116, 134, 157, 178, 193, 180, 148, 125, 85, 28, 20, 18, 58, 59,
+ 31, 43, 10, 71, 177, 146, 45, 153, 118, 184, 141, 51, 27, 56, 77, 45, 30,
+ 72, 145, 159, 90, 88, 168, 142, 183, 212, 86, 173, 204, 201, 132, 0, 33,
+ 49, 21, 9, 0, 125, 190, 61, 81, 177, 95, 72, 23, 15, 96, 173, 214, 180,
+ 229, 218, 186, 185, 223, 72, 146, 160, 129, 86, 62, 78, 66, 93, 111, 113,
+ 90, 73, 82, 74, 3, 66, 150, 191, 181, 104, 120, 90, 116, 114, 125, 171,
+ 122, 132, 66, 21, 25, 27, 59, 60, 37, 33, 13, 26, 201, 191, 52, 170, 137,
+ 189, 217, 208, 152, 26, 111, 40, 10, 148, 169, 162, 153, 134, 204, 203,
+ 171, 146, 61, 101, 202, 142, 0, 9, 44, 54, 19, 12, 0, 36, 167, 82, 28, 217,
+ 123, 102, 12, 53, 23, 0, 47, 0, 195, 194, 188, 172, 176, 174, 61, 101, 157,
+ 136, 109, 40, 44, 125, 146, 147, 128, 77, 97, 113, 83, 54, 172, 190, 165,
+ 159, 191, 85, 65, 63, 33, 45, 63, 60, 33, 21, 19, 16, 63, 61, 34, 51, 57,
+ 48, 36, 137, 24, 122, 90, 230, 194, 210, 190, 80, 42, 51, 18, 149, 211,
+ 159, 39, 123, 172, 96, 63, 9, 74, 42, 148, 224, 119, 0, 53, 52, 30, 0, 43,
+ 189, 117, 94, 37, 159, 157, 214, 103, 22, 30, 13, 58, 60, 44, 67, 100, 168,
+ 163, 179, 54, 139, 219, 193, 113, 68, 140, 143, 141, 165, 121, 126, 87,
+ 146, 124, 95, 166, 167, 130, 156, 189, 108, 42, 43, 41, 17, 40, 30, 29, 23,
+ 19, 18, 61, 60, 13, 35, 94, 122, 50, 117, 205, 172, 147, 108, 221, 186,
+ 183, 137, 38, 37, 31, 106, 208, 156, 18, 175, 229, 139, 0, 105, 114, 99,
+ 12, 146, 141, 162, 52, 42, 0, 62, 177, 186, 136, 94, 32, 123, 146, 210,
+ 193, 108, 168, 145, 8, 193, 36, 61, 69, 61, 166, 156, 203, 127, 195, 228,
+ 146, 169, 141, 90, 136, 109, 95, 98, 90, 153, 143, 86, 82, 97, 96, 99, 127,
+ 132, 38, 46, 36, 30, 24, 35, 23, 25, 27, 12, 16, 30, 14, 0, 4, 22, 114,
+ 153, 158, 173, 188, 188, 47, 112, 248, 109, 205, 46, 34, 79, 181, 106, 44,
+ 182, 201, 141, 0, 150, 172, 126, 170, 160, 134, 122, 107, 55, 204, 109, 62,
+ 152, 235, 92, 38, 134, 101, 183, 217, 148, 152, 159, 115, 191, 176, 155,
+ 144, 95, 62, 52, 186, 146, 216, 178, 251, 96, 73, 126, 138, 56, 97, 55,
+ 103, 120, 126, 73, 48, 34, 57, 48, 141, 138, 57, 33, 34, 35, 23, 22, 31,
+ 28, 20, 23, 33, 30, 46, 1, 19, 29, 27, 124, 164, 172, 202, 218, 176, 100,
+ 24, 110, 189, 50, 44, 37, 99, 29, 31, 98, 164, 48, 71, 197, 153, 202, 167,
+ 156, 196, 192, 56, 128, 217, 175, 125, 153, 49, 106, 15, 128, 239, 182,
+ 195, 171, 92, 37, 110, 86, 118, 148, 98, 55, 34, 30, 21, 48, 232, 209, 106,
+ 87, 107, 172, 30, 71, 86, 88, 72, 62, 49, 66, 46, 64, 80, 68, 76, 111, 45,
+ 42, 35, 34, 28, 26, 49, 43, 22, 29, 32, 32, 144, 41, 0, 21, 2, 0, 88, 160,
+ 167, 192, 168, 87, 0, 169, 235, 50, 35, 22, 12, 98, 0, 23, 61, 0, 71, 53,
+ 240, 144, 206, 178, 188, 225, 200, 167, 206, 223, 118, 12, 75, 109, 36, 81,
+ 225, 194, 144, 182, 73, 32, 32, 112, 167, 93, 50, 44, 30, 17, 51, 43, 93,
+ 117, 113, 73, 210, 162, 99, 87, 87, 65, 34, 34, 22, 21, 35, 72, 103, 99,
+ 58, 56, 47, 45, 40, 26, 30, 34, 62, 57, 32, 37, 30, 30, 183, 112, 0, 8, 11,
+ 26, 0, 119, 205, 148, 210, 0, 60, 225, 83, 58, 35, 30, 6, 37, 61, 7, 105,
+ 31, 36, 7, 89, 229, 171, 172, 195, 219, 211, 175, 177, 219, 144, 74, 47,
+ 106, 37, 50, 194, 188, 100, 83, 25, 64, 49, 187, 175, 132, 25, 43, 25, 32,
+ 48, 30, 74, 108, 90, 139, 210, 197, 131, 106, 79, 42, 86, 64, 35, 36, 38,
+ 68, 93, 87, 103, 54, 87, 41, 41, 21, 24, 29, 61, 58, 38, 55, 20, 30, 145,
+ 76, 5, 10, 2, 35, 0, 145, 191, 215, 59, 5, 150, 179, 137, 46, 44, 24, 9,
+ 24, 70, 62, 21, 11, 65, 141, 87, 127, 173, 139, 169, 108, 212, 181, 150,
+ 194, 202, 154, 82, 58, 80, 60, 89, 141, 84, 0, 104, 104, 26, 82, 161, 85,
+ 12, 16, 60, 76, 72, 2, 82, 124, 97, 162, 241, 185, 116, 145, 42, 49, 88,
+ 68, 42, 20, 27, 65, 85, 100, 79, 93, 58, 76, 30, 22, 21, 28, 61, 58, 37,
+ 65, 32, 28, 99, 40, 5, 9, 11, 23, 42, 220, 196, 255, 0, 26, 226, 164, 130,
+ 110, 29, 31, 0, 31, 70, 41, 37, 39, 102, 126, 156, 209, 158, 215, 249, 226,
+ 222, 195, 232, 226, 202, 163, 93, 63, 84, 51, 131, 157, 0, 139, 75, 114,
+ 59, 11, 124, 94, 28, 69, 110, 97, 47, 44, 145, 104, 99, 39, 181, 188, 185,
+ 183, 54, 18, 39, 46, 67, 45, 7, 103, 163, 134, 109, 77, 75, 40, 26, 22, 24,
+ 35, 62, 64, 37, 50, 32, 31, 135, 104, 10, 2, 20, 20, 26, 0, 30, 14, 21, 79,
+ 136, 108, 101, 38, 56, 22, 25, 31, 65, 61, 14, 22, 59, 119, 58, 82, 98, 74,
+ 41, 157, 200, 72, 82, 218, 157, 166, 121, 82, 113, 17, 158, 209, 146, 127,
+ 62, 126, 56, 7, 70, 98, 97, 73, 73, 98, 4, 166, 106, 117, 42, 37, 1, 182,
+ 203, 178, 60, 30, 25, 45, 55, 41, 22, 64, 183, 197, 180, 97, 66, 39, 34,
+ 21, 22, 40, 56, 68, 44, 31, 31, 33, 85, 32, 62, 0, 20, 17, 35, 44, 19, 23,
+ 0, 147, 208, 73, 85, 14, 70, 9, 36, 37, 58, 78, 23, 47, 4, 11, 20, 3, 62,
+ 65, 18, 146, 197, 134, 111, 192, 223, 186, 160, 127, 125, 60, 171, 210,
+ 212, 207, 168, 174, 144, 191, 0, 148, 120, 35, 66, 29, 79, 182, 95, 71, 25,
+ 94, 114, 71, 166, 191, 147, 96, 24, 20, 47, 31, 39, 40, 112, 168, 209, 152,
+ 77, 39, 17, 12, 29, 51, 65, 74, 44, 15, 7, 21, 81, 66, 12, 40, 0, 13, 90,
+ 24, 19, 35, 1, 149, 47, 92, 91, 7, 68, 10, 44, 28, 28, 95, 0, 160, 106, 14,
+ 29, 12, 69, 43, 21, 245, 191, 122, 195, 229, 209, 207, 155, 97, 138, 254,
+ 175, 118, 247, 217, 217, 183, 94, 107, 115, 66, 102, 138, 13, 16, 156, 128,
+ 47, 22, 15, 44, 162, 138, 155, 165, 167, 172, 88, 3, 35, 31, 135, 134, 180,
+ 155, 192, 190, 165, 53, 9, 17, 28, 53, 75, 78, 70, 55, 30, 38, 57, 113, 7,
+ 33, 10, 31, 69, 23, 42, 13, 28, 8, 1, 55, 27, 59, 61, 27, 41, 33, 13, 37,
+ 40, 132, 143, 8, 22, 16, 44, 88, 84, 72, 152, 168, 172, 193, 147, 201, 178,
+ 101, 0, 224, 231, 250, 48, 3, 193, 233, 60, 78, 33, 159, 143, 212, 0, 50,
+ 0, 9, 11, 75, 39, 65, 67, 198, 200, 145, 56, 82, 79, 20, 50, 83, 39, 105,
+ 51, 70, 185, 210, 208, 189, 57, 15, 25, 41, 59, 72, 80, 112, 31, 36, 64,
+ 114, 97, 0, 24, 88, 149, 28, 15, 46, 16, 9, 54, 62, 1, 0, 110, 63, 16, 27,
+ 33, 56, 23, 17, 0, 43, 46, 66, 62, 12, 127, 167, 189, 57, 251, 227, 122, 2,
+ 0, 7, 68, 54, 95, 80, 247, 165, 212, 64, 111, 62, 219, 50, 127, 43, 83, 56,
+ 36, 17, 49, 66, 123, 111, 121, 145, 127, 175, 187, 84, 96, 95, 15, 33, 56,
+ 130, 130, 206, 168, 187, 206, 179, 144, 45, 43, 27, 24, 75, 110, 122, 35,
+ 29, 94, 73, 75, 134, 13, 34, 80, 74, 11, 121, 111, 45, 51, 29, 34, 190,
+ 213, 122, 17, 25, 25, 11, 110, 115, 33, 44, 66, 10, 43, 5, 66, 115, 133,
+ 57, 74, 244, 130, 0, 35, 16, 20, 89, 42, 60, 230, 219, 78, 197, 235, 139,
+ 147, 46, 10, 122, 117, 111, 90, 54, 56, 67, 82, 58, 16, 139, 145, 158, 210,
+ 103, 18, 37, 48, 35, 32, 37, 9, 33, 35, 120, 161, 175, 121, 68, 46, 14, 22,
+ 56, 103, 122, 71, 92, 87, 83, 0, 92, 127, 20, 44, 15, 118, 124, 121, 80,
+ 47, 83, 149, 140, 182, 65, 17, 26, 49, 65, 102, 186, 116, 22, 130, 13, 0,
+ 63, 40, 55, 24, 101, 10, 28, 130, 2, 21, 46, 8, 47, 58, 122, 251, 19, 106,
+ 208, 180, 212, 101, 6, 55, 92, 62, 125, 65, 89, 39, 34, 30, 2, 33, 111, 86,
+ 119, 213, 0, 163, 93, 17, 25, 35, 27, 27, 37, 35, 63, 105, 170, 125, 50,
+ 24, 2, 16, 43, 82, 78, 98, 97, 88, 18, 27, 0, 111, 124, 23, 34, 143, 215,
+ 156, 185, 159, 124, 110, 92, 161, 64, 22, 15, 59, 66, 65, 78, 57, 35, 22,
+ 42, 12, 88, 0, 23, 33, 119, 83, 43, 0, 18, 32, 54, 22, 50, 55, 3, 37, 157,
+ 64, 0, 11, 146, 22, 66, 99, 68, 92, 78, 70, 167, 26, 24, 7, 12, 44, 60, 5,
+ 87, 144, 52, 194, 170, 85, 25, 28, 30, 15, 25, 22, 21, 53, 124, 126, 82,
+ 54, 12, 28, 36, 56, 61, 103, 107, 135, 13, 25, 41, 24, 142, 45, 28, 19,
+ 243, 202, 186, 170, 235, 96, 111, 140, 80, 44, 8, 35, 21, 100, 20, 15, 9,
+ 0, 11, 37, 0, 31, 1, 103, 142, 100, 0, 12, 86, 40, 104, 62, 12, 20, 48, 50,
+ 51, 19, 53, 142, 19, 60, 84, 100, 67, 63, 93, 88, 2, 41, 22, 22, 28, 42,
+ 50, 40, 44, 35, 86, 120, 139, 119, 57, 18, 20, 8, 2, 18, 22, 7, 38, 51, 67,
+ 58, 60, 91, 38, 48, 71, 106, 114, 168, 248, 70, 20, 41, 0, 19, 56, 109, 48,
+ 209, 189, 156, 121, 251, 172, 202, 117, 130, 115, 62, 17, 81, 16, 43, 191,
+ 165, 67, 2, 18, 48, 178, 160, 114, 0, 143, 204, 187, 169, 43, 40, 36, 46,
+ 35, 78, 57, 6, 17, 86, 180, 30, 103, 28, 23, 115, 98, 62, 20, 65, 58, 55,
+ 72, 86, 82, 81, 80, 65, 23, 57, 92, 154, 64, 97, 78, 58, 40, 33, 43, 91,
+ 39, 25, 10, 32, 73, 72, 33, 49, 56, 12, 0, 78, 140, 190, 0, 92, 108, 18,
+ 13, 139, 196, 199, 215, 58, 74, 93, 215, 173, 96, 58, 85, 95, 21, 49, 82,
+ 0, 102, 219, 190, 150, 3, 151, 127, 158, 157, 0, 205, 221, 173, 188, 103,
+ 43, 48, 36, 72, 91, 123, 107, 56, 9, 93, 2, 88, 14, 81, 96, 73, 60, 20, 62,
+ 45, 54, 68, 41, 57, 31, 24, 60, 90, 8, 52, 83, 129, 195, 129, 93, 78, 88,
+ 131, 108, 104, 52, 29, 47, 89, 77, 51, 52, 84, 1, 3, 90, 70, 130, 1, 138,
+ 193, 204, 133, 159, 175, 184, 220, 77, 103, 182, 185, 209, 131, 104, 44,
+ 48, 45, 26, 74, 22, 0, 136, 223, 187, 180, 162, 68, 226, 57, 49, 169, 152,
+ 214, 214, 178, 21, 50, 44, 60, 53, 81, 103, 61, 38, 32, 22, 50, 2, 67, 172,
+ 183, 177, 27, 35, 23, 15, 14, 114, 80, 40, 45, 28, 12, 9, 86, 172, 175,
+ 183, 183, 125, 87, 125, 88, 130, 90, 59, 18, 65, 111, 78, 37, 34, 60, 1, 5,
+ 12, 30, 8, 17, 23, 124, 196, 223, 212, 146, 121, 198, 230, 230, 162, 212,
+ 131, 67, 35, 39, 14, 30, 17, 38, 43, 186, 192, 179, 218, 184, 216, 249, 30,
+ 22, 5, 43, 173, 165, 156, 0, 53, 5, 58, 52, 68, 103, 31, 41, 14, 16, 80,
+ 32, 14, 99, 248, 195, 86, 104, 188, 202, 87, 82, 182, 140, 89, 20, 18, 18,
+ 47, 48, 108, 225, 176, 198, 206, 98, 97, 117, 90, 71, 41, 14, 42, 99, 53,
+ 29, 28, 41, 7, 0, 31, 102, 26, 54, 9, 0, 156, 197, 227, 199, 203, 200, 235,
+ 194, 138, 202, 159, 14, 47, 32, 0, 52, 36, 12, 108, 150, 164, 179, 179, 98,
+ 157, 207, 1, 14, 0, 103, 118, 152, 159, 0, 34, 153, 96, 77, 127, 18, 4,
+ 103, 19, 26, 78, 64, 161, 229, 52, 0, 0, 68, 169, 130, 231, 72, 208, 197,
+ 124, 5, 46, 93, 47, 71, 84, 55, 229, 202, 204, 97, 113, 150, 154, 136, 138,
+ 132, 125, 52, 73, 22, 75, 41, 22, 0, 89, 75, 56, 73, 76, 136, 113, 226,
+ 181, 134, 176, 214, 214, 103, 150, 135, 213, 0, 47, 18, 5, 15, 53, 24, 28,
+ 63, 127, 198, 197, 171, 161, 219, 204, 30, 0, 117, 93, 110, 154, 52, 149,
+ 94, 103, 143, 145, 0, 127, 146, 125, 67, 179, 180, 107, 0, 9, 89, 195, 0,
+ 209, 154, 140, 195, 151, 235, 169, 2, 45, 49, 71, 154, 148, 176, 189, 218,
+ 107, 71, 188, 199, 151, 75, 53, 80, 74, 50, 68, 21, 68, 56, 4, 11, 32, 33,
+ 77, 135, 197, 192, 180, 147, 207, 91, 147, 141, 195, 182, 97, 100, 147, 1,
+ 44, 20, 12, 13, 8, 33, 32, 25, 30, 82, 115, 150, 210, 192, 223, 214, 0, 45,
+ 198, 177, 185, 220, 87, 92, 132, 52, 169, 186, 154, 166, 58, 41, 88, 45,
+ 20, 24, 87, 255, 82, 162, 190, 230, 212, 192, 193, 241, 83, 19, 46, 62,
+ 129, 180, 168, 182, 228, 237, 101, 7, 174, 191, 171, 164, 109, 67, 10, 59,
+ 60, 27, 31, 54, 15, 12, 85, 31, 137, 92, 173, 202, 192, 188, 235, 26, 91,
+ 221, 159, 208, 181, 24, 11, 19, 12, 18, 4, 14, 65, 25, 40, 26, 110, 76,
+ 134, 109, 203, 192, 160, 171, 67, 0, 247, 199, 212, 241, 166, 141, 141, 74,
+ 28, 217, 206, 191, 11, 64, 48, 103, 100, 60, 60, 230, 123, 49, 131, 122,
+ 174, 215, 0, 119, 104, 0, 107, 136, 87, 92, 116, 130, 79, 98, 249, 130,
+ 207, 213, 160, 0, 0, 19, 33, 58, 77, 41, 39, 63, 17, 18, 87, 72, 120, 89,
+ 74, 222, 221, 175, 182, 211, 223, 171, 225, 193, 136, 8, 12, 11, 15, 0, 13,
+ 1, 82, 25, 34, 45, 175, 80, 155, 62, 163, 162, 133, 0, 141, 172, 192, 200,
+ 71, 146, 248, 195, 140, 181, 240, 157, 216, 211, 2, 85, 113, 89, 26, 160,
+ 224, 168, 153, 97, 81, 193, 42, 201, 3, 209, 190, 90, 71, 129, 89, 63, 63,
+ 106, 4, 4, 210, 177, 214, 156, 236, 38, 11, 7, 25, 95, 96, 41, 49, 61, 64,
+ 129, 54, 124, 103, 96, 95, 185, 18, 147, 208, 184, 160, 185, 168, 209, 0,
+ 15, 22, 7, 21, 26, 27, 21, 4, 30, 24, 141, 165, 188, 109, 45, 126, 121,
+ 143, 180, 186, 193, 231, 164, 68, 8, 164, 193, 113, 124, 141, 175, 168,
+ 227, 126, 36, 52, 0, 160, 136, 187, 203, 106, 170, 82, 59, 56, 203, 232,
+ 170, 152, 98, 42, 44, 79, 98, 132, 57, 11, 88, 198, 193, 173, 86, 165, 246,
+ 63, 33, 12, 73, 56, 42, 41, 49, 122, 124, 109, 105, 81, 84, 22, 72, 65,
+ 148, 195, 220, 184, 211, 135, 202, 52, 0, 14, 32, 46, 47, 44, 25, 35, 29,
+ 25, 38, 68, 8, 57, 78, 89, 135, 44, 139, 165, 190, 170, 202, 89, 199, 193,
+ 200, 136, 128, 155, 98, 36, 197, 234, 58, 0, 37, 72, 114, 239, 161, 53, 0,
+ 19, 0, 63, 163, 154, 184, 150, 89, 98, 104, 102, 123, 74, 7, 89, 6, 126,
+ 232, 56, 17, 62, 198, 117, 105, 67, 37, 28, 43, 50, 28, 131, 141, 47, 28,
+ 35, 91, 70, 35, 16, 22, 206, 188, 65, 84, 200, 142, 109, 26, 37, 21, 6, 29,
+ 5, 30, 15, 17, 31, 11, 11, 43, 62, 38, 8, 20, 94, 102, 178, 161, 156, 146,
+ 235, 173, 157, 135, 111, 98, 24, 39, 35, 38, 212, 115, 0, 48, 63, 20, 238,
+ 0, 5, 12, 1, 18, 34, 134, 143, 207, 62, 85, 97, 125, 154, 64, 0, 52, 9, 35,
+ 58, 100, 22, 19, 25, 102, 214, 49, 46, 32, 55, 52, 46, 49, 140, 137, 59,
+ 23, 8, 87, 110, 0, 23, 2, 26, 162, 37, 89, 49, 190, 118, 79, 3, 11, 17, 21,
+ 21, 11, 21, 4, 46, 17, 23, 45, 51, 46, 26, 54, 0, 13, 254, 233, 184, 208,
+ 150, 240, 168, 144, 83, 8, 4, 236, 204, 6, 184, 0, 34, 59, 52, 15, 0, 25,
+ 45, 3, 11, 55, 28, 104, 118, 182, 27, 68, 94, 158, 130, 10, 118, 59, 30,
+ 41, 63, 21, 18, 43, 44, 11, 96, 7, 44, 51, 51, 45, 51, 53, 109, 147, 68, 0,
+ 1, 0, 91, 65, 7, 10, 75, 111, 74, 24, 199, 143, 141, 99, 0, 10, 47, 12, 22,
+ 25, 16, 16, 38, 10, 5, 60, 89, 8, 21, 68, 18, 55, 235, 219, 255, 195, 107,
+ 255, 211, 192, 122, 11, 163, 166, 178, 23, 76, 35, 33, 79, 25, 48, 14, 44,
+ 13, 13, 19, 7, 26, 60, 71, 83, 27, 51, 133, 123, 0, 93, 104, 19, 39, 32,
+ 32, 31, 0, 2, 21, 104, 6, 140, 43, 35, 32, 42, 33, 54, 136, 144, 19, 24, 6,
+ 0, 2, 47, 4, 19, 69, 88, 98, 132, 219, 199, 97, 116, 83, 0, 18, 18, 8, 20,
+ 27, 12, 14, 13, 20, 67, 4, 12, 47, 9, 25, 16, 76, 172, 85, 23, 25, 98, 196,
+ 184, 74, 19, 177, 141, 218, 242, 91, 187, 128, 85, 107, 216, 92, 0, 16, 15,
+ 11, 57, 85, 18, 53, 146, 23, 86, 85, 3, 88, 58, 32, 51, 29, 16, 10, 42,
+ 200, 155, 168, 36, 97, 21, 22, 27, 29, 49, 42, 29, 152, 157, 26, 11, 15,
+ 10, 12, 12, 10, 25, 80, 80, 77, 27, 95, 161, 115, 104, 21, 17, 12, 15, 40,
+ 14, 18, 13, 4, 115, 212, 109, 192, 33, 30, 55, 46, 27, 15, 79, 32, 222, 62,
+ 8, 6, 143, 168, 160, 172, 178, 179, 85, 85, 65, 205, 120, 55, 137, 209, 11,
+ 14, 0, 77, 120, 34, 39, 75, 49, 41, 52, 18, 43, 91, 67, 14, 15, 6, 22, 26,
+ 107, 63, 28, 0, 39, 32, 24, 29, 20, 32, 31, 39, 45, 152, 155, 15, 13, 0, 0,
+ 14, 12, 4, 34, 62, 53, 93, 56, 73, 6, 39, 120, 110, 0, 16, 0, 0, 9, 13, 0,
+ 32, 188, 40, 207, 243, 226, 0, 6, 14, 20, 96, 47, 24, 179, 248, 43, 6, 86,
+ 220, 150, 179, 207, 163, 162, 138, 204, 210, 74, 43, 198, 166, 190, 211,
+ 174, 7, 52, 39, 34, 56, 30, 31, 11, 51, 63, 55, 59, 87, 83, 70, 44, 50, 27,
+ 32, 34, 35, 32, 38, 31, 33, 26, 59, 57, 45, 52, 67, 73, 0, 0, 6, 3, 11, 8,
+ 2, 5, 44, 35, 170, 51, 76, 58, 141, 82, 15, 0, 0, 16, 33, 60, 5, 0, 60,
+ 174, 197, 105, 226, 244, 242, 0, 0, 82, 65, 27, 16, 45, 164, 0, 0, 131,
+ 113, 113, 72, 215, 191, 205, 174, 199, 208, 137, 0, 207, 175, 234, 210,
+ 240, 58, 35, 26, 34, 25, 20, 12, 56, 60, 18, 22, 22, 26, 46, 66, 94, 79,
+ 86, 30, 16, 18, 29, 22, 80, 77, 57, 30, 56, 38, 45, 70, 76, 91, 2, 4, 9,
+ 18, 1, 3, 4, 0, 0, 125, 99, 26, 2, 0, 0, 7, 6, 6, 28, 96, 62, 4, 22, 31,
+ 29, 249, 249, 209, 164, 236, 239, 164, 206, 174, 7, 66, 168, 0, 7, 140, 0,
+ 193, 239, 50, 218, 185, 151, 207, 216, 173, 189, 75, 220, 203, 168, 224,
+ 205, 128, 0, 39, 20, 3, 42, 51, 52, 44, 23, 12, 10, 10, 20, 41, 10, 33, 34,
+ 62, 68, 25, 18, 78, 86, 85, 69, 81, 49, 37, 35, 83, 91}, {191, 213, 194, 155, 143, 99, 147, 188, 175, 161, 193, 194, 164, 191, 186,
+ 177, 193, 165, 185, 211, 188, 146, 47, 18, 31, 38, 36, 53, 43, 33, 44, 22, 19,
+ 26, 17, 24, 8, 107, 187, 210, 190, 135, 94, 97, 74, 35, 17, 56, 84, 106, 98,
+ 77, 67, 46, 40, 32, 56, 66, 64, 47, 41, 39, 36, 46, 42, 55, 33, 33, 37, 38, 30,
+ 36, 39, 44, 33, 13, 15, 17, 26, 36, 36, 27, 21, 19, 28, 21, 27, 38, 49, 39, 167,
+ 191, 98, 87, 172, 136, 150, 212, 170, 86, 142, 196, 209, 172, 141, 112, 200, 151, 136,
+ 207, 190, 198, 173, 106, 50, 25, 14, 7, 28, 40, 35, 39, 33, 24, 29, 24, 1, 106, 193, 199,
+ 195, 198, 188, 195, 189, 106, 56, 94, 118, 90, 73, 61, 63, 70, 52, 45, 65, 56,
+ 45, 42, 35, 29, 38, 51, 54, 59, 36, 47, 50, 45, 38, 38, 58, 60, 47, 22, 26, 25,
+ 30, 31, 24, 18, 19, 23, 27, 19, 37, 65, 39, 40, 141, 129, 47, 175, 202, 217,
+ 194, 171, 136, 53, 53, 136, 119, 184, 205, 84, 154, 214, 199, 208, 182, 162, 190, 170,
+ 128, 54, 88, 75, 26, 36, 41, 42, 46, 38, 47, 33, 13, 63, 131, 160, 180, 195,
+ 188, 177, 163, 125, 88, 114, 106, 90, 39, 48, 78, 72, 46, 41, 57, 51, 39, 32,
+ 31, 30, 18, 27, 27, 42, 47, 26, 48, 38, 33, 42, 64, 71, 62, 28, 35, 36, 40, 28,
+ 21, 18, 22, 26, 31, 25, 46, 72, 34, 34, 112, 12, 61, 222, 206, 197, 210, 188,
+ 62, 0, 12, 27, 8, 115, 145, 49, 23, 191, 212, 197, 185, 182, 141, 110, 88,
+ 58, 141, 178, 134, 60, 46, 44, 34, 30, 39, 32, 27, 16, 57, 133, 162, 167, 144,
+ 126, 114, 60, 94, 105, 107, 59, 32, 47, 69, 70, 41, 35, 50, 51, 34, 36, 33,
+ 35, 7, 105, 100, 16, 23, 16, 25, 38, 17, 37, 63, 72, 68, 31, 40, 43, 48, 32, 14,
+ 15, 23, 24, 30, 31, 47, 64, 38, 33, 150, 140, 127, 150, 113, 187, 219, 167,
+ 122, 101, 34, 8, 20, 149, 102, 99, 81, 36, 101, 220, 194, 209, 143, 149, 148,
+ 130, 74, 143, 172, 164, 125, 76, 25, 24, 46, 18, 20, 20, 27, 106, 142, 170,
+ 147, 87, 73, 81, 81, 96, 87, 44, 55, 73, 72, 53, 39, 39, 58, 35, 27, 80, 93, 5,
+ 88, 177, 188, 96, 0, 44, 25, 29, 28, 34, 66, 76, 72, 36, 41, 41, 51, 41, 19,
+ 20, 26, 25, 27, 25, 39, 49, 69, 57, 199, 202, 219, 136, 58, 124, 211, 173,
+ 197, 189, 176, 106, 164, 185, 138, 140, 196, 201, 165, 209, 216, 167, 35,
+ 141, 173, 178, 124, 63, 96, 111, 118, 126, 61, 27, 40, 19, 25, 28, 14, 125,
+ 161, 200, 194, 97, 77, 73, 70, 65, 63, 52, 62, 74, 71, 48, 50, 50, 36, 38, 26,
+ 104, 172, 116, 127, 173, 188, 141, 32, 62, 64, 65, 28, 24, 60, 81, 83, 42, 36,
+ 42, 58, 52, 39, 25, 22, 23, 24, 17, 25, 31, 54, 55, 157, 144, 181, 220, 140,
+ 171, 198, 139, 198, 199, 147, 170, 209, 189, 193, 142, 74, 140, 203, 146,
+ 183, 191, 115, 69, 150, 175, 138, 114, 85, 45, 103, 112, 92, 37, 26, 42,
+ 31, 26, 13, 98, 175, 201, 216, 124, 56, 65, 62, 68, 66, 51, 79, 75, 71, 81, 56,
+ 35, 46, 52, 38, 65, 181, 201, 175, 168, 178, 165, 131, 140, 116, 72, 58, 57,
+ 60, 87, 93, 60, 51, 59, 71, 65, 49, 30, 26, 31, 36, 29, 29, 25, 52, 51, 56, 118,
+ 198, 204, 221, 214, 203, 187, 189, 208, 123, 145, 221, 222, 218, 97, 11,
+ 192, 179, 173, 144, 181, 229, 146, 96, 148, 135, 149, 165, 141, 155, 192,
+ 181, 64, 50, 169, 118, 28, 5, 51, 203, 187, 200, 189, 130, 63, 54, 60, 39,
+ 77, 89, 85, 95, 97, 63, 54, 49, 44, 50, 29, 143, 201, 181, 211, 204, 203, 190,
+ 162, 123, 74, 56, 73, 75, 93, 98, 82, 80, 84, 84, 75, 64, 57, 61, 59, 56, 49,
+ 43, 31, 54, 49, 22, 79, 198, 167, 168, 182, 194, 183, 206, 211, 90, 67,
+ 130, 188, 212, 180, 144, 172, 177, 210, 158, 80, 118, 124, 155, 152, 184,
+ 173, 190, 184, 197, 207, 213, 65, 57, 163, 128, 46, 96, 87, 198, 187, 173,
+ 212, 196, 158, 109, 60, 50, 77, 105, 78, 69, 67, 71, 74, 64, 60, 47, 22, 69, 136,
+ 155, 199, 214, 215, 189, 163, 151, 110, 66, 69, 79, 94, 98, 103, 108, 90,
+ 91, 82, 70, 60, 60, 55, 52, 48, 37, 33, 34, 32, 114, 9, 43, 63, 106, 147, 168,
+ 166, 178, 208, 68, 112, 107, 197, 167, 180, 186, 180, 139, 175, 106, 204,
+ 130, 116, 120, 152, 150, 141, 160, 151, 167, 185, 191, 65, 50, 116, 39, 50,
+ 128, 113, 134, 190, 192, 186, 196, 189, 194, 97, 15, 48, 100, 130, 99, 34, 84,
+ 79, 86, 60, 33, 21, 25, 74, 119, 171, 195, 210, 189, 173, 150, 120, 57, 51, 61,
+ 81, 96, 114, 128, 110, 99, 82, 60, 57, 49, 37, 39, 30, 22, 32, 30, 28, 96,
+ 65, 52, 40, 53, 89, 99, 153, 172, 199, 72, 136, 204, 204, 204, 145, 181,
+ 180, 104, 119, 77, 62, 173, 108, 102, 96, 63, 62, 49, 92, 174, 160, 158,
+ 48, 76, 171, 91, 105, 112, 161, 12, 79, 186, 183, 170, 171, 197, 186, 60,
+ 125, 172, 199, 203, 79, 45, 79, 91, 77, 22, 26, 26, 26, 70, 144, 188, 182, 123,
+ 80, 74, 55, 50, 34, 26, 49, 70, 96, 124, 124, 111, 84, 52, 30, 33, 25, 16, 17,
+ 34, 34, 27, 28, 94, 59, 33, 27, 70, 72, 107, 175, 145, 103, 57, 197, 169,
+ 201, 194, 167, 109, 170, 177, 133, 120, 82, 155, 113, 84, 62, 67, 42, 8,
+ 76, 180, 178, 181, 30, 105, 184, 160, 182, 187, 210, 111, 116, 174, 174,
+ 154, 186, 204, 208, 202, 163, 116, 153, 171, 137, 50, 72, 72, 75, 85, 38, 34,
+ 33, 28, 34, 81, 82, 58, 62, 81, 95, 68, 43, 3, 20, 40, 72, 111, 131, 117, 80,
+ 45, 33, 34, 29, 32, 28, 36, 39, 28, 24, 109, 59, 30, 11, 34, 38, 73, 114, 37, 46,
+ 74, 166, 107, 29, 146, 146, 136, 145, 218, 162, 181, 199, 173, 122, 63,
+ 80, 42, 42, 32, 89, 167, 180, 167, 31, 103, 208, 178, 198, 209, 234, 164,
+ 114, 132, 155, 148, 188, 190, 178, 198, 194, 140, 172, 192, 158, 92, 71, 84,
+ 96, 82, 74, 33, 62, 59, 34, 49, 56, 24, 56, 84, 98, 93, 51, 10, 12, 23, 55, 93,
+ 130, 128, 94, 43, 37, 35, 32, 34, 31, 40, 42, 32, 27, 117, 57, 11, 19, 17, 19,
+ 21, 81, 52, 43, 77, 52, 21, 20, 22, 190, 199, 165, 197, 186, 201, 197, 177,
+ 100, 55, 30, 29, 108, 91, 63, 88, 86, 98, 40, 79, 188, 196, 182, 193, 182, 177,
+ 84, 87, 124, 66, 105, 195, 165, 152, 190, 162, 169, 163, 124, 122, 91, 77, 79,
+ 89, 89, 76, 85, 97, 60, 83, 63, 38, 28, 49, 80, 103, 89, 30, 33, 51, 70, 84, 122,
+ 130, 98, 49, 41, 43, 45, 29, 29, 41, 33, 25, 24, 106, 68, 27, 30, 35, 27, 21, 29,
+ 34, 31, 95, 37, 51, 29, 29, 144, 226, 209, 203, 183, 68, 163, 185, 191, 150,
+ 59, 63, 117, 54, 73, 57, 142, 171, 26, 76, 156, 162, 201, 148, 138, 195,
+ 149, 123, 86, 22, 116, 175, 174, 170, 203, 139, 83, 82, 167, 159, 77,
+ 75, 58, 47, 123, 128, 89, 128, 126, 106, 75, 26, 37, 29, 52, 86, 96, 65, 61,
+ 79, 87, 72, 102, 123, 105, 58, 75, 67, 72, 70, 60, 39, 32, 21, 21, 52, 84, 27,
+ 32, 29, 21, 28, 33, 28, 26, 88, 38, 31, 67, 42, 19, 118, 165, 159, 181, 157,
+ 161, 197, 180, 131, 121, 115, 35, 125, 174, 145, 181, 188, 26, 120, 195,
+ 186, 188, 174, 156, 133, 172, 180, 169, 38, 116, 161, 182, 189, 193, 173,
+ 93, 97, 169, 167, 84, 40, 54, 21, 110, 171, 125, 132, 187, 164, 79, 24, 33,
+ 26, 18, 49, 83, 78, 77, 124, 161, 139, 146, 149, 129, 74, 81, 73, 90, 87,
+ 92, 74, 54, 21, 18, 22, 91, 34, 37, 27, 27, 24, 50, 42, 35, 96, 33, 11, 48, 52,
+ 9, 180, 226, 188, 208, 221, 149, 152, 84, 58, 64, 73, 131, 171, 172, 112,
+ 103, 133, 33, 34, 87, 28, 100, 217, 99, 118, 182, 179, 116, 71, 89, 170,
+ 186, 191, 148, 186, 183, 137, 80, 130, 74, 52, 45, 33, 65, 150, 158, 128, 195,
+ 182, 121, 93, 88, 14, 6, 19, 37, 56, 100, 159, 179, 212, 205, 197, 211,
+ 95, 39, 73, 58, 66, 65, 68, 64, 60, 51, 54, 46, 39, 27, 57, 80, 52, 29, 37, 56,
+ 76, 107, 82, 60, 43, 28, 107, 192, 103, 99, 106, 124, 141, 137, 49, 76, 34,
+ 72, 125, 152, 114, 9, 44, 79, 98, 198, 171, 180, 212, 197, 191, 178, 192,
+ 143, 104, 36, 87, 212, 189, 200, 210, 186, 191, 138, 128, 92, 86, 65, 36,
+ 29, 119, 186, 183, 188, 183, 170, 140, 90, 21, 3, 0, 7, 26, 67, 107, 140,
+ 179, 194, 155, 199, 174, 38, 20, 46, 53, 46, 44, 64, 51, 51, 39, 43, 33, 20,
+ 38, 80, 41, 73, 32, 73, 69, 107, 56, 86, 85, 43, 56, 94, 112, 78, 69, 193, 142,
+ 182, 150, 21, 5, 36, 81, 150, 104, 28, 54, 95, 25, 91, 254, 167, 244, 89,
+ 236, 172, 153, 192, 232, 137, 9, 87, 200, 206, 229, 183, 226, 240, 198, 120,
+ 87, 45, 40, 19, 135, 200, 206, 211, 175, 144, 62, 8, 0, 28, 102, 108, 92,
+ 127, 124, 133, 110, 173, 167, 163, 214, 175, 82, 78, 69, 53, 24, 40, 51, 52,
+ 20, 35, 36, 33, 3, 96, 33, 154, 116, 66, 67, 104, 131, 73, 67, 47, 41, 54,
+ 58, 88, 114, 159, 243, 194, 177, 208, 50, 0, 49, 33, 14, 70, 60, 59, 31, 1,
+ 48, 192, 190, 60, 255, 112, 145, 193, 123, 17, 182, 164, 94, 181, 67, 85,
+ 200, 195, 205, 197, 83, 32, 32, 54, 91, 172, 191, 182, 203, 158, 61, 0, 4,
+ 68, 162, 203, 176, 177, 179, 169, 110, 166, 222, 196, 193, 188, 142, 93,
+ 86, 54, 26, 23, 53, 55, 63, 25, 12, 14, 31, 96, 56, 169, 149, 137, 61, 43,
+ 115, 113, 101, 49, 37, 10, 68, 172, 124, 26, 163, 207, 234, 185, 134, 218,
+ 160, 198, 205, 42, 36, 57, 26, 32, 27, 51, 243, 56, 193, 183, 152, 69, 11,
+ 143, 189, 184, 201, 212, 212, 102, 194, 201, 159, 67, 109, 130, 85, 56, 70,
+ 80, 83, 111, 151, 162, 99, 52, 48, 30, 89, 191, 182, 183, 178, 174, 116,
+ 136, 159, 190, 207, 193, 159, 134, 89, 31, 24, 23, 59, 62, 38, 50, 18, 72, 177,
+ 147, 47, 161, 125, 191, 149, 52, 27, 57, 79, 53, 44, 85, 149, 163, 90, 86,
+ 167, 145, 197, 225, 90, 177, 204, 199, 131, 0, 36, 53, 32, 22, 7, 128, 197,
+ 74, 84, 181, 106, 85, 36, 18, 103, 186, 214, 176, 232, 224, 191, 189, 236,
+ 82, 146, 156, 132, 92, 67, 82, 79, 103, 119, 123, 94, 74, 84, 81, 11, 76, 158,
+ 201, 185, 105, 122, 97, 124, 124, 145, 189, 137, 143, 74, 29, 34, 38, 63,
+ 64, 38, 32, 22, 33, 202, 194, 55, 176, 138, 188, 226, 215, 153, 29, 114,
+ 46, 26, 164, 182, 171, 156, 134, 209, 207, 187, 162, 74, 110, 205, 142,
+ 3, 13, 36, 56, 25, 24, 12, 38, 174, 90, 20, 219, 129, 114, 26, 55, 30, 2,
+ 55, 0, 200, 197, 194, 177, 188, 176, 69, 98, 162, 139, 115, 45, 56, 127,
+ 149, 153, 135, 79, 101, 120, 93, 65, 175, 196, 172, 161, 195, 92, 75, 74,
+ 47, 59, 75, 72, 45, 33, 35, 34, 65, 67, 36, 51, 65, 56, 44, 142, 22, 125, 92,
+ 230, 202, 218, 198, 85, 40, 54, 35, 161, 227, 161, 34, 121, 175, 102, 80,
+ 21, 90, 44, 143, 222, 122, 2, 43, 52, 36, 9, 63, 190, 119, 97, 27, 159, 163,
+ 233, 123, 23, 32, 16, 56, 64, 47, 63, 101, 177, 168, 183, 52, 143, 222,
+ 189, 114, 77, 145, 147, 149, 169, 129, 132, 86, 138, 125, 107, 174, 171,
+ 138, 162, 188, 100, 43, 55, 50, 28, 52, 42, 41, 36, 34, 34, 67, 66, 22, 49, 105,
+ 141, 62, 128, 213, 188, 156, 122, 232, 205, 195, 148, 46, 53, 32, 107,
+ 209, 158, 30, 183, 232, 145, 0, 106, 115, 101, 24, 154, 144, 168, 70,
+ 44, 0, 58, 180, 193, 138, 85, 50, 125, 144, 206, 196, 115, 170, 136, 5,
+ 192, 37, 65, 75, 69, 165, 155, 200, 126, 196, 232, 152, 177, 140, 89, 136,
+ 109, 101, 105, 98, 154, 142, 85, 82, 97, 102, 106, 135, 133, 37, 45, 45, 37,
+ 32, 42, 30, 33, 36, 24, 25, 37, 25, 16, 11, 29, 121, 163, 161, 183, 199, 204,
+ 54, 119, 255, 119, 208, 56, 41, 79, 180, 105, 45, 188, 211, 149, 4,
+ 150, 171, 125, 171, 166, 144, 130, 123, 59, 204, 110, 67, 155, 235, 88,
+ 54, 138, 101, 184, 222, 151, 152, 155, 115, 198, 177, 156, 147, 107, 64,
+ 52, 186, 153, 217, 179, 254, 108, 75, 126, 141, 60, 101, 59, 108, 122,
+ 126, 74, 51, 38, 61, 52, 146, 140, 57, 34, 35, 38, 27, 26, 33, 34, 26, 29, 41,
+ 37, 59, 15, 27, 35, 28, 129, 170, 186, 215, 232, 184, 106, 25, 115, 195,
+ 64, 52, 45, 102, 26, 34, 104, 163, 48, 79, 205, 156, 199, 170, 162, 195,
+ 192, 76, 139, 215, 173, 126, 151, 51, 102, 35, 139, 237, 180, 196, 169,
+ 94, 33, 105, 88, 121, 147, 101, 61, 42, 38, 16, 50, 235, 208, 109, 93, 115,
+ 180, 31, 77, 90, 89, 73, 64, 49, 64, 47, 70, 84, 69, 77, 113, 45, 40, 32, 33, 28,
+ 27, 50, 45, 24, 31, 39, 40, 159, 54, 0, 25, 0, 0, 91, 175, 182, 205, 175, 91, 0,
+ 166, 238, 65, 40, 25, 16, 99, 2, 35, 64, 4, 76, 56, 244, 145, 209, 190,
+ 191, 233, 223, 181, 211, 224, 120, 10, 79, 109, 59, 95, 230, 195, 146,
+ 180, 77, 32, 32, 110, 167, 91, 56, 45, 39, 24, 51, 41, 93, 115, 119, 74, 219,
+ 169, 96, 92, 87, 64, 32, 38, 23, 26, 32, 77, 103, 98, 56, 60, 48, 50, 48, 33, 36,
+ 37, 62, 54, 29, 33, 39, 42, 193, 117, 0, 4, 9, 26, 0, 132, 215, 153, 210, 0, 58,
+ 225, 83, 71, 45, 35, 11, 43, 62, 12, 105, 31, 46, 12, 94, 235, 172, 177, 195,
+ 219, 227, 181, 180, 224, 154, 77, 50, 110, 53, 56, 197, 193, 110, 86, 28, 68,
+ 46, 188, 174, 133, 32, 46, 34, 41, 45, 31, 73, 109, 97, 142, 219, 206, 136,
+ 114, 79, 41, 86, 66, 37, 48, 43, 76, 93, 86, 103, 56, 89, 53, 55, 34, 35, 38, 65,
+ 61, 42, 60, 21, 33, 152, 83, 13, 11, 2, 36, 0, 153, 198, 222, 67, 6, 150, 180,
+ 139, 54, 58, 37, 13, 28, 70, 60, 20, 14, 79, 154, 91, 131, 173, 137, 168, 111,
+ 215, 185, 161, 207, 215, 157, 89, 71, 83, 64, 100, 154, 97, 1, 111, 117, 26,
+ 78, 164, 91, 17, 20, 73, 86, 72, 0, 85, 130, 102, 166, 254, 195, 124, 155, 46,
+ 50, 90, 75, 50, 30, 35, 75, 89, 101, 81, 100, 66, 86, 50, 40, 36, 39, 69, 66,
+ 46, 76, 36, 32, 100, 39, 14, 16, 12, 26, 45, 226, 197, 254, 9, 33, 227, 167, 133,
+ 116, 45, 47, 13, 40, 73, 41, 42, 43, 118, 142, 169, 218, 161, 215, 254, 230,
+ 214, 197, 238, 238, 216, 165, 100, 71, 76, 53, 137, 169, 10, 141, 82, 122,
+ 67, 8, 129, 97, 34, 74, 122, 99, 55, 41, 150, 107, 105, 44, 193, 190, 188,
+ 189, 61, 20, 43, 53, 77, 56, 10, 109, 170, 136, 113, 84, 85, 51, 40, 36, 36, 47,
+ 74, 76, 53, 68, 34, 37, 137, 104, 18, 10, 28, 25, 24, 0, 32, 14, 29, 87, 144,
+ 113, 99, 41, 73, 34, 41, 33, 60, 59, 17, 28, 76, 131, 74, 84, 93, 72, 44, 163,
+ 190, 72, 88, 237, 177, 167, 123, 85, 103, 17, 164, 228, 166, 128, 64,
+ 129, 54, 11, 73, 94, 98, 82, 78, 102, 2, 170, 109, 113, 43, 46, 6, 186, 211,
+ 182, 68, 36, 24, 37, 56, 53, 30, 68, 191, 203, 179, 89, 67, 51, 43, 32, 34, 52,
+ 68, 81, 59, 47, 37, 39, 97, 43, 71, 14, 29, 19, 35, 45, 31, 34, 9, 161, 217, 75,
+ 85, 15, 91, 26, 50, 40, 59, 83, 26, 48, 25, 28, 34, 6, 63, 70, 21, 147, 201,
+ 134, 109, 194, 227, 189, 160, 124, 129, 60, 169, 212, 216, 210, 168, 171,
+ 140, 189, 0, 153, 129, 42, 63, 23, 75, 180, 94, 76, 34, 101, 111, 65, 162,
+ 183, 148, 106, 32, 21, 46, 38, 35, 32, 113, 178, 217, 153, 76, 46, 33, 35,
+ 42, 54, 70, 80, 52, 22, 23, 44, 86, 78, 26, 57, 8, 26, 101, 30, 24, 47, 15, 166,
+ 60, 105, 102, 13, 87, 31, 58, 34, 33, 103, 3, 163, 125, 35, 43, 18, 74, 51,
+ 27, 248, 190, 125, 197, 238, 217, 210, 160, 99, 137, 255, 177, 127, 255,
+ 220, 222, 185, 94, 107, 113, 71, 117, 149, 19, 11, 156, 128, 45, 27, 30,
+ 55, 168, 133, 156, 166, 171, 179, 88, 0, 25, 17, 136, 135, 184, 162, 192,
+ 184, 155, 39, 21, 33, 38, 57, 73, 73, 62, 45, 43, 41, 63, 126, 21, 46, 18, 45,
+ 84, 31, 48, 26, 42, 21, 9, 69, 42, 67, 74, 45, 56, 43, 22, 43, 47, 135, 156,
+ 26, 37, 26, 53, 94, 91, 75, 155, 170, 178, 203, 158, 210, 183, 102, 3, 226,
+ 237, 255, 59, 12, 198, 234, 55, 79, 38, 167, 160, 227, 7, 48, 0, 10, 16, 83,
+ 56, 80, 77, 196, 201, 150, 62, 90, 81, 14, 39, 62, 40, 110, 57, 78, 187, 204,
+ 197, 168, 57, 15, 31, 53, 68, 79, 90, 118, 36, 42, 71, 127, 116, 13, 30, 92,
+ 155, 28, 22, 59, 35, 24, 60, 66, 7, 0, 125, 79, 33, 40, 42, 63, 32, 25, 11, 59,
+ 63, 79, 71, 19, 136, 175, 188, 62, 255, 237, 133, 10, 5, 13, 67, 59, 99, 90,
+ 255, 173, 220, 70, 113, 65, 224, 67, 146, 60, 93, 60, 38, 20, 54, 83, 142,
+ 128, 131, 149, 139, 184, 190, 86, 98, 90, 8, 21, 68, 139, 133, 208, 170,
+ 182, 199, 167, 139, 36, 45, 45, 39, 88, 130, 139, 43, 36, 105, 85, 89,
+ 145, 20, 32, 80, 70, 22, 133, 125, 56, 58, 27, 34, 186, 220, 132, 34, 41, 32,
+ 14, 113, 115, 40, 54, 83, 26, 50, 8, 69, 115, 132, 58, 74, 250, 140, 10,
+ 50, 26, 19, 90, 42, 66, 240, 231, 93, 207, 239, 144, 155, 62, 25, 139,
+ 132, 127, 94, 59, 64, 83, 97, 75, 31, 155, 159, 168, 219, 111, 23, 40, 47,
+ 36, 46, 47, 18, 41, 40, 123, 160, 176, 123, 55, 46, 31, 23, 44, 96, 110, 83,
+ 108, 101, 95, 7, 93, 128, 17, 42, 7, 132, 136, 130, 81, 48, 80, 147, 132, 188,
+ 79, 33, 46, 60, 66, 107, 182, 122, 36, 146, 33, 10, 64, 45, 51, 27, 102, 10,
+ 31, 139, 16, 34, 56, 11, 48, 58, 125, 255, 33, 119, 218, 188, 220, 106, 12,
+ 65, 100, 73, 122, 73, 97, 44, 40, 40, 10, 44, 108, 92, 129, 224, 0, 164, 96,
+ 19, 31, 41, 37, 38, 40, 36, 66, 107, 176, 130, 32, 23, 26, 20, 35, 85, 74, 108,
+ 101, 97, 32, 36, 3, 111, 120, 18, 32, 152, 229, 165, 188, 159, 120, 105, 90,
+ 170, 80, 33, 29, 67, 63, 65, 75, 66, 51, 33, 56, 20, 85, 0, 20, 35, 125, 85, 48,
+ 1, 22, 40, 57, 24, 56, 57, 8, 42, 161, 72, 0, 15, 149, 24, 70, 103, 67, 92, 69,
+ 74, 170, 28, 28, 11, 11, 44, 51, 10, 100, 157, 58, 198, 174, 87, 26, 33, 43,
+ 28, 31, 26, 25, 55, 125, 125, 52, 48, 40, 39, 37, 76, 79, 101, 102, 151, 30,
+ 28, 45, 28, 149, 47, 35, 35, 255, 205, 190, 174, 242, 98, 118, 148, 96, 59, 22,
+ 49, 23, 95, 14, 23, 25, 8, 25, 51, 0, 26, 0, 105, 146, 102, 0, 14, 88, 42,
+ 102, 64, 16, 22, 49, 52, 53, 21, 51, 143, 19, 61, 88, 100, 66, 61, 90, 89, 2, 42,
+ 26, 22, 27, 40, 47, 49, 60, 44, 88, 121, 141, 119, 52, 27, 36, 17, 4, 19, 24,
+ 7, 33, 66, 45, 53, 84, 86, 19, 49, 70, 98, 104, 180, 255, 79, 34, 50, 0, 19,
+ 57, 121, 59, 218, 203, 165, 123, 251, 173, 223, 134, 144, 118, 63, 22, 84,
+ 17, 64, 208, 179, 70, 3, 23, 51, 179, 164, 114, 0, 145, 208, 190, 169,
+ 40, 44, 36, 44, 37, 82, 60, 6, 14, 82, 178, 29, 108, 37, 30, 112, 92, 58, 18,
+ 64, 63, 64, 79, 83, 76, 77, 72, 66, 33, 65, 93, 153, 71, 93, 70, 59, 50, 41, 44,
+ 90, 46, 41, 33, 45, 76, 77, 39, 57, 63, 28, 13, 83, 152, 204, 10, 105, 121,
+ 29, 19, 144, 208, 213, 232, 71, 87, 104, 221, 192, 117, 72, 91, 100, 29,
+ 55, 85, 13, 123, 233, 196, 155, 11, 157, 130, 157, 160, 0, 214, 229, 176,
+ 193, 105, 42, 51, 38, 81, 99, 126, 112, 58, 9, 93, 0, 93, 29, 92, 102, 68, 60,
+ 20, 60, 50, 69, 79, 47, 52, 32, 25, 64, 97, 8, 46, 73, 115, 196, 130, 97,
+ 85, 88, 125, 98, 90, 64, 45, 57, 93, 75, 46, 44, 74, 14, 6, 96, 83, 144, 14,
+ 146, 207, 219, 141, 165, 188, 198, 233, 85, 117, 197, 193, 222, 149, 119,
+ 54, 57, 51, 33, 77, 35, 10, 151, 233, 196, 186, 169, 71, 229, 59, 55, 179,
+ 163, 223, 219, 179, 24, 52, 50, 70, 64, 90, 108, 62, 33, 33, 27, 58, 19, 82, 182,
+ 181, 172, 28, 40, 31, 32, 29, 124, 78, 41, 50, 34, 20, 11, 80, 161, 154, 184,
+ 188, 131, 95, 127, 82, 119, 69, 59, 18, 71, 123, 87, 44, 44, 66, 6, 11, 19,
+ 43, 27, 32, 29, 128, 202, 223, 219, 159, 140, 213, 236, 234, 168, 212, 146,
+ 83, 52, 52, 23, 37, 26, 46, 58, 202, 209, 192, 227, 191, 225, 255, 29, 27, 9,
+ 53, 184, 173, 164, 3, 52, 10, 62, 62, 79, 111, 39, 47, 16, 19, 85, 49, 33, 116,
+ 255, 199, 88, 107, 193, 219, 106, 99, 192, 144, 101, 29, 21, 20, 49, 43,
+ 101, 213, 188, 207, 209, 100, 99, 112, 83, 59, 36, 5, 44, 117, 68, 42, 48, 58,
+ 15, 6, 42, 114, 40, 65, 16, 0, 156, 193, 238, 211, 217, 211, 242, 192, 138,
+ 198, 166, 24, 64, 48, 7, 55, 39, 12, 115, 160, 181, 195, 186, 101, 160,
+ 207, 0, 15, 0, 109, 128, 164, 174, 7, 33, 154, 96, 83, 137, 30, 19, 113, 23, 31,
+ 86, 80, 176, 246, 67, 12, 0, 73, 177, 146, 246, 89, 223, 213, 138, 15,
+ 55, 101, 52, 74, 83, 56, 243, 212, 213, 105, 118, 153, 153, 137, 140, 119,
+ 125, 69, 74, 10, 68, 29, 34, 13, 103, 87, 65, 74, 77, 133, 111, 218, 195, 146,
+ 185, 215, 215, 100, 148, 127, 219, 13, 63, 38, 16, 16, 58, 20, 34, 77, 143,
+ 218, 208, 172, 166, 215, 207, 31, 0, 120, 102, 124, 167, 62, 152, 95, 103,
+ 146, 154, 10, 140, 156, 133, 75, 184, 186, 117, 5, 20, 86, 203, 8, 214,
+ 160, 150, 203, 162, 232, 175, 12, 56, 52, 72, 157, 150, 182, 195, 228, 118,
+ 74, 189, 202, 153, 81, 58, 62, 73, 74, 72, 13, 71, 52, 14, 15, 41, 47, 86, 138,
+ 197, 188, 175, 145, 216, 105, 156, 144, 195, 178, 92, 98, 156, 17, 55, 34,
+ 20, 10, 8, 30, 41, 41, 41, 96, 123, 147, 210, 189, 225, 220, 0, 50, 203, 181,
+ 193, 223, 89, 98, 134, 57, 174, 190, 162, 169, 62, 44, 90, 49, 24, 23, 87,
+ 246, 86, 165, 192, 234, 216, 191, 193, 232, 88, 32, 59, 68, 133, 184, 170,
+ 183, 233, 250, 114, 13, 178, 195, 173, 165, 108, 37, 4, 87, 71, 28, 51, 72,
+ 13, 7, 101, 48, 140, 96, 177, 209, 194, 195, 251, 43, 94, 225, 163, 215,
+ 183, 31, 19, 35, 27, 32, 18, 16, 60, 19, 48, 42, 125, 90, 148, 111, 198, 186,
+ 162, 175, 69, 0, 249, 201, 214, 239, 168, 145, 143, 75, 30, 219, 208, 189,
+ 12, 64, 49, 107, 100, 59, 58, 227, 124, 49, 132, 126, 174, 214, 0, 116,
+ 113, 14, 116, 138, 88, 94, 116, 125, 88, 114, 255, 132, 208, 215, 160,
+ 0, 9, 0, 28, 82, 72, 22, 40, 62, 9, 8, 106, 91, 132, 95, 71, 221, 218, 187,
+ 201, 230, 235, 177, 222, 192, 133, 20, 21, 24, 31, 12, 23, 0, 91, 33, 43, 58,
+ 191, 94, 165, 58, 172, 170, 137, 0, 132, 171, 190, 199, 70, 142, 252,
+ 194, 131, 180, 238, 156, 215, 207, 3, 87, 112, 84, 18, 159, 219, 162, 154,
+ 99, 80, 188, 34, 200, 0, 203, 200, 106, 82, 141, 97, 63, 63, 104, 14, 20,
+ 221, 189, 222, 156, 236, 36, 0, 2, 25, 91, 85, 23, 29, 43, 48, 124, 69, 141,
+ 117, 99, 90, 186, 19, 152, 223, 201, 174, 188, 163, 210, 0, 20, 32, 18,
+ 33, 39, 37, 22, 12, 37, 34, 152, 177, 201, 119, 46, 134, 128, 151, 181, 181,
+ 194, 232, 168, 72, 6, 172, 194, 108, 125, 142, 179, 172, 225, 130, 41, 57, 3,
+ 159, 140, 187, 201, 110, 175, 87, 62, 55, 207, 232, 168, 160, 110, 50, 55, 90,
+ 106, 140, 65, 19, 100, 206, 204, 184, 94, 173, 254, 58, 39, 25, 81, 56,
+ 35, 33, 44, 122, 120, 116, 116, 96, 93, 22, 79, 71, 151, 202, 231, 199, 220,
+ 135, 209, 58, 0, 20, 43, 57, 56, 50, 28, 41, 38, 31, 49, 79, 17, 63, 81, 95, 144,
+ 58, 142, 164, 192, 175, 211, 95, 200, 207, 203, 135, 130, 160, 107, 42,
+ 198, 243, 69, 6, 47, 80, 125, 243, 162, 62, 5, 31, 4, 71, 174, 158, 185, 161,
+ 101, 109, 116, 116, 137, 88, 21, 100, 18, 137, 244, 70, 31, 76, 212,
+ 121, 121, 89, 54, 38, 44, 49, 30, 120, 123, 56, 37, 45, 97, 67, 34, 20, 25,
+ 215, 197, 75, 90, 197, 141, 113, 29, 43, 30, 16, 36, 9, 33, 16, 26, 37, 20,
+ 21, 50, 66, 41, 9, 29, 108, 109, 182, 166, 159, 150, 236, 170, 171, 142, 115,
+ 103, 27, 43, 36, 35, 212, 120, 8, 57, 74, 36, 250, 8, 5, 17, 11, 27, 45, 150,
+ 155, 217, 80, 99, 109, 138, 171, 84, 7, 66, 27, 49, 70, 113, 39, 39, 39, 116,
+ 221, 67, 70, 55, 73, 64, 56, 60, 120, 119, 63, 29, 17, 95, 111, 0, 26, 15, 30,
+ 168, 46, 97, 50, 188, 121, 92, 11, 20, 26, 24, 21, 13, 19, 7, 54, 26, 32, 48,
+ 51, 48, 24, 57, 3, 18, 255, 236, 182, 203, 146, 233, 171, 149, 86, 11, 2, 231,
+ 200, 0, 180, 0, 41, 63, 59, 27, 7, 34, 41, 3, 18, 59, 35, 116, 128, 191, 45,
+ 80, 105, 172, 146, 32, 135, 75, 48, 53, 74, 35, 34, 65, 61, 27, 95, 18, 62,
+ 68, 65, 53, 58, 62, 104, 153, 66, 4, 9, 4, 93, 58, 5, 14, 73, 116, 82, 32,
+ 201, 136, 139, 103, 5, 19, 57, 13, 19, 22, 11, 16, 47, 19, 15, 61, 86, 5, 16,
+ 68, 13, 58, 241, 222, 253, 183, 104, 250, 206, 195, 128, 14, 160, 154, 175,
+ 15, 71, 34, 37, 81, 29, 55, 22, 52, 8, 12, 23, 9, 30, 67, 79, 91, 45, 63, 146,
+ 136, 8, 115, 122, 33, 57, 44, 45, 44, 12, 24, 39, 118, 5, 150, 61, 52, 42, 44,
+ 34, 55, 149, 152, 16, 28, 13, 3, 4, 42, 6, 26, 66, 92, 105, 137, 221, 194,
+ 99, 123, 90, 5, 31, 21, 3, 10, 24, 12, 21, 22, 33, 70, 0, 2, 44, 9, 17, 17,
+ 85, 179, 82, 12, 20, 93, 188, 185, 83, 26, 174, 130, 213, 237, 86, 186,
+ 132, 86, 111, 225, 102, 7, 11, 14, 15, 58, 89, 27, 63, 155, 43, 99, 98, 17, 106,
+ 78, 48, 62, 49, 29, 23, 56, 218, 175, 184, 47, 94, 32, 41, 44, 42, 55, 46, 34,
+ 152, 150, 25, 13, 21, 16, 15, 6, 10, 27, 79, 82, 83, 33, 98, 155, 115, 106,
+ 32, 28, 26, 17, 36, 4, 17, 11, 15, 126, 226, 111, 188, 23, 29, 53, 40, 29,
+ 29, 88, 30, 214, 56, 1, 0, 145, 182, 169, 170, 170, 173, 78, 80, 64, 212,
+ 123, 61, 147, 221, 21, 9, 0, 84, 123, 40, 49, 87, 59, 62, 65, 31, 58, 109, 87,
+ 32, 27, 27, 35, 39, 122, 81, 48, 15, 51, 34, 39, 52, 41, 46, 39, 44, 51, 144,
+ 150, 34, 32, 10, 3, 11, 11, 1, 46, 81, 72, 105, 62, 70, 5, 36, 132, 119, 7, 32,
+ 9, 9, 5, 22, 6, 41, 201, 56, 221, 253, 222, 3, 14, 18, 19, 87, 46, 22, 178,
+ 247, 39, 10, 85, 211, 149, 177, 206, 162, 158, 139, 206, 209, 69, 35, 197,
+ 161, 184, 212, 176, 6, 47, 31, 33, 51, 24, 41, 27, 62, 75, 63, 59, 87, 81, 80,
+ 60, 61, 39, 40, 34, 35, 30, 22, 26, 33, 22, 48, 39, 25, 34, 51, 68, 10, 10, 20,
+ 6, 6, 9, 3, 10, 59, 52, 184, 54, 71, 59, 142, 87, 25, 9, 12, 29, 43, 61, 13, 1,
+ 70, 185, 209, 118, 236, 245, 250, 1, 2, 83, 60, 28, 17, 49, 168, 0, 6, 132,
+ 108, 114, 73, 219, 195, 203, 178, 204, 213, 140, 0, 211, 175, 232, 214,
+ 245, 63, 38, 25, 38, 25, 18, 20, 68, 68, 29, 33, 30, 34, 54, 74, 106, 87, 97, 41,
+ 24, 26, 37, 17, 86, 90, 65, 30, 49, 30, 40, 70, 72, 98, 13, 19, 18, 18, 8, 9, 7,
+ 3, 8, 140, 108, 26, 9, 3, 0, 13, 17, 17, 37, 102, 65, 10, 31, 37, 40, 255, 255,
+ 215, 167, 242, 248, 178, 209, 173, 9, 71, 177, 0, 8, 154, 3, 192, 241, 55,
+ 227, 191, 152, 216, 227, 185, 199, 83, 231, 207, 169, 233, 216, 140, 6, 47,
+ 31, 7, 43, 62, 64, 55, 35, 26, 24, 24, 34, 52, 22, 44, 46, 76, 82, 39, 32, 82,
+ 102, 107, 86, 91, 50, 36, 37, 72, 73}, {236,222, 180, 150, 169, 149, 187, 212, 220, 170, 179, 189, 190, 241, 226, 201, 193, 189,
+ 216, 231, 158, 147, 12, 0, 31, 62, 67, 73, 13, 34, 9, 0, 0, 3, 24, 48, 28, 147, 211,
+ 159, 169, 112, 101, 121, 94, 75, 41, 5, 32, 63, 61, 37, 31, 19, 25, 25, 4, 23, 27, 7,
+ 5, 12, 21, 39, 46, 50, 27, 10, 0, 21, 20, 0, 43, 39, 27, 0, 0, 0, 16, 0, 9, 3, 0, 1,
+ 13, 9, 15, 28, 22, 15, 185, 204, 107, 104, 185, 142, 175, 254, 188, 99, 151, 213, 222,
+ 178, 166, 154, 218, 188, 179, 244, 221, 245, 188, 97, 68, 62, 57, 44, 59, 87, 50, 30,
+ 12, 0, 23, 48, 46, 153, 203, 153, 174, 172, 182, 219, 234, 153, 66, 48, 61, 66, 49, 15,
+ 21, 51, 39, 28, 8, 32, 21, 0, 0, 10, 25, 34, 42, 52, 31, 14, 0, 2, 20, 14, 46, 53, 42,
+ 0, 0, 0, 12, 7, 5, 2, 5, 11, 18, 13, 31, 62, 17, 22, 168, 122, 15, 201, 247, 219, 212,
+ 215, 163, 46, 21, 162, 164, 186, 223, 128, 182, 248, 231, 240, 222, 199, 236, 205, 156,
+ 88, 120, 107, 66, 73, 87, 77, 32, 21, 32, 46, 56, 85, 98, 88, 166, 178, 173, 190, 206,
+ 147, 55, 42, 61, 52, 6, 12, 42, 59, 60, 65, 12, 13, 6, 0, 0, 17, 32, 51, 46, 38, 29, 0,
+ 0, 0, 0, 15, 83, 67, 44, 0, 0, 0, 0, 1, 0, 0, 6, 13, 18, 14, 34, 63, 19, 22, 114, 31,
+ 57, 249, 237, 189, 231, 224, 64, 18, 8, 54, 39, 107, 166, 85, 54, 217, 217, 228, 219,
+ 205, 187, 164, 119, 84, 146, 209, 168, 83, 92, 98, 28, 29, 42, 44, 55, 28, 28, 76, 156,
+ 166, 147, 138, 142, 72, 65, 48, 67, 5, 0, 8, 20, 50, 69, 75, 10, 0, 0, 0, 0, 15, 35,
+ 145, 142, 39, 19, 0, 0, 0, 0, 0, 105, 95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 22, 38,
+ 26, 23, 146, 174, 148, 194, 137, 152, 220, 211, 118, 135, 55, 52, 44, 114, 103, 143,
+ 119, 76, 104, 255, 242, 255, 191, 182, 186, 170, 77, 190, 220, 223, 173, 109, 21, 40,
+ 77, 43, 42, 54, 60, 117, 138, 186, 178, 112, 95, 115, 114, 107, 31, 13, 29, 29, 26, 36,
+ 44, 42, 2, 4, 1, 36, 47, 0, 93, 180, 201, 124, 12, 11, 0, 0, 0, 0, 79, 104, 86, 3, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 19, 50, 41, 162, 226, 231, 137, 67, 129, 235, 204, 160,
+ 213, 188, 107, 173, 190, 162, 171, 227, 255, 187, 249, 234, 224, 75, 169, 204, 232,
+ 146, 103, 114, 168, 158, 154, 57, 53, 84, 44, 37, 62, 64, 164, 157, 226, 238, 122, 89,
+ 107, 120, 104, 100, 109, 73, 29, 27, 12, 26, 65, 73, 95, 37, 59, 128, 80, 103, 188,
+ 193, 127, 0, 23, 26, 5, 0, 0, 65, 67, 49, 3, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 4, 40,
+ 43, 101, 136, 171, 206, 138, 162, 200, 179, 142, 191, 137, 156, 207, 180, 195, 182, 96,
+ 171, 230, 170, 178, 205, 128, 107, 172, 206, 165, 138, 80, 59, 116, 150, 85, 61, 57,
+ 57, 49, 50, 41, 134, 168, 225, 247, 139, 74, 89, 90, 104, 78, 80, 101, 85, 82, 85, 66,
+ 77, 58, 81, 60, 75, 192, 205, 185, 210, 204, 138, 59, 91, 97, 30, 0, 15, 86, 60, 21,
+ 11, 32, 17, 7, 23, 16, 0, 0, 4, 10, 3, 3, 0, 43, 45, 15, 119, 197, 175, 194, 182, 169,
+ 191, 148, 209, 122, 116, 194, 190, 184, 101, 42, 187, 195, 208, 177, 186, 218, 176,
+ 127, 143, 151, 184, 198, 146, 144, 222, 164, 82, 65, 187, 166, 68, 31, 106, 186, 205,
+ 215, 207, 178, 103, 80, 115, 79, 109, 123, 87, 52, 81, 85, 64, 89, 76, 84, 31, 100,
+ 185, 203, 221, 232, 211, 151, 101, 87, 47, 18, 35, 103, 101, 59, 21, 44, 57, 46, 37,
+ 22, 18, 26, 25, 23, 15, 9, 0, 48, 46, 67, 88, 184, 162, 194, 232, 234, 207, 251, 220,
+ 76, 62, 156, 238, 252, 204, 144, 196, 208, 230, 128, 81, 83, 99, 155, 176, 215, 193,
+ 160, 185, 162, 182, 192, 42, 64, 187, 148, 86, 120, 36, 177, 164, 180, 236, 216, 198,
+ 133, 9, 0, 34, 68, 38, 33, 40, 56, 67, 12, 17, 10, 0, 33, 109, 140, 192, 218, 210, 183,
+ 140, 113, 93, 56, 29, 83, 89, 92, 80, 70, 73, 81, 42, 43, 36, 38, 37, 37, 36, 25, 23,
+ 7, 8, 132, 22, 52, 80, 119, 153, 193, 208, 196, 221, 77, 129, 120, 203, 192, 222, 204,
+ 217, 182, 212, 137, 251, 145, 107, 138, 189, 193, 178, 191, 198, 182, 176, 170, 39, 44,
+ 140, 84, 97, 138, 67, 113, 164, 186, 210, 241, 236, 204, 51, 0, 24, 76, 84, 57, 15, 71,
+ 62, 29, 36, 9, 0, 0, 55, 106, 154, 183, 203, 184, 140, 88, 77, 39, 27, 49, 74, 91, 81,
+ 66, 67, 81, 58, 41, 41, 35, 25, 30, 24, 16, 29, 8, 10, 123, 58, 20, 66, 98, 91, 117,
+ 197, 199, 192, 40, 162, 249, 206, 222, 189, 209, 214, 136, 151, 117, 99, 219, 143, 130,
+ 130, 95, 94, 89, 129, 220, 195, 144, 31, 61, 184, 134, 127, 79, 89, 0, 62, 171, 196,
+ 213, 193, 164, 114, 15, 87, 139, 163, 167, 66, 59, 103, 46, 39, 0, 0, 0, 13, 84, 168,
+ 207, 178, 105, 45, 15, 0, 10, 7, 45, 45, 52, 61, 65, 65, 71, 57, 31, 11, 17, 12, 3, 6,
+ 22, 25, 12, 16, 96, 78, 29, 54, 101, 64, 128, 211, 147, 122, 53, 224, 200, 193, 215,
+ 203, 140, 196, 182, 164, 154, 105, 201, 167, 115, 88, 72, 73, 42, 99, 226, 232, 175,
+ 29, 108, 196, 188, 194, 158, 153, 105, 115, 177, 186, 182, 198, 175, 151, 162, 109, 72,
+ 114, 122, 117, 78, 112, 32, 21, 41, 0, 0, 13, 56, 74, 123, 105, 54, 31, 29, 37, 15, 0,
+ 45, 43, 36, 41, 59, 73, 64, 27, 11, 1, 4, 2, 7, 3, 11, 13, 16, 14, 105, 93, 51, 55, 58,
+ 3, 74, 158, 33, 80, 95, 210, 131, 0, 147, 190, 174, 185, 221, 209, 229, 255, 221, 155,
+ 101, 120, 45, 89, 80, 148, 215, 213, 163, 47, 134, 233, 200, 232, 242, 245, 160, 130,
+ 163, 180, 170, 222, 223, 189, 142, 163, 114, 128, 146, 141, 97, 74, 28, 65, 56, 30, 0,
+ 45, 64, 37, 62, 84, 38, 23, 24, 39, 33, 0, 23, 40, 37, 22, 33, 71, 68, 27, 5, 0, 1, 1,
+ 4, 1, 10, 12, 13, 11, 80, 81, 23, 20, 26, 24, 45, 112, 15, 67, 89, 53, 30, 25, 46, 221,
+ 230, 219, 219, 226, 219, 254, 217, 128, 86, 84, 51, 148, 109, 120, 128, 114, 94, 66,
+ 123, 213, 208, 216, 243, 221, 173, 110, 131, 149, 78, 139, 245, 204, 189, 247, 173,
+ 124, 119, 88, 98, 106, 114, 136, 100, 44, 32, 49, 73, 75, 88, 49, 4, 0, 11, 20, 32, 33,
+ 35, 19, 17, 31, 46, 62, 59, 42, 17, 10, 14, 19, 5, 5, 14, 6, 11, 12, 50, 60, 17, 16,
+ 33, 18, 23, 69, 0, 23, 85, 23, 49, 20, 31, 184, 248, 240, 230, 207, 63, 177, 198, 229,
+ 172, 90, 90, 141, 49, 87, 70, 180, 164, 50, 107, 171, 180, 225, 176, 174, 188, 173,
+ 154, 101, 40, 140, 203, 210, 182, 232, 161, 93, 93, 171, 169, 119, 87, 87, 69, 133,
+ 139, 93, 138, 168, 132, 48, 0, 0, 10, 10, 22, 54, 91, 34, 7, 38, 53, 60, 59, 63, 25,
+ 43, 39, 45, 44, 34, 13, 5, 12, 15, 11, 85, 26, 3, 2, 0, 0, 37, 0, 27, 87, 9, 4, 35, 8,
+ 23, 149, 160, 175, 216, 190, 166, 186, 210, 162, 116, 131, 70, 158, 179, 134, 211, 171,
+ 44, 135, 213, 234, 228, 200, 211, 116, 190, 195, 187, 86, 156, 187, 237, 229, 225, 207,
+ 95, 54, 153, 189, 94, 80, 86, 55, 112, 128, 109, 154, 197, 192, 87, 0, 0, 0, 0, 11, 45,
+ 106, 85, 85, 100, 103, 119, 111, 91, 32, 42, 38, 56, 54, 58, 40, 20, 15, 15, 0, 55, 40,
+ 8, 13, 13, 35, 21, 11, 0, 102, 4, 0, 34, 63, 0, 200, 248, 208, 231, 183, 136, 171, 84,
+ 78, 86, 93, 154, 133, 159, 131, 103, 95, 55, 55, 137, 71, 129, 255, 162, 80, 204, 200,
+ 166, 114, 118, 209, 249, 234, 190, 214, 195, 135, 55, 146, 92, 95, 87, 61, 77, 148,
+ 133, 144, 213, 216, 157, 93, 80, 0, 24, 24, 33, 90, 136, 159, 171, 197, 223, 202, 207,
+ 68, 6, 34, 17, 25, 24, 23, 14, 33, 18, 37, 9, 68, 53, 65, 72, 95, 41, 20, 19, 105, 133,
+ 90, 52, 86, 40, 91, 218, 137, 141, 136, 124, 115, 126, 33, 102, 68, 114, 155, 152, 88,
+ 0, 15, 88, 98, 192, 174, 215, 236, 222, 162, 187, 192, 137, 107, 71, 111, 237, 217,
+ 193, 238, 217, 208, 100, 140, 118, 114, 58, 64, 60, 136, 148, 195, 214, 190, 182, 151,
+ 101, 24, 18, 9, 1, 33, 79, 118, 151, 182, 209, 165, 193, 178, 29, 0, 11, 13, 2, 0, 16,
+ 12, 10, 19, 18, 46, 32, 56, 74, 55, 60, 12, 48, 82, 119, 74, 80, 99, 30, 43, 79, 127,
+ 123, 88, 189, 186, 220, 137, 6, 20, 81, 100, 146, 148, 66, 16, 81, 36, 96, 249, 190,
+ 243, 114, 198, 158, 164, 197, 227, 160, 8, 112, 240, 221, 246, 223, 245, 252, 185, 109,
+ 127, 60, 57, 59, 154, 212, 193, 200, 197, 130, 63, 28, 19, 40, 126, 129, 114, 113, 125,
+ 153, 130, 185, 191, 184, 245, 189, 72, 47, 29, 6, 0, 0, 10, 11, 0, 28, 52, 44, 38, 125,
+ 68, 151, 83, 59, 83, 115, 166, 102, 102, 44, 45, 73, 70, 110, 123, 119, 255, 197, 181,
+ 227, 62, 20, 58, 0, 33, 73, 16, 32, 27, 0, 34, 203, 176, 68, 218, 85, 141, 188, 109,
+ 28, 168, 172, 106, 204, 91, 134, 198, 239, 204, 203, 95, 55, 56, 103, 89, 216, 190,
+ 188, 248, 151, 71, 18, 25, 71, 182, 197, 221, 170, 189, 187, 131, 169, 242, 190, 182,
+ 170, 116, 62, 60, 35, 11, 11, 8, 5, 54, 46, 62, 64, 55, 108, 94, 160, 140, 158, 111,
+ 93, 139, 125, 139, 40, 28, 31, 74, 158, 144, 30, 199, 255, 225, 206, 140, 204, 180,
+ 202, 241, 92, 26, 93, 69, 38, 0, 56, 255, 81, 183, 219, 195, 75, 0, 148, 208, 209, 218,
+ 214, 226, 124, 186, 220, 158, 74, 126, 132, 99, 78, 62, 99, 82, 118, 145, 139, 111, 58,
+ 50, 27, 101, 155, 176, 160, 190, 180, 118, 133, 171, 154, 180, 165, 129, 107, 65, 10,
+ 0, 0, 63, 53, 4, 43, 21, 102, 201, 151, 69, 163, 91, 184, 152, 82, 51, 61, 101, 55, 17,
+ 58, 160, 166, 114, 136, 211, 180, 170, 198, 101, 180, 228, 249, 175, 32, 69, 91, 52,
+ 15, 0, 145, 207, 56, 117, 219, 126, 78, 8, 35, 113, 168, 214, 201, 213, 198, 171, 192,
+ 193, 71, 146, 181, 113, 66, 47, 85, 36, 92, 104, 86, 77, 66, 60, 40, 0, 49, 143, 164,
+ 168, 97, 98, 56, 99, 97, 94, 141, 94, 111, 49, 6, 7, 6, 38, 29, 4, 37, 5, 43, 233, 203,
+ 64, 174, 104, 193, 209, 225, 184, 38, 123, 44, 0, 128, 136, 140, 161, 168, 230, 232,
+ 150, 126, 28, 79, 210, 176, 24, 38, 57, 71, 59, 36, 0, 60, 182, 100, 41, 234, 163, 126,
+ 3, 77, 38, 12, 8, 18, 170, 178, 158, 155, 142, 198, 22, 119, 132, 120, 79, 23, 10, 149,
+ 184, 149, 102, 55, 64, 76, 43, 23, 210, 192, 139, 137, 158, 48, 25, 32, 14, 24, 37, 32,
+ 7, 0, 0, 0, 25, 23, 0, 41, 54, 66, 46, 146, 59, 132, 27, 220, 191, 228, 200, 89, 77,
+ 61, 0, 151, 165, 174, 88, 161, 208, 116, 44, 11, 28, 57, 197, 255, 155, 16, 31, 40, 62,
+ 0, 0, 221, 144, 132, 15, 147, 189, 201, 60, 54, 57, 51, 67, 40, 20, 80, 85, 120, 144,
+ 186, 63, 119, 195, 206, 98, 20, 121, 150, 162, 178, 88, 88, 68, 177, 127, 57, 187, 180,
+ 97, 118, 170, 139, 45, 5, 19, 0, 4, 0, 0, 0, 0, 0, 21, 18, 0, 13, 111, 112, 48, 114,
+ 224, 159, 125, 86, 238, 176, 181, 134, 57, 24, 52, 129, 229, 181, 0, 170, 251, 145, 18,
+ 128, 135, 124, 0, 141, 163, 168, 32, 66, 18, 108, 223, 222, 177, 148, 12, 147, 165,
+ 255, 239, 144, 209, 199, 48, 234, 65, 77, 73, 44, 181, 173, 243, 168, 224, 244, 150,
+ 152, 156, 107, 170, 145, 101, 97, 83, 172, 147, 81, 116, 133, 102, 98, 120, 151, 42,
+ 41, 18, 4, 0, 1, 0, 0, 0, 0, 0, 4, 8, 0, 40, 55, 129, 155, 204, 195, 182, 167, 83, 145,
+ 255, 111, 251, 68, 25, 105, 214, 147, 75, 188, 185, 138, 0, 176, 205, 167, 201, 166,
+ 118, 119, 94, 68, 204, 104, 70, 190, 255, 113, 25, 147, 101, 178, 225, 186, 176, 180,
+ 143, 191, 205, 187, 164, 69, 76, 78, 214, 146, 245, 210, 255, 70, 87, 152, 148, 72,
+ 112, 70, 111, 137, 136, 68, 58, 50, 72, 63, 149, 155, 67, 28, 39, 29, 2, 0, 0, 0, 0, 0,
+ 2, 0, 39, 0, 40, 47, 46, 123, 184, 173, 195, 207, 197, 118, 43, 109, 209, 51, 39, 30,
+ 117, 71, 53, 100, 207, 86, 66, 190, 171, 244, 189, 158, 239, 230, 38, 125, 226, 178,
+ 121, 174, 50, 127, 0, 125, 248, 185, 191, 192, 93, 58, 145, 103, 138, 187, 120, 73, 29,
+ 27, 56, 65, 252, 248, 128, 105, 102, 169, 53, 63, 91, 109, 93, 76, 73, 85, 69, 56, 85,
+ 89, 97, 125, 69, 61, 63, 47, 18, 0, 10, 0, 0, 0, 0, 0, 126, 47, 16, 36, 33, 25, 126,
+ 172, 149, 198, 191, 102, 30, 195, 255, 62, 44, 44, 28, 121, 11, 0, 83, 7, 80, 75, 255,
+ 167, 218, 150, 210, 236, 179, 154, 207, 219, 106, 21, 65, 117, 15, 68, 226, 190, 132,
+ 191, 63, 40, 44, 133, 191, 140, 54, 89, 38, 30, 63, 64, 117, 164, 117, 118, 218, 175,
+ 141, 85, 97, 82, 53, 41, 43, 20, 77, 70, 113, 116, 77, 63, 68, 44, 37, 15, 10, 6, 36,
+ 35, 14, 21, 0, 0, 184, 138, 48, 54, 33, 38, 34, 123, 206, 174, 255, 43, 82, 237, 121,
+ 62, 36, 56, 17, 29, 82, 16, 141, 81, 37, 33, 100, 221, 192, 181, 231, 255, 217, 217,
+ 223, 230, 119, 82, 69, 135, 43, 92, 240, 199, 75, 91, 47, 93, 63, 190, 188, 155, 24,
+ 65, 33, 48, 62, 33, 87, 131, 89, 161, 218, 213, 130, 91, 91, 47, 88, 63, 49, 12, 37,
+ 53, 105, 92, 105, 53, 101, 17, 28, 6, 5, 11, 41, 40, 17, 30, 25, 24, 118, 76, 16, 41,
+ 26, 40, 20, 155, 164, 215, 70, 36, 174, 184, 161, 56, 31, 10, 24, 31, 94, 110, 64, 49,
+ 52, 127, 102, 134, 197, 187, 212, 146, 248, 223, 181, 200, 187, 174, 99, 53, 116, 102,
+ 120, 147, 69, 18, 121, 99, 26, 103, 145, 65, 0, 23, 30, 75, 72, 23, 66, 104, 82, 169,
+ 211, 184, 109, 118, 29, 42, 66, 34, 25, 3, 20, 38, 72, 93, 57, 59, 41, 59, 0, 0, 0, 7,
+ 44, 43, 19, 44, 11, 0, 66, 44, 0, 26, 43, 35, 54, 224, 163, 255, 0, 43, 255, 176, 142,
+ 114, 8, 11, 0, 9, 78, 75, 63, 68, 81, 106, 123, 187, 166, 249, 255, 255, 235, 212, 255,
+ 250, 193, 187, 108, 81, 97, 68, 171, 181, 0, 163, 90, 132, 20, 29, 99, 78, 0, 52, 76,
+ 121, 8, 62, 120, 88, 69, 22, 147, 212, 223, 185, 28, 0, 6, 9, 27, 14, 45, 105, 137,
+ 112, 76, 40, 35, 9, 7, 1, 0, 7, 36, 36, 6, 16, 0, 0, 72, 94, 7, 20, 30, 29, 61, 7, 0,
+ 4, 18, 97, 146, 117, 136, 48, 37, 24, 0, 46, 114, 99, 50, 42, 40, 121, 12, 97, 147,
+ 112, 77, 177, 178, 60, 114, 205, 114, 198, 148, 120, 91, 5, 190, 196, 103, 159, 89,
+ 164, 65, 0, 46, 111, 82, 25, 54, 105, 13, 146, 82, 130, 27, 0, 0, 189, 224, 191, 27, 0,
+ 6, 76, 58, 3, 43, 77, 150, 159, 161, 128, 69, 1, 12, 0, 0, 2, 22, 38, 18, 8, 0, 0, 49,
+ 9, 54, 0, 10, 34, 37, 29, 0, 0, 0, 126, 198, 90, 87, 0, 50, 0, 15, 45, 63, 61, 35, 79,
+ 0, 0, 0, 11, 67, 48, 30, 178, 177, 144, 146, 217, 238, 208, 184, 155, 105, 70, 206,
+ 235, 227, 229, 192, 202, 165, 192, 4, 133, 98, 9, 54, 1, 100, 183, 99, 56, 3, 68, 102,
+ 43, 163, 230, 153, 71, 19, 41, 60, 4, 36, 79, 118, 143, 204, 173, 90, 12, 4, 0, 0, 11,
+ 30, 42, 5, 0, 0, 0, 80, 40, 0, 15, 0, 0, 67, 18, 18, 9, 0, 124, 42, 77, 68, 1, 58, 0,
+ 23, 20, 13, 82, 0, 180, 96, 0, 8, 4, 54, 30, 17, 255, 196, 118, 210, 221, 204, 229,
+ 153, 98, 143, 250, 190, 110, 242, 239, 215, 184, 102, 107, 134, 67, 62, 119, 0, 5, 164,
+ 128, 66, 23, 0, 25, 134, 127, 160, 171, 156, 148, 90, 25, 52, 50, 140, 140, 169, 131,
+ 194, 212, 182, 72, 7, 0, 0, 0, 12, 15, 0, 0, 0, 0, 53, 80, 0, 29, 38, 30, 53, 44, 38,
+ 0, 6, 4, 29, 54, 11, 80, 80, 7, 23, 17, 1, 33, 40, 150, 162, 0, 4, 0, 32, 84, 84, 90,
+ 146, 169, 168, 177, 128, 189, 179, 104, 0, 225, 227, 234, 29, 0, 194, 236, 111, 83, 32,
+ 154, 115, 196, 0, 59, 50, 14, 10, 70, 11, 49, 40, 207, 229, 154, 52, 51, 44, 0, 17, 81,
+ 68, 114, 47, 39, 150, 180, 175, 187, 59, 0, 0, 7, 23, 38, 38, 82, 0, 4, 79, 99, 60, 0,
+ 44, 121, 153, 52, 30, 31, 0, 0, 74, 95, 5, 21, 118, 51, 0, 12, 37, 55, 15, 10, 4, 31,
+ 18, 51, 66, 11, 119, 160, 204, 58, 254, 210, 103, 0, 0, 1, 83, 55, 98, 63, 228, 160,
+ 195, 58, 126, 70, 217, 15, 98, 26, 92, 59, 51, 25, 47, 31, 94, 94, 130, 148, 115, 181,
+ 209, 85, 77, 68, 0, 5, 44, 136, 152, 207, 149, 160, 170, 151, 120, 0, 6, 5, 6, 58, 79,
+ 95, 0, 3, 111, 85, 62, 131, 4, 45, 56, 71, 28, 133, 98, 42, 42, 40, 10, 187, 248, 141,
+ 2, 5, 42, 33, 118, 139, 68, 63, 51, 0, 60, 27, 74, 139, 164, 76, 100, 246, 113, 0, 0,
+ 0, 51, 108, 68, 62, 213, 195, 36, 170, 248, 138, 132, 13, 2, 120, 101, 62, 103, 53, 41,
+ 34, 74, 56, 0, 90, 110, 142, 198, 90, 0, 21, 45, 20, 0, 21, 0, 20, 16, 104, 158, 160,
+ 84, 0, 0, 0, 9, 48, 88, 114, 69, 63, 102, 93, 12, 124, 130, 26, 19, 4, 133, 134, 135,
+ 112, 50, 89, 124, 129, 212, 66, 7, 0, 52, 97, 103, 217, 146, 23, 120, 0, 2, 95, 41, 86,
+ 32, 122, 38, 48, 118, 0, 0, 32, 16, 68, 86, 142, 239, 0, 75, 194, 163, 181, 86, 12, 66,
+ 113, 59, 165, 48, 58, 24, 40, 41, 23, 30, 151, 82, 105, 194, 14, 194, 113, 42, 29, 31,
+ 13, 8, 55, 66, 83, 130, 174, 108, 0, 0, 0, 0, 24, 68, 75, 56, 40, 112, 5, 33, 20, 137,
+ 157, 48, 46, 167, 202, 162, 205, 185, 157, 135, 104, 169, 43, 29, 16, 78, 116, 77, 94,
+ 65, 14, 29, 43, 31, 138, 11, 39, 48, 111, 98, 52, 5, 34, 27, 72, 37, 42, 70, 12, 46,
+ 173, 59, 15, 14, 138, 11, 56, 114, 125, 120, 126, 73, 159, 15, 14, 22, 69, 72, 108, 16,
+ 56, 111, 56, 210, 183, 110, 57, 39, 0, 0, 29, 38, 34, 78, 156, 169, 62, 26, 0, 0, 5,
+ 25, 37, 40, 44, 106, 0, 63, 72, 53, 157, 86, 53, 0, 205, 240, 217, 199, 250, 137, 136,
+ 151, 51, 30, 0, 24, 48, 136, 42, 26, 0, 0, 0, 26, 23, 67, 23, 127, 155, 115, 20, 37,
+ 110, 65, 149, 86, 25, 35, 71, 75, 75, 44, 98, 145, 17, 47, 64, 128, 98, 84, 101, 91, 0,
+ 28, 2, 50, 59, 63, 58, 44, 13, 27, 100, 125, 140, 121, 82, 22, 0, 0, 16, 23, 23, 9, 63,
+ 73, 24, 13, 24, 44, 0, 0, 16, 33, 55, 132, 225, 62, 0, 31, 14, 21, 41, 73, 25, 201,
+ 168, 146, 138, 253, 157, 182, 98, 109, 123, 67, 0, 93, 48, 23, 172, 144, 75, 7, 1, 60,
+ 210, 140, 124, 33, 168, 219, 209, 193, 71, 20, 46, 81, 60, 93, 79, 30, 45, 107, 181,
+ 34, 88, 6, 0, 103, 70, 83, 21, 69, 43, 33, 46, 74, 54, 78, 119, 71, 0, 52, 113, 167,
+ 37, 94, 117, 64, 15, 28, 64, 104, 12, 12, 0, 1, 33, 37, 1, 10, 30, 0, 0, 77, 114, 168,
+ 0, 87, 93, 0, 7, 138, 170, 177, 190, 53, 59, 70, 209, 163, 61, 37, 77, 80, 8, 45, 102,
+ 0, 67, 198, 182, 135, 0, 147, 147, 163, 153, 12, 197, 216, 195, 186, 104, 48, 44, 51,
+ 64, 86, 145, 105, 57, 17, 93, 21, 89, 0, 62, 68, 62, 68, 20, 81, 46, 14, 49, 13, 46,
+ 36, 30, 49, 66, 10, 74, 100, 148, 200, 135, 82, 54, 90, 153, 125, 123, 50, 0, 5, 32,
+ 14, 0, 0, 25, 0, 0, 86, 37, 108, 0, 166, 192, 188, 154, 155, 142, 162, 216, 105, 102,
+ 166, 206, 228, 111, 86, 28, 36, 41, 26, 92, 41, 0, 118, 207, 175, 176, 162, 86, 220,
+ 58, 45, 153, 133, 202, 215, 181, 15, 51, 40, 44, 34, 69, 104, 64, 89, 37, 21, 45, 0,
+ 51, 145, 192, 228, 32, 34, 18, 0, 0, 87, 89, 69, 54, 24, 0, 0, 56, 139, 173, 212, 192,
+ 121, 56, 90, 58, 97, 88, 61, 0, 35, 77, 42, 3, 0, 30, 0, 0, 27, 15, 0, 0, 43, 157, 200,
+ 247, 227, 131, 84, 180, 250, 255, 166, 236, 139, 55, 7, 24, 18, 29, 9, 31, 51, 174,
+ 164, 164, 222, 183, 208, 242, 45, 23, 8, 26, 154, 160, 139, 0, 68, 6, 61, 35, 49, 98,
+ 14, 35, 29, 24, 78, 0, 0, 82, 255, 198, 101, 112, 186, 167, 58, 65, 191, 143, 77, 26,
+ 40, 19, 28, 21, 72, 197, 164, 204, 228, 99, 78, 90, 54, 43, 17, 0, 5, 77, 35, 12, 0,
+ 14, 0, 0, 48, 114, 13, 51, 0, 11, 132, 194, 244, 211, 190, 197, 226, 205, 114, 199,
+ 194, 33, 32, 12, 17, 74, 44, 36, 143, 169, 149, 159, 196, 120, 165, 231, 32, 33, 23,
+ 105, 101, 128, 117, 0, 65, 172, 122, 79, 110, 0, 0, 76, 32, 25, 63, 31, 153, 227, 36,
+ 0, 9, 67, 154, 97, 223, 70, 192, 148, 89, 0, 34, 80, 28, 55, 81, 40, 194, 186, 192, 84,
+ 94, 134, 151, 121, 101, 64, 75, 27, 60, 14, 60, 33, 20, 0, 104, 85, 70, 105, 79, 142,
+ 88, 215, 196, 144, 190, 246, 217, 109, 125, 124, 243, 0, 37, 0, 8, 47, 54, 55, 58, 64,
+ 117, 165, 200, 203, 162, 250, 212, 51, 27, 137, 81, 71, 123, 38, 157, 115, 131, 163,
+ 133, 0, 96, 132, 108, 36, 164, 186, 118, 18, 6, 129, 178, 0, 194, 160, 151, 216, 148,
+ 255, 165, 0, 26, 67, 102, 174, 173, 180, 185, 204, 88, 89, 219, 219, 176, 79, 36, 14,
+ 16, 12, 37, 2, 54, 53, 0, 0, 56, 20, 83, 155, 223, 225, 205, 159, 231, 78, 153, 161,
+ 221, 215, 122, 112, 155, 0, 51, 21, 31, 63, 20, 49, 40, 4, 37, 83, 134, 200, 222, 208,
+ 238, 206, 12, 54, 207, 193, 180, 238, 102, 84, 147, 61, 178, 202, 149, 184, 61, 33, 77,
+ 35, 35, 81, 115, 255, 85, 154, 179, 220, 227, 249, 221, 255, 94, 0, 13, 66, 145, 193,
+ 193, 214, 239, 206, 68, 11, 190, 204, 196, 196, 152, 47, 0, 38, 31, 0, 0, 30, 0, 0, 56,
+ 0, 175, 123, 202, 217, 233, 213, 206, 0, 129, 252, 188, 223, 222, 49, 22, 0, 0, 5, 0,
+ 41, 101, 47, 51, 0, 96, 63, 123, 136, 239, 214, 184, 184, 82, 20, 255, 223, 237, 255,
+ 190, 154, 156, 97, 53, 241, 231, 236, 14, 62, 35, 83, 128, 91, 81, 238, 126, 47, 118,
+ 102, 202, 246, 21, 127, 108, 0, 99, 150, 92, 93, 118, 155, 83, 67, 241, 144, 212, 214,
+ 162, 25, 16, 0, 0, 22, 30, 0, 0, 8, 0, 0, 50, 36, 118, 111, 100, 239, 255, 163, 145,
+ 175, 221, 193, 251, 210, 176, 0, 0, 4, 5, 0, 14, 56, 86, 46, 22, 38, 165, 71, 156, 117,
+ 167, 183, 162, 7, 151, 141, 201, 233, 88, 166, 255, 202, 150, 150, 249, 190, 233, 231,
+ 0, 76, 117, 106, 55, 155, 241, 190, 148, 88, 85, 210, 71, 196, 20, 231, 225, 61, 42,
+ 93, 74, 101, 87, 127, 39, 0, 181, 141, 199, 194, 255, 59, 0, 0, 0, 54, 31, 0, 0, 0, 48,
+ 95, 28, 97, 92, 114, 130, 188, 41, 173, 182, 157, 149, 203, 203, 212, 20, 41, 5, 2, 23,
+ 22, 13, 40, 0, 45, 7, 136, 167, 184, 95, 64, 121, 136, 164, 201, 205, 178, 237, 177,
+ 84, 27, 185, 214, 132, 109, 147, 188, 184, 246, 139, 37, 53, 10, 177, 123, 199, 225,
+ 119, 171, 83, 69, 73, 190, 244, 192, 196, 90, 25, 15, 58, 108, 127, 44, 55, 80, 181,
+ 164, 152, 96, 160, 233, 36, 0, 0, 32, 0, 0, 0, 0, 86, 83, 108, 102, 65, 74, 32, 46, 57,
+ 184, 194, 217, 168, 201, 145, 176, 44, 30, 6, 26, 40, 37, 24, 19, 29, 17, 17, 32, 62,
+ 0, 37, 72, 83, 123, 45, 157, 182, 187, 179, 206, 111, 230, 194, 218, 153, 125, 164,
+ 102, 58, 228, 242, 53, 0, 36, 83, 111, 255, 208, 61, 0, 7, 0, 74, 160, 183, 231, 163,
+ 79, 77, 80, 80, 112, 65, 0, 102, 0, 105, 208, 34, 6, 53, 179, 94, 72, 43, 22, 3, 12,
+ 27, 9, 66, 59, 27, 34, 37, 93, 96, 50, 23, 40, 186, 194, 67, 86, 226, 157, 116, 44, 33,
+ 13, 0, 18, 0, 6, 11, 0, 27, 3, 0, 32, 41, 14, 4, 0, 75, 101, 185, 162, 166, 161, 255,
+ 215, 138, 134, 118, 99, 34, 54, 58, 80, 255, 150, 10, 62, 68, 0, 228, 0, 57, 47, 13,
+ 32, 39, 111, 133, 206, 38, 64, 69, 108, 137, 47, 0, 43, 0, 14, 30, 83, 5, 2, 22, 93,
+ 190, 15, 18, 9, 15, 0, 0, 0, 59, 55, 48, 27, 12, 84, 115, 18, 15, 0, 15, 166, 41, 86,
+ 54, 209, 110, 48, 0, 3, 9, 17, 0, 0, 20, 0, 31, 9, 15, 41, 25, 8, 25, 48, 0, 0, 250,
+ 227, 195, 236, 160, 255, 152, 125, 79, 2, 15, 255, 214, 41, 230, 30, 51, 88, 69, 3, 0,
+ 15, 91, 37, 28, 84, 45, 92, 104, 172, 0, 56, 73, 149, 117, 0, 103, 39, 0, 29, 42, 12,
+ 5, 16, 29, 0, 77, 0, 22, 32, 16, 0, 4, 5, 82, 105, 79, 0, 0, 0, 90, 99, 28, 13, 86,
+ 109, 67, 21, 198, 177, 162, 102, 0, 2, 23, 5, 4, 3, 15, 18, 30, 2, 0, 53, 71, 0, 20,
+ 70, 20, 41, 229, 213, 255, 223, 99, 255, 213, 178, 116, 5, 171, 194, 170, 40, 112, 68,
+ 49, 122, 54, 47, 0, 27, 49, 46, 35, 50, 55, 59, 56, 66, 0, 43, 119, 116, 0, 66, 82, 0,
+ 5, 24, 18, 24, 0, 0, 0, 82, 0, 87, 3, 8, 0, 0, 0, 11, 96, 103, 23, 14, 5, 6, 1, 72, 3,
+ 10, 73, 78, 97, 140, 218, 224, 96, 107, 83, 0, 0, 4, 0, 19, 19, 14, 14, 5, 0, 53, 0,
+ 11, 39, 11, 32, 11, 64, 172, 93, 44, 16, 115, 203, 179, 62, 19, 185, 162, 209, 255,
+ 126, 218, 143, 134, 140, 224, 78, 0, 51, 46, 26, 106, 118, 26, 39, 128, 0, 69, 70, 0,
+ 84, 40, 9, 32, 0, 0, 0, 31, 196, 137, 145, 17, 59, 0, 0, 0, 0, 0, 0, 0, 90, 82, 21, 10,
+ 19, 14, 8, 42, 20, 39, 75, 79, 81, 31, 91, 191, 125, 118, 16, 14, 0, 4, 24, 12, 0, 25,
+ 0, 112, 177, 98, 176, 31, 11, 67, 44, 24, 0, 85, 41, 239, 66, 34, 4, 140, 147, 166,
+ 181, 195, 183, 111, 120, 96, 220, 168, 85, 146, 197, 0, 49, 31, 92, 168, 64, 48, 63,
+ 33, 5, 35, 4, 29, 85, 49, 0, 0, 0, 5, 12, 93, 57, 10, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0,
+ 80, 85, 0, 0, 0, 19, 40, 29, 44, 22, 25, 17, 91, 78, 99, 23, 79, 108, 98, 0, 6, 0, 0,
+ 64, 17, 19, 20, 181, 30, 198, 244, 255, 0, 27, 43, 27, 106, 16, 33, 212, 255, 63, 35,
+ 93, 230, 119, 188, 240, 180, 182, 133, 195, 214, 91, 72, 193, 183, 212, 206, 165, 11,
+ 69, 68, 29, 73, 52, 66, 0, 22, 27, 40, 97, 111, 104, 105, 15, 21, 0, 17, 72, 59, 53,
+ 22, 0, 0, 0, 0, 0, 0, 0, 51, 39, 0, 0, 0, 21, 46, 11, 25, 31, 18, 8, 159, 69, 111, 61,
+ 164, 108, 0, 0, 2, 12, 19, 79, 0, 9, 43, 169, 199, 101, 212, 255, 237, 9, 15, 103, 84,
+ 12, 22, 58, 180, 19, 19, 152, 132, 98, 78, 228, 207, 224, 187, 200, 209, 147, 16, 194,
+ 187, 255, 223, 241, 59, 45, 43, 21, 37, 42, 56, 48, 43, 0, 1, 32, 21, 33, 110, 86, 62,
+ 57, 9, 26, 13, 16, 0, 38, 37, 16, 0, 0, 0, 0, 34, 35, 90, 0, 0, 0, 28, 0, 0, 40, 0, 0,
+ 109, 89, 36, 0, 0, 31, 0, 0, 0, 18, 76, 56, 0, 10, 23, 23, 243, 239, 189, 158, 230,
+ 227, 165, 224, 191, 4, 75, 172, 16, 38, 141, 18, 210, 236, 59, 222, 207, 182, 215, 211,
+ 161, 188, 86, 217, 232, 215, 232, 200, 116, 0, 50, 17, 32, 89, 64, 42, 23, 0, 0, 0, 1,
+ 1, 54, 0, 12, 10, 40, 57, 16, 0, 55, 53, 61, 54, 56, 18, 14, 16, 18, 9}
+};
+
+int out_width = 90;
+int out_length = 59;
diff --git a/benchmarks/CHStone/jpeg/jfif_read.c b/benchmarks/CHStone/jpeg/jfif_read.c
new file mode 100755
index 0000000..c237344
--- /dev/null
+++ b/benchmarks/CHStone/jpeg/jfif_read.c
@@ -0,0 +1,109 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+/*
+ * Read the header information from buffer in JFIF format and begin decoding
+ *
+ * @(#) $Id: jfif_read.c,v 1.2 2003/07/18 10:19:21 honda Exp $
+ */
+
+/*
+ * Initialize after reading markers
+ */
+void
+jpeg_init_decompress ()
+{
+ int tmp;
+ /*
+ * Get MCU number
+ */
+ p_jinfo_MCUHeight = (p_jinfo_image_height - 1) / 8 + 1;
+ p_jinfo_MCUWidth = (p_jinfo_image_width - 1) / 8 + 1;
+ p_jinfo_NumMCU = p_jinfo_MCUHeight * p_jinfo_MCUWidth;
+
+ /*
+ * Create Huffman Table for decoding
+ */
+ tmp = huff_make_dhuff_tb (&p_jinfo_dc_xhuff_tbl_bits[0][0],
+ p_jinfo_dc_dhuff_tbl_ml[0],
+ &p_jinfo_dc_dhuff_tbl_maxcode[0][0],
+ &p_jinfo_dc_dhuff_tbl_mincode[0][0],
+ &p_jinfo_dc_dhuff_tbl_valptr[0][0]);
+ p_jinfo_dc_dhuff_tbl_ml[0] = tmp;
+ tmp = huff_make_dhuff_tb (&p_jinfo_dc_xhuff_tbl_bits[1][0],
+ p_jinfo_dc_dhuff_tbl_ml[1],
+ &p_jinfo_dc_dhuff_tbl_maxcode[1][0],
+ &p_jinfo_dc_dhuff_tbl_mincode[1][0],
+ &p_jinfo_dc_dhuff_tbl_valptr[1][0]);
+ p_jinfo_dc_dhuff_tbl_ml[1] = tmp;
+ tmp = huff_make_dhuff_tb (&p_jinfo_ac_xhuff_tbl_bits[0][0],
+ p_jinfo_ac_dhuff_tbl_ml[0],
+ &p_jinfo_ac_dhuff_tbl_maxcode[0][0],
+ &p_jinfo_ac_dhuff_tbl_mincode[0][0],
+ &p_jinfo_ac_dhuff_tbl_valptr[0][0]);
+ p_jinfo_ac_dhuff_tbl_ml[0] = tmp;
+ tmp = huff_make_dhuff_tb (&p_jinfo_ac_xhuff_tbl_bits[1][0],
+ p_jinfo_ac_dhuff_tbl_ml[1],
+ &p_jinfo_ac_dhuff_tbl_maxcode[1][0],
+ &p_jinfo_ac_dhuff_tbl_mincode[1][0],
+ &p_jinfo_ac_dhuff_tbl_valptr[1][0]);
+ p_jinfo_ac_dhuff_tbl_ml[1] = tmp;
+}
+
+
+
+void
+jpeg_read (unsigned char *read_buf)
+{
+
+ /*
+ * Read markers
+ */
+ read_markers (read_buf);
+
+
+ /*
+ * Initialize the information used for decoding
+ */
+ jpeg_init_decompress ();
+
+ /*
+ * Start decoding
+ */
+ decode_start (&OutData_image_width, &OutData_image_height,
+ &OutData_comp_vpos[0], &OutData_comp_hpos[0]);
+
+}
diff --git a/benchmarks/CHStone/jpeg/jpeg2bmp.c b/benchmarks/CHStone/jpeg/jpeg2bmp.c
new file mode 100755
index 0000000..b71c98d
--- /dev/null
+++ b/benchmarks/CHStone/jpeg/jpeg2bmp.c
@@ -0,0 +1,87 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+/*
+ * Transformation: JPEG -> BMP
+ *
+ * @(#) $Id: jpeg2bmp.c,v 1.2 2003/07/18 10:19:21 honda Exp $
+ */
+
+/*
+ * Buffer for reading JPEG file
+ */
+unsigned char JpegFileBuf[JPEG_FILE_SIZE];
+
+
+int
+jpeg2bmp_main ()
+{
+ int ci;
+ unsigned char *c;
+ int i, j;
+
+ /*
+ * Store input data in buffer
+ */
+ c = JpegFileBuf;
+ for (i = 0; i < JPEGSIZE; i++)
+
+ { ci = hana_jpg[i];
+ *c++ = ci;
+ }
+
+ jpeg_read (JpegFileBuf);
+
+ for (i = 0; i < RGB_NUM; i++)
+ {
+ for (j = 0; j < BMP_OUT_SIZE; j++)
+ {
+ if (OutData_comp_buf[i][j] != hana_bmp[i][j])
+ {
+ main_result++;
+ }
+ }
+ }
+ if (OutData_image_width != out_width)
+ {
+ main_result++;
+ }
+ if (OutData_image_height != out_length)
+ {
+ main_result++;
+ }
+ return (0);
+}
diff --git a/benchmarks/CHStone/jpeg/main.c b/benchmarks/CHStone/jpeg/main.c
new file mode 100755
index 0000000..91696ff
--- /dev/null
+++ b/benchmarks/CHStone/jpeg/main.c
@@ -0,0 +1,60 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "global.h"
+#include "decode.h"
+#include "init.h"
+#include "marker.c"
+#include "chenidct.c"
+#include "huffman.h"
+#include "decode.c"
+#include "huffman.c"
+#include "jfif_read.c"
+#include "jpeg2bmp.c"
+
+int
+main ()
+{
+ main_result = 0;
+ jpeg2bmp_main ();
+
+ printf ("%d\n", main_result);
+
+ return main_result;
+}
diff --git a/benchmarks/CHStone/jpeg/marker.c b/benchmarks/CHStone/jpeg/marker.c
new file mode 100755
index 0000000..4880265
--- /dev/null
+++ b/benchmarks/CHStone/jpeg/marker.c
@@ -0,0 +1,612 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/*
+ * Read the head of the marker
+ *
+ * @(#) $Id: marker.c,v 1.2 2003/07/18 10:19:21 honda Exp $
+ */
+/*************************************************************
+Copyright (C) 1990, 1991, 1993 Andy C. Hung, all rights reserved.
+PUBLIC DOMAIN LICENSE: Stanford University Portable Video Research
+Group. If you use this software, you agree to the following: This
+program package is purely experimental, and is licensed "as is".
+Permission is granted to use, modify, and distribute this program
+without charge for any purpose, provided this license/ disclaimer
+notice appears in the copies. No warranty or maintenance is given,
+either expressed or implied. In no event shall the author(s) be
+liable to you or a third party for any special, incidental,
+consequential, or other damages, arising out of the use or inability
+to use the program for any purpose (or the loss of data), even if we
+have been advised of such possibilities. Any public reference or
+advertisement of this source code should refer to it as the Portable
+Video Research Group (PVRG) code, and not by any author(s) (or
+Stanford University) name.
+*************************************************************/
+/*
+************************************************************
+marker.c
+
+This file contains the Marker library which uses the direct buffer
+access routines bgetc...
+
+************************************************************
+*/
+
+/* Only for the marker needed at the baseline */
+/* JPEG marker codes */
+#define M_SOI 0xd8 /* Start of Image */
+#define M_SOF0 0xc0 /* Baseline DCT ( Huffman ) */
+#define M_SOS 0xda /* Start of Scan ( Head of Compressed Data ) */
+#define M_DHT 0xc4 /* Huffman Table */
+#define M_DQT 0xdb /* Quantization Table */
+#define M_EOI 0xd9 /* End of Image */
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) for "read_markers" |
+| out_unread_marker : expected output data |
++--------------------------------------------------------------------------+
+*/
+#define READ_MARKERS_REP 10
+int i_marker = 0;
+const int out_unread_marker[READ_MARKERS_REP] =
+ { 0xd8, 0xe0, 0xdb, 0xdb, 0xc0, 0xc4, 0xc4, 0xc4, 0xc4, 0xda };
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) for "get_sof" |
+| out_length_get_sof : expected output data |
+| out_data_precision_get_sof : expected output data |
+| out_p_jinfo_image_height_get_sof : expected output data |
+| out_p_jinfo_image_width_get_sof : expected output data |
+| out_p_jinfo_num_components_get_sof : expected output data |
+| out_index_get_sof : expected output data |
+| out_id_get_sof : expected output data |
+| out_h_samp_factor_get_sof : expected output data |
+| out_v_samp_factor_get_sof : expected output data |
+| out_quant_tbl_no_get_sof : expected output data |
++--------------------------------------------------------------------------+
+*/
+#define GET_SOF_REP 3
+int out_length_get_sof = 17;
+int out_data_precision_get_sof = 8;
+int out_p_jinfo_image_height_get_sof = 59;
+int out_p_jinfo_image_width_get_sof = 90;
+int out_p_jinfo_num_components_get_sof = 3;
+const int out_index_get_sof[GET_SOF_REP] = { 0, 1, 2 };
+const int out_id_get_sof[GET_SOF_REP] = { 1, 2, 3 };
+const int out_h_samp_factor_get_sof[GET_SOF_REP] = { 2, 1, 1 };
+const int out_v_samp_factor_get_sof[GET_SOF_REP] = { 2, 1, 1 };
+const int out_quant_tbl_no_get_sof[GET_SOF_REP] = { 0, 1, 1 };
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) for "get_sos" |
+| out_length_get_sos : expected output data |
+| out_num_comp_get_sos : expected output data |
+| out_comp_id_get_sos : expected output data |
+| out_dc_tbl_no_get_sos : expected output data |
+| out_ac_tbl_no_get_sos : expected output data |
++--------------------------------------------------------------------------+
+*/
+#define GET_SOS_REP 3
+int i_get_sos = 0;
+int out_length_get_sos = 12;
+int out_num_comp_get_sos = 3;
+const int out_comp_id_get_sos[GET_SOS_REP] = { 1, 2, 3 };
+const int out_dc_tbl_no_get_sos[GET_SOS_REP] = { 0, 1, 1 };
+const int out_ac_tbl_no_get_sos[GET_SOS_REP] = { 0, 1, 1 };
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) for "get_dht" |
+| out_length_get_dht : expected output data |
+| out_index_get_dht : expected output data |
+| out_count_get_dht : expected output data |
++--------------------------------------------------------------------------+
+*/
+#define GET_DHT_REP 4
+int i_get_dht = 0;
+const int out_length_get_dht[GET_DHT_REP] = { 29, 179, 29, 179 };
+const int out_index_get_dht[GET_DHT_REP] = { 0x0, 0x10, 0x1, 0x11 };
+const int out_count_get_dht[GET_DHT_REP] = { 12, 162, 12, 162 };
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) for "get_dqt" |
+| out_length_get_dqt : expected output data |
+| out_prec_get_dht : expected output data |
+| out_num_get_dht : expected output data |
++--------------------------------------------------------------------------+
+*/
+#define GET_DQT_REP 2
+int i_get_dqt = 0;
+const int out_length_get_dqt[GET_DQT_REP] = { 65, 65 };
+const int out_prec_get_dht[GET_DQT_REP] = { 0, 0 };
+const int out_num_get_dht[GET_DQT_REP] = { 0, 1 };
+
+
+/*
+ * Initialize Quantization Table
+ */
+const int izigzag_index[64] = { 0, 1, 8, 16, 9, 2, 3, 10,
+ 17, 24, 32, 25, 18, 11, 4, 5,
+ 12, 19, 26, 33, 40, 48, 41, 34,
+ 27, 20, 13, 6, 7, 14, 21, 28,
+ 35, 42, 49, 56, 57, 50, 43, 36,
+ 29, 22, 15, 23, 30, 37, 44, 51,
+ 58, 59, 52, 45, 38, 31, 39, 46,
+ 53, 60, 61, 54, 47, 55, 62, 63
+};
+
+
+/*
+ * Read Buffer
+ */
+static unsigned char *ReadBuf;
+
+
+/*
+ * Read from Buffer
+ */
+int
+read_byte (void)
+{
+ return *ReadBuf++;
+}
+
+
+short
+read_word (void)
+{
+ short c;
+
+ c = *ReadBuf++ << 8;
+ c |= *ReadBuf++;
+
+ return c;
+}
+
+int
+first_marker (void)
+{
+ int c1, c2;
+ c1 = read_byte ();
+ c2 = read_byte ();
+
+ if (c1 != 0xFF || c2 != M_SOI)
+ {
+ main_result++;
+ printf ("Not Jpeg File!\n");
+ EXIT;
+ }
+
+ return c2;
+}
+
+
+int
+next_marker (void)
+{
+ int c;
+
+ for (;;)
+ {
+ c = read_byte ();
+
+ while (c != 0xff)
+ c = read_byte ();
+
+ do
+ {
+ c = read_byte ();
+ }
+ while (c == 0xff);
+ if (c != 0)
+ break;
+ }
+ return c;
+}
+
+
+/*
+ * Baseline DCT ( Huffman )
+ */
+void
+get_sof ()
+{
+ int ci, c;
+ int length;
+ char *p_comp_info_index;
+ char *p_comp_info_id;
+ char *p_comp_info_h_samp_factor;
+ char *p_comp_info_v_samp_factor;
+ char *p_comp_info_quant_tbl_no;
+
+ length = read_word ();
+ p_jinfo_data_precision = read_byte ();
+ p_jinfo_image_height = read_word ();
+ p_jinfo_image_width = read_word ();
+ p_jinfo_num_components = read_byte ();
+
+ printf ("length = %d\n", length);
+ printf ("data_precision = %d\n", p_jinfo_data_precision);
+ printf ("image_height = %d\n", p_jinfo_image_height);
+ printf ("image_width = %d\n", p_jinfo_image_width);
+ printf ("num_components = %d\n", p_jinfo_num_components);
+
+ if (length != out_length_get_sof)
+ {
+ main_result++;
+ }
+ if (p_jinfo_data_precision != out_data_precision_get_sof)
+ {
+ main_result++;
+ }
+ if (p_jinfo_image_height != out_p_jinfo_image_height_get_sof)
+ {
+ main_result++;
+ }
+ if (p_jinfo_image_width != out_p_jinfo_image_width_get_sof)
+ {
+ main_result++;
+ }
+ if (p_jinfo_num_components != out_p_jinfo_num_components_get_sof)
+ {
+ main_result++;
+ }
+
+ length -= 8;
+
+ /* Omit error check */
+
+ /* Check components */
+ for (ci = 0; ci < p_jinfo_num_components; ci++)
+ {
+ p_comp_info_index = &p_jinfo_comps_info_index[ci];
+ p_comp_info_id = &p_jinfo_comps_info_id[ci];
+ p_comp_info_h_samp_factor = &p_jinfo_comps_info_h_samp_factor[ci];
+ p_comp_info_v_samp_factor = &p_jinfo_comps_info_v_samp_factor[ci];
+ p_comp_info_quant_tbl_no = &p_jinfo_comps_info_quant_tbl_no[ci];
+
+ *p_comp_info_index = ci;
+ *p_comp_info_id = read_byte ();
+ c = read_byte ();
+ *p_comp_info_h_samp_factor = (c >> 4) & 15;
+ *p_comp_info_v_samp_factor = (c) & 15;
+ *p_comp_info_quant_tbl_no = read_byte ();
+
+ printf (" index = %d\n", *p_comp_info_index);
+ printf (" id = %d\n", *p_comp_info_id);
+ printf (" h_samp_factor = %d\n", *p_comp_info_h_samp_factor);
+ printf (" v_samp_factor = %d\n", *p_comp_info_v_samp_factor);
+ printf (" quant_tbl_no = %d\n\n", *p_comp_info_quant_tbl_no);
+
+ if (*p_comp_info_index != out_index_get_sof[ci])
+ {
+ main_result++;
+ }
+ if (*p_comp_info_id != out_id_get_sof[ci])
+ {
+ main_result++;
+ }
+ if (*p_comp_info_h_samp_factor != out_h_samp_factor_get_sof[ci])
+ {
+ main_result++;
+ }
+ if (*p_comp_info_v_samp_factor != out_v_samp_factor_get_sof[ci])
+ {
+ main_result++;
+ }
+ if (*p_comp_info_quant_tbl_no != out_quant_tbl_no_get_sof[ci])
+ {
+ main_result++;
+ }
+
+ }
+
+ /*
+ * Determine Sampling Factor
+ * Only 1_1_1 and 4_1_1 are supported
+ */
+ if (p_jinfo_comps_info_h_samp_factor[0] == 2)
+ {
+ p_jinfo_smp_fact = SF4_1_1;
+ printf ("\nSampling Factor is 4:1:1\n");
+ }
+ else
+ {
+ p_jinfo_smp_fact = SF1_1_1;
+ printf ("\nSampling Factor is 1:1:1\n");
+ }
+}
+
+
+void
+get_sos ()
+{
+ int length, num_comp;
+ int i, c, cc, ci, j;
+ char *p_comp_info_id;
+ char *p_comp_info_dc_tbl_no;
+ char *p_comp_info_ac_tbl_no;
+
+ length = read_word ();
+ num_comp = read_byte ();
+
+ printf (" length = %d\n", length);
+ printf (" num_comp = %d\n", num_comp);
+
+ if (length != out_length_get_sos)
+ {
+ main_result++;
+ }
+ if (num_comp != out_num_comp_get_sos)
+ {
+ main_result++;
+ }
+
+ /* Decode each component */
+ for (i = 0; i < num_comp; i++)
+ {
+ cc = read_byte ();
+ c = read_byte ();
+
+ for (ci = 0; ci < p_jinfo_num_components; ci++)
+ {
+ p_comp_info_id = &p_jinfo_comps_info_id[ci];
+ p_comp_info_dc_tbl_no = &p_jinfo_comps_info_dc_tbl_no[ci];
+ p_comp_info_ac_tbl_no = &p_jinfo_comps_info_ac_tbl_no[ci];
+
+ if (cc == *p_comp_info_id)
+ goto id_found;
+ }
+ main_result++;
+ printf ("Bad Component ID!\n");
+ EXIT;
+
+ id_found:
+ *p_comp_info_dc_tbl_no = (c >> 4) & 15;
+ *p_comp_info_ac_tbl_no = (c) & 15;
+
+ printf (" comp_id = %d\n", cc);
+ printf (" dc_tbl_no = %d\n", *p_comp_info_dc_tbl_no);
+ printf (" ac_tbl_no = %d\n", *p_comp_info_ac_tbl_no);
+
+ if (cc != out_comp_id_get_sos[i_get_sos])
+ {
+ main_result++;
+ }
+ if (*p_comp_info_dc_tbl_no != out_dc_tbl_no_get_sos[i_get_sos])
+ {
+ main_result++;
+ }
+ if (*p_comp_info_ac_tbl_no != out_ac_tbl_no_get_sos[i_get_sos])
+ {
+ main_result++;
+ }
+ i_get_sos++;
+
+ }
+
+ /* Pass parameters; Ss, Se, Ah and Al for progressive JPEG */
+ j = 3;
+ while (j--)
+ {
+ c = read_byte ();
+ }
+
+ /*
+ * Define the Buffer at this point as the head of data
+ */
+ p_jinfo_jpeg_data = ReadBuf;
+
+}
+
+
+/*
+ * Get Huffman Table
+ */
+void
+get_dht ()
+{
+ int length;
+ int index, i, count;
+ int *p_xhtbl_bits;
+ int *p_xhtbl_huffval;
+
+ length = read_word ();
+ length -= 2;
+
+ printf (" length = %d\n", length);
+
+ if (length != out_length_get_dht[i_get_dht])
+ {
+ main_result++;
+ }
+
+ while (length > 16)
+ {
+ index = read_byte ();
+
+ printf (" index = 0x%x\n", index);
+
+ if (index != out_index_get_dht[i_get_dht])
+ {
+ main_result++;
+}
+
+ if (index & 0x10)
+ {
+ /* AC */
+ index -= 0x10;
+ p_xhtbl_bits = p_jinfo_ac_xhuff_tbl_bits[index];
+ p_xhtbl_huffval = p_jinfo_ac_xhuff_tbl_huffval[index];
+ }
+ else
+ {
+ /* DC */
+ p_xhtbl_bits = p_jinfo_dc_xhuff_tbl_bits[index];
+ p_xhtbl_huffval = p_jinfo_dc_xhuff_tbl_huffval[index];
+ }
+
+ count = 0;
+
+ for (i = 1; i <= 16; i++)
+ {
+ p_xhtbl_bits[i] = read_byte ();
+ count += p_xhtbl_bits[i];
+ }
+
+ printf (" count = %d\n", count);
+
+ if (count != out_count_get_dht[i_get_dht])
+ {
+ main_result++;
+ }
+ i_get_dht++;
+
+ length -= 1 + 16;
+
+ for (i = 0; i < count; i++)
+ {
+ p_xhtbl_huffval[i] = read_byte ();
+ }
+
+ length -= count;
+ }
+}
+
+
+void
+get_dqt ()
+{
+ int length;
+ int prec, num, i;
+ unsigned int tmp;
+ unsigned int *p_quant_tbl;
+
+ length = read_word ();
+ length -= 2;
+
+ printf (" length = %d\n", length);
+
+ if (length != out_length_get_dqt[i_get_dqt])
+ {
+ main_result++;
+ }
+
+ while (length > 0)
+ {
+ num = read_byte ();
+ /* Precision 0:8bit, 1:16bit */
+ prec = num >> 4;
+ /* Table Number */
+ num &= 0x0f;
+
+ printf (" prec = %d\n", prec);
+ printf (" num = %d\n", num);
+
+ if (prec != out_prec_get_dht[i_get_dqt])
+ {
+ main_result++;
+ }
+ if (num != out_num_get_dht[i_get_dqt])
+ {
+ main_result++;
+ }
+ i_get_dqt++;
+
+ p_quant_tbl = &p_jinfo_quant_tbl_quantval[num][DCTSIZE2];
+ for (i = 0; i < DCTSIZE2; i++)
+ {
+ if (prec)
+ tmp = read_word ();
+ else
+ tmp = read_byte ();
+ p_quant_tbl[izigzag_index[i]] = (unsigned short) tmp;
+ }
+
+ length -= DCTSIZE2 + 1;
+ if (prec)
+ length -= DCTSIZE2;
+ }
+}
+
+
+
+void
+read_markers (unsigned char *buf)
+{
+ int unread_marker;
+ int sow_SOI;
+
+ ReadBuf = buf;
+
+ sow_SOI = 0;
+
+ unread_marker = 0;
+
+ /* Read the head of the marker */
+ for (;;)
+ {
+ if (!sow_SOI)
+ {
+ unread_marker = first_marker ();
+ }
+ else
+ {
+ unread_marker = next_marker ();
+ }
+
+ printf ("\nmarker = 0x%x\n", unread_marker);
+
+ if (unread_marker != out_unread_marker[i_marker++])
+ {
+ main_result++;
+ }
+
+
+ switch (unread_marker)
+ {
+ case M_SOI: /* Start of Image */
+ sow_SOI = 1;
+ break;
+
+ case M_SOF0: /* Baseline DCT ( Huffman ) */
+ get_sof ();
+ break;
+
+ case M_SOS: /* Start of Scan ( Head of Compressed Data ) */
+ get_sos ();
+ return;
+
+ case M_DHT:
+ get_dht ();
+ break;
+
+ case M_DQT:
+ get_dqt ();
+ break;
+
+ case M_EOI:
+ return;
+ }
+ }
+}
diff --git a/benchmarks/CHStone/mips/imem.h b/benchmarks/CHStone/mips/imem.h
new file mode 100755
index 0000000..322d6b2
--- /dev/null
+++ b/benchmarks/CHStone/mips/imem.h
@@ -0,0 +1,82 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+const unsigned long 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
+};
diff --git a/benchmarks/CHStone/mips/mips.c b/benchmarks/CHStone/mips/mips.c
new file mode 100755
index 0000000..09591fe
--- /dev/null
+++ b/benchmarks/CHStone/mips/mips.c
@@ -0,0 +1,306 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+#include <stdio.h>
+int main_result;
+
+#define R 0
+
+#define ADDU 33
+#define SUBU 35
+
+#define MULT 24
+#define MULTU 25
+
+#define MFHI 16
+#define MFLO 18
+
+#define AND 36
+#define OR 37
+#define XOR 38
+#define SLL 0
+#define SRL 2
+#define SLLV 4
+#define SRLV 6
+
+#define SLT 42
+#define SLTU 43
+
+#define JR 8
+
+#define J 2
+#define JAL 3
+
+#define ADDIU 9
+#define ANDI 12
+#define ORI 13
+#define XORI 14
+
+#define LW 35
+#define SW 43
+#define LUI 15
+
+#define BEQ 4
+#define BNE 5
+#define BGEZ 1
+
+#define SLTI 10
+#define SLTIU 11
+
+#include "imem.h"
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) |
+| A : input data |
+| 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;
+ int reg[32];
+ int Hi = 0;
+ int Lo = 0;
+ int pc = 0;
+ int dmem[64];
+ int j;
+
+ unsigned int ins;
+ int op;
+ int rs;
+ int rt;
+ int rd;
+ int shamt;
+ int funct;
+ short address;
+ int tgtadr;
+
+ 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 < 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;
+ }
+}
diff --git a/benchmarks/CHStone/motion/config.h b/benchmarks/CHStone/motion/config.h
new file mode 100755
index 0000000..f638ac8
--- /dev/null
+++ b/benchmarks/CHStone/motion/config.h
@@ -0,0 +1,51 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* config.h, configuration defines */
+
+/* Copyright (C) 1996, MPEG Software Simulation Group. 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 MPEG Software Simulation Group 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.
+ *
+ * The MPEG Software Simulation Group does not represent or warrant that the
+ * programs furnished hereunder are free of infringement of any third-party
+ * patents.
+ *
+ * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware,
+ * are subject to royalty fees to patent holders. Many of these patents are
+ * general enough such that they are unavoidable regardless of implementation
+ * design.
+ *
+ */
+
+/* define NON_ANSI_COMPILER for compilers without function prototyping */
+/* #define NON_ANSI_COMPILER */
+
+#define _ANSI_ARGS_(x) x
diff --git a/benchmarks/CHStone/motion/getbits.c b/benchmarks/CHStone/motion/getbits.c
new file mode 100755
index 0000000..575bfb5
--- /dev/null
+++ b/benchmarks/CHStone/motion/getbits.c
@@ -0,0 +1,199 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* getbits.c, bit level routines */
+
+/*
+ * All modifications (mpeg2decode -> mpeg2play) are
+ * Copyright (C) 1996, Stefan Eckart. All Rights Reserved.
+ */
+
+/* Copyright (C) 1996, MPEG Software Simulation Group. 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 MPEG Software Simulation Group 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.
+ *
+ * The MPEG Software Simulation Group does not represent or warrant that the
+ * programs furnished hereunder are free of infringement of any third-party
+ * patents.
+ *
+ * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware,
+ * are subject to royalty fees to patent holders. Many of these patents are
+ * general enough such that they are unavoidable regardless of implementation
+ * design.
+ *
+ */
+
+
+/* initialize buffer, call once before first getbits or showbits */
+int
+read (unsigned char *s1, const unsigned char *s2, int n)
+{
+ unsigned char *p1;
+ const unsigned char *p2;
+ int n_tmp;
+
+p1 = s1;
+ p2 = s2;
+ n_tmp = n;
+
+while (n_tmp-- > 0)
+ {
+ *p1 = *p2;
+
+p1++;
+
+p2++;
+
+}
+
+return n;
+}
+
+void
+Fill_Buffer ()
+{
+ int Buffer_Level;
+ unsigned char *p;
+ p = ld_Rdbfr;
+
+
+ Buffer_Level = read (ld_Rdbfr, inRdbfr, 2048);
+ ld_Rdptr = ld_Rdbfr;
+
+ if (System_Stream_Flag)
+ ld_Rdmax -= 2048;
+
+
+ /* end of the bitstream file */
+ if (Buffer_Level < 2048)
+ {
+ /* just to be safe */
+ if (Buffer_Level < 0)
+ Buffer_Level = 0;
+
+ /* pad until the next to the next 32-bit word boundary */
+ while (Buffer_Level & 3)
+ ld_Rdbfr[Buffer_Level++] = 0;
+
+ /* pad the buffer with sequence end codes */
+ while (Buffer_Level < 2048)
+ {
+ ld_Rdbfr[Buffer_Level++] = SEQUENCE_END_CODE >> 24;
+ ld_Rdbfr[Buffer_Level++] = SEQUENCE_END_CODE >> 16;
+ ld_Rdbfr[Buffer_Level++] = SEQUENCE_END_CODE >> 8;
+ ld_Rdbfr[Buffer_Level++] = SEQUENCE_END_CODE & 0xff;
+ }
+ }
+}
+
+unsigned int
+Show_Bits (N)
+ int N;
+{
+ return ld_Bfr >> (unsigned)(32-N)%32;
+}
+
+
+/* return next bit (could be made faster than Get_Bits(1)) */
+
+unsigned int
+Get_Bits1 ()
+{
+ return Get_Bits (1);
+}
+
+
+/* advance by n bits */
+
+void
+Flush_Buffer (N)
+ int N;
+{
+ int Incnt;
+
+#ifdef RAND_VAL
+ /* N is between 0 and 20 with realistic input sets, while it may become larger than the width of the integer type when using randomly generated input sets which are used in the contained input set. The following is to avoid this. */
+ ld_Bfr <<= (N%20);
+#else
+ ld_Bfr <<= N;
+#endif
+
+ Incnt = ld_Incnt -= N;
+
+ if (Incnt <= 24)
+ {
+ if (ld_Rdptr < ld_Rdbfr + 2044)
+ {
+ do
+ {
+#ifdef RAND_VAL
+ /* N is between 0 and 20 with realistic input sets, while it may become larger than the width of the integer type when using randomly generated input sets which are used in the contained input set. The following is to avoid this. */
+ ld_Bfr |= *ld_Rdptr++ << ((24 - Incnt)%20);
+#else
+ ld_Bfr |= *ld_Rdptr++ << (24 - Incnt);
+#endif
+ Incnt += 8;
+ }
+ while (Incnt <= 24);
+ }
+ else
+ {
+ do
+ {
+ if (ld_Rdptr >= ld_Rdbfr + 2048)
+ Fill_Buffer ();
+#ifdef RAND_VAL
+ /* N is between 0 and 20 with realistic input sets, while it may become larger than the width of the integer type when using randomly generated input sets which are used in the contained input set. The following is to avoid this. */
+ ld_Bfr |= *ld_Rdptr++ << ((24 - Incnt)%20);
+#else
+ ld_Bfr |= *ld_Rdptr++ << (24 - Incnt);
+#endif
+ Incnt += 8;
+ }
+ while (Incnt <= 24);
+ }
+ ld_Incnt = Incnt;
+ }
+}
+
+
+/* return next n bits (right adjusted) */
+
+unsigned int
+Get_Bits (N)
+ int N;
+{
+ unsigned int Val;
+
+ Val = Show_Bits (N);
+ Flush_Buffer (N);
+
+ return Val;
+}
diff --git a/benchmarks/CHStone/motion/getvlc.c b/benchmarks/CHStone/motion/getvlc.c
new file mode 100755
index 0000000..a6835c6
--- /dev/null
+++ b/benchmarks/CHStone/motion/getvlc.c
@@ -0,0 +1,94 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* getvlc.c, variable length decoding */
+
+/* Copyright (C) 1996, MPEG Software Simulation Group. 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 MPEG Software Simulation Group 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.
+ *
+ * The MPEG Software Simulation Group does not represent or warrant that the
+ * programs furnished hereunder are free of infringement of any third-party
+ * patents.
+ *
+ * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware,
+ * are subject to royalty fees to patent holders. Many of these patents are
+ * general enough such that they are unavoidable regardless of implementation
+ * design.
+ *
+ */
+
+int
+Get_motion_code ()
+{
+ int code;
+
+ if (Get_Bits1 ())
+ {
+ return 0;
+ }
+
+ if ((code = Show_Bits (9)) >= 64)
+ {
+ code >>= 6;
+ Flush_Buffer (MVtab0[code][1]);
+
+ return Get_Bits1 ()? -MVtab0[code][0] : MVtab0[code][0];
+ }
+
+ if (code >= 24)
+ {
+ code >>= 3;
+ Flush_Buffer (MVtab1[code][1]);
+
+ return Get_Bits1 ()? -MVtab1[code][0] : MVtab1[code][0];
+ }
+
+ if ((code -= 12) < 0)
+ return 0;
+
+ Flush_Buffer (MVtab2[code][1]);
+ return Get_Bits1 ()? -MVtab2[code][0] : MVtab2[code][0];
+}
+
+/* get differential motion vector (for dual prime prediction) */
+int
+Get_dmvector ()
+{
+
+ if (Get_Bits (1))
+ {
+ return Get_Bits (1) ? -1 : 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
diff --git a/benchmarks/CHStone/motion/getvlc.h b/benchmarks/CHStone/motion/getvlc.h
new file mode 100755
index 0000000..b20aabe
--- /dev/null
+++ b/benchmarks/CHStone/motion/getvlc.h
@@ -0,0 +1,73 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* getvlc.h, variable length code tables */
+
+/* Copyright (C) 1996, MPEG Software Simulation Group. 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 MPEG Software Simulation Group 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.
+ *
+ * The MPEG Software Simulation Group does not represent or warrant that the
+ * programs furnished hereunder are free of infringement of any third-party
+ * patents.
+ *
+ * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware,
+ * are subject to royalty fees to patent holders. Many of these patents are
+ * general enough such that they are unavoidable regardless of implementation
+ * design.
+ *
+ */
+
+/* NOTE: #define constants such as MACROBLOCK_QUANT are upper case
+ as per C programming convention. However, the MPEG document
+ (ISO/IEC 13818-2) lists them in all lower case (e.g. Annex B) */
+
+/* NOTE: the VLC tables are in a flash format---a transformation
+ of the tables in Annex B to a form more convenient towards
+ parallel (more than one-bit-at-a-time) decoding */
+
+
+/* Table B-10, motion_code, codes 0001 ... 01xx */
+const char MVtab0[8][2] = {
+ {ERROR, 0}, {3, 3}, {2, 2}, {2, 2},
+ {1, 1}, {1, 1}, {1, 1}, {1, 1}
+};
+
+/* Table B-10, motion_code, codes 0000011 ... 000011x */
+const char MVtab1[8][2] = {
+ {ERROR, 0}, {ERROR, 0}, {ERROR, 0}, {7, 6},
+ {6, 6}, {5, 6}, {4, 5}, {4, 5}
+};
+
+/* Table B-10, motion_code, codes 0000001100 ... 000001011x */
+const char MVtab2[12][2] = {
+ {16, 9}, {15, 9}, {14, 9}, {13, 9}, {12, 9}, {11, 9},
+ {10, 8}, {10, 8}, {9, 8}, {9, 8}, {8, 8}, {8, 8}
+};
diff --git a/benchmarks/CHStone/motion/global.h b/benchmarks/CHStone/motion/global.h
new file mode 100755
index 0000000..1fe670b
--- /dev/null
+++ b/benchmarks/CHStone/motion/global.h
@@ -0,0 +1,80 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* global.h, global variables */
+
+/* Copyright (C) 1996, MPEG Software Simulation Group. 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 MPEG Software Simulation Group 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.
+ *
+ * The MPEG Software Simulation Group does not represent or warrant that the
+ * programs furnished hereunder are free of infringement of any third-party
+ * patents.
+ *
+ * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware,
+ * are subject to royalty fees to patent holders. Many of these patents are
+ * general enough such that they are unavoidable regardless of implementation
+ * design.
+ *
+ */
+
+#include "mpeg2dec.h"
+
+/* choose between declaration (GLOBAL undefined)
+ * and definition (GLOBAL defined)
+ * GLOBAL is defined in exactly one file mpeg2dec.c)
+ */
+
+
+/* Get_Bits.c */
+void Fill_Buffer _ANSI_ARGS_ ((void));
+unsigned int Show_Bits _ANSI_ARGS_ ((int n));
+unsigned int Get_Bits1 _ANSI_ARGS_ ((void));
+void Flush_Buffer _ANSI_ARGS_ ((int n));
+unsigned int Get_Bits _ANSI_ARGS_ ((int n));
+int Get_Byte _ANSI_ARGS_ ((void));
+
+/* getvlc.c */
+int Get_motion_code _ANSI_ARGS_ ((void));
+int Get_dmvector _ANSI_ARGS_ ((void));
+int Get_coded_block_pattern _ANSI_ARGS_ ((void));
+
+
+/* motion.c */
+void motion_vector
+_ANSI_ARGS_ ((int *PMV, int *dmvector, int h_r_size, int v_r_size, int dmv,
+ int mvscale, int full_pel_vector));
+
+int System_Stream_Flag;
+
+unsigned char ld_Rdbfr[2048];
+unsigned char *ld_Rdptr, *ld_Rdmax;
+unsigned int ld_Bfr;
+int ld_Incnt;
diff --git a/benchmarks/CHStone/motion/motion.c b/benchmarks/CHStone/motion/motion.c
new file mode 100755
index 0000000..8d490a0
--- /dev/null
+++ b/benchmarks/CHStone/motion/motion.c
@@ -0,0 +1,172 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+/* motion.c, motion vector decoding */
+
+/* Copyright (C) 1996, MPEG Software Simulation Group. 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 MPEG Software Simulation Group 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.
+ *
+ * The MPEG Software Simulation Group does not represent or warrant that the
+ * programs furnished hereunder are free of infringement of any third-party
+ * patents.
+ *
+ * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware,
+ * are subject to royalty fees to patent holders. Many of these patents are
+ * general enough such that they are unavoidable regardless of implementation
+ * design.
+ *
+ */
+
+/* private prototypes */
+static void decode_motion_vector
+_ANSI_ARGS_ ((int *pred, int r_size, int motion_code,
+ int motion_residualesidual, int full_pel_vector));
+
+/* ISO/IEC 13818-2 sections 6.2.5.2, 6.3.17.2, and 7.6.3: Motion vectors */
+void
+motion_vectors (PMV, dmvector, motion_vertical_field_select, s,
+ motion_vector_count, mv_format, h_r_size, v_r_size, dmv,
+ mvscale)
+ int PMV[2][2][2];
+ int dmvector[2];
+ int motion_vertical_field_select[2][2];
+ int s, motion_vector_count, mv_format, h_r_size, v_r_size, dmv, mvscale;
+{
+ if (motion_vector_count == 1)
+ {
+ if (mv_format == MV_FIELD && !dmv)
+ {
+ motion_vertical_field_select[1][s] =
+ motion_vertical_field_select[0][s] = Get_Bits (1);
+ }
+
+ motion_vector (PMV[0][s], dmvector, h_r_size, v_r_size, dmv, mvscale,
+ 0);
+
+ /* update other motion vector predictors */
+ PMV[1][s][0] = PMV[0][s][0];
+ PMV[1][s][1] = PMV[0][s][1];
+ }
+ else
+ {
+ motion_vertical_field_select[0][s] = Get_Bits (1);
+
+ motion_vector (PMV[0][s], dmvector, h_r_size, v_r_size, dmv, mvscale,
+ 0);
+
+ motion_vertical_field_select[1][s] = Get_Bits (1);
+
+ motion_vector (PMV[1][s], dmvector, h_r_size, v_r_size, dmv, mvscale,
+ 0);
+ }
+}
+
+/* get and decode motion vector and differential motion vector
+ for one prediction */
+void
+motion_vector (PMV, dmvector, h_r_size, v_r_size, dmv, mvscale,
+ full_pel_vector)
+ int *PMV;
+ int *dmvector;
+ int h_r_size;
+ int v_r_size;
+ int dmv; /* MPEG-2 only: get differential motion vectors */
+ int mvscale; /* MPEG-2 only: field vector in frame pic */
+ int full_pel_vector; /* MPEG-1 only */
+{
+ int motion_code;
+ int motion_residual;
+
+ /* horizontal component */
+ /* ISO/IEC 13818-2 Table B-10 */
+ motion_code = Get_motion_code ();
+
+ motion_residual = (h_r_size != 0
+ && motion_code != 0) ? Get_Bits (h_r_size) : 0;
+
+ decode_motion_vector (&PMV[0], h_r_size, motion_code, motion_residual,
+ full_pel_vector);
+
+ if (dmv)
+ dmvector[0] = Get_dmvector ();
+
+
+ /* vertical component */
+ motion_code = Get_motion_code ();
+ motion_residual = (v_r_size != 0
+ && motion_code != 0) ? Get_Bits (v_r_size) : 0;
+
+ if (mvscale)
+ PMV[1] >>= 1; /* DIV 2 */
+
+ decode_motion_vector (&PMV[1], v_r_size, motion_code, motion_residual,
+ full_pel_vector);
+
+ if (mvscale)
+ PMV[1] <<= 1;
+
+ if (dmv)
+ dmvector[1] = Get_dmvector ();
+
+}
+
+/* calculate motion vector component */
+/* ISO/IEC 13818-2 section 7.6.3.1: Decoding the motion vectors */
+/* Note: the arithmetic here is more elegant than that which is shown
+ in 7.6.3.1. The end results (PMV[][][]) should, however, be the same. */
+
+static void
+decode_motion_vector (pred, r_size, motion_code, motion_residual,
+ full_pel_vector)
+ int *pred;
+ int r_size, motion_code, motion_residual;
+ int full_pel_vector; /* MPEG-1 (ISO/IEC 11172-1) support */
+{
+ int lim, vec;
+
+ r_size = r_size % 32;
+ lim = 16 << r_size;
+ vec = full_pel_vector ? (*pred >> 1) : (*pred);
+
+ if (motion_code > 0)
+ {
+ vec += ((motion_code - 1) << r_size) + motion_residual + 1;
+ if (vec >= lim)
+ vec -= lim + lim;
+ }
+ else if (motion_code < 0)
+ {
+ vec -= ((-motion_code - 1) << r_size) + motion_residual + 1;
+ if (vec < -lim)
+ vec += lim + lim;
+ }
+ *pred = full_pel_vector ? (vec << 1) : vec;
+}
diff --git a/benchmarks/CHStone/motion/mpeg2.c b/benchmarks/CHStone/motion/mpeg2.c
new file mode 100755
index 0000000..0e06df8
--- /dev/null
+++ b/benchmarks/CHStone/motion/mpeg2.c
@@ -0,0 +1,395 @@
+/*
++--------------------------------------------------------------------------+
+| 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.
+ *
+ */
+#include <stdio.h>
+
+#define Num 2048
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) |
+| inRdbfr, inPMV, inPMV : input data |
+| outPMV, outmvfs : expected output data |
++--------------------------------------------------------------------------+
+*/
+const unsigned char inRdbfr[Num] = {
+ 0, 104, 120, 48, 72, 32, 160, 192, 192, 64, 56, 248, 248, 88, 136, 224, 200,
+ 208, 176, 72, 96, 40, 184, 160, 32, 32, 120, 168, 64, 32, 72, 184,
+ 216, 240, 0, 216, 192, 64, 112, 48, 160, 152, 40, 176, 32, 32, 248, 200,
+ 104, 24, 216, 240, 128, 176, 72, 232, 240, 184, 48, 120, 48, 192, 64, 168,
+ 160, 128, 160, 160, 232, 208, 104, 120, 232, 120, 8, 184, 120, 200, 64, 160,
+ 200, 224, 64, 168, 40, 120, 80, 104, 16, 0, 8, 120, 144, 136, 80, 144,
+ 72, 24, 128, 216, 216, 24, 80, 16, 64, 32, 200, 112, 128, 144, 88, 24, 112,
+ 120, 32, 104, 72, 176, 24, 16, 184, 56, 24, 200, 152, 152, 48, 48,
+ 136, 80, 240, 8, 216, 200, 240, 32, 168, 112, 48, 56, 40, 192, 232, 32, 48,
+ 232, 232, 32, 0, 88, 208, 24, 240, 72, 120, 96, 248, 136, 224, 208,
+ 8, 184, 192, 144, 88, 48, 144, 136, 112, 192, 96, 240, 200, 160, 184, 160,
+ 24, 48, 208, 152, 128, 184, 184, 144, 144, 168, 240, 144, 160, 168, 48,
+ 48,
+ 24, 200, 144, 120, 208, 56, 96, 72, 48, 88, 80, 200, 248, 208, 248, 40, 136,
+ 112, 32, 8, 8, 80, 192, 40, 32, 224, 56, 192, 200, 56, 56, 232,
+ 200, 80, 120, 8, 184, 216, 232, 80, 168, 128, 32, 216, 136, 104, 248, 168,
+ 248, 8, 192, 168, 192, 56, 240, 192, 208, 136, 120, 48, 224, 112, 168, 80,
+ 192, 96, 80, 120, 120, 16, 120, 48, 168, 168, 160, 224, 128, 24, 72, 24,
+ 248, 240, 152, 160, 208, 56, 192, 56, 88, 128, 192, 136, 128, 208, 112,
+ 40,
+ 64, 192, 32, 176, 80, 56, 168, 208, 24, 168, 168, 248, 240, 136, 96, 32, 56,
+ 184, 8, 136, 16, 0, 176, 40, 0, 32, 104, 160, 56, 88, 232, 56,
+ 0, 240, 184, 232, 88, 32, 176, 0, 216, 248, 184, 40, 16, 80, 8, 208, 64,
+ 224, 72, 40, 72, 72, 144, 80, 144, 120, 136, 64, 184, 160, 136, 16,
+ 48, 104, 232, 104, 104, 72, 208, 72, 192, 184, 40, 56, 232, 72, 160, 80,
+ 152, 232, 248, 32, 224, 40, 0, 168, 24, 96, 112, 160, 152, 8, 32, 160,
+ 104, 208, 32, 24, 248, 8, 248, 144, 120, 16, 192, 88, 152, 176, 200, 160,
+ 152, 160, 96, 168, 240, 16, 248, 176, 24, 216, 0, 56, 80, 248, 96, 8,
+ 128, 32, 192, 104, 48, 208, 240, 184, 128, 80, 56, 192, 0, 112, 176, 48, 96,
+ 56, 24, 56, 24, 32, 24, 96, 80, 0, 64, 112, 48, 24, 88, 56,
+ 152, 224, 160, 192, 184, 72, 248, 128, 8, 8, 104, 104, 200, 48, 136, 136,
+ 208, 144, 80, 40, 136, 96, 8, 208, 160, 104, 160, 80, 64, 96, 176, 144,
+ 8, 56, 88, 88, 208, 120, 48, 240, 240, 96, 248, 192, 104, 128, 248, 24, 104,
+ 72, 64, 120, 248, 192, 48, 192, 32, 80, 144, 16, 80, 96, 112, 184,
+ 56, 80, 248, 232, 0, 40, 248, 56, 192, 32, 192, 96, 248, 48, 136, 224, 80,
+ 0, 192, 128, 104, 120, 208, 128, 0, 176, 216, 8, 192, 96, 16, 40,
+ 184, 96, 32, 72, 80, 192, 104, 104, 136, 0, 16, 160, 24, 104, 48, 8, 24,
+ 152, 120, 128, 72, 32, 176, 112, 104, 120, 16, 32, 144, 160, 56, 240,
+ 0, 232, 184, 24, 16, 208, 200, 240, 200, 200, 104, 112, 24, 208, 128, 168,
+ 248, 64, 152, 120, 64, 224, 128, 208, 120, 216, 16, 152, 48, 144, 240, 80,
+ 144, 224, 48, 160, 192, 248, 0, 128, 120, 128, 160, 232, 168, 208, 112, 112,
+ 104, 184, 8, 192, 56, 176, 40, 96, 64, 72, 104, 216, 152, 216, 80, 152,
+ 184, 216, 32, 56, 32, 64, 240, 152, 240, 168, 136, 8, 232, 168, 128, 88, 72,
+ 128, 8, 192, 48, 120, 112, 32, 144, 208, 192, 216, 16, 176, 168, 160,
+ 168, 88, 136, 56, 8, 64, 0, 80, 216, 104, 64, 80, 88, 208, 64, 80, 200, 24,
+ 120, 160, 80, 72, 56, 216, 24, 56, 72, 40, 72, 0, 56, 136,
+ 56, 200, 72, 136, 88, 72, 136, 240, 0, 176, 176, 152, 192, 248, 224, 240,
+ 72, 8, 112, 232, 200, 120, 16, 0, 40, 48, 64, 72, 32, 136, 104, 152,
+ 16, 240, 184, 80, 0, 152, 32, 176, 128, 120, 0, 160, 40, 64, 112, 40, 80,
+ 48, 144, 96, 168, 0, 152, 72, 184, 136, 88, 152, 184, 48, 88, 152,
+ 96, 216, 240, 184, 200, 136, 64, 104, 112, 232, 0, 208, 176, 128, 112, 248,
+ 144, 248, 120, 112, 0, 120, 240, 88, 88, 88, 8, 248, 80, 8, 64, 216,
+ 240, 56, 56, 144, 112, 208, 144, 72, 16, 160, 136, 216, 176, 112, 56, 8,
+ 168, 104, 72, 40, 176, 88, 40, 120, 24, 40, 56, 104, 40, 160, 232, 160,
+ 24, 144, 144, 232, 120, 144, 112, 96, 136, 176, 8, 128, 112, 184, 96, 120,
+ 64, 112, 0, 184, 80, 72, 184, 80, 144, 72, 120, 200, 168, 32, 24, 0,
+ 144, 72, 24, 248, 24, 152, 72, 128, 0, 8, 224, 32, 72, 72, 48, 112, 232, 16,
+ 240, 24, 64, 32, 232, 120, 168, 200, 152, 112, 8, 144, 0, 120,
+ 112, 0, 112, 144, 72, 160, 24, 216, 112, 128, 224, 152, 104, 136, 40, 0, 16,
+ 144, 48, 248, 136, 48, 64, 88, 152, 208, 248, 16, 112, 224, 184, 168,
+ 40, 168, 64, 248, 144, 104, 200, 144, 152, 16, 168, 192, 240, 96, 72, 136,
+ 216, 136, 0, 32, 192, 112, 240, 160, 248, 184, 16, 48, 232, 88, 160, 16,
+ 104, 176, 144, 136, 24, 240, 184, 160, 8, 16, 32, 56, 176, 144, 168, 168,
+ 56, 88, 88, 104, 248, 184, 96, 32, 128, 88, 224, 240, 32, 120, 216, 136,
+ 8, 72, 80, 104, 120, 152, 32, 96, 232, 80, 232, 24, 80, 200, 208, 216, 184,
+ 16, 56, 40, 216, 208, 128, 120, 16, 16, 80, 200, 144, 104, 160, 72,
+ 24, 136, 176, 32, 192, 120, 136, 80, 16, 88, 208, 160, 16, 232, 40, 24, 144,
+ 208, 32, 16, 88, 192, 48, 176, 152, 24, 160, 32, 80, 24, 240, 80,
+ 160, 152, 160, 128, 80, 88, 40, 184, 208, 144, 48, 200, 200, 48, 112, 144,
+ 104, 224, 144, 224, 200, 8, 224, 240, 32, 152, 232, 16, 8, 80, 184, 40,
+ 184, 248, 64, 8, 232, 16, 88, 88, 8, 120, 128, 48, 240, 88, 64, 104, 104,
+ 248, 96, 240, 192, 152, 208, 56, 152, 240, 136, 8, 216, 24, 112, 168,
+ 88, 136, 80, 224, 136, 152, 40, 24, 248, 216, 152, 136, 96, 224, 64, 80, 56,
+ 56, 72, 8, 24, 64, 144, 24, 208, 216, 128, 120, 96, 168, 120, 152,
+ 112, 232, 136, 80, 72, 96, 152, 208, 72, 216, 64, 120, 120, 48, 232, 72,
+ 184, 176, 48, 232, 200, 184, 120, 72, 112, 128, 248, 160, 168, 216, 152,
+ 80,
+ 176, 112, 48, 152, 112, 64, 40, 200, 232, 80, 160, 56, 216, 192, 168, 72,
+ 40, 64, 208, 32, 224, 240, 24, 104, 232, 240, 168, 24, 248, 32, 80, 152,
+ 144, 160, 112, 120, 96, 240, 64, 160, 248, 248, 152, 48, 112, 88, 128, 232,
+ 240, 240, 232, 168, 120, 32, 152, 176, 104, 16, 80, 152, 240, 224, 128,
+ 16,
+ 48, 32, 216, 8, 104, 248, 184, 208, 216, 120, 80, 208, 128, 56, 112, 40,
+ 184, 16, 224, 168, 152, 248, 56, 144, 168, 224, 8, 168, 80, 136, 152, 48,
+ 96, 0, 184, 88, 192, 24, 16, 128, 0, 176, 152, 40, 96, 72, 192, 0, 32, 128,
+ 24, 240, 48, 248, 176, 120, 16, 168, 224, 72, 8, 200, 48, 176,
+ 112, 224, 160, 8, 152, 64, 16, 16, 240, 224, 64, 144, 128, 80, 184, 40, 232,
+ 200, 112, 248, 24, 112, 176, 128, 128, 56, 40, 152, 24, 184, 120, 104,
+ 72, 64, 200, 48, 224, 0, 56, 232, 32, 240, 184, 104, 104, 32, 192, 200, 200,
+ 64, 152, 72, 216, 216, 80, 0, 80, 0, 0, 160, 120, 40, 136, 240,
+ 32, 120, 152, 216, 56, 112, 16, 24, 8, 120, 104, 192, 144, 176, 8, 16, 96,
+ 104, 168, 80, 192, 232, 112, 112, 56, 88, 176, 240, 32, 176, 248, 80,
+ 176, 24, 224, 192, 8, 176, 168, 16, 232, 248, 16, 16, 104, 128, 232, 0, 32,
+ 240, 112, 32, 184, 184, 56, 232, 80, 144, 16, 72, 240, 208, 64, 176,
+ 240, 16, 136, 16, 80, 192, 24, 72, 216, 56, 80, 216, 32, 144, 72, 24, 64,
+ 248, 0, 224, 72, 32, 136, 232, 240, 72, 32, 88, 128, 104, 16, 8,
+ 32, 192, 224, 8, 152, 248, 224, 0, 176, 48, 16, 104, 216, 176, 24, 240, 200,
+ 80, 248, 208, 128, 200, 72, 8, 152, 128, 80, 120, 80, 152, 232, 200,
+ 168, 88, 16, 176, 232, 40, 72, 208, 232, 112, 240, 112, 80, 176, 176, 16,
+ 72, 120, 32, 184, 224, 80, 24, 176, 0, 208, 16, 56, 112, 16, 120, 160,
+ 24, 216, 128, 136, 192, 152, 248, 120, 160, 56, 192, 224, 0, 136, 112, 112,
+ 8, 8, 184, 168, 88, 160, 120, 160, 240, 168, 32, 40, 168, 88, 8, 16,
+ 24, 104, 104, 48, 248, 136, 72, 144, 128, 160, 216, 88, 240, 120, 232, 72,
+ 192, 200, 248, 192, 48, 240, 104, 208, 40, 104, 16, 128, 80, 224, 224, 56,
+ 56, 120, 40, 24, 176, 16, 184, 24, 176, 224, 168, 16, 184, 104, 136, 200,
+ 168, 208, 120, 200, 224, 40, 208, 16, 112, 160, 192, 224, 64, 40, 232,
+ 120,
+ 24, 232, 168, 80, 88, 144, 104, 72, 192, 112, 0, 112, 104, 224, 232, 160,
+ 112, 208, 176, 216, 56, 224, 224, 160, 104, 56, 176, 216, 192, 24, 208, 8,
+ 40, 56, 248, 8, 120, 184, 128, 40, 168, 56, 184, 192, 136, 96, 72, 216, 8,
+ 64, 72, 56, 16, 176, 144, 16, 128, 176, 136, 208, 120, 16, 184, 224,
+ 160, 216, 144, 88, 208, 200, 144, 96, 152, 200, 224, 208, 240, 120, 8, 104,
+ 184, 112, 168, 200, 112, 72, 0, 192, 0, 40, 120, 136, 112, 40, 152, 56,
+ 144, 32, 224, 240, 32, 192, 56, 200, 16, 136, 104, 192, 192, 0, 0, 0, 8,
+ 232, 104, 240, 88, 192, 8, 168, 216, 208, 184, 224, 240, 72, 152, 72,
+ 168, 184, 176, 216, 48, 144, 80, 32, 184, 208, 112, 160, 88, 88, 8, 144,
+ 144, 120, 152, 48, 200, 168, 112, 8, 160, 216, 240, 128, 104, 128, 144,
+ 248,
+ 64, 168, 136, 240, 160, 56, 136, 216, 80, 56, 192, 32, 64, 128, 80, 32, 32,
+ 96, 88, 200, 152, 72, 160, 16, 128, 200, 160, 144, 112, 16, 112, 152,
+ 56, 136, 56, 216, 8, 24, 192, 144, 176, 200, 48, 72, 40, 72, 240, 120, 120,
+ 160, 80, 152, 144, 216, 224, 152, 40, 144, 160, 88, 184, 184, 192, 128,
+ 0, 200, 72, 112, 208, 248, 152, 0, 152, 8, 40, 16, 168, 152, 64, 176, 88,
+ 24, 232, 136, 32, 152, 232, 208, 192, 240, 136, 0, 232, 200, 8, 216,
+ 104, 184, 64, 192, 8, 96, 184, 120, 208, 80, 16, 64, 136, 136, 72, 8, 112,
+ 184, 248, 120, 136, 8, 56, 232, 208, 96, 16, 64, 168, 112, 48, 32,
+ 184, 224, 72, 88, 128, 184, 72, 168, 224, 216, 160, 232, 64, 168, 48, 152,
+ 64, 152, 16, 200, 168, 56, 144, 192, 64, 120, 168, 8, 128, 216, 16, 8,
+ 104, 32, 128, 96, 160, 88, 136, 96, 56, 16, 128, 56, 88, 16, 208, 200, 24,
+ 96, 240, 32, 232, 192, 104, 168, 40, 0, 192, 40, 200, 96, 184, 8,
+ 72, 216, 104, 232, 112, 248, 8, 8, 248, 192, 152, 32, 0, 168, 232, 80, 248,
+ 64, 8, 24, 80, 32, 96, 240, 232, 48, 80, 16, 144, 200, 16, 48,
+ 88, 40, 112, 232, 88, 168, 56, 160, 232, 16, 128, 248, 48, 80, 200, 168,
+ 152, 72, 216, 224, 72, 208, 152, 192, 0, 224, 48, 136, 168, 96, 16, 152
+};
+const unsigned char out_ld_Rdptr[Num] = {
+ 72, 184, 216, 240, 0, 216, 192, 64, 112, 48, 160, 152, 40, 176, 32, 32, 248,
+ 200, 104, 24, 216, 240, 128, 176, 72, 232, 240, 184, 48, 120, 48, 192,
+ 64, 168, 160, 128, 160, 160, 232, 208, 104, 120, 232, 120, 8, 184, 120, 200,
+ 64, 160, 200, 224, 64, 168, 40, 120, 80, 104, 16, 0, 8, 120, 144, 136,
+ 80, 144, 72, 24, 128, 216, 216, 24, 80, 16, 64, 32, 200, 112, 128, 144, 88,
+ 24, 112, 120, 32, 104, 72, 176, 24, 16, 184, 56, 24, 200, 152, 152,
+ 48, 48, 136, 80, 240, 8, 216, 200, 240, 32, 168, 112, 48, 56, 40, 192, 232,
+ 32, 48, 232, 232, 32, 0, 88, 208, 24, 240, 72, 120, 96, 248, 136,
+ 224, 208, 8, 184, 192, 144, 88, 48, 144, 136, 112, 192, 96, 240, 200, 160,
+ 184, 160, 24, 48, 208, 152, 128, 184, 184, 144, 144, 168, 240, 144, 160,
+ 168,
+ 48, 48, 24, 200, 144, 120, 208, 56, 96, 72, 48, 88, 80, 200, 248, 208, 248,
+ 40, 136, 112, 32, 8, 8, 80, 192, 40, 32, 224, 56, 192, 200, 56,
+ 56, 232, 200, 80, 120, 8, 184, 216, 232, 80, 168, 128, 32, 216, 136, 104,
+ 248, 168, 248, 8, 192, 168, 192, 56, 240, 192, 208, 136, 120, 48, 224,
+ 112,
+ 168, 80, 192, 96, 80, 120, 120, 16, 120, 48, 168, 168, 160, 224, 128, 24,
+ 72, 24, 248, 240, 152, 160, 208, 56, 192, 56, 88, 128, 192, 136, 128, 208,
+ 112, 40, 64, 192, 32, 176, 80, 56, 168, 208, 24, 168, 168, 248, 240, 136,
+ 96, 32, 56, 184, 8, 136, 16, 0, 176, 40, 0, 32, 104, 160, 56, 88,
+ 232, 56, 0, 240, 184, 232, 88, 32, 176, 0, 216, 248, 184, 40, 16, 80, 8,
+ 208, 64, 224, 72, 40, 72, 72, 144, 80, 144, 120, 136, 64, 184, 160,
+ 136, 16, 48, 104, 232, 104, 104, 72, 208, 72, 192, 184, 40, 56, 232, 72,
+ 160, 80, 152, 232, 248, 32, 224, 40, 0, 168, 24, 96, 112, 160, 152, 8,
+ 32, 160, 104, 208, 32, 24, 248, 8, 248, 144, 120, 16, 192, 88, 152, 176,
+ 200, 160, 152, 160, 96, 168, 240, 16, 248, 176, 24, 216, 0, 56, 80, 248,
+ 96, 8, 128, 32, 192, 104, 48, 208, 240, 184, 128, 80, 56, 192, 0, 112, 176,
+ 48, 96, 56, 24, 56, 24, 32, 24, 96, 80, 0, 64, 112, 48, 24,
+ 88, 56, 152, 224, 160, 192, 184, 72, 248, 128, 8, 8, 104, 104, 200, 48, 136,
+ 136, 208, 144, 80, 40, 136, 96, 8, 208, 160, 104, 160, 80, 64, 96,
+ 176, 144, 8, 56, 88, 88, 208, 120, 48, 240, 240, 96, 248, 192, 104, 128,
+ 248, 24, 104, 72, 64, 120, 248, 192, 48, 192, 32, 80, 144, 16, 80, 96,
+ 112, 184, 56, 80, 248, 232, 0, 40, 248, 56, 192, 32, 192, 96, 248, 48, 136,
+ 224, 80, 0, 192, 128, 104, 120, 208, 128, 0, 176, 216, 8, 192, 96,
+ 16, 40, 184, 96, 32, 72, 80, 192, 104, 104, 136, 0, 16, 160, 24, 104, 48, 8,
+ 24, 152, 120, 128, 72, 32, 176, 112, 104, 120, 16, 32, 144, 160,
+ 56, 240, 0, 232, 184, 24, 16, 208, 200, 240, 200, 200, 104, 112, 24, 208,
+ 128, 168, 248, 64, 152, 120, 64, 224, 128, 208, 120, 216, 16, 152, 48,
+ 144,
+ 240, 80, 144, 224, 48, 160, 192, 248, 0, 128, 120, 128, 160, 232, 168, 208,
+ 112, 112, 104, 184, 8, 192, 56, 176, 40, 96, 64, 72, 104, 216, 152, 216,
+ 80, 152, 184, 216, 32, 56, 32, 64, 240, 152, 240, 168, 136, 8, 232, 168,
+ 128, 88, 72, 128, 8, 192, 48, 120, 112, 32, 144, 208, 192, 216, 16, 176,
+ 168, 160, 168, 88, 136, 56, 8, 64, 0, 80, 216, 104, 64, 80, 88, 208, 64, 80,
+ 200, 24, 120, 160, 80, 72, 56, 216, 24, 56, 72, 40, 72, 0,
+ 56, 136, 56, 200, 72, 136, 88, 72, 136, 240, 0, 176, 176, 152, 192, 248,
+ 224, 240, 72, 8, 112, 232, 200, 120, 16, 0, 40, 48, 64, 72, 32, 136,
+ 104, 152, 16, 240, 184, 80, 0, 152, 32, 176, 128, 120, 0, 160, 40, 64, 112,
+ 40, 80, 48, 144, 96, 168, 0, 152, 72, 184, 136, 88, 152, 184, 48,
+ 88, 152, 96, 216, 240, 184, 200, 136, 64, 104, 112, 232, 0, 208, 176, 128,
+ 112, 248, 144, 248, 120, 112, 0, 120, 240, 88, 88, 88, 8, 248, 80, 8,
+ 64, 216, 240, 56, 56, 144, 112, 208, 144, 72, 16, 160, 136, 216, 176, 112,
+ 56, 8, 168, 104, 72, 40, 176, 88, 40, 120, 24, 40, 56, 104, 40, 160,
+ 232, 160, 24, 144, 144, 232, 120, 144, 112, 96, 136, 176, 8, 128, 112, 184,
+ 96, 120, 64, 112, 0, 184, 80, 72, 184, 80, 144, 72, 120, 200, 168, 32,
+ 24, 0, 144, 72, 24, 248, 24, 152, 72, 128, 0, 8, 224, 32, 72, 72, 48, 112,
+ 232, 16, 240, 24, 64, 32, 232, 120, 168, 200, 152, 112, 8, 144,
+ 0, 120, 112, 0, 112, 144, 72, 160, 24, 216, 112, 128, 224, 152, 104, 136,
+ 40, 0, 16, 144, 48, 248, 136, 48, 64, 88, 152, 208, 248, 16, 112, 224,
+ 184, 168, 40, 168, 64, 248, 144, 104, 200, 144, 152, 16, 168, 192, 240, 96,
+ 72, 136, 216, 136, 0, 32, 192, 112, 240, 160, 248, 184, 16, 48, 232, 88,
+ 160, 16, 104, 176, 144, 136, 24, 240, 184, 160, 8, 16, 32, 56, 176, 144,
+ 168, 168, 56, 88, 88, 104, 248, 184, 96, 32, 128, 88, 224, 240, 32, 120,
+ 216, 136, 8, 72, 80, 104, 120, 152, 32, 96, 232, 80, 232, 24, 80, 200, 208,
+ 216, 184, 16, 56, 40, 216, 208, 128, 120, 16, 16, 80, 200, 144, 104,
+ 160, 72, 24, 136, 176, 32, 192, 120, 136, 80, 16, 88, 208, 160, 16, 232, 40,
+ 24, 144, 208, 32, 16, 88, 192, 48, 176, 152, 24, 160, 32, 80, 24,
+ 240, 80, 160, 152, 160, 128, 80, 88, 40, 184, 208, 144, 48, 200, 200, 48,
+ 112, 144, 104, 224, 144, 224, 200, 8, 224, 240, 32, 152, 232, 16, 8, 80,
+ 184, 40, 184, 248, 64, 8, 232, 16, 88, 88, 8, 120, 128, 48, 240, 88, 64,
+ 104, 104, 248, 96, 240, 192, 152, 208, 56, 152, 240, 136, 8, 216, 24,
+ 112, 168, 88, 136, 80, 224, 136, 152, 40, 24, 248, 216, 152, 136, 96, 224,
+ 64, 80, 56, 56, 72, 8, 24, 64, 144, 24, 208, 216, 128, 120, 96, 168,
+ 120, 152, 112, 232, 136, 80, 72, 96, 152, 208, 72, 216, 64, 120, 120, 48,
+ 232, 72, 184, 176, 48, 232, 200, 184, 120, 72, 112, 128, 248, 160, 168,
+ 216,
+ 152, 80, 176, 112, 48, 152, 112, 64, 40, 200, 232, 80, 160, 56, 216, 192,
+ 168, 72, 40, 64, 208, 32, 224, 240, 24, 104, 232, 240, 168, 24, 248, 32,
+ 80, 152, 144, 160, 112, 120, 96, 240, 64, 160, 248, 248, 152, 48, 112, 88,
+ 128, 232, 240, 240, 232, 168, 120, 32, 152, 176, 104, 16, 80, 152, 240,
+ 224,
+ 128, 16, 48, 32, 216, 8, 104, 248, 184, 208, 216, 120, 80, 208, 128, 56,
+ 112, 40, 184, 16, 224, 168, 152, 248, 56, 144, 168, 224, 8, 168, 80, 136,
+ 152, 48, 96, 0, 184, 88, 192, 24, 16, 128, 0, 176, 152, 40, 96, 72, 192, 0,
+ 32, 128, 24, 240, 48, 248, 176, 120, 16, 168, 224, 72, 8, 200,
+ 48, 176, 112, 224, 160, 8, 152, 64, 16, 16, 240, 224, 64, 144, 128, 80, 184,
+ 40, 232, 200, 112, 248, 24, 112, 176, 128, 128, 56, 40, 152, 24, 184,
+ 120, 104, 72, 64, 200, 48, 224, 0, 56, 232, 32, 240, 184, 104, 104, 32, 192,
+ 200, 200, 64, 152, 72, 216, 216, 80, 0, 80, 0, 0, 160, 120, 40,
+ 136, 240, 32, 120, 152, 216, 56, 112, 16, 24, 8, 120, 104, 192, 144, 176, 8,
+ 16, 96, 104, 168, 80, 192, 232, 112, 112, 56, 88, 176, 240, 32, 176,
+ 248, 80, 176, 24, 224, 192, 8, 176, 168, 16, 232, 248, 16, 16, 104, 128,
+ 232, 0, 32, 240, 112, 32, 184, 184, 56, 232, 80, 144, 16, 72, 240, 208,
+ 64, 176, 240, 16, 136, 16, 80, 192, 24, 72, 216, 56, 80, 216, 32, 144, 72,
+ 24, 64, 248, 0, 224, 72, 32, 136, 232, 240, 72, 32, 88, 128, 104,
+ 16, 8, 32, 192, 224, 8, 152, 248, 224, 0, 176, 48, 16, 104, 216, 176, 24,
+ 240, 200, 80, 248, 208, 128, 200, 72, 8, 152, 128, 80, 120, 80, 152,
+ 232, 200, 168, 88, 16, 176, 232, 40, 72, 208, 232, 112, 240, 112, 80, 176,
+ 176, 16, 72, 120, 32, 184, 224, 80, 24, 176, 0, 208, 16, 56, 112, 16,
+ 120, 160, 24, 216, 128, 136, 192, 152, 248, 120, 160, 56, 192, 224, 0, 136,
+ 112, 112, 8, 8, 184, 168, 88, 160, 120, 160, 240, 168, 32, 40, 168, 88,
+ 8, 16, 24, 104, 104, 48, 248, 136, 72, 144, 128, 160, 216, 88, 240, 120,
+ 232, 72, 192, 200, 248, 192, 48, 240, 104, 208, 40, 104, 16, 128, 80, 224,
+ 224, 56, 56, 120, 40, 24, 176, 16, 184, 24, 176, 224, 168, 16, 184, 104,
+ 136, 200, 168, 208, 120, 200, 224, 40, 208, 16, 112, 160, 192, 224, 64,
+ 40,
+ 232, 120, 24, 232, 168, 80, 88, 144, 104, 72, 192, 112, 0, 112, 104, 224,
+ 232, 160, 112, 208, 176, 216, 56, 224, 224, 160, 104, 56, 176, 216, 192,
+ 24,
+ 208, 8, 40, 56, 248, 8, 120, 184, 128, 40, 168, 56, 184, 192, 136, 96, 72,
+ 216, 8, 64, 72, 56, 16, 176, 144, 16, 128, 176, 136, 208, 120, 16,
+ 184, 224, 160, 216, 144, 88, 208, 200, 144, 96, 152, 200, 224, 208, 240,
+ 120, 8, 104, 184, 112, 168, 200, 112, 72, 0, 192, 0, 40, 120, 136, 112,
+ 40,
+ 152, 56, 144, 32, 224, 240, 32, 192, 56, 200, 16, 136, 104, 192, 192, 0, 0,
+ 0, 8, 232, 104, 240, 88, 192, 8, 168, 216, 208, 184, 224, 240, 72,
+ 152, 72, 168, 184, 176, 216, 48, 144, 80, 32, 184, 208, 112, 160, 88, 88, 8,
+ 144, 144, 120, 152, 48, 200, 168, 112, 8, 160, 216, 240, 128, 104, 128,
+ 144, 248, 64, 168, 136, 240, 160, 56, 136, 216, 80, 56, 192, 32, 64, 128,
+ 80, 32, 32, 96, 88, 200, 152, 72, 160, 16, 128, 200, 160, 144, 112, 16,
+ 112, 152, 56, 136, 56, 216, 8, 24, 192, 144, 176, 200, 48, 72, 40, 72, 240,
+ 120, 120, 160, 80, 152, 144, 216, 224, 152, 40, 144, 160, 88, 184, 184,
+ 192, 128, 0, 200, 72, 112, 208, 248, 152, 0, 152, 8, 40, 16, 168, 152, 64,
+ 176, 88, 24, 232, 136, 32, 152, 232, 208, 192, 240, 136, 0, 232, 200,
+ 8, 216, 104, 184, 64, 192, 8, 96, 184, 120, 208, 80, 16, 64, 136, 136, 72,
+ 8, 112, 184, 248, 120, 136, 8, 56, 232, 208, 96, 16, 64, 168, 112,
+ 48, 32, 184, 224, 72, 88, 128, 184, 72, 168, 224, 216, 160, 232, 64, 168,
+ 48, 152, 64, 152, 16, 200, 168, 56, 144, 192, 64, 120, 168, 8, 128, 216,
+ 16, 8, 104, 32, 128, 96, 160, 88, 136, 96, 56, 16, 128, 56, 88, 16, 208,
+ 200, 24, 96, 240, 32, 232, 192, 104, 168, 40, 0, 192, 40, 200, 96,
+ 184, 8, 72, 216, 104, 232, 112, 248, 8, 8, 248, 192, 152, 32, 0, 168, 232,
+ 80, 248, 64, 8, 24, 80, 32, 96, 240, 232, 48, 80, 16, 144, 200,
+ 16, 48, 88, 40, 112, 232, 88, 168, 56, 160, 232, 16, 128, 248, 48, 80, 200,
+ 168, 152, 72, 216, 224, 72, 208, 152, 192, 0, 224, 48, 136, 168, 96,
+ 16, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 227, 227, 227,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+const int inPMV[2][2][2] = { {{45, 207}, {70, 41}}, {{4, 180}, {120, 216}} };
+const int inmvfs[2][2] = { {232, 200}, {32, 240} };
+const int outPMV[2][2][2] =
+ { {{1566, 206}, {70, 41}}, {{1566, 206}, {120, 216}} };
+const int outmvfs[2][2] = { {0, 200}, {0, 240} };
+
+int evalue;
+#include "config.h"
+#include "global.h"
+#include "getbits.c"
+#include "getvlc.h"
+#include "getvlc.c"
+#include "motion.c"
+
+void
+Initialize_Buffer ()
+{
+ ld_Incnt = 0;
+ ld_Rdptr = ld_Rdbfr + 2048;
+ ld_Rdmax = ld_Rdptr;
+ ld_Bfr = 68157440;
+ Flush_Buffer (0); /* fills valid data into bfr */
+}
+
+int
+main ()
+{
+ int i, j, k;
+ int main_result;
+ int PMV[2][2][2];
+ int dmvector[2];
+ int motion_vertical_field_select[2][2];
+ int s, motion_vector_count, mv_format, h_r_size, v_r_size, dmv, mvscale;
+
+ main_result = 0;
+ evalue = 0;
+ System_Stream_Flag = 0;
+ s = 0;
+ motion_vector_count = 1;
+ mv_format = 0;
+ h_r_size = 200;
+ v_r_size = 200;
+ dmv = 0;
+ mvscale = 1;
+ for (i = 0; i < 2; i++)
+ {
+ dmvector[i] = 0;
+ for (j = 0; j < 2; j++)
+ {
+ motion_vertical_field_select[i][j] = inmvfs[i][j];
+ for (k = 0; k < 2; k++)
+ PMV[i][j][k] = inPMV[i][j][k];
+ }
+ }
+
+ Initialize_Buffer ();
+ motion_vectors (PMV, dmvector, motion_vertical_field_select, s,
+ motion_vector_count, mv_format, h_r_size, v_r_size, dmv,
+ mvscale);
+
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 2; j++)
+ {
+ main_result +=
+ (motion_vertical_field_select[i][j] != outmvfs[i][j]);
+ for (k = 0; k < 2; k++)
+ main_result += (PMV[i][j][k] != outPMV[i][j][k]);
+ }
+
+
+ printf ("%d\n", main_result);
+ return main_result;
+
+}
diff --git a/benchmarks/CHStone/motion/mpeg2dec.h b/benchmarks/CHStone/motion/mpeg2dec.h
new file mode 100755
index 0000000..d604ae3
--- /dev/null
+++ b/benchmarks/CHStone/motion/mpeg2dec.h
@@ -0,0 +1,53 @@
+/* mpeg2dec.h, MPEG specific defines */
+/*
++--------------------------------------------------------------------------+
+| 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) 1996, MPEG Software Simulation Group. 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 MPEG Software Simulation Group 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.
+ *
+ * The MPEG Software Simulation Group does not represent or warrant that the
+ * programs furnished hereunder are free of infringement of any third-party
+ * patents.
+ *
+ * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware,
+ * are subject to royalty fees to patent holders. Many of these patents are
+ * general enough such that they are unavoidable regardless of implementation
+ * design.
+ *
+ */
+
+#define ERROR (-1)
+
+#define SEQUENCE_END_CODE 0x1B7
+
+
+/* mv_format */
+#define MV_FIELD 0
diff --git a/benchmarks/CHStone/sha/sha.c b/benchmarks/CHStone/sha/sha.c
new file mode 100755
index 0000000..7d9c4e1
--- /dev/null
+++ b/benchmarks/CHStone/sha/sha.c
@@ -0,0 +1,217 @@
+/*
++--------------------------------------------------------------------------+
+| 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 */
+
+
+/* SHA f()-functions */
+
+#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 / 4;
+ 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 / 4;
+ 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 ()
+{
+ 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 ()
+{
+ 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)
+{
+ if ((sha_info_count_lo + ((INT32) count << 3)) < sha_info_count_lo)
+ {
+ ++sha_info_count_hi;
+ }
+ 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 ();
+ buffer += SHA_BLOCKSIZE;
+ count -= SHA_BLOCKSIZE;
+ }
+ local_memcpy (sha_info_data, buffer, count);
+}
+
+/* finish computing the SHA digest */
+
+void
+sha_final ()
+{
+ 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 ();
+ 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 ();
+}
+
+/* compute the SHA digest of a FILE stream */
+void
+sha_stream ()
+{
+ int i, j;
+ const BYTE *p;
+
+ sha_init ();
+ for (j = 0; j < VSIZE; j++)
+ {
+ i = in_i[j];
+ p = &indata[j][0];
+ sha_update (p, i);
+ }
+ sha_final ();
+}
diff --git a/benchmarks/CHStone/sha/sha.h b/benchmarks/CHStone/sha/sha.h
new file mode 100755
index 0000000..da4c9ca
--- /dev/null
+++ b/benchmarks/CHStone/sha/sha.h
@@ -0,0 +1,1137 @@
+/*
++--------------------------------------------------------------------------+
+| 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. |
++--------------------------------------------------------------------------+
+*/
+#ifndef SHA_H
+#define SHA_H
+
+/* 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
+
+INT32 sha_info_digest[5]; /* message digest */
+INT32 sha_info_count_lo, sha_info_count_hi; /* 64-bit bit count */
+INT32 sha_info_data[16];
+
+void sha_init ();
+void sha_update (const BYTE *, int);
+void sha_final ();
+
+void sha_stream ();
+void sha_print ();
+
+#define BLOCK_SIZE 8192
+#define VSIZE 2
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vectors (added for CHStone) |
+| indata, in_i : input data |
++--------------------------------------------------------------------------+
+*/
+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 };
+#endif /* SHA_H */
diff --git a/benchmarks/CHStone/sha/sha_driver.c b/benchmarks/CHStone/sha/sha_driver.c
new file mode 100755
index 0000000..5cbb394
--- /dev/null
+++ b/benchmarks/CHStone/sha/sha_driver.c
@@ -0,0 +1,56 @@
+/*
++--------------------------------------------------------------------------+
+| 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 */
+
+#include <stdio.h>
+#include "sha.h"
+#include "sha.c"
+
+/*
++--------------------------------------------------------------------------+
+| * Test Vector (added for CHStone) |
+| outData : expected output data |
++--------------------------------------------------------------------------+
+*/
+const INT32 outData[5] =
+ { 0x006a5a37UL, 0x93dc9485UL, 0x2c412112UL, 0x63f7ba43UL, 0xad73f922UL };
+
+int
+main ()
+{
+ int i;
+ int main_result;
+ main_result = 0;
+ sha_stream ();
+
+ for (i = 0; i < 5; i++)
+ {
+
+ main_result += (sha_info_digest[i] != outData[i]);
+ }
+ printf ("%d\n", main_result);
+
+ return main_result;
+ }
diff --git a/test/matrix.c b/test/matrix.c
index d612734..2bb17e7 100644
--- a/test/matrix.c
+++ b/test/matrix.c
@@ -1,6 +1,6 @@
#define N 4
-void matrix_multiply(int first[][N], int second[][N], int multiply[][N]) {
+void matrix_multiply(int first[N][N], int second[N][N], int multiply[N][N]) {
int sum = 0;
for (int c = 0; c < N; c++) {
for (int d = 0; d < N; d++) {