/* Class475 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.net.InetAddress;
import java.util.LinkedList;
import java.util.Queue;

import jaclib.ping.Ping;

public class Class475 implements Runnable {
	Thread aThread6486;
	Object anObject6487 = new Object();
	Queue aQueue6488 = new LinkedList();
	public static Class279 aClass279_6489;

	public void run() {
		for (;;) {
			Class462 class462;
			synchronized (((Class475) this).aQueue6488) {
				Object object;
				for (object = ((Class475) this).aQueue6488.poll(); object == null; object = ((Class475) this).aQueue6488.poll()) {
					try {
						((Class475) this).aQueue6488.wait();
					} catch (InterruptedException interruptedexception) {
						/* empty */
					}
				}
				if (object == ((Class475) this).anObject6487)
					break;
				class462 = (Class462) object;
			}
			int i;
			try {
				byte[] is = InetAddress.getByName(((Class462) class462).aString6413).getAddress();
				i = Ping.method967(is[0], is[1], is[2], is[3], 1000L);
			} catch (Throwable throwable) {
				i = 1000;
			}
			class462.anInt6412 = -797238453 * i;
		}
	}

	public Class462 method8392(String string, byte i) {
		if (((Class475) this).aThread6486 == null)
			throw new IllegalStateException("");
		if (null == string)
			throw new IllegalArgumentException("");
		Class462 class462 = new Class462(string);
		method8397(class462, 351074529);
		return class462;
	}

	public void method8393(int i) {
		if (((Class475) this).aThread6486 != null) {
			method8397(((Class475) this).anObject6487, 351074529);
			try {
				((Class475) this).aThread6486.join();
			} catch (InterruptedException interruptedexception) {
				/* empty */
			}
			((Class475) this).aThread6486 = null;
		}
	}

	public Class462 method8394(String string) {
		if (((Class475) this).aThread6486 == null)
			throw new IllegalStateException("");
		if (null == string)
			throw new IllegalArgumentException("");
		Class462 class462 = new Class462(string);
		method8397(class462, 351074529);
		return class462;
	}

	public void method8395() {
		for (;;) {
			Class462 class462;
			synchronized (((Class475) this).aQueue6488) {
				Object object;
				for (object = ((Class475) this).aQueue6488.poll(); object == null; object = ((Class475) this).aQueue6488.poll()) {
					try {
						((Class475) this).aQueue6488.wait();
					} catch (InterruptedException interruptedexception) {
						/* empty */
					}
				}
				if (object == ((Class475) this).anObject6487)
					break;
				class462 = (Class462) object;
			}
			int i;
			try {
				byte[] is = InetAddress.getByName(((Class462) class462).aString6413).getAddress();
				i = Ping.method967(is[0], is[1], is[2], is[3], 1000L);
			} catch (Throwable throwable) {
				i = 1000;
			}
			class462.anInt6412 = -797238453 * i;
		}
	}

	public Class475() {
		((Class475) this).aThread6486 = new Thread(this);
		((Class475) this).aThread6486.setDaemon(true);
		((Class475) this).aThread6486.start();
	}

	public void method8396() {
		for (;;) {
			Class462 class462;
			synchronized (((Class475) this).aQueue6488) {
				Object object;
				for (object = ((Class475) this).aQueue6488.poll(); object == null; object = ((Class475) this).aQueue6488.poll()) {
					try {
						((Class475) this).aQueue6488.wait();
					} catch (InterruptedException interruptedexception) {
						/* empty */
					}
				}
				if (object == ((Class475) this).anObject6487)
					break;
				class462 = (Class462) object;
			}
			int i;
			try {
				byte[] is = InetAddress.getByName(((Class462) class462).aString6413).getAddress();
				i = Ping.method967(is[0], is[1], is[2], is[3], 1000L);
			} catch (Throwable throwable) {
				i = 1000;
			}
			class462.anInt6412 = -797238453 * i;
		}
	}

	void method8397(Object object, int i) {
		synchronized (((Class475) this).aQueue6488) {
			((Class475) this).aQueue6488.add(object);
			((Class475) this).aQueue6488.notify();
		}
	}

	public void method8398() {
		if (((Class475) this).aThread6486 != null) {
			method8397(((Class475) this).anObject6487, 351074529);
			try {
				((Class475) this).aThread6486.join();
			} catch (InterruptedException interruptedexception) {
				/* empty */
			}
			((Class475) this).aThread6486 = null;
		}
	}

	void method8399(Object object) {
		synchronized (((Class475) this).aQueue6488) {
			((Class475) this).aQueue6488.add(object);
			((Class475) this).aQueue6488.notify();
		}
	}

	static void method8400(Class477 class477, int i) {
		Class485 class485 = (Class356_Sub1.aClass492_10082.method11142((((Class477) class477).anIntArray6497[(((Class477) class477).anInt6498 -= 1577301031) * 2028895127]), 933801528));
		((Class477) class477).anIntArray6497[(((Class477) class477).anInt6498 += 1577301031) * 2028895127 - 1] = (class485.anIntArrayArray6577 == null ? 0 : class485.anIntArrayArray6577.length);
	}

	static final void method8401(Class477 class477, byte i) {
		Class480 class480 = (((Class477) class477).aBool6510 ? ((Class477) class477).aClass480_6506 : ((Class477) class477).aClass480_6492);
		Class35 class35 = ((Class480) class480).aClass35_6531;
		Class90.method2312(class35, class477, 1724227378);
	}

	static final void method8402(Class477 class477, short i) {
		int i_0_ = (((Class477) class477).anIntArray6497[(((Class477) class477).anInt6498 -= 1577301031) * 2028895127]);
		((Class477) class477).anIntArray6497[(((Class477) class477).anInt6498 += 1577301031) * 2028895127 - 1] = 73842101 * client.aClass239Array8266[i_0_].anInt2823;
	}

	static final void method8403(Class587_Sub34_Sub8 class587_sub34_sub8, Class477 class477, int i) {
		((Class477) class477).anIntArray6497[(((Class477) class477).anInt6498 += 1577301031) * 2028895127 - 1] = Class595.method12866(class587_sub34_sub8, (byte) -61);
		((Class477) class477).anObjectArray6499[(((Class477) class477).anInt6500 += 1803340247) * -443336217 - 1] = Class209.method4422(class587_sub34_sub8, 1673687343);
		((Class477) class477).anObjectArray6499[(((Class477) class477).anInt6500 += 1803340247) * -443336217 - 1] = Class543.method11881(class587_sub34_sub8, (byte) -13);
		((Class477) class477).anObjectArray6499[(((Class477) class477).anInt6500 += 1803340247) * -443336217 - 1] = Class232.method4646(class587_sub34_sub8, -573603689);
	}

	static final void method8404(Class477 class477, byte i) {
		Class480 class480;
		if (((Class477) class477).aBool6510) {
			if (i >= -1) {
				/* empty */
			}
			class480 = ((Class477) class477).aClass480_6506;
		} else
			class480 = ((Class477) class477).aClass480_6492;
		Class480 class480_1_ = class480;
		Class35 class35 = ((Class480) class480_1_).aClass35_6531;
		if (null == class35.aString547) {
			if (i >= -1) {
				/* empty */
			}
			((Class477) class477).anObjectArray6499[((((Class477) class477).anInt6500 += 1803340247) * -443336217 - 1)] = "";
		} else
			((Class477) class477).anObjectArray6499[((((Class477) class477).anInt6500 += 1803340247) * -443336217 - 1)] = class35.aString547;
	}

	static final void method8405(Class477 class477, int i) {
		((Class477) class477).anIntArray6497[(((Class477) class477).anInt6498 += 1577301031) * 2028895127 - 1] = Class480.method8437((byte) 36) ? 1 : 0;
	}

	public static int method8406(CharSequence charsequence, int i) {
		int i_2_ = charsequence.length();
		int i_3_ = 0;
		for (int i_4_ = 0; i_4_ < i_2_; i_4_++)
			i_3_ = ((i_3_ << 5) - i_3_ + Class394.method7136(charsequence.charAt(i_4_), 1898960062));
		return i_3_;
	}
}
