import jagtheora.ogg.OggPacket;
import jagtheora.ogg.OggPage;
import jagtheora.ogg.OggStreamState;
import jagtheora.ogg.OggSyncState;
import java.io.IOException;

public abstract class Class221 {

   OggPacket anOggPacket2576;
   byte[] aByteArray2577;
   static final int anInt2578 = 50;
   OggPage anOggPage2579;
   boolean aBool2580;
   OggSyncState anOggSyncState2581;
   Class423 aClass423_2582;
   boolean aBool2583;
   boolean aBool2584;
   boolean aBool2585;
   Class225_Sub45_Sub3 aClass225_Sub45_Sub3_2586;
   Class225_Sub45_Sub1 aClass225_Sub45_Sub1_2587;
   Class225_Sub45_Sub4 aClass225_Sub45_Sub4_2588;
   String aString2589;
   static final int anInt2590 = 10;


   public void method3785(boolean var1, byte var2) {
      if(this.aClass225_Sub45_Sub1_2587 != null) {
         Class225_Sub12_Sub4 var3 = this.aClass225_Sub45_Sub1_2587.method15586((byte)108);
         if(var3 != null) {
            var3.method16234(var1, (byte)65);
         }
      }

      this.aBool2584 = !this.aBool2584;
   }

   public void method3786() {
      if(!this.aBool2580) {
         for(Class225_Sub45 var1 = (Class225_Sub45)this.aClass423_2582.method7208(-405853513); var1 != null; var1 = (Class225_Sub45)this.aClass423_2582.method7226(-820132212)) {
            var1.method14175(-340155181);
            var1.anOggStreamState8777.method6701();
         }

         this.anOggPacket2576.method6701();
         this.anOggPage2579.method6701();
         this.anOggSyncState2581.method6701();
         this.aBool2580 = true;
      }
   }

   Class225_Sub45 method3787() throws IOException {
      if(this.aBool2580) {
         throw new IllegalStateException();
      } else if(this.aBool2585) {
         return null;
      } else {
         int var1;
         while(this.anOggSyncState2581.pageOut(this.anOggPage2579) <= 0) {
            var1 = this.method3804(this.aByteArray2577, (byte)-75);
            if(var1 == -1) {
               this.aBool2585 = true;
               return null;
            }

            if(0 == var1) {
               return null;
            }

            if(!this.anOggSyncState2581.write(this.aByteArray2577, var1)) {
               throw new RuntimeException("");
            }
         }

         var1 = this.anOggPage2579.getSerialNumber();
         if(!this.anOggPage2579.isBOS()) {
            Class225_Sub45 var7 = (Class225_Sub45)this.aClass423_2582.method7211((long)var1);
            if(!var7.anOggStreamState8777.pageIn(this.anOggPage2579)) {
               throw new IllegalStateException();
            } else {
               return var7;
            }
         } else {
            OggStreamState var2 = new OggStreamState(var1);
            if(!var2.pageIn(this.anOggPage2579)) {
               throw new IllegalStateException();
            } else if(var2.packetPeek(this.anOggPacket2576) != 1) {
               throw new IllegalStateException();
            } else {
               Object var3;
               if(null == this.aClass225_Sub45_Sub3_2586 && this.anOggPacket2576.isTheora()) {
                  this.aClass225_Sub45_Sub3_2586 = new Class225_Sub45_Sub3(var2);
                  var3 = this.aClass225_Sub45_Sub3_2586;
               } else if(this.aClass225_Sub45_Sub1_2587 == null && this.anOggPacket2576.isVorbis()) {
                  this.aClass225_Sub45_Sub1_2587 = new Class225_Sub45_Sub1(var2);
                  var3 = this.aClass225_Sub45_Sub1_2587;
               } else {
                  byte[] var4 = this.anOggPacket2576.getData();
                  StringBuilder var5 = new StringBuilder();

                  for(int var6 = 1; var6 < var4.length && Character.isLetterOrDigit((char)var4[var6]); ++var6) {
                     var5.append((char)var4[var6]);
                  }

                  String var8 = var5.toString();
                  if(var8.equals("kate")) {
                     var3 = new Class225_Sub45_Sub4(var2);
                  } else {
                     var3 = new Class225_Sub45_Sub2(var2);
                  }
               }

               this.aClass423_2582.method7206((Class225)var3, (long)var1);
               return (Class225_Sub45)var3;
            }
         }
      }
   }

