]> matita.cs.unibo.it Git - pkg-cerco/acc.git/blob - tests/clight/fir4.Clight.expected
Imported Upstream version 0.2
[pkg-cerco/acc.git] / tests / clight / fir4.Clight.expected
1 int fir4_c[16] = { 1129, 60034, 64720, 5595, 494, 59867, 65370, 5724, 5724,
2   65370, 59867, 494, 5595, 64720, 60034, 1129, };
3
4 int fir4_in[56] = { 1, 0, 16384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5   0, 0, 0, 0, 0, 0, 0, 7986, 8993, 1808, 4096, 4096, 4096, 4096, 4096, 4096,
6   4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096,
7   4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, };
8
9 extern void *__builtin___memcpy_chk(void *, void *, unsigned int, unsigned int);
10
11 extern void *__builtin___memmove_chk(void *, void *, unsigned int, unsigned int);
12
13 extern void *__builtin___mempcpy_chk(void *, void *, unsigned int, unsigned int);
14
15 extern void *__builtin___memset_chk(void *, int, unsigned int, unsigned int);
16
17 extern unsigned char *__builtin___stpcpy_chk(unsigned char *, unsigned char *, unsigned int);
18
19 extern unsigned char *__builtin___strcat_chk(unsigned char *, unsigned char *, unsigned int);
20
21 extern unsigned char *__builtin___strcpy_chk(unsigned char *, unsigned char *, unsigned int);
22
23 extern unsigned char *__builtin___strncat_chk(unsigned char *, unsigned char *, unsigned int, unsigned int);
24
25 extern unsigned char *__builtin___strncpy_chk(unsigned char *, unsigned char *, unsigned int, unsigned int);
26
27 extern int __builtin___vfprintf_chk(void *, int, unsigned char *, void *);
28
29 extern int __builtin___vprintf_chk(int, unsigned char *, void *);
30
31 extern int __builtin___vsnprintf_chk(unsigned char *, unsigned int, int, unsigned int, unsigned char *, void *);
32
33 extern int __builtin___vsprintf_chk(unsigned char *, int, unsigned int, unsigned char *, void *);
34
35 extern double __builtin_acos(double);
36
37 extern float __builtin_acosf(float);
38
39 extern double __builtin_acosl(double);
40
41 extern void *__builtin_alloca(unsigned int);
42
43 extern double __builtin_asin(double);
44
45 extern float __builtin_asinf(float);
46
47 extern double __builtin_asinl(double);
48
49 extern double __builtin_atan(double);
50
51 extern float __builtin_atanf(float);
52
53 extern double __builtin_atanl(double);
54
55 extern double __builtin_atan2(double, double);
56
57 extern float __builtin_atan2f(float, float);
58
59 extern double __builtin_atan2l(double, double);
60
61 extern double __builtin_ceil(double);
62
63 extern float __builtin_ceilf(float);
64
65 extern double __builtin_ceill(double);
66
67 extern double __builtin_cos(double);
68
69 extern float __builtin_cosf(float);
70
71 extern double __builtin_cosl(double);
72
73 extern double __builtin_cosh(double);
74
75 extern float __builtin_coshf(float);
76
77 extern double __builtin_coshl(double);
78
79 extern int __builtin_clz(unsigned int);
80
81 extern int __builtin_clzl(unsigned int);
82
83 extern int __builtin_clzll(unsigned int);
84
85 extern int __builtin_constant_p(int);
86
87 extern int __builtin_ctz(unsigned int);
88
89 extern int __builtin_ctzl(unsigned int);
90
91 extern int __builtin_ctzll(unsigned int);
92
93 extern double __builtin_exp(double);
94
95 extern float __builtin_expf(float);
96
97 extern double __builtin_expl(double);
98
99 extern int __builtin_expect(int, int);
100
101 extern double __builtin_fabs(double);
102
103 extern float __builtin_fabsf(float);
104
105 extern double __builtin_fabsl(double);
106
107 extern int __builtin_ffs(unsigned int);
108
109 extern int __builtin_ffsl(unsigned int);
110
111 extern int __builtin_ffsll(unsigned int);
112
113 extern void *__builtin_frame_address(unsigned int);
114
115 extern double __builtin_floor(double);
116
117 extern float __builtin_floorf(float);
118
119 extern double __builtin_floorl(double);
120
121 extern double __builtin_huge_val(void);
122
123 extern float __builtin_huge_valf(void);
124
125 extern double __builtin_huge_vall(void);
126
127 extern double __builtin_inf(void);
128
129 extern float __builtin_inff(void);
130
131 extern double __builtin_infl(void);
132
133 extern void *__builtin_memcpy(void *, void *, unsigned int);
134
135 extern void *__builtin_mempcpy(void *, void *, unsigned int);
136
137 extern double __builtin_fmod(double);
138
139 extern float __builtin_fmodf(float);
140
141 extern double __builtin_fmodl(double);
142
143 extern double __builtin_frexp(double, int *);
144
145 extern float __builtin_frexpf(float, int *);
146
147 extern double __builtin_frexpl(double, int *);
148
149 extern double __builtin_ldexp(double, int);
150
151 extern float __builtin_ldexpf(float, int);
152
153 extern double __builtin_ldexpl(double, int);
154
155 extern double __builtin_log(double);
156
157 extern float __builtin_logf(float);
158
159 extern double __builtin_logl(double);
160
161 extern double __builtin_log10(double);
162
163 extern float __builtin_log10f(float);
164
165 extern double __builtin_log10l(double);
166
167 extern float __builtin_modff(float, float *);
168
169 extern double __builtin_modfl(double, double *);
170
171 extern double __builtin_nan(unsigned char *);
172
173 extern float __builtin_nanf(unsigned char *);
174
175 extern double __builtin_nanl(unsigned char *);
176
177 extern double __builtin_nans(unsigned char *);
178
179 extern float __builtin_nansf(unsigned char *);
180
181 extern double __builtin_nansl(unsigned char *);
182
183 extern void *__builtin_next_arg(void);
184
185 extern unsigned int __builtin_object_size(void *, int);
186
187 extern int __builtin_parity(unsigned int);
188
189 extern int __builtin_parityl(unsigned int);
190
191 extern int __builtin_parityll(unsigned int);
192
193 extern int __builtin_popcount(unsigned int);
194
195 extern int __builtin_popcountl(unsigned int);
196
197 extern int __builtin_popcountll(unsigned int);
198
199 extern double __builtin_powi(double, int);
200
201 extern float __builtin_powif(float, int);
202
203 extern double __builtin_powil(double, int);
204
205 extern void __builtin_return(void *);
206
207 extern void *__builtin_return_address(unsigned int);
208
209 extern double __builtin_sin(double);
210
211 extern float __builtin_sinf(float);
212
213 extern double __builtin_sinl(double);
214
215 extern double __builtin_sinh(double);
216
217 extern float __builtin_sinhf(float);
218
219 extern double __builtin_sinhl(double);
220
221 extern double __builtin_sqrt(double);
222
223 extern float __builtin_sqrtf(float);
224
225 extern double __builtin_sqrtl(double);
226
227 extern unsigned char *__builtin_stpcpy(unsigned char *, unsigned char *);
228
229 extern unsigned char *__builtin_strchr(unsigned char *, unsigned char);
230
231 extern int __builtin_strcmp(unsigned char *, unsigned char *);
232
233 extern unsigned char *__builtin_strcpy(unsigned char *, unsigned char *);
234
235 extern unsigned int __builtin_strcspn(unsigned char *, unsigned char *);
236
237 extern unsigned char *__builtin_strncat(unsigned char *, unsigned char *, unsigned int);
238
239 extern int __builtin_strncmp(unsigned char *, unsigned char *, unsigned int);
240
241 extern unsigned char *__builtin_strncpy(unsigned char *, unsigned char *, unsigned int);
242
243 extern int __builtin_strspn(unsigned char *, unsigned char *);
244
245 extern unsigned char *__builtin_strpbrk(unsigned char *, unsigned char *);
246
247 extern int __builtin_types_compatible_p(unsigned int, unsigned int);
248
249 extern double __builtin_tan(double);
250
251 extern float __builtin_tanf(float);
252
253 extern double __builtin_tanl(double);
254
255 extern double __builtin_tanh(double);
256
257 extern float __builtin_tanhf(float);
258
259 extern double __builtin_tanhl(double);
260
261 extern void __builtin_va_end(void *);
262
263 extern void __builtin_varargs_start(void *);
264
265 extern void __builtin_va_start(void *, void *);
266
267 extern void __builtin_stdarg_start(void *);
268
269 extern void __builtin_va_arg(void *, unsigned int);
270
271 extern void __builtin_va_copy(void *, void *);
272
273 int fir4(int *fir4_in__1, int *fir4_c__1, int *fir4_out, int size)
274 {
275   int i;
276   int j;
277   int tmp1;
278   int tmp2;
279   int tmp3;
280   int tmp4;
281   int x[16];
282   int adx;
283   int res;
284   c25:
285   adx = 0;
286   c24:
287   res = 0;
288   c23:
289   for (({ c22: i = 0; }); (/* c21 */ i < 16); ({ c20: i = i + 1; })) {
290     c19:
291     x[i] = 0;
292   }
293   c18:
294   for (({ c17: j = 0; }); (/* c16 */ j < size); ({ c15: j = j + 1; })) {
295     c14:
296     x[adx] = fir4_in__1[j];
297     c13:
298     res = 0;
299     c12:
300     for (({ c11: i = 0; }); (/* c10 */ i < 16); ({ c9: i = i + 4; })) {
301       c8:
302       tmp1 = x[adx] * fir4_c__1[i];
303       c7:
304       tmp2 = x[((adx + 1) % 16)] * fir4_c__1[(i + 1)];
305       c6:
306       tmp3 = x[((adx + 2) % 16)] * fir4_c__1[(i + 2)];
307       c5:
308       tmp4 = x[((adx + 3) % 16)] * fir4_c__1[(i + 3)];
309       c4:
310       res = (((res + tmp1) + tmp2) + tmp3) + tmp4;
311       c3:
312       adx = (adx + 4) % 16;
313     }
314     c2:
315     adx = (adx + 1) % 16;
316     c1:
317     fir4_out[j] = res >> 16;
318   }
319   c0:
320   return 0;
321 }
322
323 int main(void)
324 {
325   int fir4_out[16];
326   int t;
327   c27:
328   t = fir4(fir4_in, fir4_c, fir4_out, 16);
329   c26:
330   return t;
331 }
332
333