package Network;


public class G
{

    public G(String s)
    {
        II = 0;
        Z = 0;
        equals = 0L;
        length = 0L;
        charAt = new Object[2];
        length(charAt, s);
    }

    private int append()
    {
        int i = 0;
        if((toString[Z] & 1 << II) != 0)
            i = 1;
        II++;
        if(II > 7)
        {
            II = 0;
            Z++;
            substring = Z == toString.length;
        }
        return i;
    }

    private int charAt(int i, int j)
    {
        int k = 0;
        int l = 1;
        int i1 = 1 << j - 1;
        for(; j > 0; j--)
        {
            if((i & l) != 0)
                k += i1;
            l <<= 1;
            i1 >>= 1;
        }

        return k;
    }

    public final synchronized String I(byte abyte0[])
    {
        if(abyte0 == null)
            return null;
        StringBuffer stringbuffer = new StringBuffer((abyte0.length * 100) / 60);
        toString = abyte0;
        II = 0;
        Z = 0;
        substring = false;
        Object aobj[] = charAt;
        do
        {
            if(substring)
                break;
            aobj = (Object[])(Object[])aobj[append()];
            if(aobj[0] == null)
            {
                if(aobj[1] == append)
                {
                    int i = 0;
                    for(int j = 0; j < 16; j++)
                        i += append() << j;

                    stringbuffer.append((char)i);
                } else
                {
                    stringbuffer.append((String)aobj[1]);
                }
                aobj = charAt;
            }
        } while(true);
        String s = stringbuffer.toString();
        length += s.length();
        equals += abyte0.length;
        return s;
    }

    private boolean equals(Object aobj[], String s, int i, int j)
    {
        if(j == 0)
        {
            aobj[1] = s;
            return aobj[0] == null;
        }
        if(aobj[0] == null)
        {
            if(aobj[1] != null)
                return false;
            aobj[0] = ((Object) (new Object[2]));
            aobj[1] = ((Object) (new Object[2]));
        }
        return equals((Object[])(Object[])aobj[i & 1], s, i >> 1, j - 1);
    }

    private void length(Object aobj[], String s)
    {
        int i = 0;
        int j = s.length();
        int l = 1;
        int i1 = -33;
        boolean flag = false;
        boolean flag1 = false;
        int k1;
        for(; i < j; i += k1 + 1)
        {
            boolean flag2 = false;
            int k = s.charAt(i);
            if(k == 255)
            {
                k = s.charAt(i + 1) * 256 + s.charAt(i + 2);
                i += 2;
                boolean flag3 = true;
            }
            k1 = k / 21 + 1;
            int j1 = k % 21;
            if((l & 1) == 0)
            {
                l++;
                for(; i1 < j1; i1++)
                    l <<= 1;

            } else
            {
                while((l & 1) == 1) 
                {
                    l >>= 1;
                    i1--;
                }
                l++;
                for(; i1 < j1; i1++)
                    l <<= 1;

            }
            int l1 = charAt(l, j1);
            String s1 = s.substring(i + 1, i + k1 + 1);
            
            if(k1 == 3 && s1.equals("\\\\\\"))
                append = s1;
            equals(aobj, s1, l1, j1);
        }

    }

    private Object append;
    private Object charAt[];
    private long equals;
    private long length;
    private boolean substring;
    private byte toString[];
    private int II;
    private int Z;
}