   public void method3788(int var1) throws IOException {
      if(!this.aBool2584) {
         for(; !this.aBool2580; this.aBool2583 = false) {
            Class225_Sub45 var2;
            if(!this.aBool2583) {
               var2 = this.method3817(2143105536);
               if(var2 == null) {
                  if(this.aBool2585) {
                     this.method3791(425983709);
                  }

                  return;
               }

               if(var2 == null) {
                  throw new IllegalStateException();
               }

               this.aBool2583 = true;
            } else {
               var2 = (Class225_Sub45)this.aClass423_2582.method7211((long)this.anOggPage2579.getSerialNumber());
            }

            if(this.aClass225_Sub45_Sub1_2587 == var2) {
               if(this.aClass225_Sub45_Sub1_2587.method15585(966233476) >= 50) {
                  return;
               }

               while(this.aClass225_Sub45_Sub1_2587.anOggStreamState8777.packetOut(this.anOggPacket2576) == 1) {
                  this.aClass225_Sub45_Sub1_2587.method14169(this.anOggPacket2576, -1268248750);
                  this.method3810(-1635601368);
                  if(null != this.aClass225_Sub45_Sub3_2586) {
                     double var3 = this.aClass225_Sub45_Sub3_2586.method16078(-1951430324);

                     for(int var5 = 0; var5 < 10 && this.method3811((byte)56); ++var5) {
                        this.method3789(430412901);
                        if(this.aBool2580) {
                           return;
                        }
                     }

                     if(var3 < this.aClass225_Sub45_Sub3_2586.method16078(-1079167275)) {
                        return;
                     }
                  }

                  if(this.aClass225_Sub45_Sub1_2587.method15585(1239622549) >= 50) {
                     return;
                  }
               }
            } else if(var2 instanceof Class225_Sub45_Sub4) {
               this.method3810(499716609);
            } else if(var2 != this.aClass225_Sub45_Sub3_2586) {
               for(; var2.anOggStreamState8777.packetOut(this.anOggPacket2576) == 1; var2.method14169(this.anOggPacket2576, 219974258)) {
                  if(1 == -1753786919 * var2.anInt8778 && var2 instanceof Class225_Sub45_Sub4) {
                     this.method3808(this.aString2589, -140072910);
                  }
               }
            } else if(null == this.aClass225_Sub45_Sub1_2587 && !this.aBool2584) {
               for(int var6 = 0; var6 < 10 && this.method3811((byte)63); ++var6) {
                  this.method3789(-893111668);
                  if(this.aBool2580) {
                     return;
                  }
               }

               return;
            }
         }

      }
   }

   void method3789(int var1) throws IOException {
      while(this.aClass225_Sub45_Sub3_2586.anOggStreamState8777.packetOut(this.anOggPacket2576) != 1) {
         Class225_Sub45 var2 = this.method3817(2122189826);
         if(var2 == null) {
            if(this.aBool2585) {
               this.method3791(1756892510);
            }

            return;
         }

         if(this.aClass225_Sub45_Sub4_2588 == var2) {
            this.method3810(-817075421);
         }
      }

      this.aClass225_Sub45_Sub3_2586.method14169(this.anOggPacket2576, -254025779);
   }

   Class221(int var1) {
      if(!Class335.method6178(-224091352).method310("jagtheora", 2098226057)) {
         throw new RuntimeException("");
      } else {
         this.aByteArray2577 = new byte[var1];
         this.anOggSyncState2581 = new OggSyncState();
         this.anOggPage2579 = new OggPage();
         this.anOggPacket2576 = new OggPacket();
         this.aClass423_2582 = new Class423(8);
      }
   }

