/* Class341_Sub2 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;

public class Class341_Sub2 extends Class341
{
    long aLong10022;
    static final float aFloat10023 = 2.0F;
    Class334 aClass334_10024;
    volatile boolean aBool10025 = false;
    Thread aThread10026;
    Thread aThread10027;
    Runnable aRunnable10028;
    Runnable aRunnable10029;
    HashMap aHashMap10030;
    
    public void method4341(Object object) {
	/* empty */
    }
    
    public Class341_Sub2(Class601 class601) {
	((Class341_Sub2) this).aLong10022
	    = Class222.method3225(1743628289) * 6030369474600781717L;
	((Class341_Sub2) this).aRunnable10029 = new Class130(this);
	((Class341_Sub2) this).aRunnable10028 = new Class128(this);
	((Class341_Sub2) this).aClass334_10024 = new Class334(this);
	((Class341_Sub2) this).aHashMap10030 = new HashMap();
	Iterator iterator = class601.aHashMap7923.keySet().iterator();
	while (iterator.hasNext()) {
	    Class447 class447 = (Class447) iterator.next();
	    ((Class341_Sub2) this).aHashMap10030.put(class447,
						     (new Class444
						      [((Integer)
							class601
							    .aHashMap7923
							    .get(class447))
							   .intValue()]));
	}
	iterator = ((Class341_Sub2) this).aHashMap10030.keySet().iterator();
	while (iterator.hasNext()) {
	    Class447 class447 = (Class447) iterator.next();
	    Class444[] class444s
		= ((Class444[])
		   ((Class341_Sub2) this).aHashMap10030.get(class447));
	    for (int i = 0; i < class444s.length; i++) {
		Class217 class217 = new Class217(2.0F);
		class217.method250(0, Class339.aClass339_3630,
				   Class346.aClass346_3675, 2);
		class444s[i]
		    = new Class444(class447, 32768, 3, class217, this);
	    }
	}
	((Class341_Sub2) this).aThread10026
	    = new Thread(((Class341_Sub2) this).aRunnable10028);
	((Class341_Sub2) this).aThread10027
	    = new Thread(((Class341_Sub2) this).aRunnable10029);
	((Class341_Sub2) this).aThread10026.setPriority(1);
	((Class341_Sub2) this).aThread10027.setPriority(1);
	((Class341_Sub2) this).aThread10026.start();
	((Class341_Sub2) this).aThread10027.start();
    }
    
    public void method4325(short i) {
	if (null != ((Class341_Sub2) this).aClass334_10024)
	    ((Class341_Sub2) this).aClass334_10024.method4314(410419664);
	Iterator iterator
	    = ((Class341_Sub2) this).aHashMap10030.keySet().iterator();
	while (iterator.hasNext()) {
	    Class447 class447 = (Class447) iterator.next();
	    Class444[] class444s
		= ((Class444[])
		   ((Class341_Sub2) this).aHashMap10030.get(class447));
	    if (!class447.aBool5155) {
		boolean bool = false;
		for (int i_0_ = 0; i_0_ < class444s.length; i_0_++) {
		    class444s[i_0_].method5393(1918648447);
		    bool |= class444s[i_0_].method5392(535333608);
		}
		if (bool)
		    Arrays.sort(class444s, new Class120(this));
	    }
	    int i_1_ = 3;
	    boolean bool = false;
	    int i_2_ = class444s.length - 1;
	    while (false == bool) {
		float f = class444s[i_2_].method5390((byte) 8);
		Class446 class446 = class444s[i_2_].method5378((byte) 26);
		if (f < 0.0F) {
		    if (class446 == Class446.aClass446_5139
			|| class446 == Class446.aClass446_5137
			|| Class446.aClass446_5142 == class446)
			class444s[i_2_].method5423(827913018);
		} else
		    bool = true;
		if (--i_2_ < 0)
		    bool = true;
	    }
	    if (i_2_ >= class444s.length - i_1_) {
		for (/**/; i_2_ >= class444s.length - i_1_; i_2_--) {
		    Class446 class446 = class444s[i_2_].method5378((byte) 90);
		    if (class446 == Class446.aClass446_5139)
			class444s[i_2_].method5423(827913018);
		}
	    }
	}
    }
    
    public Class444 method4345(Class447 class447) {
	synchronized (((Class341_Sub2) this).aHashMap10030) {
	    Class444[] class444s
		= ((Class444[])
		   ((Class341_Sub2) this).aHashMap10030.get(class447));
	    if (null == class444s) {
		Class444 class444 = null;
		return class444;
	    }
	    for (int i = 0; i < class444s.length; i++) {
		Class444 class444 = class444s[i];
		Class446 class446 = class444.method5378((byte) 55);
		if (class446 == Class446.aClass446_5141) {
		    class444.method5382(-2142334033);
		    Class444 class444_3_ = class444;
		    return class444_3_;
		}
	    }
	}
	return null;
    }
    
    HashMap method9024(int i) {
	return ((Class341_Sub2) this).aHashMap10030;
    }
    
    public void method4349(int i) {
	HashMap hashmap = method9024(-996201697);
	synchronized (hashmap) {
	    Iterator iterator = hashmap.keySet().iterator();
	    while (iterator.hasNext()) {
		Class447 class447 = (Class447) iterator.next();
		Class444[] class444s = (Class444[]) hashmap.get(class447);
		for (int i_4_ = 0; i_4_ < class444s.length; i_4_++) {
		    if (class444s[i_4_].method5378((byte) 11)
			!= Class446.aClass446_5141) {
			class444s[i_4_].method5423(827913018);
			class444s[i_4_].method5414(-1803377698);
		    }
		}
	    }
	}
	boolean bool = false;
	while (!bool) {
	    bool = true;
	    synchronized (hashmap) {
		Iterator iterator = hashmap.keySet().iterator();
		while (iterator.hasNext()) {
		    Class447 class447 = (Class447) iterator.next();
		    Class444[] class444s = (Class444[]) hashmap.get(class447);
		    for (int i_5_ = 0; i_5_ < class444s.length; i_5_++) {
			if (class444s[i_5_].method5378((byte) 93)
			    != Class446.aClass446_5141) {
			    class444s[i_5_].method5393(1311357113);
			    bool = false;
			}
		    }
		}
	    }
	    Class118.method1565(10L);
	}
	((Class341_Sub2) this).aBool10025 = true;
	try {
	    ((Class341_Sub2) this).aThread10026.join();
	} catch (InterruptedException interruptedexception) {
	    interruptedexception.printStackTrace();
	}
	try {
	    ((Class341_Sub2) this).aThread10027.join();
	} catch (InterruptedException interruptedexception) {
	    interruptedexception.printStackTrace();
	}
    }
    
    public void method4340(Object object, byte[] is, int i, int i_6_,
			   int i_7_) {
	/* empty */
    }
    
    public Class444 method4329(Class447 class447, int i) {
	synchronized (((Class341_Sub2) this).aHashMap10030) {
	    Class444[] class444s
		= ((Class444[])
		   ((Class341_Sub2) this).aHashMap10030.get(class447));
	    if (null == class444s) {
		Class444 class444 = null;
		return class444;
	    }
	    for (int i_8_ = 0; i_8_ < class444s.length; i_8_++) {
		Class444 class444 = class444s[i_8_];
		Class446 class446 = class444.method5378((byte) 126);
		if (class446 == Class446.aClass446_5141) {
		    class444.method5382(-779886530);
		    Class444 class444_9_ = class444;
		    return class444_9_;
		}
	    }
	}
	return null;
    }
    
    public void method4342(Object object) {
	/* empty */
    }
    
    public Class334 method4336(byte i) {
	return ((Class341_Sub2) this).aClass334_10024;
    }
    
    Object method4330(Class347 class347, byte i) {
	return null;
    }
    
    public void method4333() {
	if (null != ((Class341_Sub2) this).aClass334_10024)
	    ((Class341_Sub2) this).aClass334_10024.method4314(410419664);
	Iterator iterator
	    = ((Class341_Sub2) this).aHashMap10030.keySet().iterator();
	while (iterator.hasNext()) {
	    Class447 class447 = (Class447) iterator.next();
	    Class444[] class444s
		= ((Class444[])
		   ((Class341_Sub2) this).aHashMap10030.get(class447));
	    if (!class447.aBool5155) {
		boolean bool = false;
		for (int i = 0; i < class444s.length; i++) {
		    class444s[i].method5393(357011345);
		    bool |= class444s[i].method5392(-2118224632);
		}
		if (bool)
		    Arrays.sort(class444s, new Class120(this));
	    }
	    int i = 3;
	    boolean bool = false;
	    int i_10_ = class444s.length - 1;
	    while (false == bool) {
		float f = class444s[i_10_].method5390((byte) 4);
		Class446 class446 = class444s[i_10_].method5378((byte) 35);
		if (f < 0.0F) {
		    if (class446 == Class446.aClass446_5139
			|| class446 == Class446.aClass446_5137
			|| Class446.aClass446_5142 == class446)
			class444s[i_10_].method5423(827913018);
		} else
		    bool = true;
		if (--i_10_ < 0)
		    bool = true;
	    }
	    if (i_10_ >= class444s.length - i) {
		for (/**/; i_10_ >= class444s.length - i; i_10_--) {
		    Class446 class446 = class444s[i_10_].method5378((byte) 76);
		    if (class446 == Class446.aClass446_5139)
			class444s[i_10_].method5423(827913018);
		}
	    }
	}
    }
    
    public int method4335(Object object) {
	long l = Class222.method3225(1979863212);
	int i = (int) (180000.0F
		       / ((float) (l - (((Class341_Sub2) this).aLong10022
					* 9072241589647625149L))
			  / 1000.0F));
	((Class341_Sub2) this).aLong10022 = l * 6030369474600781717L;
	return i;
    }
    
    public void method4327(Object object, int i) {
	/* empty */
    }
    
    public Object method4337(int i, int i_11_, Class339 class339,
			     Class346 class346, int i_12_, float f) {
	return new Object();
    }
    
    public Object method4332(int i, int i_13_, Class339 class339,
			     Class346 class346, int i_14_, float f) {
	return new Object();
    }
    
    public Object method4338(int i, int i_15_, Class339 class339,
			     Class346 class346, int i_16_, float f) {
	return new Object();
    }
    
    public Object method4339(int i, int i_17_, Class339 class339,
			     Class346 class346, int i_18_, float f) {
	return new Object();
    }
    
    public void method4331(Object object) {
	/* empty */
    }
    
    public void method4343(Object object, byte[] is, int i, int i_19_) {
	/* empty */
    }
    
    public Object method4326(int i, int i_20_, Class339 class339,
			     Class346 class346, int i_21_, float f,
			     int i_22_) {
	return new Object();
    }
    
    public int method4328(Object object, int i) {
	long l = Class222.method3225(1528229514);
	int i_23_ = (int) (180000.0F
			   / ((float) (l - (((Class341_Sub2) this).aLong10022
					    * 9072241589647625149L))
			      / 1000.0F));
	((Class341_Sub2) this).aLong10022 = l * 6030369474600781717L;
	return i_23_;
    }
    
    public void method4344(Object object, byte[] is, int i, int i_24_) {
	/* empty */
    }
    
    public int method4334(Object object) {
	long l = Class222.method3225(1866925597);
	int i = (int) (180000.0F
		       / ((float) (l - (((Class341_Sub2) this).aLong10022
					* 9072241589647625149L))
			  / 1000.0F));
	((Class341_Sub2) this).aLong10022 = l * 6030369474600781717L;
	return i;
    }
    
    Object method4346(Class347 class347) {
	return null;
    }
    
    Object method4324(Class347 class347) {
	return null;
    }
    
    public void method4348() {
	HashMap hashmap = method9024(-1272826517);
	synchronized (hashmap) {
	    Iterator iterator = hashmap.keySet().iterator();
	    while (iterator.hasNext()) {
		Class447 class447 = (Class447) iterator.next();
		Class444[] class444s = (Class444[]) hashmap.get(class447);
		for (int i = 0; i < class444s.length; i++) {
		    if (class444s[i].method5378((byte) 35)
			!= Class446.aClass446_5141) {
			class444s[i].method5423(827913018);
			class444s[i].method5414(1024941497);
		    }
		}
	    }
	}
	boolean bool = false;
	while (!bool) {
	    bool = true;
	    synchronized (hashmap) {
		Iterator iterator = hashmap.keySet().iterator();
		while (iterator.hasNext()) {
		    Class447 class447 = (Class447) iterator.next();
		    Class444[] class444s = (Class444[]) hashmap.get(class447);
		    for (int i = 0; i < class444s.length; i++) {
			if (class444s[i].method5378((byte) 66)
			    != Class446.aClass446_5141) {
			    class444s[i].method5393(1262928686);
			    bool = false;
			}
		    }
		}
	    }
	    Class118.method1565(10L);
	}
	((Class341_Sub2) this).aBool10025 = true;
	try {
	    ((Class341_Sub2) this).aThread10026.join();
	} catch (InterruptedException interruptedexception) {
	    interruptedexception.printStackTrace();
	}
	try {
	    ((Class341_Sub2) this).aThread10027.join();
	} catch (InterruptedException interruptedexception) {
	    interruptedexception.printStackTrace();
	}
    }
    
    public Class334 method4347() {
	return ((Class341_Sub2) this).aClass334_10024;
    }
    
    public Class334 method4350() {
	return ((Class341_Sub2) this).aClass334_10024;
    }
    
    public Class334 method4351() {
	return ((Class341_Sub2) this).aClass334_10024;
    }
    
    public static final void method9025(int i) {
	client.aBool10894 = true;
    }
    
    public static int method9026(int i, int i_25_, int i_26_, int i_27_) {
	i_26_ &= 0x3;
	if (i_26_ == 0)
	    return i_25_;
	if (1 == i_26_)
	    return 7 - i;
	if (i_26_ == 2)
	    return 7 - i_25_;
	return i;
    }
}
