]> matita.cs.unibo.it Git - pkg-cerco/acc.git/blob - tests/clight/complets.Cminor.expected
Imported Upstream version 0.2
[pkg-cerco/acc.git] / tests / clight / complets.Cminor.expected
1
2
3
4 extern "__builtin___memcpy_chk" : int -> int -> int -> int -> int
5
6
7 extern "__builtin___memmove_chk" : int -> int -> int -> int -> int
8
9
10 extern "__builtin___mempcpy_chk" : int -> int -> int -> int -> int
11
12
13 extern "__builtin___memset_chk" : int -> int -> int -> int -> int
14
15
16 extern "__builtin___stpcpy_chk" : int -> int -> int -> int
17
18
19 extern "__builtin___strcat_chk" : int -> int -> int -> int
20
21
22 extern "__builtin___strcpy_chk" : int -> int -> int -> int
23
24
25 extern "__builtin___strncat_chk" : int -> int -> int -> int -> int
26
27
28 extern "__builtin___strncpy_chk" : int -> int -> int -> int -> int
29
30
31 extern "__builtin___vfprintf_chk" : int -> int -> int -> int -> int
32
33
34 extern "__builtin___vprintf_chk" : int -> int -> int -> int
35
36
37 extern "__builtin___vsnprintf_chk" : int -> int -> int -> int -> int -> int -> int
38
39
40 extern "__builtin___vsprintf_chk" : int -> int -> int -> int -> int -> int
41
42
43 extern "__builtin_acos" : float -> float
44
45
46 extern "__builtin_acosf" : float -> float
47
48
49 extern "__builtin_acosl" : float -> float
50
51
52 extern "__builtin_alloca" : int -> int
53
54
55 extern "__builtin_asin" : float -> float
56
57
58 extern "__builtin_asinf" : float -> float
59
60
61 extern "__builtin_asinl" : float -> float
62
63
64 extern "__builtin_atan" : float -> float
65
66
67 extern "__builtin_atanf" : float -> float
68
69
70 extern "__builtin_atanl" : float -> float
71
72
73 extern "__builtin_atan2" : float -> float -> float
74
75
76 extern "__builtin_atan2f" : float -> float -> float
77
78
79 extern "__builtin_atan2l" : float -> float -> float
80
81
82 extern "__builtin_ceil" : float -> float
83
84
85 extern "__builtin_ceilf" : float -> float
86
87
88 extern "__builtin_ceill" : float -> float
89
90
91 extern "__builtin_cos" : float -> float
92
93
94 extern "__builtin_cosf" : float -> float
95
96
97 extern "__builtin_cosl" : float -> float
98
99
100 extern "__builtin_cosh" : float -> float
101
102
103 extern "__builtin_coshf" : float -> float
104
105
106 extern "__builtin_coshl" : float -> float
107
108
109 extern "__builtin_clz" : int -> int
110
111
112 extern "__builtin_clzl" : int -> int
113
114
115 extern "__builtin_clzll" : int -> int
116
117
118 extern "__builtin_constant_p" : int -> int
119
120
121 extern "__builtin_ctz" : int -> int
122
123
124 extern "__builtin_ctzl" : int -> int
125
126
127 extern "__builtin_ctzll" : int -> int
128
129
130 extern "__builtin_exp" : float -> float
131
132
133 extern "__builtin_expf" : float -> float
134
135
136 extern "__builtin_expl" : float -> float
137
138
139 extern "__builtin_expect" : int -> int -> int
140
141
142 extern "__builtin_fabs" : float -> float
143
144
145 extern "__builtin_fabsf" : float -> float
146
147
148 extern "__builtin_fabsl" : float -> float
149
150
151 extern "__builtin_ffs" : int -> int
152
153
154 extern "__builtin_ffsl" : int -> int
155
156
157 extern "__builtin_ffsll" : int -> int
158
159
160 extern "__builtin_frame_address" : int -> int
161
162
163 extern "__builtin_floor" : float -> float
164
165
166 extern "__builtin_floorf" : float -> float
167
168
169 extern "__builtin_floorl" : float -> float
170
171
172 extern "__builtin_huge_val" : float
173
174
175 extern "__builtin_huge_valf" : float
176
177
178 extern "__builtin_huge_vall" : float
179
180
181 extern "__builtin_inf" : float
182
183
184 extern "__builtin_inff" : float
185
186
187 extern "__builtin_infl" : float
188
189
190 extern "__builtin_memcpy" : int -> int -> int -> int
191
192
193 extern "__builtin_mempcpy" : int -> int -> int -> int
194
195
196 extern "__builtin_fmod" : float -> float
197
198
199 extern "__builtin_fmodf" : float -> float
200
201
202 extern "__builtin_fmodl" : float -> float
203
204
205 extern "__builtin_frexp" : float -> int -> float
206
207
208 extern "__builtin_frexpf" : float -> int -> float
209
210
211 extern "__builtin_frexpl" : float -> int -> float
212
213
214 extern "__builtin_ldexp" : float -> int -> float
215
216
217 extern "__builtin_ldexpf" : float -> int -> float
218
219
220 extern "__builtin_ldexpl" : float -> int -> float
221
222
223 extern "__builtin_log" : float -> float
224
225
226 extern "__builtin_logf" : float -> float
227
228
229 extern "__builtin_logl" : float -> float
230
231
232 extern "__builtin_log10" : float -> float
233
234
235 extern "__builtin_log10f" : float -> float
236
237
238 extern "__builtin_log10l" : float -> float
239
240
241 extern "__builtin_modff" : float -> int -> float
242
243
244 extern "__builtin_modfl" : float -> int -> float
245
246
247 extern "__builtin_nan" : int -> float
248
249
250 extern "__builtin_nanf" : int -> float
251
252
253 extern "__builtin_nanl" : int -> float
254
255
256 extern "__builtin_nans" : int -> float
257
258
259 extern "__builtin_nansf" : int -> float
260
261
262 extern "__builtin_nansl" : int -> float
263
264
265 extern "__builtin_next_arg" : int
266
267
268 extern "__builtin_object_size" : int -> int -> int
269
270
271 extern "__builtin_parity" : int -> int
272
273
274 extern "__builtin_parityl" : int -> int
275
276
277 extern "__builtin_parityll" : int -> int
278
279
280 extern "__builtin_popcount" : int -> int
281
282
283 extern "__builtin_popcountl" : int -> int
284
285
286 extern "__builtin_popcountll" : int -> int
287
288
289 extern "__builtin_powi" : float -> int -> float
290
291
292 extern "__builtin_powif" : float -> int -> float
293
294
295 extern "__builtin_powil" : float -> int -> float
296
297
298 extern "__builtin_return" : int -> void
299
300
301 extern "__builtin_return_address" : int -> int
302
303
304 extern "__builtin_sin" : float -> float
305
306
307 extern "__builtin_sinf" : float -> float
308
309
310 extern "__builtin_sinl" : float -> float
311
312
313 extern "__builtin_sinh" : float -> float
314
315
316 extern "__builtin_sinhf" : float -> float
317
318
319 extern "__builtin_sinhl" : float -> float
320
321
322 extern "__builtin_sqrt" : float -> float
323
324
325 extern "__builtin_sqrtf" : float -> float
326
327
328 extern "__builtin_sqrtl" : float -> float
329
330
331 extern "__builtin_stpcpy" : int -> int -> int
332
333
334 extern "__builtin_strchr" : int -> int -> int
335
336
337 extern "__builtin_strcmp" : int -> int -> int
338
339
340 extern "__builtin_strcpy" : int -> int -> int
341
342
343 extern "__builtin_strcspn" : int -> int -> int
344
345
346 extern "__builtin_strncat" : int -> int -> int -> int
347
348
349 extern "__builtin_strncmp" : int -> int -> int -> int
350
351
352 extern "__builtin_strncpy" : int -> int -> int -> int
353
354
355 extern "__builtin_strspn" : int -> int -> int
356
357
358 extern "__builtin_strpbrk" : int -> int -> int
359
360
361 extern "__builtin_types_compatible_p" : int -> int -> int
362
363
364 extern "__builtin_tan" : float -> float
365
366
367 extern "__builtin_tanf" : float -> float
368
369
370 extern "__builtin_tanl" : float -> float
371
372
373 extern "__builtin_tanh" : float -> float
374
375
376 extern "__builtin_tanhf" : float -> float
377
378
379 extern "__builtin_tanhl" : float -> float
380
381
382 extern "__builtin_va_end" : int -> void
383
384
385 extern "__builtin_varargs_start" : int -> void
386
387
388 extern "__builtin_va_start" : int -> int -> void
389
390
391 extern "__builtin_stdarg_start" : int -> void
392
393
394 extern "__builtin_va_arg" : int -> int -> void
395
396
397 extern "__builtin_va_copy" : int -> int -> void
398
399
400 "comp_fir_basic" (input, h, z, N, n) : int -> int -> int -> int -> int -> int {
401
402   stack 0;
403
404   var y, k, j, i;
405
406   c16:
407   y = 0;
408   c15:
409   c14:
410   k = 0;
411   block {
412     loop {
413       if (!(/* c13 */ k < 3)) {
414         exit 0;
415       }
416       else {
417       }
418       block {
419         c11:
420         int32[z + (0 * 4)] = int32[input + (k * 4)];
421         c10:
422         c9:
423         i = 0;
424         block {
425           loop {
426             if (!(/* c8 */ i < 3)) {
427               exit 0;
428             }
429             else {
430             }
431             block {
432               c6:
433               y = y + (int32[h + (i * 4)] * int32[z + (i * 4)]);
434             }
435             c7:
436             i = i + 1;
437           }
438         }
439         c5:
440         c4:
441         j = 2;
442         block {
443           loop {
444             if (!(/* c3 */ j >= 0)) {
445               exit 0;
446             }
447             else {
448             }
449             block {
450               c1:
451               int32[z + ((j + 1) * 4)] = int32[z + (j * 4)];
452             }
453             c2:
454             j = j - 1;
455           }
456         }
457       }
458       c12:
459       k = k + 1;
460     }
461   }
462   c0:
463   return y;
464
465 }
466
467
468 "comp_fir16" (in, c, out, size) : int -> int -> int -> int -> int {
469
470   stack 64;
471
472   var res, tmp, j, i, adx;
473
474   c49:
475   int32[&0 + (0 * 4)] = 0;
476   c48:
477   int32[&0 + (1 * 4)] = 0;
478   c47:
479   int32[&0 + (2 * 4)] = 0;
480   c46:
481   int32[&0 + (3 * 4)] = 0;
482   c45:
483   int32[&0 + (4 * 4)] = 0;
484   c44:
485   int32[&0 + (5 * 4)] = 0;
486   c43:
487   int32[&0 + (6 * 4)] = 0;
488   c42:
489   int32[&0 + (7 * 4)] = 0;
490   c41:
491   int32[&0 + (8 * 4)] = 0;
492   c40:
493   int32[&0 + (9 * 4)] = 0;
494   c39:
495   int32[&0 + (10 * 4)] = 0;
496   c38:
497   int32[&0 + (11 * 4)] = 0;
498   c37:
499   int32[&0 + (12 * 4)] = 0;
500   c36:
501   int32[&0 + (13 * 4)] = 0;
502   c35:
503   int32[&0 + (14 * 4)] = 0;
504   c34:
505   int32[&0 + (15 * 4)] = 0;
506   c33:
507   adx = 0;
508   c32:
509   res = 0;
510   c31:
511   c30:
512   j = 0;
513   block {
514     loop {
515       if (!(/* c29 */ j < size)) {
516         exit 0;
517       }
518       else {
519       }
520       block {
521         c27:
522         int32[&0 + (adx * 4)] = int32[in + (j * 4)];
523         c26:
524         c25:
525         i = 0;
526         block {
527           loop {
528             if (!(/* c24 */ i < 16)) {
529               exit 0;
530             }
531             else {
532             }
533             block {
534               c22:
535               tmp = (int32[&0 + (adx * 4)] * int32[c + (i * 4)]) * (2 ^ 16);
536               c21:
537               res = res + tmp;
538               c20:
539               adx = (adx + 1) % 16;
540             }
541             c23:
542             i = i + 1;
543           }
544         }
545         c19:
546         adx = (adx + 1) % 16;
547         c18:
548         int32[out + (j * 4)] = res;
549       }
550       c28:
551       j = j + 1;
552     }
553   }
554   c17:
555   return int32[&0 + (0 * 4)];
556
557 }
558
559
560 "comp_ifFor" (a, b, pas) : int -> int -> int -> int {
561
562   stack 0;
563
564   var i, result;
565
566   c58:
567   result = 0;
568   c57:
569   c56:
570   i = 0;
571   block {
572     loop {
573       if (!(/* c55 */ i < a)) {
574         exit 0;
575       }
576       else {
577       }
578       block {
579         c53:
580         if (i != b) {
581           c52:
582           result = result + i;
583         }
584         else {
585           c51:
586           result = 0;
587         }
588       }
589       c54:
590       i = i + pas;
591     }
592   }
593   c50:
594   return result;
595
596 }
597
598
599 "comp_total" (tabParam, a, b) : int -> int -> int -> int {
600
601   stack 80;
602
603   var k, j, i;
604
605   c94:
606   int32[&0 + (0 * 4)] = 0;
607   c93:
608   int32[&0 + (1 * 4)] = 0;
609   c92:
610   int32[&0 + (2 * 4)] = 0;
611   c91:
612   int32[&0 + (3 * 4)] = 0;
613   c90:
614   int32[&0 + (4 * 4)] = 0;
615   c89:
616   int32[&0 + (5 * 4)] = 0;
617   c88:
618   int32[&0 + (6 * 4)] = 0;
619   c87:
620   int32[&0 + (7 * 4)] = 0;
621   c86:
622   int32[&0 + (8 * 4)] = 0;
623   c85:
624   int32[&0 + (9 * 4)] = 0;
625   c84:
626   int32[&40 + (0 * 4)] = 0;
627   c83:
628   int32[&40 + (1 * 4)] = 0;
629   c82:
630   int32[&40 + (2 * 4)] = 0;
631   c81:
632   int32[&40 + (3 * 4)] = 0;
633   c80:
634   int32[&40 + (4 * 4)] = 0;
635   c79:
636   int32[&40 + (5 * 4)] = 0;
637   c78:
638   int32[&40 + (6 * 4)] = 0;
639   c77:
640   int32[&40 + (7 * 4)] = 0;
641   c76:
642   int32[&40 + (8 * 4)] = 0;
643   c75:
644   int32[&40 + (9 * 4)] = 0;
645   c74:
646   if (a < b) {
647     c73:
648     c72:
649     i = 0;
650     block {
651       loop {
652         if (!(/* c71 */ i <= a)) {
653           exit 0;
654         }
655         else {
656         }
657         block {
658           c69:
659           int32[&0 + (i * 4)] = int32[tabParam + ((a - i) * 4)];
660         }
661         c70:
662         i = i + 1;
663       }
664     }
665   }
666   else {
667     c68:
668     c67:
669     k = 0;
670     block {
671       loop {
672         if (!(/* c66 */ k < a)) {
673           exit 0;
674         }
675         else {
676         }
677         block {
678           c64:
679           c63:
680           j = b;
681           block {
682             loop {
683               if (!(/* c62 */ j > 0)) {
684                 exit 0;
685               }
686               else {
687               }
688               block {
689                 c60:
690                 int32[tabParam + (k * 4)] = int32[&0 + (k * 4)] + int32[&40 + (j * 4)];
691               }
692               c61:
693               j = j - 1;
694             }
695           }
696         }
697         c65:
698         k = k + 1;
699       }
700     }
701   }
702   c59:
703   return 0;
704
705 }
706
707
708 "comp_tri" (t, n) : int -> int -> int {
709
710   stack 0;
711
712   var tmp, j, i;
713
714   c108:
715   tmp = 0;
716   c107:
717   c106:
718   i = 0;
719   block {
720     loop {
721       if (!(/* c105 */ i < n)) {
722         exit 0;
723       }
724       else {
725       }
726       block {
727         c103:
728         c102:
729         j = 1;
730         block {
731           loop {
732             if (!(/* c101 */ j < (n - i))) {
733               exit 0;
734             }
735             else {
736             }
737             block {
738               c99:
739               if (int32[t + (j * 4)] < int32[t + ((j - 1) * 4)]) {
740                 c98:
741                 tmp = int32[t + ((j - 1) * 4)];
742                 c97:
743                 int32[t + ((j - 1) * 4)] = int32[t + (j * 4)];
744                 c96:
745                 int32[t + (j * 4)] = tmp;
746               }
747               else {
748               }
749             }
750             c100:
751             j = j + 1;
752           }
753         }
754       }
755       c104:
756       i = i + 1;
757     }
758   }
759   c95:
760   return tmp;
761
762 }
763
764
765 "comp_forif2" (u, v, a, b) : int -> int -> int -> int -> int {
766
767   stack 0;
768
769   var res, l, k, j, i;
770
771   c130:
772   k = 0;
773   c129:
774   l = 0;
775   c128:
776   c127:
777   i = 0;
778   block {
779     loop {
780       if (!(/* c126 */ i < a)) {
781         exit 0;
782       }
783       else {
784       }
785       block {
786         c124:
787         k = k + int32[u + (i * 4)];
788       }
789       c125:
790       i = i + 1;
791     }
792   }
793   c123:
794   c122:
795   j = 0;
796   block {
797     loop {
798       if (!(/* c121 */ j < b)) {
799         exit 0;
800       }
801       else {
802       }
803       block {
804         c119:
805         l = l + int32[v + (j * 4)];
806       }
807       c120:
808       j = j + 1;
809     }
810   }
811   c118:
812   if ((/* c117 */ (k % 2) == 0) ? ((/* c116 */ (l % 2) == 0) ? 1 : 0) : 0) {
813     c115:
814     res = 0;
815   }
816   else {
817     c114:
818     if ((k % 2) == 0) {
819       c113:
820       res = 1;
821     }
822     else {
823       c112:
824       if ((l % 2) == 0) {
825         c111:
826         res = 2;
827       }
828       else {
829         c110:
830         res = 3;
831       }
832     }
833   }
834   c109:
835   return 0;
836
837 }
838
839
840 "comp_forif" () : int {
841
842   stack 0;
843
844   var k, j, i;
845
846   c141:
847   j = 0;
848   c140:
849   k = 0;
850   c139:
851   c138:
852   i = 0;
853   block {
854     loop {
855       if (!(/* c137 */ i < 10)) {
856         exit 0;
857       }
858       else {
859       }
860       block {
861         c135:
862         j = j + 1;
863         c134:
864         j = j + 1;
865         c133:
866         if ((i % 2) == 0) {
867           c132:
868           k = k + 1;
869         }
870         else {
871         }
872       }
873       c136:
874       i = i + 1;
875     }
876   }
877   c131:
878   return j;
879
880 }
881
882
883 "main" () : int {
884
885   stack 64;
886
887   var a;
888
889   c165:
890   int32[&0 + (0 * 4)] = 10;
891   c164:
892   int32[&0 + (1 * 4)] = 9;
893   c163:
894   int32[&0 + (2 * 4)] = 8;
895   c162:
896   int32[&0 + (3 * 4)] = 7;
897   c161:
898   int32[&0 + (4 * 4)] = 6;
899   c160:
900   int32[&0 + (5 * 4)] = 0;
901   c159:
902   int32[&0 + (6 * 4)] = 5;
903   c158:
904   int32[&0 + (7 * 4)] = 4;
905   c157:
906   int32[&0 + (8 * 4)] = 3;
907   c156:
908   int32[&0 + (9 * 4)] = 2;
909   c155:
910   int32[&0 + (10 * 4)] = 0;
911   c154:
912   int32[&0 + (11 * 4)] = 0;
913   c153:
914   int32[&0 + (12 * 4)] = 0;
915   c152:
916   int32[&0 + (13 * 4)] = 0;
917   c151:
918   int32[&0 + (14 * 4)] = 0;
919   c150:
920   int32[&0 + (15 * 4)] = 0;
921   c149:
922   a = "comp_fir_basic"(&0, &0, &0, 10, 10) : int -> int -> int -> int -> int -> int;
923   c148:
924   a = "comp_fir16"(&0, &0, &0, 16) : int -> int -> int -> int -> int;
925   c147:
926   a = "comp_ifFor"(4, 1, 1) : int -> int -> int -> int;
927   c146:
928   a = "comp_total"(&0, 9, 3) : int -> int -> int -> int;
929   c145:
930   a = "comp_tri"(&0, 10) : int -> int -> int;
931   c144:
932   a = "comp_forif2"(&0, &0, 10, 10) : int -> int -> int -> int -> int;
933   c143:
934   a = "comp_forif"() : int;
935   c142:
936   return a;
937
938 }
939
940