import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.Toolkit;
import java.awt.image.PixelGrabber;

public class Class504 {

   public boolean aBool5959 = true;
   public int anInt5960 = -223860741;
   int anInt5961;
   public int anInt5962 = 0;
   public int anInt5963 = 1320118425;
   Class509 aClass509_5964;
   public int anInt5965 = 837621661;
   public int anInt5966 = 1325837504;
   public boolean aBool5967 = true;
   public int anInt5968 = 1111630984;
   public boolean aBool5969 = false;
   public int anInt5970 = 557181725;
   static final int anInt5971 = 1190717;
   public int anInt5972 = -555038144;
   public int anInt5973 = 1413342231;
   public int anInt5974 = 0;
   public int anInt5975 = 665212416;
   public static int anInt5976;


   void method8409(int var1) {
      this.anInt5968 = -2008529775 * (this.anInt5968 * 1282145393 << 8 | this.anInt5961 * 653697587);
   }

   void method8410(RS2Buffer var1, int var2) {
      while(true) {
         int var3 = var1.readUnsignedByte(-700559597);
         if(var3 == 0) {
            return;
         }

         this.method8411(var1, var3, 1523375643);
      }
   }

   void method8411(RS2Buffer var1, int var2, int var3) {
      if(var2 == 1) {
         this.anInt5962 = method8429(var1.readTriByte(-1983609144), (byte)17) * -1877303127;
      } else if(var2 == 2) {
         this.anInt5963 = var1.readUnsignedByte(-700559597) * -1320118425;
      } else if(3 == var2) {
         this.anInt5963 = var1.readUnsignedShort(-937710807) * -1320118425;
         if('\uffff' == 354653271 * this.anInt5963) {
            this.anInt5963 = 1320118425;
         }
      } else if(5 == var2) {
         this.aBool5959 = false;
      } else if(var2 == 7) {
         this.anInt5965 = method8429(var1.readTriByte(-1937514361), (byte)-39) * -837621661;
      } else if(var2 == 8) {
         this.aClass509_5964.anInt6031 = this.anInt5961 * -1981748427;
      } else if(var2 == 9) {
         this.anInt5975 = (var1.readUnsignedShort(-937710807) << 2) * -938224853;
      } else if(10 == var2) {
         this.aBool5967 = false;
      } else if(11 == var2) {
         this.anInt5968 = var1.readUnsignedByte(-700559597) * -2008529775;
      } else if(12 == var2) {
         this.aBool5969 = true;
      } else if(13 == var2) {
         this.anInt5970 = var1.readTriByte(-987973084) * 1451113825;
      } else if(var2 == 14) {
         this.anInt5966 = (var1.readUnsignedByte(-700559597) << 2) * -314828109;
      } else if(16 == var2) {
         this.anInt5960 = var1.readUnsignedByte(-700559597) * 1110760709;
      } else if(var2 == 20) {
         this.anInt5973 = var1.readUnsignedShort(-937710807) * 1454089769;
      } else if(var2 == 21) {
         this.anInt5974 = var1.readUnsignedByte(-700559597) * -2131078199;
      } else if(var2 == 22) {
         this.anInt5972 = var1.readUnsignedShort(-937710807) * 1467722537;
      }

   }

