import java.util.HashMap;
import java.util.Map;

public class Class304 {

   Class253 aClass253_3870;
   Class253 aClass253_3871;
   Map aMap3872 = null;
   int[] anIntArray3873;
   Class564 aClass564_3874 = new Class564(20);
   public static Class253 aClass253_3875;
   public static Class535 aClass535_3876;
   public static Class575 aClass575_3877;
   public static int anInt3878;
   public static Class243 aClass243_3879;


   public void method5394(int var1, int var2) {
      this.aClass564_3874.method11963(var1, (byte)-50);
   }

   public void method5395(Interface31 var1) {
      this.aMap3872 = new HashMap(this.anIntArray3873.length);

      for(int var2 = 0; var2 < this.anIntArray3873.length; ++var2) {
         int var3 = this.anIntArray3873[var2];
         Class405 var4 = Class480.method8089(this.aClass253_3871, var3, -45577640);
         byte[] var5 = this.aClass253_3870.method4512(var3, 749605384);
         Object var6 = var1.method166(var5, var4, true, -2003394678);
         this.aMap3872.put(Integer.valueOf(var2), new Class437(var6, var4));
      }

   }

   public void method5396(byte var1) {
      this.aMap3872 = null;
   }

   public int method5397() {
      return this.anIntArray3873 == null?0:this.anIntArray3873.length * 2;
   }

   public int method5398(boolean var1, int var2) {
      if(null == this.anIntArray3873) {
         return 0;
      } else if(!var1 && this.aMap3872 != null) {
         return this.anIntArray3873.length * 2;
      } else {
         int var3 = 0;

         for(int var4 = 0; var4 < this.anIntArray3873.length; ++var4) {
            int var5 = this.anIntArray3873[var4];
            if(this.aClass253_3870.method4507(var5, 1776535051)) {
               ++var3;
            }

            if(this.aClass253_3871.method4507(var5, 1325087813)) {
               ++var3;
            }
         }

         return var3;
      }
   }

   public int method5399(int var1) {
      if(this.anIntArray3873 == null) {
         if(var1 <= -504613909) {
            ;
         }

         return 0;
      } else {
         return this.anIntArray3873.length * 2;
      }
   }

   public Object method5400(Interface31 var1, int var2, boolean var3, boolean var4, byte var5) {
      Class437 var6 = this.method5402(var1, var2, var3, var4, (byte)1);
      return null == var6?null:var6.anObject5439;
   }

   public Class405 method5401(Interface31 var1, int var2, int var3) {
      Class437 var4 = this.method5402(var1, var2, true, true, (byte)95);
      if(var4 == null) {
         if(var3 >= 1798917024) {
            ;
         }

         return null;
      } else {
         return (Class405)var4.anObject5438;
      }
   }

   Class437 method5402(Interface31 var1, int var2, boolean var3, boolean var4, byte var5) {
      if(-1 == var2) {
         return null;
      } else {
         if(this.anIntArray3873 != null) {
            for(int var6 = 0; var6 < this.anIntArray3873.length; ++var6) {
               if(var2 == this.anIntArray3873[var6]) {
                  return (Class437)this.aMap3872.get(Integer.valueOf(var6));
               }
            }
         }

         Class437 var9 = (Class437)this.aClass564_3874.method11959((long)(var2 << 1 | (var4?1:0)));
         if(var9 != null) {
            if(var3 && null == var9.anObject5438) {
               Class405 var10 = Class480.method8089(this.aClass253_3871, var2, 1825548212);
               if(var10 == null) {
                  return null;
               }

               var9.anObject5438 = var10;
            }

            return var9;
         } else {
            byte[] var7 = this.aClass253_3870.method4512(var2, 749605384);
            if(null == var7) {
               return null;
            } else {
               Class405 var8 = Class480.method8089(this.aClass253_3871, var2, 1911487544);
               if(null == var8) {
                  return null;
               } else {
                  if(var3) {
                     var9 = new Class437(var1.method166(var7, var8, var4, -2003394678), var8);
                  } else {
                     var9 = new Class437(var1.method166(var7, var8, var4, -2003394678), (Object)null);
                  }

                  this.aClass564_3874.method11958(var9, (long)(var2 << 1 | (var4?1:0)));
                  return var9;
               }
            }
         }
      }
   }

   public int method5403() {
      return this.method5398(false, 1839520800);
   }

   public void method5404() {
      this.aMap3872 = null;
   }

