import java.io.EOFException;
import java.util.Iterator;

public final class Class167_Sub1 extends Class167 {

   static final int anInt9383 = 1;
   public boolean aBool9384 = false;
   boolean[] aBoolArray9385;
   public long aLong9386 = 404764489026606123L;


   public void method64(Class169 var1, long var2) {
      if(this.aBoolArray9385[var1.anInt2046 * -2027087877]) {
         this.aBool9384 = true;
      }

      super.method59(var1, var2);
   }

   public void method57(Class169 var1, int var2, byte var3) {
      if(this.aBoolArray9385[var1.anInt2046 * -2027087877]) {
         if(var3 == 1) {
            return;
         }

         this.aBool9384 = true;
      }

      super.method57(var1, var2, (byte)52);
   }

   public void method70(Class169 var1, Object var2) {
      if(this.aBoolArray9385[var1.anInt2046 * -2027087877]) {
         this.aBool9384 = true;
      }

      super.method61(var1, var2, 763487514);
   }

   public Class167_Sub1(Class182_Sub1 var1) {
      super(var1);
      this.aBoolArray9385 = new boolean[var1.method14407((byte)9)];

      for(int var2 = 0; var2 < var1.method14407((byte)6); ++var2) {
         if(var1.method14423(var2, -1120672618).aClass256_2048 == Class256.aClass256_3031) {
            this.aBoolArray9385[var2] = true;
         }
      }

   }

   boolean method14819(int var1, int var2) {
      if(var1 >= 0) {
         if(var2 == 1532963853) {
            ;
         }

         if(var1 < this.aBoolArray9385.length) {
            return this.aBoolArray9385[var1];
         }

         if(var2 == 1532963853) {
            ;
         }
      }

      return false;
   }

   public void method14820(int var1) {
      for(int var2 = 0; var2 < this.aBoolArray9385.length; ++var2) {
         if(!this.aBoolArray9385[var2]) {
            this.anInterface46_2023.method252(var2, -2133579222);
         }
      }

   }

   public void method14821(Class431 var1, int var2) {
      try {
         try {
            byte[] var3 = new byte[(int)var1.method7298(-1072130516)];

            int var5;
            for(int var4 = 0; var4 < var3.length; var4 += var5) {
               var5 = var1.method7299(var3, var4, var3.length - var4, -2103316781);
               if(var5 == -1) {
                  throw new EOFException();
               }
            }

            RS2Buffer var30 = new RS2Buffer(var3);
            if(var30.buffer.length - -543666943 * var30.position < 1) {
               try {
                  var1.method7297(2009512554);
               } catch (Exception var25) {
                  ;
               }

               return;
            }

            int var6 = var30.readUnsignedByte(-700559597);
            if(var6 < 0 || var6 > 1) {
               try {
                  var1.method7297(1237808434);
               } catch (Exception var27) {
                  ;
               }

               return;
            }

            if(var30.buffer.length - var30.position * -543666943 < 2) {
               try {
                  var1.method7297(-163061168);
               } catch (Exception var24) {
                  ;
               }

               return;
            }

            int var7 = var30.readUnsignedShort(-937710807);
            if(var30.buffer.length - -543666943 * var30.position < var7 * 6) {
               try {
                  var1.method7297(-1669393017);
               } catch (Exception var23) {
                  ;
               }

               return;
            }

            for(int var8 = 0; var8 < var7; ++var8) {
               Class316 var9 = client.aClass182_Sub1_Sub1_7692.method14410(var30, -816449413);
               if(Class498.aClass167_Sub1_5945.method14819(-917776691 * var9.anInt3997, 1546486059) && client.aClass182_Sub1_Sub1_7692.method14423(-917776691 * var9.anInt3997, -13606216).aClass337_2047.method6211(144316675).aClass3066.isAssignableFrom(var9.anObject3996.getClass())) {
                  this.anInterface46_2023.method245(var9.anInt3997 * -917776691, var9.anObject3996, (byte)-46);
               }
            }
         } catch (Exception var28) {
            try {
               var1.method7297(1370999620);
            } catch (Exception var22) {
               ;
            }

            return;
         }

         try {
            var1.method7297(1068002950);
         } catch (Exception var26) {
            ;
         }

      } finally {
         try {
            var1.method7297(-1133927602);
         } catch (Exception var21) {
            ;
         }

      }
   }

   public void method59(Class169 var1, long var2) {
      if(this.aBoolArray9385[var1.anInt2046 * -2027087877]) {
         this.aBool9384 = true;
      }

      super.method59(var1, var2);
   }

   public void method68(Class169 var1, int var2) {
      if(this.aBoolArray9385[var1.anInt2046 * -2027087877]) {
         this.aBool9384 = true;
      }

      super.method57(var1, var2, (byte)64);
   }