   void method3790() throws IOException {
      while(this.aClass225_Sub45_Sub3_2586.anOggStreamState8777.packetOut(this.anOggPacket2576) != 1) {
         Class225_Sub45 var1 = this.method3817(2141819440);
         if(var1 == null) {
            if(this.aBool2585) {
               this.method3791(855914755);
            }

            return;
         }

         if(this.aClass225_Sub45_Sub4_2588 == var1) {
            this.method3810(-199104183);
         }
      }

      this.aClass225_Sub45_Sub3_2586.method14169(this.anOggPacket2576, -1906749131);
   }

   void method3791(int var1) {
      for(Class225_Sub45 var2 = (Class225_Sub45)this.aClass423_2582.method7208(-405853513); null != var2; var2 = (Class225_Sub45)this.aClass423_2582.method7226(852570175)) {
         if(var2 != this.aClass225_Sub45_Sub3_2586) {
            while(var2.anOggStreamState8777.packetOut() == 1) {
               var2.method14169(this.anOggPacket2576, 280386483);
            }
         }
      }

      if(null != this.aClass225_Sub45_Sub3_2586) {
         for(int var3 = 0; var3 < 10 && this.method3811((byte)21); ++var3) {
            if(this.aClass225_Sub45_Sub3_2586.anOggStreamState8777.packetOut() != 1) {
               this.method3792(76035684);
               return;
            }

            this.aClass225_Sub45_Sub3_2586.method14169(this.anOggPacket2576, -24546098);
         }

      }
   }

   public void method3792(int var1) {
      if(!this.aBool2580) {
         for(Class225_Sub45 var2 = (Class225_Sub45)this.aClass423_2582.method7208(-405853513); var2 != null; var2 = (Class225_Sub45)this.aClass423_2582.method7226(1928869984)) {
            var2.method14175(-1864502106);
            var2.anOggStreamState8777.method6701();
         }

         this.anOggPacket2576.method6701();
         this.anOggPage2579.method6701();
         this.anOggSyncState2581.method6701();
         this.aBool2580 = true;
      }
   }

   public Class225_Sub45_Sub3 method3793(int var1) {
      return this.aClass225_Sub45_Sub3_2586;
   }

   public Class225_Sub45_Sub1 method3794(int var1) {
      return this.aClass225_Sub45_Sub1_2587;
   }

   public Class225_Sub45_Sub4 method3795(short var1) {
      return this.aClass225_Sub45_Sub4_2588;
   }

   public boolean method3796(int var1) {
      return !this.aBool2580 && !this.aBool2585?false:this.aClass225_Sub45_Sub1_2587 == null || this.aClass225_Sub45_Sub1_2587.method15585(488583379) <= 0;
   }

   public Class225_Sub45_Sub4 method3797() {
      return this.aClass225_Sub45_Sub4_2588;
   }

   public double method3798(byte var1) {
      return null != this.aClass225_Sub45_Sub1_2587?this.aClass225_Sub45_Sub1_2587.method15584(633208247):(this.aClass225_Sub45_Sub3_2586 != null?this.aClass225_Sub45_Sub3_2586.method16078(-923785588):0.0D);
   }

   boolean method3799() {
      if(this.aClass225_Sub45_Sub1_2587 != null) {
         return !this.aClass225_Sub45_Sub3_2586.method16079((byte)71) || this.method3798((byte)-34) > this.aClass225_Sub45_Sub3_2586.method16078(-1563466203);
      } else {
         double var1 = (double)this.aClass225_Sub45_Sub3_2586.method16075((short)15933);
         return var1 == 0.0D || (double)Class339.method6240(1328220740) >= (double)this.aClass225_Sub45_Sub3_2586.method16080(-975934885) + 1000.0D / var1;
      }
   }