   public void method5405(int var1) {
      this.aClass564_3874.method11968((short)-4820);
   }

   public Class405 method5406(Interface31 var1, int var2) {
      Class437 var3 = this.method5402(var1, var2, true, true, (byte)-53);
      return var3 == null?null:(Class405)var3.anObject5438;
   }

   public void method5407(Interface31 var1) {
      this.aMap3872 = new HashMap(this.anIntArray3873.length);

      for(int var2 = 0; var2 < this.anIntArray3873.length; ++var2) {
         int var3 = this.anIntArray3873[var2];
         Class405 var4 = Class480.method8089(this.aClass253_3871, var3, 797941630);
         byte[] var5 = this.aClass253_3870.method4512(var3, 749605384);
         Object var6 = var1.method166(var5, var4, true, -2003394678);
         this.aMap3872.put(Integer.valueOf(var2), new Class437(var6, var4));
      }

   }

   public void method5408(Interface31 var1, int var2) {
      this.aMap3872 = new HashMap(this.anIntArray3873.length);

      for(int var3 = 0; var3 < this.anIntArray3873.length; ++var3) {
         if(var2 != -1734746989) {
            ;
         }

         int var4 = this.anIntArray3873[var3];
         Class405 var5 = Class480.method8089(this.aClass253_3871, var4, 1898141935);
         byte[] var6 = this.aClass253_3870.method4512(var4, 749605384);
         Object var7 = var1.method166(var6, var5, true, -2003394678);
         this.aMap3872.put(Integer.valueOf(var3), new Class437(var7, var5));
      }

   }

   public void method5409() {
      this.aClass564_3874.method11968((short)-17549);
   }

   public Class304(Class253 var1, Class253 var2, int[] var3) {
      this.aClass253_3870 = var1;
      this.aClass253_3871 = var2;
      if(null != var3) {
         this.anIntArray3873 = var3;
      } else {
         this.anIntArray3873 = null;
      }

   }

   Class437 method5410(Interface31 var1, int var2, boolean var3, boolean var4) {
      if(-1 == var2) {
         return null;
      } else {
         if(this.anIntArray3873 != null) {
            for(int var5 = 0; var5 < this.anIntArray3873.length; ++var5) {
               if(var2 == this.anIntArray3873[var5]) {
                  return (Class437)this.aMap3872.get(Integer.valueOf(var5));
               }
            }
         }

         Class437 var8 = (Class437)this.aClass564_3874.method11959((long)(var2 << 1 | (var4?1:0)));
         if(var8 != null) {
            if(var3 && null == var8.anObject5438) {
               Class405 var9 = Class480.method8089(this.aClass253_3871, var2, 1255484038);
               if(var9 == null) {
                  return null;
               }

               var8.anObject5438 = var9;
            }

            return var8;
         } else {
            byte[] var6 = this.aClass253_3870.method4512(var2, 749605384);
            if(null == var6) {
               return null;
            } else {
               Class405 var7 = Class480.method8089(this.aClass253_3871, var2, 706027930);
               if(null == var7) {
                  return null;
               } else {
                  if(var3) {
                     var8 = new Class437(var1.method166(var6, var7, var4, -2003394678), var7);
                  } else {
                     var8 = new Class437(var1.method166(var6, var7, var4, -2003394678), (Object)null);
                  }

                  this.aClass564_3874.method11958(var8, (long)(var2 << 1 | (var4?1:0)));
                  return var8;
               }
            }
         }
      }
   }

   public int method5411(boolean var1) {
      if(null == this.anIntArray3873) {
         return 0;
      } else if(!var1 && this.aMap3872 != null) {
         return this.anIntArray3873.length * 2;
      } else {
         int var2 = 0;

         for(int var3 = 0; var3 < this.anIntArray3873.length; ++var3) {
            int var4 = this.anIntArray3873[var3];
            if(this.aClass253_3870.method4507(var4, -1828080803)) {
               ++var2;
            }

            if(this.aClass253_3871.method4507(var4, 1555291029)) {
               ++var2;
            }
         }

         return var2;
      }
   }

   public int method5412(boolean var1) {
      if(null == this.anIntArray3873) {
         return 0;
      } else if(!var1 && this.aMap3872 != null) {
         return this.anIntArray3873.length * 2;
      } else {
         int var2 = 0;

         for(int var3 = 0; var3 < this.anIntArray3873.length; ++var3) {
            int var4 = this.anIntArray3873[var3];
            if(this.aClass253_3870.method4507(var4, -1815202684)) {
               ++var2;
            }

            if(this.aClass253_3871.method4507(var4, -172439266)) {
               ++var2;
            }
         }

         return var2;
      }
   }