   void method8412(RS2Buffer var1, int var2) {
      if(var2 == 1) {
         this.anInt5962 = method8429(var1.readTriByte(-1252099094), (byte)37) * -1877303127;
      } else if(var2 == 2) {
         this.anInt5963 = var1.readUnsignedByte(-700559597) * -1320118425;
      } else if(3 == var2) {
         this.anInt5963 = var1.readUnsignedShort(-937710807) * -1320118425;
         if('\uffff' == 354653271 * this.anInt5963) {
            this.anInt5963 = 1320118425;
         }
      } else if(5 == var2) {
         this.aBool5959 = false;
      } else if(var2 == 7) {
         this.anInt5965 = method8429(var1.readTriByte(1163239812), (byte)-43) * -837621661;
      } else if(var2 == 8) {
         this.aClass509_5964.anInt6031 = this.anInt5961 * -1981748427;
      } else if(var2 == 9) {
         this.anInt5975 = (var1.readUnsignedShort(-937710807) << 2) * -938224853;
      } else if(10 == var2) {
         this.aBool5967 = false;
      } else if(11 == var2) {
         this.anInt5968 = var1.readUnsignedByte(-700559597) * -2008529775;
      } else if(12 == var2) {
         this.aBool5969 = true;
      } else if(13 == var2) {
         this.anInt5970 = var1.readTriByte(847471632) * 1451113825;
      } else if(var2 == 14) {
         this.anInt5966 = (var1.readUnsignedByte(-700559597) << 2) * -314828109;
      } else if(16 == var2) {
         this.anInt5960 = var1.readUnsignedByte(-700559597) * 1110760709;
      } else if(var2 == 20) {
         this.anInt5973 = var1.readUnsignedShort(-937710807) * 1454089769;
      } else if(var2 == 21) {
         this.anInt5974 = var1.readUnsignedByte(-700559597) * -2131078199;
      } else if(var2 == 22) {
         this.anInt5972 = var1.readUnsignedShort(-937710807) * 1467722537;
      }

   }

   void method8413(RS2Buffer var1) {
      while(true) {
         int var2 = var1.readUnsignedByte(-700559597);
         if(var2 == 0) {
            return;
         }

         this.method8411(var1, var2, 1523375643);
      }
   }

   void method8414(RS2Buffer var1) {
      while(true) {
         int var2 = var1.readUnsignedByte(-700559597);
         if(var2 == 0) {
            return;
         }

         this.method8411(var1, var2, 1523375643);
      }
   }

   void method8415(RS2Buffer var1) {
      while(true) {
         int var2 = var1.readUnsignedByte(-700559597);
         if(var2 == 0) {
            return;
         }

         this.method8411(var1, var2, 1523375643);
      }
   }

   void method8416(RS2Buffer var1, int var2) {
      if(var2 == 1) {
         this.anInt5962 = method8429(var1.readTriByte(-775484661), (byte)-25) * -1877303127;
      } else if(var2 == 2) {
         this.anInt5963 = var1.readUnsignedByte(-700559597) * -1320118425;
      } else if(3 == var2) {
         this.anInt5963 = var1.readUnsignedShort(-937710807) * -1320118425;
         if('\uffff' == 354653271 * this.anInt5963) {
            this.anInt5963 = 1320118425;
         }
      } else if(5 == var2) {
         this.aBool5959 = false;
      } else if(var2 == 7) {
         this.anInt5965 = method8429(var1.readTriByte(-1842767667), (byte)6) * -837621661;
      } else if(var2 == 8) {
         this.aClass509_5964.anInt6031 = this.anInt5961 * -1981748427;
      } else if(var2 == 9) {
         this.anInt5975 = (var1.readUnsignedShort(-937710807) << 2) * -938224853;
      } else if(10 == var2) {
         this.aBool5967 = false;
      } else if(11 == var2) {
         this.anInt5968 = var1.readUnsignedByte(-700559597) * -2008529775;
      } else if(12 == var2) {
         this.aBool5969 = true;
      } else if(13 == var2) {
         this.anInt5970 = var1.readTriByte(-1785452512) * 1451113825;
      } else if(var2 == 14) {
         this.anInt5966 = (var1.readUnsignedByte(-700559597) << 2) * -314828109;
      } else if(16 == var2) {
         this.anInt5960 = var1.readUnsignedByte(-700559597) * 1110760709;
      } else if(var2 == 20) {
         this.anInt5973 = var1.readUnsignedShort(-937710807) * 1454089769;
      } else if(var2 == 21) {
         this.anInt5974 = var1.readUnsignedByte(-700559597) * -2131078199;
      } else if(var2 == 22) {
         this.anInt5972 = var1.readUnsignedShort(-937710807) * 1467722537;
      }

   }

   static int method8417(int var0) {
      return var0 == 16711935?-1:Class274.method4853(var0, -1813344700);
   }

