1 for (int c0 = 1; c0 <= M; c0 += 1) {
2   for (int c2 = 2; c2 < N; c2 += 1)
3     for (int c3 = 2; c3 < N; c3 += 1)
4       S1(c0, c2, c3);
5   for (int c2 = 2; c2 < N; c2 += 1)
6     for (int c3 = 2; c3 < N; c3 += 1)
7       S2(c0, c2, c3);
8 }
9