   public void method66(Class169 var1, long var2) {
      if(this.aBoolArray9385[var1.anInt2046 * -2027087877]) {
         this.aBool9384 = true;
      }

      super.method59(var1, var2);
   }

   public void method61(Class169 var1, Object var2, int var3) {
      if(this.aBoolArray9385[var1.anInt2046 * -2027087877]) {
         this.aBool9384 = true;
      }

      super.method61(var1, var2, 1015948676);
   }

   boolean method14822(int var1) {
      return var1 >= 0 && var1 < this.aBoolArray9385.length?this.aBoolArray9385[var1]:false;
   }

   public void method14823(Class431 var1, int var2) {
      boolean var15 = false;

      try {
         label102: {
            try {
               var15 = true;
               int var3 = 3;
               int var4 = 0;
               Iterator var5 = this.anInterface46_2023.iterator();

               while(var5.hasNext()) {
                  Class316 var6 = (Class316)var5.next();
                  if(this.method14819(-917776691 * var6.anInt3997, 1928017035)) {
                     var3 += client.aClass182_Sub1_Sub1_7692.method14408(var6, -1966397950);
                     ++var4;
                  }
               }

               RS2Buffer var21 = new RS2Buffer(var3);
               var21.writeByte(1, -765864773);
               var21.writeShort(var4, 72515505);
               Iterator var22 = this.anInterface46_2023.iterator();

               while(true) {
                  if(!var22.hasNext()) {
                     var1.method7296(var21.buffer, 0, var21.position * -543666943, (byte)0);
                     break;
                  }

                  Class316 var7 = (Class316)var22.next();
                  if(this.method14819(-917776691 * var7.anInt3997, 146402009)) {
                     client.aClass182_Sub1_Sub1_7692.method14409(var21, var7, (byte)-42);
                  }
               }
            } catch (Exception var19) {
               try {
                  var1.method7297(-885537842);
                  var15 = false;
               } catch (Exception var17) {
                  var15 = false;
               }
               break label102;
            }

            try {
               var1.method7297(1084176163);
               var15 = false;
            } catch (Exception var18) {
               var15 = false;
            }
         }
      } finally {
         if(var15) {
            try {
               var1.method7297(2145023949);
            } catch (Exception var16) {
               ;
            }

         }
      }

      this.aLong9386 = Class339.method6240(-1537704758) * -404764489026606123L;
      this.aBool9384 = false;
   }

   public void method14824() {
      for(int var1 = 0; var1 < this.aBoolArray9385.length; ++var1) {
         if(!this.aBoolArray9385[var1]) {
            this.anInterface46_2023.method252(var1, -2147087350);
         }
      }

   }

   public void method14825() {
      for(int var1 = 0; var1 < this.aBoolArray9385.length; ++var1) {
         if(!this.aBoolArray9385[var1]) {
            this.anInterface46_2023.method252(var1, -2145455491);
         }
      }

   }

   public void method14826() {
      for(int var1 = 0; var1 < this.aBoolArray9385.length; ++var1) {
         if(!this.aBoolArray9385[var1]) {
            this.anInterface46_2023.method252(var1, -2133884778);
         }
      }

   }

   public void method14827(Class431 var1) {
      try {
         try {
            byte[] var2 = new byte[(int)var1.method7298(-1862129619)];

            int var4;
            for(int var3 = 0; var3 < var2.length; var3 += var4) {
               var4 = var1.method7299(var2, var3, var2.length - var3, -2049656921);
               if(var4 == -1) {
                  throw new EOFException();
               }
            }

            RS2Buffer var29 = new RS2Buffer(var2);
            if(var29.buffer.length - -543666943 * var29.position < 1) {
               try {
                  var1.method7297(1519188839);
               } catch (Exception var24) {
                  ;
               }

               return;
            }

            int var5 = var29.readUnsignedByte(-700559597);
            if(var5 < 0 || var5 > 1) {
               try {
                  var1.method7297(-2072708184);
               } catch (Exception var26) {
                  ;
               }

               return;
            }

            if(var29.buffer.length - var29.position * -543666943 < 2) {
               try {
                  var1.method7297(-623408134);
               } catch (Exception var23) {
                  ;
               }

               return;
            }

            int var6 = var29.readUnsignedShort(-937710807);
            if(var29.buffer.length - -543666943 * var29.position < var6 * 6) {
               try {
                  var1.method7297(-1890017369);
               } catch (Exception var22) {
                  ;
               }

               return;
            }

            for(int var7 = 0; var7 < var6; ++var7) {
               Class316 var8 = client.aClass182_Sub1_Sub1_7692.method14410(var29, 1359345118);
               if(Class498.aClass167_Sub1_5945.method14819(-917776691 * var8.anInt3997, 492398119) && client.aClass182_Sub1_Sub1_7692.method14423(-917776691 * var8.anInt3997, -1032784979).aClass337_2047.method6211(847866339).aClass3066.isAssignableFrom(var8.anObject3996.getClass())) {
                  this.anInterface46_2023.method245(var8.anInt3997 * -917776691, var8.anObject3996, (byte)-23);
               }
            }
         } catch (Exception var27) {
            try {
               var1.method7297(-2122912999);
            } catch (Exception var21) {
               ;
            }

            return;
         }

         try {
            var1.method7297(-1544384194);
         } catch (Exception var25) {
            ;
         }

      } finally {
         try {
            var1.method7297(1147513103);
         } catch (Exception var20) {
            ;
         }

      }
   }