   public void method5413(int var1) {
      this.aClass564_3874.method11976((byte)18);
   }

   public Object method5414(Interface31 var1, int var2, boolean var3, boolean var4) {
      Class437 var5 = this.method5402(var1, var2, var3, var4, (byte)-85);
      return null == var5?null:var5.anObject5439;
   }

   public Object method5415(Interface31 var1, int var2, boolean var3, boolean var4) {
      Class437 var5 = this.method5402(var1, var2, var3, var4, (byte)-96);
      return null == var5?null:var5.anObject5439;
   }

   public void method5416() {
      this.aClass564_3874.method11976((byte)11);
   }

   public Class405 method5417(Interface31 var1, int var2) {
      Class437 var3 = this.method5402(var1, var2, true, true, (byte)-107);
      return var3 == null?null:(Class405)var3.anObject5438;
   }

   public Class405 method5418(Interface31 var1, int var2) {
      Class437 var3 = this.method5402(var1, var2, true, true, (byte)-19);
      return var3 == null?null:(Class405)var3.anObject5438;
   }

   public int method5419() {
      return this.method5398(false, 1963068252);
   }

   public int method5420() {
      return this.method5398(false, 1964477426);
   }

   public void method5421() {
      this.aClass564_3874.method11976((byte)6);
   }

   public int method5422(int var1) {
      return this.method5398(false, 2079412111);
   }

   public void method5423() {
      this.aClass564_3874.method11968((short)-4213);
   }

   public void method5424() {
      this.aClass564_3874.method11968((short)-1724);
   }

   static final void method5425(Class124 var0, Class121 var1, Class508 var2, int var3) {
      if(5 == var0.anInt1370 * 258921611) {
         Class529.method11165(var0, var1, var2, (byte)75);
      }
   }

