CLooG 0.18.4
[cloog.git] / test / vivien.good.c
blob8d2c9d388473bffbbf1f596f1d3a67fe3ccc59f4
1 /* Generated from ../../../git/cloog/test/vivien.cloog by CLooG 0.14.0-76-gef19709 gmp bits in 0.78s. */
2 extern void hash(int);
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))
10 #define S1(i) { hash(1); hash(i); }
11 #define S2(i,j) { hash(2); hash(i); hash(j); }
12 #define S3(i) { hash(3); hash(i); }
13 #define S4(i,j) { hash(4); hash(i); hash(j); }
14 #define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); }
15 #define S6(i,j) { hash(6); hash(i); hash(j); }
17 void test(int n)
19 /* Scattering iterators. */
20 int p1, p2, p3;
21 /* Original iterators. */
22 int i, j, k;
23 for (p1=-54*n+4;p1<=min(4,4*n+1);p1++) {
24 if (p1%2 == 0) {
25 i = (p1-2)/2 ;
26 S1((p1-2)/2) ;
29 if (n >= 1) {
30 S3(1) ;
32 if (n >= 2) {
33 S4(1,2) ;
34 S1(2) ;
35 S6(1,2) ;
37 for (p1=max(-54*n+4,4*n+2);p1<=6;p1++) {
38 if (p1%2 == 0) {
39 i = (p1-2)/2 ;
40 S1((p1-2)/2) ;
43 for (p1=7;p1<=min(min(2*n+2,9),floord(4*n+12,3));p1++) {
44 for (p2=ceild(-p1+2,4);p2<=-1;p2++) {
45 if (p1%2 == 0) {
46 j = (p1+2*p2)/2 ;
47 S4(-p2,(p1+2*p2)/2) ;
50 if ((p1+3)%4 == 0) {
51 i = (p1-1)/4 ;
52 S3((p1-1)/4) ;
54 if (p1%2 == 0) {
55 i = (p1-2)/2 ;
56 S1((p1-2)/2) ;
58 if (p1%2 == 0) {
59 j = (p1-2)/2 ;
60 S6(1,(p1-2)/2) ;
62 if ((p1+1)%2 == 0) {
63 i = (p1-3)/2 ;
64 S2((p1-3)/2,1) ;
67 for (p1=2*n+3;p1<=min(9,4*n-2);p1++) {
68 for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) {
69 if (p1%2 == 0) {
70 j = (p1+2*p2)/2 ;
71 S4(-p2,(p1+2*p2)/2) ;
74 if ((p1+3)%4 == 0) {
75 i = (p1-1)/4 ;
76 S3((p1-1)/4) ;
78 if (p1%2 == 0) {
79 i = (p1-2)/2 ;
80 S1((p1-2)/2) ;
82 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
83 if ((p1+1)%2 == 0) {
84 i = (p1-2*p2-1)/2 ;
85 S2((p1-2*p2-1)/2,p2) ;
89 if (n >= 4) {
90 S4(2,3) ;
91 S4(1,4) ;
92 S5(2,3,1) ;
93 S6(2,3) ;
94 S1(4) ;
95 S6(1,4) ;
97 if (n == 3) {
98 S4(2,3) ;
99 S5(2,3,1) ;
100 S6(2,3) ;
101 S1(4) ;
103 for (p1=11;p1<=min(12,2*n+2);p1++) {
104 p2 = floord(-p1+5,4) ;
105 if (p1%2 == 0) {
106 j = (p1+2*p2)/2 ;
107 S4(-p2,(p1+2*p2)/2) ;
109 for (p2=ceild(-p1+6,4);p2<=-1;p2++) {
110 if (p1%2 == 0) {
111 j = (p1+2*p2)/2 ;
112 S4(-p2,(p1+2*p2)/2) ;
114 for (p3=1;p3<=-p2;p3++) {
115 i = -p2+1 ;
116 if (p1%2 == 0) {
117 j = (p1+2*p2-2)/2 ;
118 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
122 if (p1%2 == 0) {
123 j = (p1-4)/2 ;
124 S6(2,(p1-4)/2) ;
126 if (p1%2 == 0) {
127 i = (p1-2)/2 ;
128 S1((p1-2)/2) ;
130 if (p1%2 == 0) {
131 j = (p1-2)/2 ;
132 S6(1,(p1-2)/2) ;
134 if ((p1+1)%2 == 0) {
135 i = (p1-3)/2 ;
136 S2((p1-3)/2,1) ;
138 for (p2=2;p2<=floord(p1-3,4);p2++) {
139 if ((p1+1)%2 == 0) {
140 i = (p1-2*p2-1)/2 ;
141 S2((p1-2*p2-1)/2,p2) ;
145 if (n == 4) {
146 S2(4,1) ;
147 S2(3,2) ;
149 if (n == 5) {
150 S3(3) ;
151 S2(5,1) ;
152 S2(4,2) ;
154 if (n >= 6) {
155 S3(3) ;
156 S2(5,1) ;
157 S2(4,2) ;
159 if ((n <= 4) && (n >= 4)) {
160 p1 = 2*n+4 ;
161 for (p2=ceild(-n-1,2);p2<=-2;p2++) {
162 j = p2+n+2 ;
163 S4(-p2,p2+n+2) ;
165 for (p2=ceild(-n+1,2);p2<=-1;p2++) {
166 for (p3=1;p3<=-p2;p3++) {
167 i = -p2+1 ;
168 j = p2+n+1 ;
169 S5(-p2+1,p2+n+1,p3) ;
172 S6(2,n) ;
173 i = n+1 ;
174 S1(n+1) ;
176 for (p1=14;p1<=2*n+2;p1++) {
177 p2 = floord(-p1+5,4) ;
178 if (p1%2 == 0) {
179 j = (p1+2*p2)/2 ;
180 S4(-p2,(p1+2*p2)/2) ;
182 p2 = floord(-p1+9,4) ;
183 if (p1%2 == 0) {
184 j = (p1+2*p2)/2 ;
185 S4(-p2,(p1+2*p2)/2) ;
187 for (p3=1;p3<=-p2;p3++) {
188 i = -p2+1 ;
189 if (p1%2 == 0) {
190 j = (p1+2*p2-2)/2 ;
191 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
194 for (p2=ceild(-p1+10,4);p2<=-1;p2++) {
195 if (p1%2 == 0) {
196 j = (p1+2*p2)/2 ;
197 S4(-p2,(p1+2*p2)/2) ;
199 i = -p2+2 ;
200 if (p1%2 == 0) {
201 j = (p1+2*p2-4)/2 ;
202 S6(-p2+2,(p1+2*p2-4)/2) ;
204 for (p3=1;p3<=-p2;p3++) {
205 i = -p2+1 ;
206 if (p1%2 == 0) {
207 j = (p1+2*p2-2)/2 ;
208 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
212 if (p1%2 == 0) {
213 j = (p1-4)/2 ;
214 S6(2,(p1-4)/2) ;
216 if ((p1+3)%4 == 0) {
217 i = (p1-1)/4 ;
218 S3((p1-1)/4) ;
220 if (p1%2 == 0) {
221 i = (p1-2)/2 ;
222 S1((p1-2)/2) ;
224 if (p1%2 == 0) {
225 j = (p1-2)/2 ;
226 S6(1,(p1-2)/2) ;
228 if ((p1+1)%2 == 0) {
229 i = (p1-3)/2 ;
230 S2((p1-3)/2,1) ;
232 for (p2=2;p2<=floord(p1-3,4);p2++) {
233 if ((p1+1)%2 == 0) {
234 i = (p1-2*p2-1)/2 ;
235 S2((p1-2*p2-1)/2,p2) ;
239 if ((n <= 4) && (n >= 4)) {
240 S3(3) ;
241 for (p2=-n+6;p2<=2;p2++) {
242 i = -p2+6 ;
243 S2(-p2+6,p2) ;
246 if (n >= 7) {
247 p1 = 2*n+3 ;
248 if ((n+1)%2 == 0) {
249 i = (n+1)/2 ;
250 S3((n+1)/2) ;
252 S2(n,1) ;
253 for (p2=2;p2<=floord(n,2);p2++) {
254 i = -p2+n+1 ;
255 S2(-p2+n+1,p2) ;
258 if ((n <= 6) && (n >= 6)) {
259 p1 = 2*n+3 ;
260 if ((n+1)%2 == 0) {
261 i = (n+1)/2 ;
262 S3((n+1)/2) ;
264 S2(n,1) ;
265 for (p2=2;p2<=floord(n,2);p2++) {
266 i = -p2+n+1 ;
267 S2(-p2+n+1,p2) ;
270 if (n >= 7) {
271 p1 = 2*n+4 ;
272 for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) {
273 j = p2+n+2 ;
274 S4(-p2,p2+n+2) ;
276 for (p2=ceild(-n+1,2);p2<=floord(-2*n+5,4);p2++) {
277 j = p2+n+2 ;
278 S4(-p2,p2+n+2) ;
279 for (p3=1;p3<=-p2;p3++) {
280 i = -p2+1 ;
281 j = p2+n+1 ;
282 S5(-p2+1,p2+n+1,p3) ;
285 for (p2=ceild(-n+3,2);p2<=-2;p2++) {
286 j = p2+n+2 ;
287 S4(-p2,p2+n+2) ;
288 i = -p2+2 ;
289 j = p2+n ;
290 S6(-p2+2,p2+n) ;
291 for (p3=1;p3<=-p2;p3++) {
292 i = -p2+1 ;
293 j = p2+n+1 ;
294 S5(-p2+1,p2+n+1,p3) ;
297 j = n-1 ;
298 S6(3,n-1) ;
299 S5(2,n,1) ;
300 S6(2,n) ;
301 i = n+1 ;
302 S1(n+1) ;
304 if ((n <= 5) && (n >= 5)) {
305 p1 = 2*n+4 ;
306 for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) {
307 j = p2+n+2 ;
308 S4(-p2,p2+n+2) ;
310 for (p2=ceild(-n+1,2);p2<=-2;p2++) {
311 j = p2+n+2 ;
312 S4(-p2,p2+n+2) ;
313 for (p3=1;p3<=-p2;p3++) {
314 i = -p2+1 ;
315 j = p2+n+1 ;
316 S5(-p2+1,p2+n+1,p3) ;
319 for (p2=-1;p2<=floord(-2*n+5,4);p2++) {
320 for (p3=1;p3<=-p2;p3++) {
321 i = -p2+1 ;
322 j = p2+n+1 ;
323 S5(-p2+1,p2+n+1,p3) ;
326 for (p2=ceild(-n+3,2);p2<=-1;p2++) {
327 i = -p2+2 ;
328 j = p2+n ;
329 S6(-p2+2,p2+n) ;
330 for (p3=1;p3<=-p2;p3++) {
331 i = -p2+1 ;
332 j = p2+n+1 ;
333 S5(-p2+1,p2+n+1,p3) ;
336 S6(2,n) ;
337 i = n+1 ;
338 S1(n+1) ;
340 if ((n <= 6) && (n >= 6)) {
341 p1 = 2*n+4 ;
342 for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) {
343 j = p2+n+2 ;
344 S4(-p2,p2+n+2) ;
346 for (p2=ceild(-n+1,2);p2<=-2;p2++) {
347 j = p2+n+2 ;
348 S4(-p2,p2+n+2) ;
349 for (p3=1;p3<=-p2;p3++) {
350 i = -p2+1 ;
351 j = p2+n+1 ;
352 S5(-p2+1,p2+n+1,p3) ;
355 j = n-1 ;
356 S6(3,n-1) ;
357 S5(2,n,1) ;
358 S6(2,n) ;
359 i = n+1 ;
360 S1(n+1) ;
362 for (p1=2*n+5;p1<=min(4*n-10,2*n+58);p1++) {
363 p2 = floord(-p1+5,4) ;
364 if (p1%2 == 0) {
365 j = (p1+2*p2)/2 ;
366 S4(-p2,(p1+2*p2)/2) ;
368 p2 = floord(-p1+9,4) ;
369 if (p1%2 == 0) {
370 j = (p1+2*p2)/2 ;
371 S4(-p2,(p1+2*p2)/2) ;
373 for (p3=1;p3<=-p2;p3++) {
374 i = -p2+1 ;
375 if (p1%2 == 0) {
376 j = (p1+2*p2-2)/2 ;
377 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
380 for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) {
381 if (p1%2 == 0) {
382 j = (p1+2*p2)/2 ;
383 S4(-p2,(p1+2*p2)/2) ;
385 i = -p2+2 ;
386 if (p1%2 == 0) {
387 j = (p1+2*p2-4)/2 ;
388 S6(-p2+2,(p1+2*p2-4)/2) ;
390 for (p3=1;p3<=-p2;p3++) {
391 i = -p2+1 ;
392 if (p1%2 == 0) {
393 j = (p1+2*p2-2)/2 ;
394 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
398 p2 = floord(-p1+2*n+2,2) ;
399 i = -p2+2 ;
400 if (p1%2 == 0) {
401 j = (p1+2*p2-4)/2 ;
402 S6(-p2+2,(p1+2*p2-4)/2) ;
404 for (p3=1;p3<=-p2;p3++) {
405 i = -p2+1 ;
406 if (p1%2 == 0) {
407 j = (p1+2*p2-2)/2 ;
408 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
411 for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) {
412 i = -p2+2 ;
413 if (p1%2 == 0) {
414 j = (p1+2*p2-4)/2 ;
415 S6(-p2+2,(p1+2*p2-4)/2) ;
418 if ((p1+3)%4 == 0) {
419 i = (p1-1)/4 ;
420 S3((p1-1)/4) ;
422 if (p1%2 == 0) {
423 i = (p1-2)/2 ;
424 S1((p1-2)/2) ;
426 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
427 if ((p1+1)%2 == 0) {
428 i = (p1-2*p2-1)/2 ;
429 S2((p1-2*p2-1)/2,p2) ;
433 for (p1=max(4*n-9,2*n+5);p1<=min(4*n-8,2*n+58);p1++) {
434 p2 = floord(-p1+5,4) ;
435 if (p1%2 == 0) {
436 j = (p1+2*p2)/2 ;
437 S4(-p2,(p1+2*p2)/2) ;
439 for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) {
440 if (p1%2 == 0) {
441 j = (p1+2*p2)/2 ;
442 S4(-p2,(p1+2*p2)/2) ;
444 for (p3=1;p3<=-p2;p3++) {
445 i = -p2+1 ;
446 if (p1%2 == 0) {
447 j = (p1+2*p2-2)/2 ;
448 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
452 p2 = floord(-p1+2*n+2,2) ;
453 i = -p2+2 ;
454 if (p1%2 == 0) {
455 j = (p1+2*p2-4)/2 ;
456 S6(-p2+2,(p1+2*p2-4)/2) ;
458 for (p3=1;p3<=-p2;p3++) {
459 i = -p2+1 ;
460 if (p1%2 == 0) {
461 j = (p1+2*p2-2)/2 ;
462 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
465 for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) {
466 i = -p2+2 ;
467 if (p1%2 == 0) {
468 j = (p1+2*p2-4)/2 ;
469 S6(-p2+2,(p1+2*p2-4)/2) ;
472 if ((p1+3)%4 == 0) {
473 i = (p1-1)/4 ;
474 S3((p1-1)/4) ;
476 if (p1%2 == 0) {
477 i = (p1-2)/2 ;
478 S1((p1-2)/2) ;
480 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
481 if ((p1+1)%2 == 0) {
482 i = (p1-2*p2-1)/2 ;
483 S2((p1-2*p2-1)/2,p2) ;
487 for (p1=max(4*n-7,2*n+5);p1<=min(4*n-6,2*n+58);p1++) {
488 p2 = floord(-p1+5,4) ;
489 if (p1%2 == 0) {
490 j = (p1+2*p2)/2 ;
491 S4(-p2,(p1+2*p2)/2) ;
493 for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) {
494 if (p1%2 == 0) {
495 j = (p1+2*p2)/2 ;
496 S4(-p2,(p1+2*p2)/2) ;
498 for (p3=1;p3<=-p2;p3++) {
499 i = -p2+1 ;
500 if (p1%2 == 0) {
501 j = (p1+2*p2-2)/2 ;
502 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
506 for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) {
507 for (p3=1;p3<=-p2;p3++) {
508 i = -p2+1 ;
509 if (p1%2 == 0) {
510 j = (p1+2*p2-2)/2 ;
511 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
515 for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) {
516 i = -p2+2 ;
517 if (p1%2 == 0) {
518 j = (p1+2*p2-4)/2 ;
519 S6(-p2+2,(p1+2*p2-4)/2) ;
521 for (p3=1;p3<=-p2;p3++) {
522 i = -p2+1 ;
523 if (p1%2 == 0) {
524 j = (p1+2*p2-2)/2 ;
525 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
529 for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) {
530 i = -p2+2 ;
531 if (p1%2 == 0) {
532 j = (p1+2*p2-4)/2 ;
533 S6(-p2+2,(p1+2*p2-4)/2) ;
536 if ((p1+3)%4 == 0) {
537 i = (p1-1)/4 ;
538 S3((p1-1)/4) ;
540 if (p1%2 == 0) {
541 i = (p1-2)/2 ;
542 S1((p1-2)/2) ;
544 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
545 if ((p1+1)%2 == 0) {
546 i = (p1-2*p2-1)/2 ;
547 S2((p1-2*p2-1)/2,p2) ;
551 for (p1=max(max(4*n-5,14),2*n+5);p1<=min(4*n-2,2*n+58);p1++) {
552 for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) {
553 if (p1%2 == 0) {
554 j = (p1+2*p2)/2 ;
555 S4(-p2,(p1+2*p2)/2) ;
558 for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) {
559 for (p3=1;p3<=-p2;p3++) {
560 i = -p2+1 ;
561 if (p1%2 == 0) {
562 j = (p1+2*p2-2)/2 ;
563 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
567 for (p2=max(ceild(-p1+10,4),ceild(-p1+2*n+3,2));p2<=min(floord(-p1+2*n+4,2),-1);p2++) {
568 i = -p2+2 ;
569 if (p1%2 == 0) {
570 j = (p1+2*p2-4)/2 ;
571 S6(-p2+2,(p1+2*p2-4)/2) ;
574 if ((p1+3)%4 == 0) {
575 i = (p1-1)/4 ;
576 S3((p1-1)/4) ;
578 if (p1%2 == 0) {
579 i = (p1-2)/2 ;
580 S1((p1-2)/2) ;
582 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
583 if ((p1+1)%2 == 0) {
584 i = (p1-2*p2-1)/2 ;
585 S2((p1-2*p2-1)/2,p2) ;
589 if ((n >= 2) && (n <= 29)) {
590 p1 = 4*n-1 ;
591 p2 = n-1 ;
592 j = n-1 ;
593 S2(n,n-1) ;
595 for (p1=2*n+59;p1<=4*n-10;p1++) {
596 p2 = floord(-p1+5,4) ;
597 if (p1%2 == 0) {
598 j = (p1+2*p2)/2 ;
599 S4(-p2,(p1+2*p2)/2) ;
601 p2 = floord(-p1+9,4) ;
602 if (p1%2 == 0) {
603 j = (p1+2*p2)/2 ;
604 S4(-p2,(p1+2*p2)/2) ;
606 for (p3=1;p3<=-p2;p3++) {
607 i = -p2+1 ;
608 if (p1%2 == 0) {
609 j = (p1+2*p2-2)/2 ;
610 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
613 for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) {
614 if (p1%2 == 0) {
615 j = (p1+2*p2)/2 ;
616 S4(-p2,(p1+2*p2)/2) ;
618 i = -p2+2 ;
619 if (p1%2 == 0) {
620 j = (p1+2*p2-4)/2 ;
621 S6(-p2+2,(p1+2*p2-4)/2) ;
623 for (p3=1;p3<=-p2;p3++) {
624 i = -p2+1 ;
625 if (p1%2 == 0) {
626 j = (p1+2*p2-2)/2 ;
627 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
631 p2 = floord(-p1+2*n+2,2) ;
632 i = -p2+2 ;
633 if (p1%2 == 0) {
634 j = (p1+2*p2-4)/2 ;
635 S6(-p2+2,(p1+2*p2-4)/2) ;
637 for (p3=1;p3<=-p2;p3++) {
638 i = -p2+1 ;
639 if (p1%2 == 0) {
640 j = (p1+2*p2-2)/2 ;
641 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
644 p2 = floord(-p1+2*n+4,2) ;
645 i = -p2+2 ;
646 if (p1%2 == 0) {
647 j = (p1+2*p2-4)/2 ;
648 S6(-p2+2,(p1+2*p2-4)/2) ;
650 if ((p1+3)%4 == 0) {
651 i = (p1-1)/4 ;
652 S3((p1-1)/4) ;
654 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
655 if ((p1+1)%2 == 0) {
656 i = (p1-2*p2-1)/2 ;
657 S2((p1-2*p2-1)/2,p2) ;
661 for (p1=max(4*n-9,2*n+59);p1<=4*n-8;p1++) {
662 p2 = floord(-p1+5,4) ;
663 if (p1%2 == 0) {
664 j = (p1+2*p2)/2 ;
665 S4(-p2,(p1+2*p2)/2) ;
667 for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) {
668 if (p1%2 == 0) {
669 j = (p1+2*p2)/2 ;
670 S4(-p2,(p1+2*p2)/2) ;
672 for (p3=1;p3<=-p2;p3++) {
673 i = -p2+1 ;
674 if (p1%2 == 0) {
675 j = (p1+2*p2-2)/2 ;
676 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
680 p2 = floord(-p1+2*n+2,2) ;
681 i = -p2+2 ;
682 if (p1%2 == 0) {
683 j = (p1+2*p2-4)/2 ;
684 S6(-p2+2,(p1+2*p2-4)/2) ;
686 for (p3=1;p3<=-p2;p3++) {
687 i = -p2+1 ;
688 if (p1%2 == 0) {
689 j = (p1+2*p2-2)/2 ;
690 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
693 p2 = floord(-p1+2*n+4,2) ;
694 i = -p2+2 ;
695 if (p1%2 == 0) {
696 j = (p1+2*p2-4)/2 ;
697 S6(-p2+2,(p1+2*p2-4)/2) ;
699 if ((p1+3)%4 == 0) {
700 i = (p1-1)/4 ;
701 S3((p1-1)/4) ;
703 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
704 if ((p1+1)%2 == 0) {
705 i = (p1-2*p2-1)/2 ;
706 S2((p1-2*p2-1)/2,p2) ;
710 for (p1=max(4*n-7,2*n+59);p1<=4*n-6;p1++) {
711 p2 = floord(-p1+5,4) ;
712 if (p1%2 == 0) {
713 j = (p1+2*p2)/2 ;
714 S4(-p2,(p1+2*p2)/2) ;
716 for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) {
717 if (p1%2 == 0) {
718 j = (p1+2*p2)/2 ;
719 S4(-p2,(p1+2*p2)/2) ;
721 for (p3=1;p3<=-p2;p3++) {
722 i = -p2+1 ;
723 if (p1%2 == 0) {
724 j = (p1+2*p2-2)/2 ;
725 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
729 for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) {
730 for (p3=1;p3<=-p2;p3++) {
731 i = -p2+1 ;
732 if (p1%2 == 0) {
733 j = (p1+2*p2-2)/2 ;
734 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
738 for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) {
739 i = -p2+2 ;
740 if (p1%2 == 0) {
741 j = (p1+2*p2-4)/2 ;
742 S6(-p2+2,(p1+2*p2-4)/2) ;
744 for (p3=1;p3<=-p2;p3++) {
745 i = -p2+1 ;
746 if (p1%2 == 0) {
747 j = (p1+2*p2-2)/2 ;
748 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
752 p2 = floord(-p1+2*n+4,2) ;
753 i = -p2+2 ;
754 if (p1%2 == 0) {
755 j = (p1+2*p2-4)/2 ;
756 S6(-p2+2,(p1+2*p2-4)/2) ;
758 if ((p1+3)%4 == 0) {
759 i = (p1-1)/4 ;
760 S3((p1-1)/4) ;
762 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
763 if ((p1+1)%2 == 0) {
764 i = (p1-2*p2-1)/2 ;
765 S2((p1-2*p2-1)/2,p2) ;
769 for (p1=max(4*n-5,2*n+59);p1<=4*n-2;p1++) {
770 for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) {
771 if (p1%2 == 0) {
772 j = (p1+2*p2)/2 ;
773 S4(-p2,(p1+2*p2)/2) ;
776 for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) {
777 for (p3=1;p3<=-p2;p3++) {
778 i = -p2+1 ;
779 if (p1%2 == 0) {
780 j = (p1+2*p2-2)/2 ;
781 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
785 for (p2=max(ceild(-p1+10,4),ceild(-p1+2*n+3,2));p2<=floord(-p1+2*n+4,2);p2++) {
786 i = -p2+2 ;
787 if (p1%2 == 0) {
788 j = (p1+2*p2-4)/2 ;
789 S6(-p2+2,(p1+2*p2-4)/2) ;
792 if ((p1+3)%4 == 0) {
793 i = (p1-1)/4 ;
794 S3((p1-1)/4) ;
796 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
797 if ((p1+1)%2 == 0) {
798 i = (p1-2*p2-1)/2 ;
799 S2((p1-2*p2-1)/2,p2) ;
803 for (p1=max(4*n,7);p1<=min(4*n+1,2*n+58);p1++) {
804 if ((p1+3)%4 == 0) {
805 i = (p1-1)/4 ;
806 S3((p1-1)/4) ;
808 if (p1%2 == 0) {
809 i = (p1-2)/2 ;
810 S1((p1-2)/2) ;
813 if (n >= 30) {
814 p1 = 4*n-1 ;
815 p2 = n-1 ;
816 j = n-1 ;
817 S2(n,n-1) ;
819 for (p1=max(max(-54*n+4,4*n+2),7);p1<=2*n+58;p1++) {
820 if (p1%2 == 0) {
821 i = (p1-2)/2 ;
822 S1((p1-2)/2) ;
825 for (p1=max(4*n,2*n+59);p1<=4*n+1;p1++) {
826 if ((p1+3)%4 == 0) {
827 i = (p1-1)/4 ;
828 S3((p1-1)/4) ;