/*    ALIGN44
TESTING align CLAUSE*/

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

static void align441();
static void align442();
static void align443();
static void align444();
static void align445();
static void align446();
static void align447();
static void align448();

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

static int NL = 10000;
static int ER = 100000;
static int s, cs, erri, i, j, n, m, k, l, ia, ja, na, ma, ib, jb, nb, mb, Avalue, Bvalue;

int main(int an, char **as)
{
    printf("=== START OF ALIGN44 ======================\n");
            /* ALIGN arrB[i][j][k][l] WITH arrA[i][j][k][l] normal*/
    align441();
            /* ALIGN arrB[i][j][k][l] WITH arrA[l][i][j][k] rotation*/
    align442();
            /* ALIGN arrB[i][j][k][l] WITH arrA[i][2* j][k][3*l] stretching*/
    align443();
             /* ALIGN arrB[i][j][k][l] WITH arrA[i+2][j][k][l+3] shift*/
    align444();
             /* ALIGN arrB[i][j][k][l] WITH arrA[i][j][-k+8][l+8] reverse*/
//    align445();
             /* ALIGN arrB[i][j][][l] WITH arrA[i][j][2][l]
                compression and replication*/
    align446();
             /* ALIGN arrB[][j][k][i] WITH arrA[i][j][][k]
                compression and replication*/
    align447();
             /* ALIGN arrB[][i][j][] WITH arrA[i][j][1][3]
                compression and replication*/
    align448();
    printf("=== END OF ALIGN44 ========================\n");
    return 0;
}
/* ---------------------------------------------ALIGN441*/
/* ALIGN arrB[i][j][n][m] WITH arrA[i][ j][n][m] normal*/
void align441()
{
/*     parameters for ALIGN arrB[i][j][n][m]
                      WITH arrA[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm]*/
    #define AN1 5
    #define AN2 5
    #define AN3 5
    #define AN4 5
    #define BN1 2
    #define BN2 2
    #define BN3 2
    #define BN4 2
    int k1i = 1, k2i = 0, k3i = 0, k4i = 0, li = 0;
    int k1j = 0, k2j = 1, k3j = 0, k4j = 0, lj = 0;
    int k1n = 0, k2n = 0, k3n = 1, k4n = 0, ln = 0;
    int k1m = 0, k2m = 0, k3m = 0, k4m = 1, lm = 0;

    #pragma dvm array distribute[block][block][block][block]
    int A4[AN1][AN2][AN3][AN4];
    #pragma dvm array align([i][j][n][m] with A4[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm])
    int B4[BN1][BN2][BN3][BN4];
    char tname[] = "align441";

    erri = ER;
    s = 0;

    #pragma dvm actual(erri, s)
    #pragma dvm region local(A4, B4)
    {
    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    B4[i][j][n][m] = 0;
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m]) private(ib, jb, nb, mb)
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                {
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    if (((i - li) == (((i - li) / k1i) * k1i)) &&
                        ((j - lj) == (((j - lj) / k2j) * k2j)) &&
                        ((n - ln) == (((n - ln) / k3n) * k3n)) &&
                        ((m - lm) == (((m - lm) / k4m) * k4m)) &&
                        (((i - li) / k1i) >= 0) &&
                        (((j - lj) / k2j) >= 0) &&
                        (((n - ln) / k3n) >= 0) &&
                        (((m - lm) / k4m) >= 0) &&
                        (((i - li) / k1i) < BN1) &&
                        (((j - lj) / k2j) < BN2) &&
                        (((n - ln) / k3n) < BN3) &&
                        (((m - lm) / k4m) < BN4))
                    {
                        ib = (i - li) / k1i;
                        jb = (j - lj) / k2j;
                        nb = (n - ln) / k3n;
                        mb = (m - lm) / k4m;
                        B4[ib][jb][nb][mb] = ib * NL / 10 + jb * NL / 100 + nb * NL / 1000 + mb;
                    }
                }

    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m]) reduction(min(erri), sum(s))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                {
                    int val = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    s = s + B4[i][j][n][m];
                    if (B4[i][j][n][m] !=val)
                        if (erri > val) erri = val;
                }

    }
    #pragma dvm get_actual(erri, s)

    cs = 0;
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    cs = cs + i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    if ((erri == ER) && (s == cs))
        ansyes(tname);
    else
        ansno(tname);
    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef BN1
    #undef BN2
    #undef BN3
    #undef BN4
}
/* ---------------------------------------------ALIGN442*/
/* ALIGN arrB[i][j][k][l] WITH arrA[l][i][j][k]  rotation*/
void align442()
{
/*     parameters for ALIGN arrB[i][j][n][m]
                      WITH arrA4[k4i*n+li][k1j*i+lj][k2n*j+ln][k3m*n+lm]*/
    #define AN1 4
    #define AN2 4
    #define AN3 4
    #define AN4 4
    #define BN1 4
    #define BN2 4
    #define BN3 4
    #define BN4 4
    int k1i = 0, k2i = 0, k3i = 0, k4i = 1, li = 0;
    int k1j = 1, k2j = 0, k3j = 0, k4j = 0, lj = 0;
    int k1n = 0, k2n = 1, k3n = 0, k4n = 0, ln = 0;
    int k1m = 0, k2m = 0, k3m = 1, k4m = 0, lm = 0;

    #pragma dvm array distribute[block][block][block][block]
    int A4[AN1][AN2][AN3][AN4];
    #pragma dvm array align([i][j][n][m] with A4[k4i*m+li][k1j*i+lj][k2n*j+ln][k3m*n+lm])
    int B4[BN1][BN2][BN3][BN4];
    char tname[] = "align442";

    erri = ER;
    s = 0;

    #pragma dvm actual(erri, s)
    #pragma dvm region local(A4, B4)
    {
    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    B4[i][j][n][m] = 0;
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m]) private(ib, jb, nb, mb)
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                {
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    if (((i - li) == (((i - li) / k4i) * k4i)) &&
                        ((j - lj) == (((j - lj) / k1j) * k1j)) &&
                        ((n - ln) == (((n - ln) / k2n) * k2n)) &&
                        ((m - lm) == (((m - lm) / k3m) * k3m)) &&
                        (((i - li) / k4i) >= 0) &&
                        (((j - lj) / k1j) >= 0) &&
                        (((n - ln) / k2n) >= 0) &&
                        (((m - lm) / k3m) >= 0) &&
                        (((i - li) / k4i) < BN4) &&
                        (((j - lj) / k1j) < BN1) &&
                        (((n - ln) / k2n) < BN2) &&
                        (((m - lm) / k3m) < BN3))
                    {
                        mb = (i - li) / k4i;
                        ib = (j - lj) / k1j;
                        jb = (n - ln) / k2n;
                        nb = (m - lm) / k3m;
                        B4[ib][jb][nb][mb] = ib * NL / 10 + jb * NL / 100 + nb * NL / 1000 + mb;
                    }
                }

    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m]) reduction(min(erri), sum(s))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                {
                    int val = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    s = s + B4[i][j][n][m];
                    if (B4[i][j][n][m] !=val)
                        if (erri > val) erri = val;
                }

    }
    #pragma dvm get_actual(erri, s)

    cs = 0;
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    cs = cs + i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    if ((erri == ER) && (s == cs))
        ansyes(tname);
    else
        ansno(tname);
    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef BN1
    #undef BN2
    #undef BN3
    #undef BN4
}
/* ---------------------------------------------ALIGN443*/
/* ALIGN arrB[i][j][k][l] WITH arrA[i][2* j][k][3*l] stretching*/
void align443()
{
/*     parameters for ALIGN arrB[i][j][n][m]
                      WITH arrA[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm]*/
    #define AN1 5
    #define AN2 4
    #define AN3 3
    #define AN4 7
    #define BN1 3
    #define BN2 2
    #define BN3 2
    #define BN4 3
    int k1i = 1, k2i = 0, k3i = 0, k4i = 0, li = 0;
    int k1j = 0, k2j = 2, k3j = 0, k4j = 0, lj = 0;
    int k1n = 0, k2n = 0, k3n = 1, k4n = 0, ln = 0;
    int k1m = 0, k2m = 0, k3m = 0, k4m = 3, lm = 0;

    #pragma dvm array distribute[block][block][block][block]
    int A4[AN1][AN2][AN3][AN4];
    #pragma dvm array align([i][j][n][m] with A4[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm])
    int B4[BN1][BN2][BN3][BN4];
    char tname[] = "align443";

    erri = ER;
    s = 0;

    #pragma dvm actual(erri, s)
    #pragma dvm region local(A4, B4)
    {
    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    B4[i][j][n][m] = 0;
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m]) private(ib, jb, nb, mb)
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                {
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    if (((i - li) == (((i - li) / k1i) * k1i)) &&
                        ((j - lj) == (((j - lj) / k2j) * k2j)) &&
                        ((n - ln) == (((n - ln) / k3n) * k3n)) &&
                        ((m - lm) == (((m - lm) / k4m) * k4m)) &&
                        (((i - li) / k1i) >= 0) &&
                        (((j - lj) / k2j) >= 0) &&
                        (((n - ln) / k3n) >= 0) &&
                        (((m - lm) / k4m) >= 0) &&
                        (((i - li) / k1i) < BN1) &&
                        (((j - lj) / k2j) < BN2) &&
                        (((n - ln) / k3n) < BN3) &&
                        (((m - lm) / k4m) < BN4))
                    {
                        ib = (i - li) / k1i;
                        jb = (j - lj) / k2j;
                        nb = (n - ln) / k3n;
                        mb = (m - lm) / k4m;
                        B4[ib][jb][nb][mb] = ib * NL / 10 + jb * NL / 100 + nb * NL / 1000 + mb;
                    }
                }

    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m]) reduction(min(erri), sum(s))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                {
                    int val = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    s = s + B4[i][j][n][m];
                    if (B4[i][j][n][m] !=val)
                        if (erri > val) erri = val;
                }

    }
    #pragma dvm get_actual(erri, s)

    cs = 0;
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    cs = cs + i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    if ((erri == ER) && (s == cs))
        ansyes(tname);
    else
        ansno(tname);
    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef BN1
    #undef BN2
    #undef BN3
    #undef BN4
}
/* ---------------------------------------------ALIGN444*/
/* ALIGN arrB[i][j][k][l] WITH arrA[i+2][j][k][l+3] shift*/
void align444()
{
/*     parameters for ALIGN arrB[i][j][n][m]
                      WITH arrA[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm]*/
    #define AN1 4
    #define AN2 4
    #define AN3 3
    #define AN4 6
    #define BN1 2
    #define BN2 2
    #define BN3 2
    #define BN4 2
    int k1i = 1, k2i = 0, k3i = 0, k4i = 0, li = 2;
    int k1j = 0, k2j = 1, k3j = 0, k4j = 0, lj = 0;
    int k1n = 0, k2n = 0, k3n = 1, k4n = 0, ln = 0;
    int k1m = 0, k2m = 0, k3m = 0, k4m = 1, lm = 3;

    #pragma dvm array distribute[block][block][block][block]
    int A4[AN1][AN2][AN3][AN4];
    #pragma dvm array align([i][j][n][m] with A4[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm])
    int B4[BN1][BN2][BN3][BN4];
    char tname[] = "align444";

    erri = ER;
    s = 0;

    #pragma dvm actual(erri, s)
    #pragma dvm region local(A4, B4)
    {
    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    B4[i][j][n][m] = 0;
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m]) private(ib, jb, nb, mb)
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                {
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    if (((i - li) == (((i - li) / k1i) * k1i)) &&
                        ((j - lj) == (((j - lj) / k2j) * k2j)) &&
                        ((n - ln) == (((n - ln) / k3n) * k3n)) &&
                        ((m - lm) == (((m - lm) / k4m) * k4m)) &&
                        (((i - li) / k1i) >= 0) &&
                        (((j - lj) / k2j) >= 0) &&
                        (((n - ln) / k3n) >= 0) &&
                        (((m - lm) / k4m) >= 0) &&
                        (((i - li) / k1i) < BN1) &&
                        (((j - lj) / k2j) < BN2) &&
                        (((n - ln) / k3n) < BN3) &&
                        (((m - lm) / k4m) < BN4))
                    {
                        ib = (i - li) / k1i;
                        jb = (j - lj) / k2j;
                        nb = (n - ln) / k3n;
                        mb = (m - lm) / k4m;
                        B4[ib][jb][nb][mb] = ib * NL / 10 + jb * NL / 100 + nb * NL / 1000 + mb;
                    }
                }

    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m]) reduction(min(erri), sum(s))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                {
                    int val = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    s = s + B4[i][j][n][m];
                    if (B4[i][j][n][m] !=val)
                        if (erri > val) erri = val;
                }

    }
    #pragma dvm get_actual(erri, s)

    cs = 0;
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    cs = cs + i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    if ((erri == ER) && (s == cs))
        ansyes(tname);
    else
        ansno(tname);
    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef BN1
    #undef BN2
    #undef BN3
    #undef BN4
}
/* ---------------------------------------------ALIGN445*/
/* ALIGN arrB[i][j][k][l] WITH arrA[i][j][-k+4][-l+3] reverse*/
void align445()
{
/*     parameters for ALIGN arrB[i][j][n][m]
                      WITH arrA[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm]*/
    #define AN1 4
    #define AN2 4
    #define AN3 8
    #define AN4 6
    #define BN1 3
    #define BN2 3
    #define BN3 5
    #define BN4 4
    int k1i = 1, k2i = 0, k3i = 0, k4i = 0, li = 0;
    int k1j = 0, k2j = 1, k3j = 0, k4j = 0, lj = 0;
    int k1n = 0, k2n = 0, k3n = -1, k4n = 0, ln = 4;
    int k1m = 0, k2m = 0, k3m = 0, k4m = -1, lm = 3;

    #pragma dvm array distribute[block][block][block][block]
    int A4[AN1][AN2][AN3][AN4];
    #pragma dvm array align([i][j][n][m] with A4[k1i*i+li][k2j*j+lj][k3n*n+ln][k4m*m+lm])
    int B4[BN1][BN2][BN3][BN4];
    char tname[] = "align445";

    erri = ER;
    s = 0;

    #pragma dvm actual(erri, s)
    #pragma dvm region local(A4, B4)
    {
    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    B4[i][j][n][m] = 0;
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m]) private(ib, jb, nb, mb)
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                {
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    if (((i - li) == (((i - li) / k1i) * k1i)) &&
                        ((j - lj) == (((j - lj) / k2j) * k2j)) &&
                        ((n - ln) == (((n - ln) / k3n) * k3n)) &&
                        ((m - lm) == (((m - lm) / k4m) * k4m)) &&
                        (((i - li) / k1i) >= 0) &&
                        (((j - lj) / k2j) >= 0) &&
                        (((n - ln) / k3n) >= 0) &&
                        (((m - lm) / k4m) >= 0) &&
                        (((i - li) / k1i) < BN1) &&
                        (((j - lj) / k2j) < BN2) &&
                        (((n - ln) / k3n) < BN3) &&
                        (((m - lm) / k4m) < BN4))
                    {
                        ib = (i - li) / k1i;
                        jb = (j - lj) / k2j;
                        nb = (n - ln) / k3n;
                        mb = (m - lm) / k4m;
                        B4[ib][jb][nb][mb] = ib * NL / 10 + jb * NL / 100 + nb * NL / 1000 + mb;
                    }
                }

    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m]) reduction(min(erri), sum(s))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                {
                    int val = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    s = s + B4[i][j][n][m];
                    if (B4[i][j][n][m] !=val)
                        if (erri > val) erri = val;
                }

    }
    #pragma dvm get_actual(erri, s)

    cs = 0;
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    cs = cs + i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    if ((erri == ER) && (s == cs))
        ansyes(tname);
    else
        ansno(tname);
    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef BN1
    #undef BN2
    #undef BN3
    #undef BN4
}
/* ---------------------------------------------ALIGN446*/
/* ALIGN arrB[i][j][][l] WITH arrA[i][j][2][l]
                compression and replication*/