   void method3800() throws IOException {
      while(this.aClass225_Sub45_Sub3_2586.anOggStreamState8777.packetOut(this.anOggPacket2576) != 1) {
         Class225_Sub45 var1 = this.method3817(2143322374);
         if(var1 == null) {
            if(this.aBool2585) {
               this.method3791(529751809);
            }

            return;
         }

         if(this.aClass225_Sub45_Sub4_2588 == var1) {
            this.method3810(1355045272);
         }
      }

      this.aClass225_Sub45_Sub3_2586.method14169(this.anOggPacket2576, -2096404837);
   }

   abstract int method3801(byte[] var1) throws IOException;

   abstract int method3802(byte[] var1) throws IOException;

   public void method3803(String var1) {
      this.aString2589 = var1;
      if(null == this.aString2589) {
         this.aClass225_Sub45_Sub4_2588 = null;
      } else {
         if(null != this.aClass225_Sub45_Sub4_2588 && !this.aString2589.equals(this.aClass225_Sub45_Sub4_2588.method16211(-129380160))) {
            this.aClass225_Sub45_Sub4_2588 = null;
         }

         if(null == this.aClass225_Sub45_Sub4_2588) {
            for(Class225_Sub45 var2 = (Class225_Sub45)this.aClass423_2582.method7208(-405853513); null != var2; var2 = (Class225_Sub45)this.aClass423_2582.method7226(-289086576)) {
               if(var2 instanceof Class225_Sub45_Sub4) {
                  Class225_Sub45_Sub4 var3 = (Class225_Sub45_Sub4)var2;
                  if(this.aString2589.equals(var3.method16211(1879993243))) {
                     this.aClass225_Sub45_Sub4_2588 = var3;
                     return;
                  }
               }
            }
         }

      }
   }

   abstract int method3804(byte[] var1, byte var2) throws IOException;

   Class225_Sub45 method3805() throws IOException {
      if(this.aBool2580) {
         throw new IllegalStateException();
      } else if(this.aBool2585) {
         return null;
      } else {
         int var1;
         while(this.anOggSyncState2581.pageOut(this.anOggPage2579) <= 0) {
            var1 = this.method3804(this.aByteArray2577, (byte)-8);
            if(var1 == -1) {
               this.aBool2585 = true;
               return null;
            }

            if(0 == var1) {
               return null;
            }

            if(!this.anOggSyncState2581.write(this.aByteArray2577, var1)) {
               throw new RuntimeException("");
            }
         }

         var1 = this.anOggPage2579.getSerialNumber();
         if(!this.anOggPage2579.isBOS()) {
            Class225_Sub45 var7 = (Class225_Sub45)this.aClass423_2582.method7211((long)var1);
            if(!var7.anOggStreamState8777.pageIn(this.anOggPage2579)) {
               throw new IllegalStateException();
            } else {
               return var7;
            }
         } else {
            OggStreamState var2 = new OggStreamState(var1);
            if(!var2.pageIn(this.anOggPage2579)) {
               throw new IllegalStateException();
            } else if(var2.packetPeek(this.anOggPacket2576) != 1) {
               throw new IllegalStateException();
            } else {
               Object var3;
               if(null == this.aClass225_Sub45_Sub3_2586 && this.anOggPacket2576.isTheora()) {
                  this.aClass225_Sub45_Sub3_2586 = new Class225_Sub45_Sub3(var2);
                  var3 = this.aClass225_Sub45_Sub3_2586;
               } else if(this.aClass225_Sub45_Sub1_2587 == null && this.anOggPacket2576.isVorbis()) {
                  this.aClass225_Sub45_Sub1_2587 = new Class225_Sub45_Sub1(var2);
                  var3 = this.aClass225_Sub45_Sub1_2587;
               } else {
                  byte[] var4 = this.anOggPacket2576.getData();
                  StringBuilder var5 = new StringBuilder();

                  for(int var6 = 1; var6 < var4.length && Character.isLetterOrDigit((char)var4[var6]); ++var6) {
                     var5.append((char)var4[var6]);
                  }

                  String var8 = var5.toString();
                  if(var8.equals("kate")) {
                     var3 = new Class225_Sub45_Sub4(var2);
                  } else {
                     var3 = new Class225_Sub45_Sub2(var2);
                  }
               }

               this.aClass423_2582.method7206((Class225)var3, (long)var1);
               return (Class225_Sub45)var3;
            }
         }
      }
   }