   public void method14828(Class431 var1) {
      boolean var14 = false;

      try {
         label102: {
            try {
               var14 = true;
               int var2 = 3;
               int var3 = 0;
               Iterator var4 = this.anInterface46_2023.iterator();

               while(var4.hasNext()) {
                  Class316 var5 = (Class316)var4.next();
                  if(this.method14819(-917776691 * var5.anInt3997, -1933521337)) {
                     var2 += client.aClass182_Sub1_Sub1_7692.method14408(var5, 305918151);
                     ++var3;
                  }
               }

               RS2Buffer var20 = new RS2Buffer(var2);
               var20.writeByte(1, -765864773);
               var20.writeShort(var3, -452022500);
               Iterator var21 = this.anInterface46_2023.iterator();

               while(true) {
                  if(!var21.hasNext()) {
                     var1.method7296(var20.buffer, 0, var20.position * -543666943, (byte)0);
                     break;
                  }

                  Class316 var6 = (Class316)var21.next();
                  if(this.method14819(-917776691 * var6.anInt3997, 291462603)) {
                     client.aClass182_Sub1_Sub1_7692.method14409(var20, var6, (byte)3);
                  }
               }
            } catch (Exception var18) {
               try {
                  var1.method7297(-2116759362);
                  var14 = false;
               } catch (Exception var16) {
                  var14 = false;
               }
               break label102;
            }

            try {
               var1.method7297(930625660);
               var14 = false;
            } catch (Exception var17) {
               var14 = false;
            }
         }
      } finally {
         if(var14) {
            try {
               var1.method7297(1413651273);
            } catch (Exception var15) {
               ;
            }

         }
      }

      this.aLong9386 = Class339.method6240(-350891498) * -404764489026606123L;
      this.aBool9384 = false;
   }

   public void method14829(Class431 var1) {
      boolean var14 = false;

      try {
         label102: {
            try {
               var14 = true;
               int var2 = 3;
               int var3 = 0;
               Iterator var4 = this.anInterface46_2023.iterator();

               while(var4.hasNext()) {
                  Class316 var5 = (Class316)var4.next();
                  if(this.method14819(-917776691 * var5.anInt3997, 735419060)) {
                     var2 += client.aClass182_Sub1_Sub1_7692.method14408(var5, 1406730982);
                     ++var3;
                  }
               }

               RS2Buffer var20 = new RS2Buffer(var2);
               var20.writeByte(1, -765864773);
               var20.writeShort(var3, 164049770);
               Iterator var21 = this.anInterface46_2023.iterator();

               while(true) {
                  if(!var21.hasNext()) {
                     var1.method7296(var20.buffer, 0, var20.position * -543666943, (byte)0);
                     break;
                  }

                  Class316 var6 = (Class316)var21.next();
                  if(this.method14819(-917776691 * var6.anInt3997, -1944830627)) {
                     client.aClass182_Sub1_Sub1_7692.method14409(var20, var6, (byte)42);
                  }
               }
            } catch (Exception var18) {
               try {
                  var1.method7297(-218672441);
                  var14 = false;
               } catch (Exception var16) {
                  var14 = false;
               }
               break label102;
            }

            try {
               var1.method7297(491702116);
               var14 = false;
            } catch (Exception var17) {
               var14 = false;
            }
         }
      } finally {
         if(var14) {
            try {
               var1.method7297(146621736);
            } catch (Exception var15) {
               ;
            }

         }
      }

      this.aLong9386 = Class339.method6240(1659348966) * -404764489026606123L;
      this.aBool9384 = false;
   }

   static Class225_Sub38 method14830(int var0, boolean var1, int var2) {
      long var3 = (long)(var0 | (var1?Integer.MIN_VALUE:0));
      return (Class225_Sub38)Class225_Sub38.aClass423_8712.method7211(var3);
   }

