// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

import sign.signlink;

public class Class4
{

    public Class4(boolean flag, int i, int j)
    {
        anInt87 = 8;
        anInt88 = 4;
        aBoolean89 = false;
        anInt90 = -610;
        anInt91 = -205;
        aBoolean92 = false;
        anInt93 = 964;
        aBoolean94 = false;
        aBoolean95 = true;
        if(flag)
        {
            throw new NullPointerException();
        } else
        {
            anInt96 = 0;
            anInt97 = 0;
            anInt98 = j;
            anInt99 = i;
            anIntArrayArray100 = new int[anInt98][anInt99];
            method160();
            return;
        }
    }

    public void method160()
    {
        for(int i = 0; i < anInt98; i++)
        {
            for(int j = 0; j < anInt99; j++)
                if(i == 0 || j == 0 || i == anInt98 - 1 || j == anInt99 - 1)
                    anIntArrayArray100[i][j] = 0xffffff;
                else
                    anIntArrayArray100[i][j] = 0x1000000;

        }

    }

    public void method161(int i, boolean flag, byte byte0, int j, int k, int l)
    {
        if(byte0 != 41)
            anInt93 = 361;
        l -= anInt96;
        j -= anInt97;
        if(k == 0)
        {
            if(i == 0)
            {
                method164(l, j, 128);
                method164(l - 1, j, 8);
            }
            if(i == 1)
            {
                method164(l, j, 2);
                method164(l, j + 1, 32);
            }
            if(i == 2)
            {
                method164(l, j, 8);
                method164(l + 1, j, 128);
            }
            if(i == 3)
            {
                method164(l, j, 32);
                method164(l, j - 1, 2);
            }
        }
        if(k == 1 || k == 3)
        {
            if(i == 0)
            {
                method164(l, j, 1);
                method164(l - 1, j + 1, 16);
            }
            if(i == 1)
            {
                method164(l, j, 4);
                method164(l + 1, j + 1, 64);
            }
            if(i == 2)
            {
                method164(l, j, 16);
                method164(l + 1, j - 1, 1);
            }
            if(i == 3)
            {
                method164(l, j, 64);
                method164(l - 1, j - 1, 4);
            }
        }
        if(k == 2)
        {
            if(i == 0)
            {
                method164(l, j, 130);
                method164(l - 1, j, 8);
                method164(l, j + 1, 32);
            }
            if(i == 1)
            {
                method164(l, j, 10);
                method164(l, j + 1, 32);
                method164(l + 1, j, 128);
            }
            if(i == 2)
            {
                method164(l, j, 40);
                method164(l + 1, j, 128);
                method164(l, j - 1, 2);
            }
            if(i == 3)
            {
                method164(l, j, 160);
                method164(l, j - 1, 2);
                method164(l - 1, j, 8);
            }
        }
        if(flag)
        {
            if(k == 0)
            {
                if(i == 0)
                {
                    method164(l, j, 0x10000);
                    method164(l - 1, j, 4096);
                }
                if(i == 1)
                {
                    method164(l, j, 1024);
                    method164(l, j + 1, 16384);
                }
                if(i == 2)
                {
                    method164(l, j, 4096);
                    method164(l + 1, j, 0x10000);
                }
                if(i == 3)
                {
                    method164(l, j, 16384);
                    method164(l, j - 1, 1024);
                }
            }
            if(k == 1 || k == 3)
            {
                if(i == 0)
                {
                    method164(l, j, 512);
                    method164(l - 1, j + 1, 8192);
                }
                if(i == 1)
                {
                    method164(l, j, 2048);
                    method164(l + 1, j + 1, 32768);
                }
                if(i == 2)
                {
                    method164(l, j, 8192);
                    method164(l + 1, j - 1, 512);
                }
                if(i == 3)
                {
                    method164(l, j, 32768);
                    method164(l - 1, j - 1, 2048);
                }
            }
            if(k == 2)
            {
                if(i == 0)
                {
                    method164(l, j, 0x10400);
                    method164(l - 1, j, 4096);
                    method164(l, j + 1, 16384);
                }
                if(i == 1)
                {
                    method164(l, j, 5120);
                    method164(l, j + 1, 16384);
                    method164(l + 1, j, 0x10000);
                }
                if(i == 2)
                {
                    method164(l, j, 20480);
                    method164(l + 1, j, 0x10000);
                    method164(l, j - 1, 1024);
                }
                if(i == 3)
                {
                    method164(l, j, 0x14000);
                    method164(l, j - 1, 1024);
                    method164(l - 1, j, 4096);
                }
            }
        }
    }

