1 | for (int c0 = 0; c0 <= 1; c0 += 1) { |
2 | for (int c2 = 0; c2 <= length; c2 += 32) { |
3 | if (length >= c2 + 1) { |
4 | for (int c3 = 0; c3 <= length; c3 += 32) { |
5 | if (c2 == 0) |
6 | for (int c6 = max(0, -c3 + 1); c6 <= min(31, length - c3); c6 += 1) |
7 | S_0(c0, 0, c3 + c6 - 1); |
8 | for (int c5 = max(0, -c2 + 1); c5 <= min(31, (c3 / 2) - c2 - 1); c5 += 1) |
9 | for (int c6 = 0; c6 <= min(31, length - c3); c6 += 1) |
10 | S_0(c0, c2 + c5, c3 + c6 - 1); |
11 | for (int c5 = max(max(0, -c2 + 1), (c3 / 2) - c2); c5 <= min(min(31, length - c2 - 1), (c3 / 2) - c2 + 15); c5 += 1) { |
12 | for (int c6 = max(0, -c3 + 1); c6 <= min(length - c3, 2 * c2 - c3 + 2 * c5 - 1); c6 += 1) |
13 | S_0(c0, c2 + c5, c3 + c6 - 1); |
14 | S_3(c0, 0, c2 + c5); |
15 | if (length >= 2 * c2 + 2 * c5) |
16 | S_0(c0, c2 + c5, 2 * c2 + 2 * c5 - 1); |
17 | for (int c6 = 2 * c2 - c3 + 2 * c5 + 1; c6 <= min(31, length - c3); c6 += 1) |
18 | S_0(c0, c2 + c5, c3 + c6 - 1); |
19 | } |
20 | for (int c5 = max(0, (c3 / 2) - c2 + 16); c5 <= min(31, length - c2 - 1); c5 += 1) |
21 | for (int c6 = max(0, -c3 + 1); c6 <= min(31, length - c3); c6 += 1) |
22 | S_0(c0, c2 + c5, c3 + c6 - 1); |
23 | if (length <= 15 && c2 == 0 && c3 == 0) |
24 | S_4(c0); |
25 | if (c3 >= 2 * c2 && 2 * c2 + 32 >= c3) |
26 | for (int c4 = 1; c4 <= min(min(31, length - 2), (c3 / 2) + 14); c4 += 1) |
27 | for (int c5 = max((c3 / 2) - c2, -c2 + c4 + 1); c5 <= min(length - c2 - 1, (c3 / 2) - c2 + 15); c5 += 1) |
28 | S_3(c0, c4, c2 + c5); |
29 | } |
30 | for (int c3 = max(2 * c2, -(length % 32) + length + 32); c3 <= min(2 * length - 2, 2 * c2 + 62); c3 += 32) |
31 | for (int c4 = 0; c4 <= min(31, length - 2); c4 += 1) { |
32 | for (int c5 = max((c3 / 2) - c2, -c2 + c4 + 1); c5 <= min(length - c2 - 1, (c3 / 2) - c2 + 15); c5 += 1) |
33 | S_3(c0, c4, c2 + c5); |
34 | if (c3 + 30 >= 2 * length && c4 == 0) |
35 | S_4(c0); |
36 | } |
37 | if (c2 + 16 == length) |
38 | S_4(c0); |
39 | } else if (length >= 32) { |
40 | S_4(c0); |
41 | } else { |
42 | S_4(c0); |
43 | } |
44 | } |
45 | for (int c1 = 32; c1 < length - 1; c1 += 32) |
46 | for (int c2 = c1; c2 < length; c2 += 32) |
47 | for (int c3 = c2; c3 <= min(length - 1, c2 + 31); c3 += 16) |
48 | for (int c4 = 0; c4 <= min(min(31, length - c1 - 2), -c1 + c3 + 14); c4 += 1) |
49 | for (int c5 = max(-c2 + c3, c1 - c2 + c4 + 1); c5 <= min(length - c2 - 1, -c2 + c3 + 15); c5 += 1) |
50 | S_3(c0, c1 + c4, c2 + c5); |
51 | } |
52 | |