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

    public static String method562(Class31_Sub3_Sub2 class31_sub3_sub2, int i, int j)
    {
        int k = 0;
        int l = -1;
        for(int i1 = 0; i1 < j; i1++)
        {
            int j1 = class31_sub3_sub2.method422();
            int k1 = j1 >> 4 & 0xf;
            if(l == -1)
            {
                if(k1 < 13)
                    aCharArray557[k++] = aCharArray559[k1];
                else
                    l = k1;
            } else
            {
                aCharArray557[k++] = aCharArray559[((l << 4) + k1) - 195];
                l = -1;
            }
            k1 = j1 & 0xf;
            if(l == -1)
            {
                if(k1 < 13)
                    aCharArray557[k++] = aCharArray559[k1];
                else
                    l = k1;
            } else
            {
                aCharArray557[k++] = aCharArray559[((l << 4) + k1) - 195];
                l = -1;
            }
        }

        boolean flag = true;
        i = 56 / i;
        for(int l1 = 0; l1 < k; l1++)
        {
            char c = aCharArray557[l1];
            if(flag && c >= 'a' && c <= 'z')
            {
                aCharArray557[l1] += '\uFFE0';
                flag = false;
            }
            if(c == '.' || c == '!' || c == '?')
                flag = true;
        }

        return new String(aCharArray557, 0, k);
    }

    public static void method563(String s, Class31_Sub3_Sub2 class31_sub3_sub2, boolean flag)
    {
        if(s.length() > 80)
            s = s.substring(0, 80);
        s = s.toLowerCase();
        if(flag)
            return;
        int i = -1;
        for(int j = 0; j < s.length(); j++)
        {
            char c = s.charAt(j);
            int k = 0;
            for(int l = 0; l < aCharArray559.length; l++)
            {
                if(c != aCharArray559[l])
                    continue;
                k = l;
                break;
            }

            if(k > 12)
                k += 195;
            if(i == -1)
            {
                if(k < 13)
                    i = k;
                else
                    class31_sub3_sub2.method412(k);
            } else
            if(k < 13)
            {
                class31_sub3_sub2.method412((i << 4) + k);
                i = -1;
            } else
            {
                class31_sub3_sub2.method412((i << 4) + (k >> 4));
                i = k & 0xf;
            }
        }

        if(i != -1)
            class31_sub3_sub2.method412(i << 4);
    }

    public static String method564(String s, int i)
    {
        if(i != 0)
        {
            throw new NullPointerException();
        } else
        {
            aClass31_Sub3_Sub2_558.anInt1440 = 0;
            method563(s, aClass31_Sub3_Sub2_558, false);
            int j = aClass31_Sub3_Sub2_558.anInt1440;
            aClass31_Sub3_Sub2_558.anInt1440 = 0;
            String s1 = method562(aClass31_Sub3_Sub2_558, 555, j);
            return s1;
        }
    }

    public static char aCharArray557[] = new char[100];
    public static Class31_Sub3_Sub2 aClass31_Sub3_Sub2_558 = new Class31_Sub3_Sub2((byte)114, new byte[100]);
    public static char aCharArray559[] = {
        ' ', 'e', 't', 'a', 'o', 'i', 'h', 'n', 's', 'r', 
        'd', 'l', 'u', 'm', 'w', 'c', 'y', 'f', 'g', 'p', 
        'b', 'v', 'k', 'x', 'j', 'q', 'z', '0', '1', '2', 
        '3', '4', '5', '6', '7', '8', '9', ' ', '!', '?', 
        '.', ',', ':', ';', '(', ')', '-', '&', '*', '\\', 
        '\'', '@', '#', '+', '=', '\243', '$', '%', '"', '[', 
        ']'
    };

}