   public void method3806() throws IOException {
      if(!this.aBool2584) {
         for(; !this.aBool2580; this.aBool2583 = false) {
            Class225_Sub45 var1;
            if(!this.aBool2583) {
               var1 = this.method3817(2142433365);
               if(var1 == null) {
                  if(this.aBool2585) {
                     this.method3791(443570906);
                  }

                  return;
               }

               if(var1 == null) {
                  throw new IllegalStateException();
               }

               this.aBool2583 = true;
            } else {
               var1 = (Class225_Sub45)this.aClass423_2582.method7211((long)this.anOggPage2579.getSerialNumber());
            }

            if(this.aClass225_Sub45_Sub1_2587 == var1) {
               if(this.aClass225_Sub45_Sub1_2587.method15585(-1110205313) >= 50) {
                  return;
               }

               while(this.aClass225_Sub45_Sub1_2587.anOggStreamState8777.packetOut(this.anOggPacket2576) == 1) {
                  this.aClass225_Sub45_Sub1_2587.method14169(this.anOggPacket2576, -1777974276);
                  this.method3810(-1475744293);
                  if(null != this.aClass225_Sub45_Sub3_2586) {
                     double var2 = this.aClass225_Sub45_Sub3_2586.method16078(-669865788);

                     for(int var4 = 0; var4 < 10 && this.method3811((byte)89); ++var4) {
                        this.method3789(-1143741472);
                        if(this.aBool2580) {
                           return;
                        }
                     }

                     if(var2 < this.aClass225_Sub45_Sub3_2586.method16078(-55212931)) {
                        return;
                     }
                  }

                  if(this.aClass225_Sub45_Sub1_2587.method15585(-962423282) >= 50) {
                     return;
                  }
               }
            } else if(var1 instanceof Class225_Sub45_Sub4) {
               this.method3810(1063207690);
            } else if(var1 != this.aClass225_Sub45_Sub3_2586) {
               for(; var1.anOggStreamState8777.packetOut(this.anOggPacket2576) == 1; var1.method14169(this.anOggPacket2576, -2120314262)) {
                  if(1 == -1753786919 * var1.anInt8778 && var1 instanceof Class225_Sub45_Sub4) {
                     this.method3808(this.aString2589, 187881584);
                  }
               }
            } else if(null == this.aClass225_Sub45_Sub1_2587 && !this.aBool2584) {
               for(int var5 = 0; var5 < 10 && this.method3811((byte)27); ++var5) {
                  this.method3789(-1890068510);
                  if(this.aBool2580) {
                     return;
                  }
               }

               return;
            }
         }

      }
   }

   boolean method3807() {
      if(this.aClass225_Sub45_Sub1_2587 != null) {
         return !this.aClass225_Sub45_Sub3_2586.method16079((byte)43) || this.method3798((byte)55) > this.aClass225_Sub45_Sub3_2586.method16078(-938349326);
      } else {
         double var1 = (double)this.aClass225_Sub45_Sub3_2586.method16075((short)-19814);
         return var1 == 0.0D || (double)Class339.method6240(1301470852) >= (double)this.aClass225_Sub45_Sub3_2586.method16080(413718718) + 1000.0D / var1;
      }
   }

   public void method3808(String var1, int var2) {
      this.aString2589 = var1;
      if(null == this.aString2589) {
         this.aClass225_Sub45_Sub4_2588 = null;
      } else {
         if(null != this.aClass225_Sub45_Sub4_2588 && !this.aString2589.equals(this.aClass225_Sub45_Sub4_2588.method16211(827310612))) {
            this.aClass225_Sub45_Sub4_2588 = null;
         }

         if(null == this.aClass225_Sub45_Sub4_2588) {
            for(Class225_Sub45 var3 = (Class225_Sub45)this.aClass423_2582.method7208(-405853513); null != var3; var3 = (Class225_Sub45)this.aClass423_2582.method7226(-592291668)) {
               if(var3 instanceof Class225_Sub45_Sub4) {
                  Class225_Sub45_Sub4 var4 = (Class225_Sub45_Sub4)var3;
                  if(this.aString2589.equals(var4.method16211(4312904))) {
                     this.aClass225_Sub45_Sub4_2588 = var4;
                     return;
                  }
               }
            }
         }

      }
   }