void align446()
{
/*    parameters for ALIGN arrB[i][j][][m] WITH arrA4[k1i*i+li][k2j*j+lj][ln][k4m*m+lm]*/
    #define AN1 4
    #define AN2 4
    #define AN3 4
    #define AN4 4
    #define BN1 2
    #define BN2 2
    #define BN3 2
    #define BN4 2
    int k1i = 1, k2i = 0, k3i = 0, k4i = 0, li  = 0;
    int k1j = 0, k2j = 1, k3j = 0, k4j = 0, lj  = 0;
    int k1n = 0, k2n = 0, k3n = 0, k4n = 0, ln  = 2;
    int k1m = 0, k2m = 0, k3m = 0, k4m = 1, lm  = 0;

    #pragma dvm array distribute[block][block][block][block]
    int A4[AN1][AN2][AN3][AN4];
    #pragma dvm array align([i][j][][m] with A4[k1i*i+li][k2j*j+lj][ln][k4m*m+lm])
    int B4[BN1][BN2][BN3][BN4];
    char tname[] = "align446";

    erri = ER;
    s = 0;

    #pragma dvm actual(erri, s)
    #pragma dvm region local(A4, B4)
    {
    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    B4[i][j][n][m] = 0;
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m]) private(ib, jb, nb, mb, k)
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                {
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    if (n == ln)
                    {
                        for (k = 0; k < BN3; k++)
                        {
                            if (((i - li) == (((i - li) / k1i) * k1i)) &&
                                ((j - lj) == (((j - lj) / k2j) * k2j)) &&
                                ((m - lm) == (((m - lm) / k4m) * k4m)) &&
                                (((i - li) / k1i) >= 0) &&
                                (((j - lj) / k2j) >= 0) &&
                                (((m - lm) / k4m) >= 0) &&
                                (((i - li) / k1i) < BN1) &&
                                (((j - lj) / k2j) < BN2) &&
                                (((m - lm) / k4m) < BN4))
                            {
                                ib = (i - li) / k1i;
                                jb = (j - lj) / k2j;
                                nb = k;
                                mb = (m - lm) / k4m;
                                B4[ib][jb][nb][mb] = ib * NL / 10 + jb * NL / 100 + nb * NL / 1000 + mb;
                            }
                        }
                    }
                }

    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m]) reduction(min(erri), sum(s))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                {
                    int val = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    s = s + B4[i][j][n][m];
                    if (B4[i][j][n][m] !=val)
                        if (erri > val) erri = val;
                }

    }
    #pragma dvm get_actual(erri, s)

    cs = 0;
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    cs = cs + i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    if ((erri == ER) && (s == cs))
        ansyes(tname);
    else
        ansno(tname);
    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef BN1
    #undef BN2
    #undef BN3
    #undef BN4
}
/* ---------------------------------------------ALIGN447*/
/* ALIGN arrB[][j][k][i] WITH arrA[i][j][][k]
                compression and replication*/