   static final void method5426(Class508 var0, int var1) {
      int var2 = var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807];
      if(null != client.aString7904 && var2 < Class397.anInt4901 * 845314169) {
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = -1930102427 * Class56_Sub2.aClass173Array8155[var2].anInt2079;
      } else {
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 0;
      }

   }

   static final void method5427(Class508 var0, byte var1) {
      var0.anInt6003 -= 196624946;
      int var2 = var0.anIntArray6027[var0.anInt6003 * -937710807];
      int var3 = var0.anIntArray6027[1 + -937710807 * var0.anInt6003];
      int[] var10000 = var0.anIntArray6027;
      int var10001 = (var0.anInt6003 += 98312473) * -937710807 - 1;
      byte var10002;
      if(Class246.method4388(var2, var3, -1065439963)) {
         if(var1 == 14) {
            ;
         }

         var10002 = 1;
      } else {
         var10002 = 0;
      }

      var10000[var10001] = var10002;
   }

   static final void method5428(Class508 var0, int var1) throws Exception_Sub4 {
      var0.anInt6003 -= 196624946;
      int var2 = var0.anIntArray6027[var0.anInt6003 * -937710807];
      Class326 var3 = Class326.method5868((float)var2, (float)var2, (float)var2);
      Class336.aClass35_Sub1_4206.method894(var3, -2127121681);
      var3.method5948();
   }

   static final void method5429(Class508 var0, int var1) {
      boolean var2 = false;
      String var3 = (String)var0.anObjectArray6004[(var0.anInt6005 -= -46848683) * 639741949];
      if(client.aBool7738) {
         try {
            Object var4 = Class294.aClass294_3473.method5317(new Object[]{var3}, -2077657218);
            if(null != var4) {
               var2 = ((Boolean)var4).booleanValue();
            }
         } catch (Throwable var5) {
            ;
         }
      }

      var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = var2?1:0;
   }

   static final void method5430(Class508 var0, byte var1) {
      var0.anInt6003 -= 196624946;
      int var2 = var0.anIntArray6027[var0.anInt6003 * -937710807];
      int var3 = var0.anIntArray6027[1 + var0.anInt6003 * -937710807];
      var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 0 != (var2 & 1 << var3)?1:0;
   }

   static final void method5431(Class508 var0, int var1) {
      int var2 = var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807];
      Class567 var3 = Class225_Sub21_Sub2.aClass555_10072.method11836(var2, 972544391);
      if(null == var3.aString7515) {
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = "";
      } else {
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = var3.aString7515;
      }

   }

   static Class297[] method5432(byte var0) {
      return new Class297[]{Class297.aClass297_3659, Class297.aClass297_3654, Class297.aClass297_3661, Class297.aClass297_3655, Class297.aClass297_3653, Class297.aClass297_3656, Class297.aClass297_3658, Class297.aClass297_3652, Class297.aClass297_3651, Class297.aClass297_3660, Class297.aClass297_3657};
   }

   public static void method5433(long[] var0, int[] var1, int var2) {
      Class294.method5330(var0, var1, 0, var0.length - 1, 1673463011);
   }

   static final void method5434(Class515_Sub1_Sub4_Sub4 var0, byte var1) {
      Class477_Sub3 var2 = var0.aClass477_Sub3_10786;
      if(var2.method8011(-970514743) && var2.method7991(1, (byte)0) && var2.method7987(375807628)) {
         if(var2.aBool7998) {
            var2.method8029(var0.method16642((byte)-122).method11742(-960507882), false, true, (byte)118);
            var2.aBool7998 = var2.method8011(-1510068500);
         }

         var2.method7989((byte)-96);
      }

      for(int var3 = 0; var3 < var0.aClass207Array10754.length; ++var3) {
         if(1475396065 * var0.aClass207Array10754[var3].anInt2452 != -1) {
            Class477 var4 = var0.aClass207Array10754[var3].aClass477_2453;
            if(var4.method7992(-1269421011)) {
               Class497 var5 = Class515_Sub1_Sub4_Sub4.aClass498_10793.method8330(1475396065 * var0.aClass207Array10754[var3].anInt2452, 1206612253);
               Class485 var6 = var4.method7972((byte)109);
               if(var5.aBool5935) {
                  if(3 == var6.anInt5866 * 1990561853) {
                     if(var0.anInt10782 * -326799455 > 0 && var0.anInt10759 * 989079835 <= client.anInt7659 * -1255739433 && -427472569 * var0.anInt10760 < client.anInt7659 * -1255739433) {
                        var4.method7974(-1, 419332142);
                        var0.aClass207Array10754[var3].anInt2452 = -1297826337;
                        continue;
                     }
                  } else if(1 == var6.anInt5866 * 1990561853 && var0.anInt10782 * -326799455 > 0 && var0.anInt10759 * 989079835 <= client.anInt7659 * -1255739433 && -427472569 * var0.anInt10760 < client.anInt7659 * -1255739433) {
                     continue;
                  }
               }
            }

            if(var4.method7991(1, (byte)0) && var4.method7987(937564061)) {
               var4.method7974(-1, 663700960);
               var0.aClass207Array10754[var3].anInt2452 = -1297826337;
            }
         }
      }

      Class477 var7 = var0.aClass477_10728;
      if(var7.method8011(-768306703)) {
         label82: {
            Class485 var8 = var7.method7972((byte)50);
            if(3 == var8.anInt5866 * 1990561853) {
               if(-326799455 * var0.anInt10782 > 0 && var0.anInt10759 * 989079835 <= client.anInt7659 * -1255739433 && -427472569 * var0.anInt10760 < -1255739433 * client.anInt7659) {
                  var0.anIntArray10751 = null;
                  var7.method7974(-1, 504343579);
                  break label82;
               }
            } else if(1990561853 * var8.anInt5866 == 1) {
               if(var0.anInt10782 * -326799455 > 0 && var0.anInt10759 * 989079835 <= -1255739433 * client.anInt7659 && -427472569 * var0.anInt10760 < -1255739433 * client.anInt7659) {
                  var7.method7982(1, '\uff00');
                  break label82;
               }

               var7.method7982(0, '\uff00');
            }

            if(var7.method7991(1, (byte)0) && var7.method7987(1110138273)) {
               var0.anIntArray10751 = null;
               var7.method7974(-1, 823820147);
            }
         }
      }

      for(int var9 = 0; var9 < var0.aClass477_Sub2_Sub1Array10769.length; ++var9) {
         Class477_Sub2_Sub1 var10 = var0.aClass477_Sub2_Sub1Array10769[var9];
         if(var10 != null) {
            if(-1957392167 * var10.anInt10379 > 0) {
               var10.anInt10379 -= 1376186217;
            } else if(var10.method7991(1, (byte)0) && var10.method7987(615576888)) {
               var0.aClass477_Sub2_Sub1Array10769[var9] = null;
            }
         }
      }

   }
}
