// 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 Class31_Sub3_Sub3_Sub4_Sub2 extends Class31_Sub3_Sub3_Sub4
{

    public void method500(Class31_Sub3_Sub2 class31_sub3_sub2, int i)
    {
        class31_sub3_sub2.anInt1440 = 0;
        anInt1723 = class31_sub3_sub2.method422();
        anInt1737 = class31_sub3_sub2.method423();
        anInt1722 = class31_sub3_sub2.method423();
        aClass45_1731 = null;
        anInt1730 = 0;
        for(int j = 0; j < 12; j++)
        {
            int k = class31_sub3_sub2.method422();
            if(k == 0)
            {
                anIntArray1716[j] = 0;
                continue;
            }
            int i1 = class31_sub3_sub2.method422();
            anIntArray1716[j] = (k << 8) + i1;
            if(j == 0 && anIntArray1716[0] == 65535)
            {
                aClass45_1731 = Class45.method598(class31_sub3_sub2.method424());
                break;
            }
            if(anIntArray1716[j] >= 512 && anIntArray1716[j] - 512 < Class41.anInt616)
            {
                int l1 = Class41.method577(anIntArray1716[j] - 512).anInt610;
                if(l1 != 0)
                    anInt1730 = l1;
            }
        }

        for(int l = 0; l < 5; l++)
        {
            int j1 = class31_sub3_sub2.method422();
            if(j1 < 0 || j1 >= client.anIntArrayArray912[l].length)
                j1 = 0;
            anIntArray1727[l] = j1;
        }

        super.anInt1647 = class31_sub3_sub2.method424();
        if(super.anInt1647 == 65535)
            super.anInt1647 = -1;
        super.anInt1648 = class31_sub3_sub2.method424();
        if(super.anInt1648 == 65535)
            super.anInt1648 = -1;
        super.anInt1639 = class31_sub3_sub2.method424();
        if(super.anInt1639 == 65535)
            super.anInt1639 = -1;
        super.anInt1640 = class31_sub3_sub2.method424();
        if(super.anInt1640 == 65535)
            super.anInt1640 = -1;
        super.anInt1641 = class31_sub3_sub2.method424();
        if(super.anInt1641 == 65535)
            super.anInt1641 = -1;
        super.anInt1642 = class31_sub3_sub2.method424();
        if(super.anInt1642 == 65535)
            super.anInt1642 = -1;
        super.anInt1658 = class31_sub3_sub2.method424();
        if(super.anInt1658 == 65535)
            super.anInt1658 = -1;
        aString1729 = Class26.method301(true, Class26.method298(359, class31_sub3_sub2.method428(true)));
        anInt1714 = class31_sub3_sub2.method422();
        anInt1736 = class31_sub3_sub2.method424();
        aBoolean1712 = true;
        aLong1713 = 0L;
        int k1 = anIntArray1716[5];
        int i2 = anIntArray1716[9];
        anIntArray1716[5] = i2;
        anIntArray1716[9] = k1;
        for(int j2 = 0; j2 < 12; j2++)
        {
            aLong1713 <<= 4;
            if(anIntArray1716[j2] >= 256)
                aLong1713 += anIntArray1716[j2] - 256;
        }

        if(anIntArray1716[0] >= 256)
            aLong1713 += anIntArray1716[0] - 256 >> 4;
        if(anIntArray1716[1] >= 256)
            aLong1713 += anIntArray1716[1] - 256 >> 8;
        anIntArray1716[5] = k1;
        if(i <= 0)
            return;
        anIntArray1716[9] = i2;
        for(int k2 = 0; k2 < 5; k2++)
        {
            aLong1713 <<= 3;
            aLong1713 += anIntArray1727[k2];
        }

        aLong1713 <<= 1;
        aLong1713 += anInt1723;
    }

    public boolean method496(int i)
    {
        if(i != 21781)
        {
            for(int j = 1; j > 0; j++);
        }
        return aBoolean1712;
    }

    public Class31_Sub3_Sub3_Sub2 method501(boolean flag)
    {
        if(aClass45_1731 != null)
        {
            int i = -1;
            if(super.anInt1674 >= 0 && super.anInt1677 == 0)
                i = Class8.aClass8Array140[super.anInt1674].anIntArray142[super.anInt1675];
            else
            if(super.anInt1661 >= 0)
                i = Class8.aClass8Array140[super.anInt1661].anIntArray142[super.anInt1662];
            Class31_Sub3_Sub3_Sub2 class31_sub3_sub3_sub2 = aClass45_1731.method592(-1, (byte)0, i, null);
            return class31_sub3_sub3_sub2;
        }
        long l = aLong1713;
        int j = -1;
        int k = -1;
        int i1 = -1;
        int j1 = -1;
        if(super.anInt1674 >= 0 && super.anInt1677 == 0)
        {
            Class8 class8 = Class8.aClass8Array140[super.anInt1674];
            j = class8.anIntArray142[super.anInt1675];
            if(super.anInt1661 >= 0 && super.anInt1661 != super.anInt1647)
                k = Class8.aClass8Array140[super.anInt1661].anIntArray142[super.anInt1662];
            if(class8.anInt149 >= 0)
            {
                i1 = class8.anInt149;
                l += i1 - anIntArray1716[5] << 40;
            }
            if(class8.anInt150 >= 0)
            {
                j1 = class8.anInt150;
                l += j1 - anIntArray1716[3] << 48;
            }
        } else
        if(super.anInt1661 >= 0)
            j = Class8.aClass8Array140[super.anInt1661].anIntArray142[super.anInt1662];
        Class31_Sub3_Sub3_Sub2 class31_sub3_sub3_sub2_1 = (Class31_Sub3_Sub3_Sub2)aClass36_1721.method565(l);
        if(class31_sub3_sub3_sub2_1 == null)
        {
            boolean flag1 = false;
            for(int k1 = 0; k1 < 12; k1++)
            {
                int i2 = anIntArray1716[k1];
                if(j1 >= 0 && k1 == 3)
                    i2 = j1;
                if(i1 >= 0 && k1 == 5)
                    i2 = i1;
                if(i2 >= 256 && i2 < 512 && !Class5.aClass5Array104[i2 - 256].method174(0))
                    flag1 = true;
                if(i2 >= 512 && !Class41.method577(i2 - 512).method573(976, anInt1723))
                    flag1 = true;
            }

            if(flag1)
            {
                if(aLong1728 != -1L)
                    class31_sub3_sub3_sub2_1 = (Class31_Sub3_Sub3_Sub2)aClass36_1721.method565(aLong1728);
                if(class31_sub3_sub3_sub2_1 == null)
                    return null;
            }
        }
        if(class31_sub3_sub3_sub2_1 == null)
        {
            Class31_Sub3_Sub3_Sub2 aclass31_sub3_sub3_sub2[] = new Class31_Sub3_Sub3_Sub2[12];
            int l1 = 0;
            for(int j2 = 0; j2 < 12; j2++)
            {
                int k2 = anIntArray1716[j2];
                if(j1 >= 0 && j2 == 3)
                    k2 = j1;
                if(i1 >= 0 && j2 == 5)
                    k2 = i1;
                if(k2 >= 256 && k2 < 512)
                {
                    Class31_Sub3_Sub3_Sub2 class31_sub3_sub3_sub2_3 = Class5.aClass5Array104[k2 - 256].method175(18390);
                    if(class31_sub3_sub3_sub2_3 != null)
                        aclass31_sub3_sub3_sub2[l1++] = class31_sub3_sub3_sub2_3;
                }
                if(k2 >= 512)
                {
                    Class31_Sub3_Sub3_Sub2 class31_sub3_sub3_sub2_4 = Class41.method577(k2 - 512).method582((byte)-34, anInt1723);
                    if(class31_sub3_sub3_sub2_4 != null)
                        aclass31_sub3_sub3_sub2[l1++] = class31_sub3_sub3_sub2_4;
                }
            }

            class31_sub3_sub3_sub2_1 = new Class31_Sub3_Sub3_Sub2(aclass31_sub3_sub3_sub2, 3, l1);
            for(int l2 = 0; l2 < 5; l2++)
                if(anIntArray1727[l2] != 0)
                {
                    class31_sub3_sub3_sub2_1.method481(client.anIntArrayArray912[l2][0], client.anIntArrayArray912[l2][anIntArray1727[l2]]);
                    if(l2 == 1)
                        class31_sub3_sub3_sub2_1.method481(client.anIntArray1060[0], client.anIntArray1060[anIntArray1727[l2]]);
                }

            class31_sub3_sub3_sub2_1.method474(166);
            class31_sub3_sub3_sub2_1.method484(64, 850, -30, -50, -30, true);
            aClass36_1721.method566(l, true, class31_sub3_sub3_sub2_1);
            aLong1728 = l;
        }
        if(aBoolean1715)
            return class31_sub3_sub3_sub2_1;
        Class31_Sub3_Sub3_Sub2 class31_sub3_sub3_sub2_2 = Class31_Sub3_Sub3_Sub2.aClass31_Sub3_Sub3_Sub2_1539;
        if(!flag)
            throw new NullPointerException();
        class31_sub3_sub3_sub2_2.method469(940, Class32.method509(j, true) & Class32.method509(k, true), class31_sub3_sub3_sub2_1);
        if(j != -1 && k != -1)
            class31_sub3_sub3_sub2_2.method476(j, k, -40256, Class8.aClass8Array140[super.anInt1674].anIntArray146);
        else
        if(j != -1)
            class31_sub3_sub3_sub2_2.method475(257, j);
        class31_sub3_sub3_sub2_2.method471((byte)50);
        class31_sub3_sub3_sub2_2.anIntArrayArray1575 = null;
        class31_sub3_sub3_sub2_2.anIntArrayArray1574 = null;
        return class31_sub3_sub3_sub2_2;
    }

    public Class31_Sub3_Sub3_Sub2 method502(boolean flag)
    {
        if(!aBoolean1712)
            return null;
        if(aClass45_1731 != null)
            return aClass45_1731.method594(-384);
        boolean flag1 = false;
        for(int i = 0; i < 12; i++)
        {
            int j = anIntArray1716[i];
            if(j >= 256 && j < 512 && !Class5.aClass5Array104[j - 256].method176(2))
                flag1 = true;
            if(j >= 512 && !Class41.method577(j - 512).method584(anInt1723, 0))
                flag1 = true;
        }

        if(flag1)
            return null;
        Class31_Sub3_Sub3_Sub2 aclass31_sub3_sub3_sub2[] = new Class31_Sub3_Sub3_Sub2[12];
        if(!flag)
            anInt1738 = -499;
        int k = 0;
        for(int l = 0; l < 12; l++)
        {
            int i1 = anIntArray1716[l];
            if(i1 >= 256 && i1 < 512)
            {
                Class31_Sub3_Sub3_Sub2 class31_sub3_sub3_sub2_1 = Class5.aClass5Array104[i1 - 256].method177(709);
                if(class31_sub3_sub3_sub2_1 != null)
                    aclass31_sub3_sub3_sub2[k++] = class31_sub3_sub3_sub2_1;
            }
            if(i1 >= 512)
            {
                Class31_Sub3_Sub3_Sub2 class31_sub3_sub3_sub2_2 = Class41.method577(i1 - 512).method572((byte)9, anInt1723);
                if(class31_sub3_sub3_sub2_2 != null)
                    aclass31_sub3_sub3_sub2[k++] = class31_sub3_sub3_sub2_2;
            }
        }

        Class31_Sub3_Sub3_Sub2 class31_sub3_sub3_sub2 = new Class31_Sub3_Sub3_Sub2(aclass31_sub3_sub3_sub2, 3, k);
        for(int j1 = 0; j1 < 5; j1++)
            if(anIntArray1727[j1] != 0)
            {
                class31_sub3_sub3_sub2.method481(client.anIntArrayArray912[j1][0], client.anIntArrayArray912[j1][anIntArray1727[j1]]);
                if(j1 == 1)
                    class31_sub3_sub3_sub2.method481(client.anIntArray1060[0], client.anIntArray1060[anIntArray1727[j1]]);
            }

        return class31_sub3_sub3_sub2;
    }

    public Class31_Sub3_Sub3_Sub2 method461(byte byte0)
    {
        if(!aBoolean1712)
            return null;
        Class31_Sub3_Sub3_Sub2 class31_sub3_sub3_sub2 = method501(true);
        if(class31_sub3_sub3_sub2 == null)
            return null;
        super.anInt1652 = ((Class31_Sub3_Sub3) (class31_sub3_sub3_sub2)).anInt1454;
        class31_sub3_sub3_sub2.aBoolean1576 = true;
        if(aBoolean1715)
            return class31_sub3_sub3_sub2;
        if(super.anInt1627 != -1 && super.anInt1628 != -1)
        {
            Class3 class3 = Class3.aClass3Array73[super.anInt1627];
            Class31_Sub3_Sub3_Sub2 class31_sub3_sub3_sub2_2 = class3.method159();
            if(class31_sub3_sub3_sub2_2 != null)
            {
                Class31_Sub3_Sub3_Sub2 class31_sub3_sub3_sub2_3 = new Class31_Sub3_Sub3_Sub2(Class32.method509(super.anInt1628, true), class31_sub3_sub3_sub2_2, false, false, true);
                class31_sub3_sub3_sub2_3.method480(0, -super.anInt1631, false, 0);
                class31_sub3_sub3_sub2_3.method474(166);
                class31_sub3_sub3_sub2_3.method475(257, class3.aClass8_77.anIntArray142[super.anInt1628]);
                class31_sub3_sub3_sub2_3.anIntArrayArray1575 = null;
                class31_sub3_sub3_sub2_3.anIntArrayArray1574 = null;
                if(class3.anInt80 != 128 || class3.anInt81 != 128)
                    class31_sub3_sub3_sub2_3.method483(class3.anInt80, -39776, class3.anInt81, class3.anInt80);
                class31_sub3_sub3_sub2_3.method484(64 + class3.anInt83, 850 + class3.anInt84, -30, -50, -30, true);
                Class31_Sub3_Sub3_Sub2 aclass31_sub3_sub3_sub2_1[] = {
                    class31_sub3_sub3_sub2, class31_sub3_sub3_sub2_3
                };
                class31_sub3_sub3_sub2 = new Class31_Sub3_Sub3_Sub2(153, true, 2, aclass31_sub3_sub3_sub2_1);
            }
        }
        if(aClass31_Sub3_Sub3_Sub2_1720 != null)
        {
            if(client.anInt935 >= anInt1726)
                aClass31_Sub3_Sub3_Sub2_1720 = null;
            if(client.anInt935 >= anInt1725 && client.anInt935 < anInt1726)
            {
                Class31_Sub3_Sub3_Sub2 class31_sub3_sub3_sub2_1 = aClass31_Sub3_Sub3_Sub2_1720;
                class31_sub3_sub3_sub2_1.method480(anInt1717 - super.anInt1635, anInt1718 - anInt1724, false, anInt1719 - super.anInt1636);
                if(super.anInt1649 == 512)
                {
                    class31_sub3_sub3_sub2_1.method478((byte)93);
                    class31_sub3_sub3_sub2_1.method478((byte)93);
                    class31_sub3_sub3_sub2_1.method478((byte)93);
                } else
                if(super.anInt1649 == 1024)
                {
                    class31_sub3_sub3_sub2_1.method478((byte)93);
                    class31_sub3_sub3_sub2_1.method478((byte)93);
                } else
                if(super.anInt1649 == 1536)
                    class31_sub3_sub3_sub2_1.method478((byte)93);
                Class31_Sub3_Sub3_Sub2 aclass31_sub3_sub3_sub2[] = {
                    class31_sub3_sub3_sub2, class31_sub3_sub3_sub2_1
                };
                class31_sub3_sub3_sub2 = new Class31_Sub3_Sub3_Sub2(153, true, 2, aclass31_sub3_sub3_sub2);
                if(super.anInt1649 == 512)
                    class31_sub3_sub3_sub2_1.method478((byte)93);
                else
                if(super.anInt1649 == 1024)
                {
                    class31_sub3_sub3_sub2_1.method478((byte)93);
                    class31_sub3_sub3_sub2_1.method478((byte)93);
                } else
                if(super.anInt1649 == 1536)
                {
                    class31_sub3_sub3_sub2_1.method478((byte)93);
                    class31_sub3_sub3_sub2_1.method478((byte)93);
                    class31_sub3_sub3_sub2_1.method478((byte)93);
                }
                class31_sub3_sub3_sub2_1.method480(super.anInt1635 - anInt1717, anInt1724 - anInt1718, false, super.anInt1636 - anInt1719);
            }
        }
        class31_sub3_sub3_sub2.aBoolean1576 = true;
        if(byte0 != -99)
            throw new NullPointerException();
        else
            return class31_sub3_sub3_sub2;
    }

    public Class31_Sub3_Sub3_Sub4_Sub2()
    {
        aBoolean1712 = false;
        aBoolean1715 = false;
        anIntArray1716 = new int[12];
        anInt1722 = -1;
        anIntArray1727 = new int[5];
        aLong1728 = -1L;
        anInt1737 = -1;
        anInt1738 = 224;
    }

    public boolean aBoolean1712;
    public long aLong1713;
    public int anInt1714;
    public boolean aBoolean1715;
    public int anIntArray1716[];
    public int anInt1717;
    public int anInt1718;
    public int anInt1719;
    public Class31_Sub3_Sub3_Sub2 aClass31_Sub3_Sub3_Sub2_1720;
    public static Class36 aClass36_1721 = new Class36(260, false);
    public int anInt1722;
    public int anInt1723;
    public int anInt1724;
    public int anInt1725;
    public int anInt1726;
    public int anIntArray1727[];
    public long aLong1728;
    public String aString1729;
    public int anInt1730;
    public Class45 aClass45_1731;
    public int anInt1732;
    public int anInt1733;
    public int anInt1734;
    public int anInt1735;
    public int anInt1736;
    public int anInt1737;
    public int anInt1738;

}