   abstract int method3809(byte[] var1) throws IOException;

   void method3810(int var1) {
      for(Class225_Sub45 var2 = (Class225_Sub45)this.aClass423_2582.method7208(-405853513); null != var2; var2 = (Class225_Sub45)this.aClass423_2582.method7226(852065374)) {
         if(var2 instanceof Class225_Sub45_Sub4) {
            Class225_Sub45_Sub4 var3 = (Class225_Sub45_Sub4)var2;

            while((var3.anInt8778 * -1753786919 <= 8 || this.method3798((byte)90) > (double)var3.method16212(98312473)) && var3.anOggStreamState8777.packetOut(this.anOggPacket2576) == 1) {
               var3.method14169(this.anOggPacket2576, -2029186900);
            }
         }
      }

      this.method3808(this.aString2589, 1965237957);
   }

   boolean method3811(byte var1) {
      if(this.aClass225_Sub45_Sub1_2587 != null) {
         return !this.aClass225_Sub45_Sub3_2586.method16079((byte)39) || this.method3798((byte)30) > this.aClass225_Sub45_Sub3_2586.method16078(-167214685);
      } else {
         double var2 = (double)this.aClass225_Sub45_Sub3_2586.method16075((short)-7339);
         return var2 == 0.0D || (double)Class339.method6240(1245169025) >= (double)this.aClass225_Sub45_Sub3_2586.method16080(1463386287) + 1000.0D / var2;
      }
   }

   Class225_Sub45 method3812() throws IOException {
      if(this.aBool2580) {
         throw new IllegalStateException();
      } else if(this.aBool2585) {
         return null;
      } else {
         int var1;
         while(this.anOggSyncState2581.pageOut(this.anOggPage2579) <= 0) {
            var1 = this.method3804(this.aByteArray2577, (byte)-45);
            if(var1 == -1) {
               this.aBool2585 = true;
               return null;
            }

            if(0 == var1) {
               return null;
            }

            if(!this.anOggSyncState2581.write(this.aByteArray2577, var1)) {
               throw new RuntimeException("");
            }
         }

         var1 = this.anOggPage2579.getSerialNumber();
         if(!this.anOggPage2579.isBOS()) {
            Class225_Sub45 var7 = (Class225_Sub45)this.aClass423_2582.method7211((long)var1);
            if(!var7.anOggStreamState8777.pageIn(this.anOggPage2579)) {
               throw new IllegalStateException();
            } else {
               return var7;
            }
         } else {
            OggStreamState var2 = new OggStreamState(var1);
            if(!var2.pageIn(this.anOggPage2579)) {
               throw new IllegalStateException();
            } else if(var2.packetPeek(this.anOggPacket2576) != 1) {
               throw new IllegalStateException();
            } else {
               Object var3;
               if(null == this.aClass225_Sub45_Sub3_2586 && this.anOggPacket2576.isTheora()) {
                  this.aClass225_Sub45_Sub3_2586 = new Class225_Sub45_Sub3(var2);
                  var3 = this.aClass225_Sub45_Sub3_2586;
               } else if(this.aClass225_Sub45_Sub1_2587 == null && this.anOggPacket2576.isVorbis()) {
                  this.aClass225_Sub45_Sub1_2587 = new Class225_Sub45_Sub1(var2);
                  var3 = this.aClass225_Sub45_Sub1_2587;
               } else {
                  byte[] var4 = this.anOggPacket2576.getData();
                  StringBuilder var5 = new StringBuilder();

                  for(int var6 = 1; var6 < var4.length && Character.isLetterOrDigit((char)var4[var6]); ++var6) {
                     var5.append((char)var4[var6]);
                  }

                  String var8 = var5.toString();
                  if(var8.equals("kate")) {
                     var3 = new Class225_Sub45_Sub4(var2);
                  } else {
                     var3 = new Class225_Sub45_Sub2(var2);
                  }
               }

               this.aClass423_2582.method7206((Class225)var3, (long)var1);
               return (Class225_Sub45)var3;
            }
         }
      }
   }