   void method8418(RS2Buffer var1) {
      while(true) {
         int var2 = var1.readUnsignedByte(-700559597);
         if(var2 == 0) {
            return;
         }

         this.method8411(var1, var2, 1523375643);
      }
   }

   static int method8419(int var0) {
      return var0 == 16711935?-1:Class274.method4853(var0, 979694389);
   }

   void method8420() {
      this.anInt5968 = -2008529775 * (this.anInt5968 * 1282145393 << 8 | this.anInt5961 * 653697587);
   }

   void method8421() {
      this.anInt5968 = -2008529775 * (this.anInt5968 * 1282145393 << 8 | this.anInt5961 * 653697587);
   }

   void method8422() {
      this.anInt5968 = -2008529775 * (this.anInt5968 * 1282145393 << 8 | this.anInt5961 * 653697587);
   }

   static final void method8423(Class508 var0, short var1) {
      var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = client.aBool7810?1:0;
   }

   static final void method8424(Class508 var0, int var1) {
      String var2 = (String)var0.anObjectArray6004[(var0.anInt6005 -= -46848683) * 639741949];
      Class381.method6597(var2, (byte)0);
   }

   static final void method8425(Class508 var0, int var1) {
      var0.anInt6003 -= 196624946;
      int var2 = var0.anIntArray6027[-937710807 * var0.anInt6003];
      int var3 = var0.anIntArray6027[-937710807 * var0.anInt6003 + 1];
      int var4 = var3 >> 14 & 16383;
      int var5 = var3 & 16383;
      int var6 = Class48.method1186(var2, var4, var5, -1648671240);
      if(var6 < 0) {
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = -1;
      } else {
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = var6;
      }

   }

   static final void method8426(Class508 var0, byte var1) {
      Class423 var2 = var0.aClass225_Sub14_Sub6_6001.aClass423Array10448[var0.anIntArray6023[var0.anInt6025 * 1651565071]];
      IntVar var3 = (IntVar)var2.method7211((long)var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807]);
      if(var3 != null) {
         if(var1 >= 4) {
            ;
         }

         var0.anInt6025 += 1701250923 * var3.integer;
      }

   }

   static Class171 method8427(byte[] var0, int var1) {
      if(null == var0) {
         throw new RuntimeException("");
      } else {
         while(true) {
            try {
               Image var2 = Toolkit.getDefaultToolkit().createImage(var0);
               MediaTracker var3 = new MediaTracker(Class393.anApplet4870);
               var3.addImage(var2, 0);
               var3.waitForAll();
               int var4 = var2.getWidth(Class393.anApplet4870);
               int var5 = var2.getHeight(Class393.anApplet4870);
               if(!var3.isErrorAny() && var4 >= 0 && var5 >= 0) {
                  int[] var6 = new int[var5 * var4];
                  PixelGrabber var7 = new PixelGrabber(var2, 0, 0, var4, var5, var6, 0, var4);
                  var7.grabPixels();
                  return Class428.aClass545_5383.method11599(var6, 0, var4, var4, var5, 98312473);
               }

               throw new RuntimeException("");
            } catch (InterruptedException var8) {
               ;
            }
         }
      }
   }

   static final void method8428(Class508 var0, byte var1) {
      Class505 var10000;
      if(var0.aBool6014) {
         if(var1 == 0) {
            return;
         }

         var10000 = var0.aClass505_6011;
      } else {
         var10000 = var0.aClass505_6010;
      }

      Class505 var2 = var10000;
      Class124 var3 = var2.aClass124_5977;
      Class121 var4 = var2.aClass121_5978;
      Class493.method8277(var3, var4, var0, 11679202);
   }

   static int method8429(int var0, byte var1) {
      return var0 == 16711935?-1:Class274.method4853(var0, -874865512);
   }

   static final void method8430(Class508 var0, int var1) {
      int var2 = var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807];
      if(client.anInt7769 * 995204269 == 2 && var2 < 1907362565 * client.anInt7651) {
         Class13 var3 = client.aClass13Array7931[var2];
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = var3.aString169;
         if(null != var3.aString165) {
            var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = var3.aString165;
         } else {
            var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = "";
         }
      } else {
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = "";
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = "";
      }

   }
}
