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

public class Class314_Sub1 extends Class314
{
    Runnable aRunnable10184;
    static final float aFloat10185 = 2.0F;
    volatile boolean aBool10186 = false;
    HashMap aHashMap10187;
    Thread aThread10188;
    Thread aThread10189;
    long aLong10190 = Class46.method1238(-787871076) * -507286032777861647L;
    Class310 aClass310_10191;
    Runnable aRunnable10192;
    
    public void method6151(Object object) {
	/* empty */
    }
    
    Object method6167(Class388 class388) {
	return null;
    }
    
    public void method6149(int i) {
	if (((Class314_Sub1) this).aClass310_10191 != null)
	    ((Class314_Sub1) this).aClass310_10191.method6109(-1362428651);
	Iterator iterator
	    = ((Class314_Sub1) this).aHashMap10187.keySet().iterator();
	while (iterator.hasNext()) {
	    Class298 class298 = (Class298) iterator.next();
	    Class222[] class222s
		= ((Class222[])
		   ((Class314_Sub1) this).aHashMap10187.get(class298));
	    if (!class298.aBool4338) {
		boolean bool = false;
		for (int i_0_ = 0; i_0_ < class222s.length; i_0_++) {
		    class222s[i_0_].method4540((byte) -13);
		    bool |= class222s[i_0_].method4472((byte) 119);
		}
		if (bool)
		    Arrays.sort(class222s, new Class170(this));
	    }
	    int i_1_ = 3;
	    boolean bool = false;
	    int i_2_ = class222s.length - 1;
	    while (!bool) {
		float f = class222s[i_2_].method4470(2106999398);
		Class297 class297 = class222s[i_2_].method4458(69792405);
		if (f < 0.0F) {
		    if (Class297.aClass297_4331 == class297
			|| Class297.aClass297_4329 == class297
			|| Class297.aClass297_4333 == class297)
			class222s[i_2_].method4505(-1164420138);
		} else
		    bool = true;
		if (--i_2_ < 0)
		    bool = true;
	    }
	    if (i_2_ >= class222s.length - i_1_) {
		for (/**/; i_2_ >= class222s.length - i_1_; i_2_--) {
		    Class297 class297 = class222s[i_2_].method4458(907775123);
		    if (Class297.aClass297_4331 == class297)
			class222s[i_2_].method4505(-978653122);
		}
	    }
	}
    }
    
    public int method6153(Object object, byte i) {
	long l = Class46.method1238(-2044774180);
	int i_3_ = (int) (180000.0F
			  / ((float) (l - (((Class314_Sub1) this).aLong10190
					   * 1384537292042677009L))
			     / 1000.0F));
	((Class314_Sub1) this).aLong10190 = l * -507286032777861647L;
	return i_3_;
    }
    
    public void method6150(Object object, byte[] is, int i, int i_4_) {
	/* empty */
    }
    
    public void method6157(Object object, int i) {
	/* empty */
    }
    
    public void method6152(Object object, byte[] is, int i, int i_5_,
			   int i_6_) {
	/* empty */
    }
    
    public Object method6160(int i, int i_7_, Class309 class309,
			     Class302 class302, int i_8_, float f,
			     short i_9_) {
	return new Object();
    }
    
    public void method6159() {
	if (((Class314_Sub1) this).aClass310_10191 != null)
	    ((Class314_Sub1) this).aClass310_10191.method6109(-1362428651);
	Iterator iterator
	    = ((Class314_Sub1) this).aHashMap10187.keySet().iterator();
	while (iterator.hasNext()) {
	    Class298 class298 = (Class298) iterator.next();
	    Class222[] class222s
		= ((Class222[])
		   ((Class314_Sub1) this).aHashMap10187.get(class298));
	    if (!class298.aBool4338) {
		boolean bool = false;
		for (int i = 0; i < class222s.length; i++) {
		    class222s[i].method4540((byte) -84);
		    bool |= class222s[i].method4472((byte) 60);
		}
		if (bool)
		    Arrays.sort(class222s, new Class170(this));
	    }
	    int i = 3;
	    boolean bool = false;
	    int i_10_ = class222s.length - 1;
	    while (!bool) {
		float f = class222s[i_10_].method4470(2106999398);
		Class297 class297 = class222s[i_10_].method4458(-117717086);
		if (f < 0.0F) {
		    if (Class297.aClass297_4331 == class297
			|| Class297.aClass297_4329 == class297
			|| Class297.aClass297_4333 == class297)
			class222s[i_10_].method4505(115420460);
		} else
		    bool = true;
		if (--i_10_ < 0)
		    bool = true;
	    }
	    if (i_10_ >= class222s.length - i) {
		for (/**/; i_10_ >= class222s.length - i; i_10_--) {
		    Class297 class297 = class222s[i_10_].method4458(985466333);
		    if (Class297.aClass297_4331 == class297)
			class222s[i_10_].method4505(-931478490);
		}
	    }
	}
    }
    