   static final void method14831(Class508 var0, byte var1) {
      Class536_Sub1 var2 = Class515_Sub1_Sub4_Sub4_Sub1.method16817((byte)-28);
      if(null != var2) {
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = var2.anInt8623 * -2093154491;
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 1352295453 * var2.anInt7284;
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = var2.aString8624;
         Class539 var3 = var2.method13961(-1376652852);
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = -1041150983 * var3.anInt7304;
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = var3.aString7305;
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 780796933 * var2.anInt7289;
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 2056235877 * var2.anInt8622;
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = var2.aString8626;
      } else {
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = -1;
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 0;
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = "";
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 0;
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = "";
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 0;
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 0;
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = "";
      }

   }

   static void method14832(Class545 var0, Interface24 var1, int var2, int var3, int var4, int var5, byte var6) {
      if(-226860099 * Class215_Sub1.anInt8334 < 100) {
         Class169_Sub1.method15452(var0, var1, (short)2679);
      }

      var0.r(var2, var3, var2 + var4, var5 + var3);
      int var8;
      int var9;
      if(-226860099 * Class215_Sub1.anInt8334 < 100) {
         byte var17 = 20;
         var8 = var4 / 2 + var2;
         var9 = var5 / 2 + var3 - 18 - var17;
         var0.B(var2, var3, var4, var5, -16777216, 0);
         var0.method11439(var8 - 152, var9, 304, 34, client.aColorArray7684[client.anInt7636 * -1725081883].getRGB(), 0);
         var0.B(var8 - 150, var9 + 2, -680580297 * Class215_Sub1.anInt8334, 30, client.aColorArray7820[-1725081883 * client.anInt7636].getRGB(), 0);
         Class388.aClass8_4844.method615(Class418.aClass418_5264.method7137(Class498.aClass470_5944, (byte)-17), var8, var9 + var17, client.aColorArray7685[-1725081883 * client.anInt7636].getRGB(), -1, (byte)-20);
      } else {
         int var7 = Class72.anInt689 * 679266431 - (int)((float)var4 / Class215_Sub1.aFloat2541);
         var8 = Class383.anInt4773 * 1215624379 + (int)((float)var5 / Class215_Sub1.aFloat2541);
         var9 = Class72.anInt689 * 679266431 + (int)((float)var4 / Class215_Sub1.aFloat2541);
         int var10 = Class383.anInt4773 * 1215624379 - (int)((float)var5 / Class215_Sub1.aFloat2541);
         Class151_Sub2.anInt9596 = (Class72.anInt689 * 679266431 - (int)((float)var4 / Class215_Sub1.aFloat2541)) * -1517707389;
         Class277.anInt3222 = (1215624379 * Class383.anInt4773 - (int)((float)var5 / Class215_Sub1.aFloat2541)) * -1462228853;
         Class225_Sub27.anInt8633 = 22339109 * (int)((float)(var4 * 2) / Class215_Sub1.aFloat2541);
         Class457.anInt5695 = 834863153 * (int)((float)(2 * var5) / Class215_Sub1.aFloat2541);
         Class215_Sub1.method3675(Class215_Sub1.anInt2532 + var7, var8 + Class215_Sub1.anInt2548, Class215_Sub1.anInt2532 + var9, var10 + Class215_Sub1.anInt2548, var2, var3, var4 + var2, var3 + var5 + 1);
         Class215_Sub1.method3684(var0);
         Class456 var11 = Class215_Sub1.method3680(var0);
         Class537.method11308(var0, var11, 0, 0, (byte)86);
         if(Class260.anInt3053 * 1882486243 > 0) {
            Class215_Sub1.anInt8341 -= 2121884333;
            if(-1800646363 * Class215_Sub1.anInt8341 == 0) {
               Class260.anInt3053 -= 1360951243;
               Class215_Sub1.anInt8341 = -511986300;
            }
         }

         if(client.aBool7873) {
            int var12 = var4 + var2 - 5;
            int var13 = var3 + var5 - 8;
            Class574.aClass8_7601.method614("Fps:" + GameEngine.anInt3300 * 1224483541, var12, var13, 16776960, -1, -1812091891);
            var13 -= 15;
            Runtime var14 = Runtime.getRuntime();
            int var15 = (int)((var14.totalMemory() - var14.freeMemory()) / 1024L);
            int var16 = 16776960;
            if(var15 > 65536) {
               var16 = 16711680;
            }

            Class574.aClass8_7601.method614("Mem:" + var15 + "k", var12, var13, var16, -1, -333229175);
            var13 -= 15;
         }

      }
   }

   static final void method14833(Class508 var0, int var1) {
      var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = null != Class5.aClass515_Sub1_Sub4_Sub4_Sub1_113.aClass540_10860 && Class5.aClass515_Sub1_Sub4_Sub4_Sub1_113.aClass540_10860.aBool7313?1:0;
   }

   public static void method14834(int var0, int var1) {
      Class225_Sub14_Sub2 var2 = Class49.method1193(22, (long)var0);
      var2.method15501(-1105169109);
   }
}