void align447()
{
/*   parameters for ALIGN arrB[][j][n][i] WITH arrA4[k1i*i+li][k2j*j+lj][][k3m*n+lm]*/
    #define AN1 4
    #define AN2 4
    #define AN3 4
    #define AN4 4
    #define BN1 4
    #define BN2 4
    #define BN3 4
    #define BN4 4
    int k1i = 1, k2i = 0, k3i = 0, k4i = 0, li = 0;
    int k1j = 0, k2j = 1, k3j = 0, k4j = 0, lj = 0;
    int k1n = 0, k2n = 0, k3n = 0, k4n = 0, ln = 0;
    int k1m = 0, k2m = 0, k3m = 1, k4m = 0, lm = 0;

    #pragma dvm array distribute[block][block][block][block]
    int A4[AN1][AN2][AN3][AN4];
    #pragma dvm array align([][j][n][i] with A4[k1i*i+li][k2j*j+lj][][k3m*n+lm])
    int B4[BN1][BN2][BN3][BN4];
    char tname[] = "align447";

    erri = ER;
    s = 0;

    #pragma dvm actual(erri, s)
    #pragma dvm region local(A4, B4)
    {
    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    B4[i][j][n][m] = 0;
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m]) private(ib, jb, nb, mb, k)
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                {
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    for (k = 0; k < BN1; k++)
                    {
                        if (((i - li) == (((i - li) / k1i) * k1i)) &&
                            ((j - lj) == (((j - lj) / k2j) * k2j)) &&
                            ((m - lm) == (((m - lm) / k3m) * k3m)) &&
                            (((i - li) / k1i) >= 0) &&
                            (((j - lj) / k2j) >= 0) &&
                            (((m - lm) / k3m) >= 0) &&
                            (((i - li) / k1i) < BN4) &&
                            (((j - lj) / k2j) < BN2) &&
                            (((m - lm) / k3m) < BN3))
                        {
                            mb = (i - li) / k1i;
                            jb = (j - lj) / k2j;
                            ib = k;
                            nb = (m - lm) / k3m;
                            B4[ib][jb][nb][mb] = ib * NL / 10 + jb * NL / 100 + nb * NL / 1000 + mb;
                        }
                    }
                }

    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m]) reduction(min(erri), sum(s))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                {
                    int val = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    s = s + B4[i][j][n][m];
                    if (B4[i][j][n][m] !=val)
                        if (erri > val) erri = val;
                }

    }
    #pragma dvm get_actual(erri, s)

    cs = 0;
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    cs = cs + i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    if ((erri == ER) && (s == cs))
        ansyes(tname);
    else
        ansno(tname);
    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef BN1
    #undef BN2
    #undef BN3
    #undef BN4
}
/* ---------------------------------------------ALIGN448*/
/* ALIGN arrB[][i][j][] WITH arrA[i][j][1][3]
   compression and replication*/
