// 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 Class25
{

    public Class25(boolean flag)
    {
        anInt366 = -39349;
        aBoolean367 = false;
        aBoolean368 = true;
        anInt369 = 105;
        aClass39Array374 = new Class39[10];
        if(flag)
            aBoolean368 = !aBoolean368;
    }

    public static void method291(Class31_Sub3_Sub2 class31_sub3_sub2, int i)
    {
        aByteArray372 = new byte[0x6baa8];
        aClass31_Sub3_Sub2_373 = new Class31_Sub3_Sub2((byte)114, aByteArray372);
        Class39.method568();
        if(i != 5)
            return;
        do
        {
            int j = class31_sub3_sub2.method424();
            if(j == 65535)
                return;
            aClass25Array370[j] = new Class25(aBoolean364);
            aClass25Array370[j].method293(class31_sub3_sub2, (byte)59);
            anIntArray371[j] = aClass25Array370[j].method294(aBoolean365);
        } while(true);
    }

    public static Class31_Sub3_Sub2 method292(int i, int j, int k)
    {
        if(j < 7 || j > 7)
            aBoolean363 = !aBoolean363;
        if(aClass25Array370[k] != null)
        {
            Class25 class25 = aClass25Array370[k];
            return class25.method295(i, false);
        } else
        {
            return null;
        }
    }

    public void method293(Class31_Sub3_Sub2 class31_sub3_sub2, byte byte0)
    {
        for(int i = 0; i < 10; i++)
        {
            int j = class31_sub3_sub2.method422();
            if(j != 0)
            {
                class31_sub3_sub2.anInt1440--;
                aClass39Array374[i] = new Class39();
                aClass39Array374[i].method571(class31_sub3_sub2, (byte)59);
            }
        }

        anInt375 = class31_sub3_sub2.method424();
        anInt376 = class31_sub3_sub2.method424();
        if(byte0 != 59)
        {
            for(int k = 1; k > 0; k++);
        }
    }

    public int method294(boolean flag)
    {
        if(flag)
            aBoolean367 = !aBoolean367;
        int i = 0x98967f;
        for(int j = 0; j < 10; j++)
            if(aClass39Array374[j] != null && aClass39Array374[j].anInt591 / 20 < i)
                i = aClass39Array374[j].anInt591 / 20;

        if(anInt375 < anInt376 && anInt375 / 20 < i)
            i = anInt375 / 20;
        if(i == 0x98967f || i == 0)
            return 0;
        for(int k = 0; k < 10; k++)
            if(aClass39Array374[k] != null)
                aClass39Array374[k].anInt591 -= i * 20;

        if(anInt375 < anInt376)
        {
            anInt375 -= i * 20;
            anInt376 -= i * 20;
        }
        return i;
    }

    public Class31_Sub3_Sub2 method295(int i, boolean flag)
    {
        int j = method296(i);
        aClass31_Sub3_Sub2_373.anInt1440 = 0;
        aClass31_Sub3_Sub2_373.method416(0x52494646);
        aClass31_Sub3_Sub2_373.method417(36 + j, 6);
        aClass31_Sub3_Sub2_373.method416(0x57415645);
        aClass31_Sub3_Sub2_373.method416(0x666d7420);
        aClass31_Sub3_Sub2_373.method417(16, 6);
        aClass31_Sub3_Sub2_373.method414(true, 1);
        aClass31_Sub3_Sub2_373.method414(true, 1);
        aClass31_Sub3_Sub2_373.method417(22050, 6);
        aClass31_Sub3_Sub2_373.method417(22050, 6);
        aClass31_Sub3_Sub2_373.method414(true, 1);
        aClass31_Sub3_Sub2_373.method414(true, 8);
        aClass31_Sub3_Sub2_373.method416(0x64617461);
        aClass31_Sub3_Sub2_373.method417(j, 6);
        if(flag)
        {
            throw new NullPointerException();
        } else
        {
            aClass31_Sub3_Sub2_373.anInt1440 += j;
            return aClass31_Sub3_Sub2_373;
        }
    }

    public int method296(int i)
    {
        int j = 0;
        for(int k = 0; k < 10; k++)
            if(aClass39Array374[k] != null && aClass39Array374[k].anInt590 + aClass39Array374[k].anInt591 > j)
                j = aClass39Array374[k].anInt590 + aClass39Array374[k].anInt591;

        if(j == 0)
            return 0;
        int l = (22050 * j) / 1000;
        int i1 = (22050 * anInt375) / 1000;
        int j1 = (22050 * anInt376) / 1000;
        if(i1 < 0 || i1 > l || j1 < 0 || j1 > l || i1 >= j1)
            i = 0;
        int k1 = l + (j1 - i1) * (i - 1);
        for(int l1 = 44; l1 < k1 + 44; l1++)
            aByteArray372[l1] = -128;

        for(int i2 = 0; i2 < 10; i2++)
            if(aClass39Array374[i2] != null)
            {
                int j2 = (aClass39Array374[i2].anInt590 * 22050) / 1000;
                int i3 = (aClass39Array374[i2].anInt591 * 22050) / 1000;
                int ai[] = aClass39Array374[i2].method569(j2, aClass39Array374[i2].anInt590);
                for(int l3 = 0; l3 < j2; l3++)
                    aByteArray372[l3 + i3 + 44] += (byte)(ai[l3] >> 8);

            }

        if(i > 1)
        {
            i1 += 44;
            j1 += 44;
            l += 44;
            int k2 = (k1 += 44) - l;
            for(int j3 = l - 1; j3 >= j1; j3--)
                aByteArray372[j3 + k2] = aByteArray372[j3];

            for(int k3 = 1; k3 < i; k3++)
            {
                int l2 = (j1 - i1) * k3;
                for(int i4 = i1; i4 < j1; i4++)
                    aByteArray372[i4 + l2] = aByteArray372[i4];

            }

            k1 -= 44;
        }
        return k1;
    }

    public static boolean aBoolean363;
    public static boolean aBoolean364;
    public static boolean aBoolean365;
    public int anInt366;
    public boolean aBoolean367;
    public boolean aBoolean368;
    public int anInt369;
    public static Class25 aClass25Array370[] = new Class25[5000];
    public static int anIntArray371[] = new int[5000];
    public static byte aByteArray372[];
    public static Class31_Sub3_Sub2 aClass31_Sub3_Sub2_373;
    public Class39 aClass39Array374[];
    public int anInt375;
    public int anInt376;

}
