/* Class243_Sub3_Sub1 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import jagtheora.ogg.OggPacket;
import jagtheora.ogg.OggStreamState;
import jagtheora.theora.DecoderContext;
import jagtheora.theora.Frame;
import jagtheora.theora.GranulePos;
import jagtheora.theora.SetupInfo;
import jagtheora.theora.TheoraComment;
import jagtheora.theora.TheoraInfo;

public class Class243_Sub3_Sub1 extends Class243_Sub3
{
    static final int anInt10636 = 2048;
    static final int anInt10637 = 1024;
    SetupInfo aSetupInfo10638 = new SetupInfo();
    TheoraInfo aTheoraInfo10639 = new TheoraInfo();
    GranulePos aGranulePos10640;
    DecoderContext aDecoderContext10641;
    boolean aBool10642;
    Frame aFrame10643;
    double aDouble10644;
    long aLong10645;
    int anInt10646;
    boolean aBool10647;
    int anInt10648;
    boolean aBool10649;
    boolean aBool10650;
    Object anObject10651;
    TheoraComment aTheoraComment10652 = new TheoraComment();
    
    double method17060() {
	return ((Class243_Sub3_Sub1) this).aDouble10644;
    }
    
    void method14505(OggPacket oggpacket, byte i) {
	if (!((Class243_Sub3_Sub1) this).aBool10642) {
	    int i_0_
		= (((Class243_Sub3_Sub1) this).aSetupInfo10638.decodeHeader
		   (((Class243_Sub3_Sub1) this).aTheoraInfo10639,
		    ((Class243_Sub3_Sub1) this).aTheoraComment10652,
		    oggpacket));
	    if (0 == i_0_) {
		((Class243_Sub3_Sub1) this).aBool10642 = true;
		if ((((Class243_Sub3_Sub1) this).aTheoraInfo10639.frameWidth
		     > 2048)
		    || (((Class243_Sub3_Sub1) this).aTheoraInfo10639
			.frameHeight) > 1024)
		    throw new IllegalStateException();
		((Class243_Sub3_Sub1) this).aDecoderContext10641
		    = new DecoderContext((((Class243_Sub3_Sub1) this)
					  .aTheoraInfo10639),
					 (((Class243_Sub3_Sub1) this)
					  .aSetupInfo10638));
		((Class243_Sub3_Sub1) this).aGranulePos10640
		    = new GranulePos();
		((Class243_Sub3_Sub1) this).aFrame10643
		    = new Frame((((Class243_Sub3_Sub1) this).aTheoraInfo10639
				 .frameWidth),
				(((Class243_Sub3_Sub1) this).aTheoraInfo10639
				 .frameHeight));
		((Class243_Sub3_Sub1) this).anInt10648
		    = ((Class243_Sub3_Sub1) this).aDecoderContext10641
			  .getMaxPostProcessingLevel() * -1835793541;
		method17062((-493442375
			     * ((Class243_Sub3_Sub1) this).anInt10646),
			    (byte) -23);
	    } else if (i_0_ < 0)
		throw new IllegalStateException(new StringBuilder().append
						    ("").append
						    (i_0_).toString());
	} else {
	    ((Class243_Sub3_Sub1) this).aLong10645
		= Class46.method1238(1112796742) * -7573517346443724313L;
	    int i_1_
		= (((Class243_Sub3_Sub1) this).aDecoderContext10641
		       .decodePacketIn
		   (oggpacket, ((Class243_Sub3_Sub1) this).aGranulePos10640));
	    if (i_1_ < 0)
		throw new IllegalStateException(new StringBuilder().append
						    ("").append
						    (i_1_).toString());
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641
		.granuleFrame(((Class243_Sub3_Sub1) this).aGranulePos10640);
	    ((Class243_Sub3_Sub1) this).aDouble10644
		= (((Class243_Sub3_Sub1) this).aDecoderContext10641.granuleTime
		   (((Class243_Sub3_Sub1) this).aGranulePos10640));
	    if (((Class243_Sub3_Sub1) this).aBool10650) {
		boolean bool = oggpacket.isKeyFrame() == 1;
		if (bool)
		    ((Class243_Sub3_Sub1) this).aBool10650 = false;
		else
		    return;
	    }
	    if (!((Class243_Sub3_Sub1) this).aBool10647
		|| oggpacket.isKeyFrame() == 1) {
		if (((Class243_Sub3_Sub1) this).aDecoderContext10641
			.decodeFrame(((Class243_Sub3_Sub1) this).aFrame10643)
		    != 0)
		    throw new IllegalStateException(new StringBuilder().append
							("").append
							(i_1_).toString());
		((Class243_Sub3_Sub1) this).aBool10649 = true;
	    }
	}
    }
    
    boolean method17061() {
	return ((Class243_Sub3_Sub1) this).aBool10642;
    }
    
    void method17062(int i, byte i_2_) {
	((Class243_Sub3_Sub1) this).anInt10646 = -1992934519 * i;
	if (((Class243_Sub3_Sub1) this).aBool10642) {
	    if (-493442375 * ((Class243_Sub3_Sub1) this).anInt10646
		> 917201843 * ((Class243_Sub3_Sub1) this).anInt10648)
		((Class243_Sub3_Sub1) this).anInt10646
		    = -1804297269 * ((Class243_Sub3_Sub1) this).anInt10648;
	    if (((Class243_Sub3_Sub1) this).anInt10646 * -493442375 < 0)
		((Class243_Sub3_Sub1) this).anInt10646 = 0;
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641
		.setPostProcessingLevel
		(-493442375 * ((Class243_Sub3_Sub1) this).anInt10646);
	}
    }
    
    Class243_Sub3_Sub1(OggStreamState oggstreamstate) {
	super(oggstreamstate);
    }
    
    void method14509(OggPacket oggpacket) {
	if (!((Class243_Sub3_Sub1) this).aBool10642) {
	    int i = (((Class243_Sub3_Sub1) this).aSetupInfo10638.decodeHeader
		     (((Class243_Sub3_Sub1) this).aTheoraInfo10639,
		      ((Class243_Sub3_Sub1) this).aTheoraComment10652,
		      oggpacket));
	    if (0 == i) {
		((Class243_Sub3_Sub1) this).aBool10642 = true;
		if ((((Class243_Sub3_Sub1) this).aTheoraInfo10639.frameWidth
		     > 2048)
		    || (((Class243_Sub3_Sub1) this).aTheoraInfo10639
			.frameHeight) > 1024)
		    throw new IllegalStateException();
		((Class243_Sub3_Sub1) this).aDecoderContext10641
		    = new DecoderContext((((Class243_Sub3_Sub1) this)
					  .aTheoraInfo10639),
					 (((Class243_Sub3_Sub1) this)
					  .aSetupInfo10638));
		((Class243_Sub3_Sub1) this).aGranulePos10640
		    = new GranulePos();
		((Class243_Sub3_Sub1) this).aFrame10643
		    = new Frame((((Class243_Sub3_Sub1) this).aTheoraInfo10639
				 .frameWidth),
				(((Class243_Sub3_Sub1) this).aTheoraInfo10639
				 .frameHeight));
		((Class243_Sub3_Sub1) this).anInt10648
		    = ((Class243_Sub3_Sub1) this).aDecoderContext10641
			  .getMaxPostProcessingLevel() * -1835793541;
		method17062((-493442375
			     * ((Class243_Sub3_Sub1) this).anInt10646),
			    (byte) -3);
	    } else if (i < 0)
		throw new IllegalStateException(new StringBuilder().append
						    ("").append
						    (i).toString());
	} else {
	    ((Class243_Sub3_Sub1) this).aLong10645
		= Class46.method1238(470976508) * -7573517346443724313L;
	    int i
		= (((Class243_Sub3_Sub1) this).aDecoderContext10641
		       .decodePacketIn
		   (oggpacket, ((Class243_Sub3_Sub1) this).aGranulePos10640));
	    if (i < 0)
		throw new IllegalStateException(new StringBuilder().append
						    ("").append
						    (i).toString());
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641
		.granuleFrame(((Class243_Sub3_Sub1) this).aGranulePos10640);
	    ((Class243_Sub3_Sub1) this).aDouble10644
		= (((Class243_Sub3_Sub1) this).aDecoderContext10641.granuleTime
		   (((Class243_Sub3_Sub1) this).aGranulePos10640));
	    if (((Class243_Sub3_Sub1) this).aBool10650) {
		boolean bool = oggpacket.isKeyFrame() == 1;
		if (bool)
		    ((Class243_Sub3_Sub1) this).aBool10650 = false;
		else
		    return;
	    }
	    if (!((Class243_Sub3_Sub1) this).aBool10647
		|| oggpacket.isKeyFrame() == 1) {
		if (((Class243_Sub3_Sub1) this).aDecoderContext10641
			.decodeFrame(((Class243_Sub3_Sub1) this).aFrame10643)
		    != 0)
		    throw new IllegalStateException(new StringBuilder().append
							("").append
							(i).toString());
		((Class243_Sub3_Sub1) this).aBool10649 = true;
	    }
	}
    }
    
    boolean method17063(int i) {
	return ((Class243_Sub3_Sub1) this).aBool10642;
    }
    
    void method14508(int i) {
	if (((Class243_Sub3_Sub1) this).aFrame10643 != null)
	    ((Class243_Sub3_Sub1) this).aFrame10643.method7301();
	if (((Class243_Sub3_Sub1) this).aDecoderContext10641 != null) {
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641.method7301();
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641 = null;
	}
	if (null != ((Class243_Sub3_Sub1) this).aGranulePos10640) {
	    ((Class243_Sub3_Sub1) this).aGranulePos10640.method7301();
	    ((Class243_Sub3_Sub1) this).aGranulePos10640 = null;
	}
	((Class243_Sub3_Sub1) this).aTheoraInfo10639.method7301();
	((Class243_Sub3_Sub1) this).aTheoraComment10652.method7301();
	((Class243_Sub3_Sub1) this).aSetupInfo10638.method7301();
    }
    
    float method17064() {
	if (!((Class243_Sub3_Sub1) this).aBool10642
	    || ((Class243_Sub3_Sub1) this).aTheoraInfo10639.method7300())
	    return 0.0F;
	return ((float) (((Class243_Sub3_Sub1) this).aTheoraInfo10639
			 .fpsNumerator)
		/ (float) (((Class243_Sub3_Sub1) this).aTheoraInfo10639
			   .fpsDenominator));
    }
    
    long method17065(byte i) {
	return ((Class243_Sub3_Sub1) this).aLong10645 * -3169226123401393705L;
    }
    
    void method14510() {
	if (((Class243_Sub3_Sub1) this).aFrame10643 != null)
	    ((Class243_Sub3_Sub1) this).aFrame10643.method7301();
	if (((Class243_Sub3_Sub1) this).aDecoderContext10641 != null) {
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641.method7301();
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641 = null;
	}
	if (null != ((Class243_Sub3_Sub1) this).aGranulePos10640) {
	    ((Class243_Sub3_Sub1) this).aGranulePos10640.method7301();
	    ((Class243_Sub3_Sub1) this).aGranulePos10640 = null;
	}
	((Class243_Sub3_Sub1) this).aTheoraInfo10639.method7301();
	((Class243_Sub3_Sub1) this).aTheoraComment10652.method7301();
	((Class243_Sub3_Sub1) this).aSetupInfo10638.method7301();
    }
    
    void method14511() {
	if (((Class243_Sub3_Sub1) this).aFrame10643 != null)
	    ((Class243_Sub3_Sub1) this).aFrame10643.method7301();
	if (((Class243_Sub3_Sub1) this).aDecoderContext10641 != null) {
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641.method7301();
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641 = null;
	}
	if (null != ((Class243_Sub3_Sub1) this).aGranulePos10640) {
	    ((Class243_Sub3_Sub1) this).aGranulePos10640.method7301();
	    ((Class243_Sub3_Sub1) this).aGranulePos10640 = null;
	}
	((Class243_Sub3_Sub1) this).aTheoraInfo10639.method7301();
	((Class243_Sub3_Sub1) this).aTheoraComment10652.method7301();
	((Class243_Sub3_Sub1) this).aSetupInfo10638.method7301();
    }
    
    void method14512() {
	if (((Class243_Sub3_Sub1) this).aFrame10643 != null)
	    ((Class243_Sub3_Sub1) this).aFrame10643.method7301();
	if (((Class243_Sub3_Sub1) this).aDecoderContext10641 != null) {
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641.method7301();
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641 = null;
	}
	if (null != ((Class243_Sub3_Sub1) this).aGranulePos10640) {
	    ((Class243_Sub3_Sub1) this).aGranulePos10640.method7301();
	    ((Class243_Sub3_Sub1) this).aGranulePos10640 = null;
	}
	((Class243_Sub3_Sub1) this).aTheoraInfo10639.method7301();
	((Class243_Sub3_Sub1) this).aTheoraComment10652.method7301();
	((Class243_Sub3_Sub1) this).aSetupInfo10638.method7301();
    }
    
    public Object method17066(Interface22 interface22, int i) {
	if (((Class243_Sub3_Sub1) this).aFrame10643 == null)
	    return null;
	if (!((Class243_Sub3_Sub1) this).aBool10649
	    && ((Class243_Sub3_Sub1) this).anObject10651 != null)
	    return ((Class243_Sub3_Sub1) this).anObject10651;
	((Class243_Sub3_Sub1) this).anObject10651
	    = (interface22.method126
	       (((Class243_Sub3_Sub1) this).aFrame10643.pixels, 0,
		510188905 * ((Class243_Sub3_Sub1) this).aFrame10643.anInt10398,
		((Class243_Sub3_Sub1) this).aFrame10643.anInt10398 * 510188905,
		((Class243_Sub3_Sub1) this).aFrame10643.anInt10399 * -26864217,
		false, 53586255));
	((Class243_Sub3_Sub1) this).aBool10649 = false;
	return ((Class243_Sub3_Sub1) this).anObject10651;
    }
    
    void method17067(int i) {
	((Class243_Sub3_Sub1) this).anInt10646 = -1992934519 * i;
	if (((Class243_Sub3_Sub1) this).aBool10642) {
	    if (-493442375 * ((Class243_Sub3_Sub1) this).anInt10646
		> 917201843 * ((Class243_Sub3_Sub1) this).anInt10648)
		((Class243_Sub3_Sub1) this).anInt10646
		    = -1804297269 * ((Class243_Sub3_Sub1) this).anInt10648;
	    if (((Class243_Sub3_Sub1) this).anInt10646 * -493442375 < 0)
		((Class243_Sub3_Sub1) this).anInt10646 = 0;
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641
		.setPostProcessingLevel
		(-493442375 * ((Class243_Sub3_Sub1) this).anInt10646);
	}
    }
    
    double method17068(int i) {
	return ((Class243_Sub3_Sub1) this).aDouble10644;
    }
    
    public Object method17069(Interface22 interface22) {
	if (((Class243_Sub3_Sub1) this).aFrame10643 == null)
	    return null;
	if (!((Class243_Sub3_Sub1) this).aBool10649
	    && ((Class243_Sub3_Sub1) this).anObject10651 != null)
	    return ((Class243_Sub3_Sub1) this).anObject10651;
	((Class243_Sub3_Sub1) this).anObject10651
	    = (interface22.method126
	       (((Class243_Sub3_Sub1) this).aFrame10643.pixels, 0,
		510188905 * ((Class243_Sub3_Sub1) this).aFrame10643.anInt10398,
		((Class243_Sub3_Sub1) this).aFrame10643.anInt10398 * 510188905,
		((Class243_Sub3_Sub1) this).aFrame10643.anInt10399 * -26864217,
		false, 1617900607));
	((Class243_Sub3_Sub1) this).aBool10649 = false;
	return ((Class243_Sub3_Sub1) this).anObject10651;
    }
    
    double method17070() {
	return ((Class243_Sub3_Sub1) this).aDouble10644;
    }
    
    long method17071() {
	return ((Class243_Sub3_Sub1) this).aLong10645 * -3169226123401393705L;
    }
    
    long method17072() {
	return ((Class243_Sub3_Sub1) this).aLong10645 * -3169226123401393705L;
    }
    
    long method17073() {
	return ((Class243_Sub3_Sub1) this).aLong10645 * -3169226123401393705L;
    }
    
    long method17074() {
	return ((Class243_Sub3_Sub1) this).aLong10645 * -3169226123401393705L;
    }
    
    void method14507() {
	if (((Class243_Sub3_Sub1) this).aFrame10643 != null)
	    ((Class243_Sub3_Sub1) this).aFrame10643.method7301();
	if (((Class243_Sub3_Sub1) this).aDecoderContext10641 != null) {
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641.method7301();
	    ((Class243_Sub3_Sub1) this).aDecoderContext10641 = null;
	}
	if (null != ((Class243_Sub3_Sub1) this).aGranulePos10640) {
	    ((Class243_Sub3_Sub1) this).aGranulePos10640.method7301();
	    ((Class243_Sub3_Sub1) this).aGranulePos10640 = null;
	}
	((Class243_Sub3_Sub1) this).aTheoraInfo10639.method7301();
	((Class243_Sub3_Sub1) this).aTheoraComment10652.method7301();
	((Class243_Sub3_Sub1) this).aSetupInfo10638.method7301();
    }
    
    public Object method17075(Interface22 interface22) {
	if (((Class243_Sub3_Sub1) this).aFrame10643 == null)
	    return null;
	if (!((Class243_Sub3_Sub1) this).aBool10649
	    && ((Class243_Sub3_Sub1) this).anObject10651 != null)
	    return ((Class243_Sub3_Sub1) this).anObject10651;
	((Class243_Sub3_Sub1) this).anObject10651
	    = (interface22.method126
	       (((Class243_Sub3_Sub1) this).aFrame10643.pixels, 0,
		510188905 * ((Class243_Sub3_Sub1) this).aFrame10643.anInt10398,
		((Class243_Sub3_Sub1) this).aFrame10643.anInt10398 * 510188905,
		((Class243_Sub3_Sub1) this).aFrame10643.anInt10399 * -26864217,
		false, 1220253748));
	((Class243_Sub3_Sub1) this).aBool10649 = false;
	return ((Class243_Sub3_Sub1) this).anObject10651;
    }
    
    public Object method17076(Interface22 interface22) {
	if (((Class243_Sub3_Sub1) this).aFrame10643 == null)
	    return null;
	if (!((Class243_Sub3_Sub1) this).aBool10649
	    && ((Class243_Sub3_Sub1) this).anObject10651 != null)
	    return ((Class243_Sub3_Sub1) this).anObject10651;
	((Class243_Sub3_Sub1) this).anObject10651
	    = (interface22.method126
	       (((Class243_Sub3_Sub1) this).aFrame10643.pixels, 0,
		510188905 * ((Class243_Sub3_Sub1) this).aFrame10643.anInt10398,
		((Class243_Sub3_Sub1) this).aFrame10643.anInt10398 * 510188905,
		((Class243_Sub3_Sub1) this).aFrame10643.anInt10399 * -26864217,
		false, -1547946515));
	((Class243_Sub3_Sub1) this).aBool10649 = false;
	return ((Class243_Sub3_Sub1) this).anObject10651;
    }
    
    float method17077(int i) {
	if (!((Class243_Sub3_Sub1) this).aBool10642
	    || ((Class243_Sub3_Sub1) this).aTheoraInfo10639.method7300())
	    return 0.0F;
	return ((float) (((Class243_Sub3_Sub1) this).aTheoraInfo10639
			 .fpsNumerator)
		/ (float) (((Class243_Sub3_Sub1) this).aTheoraInfo10639
			   .fpsDenominator));
    }
    
    public Object method17078(Interface22 interface22) {
	if (((Class243_Sub3_Sub1) this).aFrame10643 == null)
	    return null;
	if (!((Class243_Sub3_Sub1) this).aBool10649
	    && ((Class243_Sub3_Sub1) this).anObject10651 != null)
	    return ((Class243_Sub3_Sub1) this).anObject10651;
	((Class243_Sub3_Sub1) this).anObject10651
	    = (interface22.method126
	       (((Class243_Sub3_Sub1) this).aFrame10643.pixels, 0,
		510188905 * ((Class243_Sub3_Sub1) this).aFrame10643.anInt10398,
		((Class243_Sub3_Sub1) this).aFrame10643.anInt10398 * 510188905,
		((Class243_Sub3_Sub1) this).aFrame10643.anInt10399 * -26864217,
		false, -145369104));
	((Class243_Sub3_Sub1) this).aBool10649 = false;
	return ((Class243_Sub3_Sub1) this).anObject10651;
    }
}