    public Class314_Sub1(Class483 class483) {
	((Class314_Sub1) this).aRunnable10184 = new Class181(this);
	((Class314_Sub1) this).aRunnable10192 = new Class177(this);
	((Class314_Sub1) this).aClass310_10191 = new Class310(this);
	((Class314_Sub1) this).aHashMap10187 = new HashMap();
	Iterator iterator = class483.aHashMap6480.keySet().iterator();
	while (iterator.hasNext()) {
	    Class298 class298 = (Class298) iterator.next();
	    ((Class314_Sub1) this).aHashMap10187.put(class298,
						     (new Class222
						      [((Integer)
							class483
							    .aHashMap6480
							    .get(class298))
							   .intValue()]));
	}
	iterator = ((Class314_Sub1) this).aHashMap10187.keySet().iterator();
	while (iterator.hasNext()) {
	    Class298 class298 = (Class298) iterator.next();
	    Class222[] class222s
		= ((Class222[])
		   ((Class314_Sub1) this).aHashMap10187.get(class298));
	    for (int i = 0; i < class222s.length; i++) {
		Class56 class56 = new Class56(2.0F);
		class56.method287(0, Class309.aClass309_4582,
				  Class302.aClass302_4538, 2);
		class222s[i] = new Class222(class298, 32768, 3, class56, this);
	    }
	}
	((Class314_Sub1) this).aThread10188
	    = new Thread(((Class314_Sub1) this).aRunnable10192);
	((Class314_Sub1) this).aThread10189
	    = new Thread(((Class314_Sub1) this).aRunnable10184);
	((Class314_Sub1) this).aThread10188.setPriority(1);
	((Class314_Sub1) this).aThread10189.setPriority(1);
	((Class314_Sub1) this).aThread10188.start();
	((Class314_Sub1) this).aThread10189.start();
    }
    
    public void method6164(int i) {
	HashMap hashmap = method16609(-355012965);
	synchronized (hashmap) {
	    Iterator iterator = hashmap.keySet().iterator();
	    while (iterator.hasNext()) {
		Class298 class298 = (Class298) iterator.next();
		Class222[] class222s = (Class222[]) hashmap.get(class298);
		for (int i_11_ = 0; i_11_ < class222s.length; i_11_++) {
		    if (class222s[i_11_].method4458(-1921085982)
			!= Class297.aClass297_4327) {
			class222s[i_11_].method4505(-500383937);
			class222s[i_11_].method4461(-1701110044);
		    }
		}
	    }
	}
	boolean bool = false;
	while (!bool) {
	    bool = true;
	    synchronized (hashmap) {
		Iterator iterator = hashmap.keySet().iterator();
		while (iterator.hasNext()) {
		    Class298 class298 = (Class298) iterator.next();
		    Class222[] class222s = (Class222[]) hashmap.get(class298);
		    for (int i_12_ = 0; i_12_ < class222s.length; i_12_++) {
			if (class222s[i_12_].method4458(191287079)
			    != Class297.aClass297_4327) {
			    class222s[i_12_].method4540((byte) -68);
			    bool = false;
			}
		    }
		}
	    }
	    Class43.method1220(10L);
	}
	((Class314_Sub1) this).aBool10186 = true;
	try {
	    ((Class314_Sub1) this).aThread10188.join();
	} catch (InterruptedException interruptedexception) {
	    interruptedexception.printStackTrace();
	}
	try {
	    ((Class314_Sub1) this).aThread10189.join();
	} catch (InterruptedException interruptedexception) {
	    interruptedexception.printStackTrace();
	}
    }
    
