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

    public static long method297(String s)
    {
        long l = 0L;
        for(int i = 0; i < s.length() && i < 12; i++)
        {
            char c = s.charAt(i);
            l *= 37L;
            if(c >= 'A' && c <= 'Z')
                l += (1 + c) - 65;
            else
            if(c >= 'a' && c <= 'z')
                l += (1 + c) - 97;
            else
            if(c >= '0' && c <= '9')
                l += (27 + c) - 48;
        }

        for(; l % 37L == 0L && l != 0L; l /= 37L);
        return l;
    }

    public static String method298(int i, long l)
    {
        try
        {
            if(i <= 0)
                aBoolean377 = !aBoolean377;
            if(l <= 0L || l >= 0x5b5b57f8a98a5dd1L)
                return "invalid_name";
            if(l % 37L == 0L)
                return "invalid_name";
            int j = 0;
            char ac[] = new char[12];
            while(l != 0L) 
            {
                long l1 = l;
                l /= 37L;
                ac[11 - j++] = aCharArray384[(int)(l1 - l * 37L)];
            }
            return new String(ac, 12 - j, j);
        }
        catch(RuntimeException runtimeexception)
        {
            signlink.reporterror("80711, " + i + ", " + l + ", " + runtimeexception.toString());
        }
        throw new RuntimeException();
    }

    public static long method299(String s, int i)
    {
        s = s.toUpperCase();
        if(i != 0)
        {
            for(int j = 1; j > 0; j++);
        }
        long l = 0L;
        for(int k = 0; k < s.length(); k++)
        {
            l = (l * 61L + (long)s.charAt(k)) - 32L;
            l = l + (l >> 56) & 0xffffffffffffffL;
        }

        return l;
    }

    public static String method300(int i, int j)
    {
        if(i != 2)
        {
            for(int k = 1; k > 0; k++);
        }
        return (j >> 24 & 0xff) + "." + (j >> 16 & 0xff) + "." + (j >> 8 & 0xff) + "." + (j & 0xff);
    }

    public static String method301(boolean flag, String s)
    {
        if(!flag)
            anInt383 = -286;
        if(s.length() > 0)
        {
            char ac[] = s.toCharArray();
            for(int i = 0; i < ac.length; i++)
                if(ac[i] == '_')
                {
                    ac[i] = ' ';
                    if(i + 1 < ac.length && ac[i + 1] >= 'a' && ac[i + 1] <= 'z')
                        ac[i + 1] = (char)((ac[i + 1] + 65) - 97);
                }

            if(ac[0] >= 'a' && ac[0] <= 'z')
                ac[0] = (char)((ac[0] + 65) - 97);
            return new String(ac);
        } else
        {
            return s;
        }
    }

    public static String method302(String s, int i)
    {
        if(i != 3)
            anInt383 = -423;
        StringBuffer stringbuffer = new StringBuffer();
        for(int j = 0; j < s.length(); j++)
            stringbuffer.append("*");

        return stringbuffer.toString();
    }

    public static boolean aBoolean377 = true;
    public static byte aByte378 = 8;
    public static boolean aBoolean379 = true;
    public static int anInt380 = -138;
    public static int anInt381 = 8;
    public static int anInt382 = 148;
    public static int anInt383 = 7;
    public static final char aCharArray384[] = {
        '_', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 
        'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 
        't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', 
        '3', '4', '5', '6', '7', '8', '9'
    };

}
