/* Class155 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.io.File;
import java.io.IOException;

public class Class155
{
    public static Class155 aClass155_1885;
    static Class155 aClass155_1886;
    static Class155 aClass155_1887;
    static Class155 aClass155_1888 = new Class155(3, 1);
    public int anInt1889;
    public static Class155 aClass155_1890;
    public static Class155 aClass155_1891;
    public static Class155 aClass155_1892;
    public static Class155 aClass155_1893;
    public static Class155 aClass155_1894;
    public int anInt1895;
    
    Class155(int i, int i_0_) {
	anInt1889 = i * -497207171;
	anInt1895 = i_0_ * -2122512711;
    }
    
    static {
	aClass155_1886 = new Class155(8, 2);
	aClass155_1887 = new Class155(0, 4);
	aClass155_1894 = new Class155(4, 1);
	aClass155_1885 = new Class155(6, 2);
	aClass155_1890 = new Class155(5, 3);
	aClass155_1891 = new Class155(2, 4);
	aClass155_1892 = new Class155(7, 2);
	aClass155_1893 = new Class155(1, 4);
    }
    
    public static Class668 method2506(String string, String string_1_,
				      boolean bool, int i) {
	File file = new File(Class506.aFile6992,
			     new StringBuilder().append("preferences").append
				 (string).append
				 (".dat").toString());
	do {
	    if (file.exists()) {
		Class668 class668;
		try {
		    Class668 class668_2_ = new Class668(file, "rw", 10000L);
		    class668 = class668_2_;
		} catch (IOException ioexception) {
		    break;
		}
		return class668;
	    }
	} while (false);
	String string_3_ = "";
	if (33 == Class245.anInt2822 * -387990887)
	    string_3_ = "_rc";
	else if (Class245.anInt2822 * -387990887 == 34)
	    string_3_ = "_wip";
	File file_4_ = new File(Class349.aString3703,
				new StringBuilder().append("jagex_").append
				    (string_1_).append
				    ("_preferences").append
				    (string).append
				    (string_3_).append
				    (".dat").toString());
	do {
	    if (!bool && file_4_.exists()) {
		Class668 class668;
		try {
		    Class668 class668_5_ = new Class668(file_4_, "rw", 10000L);
		    class668 = class668_5_;
		} catch (IOException ioexception) {
		    break;
		}
		return class668;
	    }
	} while (false);
	Class668 class668;
	try {
	    Class668 class668_6_ = new Class668(file, "rw", 10000L);
	    class668 = class668_6_;
	} catch (IOException ioexception) {
	    throw new RuntimeException();
	}
	return class668;
    }
    
    static final void method2507(Class612 class612, int i) {
	int i_7_
	    = (((Class612) class612).anIntArray8021
	       [(((Class612) class612).anInt8022 -= 201091009) * -40654783]);
	Class211 class211 = Class156.method2513(i_7_, (short) -32086);
	Class203 class203 = Class163_Sub20.aClass203Array9719[i_7_ >> 16];
	Class510.method6310(class211, class203, class612, 1490075773);
    }
    
    static final void method2508(Class612 class612, byte i) {
	int i_8_
	    = (((Class612) class612).anIntArray8021
	       [(((Class612) class612).anInt8022 -= 201091009) * -40654783]);
	int i_9_ = client.aClass464Array10949[i_8_].method5714(-1111476713);
	((Class612) class612).anIntArray8021
	    [(((Class612) class612).anInt8022 += 201091009) * -40654783 - 1]
	    = i_9_ == 5 ? 1 : 0;
    }
    
    static final void method2509(Class612 class612, int i) {
	((Class612) class612).anInt8022 -= 804364036;
	client.aShort10911
	    = (short) (((Class612) class612).anIntArray8021
		       [((Class612) class612).anInt8022 * -40654783]);
	if (client.aShort10911 <= 0)
	    client.aShort10911 = (short) 1;
	client.aShort10964
	    = (short) (((Class612) class612).anIntArray8021
		       [-40654783 * ((Class612) class612).anInt8022 + 1]);
	if (client.aShort10964 <= 0)
	    client.aShort10964 = (short) 32767;
	else if (client.aShort10964 < client.aShort10911)
	    client.aShort10964 = client.aShort10911;
	client.aShort10965
	    = (short) (((Class612) class612).anIntArray8021
		       [((Class612) class612).anInt8022 * -40654783 + 2]);
	if (client.aShort10965 <= 0)
	    client.aShort10965 = (short) 1;
	client.aShort10848
	    = (short) (((Class612) class612).anIntArray8021
		       [-40654783 * ((Class612) class612).anInt8022 + 3]);
	if (client.aShort10848 <= 0)
	    client.aShort10848 = (short) 32767;
	else if (client.aShort10848 < client.aShort10965)
	    client.aShort10848 = client.aShort10965;
    }
    
    static final void method2510(Class612 class612, int i) {
	((Class612) class612).anIntArray8021
	    [(((Class612) class612).anInt8022 += 201091009) * -40654783 - 1]
	    = Class590_Sub1_Sub2_Sub1.aClass192_11703
		  .method2905((short) -10119);
    }
}
