/*  ACR44

    TESTING OF THE ACROSS CLAUSE'.
    DISTRIBUTED ARRAY A(N,M,K,L) IS TO HAVE DIFFERENT
    FLOW-DEP-LENGTH ON BOTH SIDES */

#include <math.h>
#include <stdlib.h>
#include <stdio.h>

#define Min(a, b) (((a) < (b)) ? (a) : (b))

static void acr4401();
static void acr4402();
static void acr4403();
static void acr4404();
static void acr4405();
static void acr4406();
static void acr4407();
static void acr4408();
static void acr4409();

static void ansyes(const char tname[]);
static void ansno(const char tname[]);

static int i, j, ii, jj;

int main(int an, char **as)
{
    printf("===START OF ACR44========================\n");
    /* ---------------------------------------- */
    acr4401();
    /* ---------------------------------------- */
    acr4402();
    /* ---------------------------------------- */
    acr4403();
    /* ---------------------------------------- */
    acr4404();
    /* ---------------------------------------- */
    acr4405();
    /* ---------------------------------------- */
    acr4406();
    /* ---------------------------------------- */
    acr4407();
    /* ---------------------------------------- */
    acr4408();
    /* ---------------------------------------- */
    acr4409();
    /* ---------------------------------------- */

    printf("=== END OF ACR44 =========================\n");
    return 0;
}
/* ---------------------------------------------ACR4401*/
void acr4401()
{
    #define NL 1000
    #define N 16
    #define M 8
    #define K 8
    #define L 8
    char tname[] = "ACR4401 ";
    int nloopi, nloopj, nloopii, nloopjj;
    #pragma dvm array distribute[block][block][block][block]
    int A[N][M][K][L];
    int C[N][M][K][L];
    int NNL = NL;
    for (i = 0; i < N; i++)
        for (j = 0; j < M; j++)
            for (ii = 0; ii < K; ii++)
                for (jj = 0; jj < L; jj++)
                    C[i][j][ii][jj] = NNL + i + j + ii + jj;
    nloopi = NL;
    nloopj = NL;
    nloopii = NL;
    nloopjj = NL;
    printf("1234r5\n");
    for (i = 1; i < N - 1; i++)
        for (j = 1; j < M - 1; j++)
            for (ii = 1; ii < K - 1; ii++)
                for (jj = 1; jj < L - 1; jj++)
                    C[i][j][ii][jj] = C[i + 1][j][ii][jj] + C[i][j + 1][ii][jj] + C[i][j][ii + 1][jj] + C[i][j][ii][jj + 1] + C[i - 1][j][ii][jj] + C[i][j - 1][ii][jj] + C[i][j][ii - 1][jj] + C[i][j][ii][jj - 1];

    #pragma dvm actual(nloopi, C)
    #pragma dvm region inout(C), out(A)
    {
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj])
    for (jj = 0; jj < L; jj++)
        for (ii = 0; ii < K; ii++)
            for (j = 0; j < M; j++)
                for (i = 0; i < N; i++)
                    A[i][j][ii][jj] = NL + i + j + ii + jj;

    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) across(A[1:1][1:1][1:1][1:1])
    for (jj = 1; jj < L - 1; jj++)
        for (ii = 1; ii < K - 1; ii++)
            for (j = 1; j < M - 1; j++)
                for (i = 1; i < N - 1; i++)
                    A[i][j][ii][jj] = A[i + 1][j][ii][jj] + A[i][j + 1][ii][jj] + A[i][j][ii + 1][jj] + A[i][j][ii][jj + 1] + A[i - 1][j][ii][jj] + A[i][j - 1][ii][jj] + A[i][j][ii - 1][jj] + A[i][j][ii][jj - 1];
    }
    #pragma dvm get_actual(A)
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) reduction(min(nloopi), min(nloopj), min(nloopii), min(nloopjj))
    for (jj = 1; jj < L - 1; jj++)
        for (ii = 1; ii < K - 1; ii++)
            for (j = 1; j < M - 1; j++)
                for (i = 1; i < N - 1; i++)
                    if (A[i][j][ii][jj] != C[i][j][ii][jj]) {
                        nloopi = Min(nloopi, i);
                        nloopj = Min(nloopj, j);
                        nloopii = Min(nloopii, ii);
                        nloopjj = Min(nloopjj, jj);
                    }

    #pragma dvm get_actual(nloopi)
    if (nloopi == NL)
        ansyes(tname);
    else
        ansno(tname);

    #undef NL
    #undef N
    #undef M
    #undef K
    #undef L
}
/* ---------------------------------------------ACR4402*/
void acr4402()
{
    #define NL 1000
    #define N 16
    #define M 10
    #define K 10
    #define L 10
    char tname[] = "ACR4402 ";
    int nloopi, nloopj, nloopii, nloopjj;
    #pragma dvm array distribute[block][block][block][block], shadow[2:2][2:2][2:2][2:2]
    int A[N][M][K][L];
    int C[N][M][K][L];
    int NNL = NL;

    for (i = 0; i < N; i++)
        for (j = 0; j < M; j++)
            for (ii = 0; ii < K; ii++)
                for (jj = 0; jj < L; jj++)
                    C[i][j][ii][jj] = NNL + i + j + ii + jj;
    nloopi = NL;
    nloopj = NL;
    nloopii = NL;
    nloopjj = NL;

    for (i = 2; i < N - 2; i++)
        for (j = 2; j < M - 2; j++)
            for (ii = 2; ii < K - 2; ii++)
                for (jj = 2; jj < L - 2; jj++)
                    C[i][j][ii][jj] = C[i + 2][j][ii][jj] + C[i][j + 2][ii][jj] + C[i][j][ii + 1][jj] + C[i][j][ii][jj + 2] + C[i - 1][j][ii][jj] + C[i][j - 2][ii][jj] + C[i][j][ii - 2][jj] + C[i][j][ii][jj - 1] + C[i + 1][j][ii][jj] + C[i][j + 1][ii][jj] + C[i][j][ii][jj + 1] + C[i][j - 1][ii][jj] + C[i][j][ii][jj - 1];

    #pragma dvm actual(nloopi)
    #pragma dvm region
    {
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj])
    for (jj = 0; jj < L; jj++)
        for (ii = 0; ii < K; ii++)
            for (j = 0; j < M; j++)
                for (i = 0; i < N; i++)
                    A[i][j][ii][jj] = NL + i + j + ii + jj;

    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) across(A[1:2][2:2][2:1][1:2])
    for (jj = 2; jj < L - 2; jj++)
        for (ii = 2; ii < K - 2; ii++)
            for (j = 2; j < M - 2; j++)
                for (i = 2; i < N - 2; i++)
                    A[i][j][ii][jj] = A[i + 2][j][ii][jj] + A[i][j + 2][ii][jj] + A[i][j][ii + 1][jj] + A[i][j][ii][jj + 2] + A[i - 1][j][ii][jj] + A[i][j - 2][ii][jj] + A[i][j][ii - 2][jj] + A[i][j][ii][jj - 1] + A[i + 1][j][ii][jj] + A[i][j + 1][ii][jj] + A[i][j][ii][jj + 1] + A[i][j - 1][ii][jj] + A[i][j][ii][jj - 1];
    }
    #pragma dvm get_actual(A)
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) reduction(min(nloopi), min(nloopj), min(nloopii), min(nloopjj))
    for (jj = 2; jj < L - 2; jj++)
        for (ii = 2; ii < K - 2; ii++)
            for (j = 2; j < M - 2; j++)
                for (i = 2; i < N - 2; i++)
                    if (A[i][j][ii][jj] != C[i][j][ii][jj]) {
                        nloopi = Min(nloopi, i);
                        nloopj = Min(nloopj, j);
                        nloopii = Min(nloopii, ii);
                        nloopjj = Min(nloopjj, jj);
                    }

    #pragma dvm get_actual(nloopi)
    if (nloopi == NL)
        ansyes(tname);
    else
        ansno(tname);

    #undef NL
    #undef N
    #undef M
    #undef K
    #undef L
}
/* ---------------------------------------------ACR4403*/
void acr4403()
{
    #define NL 1000
    #define N 16
    #define M 10
    #define K 10
    #define L 10
    char tname[] = "ACR4403 ";
    int nloopi, nloopj, nloopii, nloopjj;
    #pragma dvm array distribute[block][block][block][block], shadow[2:2][2:2][2:2][2:2]
    int A[N][M][K][L];
    int C[N][M][K][L];
    int NNL = NL;

    for (i = 0; i < N; i++)
        for (j = 0; j < M; j++)
            for (ii = 0; ii < K; ii++)
                for (jj = 0; jj < L; jj++)
                    C[i][j][ii][jj] = NNL + i + j + ii + jj;
    nloopi = NL;
    nloopj = NL;
    nloopii = NL;
    nloopjj = NL;

    for (i = 2; i < N - 2; i++)
        for (j = 2; j < M - 2; j++)
            for (ii = 2; ii < K - 2; ii++)
                for (jj = 2; jj < L - 2; jj++)
                    C[i][j][ii][jj] = C[i - 2][j][ii][jj] + C[i][j - 2][ii][jj] + C[i][j][ii - 2][jj] + C[i][j][ii][jj - 2] + C[i - 1][j][ii][jj] + C[i][j - 1][ii][jj] + C[i][j][ii - 1][jj] + C[i][j][ii][jj - 1];

    #pragma dvm actual(nloopi, nloopj, C)
    #pragma dvm region inout(C), out(A)
    {
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj])
    for (jj = 0; jj < L; jj++)
        for (ii = 0; ii < K; ii++)
            for (j = 0; j < M; j++)
                for (i = 0; i < N; i++)
                    A[i][j][ii][jj] = NL + i + j + ii + jj;

    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) across(A[2:0][2:2][2:0][2:0])
    for (jj = 2; jj < L - 2; jj++)
        for (ii = 2; ii < K - 2; ii++)
            for (j = 2; j < M - 2; j++)
                for (i = 2; i < N - 2; i++)
                    A[i][j][ii][jj] = A[i - 2][j][ii][jj] + A[i][j - 2][ii][jj] + A[i][j][ii - 2][jj] + A[i][j][ii][jj - 2] + A[i - 1][j][ii][jj] + A[i][j - 1][ii][jj] + A[i][j][ii - 1][jj] + A[i][j][ii][jj - 1];
    }
    #pragma dvm get_actual(A)
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) reduction(min(nloopi), min(nloopj), min(nloopii), min(nloopjj))
    for (jj = 2; jj < L - 2; jj++)
        for (ii = 2; ii < K - 2; ii++)
            for (j = 2; j < M - 2; j++)
                for (i = 2; i < N - 2; i++)
                    if (A[i][j][ii][jj] != C[i][j][ii][jj]) {
                        nloopi = Min(nloopi, i);
                        nloopj = Min(nloopj, j);
                        nloopii = Min(nloopii, ii);
                        nloopjj = Min(nloopjj, jj);
                    }

    #pragma dvm get_actual(nloopi)
    if (nloopi == NL)
        ansyes(tname);
    else
        ansno(tname);

    #undef NL
    #undef N
    #undef M
    #undef K
    #undef L
}
/* ---------------------------------------------ACR4404*/
void acr4404()
{
    #define NL 1000
    #define N 16
    #define M 10
    #define K 10
    #define L 10
    char tname[] = "ACR4404 ";
    int nloopi, nloopj, nloopii, nloopjj;
    #pragma dvm array distribute[block][block][block][block], shadow[2:2][2:2][2:2][2:2]
    int A[N][M][K][L];
    int C[N][M][K][L];
    int NNL = NL;

    for (i = 0; i < N; i++)
        for (j = 0; j < M; j++)
            for (ii = 0; ii < K; ii++)
                for (jj = 0; jj < L; jj++)
                    C[i][j][ii][jj] = NNL + i + j + ii + jj;
    nloopi = NL;
    nloopj = NL;
    nloopii = NL;
    nloopjj = NL;

    for (i = 2; i < N - 2; i++)
        for (j = 2; j < M - 2; j++)
            for (ii = 2; ii < K - 2; ii++)
                for (jj = 2; jj < L - 2; jj++)
                    C[i][j][ii][jj] = C[i + 2][j][ii][jj] + C[i][j][ii][jj + 2] + C[i - 2][j][ii][jj] + C[i][j - 2][ii][jj] + C[i][j][ii - 2][jj] + C[i + 1][j][ii][jj] + C[i][j][ii][jj + 1] + C[i - 1][j][ii][jj] + C[i][j - 1][ii][jj] + C[i][j][ii - 1][jj];

    #pragma dvm actual(nloopi, C)
    #pragma dvm region in(C)
    {
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj])
    for (jj = 0; jj < L; jj++)
        for (ii = 0; ii < K; ii++)
            for (j = 0; j < M; j++)
                for (i = 0; i < N; i++)
                    A[i][j][ii][jj] = NL + i + j + ii + jj;

    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) across(A[2:2][2:0][2:0][0:2])
    for (jj = 2; jj < L - 2; jj++)
        for (ii = 2; ii < K - 2; ii++)
            for (j = 2; j < M - 2; j++)
                for (i = 2; i < N - 2; i++)
                    A[i][j][ii][jj] = A[i + 2][j][ii][jj] + A[i][j][ii][jj + 2] + A[i - 2][j][ii][jj] + A[i][j - 2][ii][jj] + A[i][j][ii - 2][jj] + A[i + 1][j][ii][jj] + A[i][j][ii][jj + 1] + A[i - 1][j][ii][jj] + A[i][j - 1][ii][jj] + A[i][j][ii - 1][jj];
    }
    #pragma dvm get_actual(A)
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) reduction(min(nloopi), min(nloopj), min(nloopii), min(nloopjj))
    for (jj = 2; jj < L - 2; jj++)
        for (ii = 2; ii < K - 2; ii++)
            for (j = 2; j < M - 2; j++)
                for (i = 2; i < N - 2; i++)
                    if (A[i][j][ii][jj] != C[i][j][ii][jj]) {
                        nloopi = Min(nloopi, i);
                        nloopj = Min(nloopj, j);
                        nloopii = Min(nloopii, ii);
                        nloopjj = Min(nloopjj, jj);
                    }

    #pragma dvm get_actual(nloopi)
    if (nloopi == NL)
        ansyes(tname);
    else
        ansno(tname);

    #undef NL
    #undef N
    #undef M
    #undef K
    #undef L
}
/* ---------------------------------------------ACR4405*/
void acr4405()
{
    #define NL 1000
    #define N 16
    #define M 16
    #define K 16
    #define L 16
    char tname[] = "ACR4405 ";
    int nloopi, nloopj, nloopii, nloopjj;
    #pragma dvm array distribute[block][block][block][block], shadow[2:2][2:0][0:2][2:2]
    int A[N][M][K][L];
    int C[N][M][K][L];
    int NNL = NL;

    for (i = 0; i < N; i++)
        for (j = 0; j < M; j++)
            for (ii = 0; ii < K; ii++)
                for (jj = 0; jj < L; jj++)
                    C[i][j][ii][jj] = NNL + i + j + ii + jj;
    nloopi = NL;
    nloopj = NL;
    nloopii = NL;
    nloopjj = NL;

    for (i = 2; i < N - 2; i++)
        for (j = 2; j < M - 2; j++)
            for (ii = 2; ii < K - 2; ii++)
                for (jj = 2; jj < L - 2; jj++)
                    C[i][j][ii][jj] = C[i + 2][j][ii][jj] + C[i][j][ii + 2][jj] + C[i][j][ii][jj + 2] + C[i - 2][j][ii][jj] + C[i][j - 2][ii][jj] + C[i][j][ii][jj - 2] + C[i + 1][j][ii][jj] + C[i][j][ii + 1][jj] + C[i][j][ii][jj + 1] + C[i - 1][j][ii][jj] + C[i][j - 1][ii][jj] + C[i][j][ii][jj - 1];

    #pragma dvm actual(nloopi, C)
    #pragma dvm region inout(C)
    {
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj])
    for (jj = 0; jj < L; jj++)
        for (ii = 0; ii < K; ii++)
            for (j = 0; j < M; j++)
                for (i = 0; i < N; i++)
                    A[i][j][ii][jj] = NL + i + j + ii + jj;

    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) across(A[2:2][2:0][0:2][2:2])
    for (jj = 2; jj < L - 2; jj++)
        for (ii = 2; ii < K - 2; ii++)
            for (j = 2; j < M - 2; j++)
                for (i = 2; i < N - 2; i++)
                    A[i][j][ii][jj] = A[i + 2][j][ii][jj] + A[i][j][ii + 2][jj] + A[i][j][ii][jj + 2] + A[i - 2][j][ii][jj] + A[i][j - 2][ii][jj] + A[i][j][ii][jj - 2] + A[i + 1][j][ii][jj] + A[i][j][ii + 1][jj] + A[i][j][ii][jj + 1] + A[i - 1][j][ii][jj] + A[i][j - 1][ii][jj] + A[i][j][ii][jj - 1];
    }
    #pragma dvm get_actual(A)
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) reduction(min(nloopi), min(nloopj), min(nloopii), min(nloopjj))
    for (jj = 2; jj < L - 2; jj++)
        for (ii = 2; ii < K - 2; ii++)
            for (j = 2; j < M - 2; j++)
                for (i = 2; i < N - 2; i++)
                    if (A[i][j][ii][jj] != C[i][j][ii][jj]) {
                        nloopi = Min(nloopi, i);
                        nloopj = Min(nloopj, j);
                        nloopii = Min(nloopii, ii);
                        nloopjj = Min(nloopjj, jj);
                    }

    #pragma dvm get_actual(nloopi)
    if (nloopi == NL)
        ansyes(tname);
    else
        ansno(tname);

    #undef NL
    #undef N
    #undef M
    #undef K
    #undef L
}
/* ---------------------------------------------ACR4406*/
void acr4406()
{
    #define NL 1000
    #define N 32
    #define M 16
    #define K 16
    #define L 16
    char tname[] = "ACR4406 ";
    int nloopi, nloopj, nloopii, nloopjj;
    #pragma dvm array distribute[block][block][block][block], shadow[3:3][3:3][3:3][3:3]
    int A[N][M][K][L];
    int C[N][M][K][L];
    int NNL = NL;

    for (i = 0; i < N; i++)
        for (j = 0; j < M; j++)
            for (ii = 0; ii < K; ii++)
                for (jj = 0; jj < L; jj++)
                    C[i][j][ii][jj] = NNL + i + j + ii + jj;
    nloopi = NL;
    nloopj = NL;
    nloopii = NL;
    nloopjj = NL;

    for (i = 3; i < N - 3; i++)
        for (j = 3; j < M - 3; j++)
            for (ii = 3; ii < K - 3; ii++)
                for (jj = 3; jj < L - 3; jj++)
                    C[i][j][ii][jj] = C[i + 3][j][ii][jj] + C[i][j + 3][ii][jj] + C[i][j][ii + 3][jj] + C[i][j][ii][jj + 3] + C[i - 3][j][ii][jj] + C[i][j - 3][ii][jj] + C[i][j][ii - 3][jj] + C[i][j][ii][jj - 3] + C[i + 2][j][ii][jj] + C[i][j + 2][ii][jj] + C[i][j][ii + 2][jj] + C[i][j][ii][jj + 2] + C[i - 2][j][ii][jj] + C[i][j - 2][ii][jj] + C[i][j][ii - 2][jj] + C[i][j][ii][jj - 2] + C[i + 1][j][ii][jj] + C[i][j + 1][ii][jj] + C[i][j][ii + 1][jj] + C[i][j][ii][jj + 1] + C[i - 1][j][ii][jj] + C[i][j - 1][ii][jj] + C[i][j][ii - 1][jj] + C[i][j][ii][jj - 1];

    #pragma dvm actual(nloopi, C)
    #pragma dvm region inout(C), out(A)
    {
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj])
    for (jj = 0; jj < L; jj++)
        for (ii = 0; ii < K; ii++)
            for (j = 0; j < M; j++)
                for (i = 0; i < N; i++)
                    A[i][j][ii][jj] = NL + i + j + ii + jj;

    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) across(A[3:3][3:3][3:3][3:3])
    for (jj = 3; jj < L - 3; jj++)
        for (ii = 3; ii < K - 3; ii++)
            for (j = 3; j < M - 3; j++)
                for (i = 3; i < N - 3; i++)
                    A[i][j][ii][jj] = A[i + 3][j][ii][jj] + A[i][j + 3][ii][jj] + A[i][j][ii + 3][jj] + A[i][j][ii][jj + 3] + A[i - 3][j][ii][jj] + A[i][j - 3][ii][jj] + A[i][j][ii - 3][jj] + A[i][j][ii][jj - 3] + A[i + 2][j][ii][jj] + A[i][j + 2][ii][jj] + A[i][j][ii + 2][jj] + A[i][j][ii][jj + 2] + A[i - 2][j][ii][jj] + A[i][j - 2][ii][jj] + A[i][j][ii - 2][jj] + A[i][j][ii][jj - 2] + A[i + 1][j][ii][jj] + A[i][j + 1][ii][jj] + A[i][j][ii + 1][jj] + A[i][j][ii][jj + 1] + A[i - 1][j][ii][jj] + A[i][j - 1][ii][jj] + A[i][j][ii - 1][jj] + A[i][j][ii][jj - 1];
    }
    #pragma dvm get_actual(A)
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) reduction(min(nloopi), min(nloopj), min(nloopii), min(nloopjj))
    for (jj = 3; jj < L - 3; jj++)
        for (ii = 3; ii < K - 3; ii++)
            for (j = 3; j < M - 3; j++)
                for (i = 3; i < N - 3; i++)
                    if (A[i][j][ii][jj] != C[i][j][ii][jj]) {
                        nloopi = Min(nloopi, i);
                        nloopj = Min(nloopj, j);
                        nloopii = Min(nloopii, ii);
                        nloopjj = Min(nloopjj, jj);
                    }

    #pragma dvm get_actual(nloopi)
    if (nloopi == NL)
        ansyes(tname);
    else
        ansno(tname);

    #undef NL
    #undef N
    #undef M
    #undef K
    #undef L
}
/* ---------------------------------------------ACR4407*/
void acr4407()
{
    #define NL 1000
    #define N 16
    #define M 16
    #define K 16
    #define L 16
    char tname[] = "ACR4407 ";
    int nloopi, nloopj, nloopii, nloopjj;
    #pragma dvm array distribute[block][block][block][block], shadow[0:3][3:3][0:3][0:3]
    int A[N][M][K][L];
    int C[N][M][K][L];
    int NNL = NL;

    for (i = 0; i < N; i++)
        for (j = 0; j < M; j++)
            for (ii = 0; ii < K; ii++)
                for (jj = 0; jj < L; jj++)
                    C[i][j][ii][jj] = NNL + i + j + ii + jj;
    nloopi = NL;
    nloopj = NL;
    nloopii = NL;
    nloopjj = NL;

    for (i = 3; i < N - 3; i++)
        for (j = 3; j < M - 3; j++)
            for (ii = 3; ii < K - 3; ii++)
                for (jj = 3; jj < L - 3; jj++)
                    C[i][j][ii][jj] = C[i + 3][j][ii][jj] + C[i][j + 3][ii][jj] + C[i][j][ii + 3][jj] + C[i][j][ii][jj + 3] + C[i][j - 3][ii][jj] + C[i + 2][j][ii][jj] + C[i][j + 2][ii][jj] + C[i][j][ii + 2][jj] + C[i][j][ii][jj + 2] + C[i][j - 2][ii][jj] + C[i + 1][j][ii][jj] + C[i][j + 1][ii][jj] + C[i][j][ii + 1][jj] + C[i][j][ii][jj + 1] + C[i][j - 1][ii][jj];

    #pragma dvm actual(nloopi)
    #pragma dvm region
    {
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj])
    for (jj = 0; jj < L; jj++)
        for (ii = 0; ii < K; ii++)
            for (j = 0; j < M; j++)
                for (i = 0; i < N; i++)
                    A[i][j][ii][jj] = NL + i + j + ii + jj;

    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) across(A[0:3][3:3][0:3][0:3])
    for (jj = 3; jj < L - 3; jj++)
        for (ii = 3; ii < K - 3; ii++)
            for (j = 3; j < M - 3; j++)
                for (i = 3; i < N - 3; i++)
                    A[i][j][ii][jj] = A[i + 3][j][ii][jj] + A[i][j + 3][ii][jj] + A[i][j][ii + 3][jj] + A[i][j][ii][jj + 3] + A[i][j - 3][ii][jj] + A[i + 2][j][ii][jj] + A[i][j + 2][ii][jj] + A[i][j][ii + 2][jj] + A[i][j][ii][jj + 2] + A[i][j - 2][ii][jj] + A[i + 1][j][ii][jj] + A[i][j + 1][ii][jj] + A[i][j][ii + 1][jj] + A[i][j][ii][jj + 1] + A[i][j - 1][ii][jj];
    }
    #pragma dvm get_actual(A)
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) reduction(min(nloopi), min(nloopj), min(nloopii), min(nloopjj))
    for (jj = 3; jj < L - 3; jj++)
        for (ii = 3; ii < K - 3; ii++)
            for (j = 3; j < M - 3; j++)
                for (i = 3; i < N - 3; i++)
                    if (A[i][j][ii][jj] != C[i][j][ii][jj]) {
                        nloopi = Min(nloopi, i);
                        nloopj = Min(nloopj, j);
                        nloopii = Min(nloopii, ii);
                        nloopjj = Min(nloopjj, jj);
                    }

    #pragma dvm get_actual(nloopi)
    if (nloopi == NL)
        ansyes(tname);
    else
        ansno(tname);

    #undef NL
    #undef N
    #undef M
    #undef K
    #undef L
}
/* ---------------------------------------------ACR4408*/
void acr4408()
{
    #define NL 1000
    #define N 16
    #define M 16
    #define K 16
    #define L 16
    char tname[] = "ACR4408 ";
    int nloopi, nloopj, nloopii, nloopjj;
    #pragma dvm array distribute[block][block][block][block], shadow[0:3][3:3][0:3][3:0]
    int A[N][M][K][L];
    int C[N][M][K][L];
    int NNL = NL;

    for (i = 0; i < N; i++)
        for (j = 0; j < M; j++)
            for (ii = 0; ii < K; ii++)
                for (jj = 0; jj < L; jj++)
                    C[i][j][ii][jj] = NNL + i + j + ii + jj;
    nloopi = NL;
    nloopj = NL;
    nloopii = NL;
    nloopjj = NL;

    for (i = 3; i < N - 3; i++)
        for (j = 3; j < M - 3; j++)
            for (ii = 3; ii < K - 3; ii++)
                for (jj = 3; jj < L - 3; jj++)
                    C[i][j][ii][jj] = C[i + 3][j][ii][jj] + C[i][j + 3][ii][jj] + C[i][j][ii + 3][jj] + C[i][j][ii][jj - 3] + C[i + 2][j][ii][jj] + C[i][j + 2][ii][jj] + C[i][j][ii + 2][jj] + C[i][j][ii][jj - 2] + C[i + 1][j][ii][jj] + C[i][j + 1][ii][jj] + C[i][j][ii + 1][jj] + C[i][j][ii][jj - 1];

    #pragma dvm actual(nloopi, C)
    #pragma dvm region inout(C), out(A)
    {
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj])
    for (jj = 0; jj < L; jj++)
        for (ii = 0; ii < K; ii++)
            for (j = 0; j < M; j++)
                for (i = 0; i < N; i++)
                    A[i][j][ii][jj] = NL + i + j + ii + jj;

    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) across(A[0:3][0:3][0:3][3:0])
    for (jj = 3; jj < L - 3; jj++)
        for (ii = 3; ii < K - 3; ii++)
            for (j = 3; j < M - 3; j++)
                for (i = 3; i < N - 3; i++)
                    A[i][j][ii][jj] = A[i + 3][j][ii][jj] + A[i][j + 3][ii][jj] + A[i][j][ii + 3][jj] + A[i][j][ii][jj - 3] + A[i + 2][j][ii][jj] + A[i][j + 2][ii][jj] + A[i][j][ii + 2][jj] + A[i][j][ii][jj - 2] + A[i + 1][j][ii][jj] + A[i][j + 1][ii][jj] + A[i][j][ii + 1][jj] + A[i][j][ii][jj - 1];
    }
    #pragma dvm get_actual(A)
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) reduction(min(nloopi), min(nloopj), min(nloopii), min(nloopjj))
    for (jj = 3; jj < L - 3; jj++)
        for (ii = 3; ii < K - 3; ii++)
            for (j = 3; j < M - 3; j++)
                for (i = 3; i < N - 3; i++)
                    if (A[i][j][ii][jj] != C[i][j][ii][jj]) {
                        nloopi = Min(nloopi, i);
                        nloopj = Min(nloopj, j);
                        nloopii = Min(nloopii, ii);
                        nloopjj = Min(nloopjj, jj);
                    }

    #pragma dvm get_actual(nloopi)
    if (nloopi == NL)
        ansyes(tname);
    else
        ansno(tname);

    #undef NL
    #undef N
    #undef M
    #undef K
    #undef L
}
/* ---------------------------------------------ACR4409*/
void acr4409()
{
    #define NL 1000
    #define N 59
    #define M 59
    #define K 59
    #define L 59
    char tname[] = "ACR4409 ";
    int nloopi, nloopj, nloopii, nloopjj;
    #pragma dvm array distribute[block][block][block][block], shadow[11:11][11:11][11:11][11:11]
    int (*A)[M][K][L];
    int (*C)[M][K][L];
    int NNL = NL;
    A = malloc(N * M * K * L * sizeof(int));
    C = malloc(N * M * K * L * sizeof(int));

    for (i = 0; i < N; i++)
        for (j = 0; j < M; j++)
            for (ii = 0; ii < K; ii++)
                for (jj = 0; jj < L; jj++)
                    C[i][j][ii][jj] = NNL + i + j + ii + jj;
    nloopi = NL;
    nloopj = NL;
    nloopii = NL;
    nloopjj = NL;

    for (i = 11; i < N - 11; i++)
        for (j = 11; j < M - 11; j++)
            for (ii = 11; ii < K - 11; ii++)
                for (jj = 11; jj < L - 11; jj++)
                    C[i][j][ii][jj] = C[i + 11][j][ii][jj] + C[i][j + 11][ii][jj] + C[i][j][ii + 11][jj] + C[i][j][ii][jj + 11] + C[i - 11][j][ii][jj] + C[i][j - 11][ii][jj] + C[i][j][ii - 11][jj] + C[i][j][ii][jj - 11];

    #pragma dvm actual(nloopi, C)
    #pragma dvm region in(C)
    {
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj])
    for (jj = 0; jj < L; jj++)
        for (ii = 0; ii < K; ii++)
            for (j = 0; j < M; j++)
                for (i = 0; i < N; i++)
                    A[i][j][ii][jj] = NL + i + j + ii + jj;

    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) across(A[11:11][11:11][11:11][11:11])
    for (jj = 11; jj < L - 11; jj++)
        for (ii = 11; ii < K - 11; ii++)
            for (j = 11; j < M - 11; j++)
                for (i = 11; i < N - 11; i++)
                    A[i][j][ii][jj] = A[i + 11][j][ii][jj] + A[i][j + 11][ii][jj] + A[i][j][ii + 11][jj] + A[i][j][ii][jj + 11] + A[i - 11][j][ii][jj] + A[i][j - 11][ii][jj] + A[i][j][ii - 11][jj] + A[i][j][ii][jj - 11];
    }
    #pragma dvm get_actual(A)
    #pragma dvm parallel([jj][ii][j][i] on A[i][j][ii][jj]) reduction(min(nloopi), min(nloopj), min(nloopii), min(nloopjj))
    for (jj = 11; jj < L - 11; jj++)
        for (ii = 11; ii < K - 11; ii++)
            for (j = 11; j < M - 11; j++)
                for (i = 11; i < N - 11; i++)
                    if (A[i][j][ii][jj] != C[i][j][ii][jj]) {
                        nloopi = Min(nloopi, i);
                        nloopj = Min(nloopj, j);
                        nloopii = Min(nloopii, ii);
                        nloopjj = Min(nloopjj, jj);
                    }

    #pragma dvm get_actual(nloopi)
    if (nloopi == NL)
        ansyes(tname);
    else
        ansno(tname);

    free(C);
    free(A);
    #undef NL
    #undef N
    #undef M
    #undef K
    #undef L
}
/* ----------------------------------------------- */
void ansyes(const char name[])
{
    printf("%s  -  complete\n", name);
}

void ansno(const char name[])
{
    printf("%s  -  ***error\n", name);
}
