1/* Generated from ../../../git/cloog/test/pouchet.cloog by CLooG 0.16.2-3-gc1aebd7 gmp bits in 0.04s. */
2extern void hash(int);
3
4/* Useful macros. */
5#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d))
6#define ceild(n,d)  (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d))
7#define max(x,y)    ((x) > (y) ? (x) : (y))
8#define min(x,y)    ((x) < (y) ? (x) : (y))
9
10#define S1(i,j,k,l,m) { hash(1); hash(i); hash(j); hash(k); hash(l); hash(m); }
11#define S2(i,j,k,l,m) { hash(2); hash(i); hash(j); hash(k); hash(l); hash(m); }
12
13void test(int Ny)
14{
15  /* Scattering iterators. */
16  int c0, c1, c2, c3, c4, c5;
17  /* Original iterators. */
18  int i, j, k, l, m;
19  if (Ny >= 2) {
20    for (c0=1;c0<=floord(Ny+4,2);c0++) {
21      for (c1=max(ceild(c0+1,2),c0-1);c1<=min(floord(2*c0+Ny,4),c0);c1++) {
22        if (c0 >= ceild(4*c1-Ny+1,2)) {
23          for (c2=1;c2<=2;c2++) {
24            S1(c0-c1,c1,2*c0-2*c1,-2*c0+4*c1,c2);
25            S2(c0-c1,c1,2*c0-2*c1,-2*c0+4*c1-1,c2);
26          }
27        }
28        if (2*c0 == 4*c1-Ny) {
29          for (c2=1;c2<=2;c2++) {
30            if (Ny%2 == 0) {
31              if ((2*c0+3*Ny)%4 == 0) {
32                S2((2*c0-Ny)/4,(2*c0+Ny)/4,(2*c0-Ny)/2,Ny-1,c2);
33              }
34            }
35          }
36        }
37      }
38    }
39  }
40}
41