   public boolean method3813() {
      return !this.aBool2580 && !this.aBool2585?false:this.aClass225_Sub45_Sub1_2587 == null || this.aClass225_Sub45_Sub1_2587.method15585(-345925056) <= 0;
   }

   public void method3814(boolean var1) {
      if(this.aClass225_Sub45_Sub1_2587 != null) {
         Class225_Sub12_Sub4 var2 = this.aClass225_Sub45_Sub1_2587.method15586((byte)5);
         if(var2 != null) {
            var2.method16234(var1, (byte)97);
         }
      }

      this.aBool2584 = !this.aBool2584;
   }

   public boolean method3815() {
      return !this.aBool2580 && !this.aBool2585?false:this.aClass225_Sub45_Sub1_2587 == null || this.aClass225_Sub45_Sub1_2587.method15585(-146898057) <= 0;
   }

   public boolean method3816() {
      return !this.aBool2580 && !this.aBool2585?false:this.aClass225_Sub45_Sub1_2587 == null || this.aClass225_Sub45_Sub1_2587.method15585(1023279261) <= 0;
   }

   Class225_Sub45 method3817(int var1) throws IOException {
      if(this.aBool2580) {
         throw new IllegalStateException();
      } else if(this.aBool2585) {
         return null;
      } else {
         int var2;
         while(this.anOggSyncState2581.pageOut(this.anOggPage2579) <= 0) {
            var2 = this.method3804(this.aByteArray2577, (byte)4);
            if(var2 == -1) {
               this.aBool2585 = true;
               return null;
            }

            if(0 == var2) {
               return null;
            }

            if(!this.anOggSyncState2581.write(this.aByteArray2577, var2)) {
               throw new RuntimeException("");
            }
         }

         var2 = this.anOggPage2579.getSerialNumber();
         if(!this.anOggPage2579.isBOS()) {
            Class225_Sub45 var8 = (Class225_Sub45)this.aClass423_2582.method7211((long)var2);
            if(!var8.anOggStreamState8777.pageIn(this.anOggPage2579)) {
               throw new IllegalStateException();
            } else {
               return var8;
            }
         } else {
            OggStreamState var3 = new OggStreamState(var2);
            if(!var3.pageIn(this.anOggPage2579)) {
               throw new IllegalStateException();
            } else if(var3.packetPeek(this.anOggPacket2576) != 1) {
               throw new IllegalStateException();
            } else {
               Object var4;
               if(null == this.aClass225_Sub45_Sub3_2586 && this.anOggPacket2576.isTheora()) {
                  this.aClass225_Sub45_Sub3_2586 = new Class225_Sub45_Sub3(var3);
                  var4 = this.aClass225_Sub45_Sub3_2586;
               } else if(this.aClass225_Sub45_Sub1_2587 == null && this.anOggPacket2576.isVorbis()) {
                  this.aClass225_Sub45_Sub1_2587 = new Class225_Sub45_Sub1(var3);
                  var4 = this.aClass225_Sub45_Sub1_2587;
               } else {
                  byte[] var5 = this.anOggPacket2576.getData();
                  StringBuilder var6 = new StringBuilder();

                  for(int var7 = 1; var7 < var5.length && Character.isLetterOrDigit((char)var5[var7]); ++var7) {
                     var6.append((char)var5[var7]);
                  }

                  String var9 = var6.toString();
                  if(var9.equals("kate")) {
                     var4 = new Class225_Sub45_Sub4(var3);
                  } else {
                     var4 = new Class225_Sub45_Sub2(var3);
                  }
               }

               this.aClass423_2582.method7206((Class225)var4, (long)var2);
               return (Class225_Sub45)var4;
            }
         }
      }
   }

