1/* Generated from ../../../git/cloog/test/levenshtein-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */
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) { hash(1); hash(i); hash(j); }
11#define S2(i,j) { hash(2); hash(i); hash(j); }
12#define S3(i,j) { hash(3); hash(i); hash(j); }
13#define S4(i,j) { hash(4); hash(i); hash(j); }
14#define S5(i,j) { hash(5); hash(i); hash(j); }
15#define S6(i,j) { hash(6); hash(i); hash(j); }
16#define S7(i,j) { hash(7); hash(i); hash(j); }
17#define S8(i,j) { hash(8); hash(i); hash(j); }
18
19void test(int M, int N)
20{
21  /* Original iterators. */
22  int i, j;
23  S1(0,0) ;
24  S2(1,0) ;
25  S3(1,1) ;
26  for (i=2;i<=N;i++) {
27    S2(i,0) ;
28    for (j=1;j<=i-1;j++) {
29      S6(i,j) ;
30    }
31    S3(i,i) ;
32  }
33  i = N+1 ;
34  S7(N+1,0) ;
35  for (j=1;j<=N;j++) {
36    S6(N+1,j) ;
37    S8(N+1,j) ;
38  }
39  for (i=N+2;i<=2*M-N-2;i++) {
40    j = floord(i-N-1,2) ;
41    S7(i,j) ;
42    if ((i+N)%2 == 0) {
43      j = (i-N)/2 ;
44      S5(i,(i-N)/2) ;
45      S8(i,(i-N)/2) ;
46    }
47    for (j=ceild(i-N+1,2);j<=floord(i+N-1,2);j++) {
48      S6(i,j) ;
49      S8(i,j) ;
50    }
51    if ((i+N)%2 == 0) {
52      j = (i+N)/2 ;
53      S4(i,(i+N)/2) ;
54      S8(i,(i+N)/2) ;
55    }
56  }
57  for (i=2*M-N-1;i<=2*M-2;i++) {
58    for (j=i-M+1;j<=M-1;j++) {
59      S6(i,j) ;
60    }
61  }
62}
63