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