
public class Class196 {

   Class288[] aClass288Array2345 = new Class288[10];
   int anInt2346;
   int anInt2347;
   static final int anInt2348 = 22050;


   public Class225_Sub26_Sub1_Sub1 method3360() {
      byte[] var1 = this.method3364();
      return new Class225_Sub26_Sub1_Sub1(22050, var1, 22050 * this.anInt2347 / 1000, 22050 * this.anInt2346 / 1000);
   }

   final byte[] method3361() {
      int var1 = 0;

      int var2;
      for(var2 = 0; var2 < 10; ++var2) {
         if(this.aClass288Array2345[var2] != null && this.aClass288Array2345[var2].anInt3398 + this.aClass288Array2345[var2].anInt3392 > var1) {
            var1 = this.aClass288Array2345[var2].anInt3398 + this.aClass288Array2345[var2].anInt3392;
         }
      }

      if(var1 == 0) {
         return new byte[0];
      } else {
         var2 = 22050 * var1 / 1000;
         byte[] var3 = new byte[var2];

         for(int var4 = 0; var4 < 10; ++var4) {
            if(this.aClass288Array2345[var4] != null) {
               int var5 = this.aClass288Array2345[var4].anInt3398 * 22050 / 1000;
               int var6 = this.aClass288Array2345[var4].anInt3392 * 22050 / 1000;
               int[] var7 = this.aClass288Array2345[var4].method5265(var5, this.aClass288Array2345[var4].anInt3398);

               for(int var8 = 0; var8 < var5; ++var8) {
                  int var9 = var3[var8 + var6] + (var7[var8] >> 8);
                  if((var9 + 128 & -256) != 0) {
                     var9 = var9 >> 31 ^ 127;
                  }

                  var3[var8 + var6] = (byte)var9;
               }
            }
         }

         return var3;
      }
   }

   public Class225_Sub26_Sub1_Sub1 method3362() {
      byte[] var1 = this.method3364();
      return new Class225_Sub26_Sub1_Sub1(22050, var1, 22050 * this.anInt2347 / 1000, 22050 * this.anInt2346 / 1000);
   }

   final byte[] method3363() {
      int var1 = 0;

      int var2;
      for(var2 = 0; var2 < 10; ++var2) {
         if(this.aClass288Array2345[var2] != null && this.aClass288Array2345[var2].anInt3398 + this.aClass288Array2345[var2].anInt3392 > var1) {
            var1 = this.aClass288Array2345[var2].anInt3398 + this.aClass288Array2345[var2].anInt3392;
         }
      }

      if(var1 == 0) {
         return new byte[0];
      } else {
         var2 = 22050 * var1 / 1000;
         byte[] var3 = new byte[var2];

         for(int var4 = 0; var4 < 10; ++var4) {
            if(this.aClass288Array2345[var4] != null) {
               int var5 = this.aClass288Array2345[var4].anInt3398 * 22050 / 1000;
               int var6 = this.aClass288Array2345[var4].anInt3392 * 22050 / 1000;
               int[] var7 = this.aClass288Array2345[var4].method5265(var5, this.aClass288Array2345[var4].anInt3398);

               for(int var8 = 0; var8 < var5; ++var8) {
                  int var9 = var3[var8 + var6] + (var7[var8] >> 8);
                  if((var9 + 128 & -256) != 0) {
                     var9 = var9 >> 31 ^ 127;
                  }

                  var3[var8 + var6] = (byte)var9;
               }
            }
         }

         return var3;
      }
   }

   final byte[] method3364() {
      int var1 = 0;

      int var2;
      for(var2 = 0; var2 < 10; ++var2) {
         if(this.aClass288Array2345[var2] != null && this.aClass288Array2345[var2].anInt3398 + this.aClass288Array2345[var2].anInt3392 > var1) {
            var1 = this.aClass288Array2345[var2].anInt3398 + this.aClass288Array2345[var2].anInt3392;
         }
      }

      if(var1 == 0) {
         return new byte[0];
      } else {
         var2 = 22050 * var1 / 1000;
         byte[] var3 = new byte[var2];

         for(int var4 = 0; var4 < 10; ++var4) {
            if(this.aClass288Array2345[var4] != null) {
               int var5 = this.aClass288Array2345[var4].anInt3398 * 22050 / 1000;
               int var6 = this.aClass288Array2345[var4].anInt3392 * 22050 / 1000;
               int[] var7 = this.aClass288Array2345[var4].method5265(var5, this.aClass288Array2345[var4].anInt3398);

               for(int var8 = 0; var8 < var5; ++var8) {
                  int var9 = var3[var8 + var6] + (var7[var8] >> 8);
                  if((var9 + 128 & -256) != 0) {
                     var9 = var9 >> 31 ^ 127;
                  }

                  var3[var8 + var6] = (byte)var9;
               }
            }
         }

         return var3;
      }
   }