    public void method6148() {
	if (((Class314_Sub1) this).aClass310_10191 != null)
	    ((Class314_Sub1) this).aClass310_10191.method6109(-1362428651);
	Iterator iterator
	    = ((Class314_Sub1) this).aHashMap10187.keySet().iterator();
	while (iterator.hasNext()) {
	    Class298 class298 = (Class298) iterator.next();
	    Class222[] class222s
		= ((Class222[])
		   ((Class314_Sub1) this).aHashMap10187.get(class298));
	    if (!class298.aBool4338) {
		boolean bool = false;
		for (int i = 0; i < class222s.length; i++) {
		    class222s[i].method4540((byte) -11);
		    bool |= class222s[i].method4472((byte) 92);
		}
		if (bool)
		    Arrays.sort(class222s, new Class170(this));
	    }
	    int i = 3;
	    boolean bool = false;
	    int i_13_ = class222s.length - 1;
	    while (!bool) {
		float f = class222s[i_13_].method4470(2106999398);
		Class297 class297 = class222s[i_13_].method4458(-292805711);
		if (f < 0.0F) {
		    if (Class297.aClass297_4331 == class297
			|| Class297.aClass297_4329 == class297
			|| Class297.aClass297_4333 == class297)
			class222s[i_13_].method4505(-728042303);
		} else
		    bool = true;
		if (--i_13_ < 0)
		    bool = true;
	    }
	    if (i_13_ >= class222s.length - i) {
		for (/**/; i_13_ >= class222s.length - i; i_13_--) {
		    Class297 class297
			= class222s[i_13_].method4458(-1206408947);
		    if (Class297.aClass297_4331 == class297)
			class222s[i_13_].method4505(-1322837523);
		}
	    }
	}
    }
    
    public Class222 method6154(Class298 class298, byte i) {
	synchronized (((Class314_Sub1) this).aHashMap10187) {
	    Class222[] class222s
		= ((Class222[])
		   ((Class314_Sub1) this).aHashMap10187.get(class298));
	    if (null == class222s) {
		Class222 class222 = null;
		return class222;
	    }
	    for (int i_14_ = 0; i_14_ < class222s.length; i_14_++) {
		Class222 class222 = class222s[i_14_];
		Class297 class297 = class222.method4458(-1653392674);
		if (class297 == Class297.aClass297_4327) {
		    class222.method4530(-522262702);
		    Class222 class222_15_ = class222;
		    return class222_15_;
		}
	    }
	}
	return null;
    }
    
    public int method6163(Object object) {
	long l = Class46.method1238(601377415);
	int i = (int) (180000.0F
		       / ((float) (l - (((Class314_Sub1) this).aLong10190
					* 1384537292042677009L))
			  / 1000.0F));
	((Class314_Sub1) this).aLong10190 = l * -507286032777861647L;
	return i;
    }
    
    public int method6161(Object object) {
	long l = Class46.method1238(900884134);
	int i = (int) (180000.0F
		       / ((float) (l - (((Class314_Sub1) this).aLong10190
					* 1384537292042677009L))
			  / 1000.0F));
	((Class314_Sub1) this).aLong10190 = l * -507286032777861647L;
	return i;
    }
    
    public Object method6162(int i, int i_16_, Class309 class309,
			     Class302 class302, int i_17_, float f) {
	return new Object();
    }
    
    public void method6168(Object object) {
	/* empty */
    }
    
    public Class310 method6166(byte i) {
	return ((Class314_Sub1) this).aClass310_10191;
    }
    
    public Class222 method6165(Class298 class298) {
	synchronized (((Class314_Sub1) this).aHashMap10187) {
	    Class222[] class222s
		= ((Class222[])
		   ((Class314_Sub1) this).aHashMap10187.get(class298));
	    if (null == class222s) {
		Class222 class222 = null;
		return class222;
	    }
	    for (int i = 0; i < class222s.length; i++) {
		Class222 class222 = class222s[i];
		Class297 class297 = class222.method4458(117481712);
		if (class297 == Class297.aClass297_4327) {
		    class222.method4530(581519188);
		    Class222 class222_18_ = class222;
		    return class222_18_;
		}
	    }
	}
	return null;
    }
    
    HashMap method16609(int i) {
	return ((Class314_Sub1) this).aHashMap10187;
    }
    