    public void method162(int i, int j, int k, int l, int i1, boolean flag, int j1)
    {
        int k1 = 256;
        if(flag)
            k1 += 0x20000;
        i -= anInt96;
        j1 -= anInt97;
        if(l != 0)
            aBoolean94 = !aBoolean94;
        if(j == 1 || j == 3)
        {
            int l1 = k;
            k = i1;
            i1 = l1;
        }
        for(int i2 = i; i2 < i + k; i2++)
            if(i2 >= 0 && i2 < anInt98)
            {
                for(int j2 = j1; j2 < j1 + i1; j2++)
                    if(j2 >= 0 && j2 < anInt99)
                        method164(i2, j2, k1);

            }

    }

    public void method163(int i, int j, int k)
    {
        i -= anInt96;
        k -= anInt97;
        if(j < anInt88 || j > anInt88)
        {
            return;
        } else
        {
            anIntArrayArray100[i][k] |= 0x200000;
            return;
        }
    }

    public void method164(int i, int j, int k)
    {
        anIntArrayArray100[i][j] |= k;
    }

    public void method165(boolean flag, int i, boolean flag1, int j, int k, int l)
    {
        k -= anInt96;
        if(flag1)
            aBoolean95 = !aBoolean95;
        i -= anInt97;
        if(l == 0)
        {
            if(j == 0)
            {
                method167(k, 128, aBoolean89, i);
                method167(k - 1, 8, aBoolean89, i);
            }
            if(j == 1)
            {
                method167(k, 2, aBoolean89, i);
                method167(k, 32, aBoolean89, i + 1);
            }
            if(j == 2)
            {
                method167(k, 8, aBoolean89, i);
                method167(k + 1, 128, aBoolean89, i);
            }
            if(j == 3)
            {
                method167(k, 32, aBoolean89, i);
                method167(k, 2, aBoolean89, i - 1);
            }
        }
        if(l == 1 || l == 3)
        {
            if(j == 0)
            {
                method167(k, 1, aBoolean89, i);
                method167(k - 1, 16, aBoolean89, i + 1);
            }
            if(j == 1)
            {
                method167(k, 4, aBoolean89, i);
                method167(k + 1, 64, aBoolean89, i + 1);
            }
            if(j == 2)
            {
                method167(k, 16, aBoolean89, i);
                method167(k + 1, 1, aBoolean89, i - 1);
            }
            if(j == 3)
            {
                method167(k, 64, aBoolean89, i);
                method167(k - 1, 4, aBoolean89, i - 1);
            }
        }
        if(l == 2)
        {
            if(j == 0)
            {
                method167(k, 130, aBoolean89, i);
                method167(k - 1, 8, aBoolean89, i);
                method167(k, 32, aBoolean89, i + 1);
            }
            if(j == 1)
            {
                method167(k, 10, aBoolean89, i);
                method167(k, 32, aBoolean89, i + 1);
                method167(k + 1, 128, aBoolean89, i);
            }
            if(j == 2)
            {
                method167(k, 40, aBoolean89, i);
                method167(k + 1, 128, aBoolean89, i);
                method167(k, 2, aBoolean89, i - 1);
            }
            if(j == 3)
            {
                method167(k, 160, aBoolean89, i);
                method167(k, 2, aBoolean89, i - 1);
                method167(k - 1, 8, aBoolean89, i);
            }
        }
        if(flag)
        {
            if(l == 0)
            {
                if(j == 0)
                {
                    method167(k, 0x10000, aBoolean89, i);
                    method167(k - 1, 4096, aBoolean89, i);
                }
                if(j == 1)
                {
                    method167(k, 1024, aBoolean89, i);
                    method167(k, 16384, aBoolean89, i + 1);
                }
                if(j == 2)
                {
                    method167(k, 4096, aBoolean89, i);
                    method167(k + 1, 0x10000, aBoolean89, i);
                }
                if(j == 3)
                {
                    method167(k, 16384, aBoolean89, i);
                    method167(k, 1024, aBoolean89, i - 1);
                }
            }
            if(l == 1 || l == 3)
            {
                if(j == 0)
                {
                    method167(k, 512, aBoolean89, i);
                    method167(k - 1, 8192, aBoolean89, i + 1);
                }
                if(j == 1)
                {
                    method167(k, 2048, aBoolean89, i);
                    method167(k + 1, 32768, aBoolean89, i + 1);
                }
                if(j == 2)
                {
                    method167(k, 8192, aBoolean89, i);
                    method167(k + 1, 512, aBoolean89, i - 1);
                }
                if(j == 3)
                {
                    method167(k, 32768, aBoolean89, i);
                    method167(k - 1, 2048, aBoolean89, i - 1);
                }
            }
            if(l == 2)
            {
                if(j == 0)
                {
                    method167(k, 0x10400, aBoolean89, i);
                    method167(k - 1, 4096, aBoolean89, i);
                    method167(k, 16384, aBoolean89, i + 1);
                }
                if(j == 1)
                {
                    method167(k, 5120, aBoolean89, i);
                    method167(k, 16384, aBoolean89, i + 1);
                    method167(k + 1, 0x10000, aBoolean89, i);
                }
                if(j == 2)
                {
                    method167(k, 20480, aBoolean89, i);
                    method167(k + 1, 0x10000, aBoolean89, i);
                    method167(k, 1024, aBoolean89, i - 1);
                }
                if(j == 3)
                {
                    method167(k, 0x14000, aBoolean89, i);
                    method167(k, 1024, aBoolean89, i - 1);
                    method167(k - 1, 4096, aBoolean89, i);
                }
            }
        }
    }

