]> matita.cs.unibo.it Git - pkg-cerco/acc.git/blob - tests/clight/ifthenelse.Clight.expected
Imported Upstream version 0.2
[pkg-cerco/acc.git] / tests / clight / ifthenelse.Clight.expected
1 extern void *__builtin___memcpy_chk(void *, void *, unsigned int, unsigned int);
2
3 extern void *__builtin___memmove_chk(void *, void *, unsigned int, unsigned int);
4
5 extern void *__builtin___mempcpy_chk(void *, void *, unsigned int, unsigned int);
6
7 extern void *__builtin___memset_chk(void *, int, unsigned int, unsigned int);
8
9 extern unsigned char *__builtin___stpcpy_chk(unsigned char *, unsigned char *, unsigned int);
10
11 extern unsigned char *__builtin___strcat_chk(unsigned char *, unsigned char *, unsigned int);
12
13 extern unsigned char *__builtin___strcpy_chk(unsigned char *, unsigned char *, unsigned int);
14
15 extern unsigned char *__builtin___strncat_chk(unsigned char *, unsigned char *, unsigned int, unsigned int);
16
17 extern unsigned char *__builtin___strncpy_chk(unsigned char *, unsigned char *, unsigned int, unsigned int);
18
19 extern int __builtin___vfprintf_chk(void *, int, unsigned char *, void *);
20
21 extern int __builtin___vprintf_chk(int, unsigned char *, void *);
22
23 extern int __builtin___vsnprintf_chk(unsigned char *, unsigned int, int, unsigned int, unsigned char *, void *);
24
25 extern int __builtin___vsprintf_chk(unsigned char *, int, unsigned int, unsigned char *, void *);
26
27 extern double __builtin_acos(double);
28
29 extern float __builtin_acosf(float);
30
31 extern double __builtin_acosl(double);
32
33 extern void *__builtin_alloca(unsigned int);
34
35 extern double __builtin_asin(double);
36
37 extern float __builtin_asinf(float);
38
39 extern double __builtin_asinl(double);
40
41 extern double __builtin_atan(double);
42
43 extern float __builtin_atanf(float);
44
45 extern double __builtin_atanl(double);
46
47 extern double __builtin_atan2(double, double);
48
49 extern float __builtin_atan2f(float, float);
50
51 extern double __builtin_atan2l(double, double);
52
53 extern double __builtin_ceil(double);
54
55 extern float __builtin_ceilf(float);
56
57 extern double __builtin_ceill(double);
58
59 extern double __builtin_cos(double);
60
61 extern float __builtin_cosf(float);
62
63 extern double __builtin_cosl(double);
64
65 extern double __builtin_cosh(double);
66
67 extern float __builtin_coshf(float);
68
69 extern double __builtin_coshl(double);
70
71 extern int __builtin_clz(unsigned int);
72
73 extern int __builtin_clzl(unsigned int);
74
75 extern int __builtin_clzll(unsigned int);
76
77 extern int __builtin_constant_p(int);
78
79 extern int __builtin_ctz(unsigned int);
80
81 extern int __builtin_ctzl(unsigned int);
82
83 extern int __builtin_ctzll(unsigned int);
84
85 extern double __builtin_exp(double);
86
87 extern float __builtin_expf(float);
88
89 extern double __builtin_expl(double);
90
91 extern int __builtin_expect(int, int);
92
93 extern double __builtin_fabs(double);
94
95 extern float __builtin_fabsf(float);
96
97 extern double __builtin_fabsl(double);
98
99 extern int __builtin_ffs(unsigned int);
100
101 extern int __builtin_ffsl(unsigned int);
102
103 extern int __builtin_ffsll(unsigned int);
104
105 extern void *__builtin_frame_address(unsigned int);
106
107 extern double __builtin_floor(double);
108
109 extern float __builtin_floorf(float);
110
111 extern double __builtin_floorl(double);
112
113 extern double __builtin_huge_val(void);
114
115 extern float __builtin_huge_valf(void);
116
117 extern double __builtin_huge_vall(void);
118
119 extern double __builtin_inf(void);
120
121 extern float __builtin_inff(void);
122
123 extern double __builtin_infl(void);
124
125 extern void *__builtin_memcpy(void *, void *, unsigned int);
126
127 extern void *__builtin_mempcpy(void *, void *, unsigned int);
128
129 extern double __builtin_fmod(double);
130
131 extern float __builtin_fmodf(float);
132
133 extern double __builtin_fmodl(double);
134
135 extern double __builtin_frexp(double, int *);
136
137 extern float __builtin_frexpf(float, int *);
138
139 extern double __builtin_frexpl(double, int *);
140
141 extern double __builtin_ldexp(double, int);
142
143 extern float __builtin_ldexpf(float, int);
144
145 extern double __builtin_ldexpl(double, int);
146
147 extern double __builtin_log(double);
148
149 extern float __builtin_logf(float);
150
151 extern double __builtin_logl(double);
152
153 extern double __builtin_log10(double);
154
155 extern float __builtin_log10f(float);
156
157 extern double __builtin_log10l(double);
158
159 extern float __builtin_modff(float, float *);
160
161 extern double __builtin_modfl(double, double *);
162
163 extern double __builtin_nan(unsigned char *);
164
165 extern float __builtin_nanf(unsigned char *);
166
167 extern double __builtin_nanl(unsigned char *);
168
169 extern double __builtin_nans(unsigned char *);
170
171 extern float __builtin_nansf(unsigned char *);
172
173 extern double __builtin_nansl(unsigned char *);
174
175 extern void *__builtin_next_arg(void);
176
177 extern unsigned int __builtin_object_size(void *, int);
178
179 extern int __builtin_parity(unsigned int);
180
181 extern int __builtin_parityl(unsigned int);
182
183 extern int __builtin_parityll(unsigned int);
184
185 extern int __builtin_popcount(unsigned int);
186
187 extern int __builtin_popcountl(unsigned int);
188
189 extern int __builtin_popcountll(unsigned int);
190
191 extern double __builtin_powi(double, int);
192
193 extern float __builtin_powif(float, int);
194
195 extern double __builtin_powil(double, int);
196
197 extern void __builtin_return(void *);
198
199 extern void *__builtin_return_address(unsigned int);
200
201 extern double __builtin_sin(double);
202
203 extern float __builtin_sinf(float);
204
205 extern double __builtin_sinl(double);
206
207 extern double __builtin_sinh(double);
208
209 extern float __builtin_sinhf(float);
210
211 extern double __builtin_sinhl(double);
212
213 extern double __builtin_sqrt(double);
214
215 extern float __builtin_sqrtf(float);
216
217 extern double __builtin_sqrtl(double);
218
219 extern unsigned char *__builtin_stpcpy(unsigned char *, unsigned char *);
220
221 extern unsigned char *__builtin_strchr(unsigned char *, unsigned char);
222
223 extern int __builtin_strcmp(unsigned char *, unsigned char *);
224
225 extern unsigned char *__builtin_strcpy(unsigned char *, unsigned char *);
226
227 extern unsigned int __builtin_strcspn(unsigned char *, unsigned char *);
228
229 extern unsigned char *__builtin_strncat(unsigned char *, unsigned char *, unsigned int);
230
231 extern int __builtin_strncmp(unsigned char *, unsigned char *, unsigned int);
232
233 extern unsigned char *__builtin_strncpy(unsigned char *, unsigned char *, unsigned int);
234
235 extern int __builtin_strspn(unsigned char *, unsigned char *);
236
237 extern unsigned char *__builtin_strpbrk(unsigned char *, unsigned char *);
238
239 extern int __builtin_types_compatible_p(unsigned int, unsigned int);
240
241 extern double __builtin_tan(double);
242
243 extern float __builtin_tanf(float);
244
245 extern double __builtin_tanl(double);
246
247 extern double __builtin_tanh(double);
248
249 extern float __builtin_tanhf(float);
250
251 extern double __builtin_tanhl(double);
252
253 extern void __builtin_va_end(void *);
254
255 extern void __builtin_varargs_start(void *);
256
257 extern void __builtin_va_start(void *, void *);
258
259 extern void __builtin_stdarg_start(void *);
260
261 extern void __builtin_va_arg(void *, unsigned int);
262
263 extern void __builtin_va_copy(void *, void *);
264
265 int if_jian(int a, int b, int c, int d, int e, int f, int g, int x, int y)
266 {
267   int u;
268   int v;
269   int t1;
270   int t2;
271   int t3;
272   int t4;
273   int t5;
274   c15:
275   t1 = a + b < c;
276   c14:
277   t2 = d + e;
278   c13:
279   t3 = c + 1;
280   c12:
281   if (y == 1) {
282     c11:
283     if (t1) {
284       c10:
285       u = t3 + d;
286     } else {
287       c9:
288       if (!x) {
289         c8:
290         u = t2 + d;
291       }
292     }
293     c7:
294     if ((/* c6 */ !t1) && (/* c5 */ x)) {
295       c4:
296       v = t2 + e;
297     }
298   } else {
299     c3:
300     t4 = t3 + e;
301     c2:
302     t5 = t4 + f;
303     c1:
304     u = t5 + g;
305   }
306   c0:
307   return u;
308 }
309
310 int if_exSimple(int a, int b)
311 {
312   int g;
313   int e;
314   int f;
315   c23:
316   if (a < b) {
317     c22:
318     e = a + b;
319     c21:
320     e = 2 * e;
321     c20:
322     g = e;
323   } else {
324     c19:
325     f = 2 * b;
326     c18:
327     f = f + a;
328     c17:
329     g = f + b;
330   }
331   c16:
332   return g;
333 }
334
335 int if_imbriq1(int a, int b, int c)
336 {
337   int result;
338   c29:
339   if (a < b) {
340     c28:
341     if (b < c) {
342       c27:
343       result = b;
344     } else {
345       c26:
346       result = c;
347     }
348   } else {
349     c25:
350     result = a;
351   }
352   c24:
353   return result;
354 }
355
356 int if_imbriq2(int a, int b, int c)
357 {
358   int result;
359   c35:
360   if (a < b) {
361     c34:
362     if (b < c) {
363       c33:
364       result = b;
365     } else {
366       c32:
367       result = 47;
368     }
369   } else {
370     c31:
371     result = a;
372   }
373   c30:
374   return result;
375 }
376
377 int if_min(int a, int b)
378 {
379   int min;
380   c39:
381   if (a > b) {
382     c38:
383     min = b;
384   } else {
385     c37:
386     min = a;
387   }
388   c36:
389   return min;
390 }
391
392 int if_prog(int j, int i)
393 {
394   int a;
395   int b;
396   c44:
397   a = i + j;
398   c43:
399   if (a < 0) {
400     c42:
401     b = 2;
402   } else {
403     c41:
404     b = 3;
405   }
406   c40:
407   return b;
408 }
409
410 int if_sansElse(int a, int b)
411 {
412   int c;
413   c48:
414   c = 0;
415   c47:
416   if (a < b) {
417     c46:
418     c = a;
419   }
420   c45:
421   return c;
422 }
423
424 int if_test(int a, int b, int x, int y)
425 {
426   int c;
427   int d;
428   int v;
429   int w;
430   int z;
431   c61:
432   c = 0;
433   c60:
434   d = 0;
435   c59:
436   v = 0;
437   c58:
438   w = 0;
439   c57:
440   z = 0;
441   c56:
442   if (a < b) {
443     c55:
444     c = a + b;
445   }
446   c54:
447   if (x < y) {
448     c53:
449     z = x + y;
450     c52:
451     w = z + x;
452   }
453   c51:
454   d = c + 1;
455   c50:
456   v = c + w;
457   c49:
458   return c;
459 }
460
461 int if_ual(int op, int a, int b)
462 {
463   int result;
464   c74:
465   if (op == 0) {
466     c73:
467     result = a + b;
468   } else {
469     c72:
470     if (op == 1) {
471       c71:
472       result = a - b;
473     } else {
474       c70:
475       if (op == 2) {
476         c69:
477         result = (/* c68 */ a) && (/* c67 */ b);
478       } else {
479         c66:
480         if (op == 3) {
481           c65:
482           result = (/* c64 */ a) || (/* c63 */ b);
483         }
484       }
485     }
486   }
487   c62:
488   return result;
489 }
490
491 int main(void)
492 {
493   int a;
494   c84:
495   a = if_jian(1, 2, 3, 4, 5, 6, 7, 8, 9);
496   c83:
497   a = if_exSimple(1, 2);
498   c82:
499   a = if_imbriq1(1, 2, 3);
500   c81:
501   a = if_imbriq2(1, 2, 3);
502   c80:
503   a = if_min(1, 2);
504   c79:
505   a = if_prog(1, 2);
506   c78:
507   a = if_sansElse(1, 2);
508   c77:
509   a = if_test(1, 2, 3, 4);
510   c76:
511   a = if_ual(1, 2, 3);
512   c75:
513   return a;
514 }
515
516