   public static Class196 method3365(Class253 var0, int var1, int var2) {
      byte[] var3 = var0.method4547(var1, var2, (byte)-27);
      return var3 == null?null:new Class196(new RS2Buffer(var3));
   }

   public static Class196 method3366(Class253 var0, int var1, int var2) {
      byte[] var3 = var0.method4547(var1, var2, (byte)25);
      return var3 == null?null:new Class196(new RS2Buffer(var3));
   }

   public Class225_Sub26_Sub1_Sub1 method3367() {
      byte[] var1 = this.method3364();
      return new Class225_Sub26_Sub1_Sub1(22050, var1, 22050 * this.anInt2347 / 1000, 22050 * this.anInt2346 / 1000);
   }

   Class196(RS2Buffer var1) {
      for(int var2 = 0; var2 < 10; ++var2) {
         int var3 = var1.readUnsignedByte(-700559597);
         if(var3 != 0) {
            var1.position -= 1385214721;
            this.aClass288Array2345[var2] = new Class288();
            this.aClass288Array2345[var2].method5271(var1);
         }
      }

      this.anInt2347 = var1.readUnsignedShort(-937710807);
      this.anInt2346 = var1.readUnsignedShort(-937710807);
   }

   public final int method3368() {
      int var1 = 9999999;

      int var2;
      for(var2 = 0; var2 < 10; ++var2) {
         if(this.aClass288Array2345[var2] != null && this.aClass288Array2345[var2].anInt3392 / 20 < var1) {
            var1 = this.aClass288Array2345[var2].anInt3392 / 20;
         }
      }

      if(this.anInt2347 < this.anInt2346 && this.anInt2347 / 20 < var1) {
         var1 = this.anInt2347 / 20;
      }

      if(var1 != 9999999 && var1 != 0) {
         for(var2 = 0; var2 < 10; ++var2) {
            if(this.aClass288Array2345[var2] != null) {
               this.aClass288Array2345[var2].anInt3392 -= var1 * 20;
            }
         }

         if(this.anInt2347 < this.anInt2346) {
            this.anInt2347 -= var1 * 20;
            this.anInt2346 -= var1 * 20;
         }

         return var1;
      } else {
         return 0;
      }
   }

   public static Class196 method3369(Class253 var0, int var1, int var2) {
      byte[] var3 = var0.method4547(var1, var2, (byte)-27);
      return var3 == null?null:new Class196(new RS2Buffer(var3));
   }

   final byte[] method3370() {
      int var1 = 0;

      int var2;
      for(var2 = 0; var2 < 10; ++var2) {
         if(this.aClass288Array2345[var2] != null && this.aClass288Array2345[var2].anInt3398 + this.aClass288Array2345[var2].anInt3392 > var1) {
            var1 = this.aClass288Array2345[var2].anInt3398 + this.aClass288Array2345[var2].anInt3392;
         }
      }

      if(var1 == 0) {
         return new byte[0];
      } else {
         var2 = 22050 * var1 / 1000;
         byte[] var3 = new byte[var2];

         for(int var4 = 0; var4 < 10; ++var4) {
            if(this.aClass288Array2345[var4] != null) {
               int var5 = this.aClass288Array2345[var4].anInt3398 * 22050 / 1000;
               int var6 = this.aClass288Array2345[var4].anInt3392 * 22050 / 1000;
               int[] var7 = this.aClass288Array2345[var4].method5265(var5, this.aClass288Array2345[var4].anInt3398);

               for(int var8 = 0; var8 < var5; ++var8) {
                  int var9 = var3[var8 + var6] + (var7[var8] >> 8);
                  if((var9 + 128 & -256) != 0) {
                     var9 = var9 >> 31 ^ 127;
                  }

                  var3[var8 + var6] = (byte)var9;
               }
            }
         }

         return var3;
      }
   }
}