    public void method166(int i, boolean flag, int j, int k, int l, int i1, int j1)
    {
        if(l != 0)
            anInt87 = 65;
        int k1 = 256;
        if(flag)
            k1 += 0x20000;
        k -= anInt96;
        i -= anInt97;
        if(j == 1 || j == 3)
        {
            int l1 = i1;
            i1 = j1;
            j1 = l1;
        }
        for(int i2 = k; i2 < k + i1; i2++)
            if(i2 >= 0 && i2 < anInt98)
            {
                for(int j2 = i; j2 < i + j1; j2++)
                    if(j2 >= 0 && j2 < anInt99)
                        method167(i2, k1, aBoolean89, j2);

            }

    }

    public void method167(int i, int j, boolean flag, int k)
    {
        if(flag)
            aBoolean95 = !aBoolean95;
        anIntArrayArray100[i][k] &= 0xffffff - j;
    }

    public void method168(int i, int j, int k)
    {
        k -= anInt96;
        i -= anInt97;
        anIntArrayArray100[k][i] &= 0xdfffff;
        if(j >= 0)
            anInt86 = -345;
    }

    public boolean method169(int i, int j, int k, int l, int i1, int j1, int k1)
    {
        if(l >= 0)
            throw new NullPointerException();
        if(k == j1 && i1 == i)
            return true;
        k -= anInt96;
        i1 -= anInt97;
        j1 -= anInt96;
        i -= anInt97;
        if(k1 == 0)
            if(j == 0)
            {
                if(k == j1 - 1 && i1 == i)
                    return true;
                if(k == j1 && i1 == i + 1 && (anIntArrayArray100[k][i1] & 0x1280120) == 0)
                    return true;
                if(k == j1 && i1 == i - 1 && (anIntArrayArray100[k][i1] & 0x1280102) == 0)
                    return true;
            } else
            if(j == 1)
            {
                if(k == j1 && i1 == i + 1)
                    return true;
                if(k == j1 - 1 && i1 == i && (anIntArrayArray100[k][i1] & 0x1280108) == 0)
                    return true;
                if(k == j1 + 1 && i1 == i && (anIntArrayArray100[k][i1] & 0x1280180) == 0)
                    return true;
            } else
            if(j == 2)
            {
                if(k == j1 + 1 && i1 == i)
                    return true;
                if(k == j1 && i1 == i + 1 && (anIntArrayArray100[k][i1] & 0x1280120) == 0)
                    return true;
                if(k == j1 && i1 == i - 1 && (anIntArrayArray100[k][i1] & 0x1280102) == 0)
                    return true;
            } else
            if(j == 3)
            {
                if(k == j1 && i1 == i - 1)
                    return true;
                if(k == j1 - 1 && i1 == i && (anIntArrayArray100[k][i1] & 0x1280108) == 0)
                    return true;
                if(k == j1 + 1 && i1 == i && (anIntArrayArray100[k][i1] & 0x1280180) == 0)
                    return true;
            }
        if(k1 == 2)
            if(j == 0)
            {
                if(k == j1 - 1 && i1 == i)
                    return true;
                if(k == j1 && i1 == i + 1)
                    return true;
                if(k == j1 + 1 && i1 == i && (anIntArrayArray100[k][i1] & 0x1280180) == 0)
                    return true;
                if(k == j1 && i1 == i - 1 && (anIntArrayArray100[k][i1] & 0x1280102) == 0)
                    return true;
            } else
            if(j == 1)
            {
                if(k == j1 - 1 && i1 == i && (anIntArrayArray100[k][i1] & 0x1280108) == 0)
                    return true;
                if(k == j1 && i1 == i + 1)
                    return true;
                if(k == j1 + 1 && i1 == i)
                    return true;
                if(k == j1 && i1 == i - 1 && (anIntArrayArray100[k][i1] & 0x1280102) == 0)
                    return true;
            } else
            if(j == 2)
            {
                if(k == j1 - 1 && i1 == i && (anIntArrayArray100[k][i1] & 0x1280108) == 0)
                    return true;
                if(k == j1 && i1 == i + 1 && (anIntArrayArray100[k][i1] & 0x1280120) == 0)
                    return true;
                if(k == j1 + 1 && i1 == i)
                    return true;
                if(k == j1 && i1 == i - 1)
                    return true;
            } else
            if(j == 3)
            {
                if(k == j1 - 1 && i1 == i)
                    return true;
                if(k == j1 && i1 == i + 1 && (anIntArrayArray100[k][i1] & 0x1280120) == 0)
                    return true;
                if(k == j1 + 1 && i1 == i && (anIntArrayArray100[k][i1] & 0x1280180) == 0)
                    return true;
                if(k == j1 && i1 == i - 1)
                    return true;
            }
        if(k1 == 9)
        {
            if(k == j1 && i1 == i + 1 && (anIntArrayArray100[k][i1] & 0x20) == 0)
                return true;
            if(k == j1 && i1 == i - 1 && (anIntArrayArray100[k][i1] & 2) == 0)
                return true;
            if(k == j1 - 1 && i1 == i && (anIntArrayArray100[k][i1] & 8) == 0)
                return true;
            if(k == j1 + 1 && i1 == i && (anIntArrayArray100[k][i1] & 0x80) == 0)
                return true;
        }
        return false;
    }