void align448()
{
/*     parameters for ALIGN arrB[][i][j][]
                      WITH arrA[k1i*i+li][k2j*j+lj][ln][lm]*/
    #define AN1 4
    #define AN2 4
    #define AN3 4
    #define AN4 6
    #define BN1 4
    #define BN2 4
    #define BN3 4
    #define BN4 4
    int k1i = 1, k2i = 0, k3i = 0, k4i = 0, li = 0;
    int k1j = 0, k2j = 1, k3j = 0, k4j = 0, lj = 0;
    int k1n = 0, k2n = 0, k3n = 0, k4n = 0, ln = 1;
    int k1m = 0, k2m = 0, k3m = 0, k4m = 0, lm = 3;

    #pragma dvm array distribute[block][block][block][block]
    int A4[AN1][AN2][AN3][AN4];
    #pragma dvm array align([][i][j][] with A4[k1i*i+li][k2j*j+lj][ln][lm])
    int B4[BN1][BN2][BN3][BN4];
    char tname[] = "align448";

    erri = ER;
    s = 0;

    #pragma dvm actual(erri, s)
    #pragma dvm region local(A4, B4)
    {
    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m])
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    B4[i][j][n][m] = 0;
    #pragma dvm parallel([i][j][n][m] on A4[i][j][n][m]) private(ib, jb, nb, mb, k, l)
    for (i = 0; i < AN1; i++)
        for (j = 0; j < AN2; j++)
            for (n = 0; n < AN3; n++)
                for (m = 0; m < AN4; m++)
                {
                    A4[i][j][n][m] = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    if ((n == ln) && (m == lm))
                    {
                        for (k = 0; k < BN1; k++)
                            for (l = 0; l < BN4; l++)
                            {
                                if (((i - li) == (((i - li) / k1i) * k1i)) &&
                                    ((j - lj) == (((j - lj) / k2j) * k2j)) &&
                                    (((i - li) / k1i) >= 0) &&
                                    (((j - lj) / k2j) >= 0) &&
                                    (((i - li) / k1i) < BN2) &&
                                    (((j - lj) / k2j) < BN3))
                                {
                                    ib = k;
                                    jb = (i - li) / k1i;
                                    nb = (j - lj) / k2j;
                                    mb = l;
                                    B4[ib][jb][nb][mb] = ib * NL / 10 + jb * NL / 100 + nb * NL / 1000 + mb;
                                }
                            }
                    }
                }

    #pragma dvm parallel([i][j][n][m] on B4[i][j][n][m]) reduction(min(erri), sum(s))
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                {
                    int val = i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
                    s = s + B4[i][j][n][m];
                    if (B4[i][j][n][m] !=val)
                        if (erri > val) erri = val;
                }

    }
    #pragma dvm get_actual(erri, s)

    cs = 0;
    for (i = 0; i < BN1; i++)
        for (j = 0; j < BN2; j++)
            for (n = 0; n < BN3; n++)
                for (m = 0; m < BN4; m++)
                    cs = cs + i * NL / 10 + j * NL / 100 + n * NL / 1000 + m;
    if ((erri == ER) && (s == cs))
        ansyes(tname);
    else
        ansno(tname);
    #undef AN1
    #undef AN2
    #undef AN3
    #undef AN4
    #undef BN1
    #undef BN2
    #undef BN3
    #undef BN4
}

void ansyes(const char name[])
{
    printf("%s  -  complete\n", name);
}

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