   public double method3818() {
      return null != this.aClass225_Sub45_Sub1_2587?this.aClass225_Sub45_Sub1_2587.method15584(160697556):(this.aClass225_Sub45_Sub3_2586 != null?this.aClass225_Sub45_Sub3_2586.method16078(-1979546130):0.0D);
   }

   public double method3819() {
      return null != this.aClass225_Sub45_Sub1_2587?this.aClass225_Sub45_Sub1_2587.method15584(664733230):(this.aClass225_Sub45_Sub3_2586 != null?this.aClass225_Sub45_Sub3_2586.method16078(-1852599258):0.0D);
   }

   public double method3820() {
      return null != this.aClass225_Sub45_Sub1_2587?this.aClass225_Sub45_Sub1_2587.method15584(721549256):(this.aClass225_Sub45_Sub3_2586 != null?this.aClass225_Sub45_Sub3_2586.method16078(-991429169):0.0D);
   }

   public double method3821() {
      return null != this.aClass225_Sub45_Sub1_2587?this.aClass225_Sub45_Sub1_2587.method15584(1824979441):(this.aClass225_Sub45_Sub3_2586 != null?this.aClass225_Sub45_Sub3_2586.method16078(-1543789769):0.0D);
   }

   public void method3822(boolean var1) {
      if(this.aClass225_Sub45_Sub1_2587 != null) {
         Class225_Sub12_Sub4 var2 = this.aClass225_Sub45_Sub1_2587.method15586((byte)40);
         if(var2 != null) {
            var2.method16234(var1, (byte)49);
         }
      }

      this.aBool2584 = !this.aBool2584;
   }

   public Class225_Sub45_Sub1 method3823() {
      return this.aClass225_Sub45_Sub1_2587;
   }

   public void method3824(boolean var1) {
      if(this.aClass225_Sub45_Sub1_2587 != null) {
         Class225_Sub12_Sub4 var2 = this.aClass225_Sub45_Sub1_2587.method15586((byte)9);
         if(var2 != null) {
            var2.method16234(var1, (byte)35);
         }
      }

      this.aBool2584 = !this.aBool2584;
   }

   public void method3825(boolean var1) {
      if(this.aClass225_Sub45_Sub1_2587 != null) {
         Class225_Sub12_Sub4 var2 = this.aClass225_Sub45_Sub1_2587.method15586((byte)77);
         if(var2 != null) {
            var2.method16234(var1, (byte)31);
         }
      }

      this.aBool2584 = !this.aBool2584;
   }

   public void method3826(boolean var1) {
      if(this.aClass225_Sub45_Sub1_2587 != null) {
         Class225_Sub12_Sub4 var2 = this.aClass225_Sub45_Sub1_2587.method15586((byte)59);
         if(var2 != null) {
            var2.method16234(var1, (byte)92);
         }
      }

      this.aBool2584 = !this.aBool2584;
   }

   public static final void method3827(short var0) {
      if(client.aBool7753) {
         if(var0 != 16383) {
            ;
         }

      } else {
         client.aFloat7747 += (-12.0F - client.aFloat7747) / 2.0F;
         client.aBool7928 = true;
         client.aBool7753 = true;
      }
   }

   public static void method3828(int var0) {
      Class313.aBool3965 = true;
      Class463_Sub8.aString7996 = Class3.aString81;
      Exception_Sub5.aString10375 = Class3.aString61;
      Class393.method6730(false, -351299954);
      Class118_Sub6.method13182((byte)0);
      Class313.aClass327Array3958 = null;
      Class365.aClass338_4604 = null;
      Class332.method6157(8, -1083885042);
   }

   static final void method3829(Class508 var0, byte var1) {
      int var2 = var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807];
      Class124 var3 = Class97.method1903(var2, 1022250614);
      Class121 var4 = Class18.aClass121Array188[var2 >> 16];
      Class44.method1129(var3, var4, var0, (byte)42);
   }
}