    public Class222 method6156(Class298 class298) {
	synchronized (((Class314_Sub1) this).aHashMap10187) {
	    Class222[] class222s
		= ((Class222[])
		   ((Class314_Sub1) this).aHashMap10187.get(class298));
	    if (null == class222s) {
		Class222 class222 = null;
		return class222;
	    }
	    for (int i = 0; i < class222s.length; i++) {
		Class222 class222 = class222s[i];
		Class297 class297 = class222.method4458(695226534);
		if (class297 == Class297.aClass297_4327) {
		    class222.method4530(-843813639);
		    Class222 class222_19_ = class222;
		    return class222_19_;
		}
	    }
	}
	return null;
    }
    
    public Class310 method6158() {
	return ((Class314_Sub1) this).aClass310_10191;
    }
    
    Object method6155(Class388 class388, int i) {
	return null;
    }
    
    public void method6169() {
	HashMap hashmap = method16609(-337195805);
	synchronized (hashmap) {
	    Iterator iterator = hashmap.keySet().iterator();
	    while (iterator.hasNext()) {
		Class298 class298 = (Class298) iterator.next();
		Class222[] class222s = (Class222[]) hashmap.get(class298);
		for (int i = 0; i < class222s.length; i++) {
		    if (class222s[i].method4458(-1346624254)
			!= Class297.aClass297_4327) {
			class222s[i].method4505(-2053262695);
			class222s[i].method4461(-1701110044);
		    }
		}
	    }
	}
	boolean bool = false;
	while (!bool) {
	    bool = true;
	    synchronized (hashmap) {
		Iterator iterator = hashmap.keySet().iterator();
		while (iterator.hasNext()) {
		    Class298 class298 = (Class298) iterator.next();
		    Class222[] class222s = (Class222[]) hashmap.get(class298);
		    for (int i = 0; i < class222s.length; i++) {
			if (class222s[i].method4458(-1971937979)
			    != Class297.aClass297_4327) {
			    class222s[i].method4540((byte) -79);
			    bool = false;
			}
		    }
		}
	    }
	    Class43.method1220(10L);
	}
	((Class314_Sub1) this).aBool10186 = true;
	try {
	    ((Class314_Sub1) this).aThread10188.join();
	} catch (InterruptedException interruptedexception) {
	    interruptedexception.printStackTrace();
	}
	try {
	    ((Class314_Sub1) this).aThread10189.join();
	} catch (InterruptedException interruptedexception) {
	    interruptedexception.printStackTrace();
	}
    }
    
    public void method6170() {
	HashMap hashmap = method16609(-798158217);
	synchronized (hashmap) {
	    Iterator iterator = hashmap.keySet().iterator();
	    while (iterator.hasNext()) {
		Class298 class298 = (Class298) iterator.next();
		Class222[] class222s = (Class222[]) hashmap.get(class298);
		for (int i = 0; i < class222s.length; i++) {
		    if (class222s[i].method4458(-2093993741)
			!= Class297.aClass297_4327) {
			class222s[i].method4505(-1088468671);
			class222s[i].method4461(-1701110044);
		    }
		}
	    }
	}
	boolean bool = false;
	while (!bool) {
	    bool = true;
	    synchronized (hashmap) {
		Iterator iterator = hashmap.keySet().iterator();
		while (iterator.hasNext()) {
		    Class298 class298 = (Class298) iterator.next();
		    Class222[] class222s = (Class222[]) hashmap.get(class298);
		    for (int i = 0; i < class222s.length; i++) {
			if (class222s[i].method4458(898417787)
			    != Class297.aClass297_4327) {
			    class222s[i].method4540((byte) -47);
			    bool = false;
			}
		    }
		}
	    }
	    Class43.method1220(10L);
	}
	((Class314_Sub1) this).aBool10186 = true;
	try {
	    ((Class314_Sub1) this).aThread10188.join();
	} catch (InterruptedException interruptedexception) {
	    interruptedexception.printStackTrace();
	}
	try {
	    ((Class314_Sub1) this).aThread10189.join();
	} catch (InterruptedException interruptedexception) {
	    interruptedexception.printStackTrace();
	}
    }
    
    static final void method16610(Class479 class479, int i) {
	int i_20_ = (((Class479) class479).anIntArray6435
		     [((((Class479) class479).anInt6442 -= -1158629699)
		       * -117934955)]);
	Class117 class117 = Class70.method1756(i_20_, (byte) 102);
	Class116 class116 = Class211.aClass116Array2498[i_20_ >> 16];
	Class343.method6477(class117, class116, class479, (byte) -1);
    }
    
    public static void method16611(Class272 class272, int i) {
	Class329.aClass272_5142 = class272;
    }
}
