/* Class499 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;

public class Class499 implements Runnable
{
    InputStream anInputStream6839;
    int anInt6840;
    Thread aThread6841;
    byte[] aByteArray6842;
    int anInt6843 = 0;
    int anInt6844 = 0;
    IOException anIOException6845;
    
    void method6112() {
	((Class499) this).anInputStream6839 = new InputStream_Sub1();
    }
    
    Class499(InputStream inputstream, int i) {
	((Class499) this).anInputStream6839 = inputstream;
	((Class499) this).anInt6840 = -222949381 * (i + 1);
	((Class499) this).aByteArray6842
	    = new byte[1632281395 * ((Class499) this).anInt6840];
	((Class499) this).aThread6841 = new Thread(this);
	((Class499) this).aThread6841.setDaemon(true);
	((Class499) this).aThread6841.start();
    }
    
    boolean method6113(int i, byte i_0_) throws IOException {
	if (i <= 0 || i >= ((Class499) this).anInt6840 * 1632281395)
	    throw new IOException();
	synchronized (this) {
	    int i_1_;
	    if (-51158141 * ((Class499) this).anInt6843
		<= -665056619 * ((Class499) this).anInt6844)
		i_1_ = (((Class499) this).anInt6844 * -665056619
			- ((Class499) this).anInt6843 * -51158141);
	    else
		i_1_ = (-665056619 * ((Class499) this).anInt6844
			+ (((Class499) this).anInt6840 * 1632281395
			   - -51158141 * ((Class499) this).anInt6843));
	    if (i_1_ < i) {
		if (null != ((Class499) this).anIOException6845)
		    throw new IOException(((Class499) this)
					      .anIOException6845.toString());
		this.notifyAll();
		boolean bool = false;
		return bool;
	    }
	    boolean bool = true;
	    return bool;
	}
    }
    
    int method6114(int i) throws IOException {
	synchronized (this) {
	    int i_2_;
	    if (((Class499) this).anInt6843 * -51158141
		<= ((Class499) this).anInt6844 * -665056619)
		i_2_ = (-665056619 * ((Class499) this).anInt6844
			- ((Class499) this).anInt6843 * -51158141);
	    else
		i_2_ = (((Class499) this).anInt6844 * -665056619
			+ (1632281395 * ((Class499) this).anInt6840
			   - -51158141 * ((Class499) this).anInt6843));
	    if (null != ((Class499) this).anIOException6845)
		throw new IOException(((Class499) this).anIOException6845
					  .toString());
	    this.notifyAll();
	    int i_3_ = i_2_;
	    return i_3_;
	}
    }
    
    int method6115(byte[] is, int i, int i_4_, byte i_5_) throws IOException {
	if (i_4_ < 0 || i < 0 || i_4_ + i > is.length)
	    throw new IOException();
	synchronized (this) {
	    int i_6_;
	    if (-51158141 * ((Class499) this).anInt6843
		<= ((Class499) this).anInt6844 * -665056619)
		i_6_ = (-665056619 * ((Class499) this).anInt6844
			- ((Class499) this).anInt6843 * -51158141);
	    else
		i_6_ = (((Class499) this).anInt6844 * -665056619
			+ (1632281395 * ((Class499) this).anInt6840
			   - -51158141 * ((Class499) this).anInt6843));
	    if (i_4_ > i_6_)
		i_4_ = i_6_;
	    if (i_4_ == 0 && ((Class499) this).anIOException6845 != null)
		throw new IOException(((Class499) this).anIOException6845
					  .toString());
	    if (i_4_ + -51158141 * ((Class499) this).anInt6843
		<= ((Class499) this).anInt6840 * 1632281395)
		System.arraycopy(((Class499) this).aByteArray6842,
				 ((Class499) this).anInt6843 * -51158141, is,
				 i, i_4_);
	    else {
		int i_7_ = (((Class499) this).anInt6840 * 1632281395
			    - ((Class499) this).anInt6843 * -51158141);
		System.arraycopy(((Class499) this).aByteArray6842,
				 ((Class499) this).anInt6843 * -51158141, is,
				 i, i_7_);
		System.arraycopy(((Class499) this).aByteArray6842, 0, is,
				 i + i_7_, i_4_ - i_7_);
	    }
	    ((Class499) this).anInt6843
		= ((((Class499) this).anInt6843 * -51158141 + i_4_)
		   % (((Class499) this).anInt6840 * 1632281395) * -332315861);
	    this.notifyAll();
	    int i_8_ = i_4_;
	    return i_8_;
	}
    }
    
    public void run() {
	for (;;) {
	    int i;
	    synchronized (this) {
		for (;;) {
		    if (null != ((Class499) this).anIOException6845)
			return;
		    if (0 == ((Class499) this).anInt6843 * -51158141)
			i = (((Class499) this).anInt6840 * 1632281395
			     - ((Class499) this).anInt6844 * -665056619 - 1);
		    else if (-51158141 * ((Class499) this).anInt6843
			     <= -665056619 * ((Class499) this).anInt6844)
			i = (1632281395 * ((Class499) this).anInt6840
			     - ((Class499) this).anInt6844 * -665056619);
		    else
			i = (-51158141 * ((Class499) this).anInt6843
			     - -665056619 * ((Class499) this).anInt6844 - 1);
		    if (i > 0)
			break;
		    try {
			this.wait();
		    } catch (InterruptedException interruptedexception) {
			/* empty */
		    }
		}
	    }
	    int i_9_;
	    try {
		i_9_ = (((Class499) this).anInputStream6839.read
			(((Class499) this).aByteArray6842,
			 -665056619 * ((Class499) this).anInt6844, i));
		if (i_9_ == -1)
		    throw new EOFException();
	    } catch (IOException ioexception) {
		synchronized (this) {
		    ((Class499) this).anIOException6845 = ioexception;
		    break;
		}
	    }
	    synchronized (this) {
		((Class499) this).anInt6844
		    = (1644130493
		       * ((((Class499) this).anInt6844 * -665056619 + i_9_)
			  % (((Class499) this).anInt6840 * 1632281395)));
	    }
	}
    }
    
    void method6116(int i) {
	((Class499) this).anInputStream6839 = new InputStream_Sub1();
    }
    
    public void method6117() {
	for (;;) {
	    int i;
	    synchronized (this) {
		for (;;) {
		    if (null != ((Class499) this).anIOException6845)
			return;
		    if (0 == ((Class499) this).anInt6843 * -51158141)
			i = (((Class499) this).anInt6840 * 1632281395
			     - ((Class499) this).anInt6844 * -665056619 - 1);
		    else if (-51158141 * ((Class499) this).anInt6843
			     <= -665056619 * ((Class499) this).anInt6844)
			i = (1632281395 * ((Class499) this).anInt6840
			     - ((Class499) this).anInt6844 * -665056619);
		    else
			i = (-51158141 * ((Class499) this).anInt6843
			     - -665056619 * ((Class499) this).anInt6844 - 1);
		    if (i > 0)
			break;
		    try {
			this.wait();
		    } catch (InterruptedException interruptedexception) {
			/* empty */
		    }
		}
	    }
	    int i_10_;
	    try {
		i_10_ = (((Class499) this).anInputStream6839.read
			 (((Class499) this).aByteArray6842,
			  -665056619 * ((Class499) this).anInt6844, i));
		if (i_10_ == -1)
		    throw new EOFException();
	    } catch (IOException ioexception) {
		synchronized (this) {
		    ((Class499) this).anIOException6845 = ioexception;
		    break;
		}
	    }
	    synchronized (this) {
		((Class499) this).anInt6844
		    = (1644130493
		       * ((((Class499) this).anInt6844 * -665056619 + i_10_)
			  % (((Class499) this).anInt6840 * 1632281395)));
	    }
	}
    }
    
    public void method6118() {
	for (;;) {
	    int i;
	    synchronized (this) {
		for (;;) {
		    if (null != ((Class499) this).anIOException6845)
			return;
		    if (0 == ((Class499) this).anInt6843 * -51158141)
			i = (((Class499) this).anInt6840 * 1632281395
			     - ((Class499) this).anInt6844 * -665056619 - 1);
		    else if (-51158141 * ((Class499) this).anInt6843
			     <= -665056619 * ((Class499) this).anInt6844)
			i = (1632281395 * ((Class499) this).anInt6840
			     - ((Class499) this).anInt6844 * -665056619);
		    else
			i = (-51158141 * ((Class499) this).anInt6843
			     - -665056619 * ((Class499) this).anInt6844 - 1);
		    if (i > 0)
			break;
		    try {
			this.wait();
		    } catch (InterruptedException interruptedexception) {
			/* empty */
		    }
		}
	    }
	    int i_11_;
	    try {
		i_11_ = (((Class499) this).anInputStream6839.read
			 (((Class499) this).aByteArray6842,
			  -665056619 * ((Class499) this).anInt6844, i));
		if (i_11_ == -1)
		    throw new EOFException();
	    } catch (IOException ioexception) {
		synchronized (this) {
		    ((Class499) this).anIOException6845 = ioexception;
		    break;
		}
	    }
	    synchronized (this) {
		((Class499) this).anInt6844
		    = (1644130493
		       * ((((Class499) this).anInt6844 * -665056619 + i_11_)
			  % (((Class499) this).anInt6840 * 1632281395)));
	    }
	}
    }
    
    boolean method6119(int i) throws IOException {
	if (i <= 0 || i >= ((Class499) this).anInt6840 * 1632281395)
	    throw new IOException();
	synchronized (this) {
	    int i_12_;
	    if (-51158141 * ((Class499) this).anInt6843
		<= -665056619 * ((Class499) this).anInt6844)
		i_12_ = (((Class499) this).anInt6844 * -665056619
			 - ((Class499) this).anInt6843 * -51158141);
	    else
		i_12_ = (-665056619 * ((Class499) this).anInt6844
			 + (((Class499) this).anInt6840 * 1632281395
			    - -51158141 * ((Class499) this).anInt6843));
	    if (i_12_ < i) {
		if (null != ((Class499) this).anIOException6845)
		    throw new IOException(((Class499) this)
					      .anIOException6845.toString());
		this.notifyAll();
		boolean bool = false;
		return bool;
	    }
	    boolean bool = true;
	    return bool;
	}
    }
    
    boolean method6120(int i) throws IOException {
	if (i <= 0 || i >= ((Class499) this).anInt6840 * 1632281395)
	    throw new IOException();
	synchronized (this) {
	    int i_13_;
	    if (-51158141 * ((Class499) this).anInt6843
		<= -665056619 * ((Class499) this).anInt6844)
		i_13_ = (((Class499) this).anInt6844 * -665056619
			 - ((Class499) this).anInt6843 * -51158141);
	    else
		i_13_ = (-665056619 * ((Class499) this).anInt6844
			 + (((Class499) this).anInt6840 * 1632281395
			    - -51158141 * ((Class499) this).anInt6843));
	    if (i_13_ < i) {
		if (null != ((Class499) this).anIOException6845)
		    throw new IOException(((Class499) this)
					      .anIOException6845.toString());
		this.notifyAll();
		boolean bool = false;
		return bool;
	    }
	    boolean bool = true;
	    return bool;
	}
    }
    
    void method6121(int i) {
	synchronized (this) {
	    if (null == ((Class499) this).anIOException6845)
		((Class499) this).anIOException6845 = new IOException("");
	    this.notifyAll();
	}
	try {
	    ((Class499) this).aThread6841.join();
	} catch (InterruptedException interruptedexception) {
	    /* empty */
	}
    }
    
    void method6122() {
	synchronized (this) {
	    if (null == ((Class499) this).anIOException6845)
		((Class499) this).anIOException6845 = new IOException("");
	    this.notifyAll();
	}
	try {
	    ((Class499) this).aThread6841.join();
	} catch (InterruptedException interruptedexception) {
	    /* empty */
	}
    }
    
    void method6123() {
	synchronized (this) {
	    if (null == ((Class499) this).anIOException6845)
		((Class499) this).anIOException6845 = new IOException("");
	    this.notifyAll();
	}
	try {
	    ((Class499) this).aThread6841.join();
	} catch (InterruptedException interruptedexception) {
	    /* empty */
	}
    }
    
    void method6124() {
	((Class499) this).anInputStream6839 = new InputStream_Sub1();
    }
    
    static final void method6125(Class612 class612, short i) {
	int i_14_
	    = (((Class612) class612).anIntArray8021
	       [(((Class612) class612).anInt8022 -= 201091009) * -40654783]);
	((Class612) class612).anIntArray8021
	    [(((Class612) class612).anInt8022 += 201091009) * -40654783 - 1]
	    = Class350.method4432((char) i_14_, (byte) -70) ? 1 : 0;
    }
}