    public boolean method170(int i, int j, int k, int l, int i1, int j1, int k1)
    {
        if(k1 != 0)
            throw new NullPointerException();
        if(i == i1 && j1 == k)
            return true;
        i -= anInt96;
        j1 -= anInt97;
        i1 -= anInt96;
        k -= anInt97;
        if(l == 6 || l == 7)
        {
            if(l == 7)
                j = j + 2 & 3;
            if(j == 0)
            {
                if(i == i1 + 1 && j1 == k && (anIntArrayArray100[i][j1] & 0x80) == 0)
                    return true;
                if(i == i1 && j1 == k - 1 && (anIntArrayArray100[i][j1] & 2) == 0)
                    return true;
            } else
            if(j == 1)
            {
                if(i == i1 - 1 && j1 == k && (anIntArrayArray100[i][j1] & 8) == 0)
                    return true;
                if(i == i1 && j1 == k - 1 && (anIntArrayArray100[i][j1] & 2) == 0)
                    return true;
            } else
            if(j == 2)
            {
                if(i == i1 - 1 && j1 == k && (anIntArrayArray100[i][j1] & 8) == 0)
                    return true;
                if(i == i1 && j1 == k + 1 && (anIntArrayArray100[i][j1] & 0x20) == 0)
                    return true;
            } else
            if(j == 3)
            {
                if(i == i1 + 1 && j1 == k && (anIntArrayArray100[i][j1] & 0x80) == 0)
                    return true;
                if(i == i1 && j1 == k + 1 && (anIntArrayArray100[i][j1] & 0x20) == 0)
                    return true;
            }
        }
        if(l == 8)
        {
            if(i == i1 && j1 == k + 1 && (anIntArrayArray100[i][j1] & 0x20) == 0)
                return true;
            if(i == i1 && j1 == k - 1 && (anIntArrayArray100[i][j1] & 2) == 0)
                return true;
            if(i == i1 - 1 && j1 == k && (anIntArrayArray100[i][j1] & 8) == 0)
                return true;
            if(i == i1 + 1 && j1 == k && (anIntArrayArray100[i][j1] & 0x80) == 0)
                return true;
        }
        return false;
    }

    public boolean method171(int i, int j, int k, int l, byte byte0, int i1, int j1, 
            int k1)
    {
        int l1 = (l + j1) - 1;
        int i2 = (k + k1) - 1;
        if(byte0 != 1)
            anInt88 = -135;
        if(j >= l && j <= l1 && i >= k && i <= i2)
            return true;
        if(j == l - 1 && i >= k && i <= i2 && (anIntArrayArray100[j - anInt96][i - anInt97] & 8) == 0 && (i1 & 8) == 0)
            return true;
        if(j == l1 + 1 && i >= k && i <= i2 && (anIntArrayArray100[j - anInt96][i - anInt97] & 0x80) == 0 && (i1 & 2) == 0)
            return true;
        if(i == k - 1 && j >= l && j <= l1 && (anIntArrayArray100[j - anInt96][i - anInt97] & 2) == 0 && (i1 & 4) == 0)
            return true;
        return i == i2 + 1 && j >= l && j <= l1 && (anIntArrayArray100[j - anInt96][i - anInt97] & 0x20) == 0 && (i1 & 1) == 0;
    }

    public int anInt86;
    public int anInt87;
    public int anInt88;
    public boolean aBoolean89;
    public int anInt90;
    public int anInt91;
    public boolean aBoolean92;
    public int anInt93;
    public boolean aBoolean94;
    public boolean aBoolean95;
    public int anInt96;
    public int anInt97;
    public int anInt98;
    public int anInt99;
    public int anIntArrayArray100[][];
}
