import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

public class Class528 {

   boolean aBool7180 = false;
   boolean aBool7181 = false;
   List aList7182 = new LinkedList();
   int anInt7183 = 0;
   Class222_Sub1_Sub1_Sub1[] aClass222_Sub1_Sub1_Sub1Array7184 = new Class222_Sub1_Sub1_Sub1[8192];
   long aLong7185;
   public boolean aBool7186 = false;
   int anInt7187 = 0;
   List aList7188 = new LinkedList();
   int anInt7189 = 0;
   boolean aBool7190 = false;
   long aLong7191;
   int anInt7192;
   Class97 aClass97_7193 = new Class97();
   static boolean[] aBoolArray7194 = new boolean[64];
   static boolean[] aBoolArray7195 = new boolean[16];


   void method11105(Class545 var1, Class80[] var2, boolean var3) {
      for(int var4 = 0; var4 < 64; ++var4) {
         aBoolArray7194[var4] = false;
      }

      Iterator var7 = this.aList7182.iterator();

      label58:
      while(var7.hasNext()) {
         Class533 var5 = (Class533)var7.next();
         if(var2 != null) {
            for(int var6 = 0; var6 < var2.length; ++var6) {
               if(var5.aClass80_7236 == var2[var6] || var5.aClass80_7236 == var2[var6].aClass80_813) {
                  aBoolArray7194[var6] = true;
                  var5.method11213(-1188558551);
                  var5.aBool7231 = false;
                  continue label58;
               }
            }
         }

         if(!var3) {
            if(var5.anInt7224 * 2063273299 == 0) {
               var7.remove();
               --this.anInt7187;
            } else {
               var5.aBool7231 = true;
            }
         }
      }

      if(var2 != null) {
         for(int var8 = 0; var8 < var2.length && var8 != 64 && this.anInt7187 != 64; ++var8) {
            if(!aBoolArray7194[var8]) {
               Class533 var9 = new Class533(var1, var2[var8], this, this.aLong7185);
               this.aList7182.add(var9);
               ++this.anInt7187;
               aBoolArray7194[var8] = true;
            }
         }
      }

   }

   public void method11106(Class545 var1, long var2, Class80[] var4, Class166[] var5, boolean var6) {
      if(!this.aBool7186) {
         this.method11105(var1, var4, var6);
         this.method11115(var5, var6);
         this.aLong7185 = var2;
      }
   }

   void method11107(int var1, boolean var2) {
      Class529.aList7202.add(this);
      this.aLong7185 = (long)var1;
      this.aLong7191 = (long)var1;
      this.aBool7190 = true;
      this.aBool7180 = var2;
   }

   public Class97 method11108() {
      return this.aClass97_7193;
   }

   void method11109() {
      this.aBool7186 = true;
      Iterator var1 = this.aList7188.iterator();

      while(var1.hasNext()) {
         Class225_Sub10 var2 = (Class225_Sub10)var1.next();
         if(var2.aClass383_8520.anInt4759 * 1301636203 == 1) {
            var2.method3857(-1364893246);
         }
      }

      for(int var3 = 0; var3 < this.aClass222_Sub1_Sub1_Sub1Array7184.length; ++var3) {
         if(this.aClass222_Sub1_Sub1_Sub1Array7184[var3] != null) {
            this.aClass222_Sub1_Sub1_Sub1Array7184[var3].method16382();
            this.aClass222_Sub1_Sub1_Sub1Array7184[var3] = null;
         }
      }

      this.anInt7183 = 0;
      this.aList7182 = new LinkedList();
      this.anInt7187 = 0;
      this.aList7188 = new LinkedList();
      this.anInt7189 = 0;
   }

   public void method11110() {
      this.aBool7181 = true;
   }

   void method11111() {
      this.aBool7181 = false;
   }

   boolean method11112(Class545 var1, long var2) {
      if(this.aLong7185 != this.aLong7191) {
         this.method11110();
      } else {
         this.method11111();
      }

      if(var2 - this.aLong7185 > 750L) {
         this.method11109();
         return false;
      } else {
         int var4 = (int)(var2 - this.aLong7191);
         Iterator var5;
         Class533 var6;
         if(this.aBool7190) {
            var5 = this.aList7182.iterator();

            while(var5.hasNext()) {
               var6 = (Class533)var5.next();

               for(int var7 = 0; var7 < var6.aClass364_7225.anInt4556 * -832186353; ++var7) {
                  var6.method11214(var1, var2, 1, !this.aBool7181, 2035978089);
               }
            }

            this.aBool7190 = false;
         }

         var5 = this.aList7182.iterator();

         while(var5.hasNext()) {
            var6 = (Class533)var5.next();
            var6.method11214(var1, var2, var4, !this.aBool7181, 2060634581);
         }

         this.aLong7191 = var2;
         return true;
      }
   }

   public void method11113(long var1) {
      this.aLong7185 = var1;
   }

   public void method11114(int var1, int var2, int var3, int var4, int var5) {
      this.anInt7192 = var1;
   }

   Class528(int var1, boolean var2) {
      this.method11107(var1, var2);
   }

   void method11115(Class166[] var1, boolean var2) {
      int var3;
      for(var3 = 0; var3 < 16; ++var3) {
         aBoolArray7195[var3] = false;
      }

      Iterator var6 = this.aList7188.iterator();

      Class225_Sub10 var4;
      label67:
      while(var6.hasNext()) {
         var4 = (Class225_Sub10)var6.next();
         if(var1 != null) {
            for(int var5 = 0; var5 < var1.length; ++var5) {
               if(var4.aClass166_8522 == var1[var5] || var4.aClass166_8522 == var1[var5].aClass166_2016) {
                  aBoolArray7195[var5] = true;
                  var4.method13560(1111205457);
                  continue label67;
               }
            }
         }

         if(!var2) {
            var4.method3857(-1060941090);
            --this.anInt7189;
            if(var4.method3858(1697078232)) {
               var4.method3857(-804787534);
               Class529.anInt7208 -= 1888117517;
            }
         }
      }

      if(var1 != null) {
         for(var3 = 0; var3 < var1.length && var3 != 16 && this.anInt7189 != 16; ++var3) {
            if(!aBoolArray7195[var3]) {
               var4 = null;
               if(var1[var3].method2848(1279230847).anInt4759 * 1301636203 == 1 && Class529.anInt7208 * -1609358395 < 32) {
                  var4 = new Class225_Sub10(var1[var3], this);
                  Class529.aClass423_7205.method7206(var4, (long)(var1[var3].anInt2021 * -801151981));
                  Class529.anInt7208 += 1888117517;
               }

               if(var4 == null) {
                  var4 = new Class225_Sub10(var1[var3], this);
               }

               this.aList7188.add(var4);
               ++this.anInt7189;
               aBoolArray7195[var3] = true;
            }
         }
      }

   }

   public Class97 method11116() {
      this.aClass97_7193.aClass478_981.method8055(384365095);

      for(int var1 = 0; var1 < this.aClass222_Sub1_Sub1_Sub1Array7184.length; ++var1) {
         if(this.aClass222_Sub1_Sub1_Sub1Array7184[var1] != null && this.aClass222_Sub1_Sub1_Sub1Array7184[var1].aClass533_10635 != null) {
            this.aClass97_7193.aClass478_981.method8058(this.aClass222_Sub1_Sub1_Sub1Array7184[var1], 17535612);
         }
      }

      return this.aClass97_7193;
   }

   public Class97 method11117() {
      this.aClass97_7193.aClass478_981.method8055(384365095);

      for(int var1 = 0; var1 < this.aClass222_Sub1_Sub1_Sub1Array7184.length; ++var1) {
         if(this.aClass222_Sub1_Sub1_Sub1Array7184[var1] != null && this.aClass222_Sub1_Sub1_Sub1Array7184[var1].aClass533_10635 != null) {
            this.aClass97_7193.aClass478_981.method8058(this.aClass222_Sub1_Sub1_Sub1Array7184[var1], 505365127);
         }
      }

      return this.aClass97_7193;
   }

   void method11118(Class241 var1, Class545 var2) {
      this.aClass97_7193.aClass478_981.method8055(384365095);
      Iterator var3 = this.aList7182.iterator();

      while(var3.hasNext()) {
         Class533 var4 = (Class533)var3.next();
         var4.method11215(var1, var2, this.aLong7191);
      }

   }

   public Class97 method11119() {
      return this.aClass97_7193;
   }

   void method11120() {
      this.aBool7186 = true;
      Iterator var1 = this.aList7188.iterator();

      while(var1.hasNext()) {
         Class225_Sub10 var2 = (Class225_Sub10)var1.next();
         if(var2.aClass383_8520.anInt4759 * 1301636203 == 1) {
            var2.method3857(1247542528);
         }
      }

      for(int var3 = 0; var3 < this.aClass222_Sub1_Sub1_Sub1Array7184.length; ++var3) {
         if(this.aClass222_Sub1_Sub1_Sub1Array7184[var3] != null) {
            this.aClass222_Sub1_Sub1_Sub1Array7184[var3].method16382();
            this.aClass222_Sub1_Sub1_Sub1Array7184[var3] = null;
         }
      }

      this.anInt7183 = 0;
      this.aList7182 = new LinkedList();
      this.anInt7187 = 0;
      this.aList7188 = new LinkedList();
      this.anInt7189 = 0;
   }

   public static Class528 method11121(int var0, boolean var1) {
      if(Class529.anInt7200 * 953435103 != Class529.anInt7196 * 463460391) {
         Class528 var2 = Class529.aClass528Array7198[Class529.anInt7196 * 463460391];
         Class529.anInt7196 = (Class529.anInt7196 * 463460391 + 1 & Class76.anIntArray701[Class529.anInt7207 * 385979637]) * -388753513;
         var2.method11107(var0, var1);
         return var2;
      } else {
         return new Class528(var0, var1);
      }
   }

   public static Class528 method11122(int var0, boolean var1) {
      if(Class529.anInt7200 * 953435103 != Class529.anInt7196 * 463460391) {
         Class528 var2 = Class529.aClass528Array7198[Class529.anInt7196 * 463460391];
         Class529.anInt7196 = (Class529.anInt7196 * 463460391 + 1 & Class76.anIntArray701[Class529.anInt7207 * 385979637]) * -388753513;
         var2.method11107(var0, var1);
         return var2;
      } else {
         return new Class528(var0, var1);
      }
   }

   public void method11123() {
      this.aBool7190 = true;
   }

   public void method11124() {
      this.aBool7190 = true;
   }

   public void method11125() {
      this.aBool7190 = true;
   }

   public void method11126() {
      this.aBool7181 = true;
   }

   void method11127() {
      this.aBool7181 = false;
   }

   boolean method11128(Class545 var1, long var2) {
      if(this.aLong7185 != this.aLong7191) {
         this.method11110();
      } else {
         this.method11111();
      }

      if(var2 - this.aLong7185 > 750L) {
         this.method11109();
         return false;
      } else {
         int var4 = (int)(var2 - this.aLong7191);
         Iterator var5;
         Class533 var6;
         if(this.aBool7190) {
            var5 = this.aList7182.iterator();

            while(var5.hasNext()) {
               var6 = (Class533)var5.next();

               for(int var7 = 0; var7 < var6.aClass364_7225.anInt4556 * -832186353; ++var7) {
                  var6.method11214(var1, var2, 1, !this.aBool7181, 23889665);
               }
            }

            this.aBool7190 = false;
         }

         var5 = this.aList7182.iterator();

         while(var5.hasNext()) {
            var6 = (Class533)var5.next();
            var6.method11214(var1, var2, var4, !this.aBool7181, 843193822);
         }

         this.aLong7191 = var2;
         return true;
      }
   }

   boolean method11129(Class545 var1, long var2) {
      if(this.aLong7185 != this.aLong7191) {
         this.method11110();
      } else {
         this.method11111();
      }

      if(var2 - this.aLong7185 > 750L) {
         this.method11109();
         return false;
      } else {
         int var4 = (int)(var2 - this.aLong7191);
         Iterator var5;
         Class533 var6;
         if(this.aBool7190) {
            var5 = this.aList7182.iterator();

            while(var5.hasNext()) {
               var6 = (Class533)var5.next();

               for(int var7 = 0; var7 < var6.aClass364_7225.anInt4556 * -832186353; ++var7) {
                  var6.method11214(var1, var2, 1, !this.aBool7181, 1164536607);
               }
            }

            this.aBool7190 = false;
         }

         var5 = this.aList7182.iterator();

         while(var5.hasNext()) {
            var6 = (Class533)var5.next();
            var6.method11214(var1, var2, var4, !this.aBool7181, 117020065);
         }

         this.aLong7191 = var2;
         return true;
      }
   }

   boolean method11130(Class545 var1, long var2) {
      if(this.aLong7185 != this.aLong7191) {
         this.method11110();
      } else {
         this.method11111();
      }

      if(var2 - this.aLong7185 > 750L) {
         this.method11109();
         return false;
      } else {
         int var4 = (int)(var2 - this.aLong7191);
         Iterator var5;
         Class533 var6;
         if(this.aBool7190) {
            var5 = this.aList7182.iterator();

            while(var5.hasNext()) {
               var6 = (Class533)var5.next();

               for(int var7 = 0; var7 < var6.aClass364_7225.anInt4556 * -832186353; ++var7) {
                  var6.method11214(var1, var2, 1, !this.aBool7181, -1069218411);
               }
            }

            this.aBool7190 = false;
         }

         var5 = this.aList7182.iterator();

         while(var5.hasNext()) {
            var6 = (Class533)var5.next();
            var6.method11214(var1, var2, var4, !this.aBool7181, 2079797117);
         }

         this.aLong7191 = var2;
         return true;
      }
   }

   boolean method11131(Class545 var1, long var2) {
      if(this.aLong7185 != this.aLong7191) {
         this.method11110();
      } else {
         this.method11111();
      }

      if(var2 - this.aLong7185 > 750L) {
         this.method11109();
         return false;
      } else {
         int var4 = (int)(var2 - this.aLong7191);
         Iterator var5;
         Class533 var6;
         if(this.aBool7190) {
            var5 = this.aList7182.iterator();

            while(var5.hasNext()) {
               var6 = (Class533)var5.next();

               for(int var7 = 0; var7 < var6.aClass364_7225.anInt4556 * -832186353; ++var7) {
                  var6.method11214(var1, var2, 1, !this.aBool7181, -144013044);
               }
            }

            this.aBool7190 = false;
         }

         var5 = this.aList7182.iterator();

         while(var5.hasNext()) {
            var6 = (Class533)var5.next();
            var6.method11214(var1, var2, var4, !this.aBool7181, 489372467);
         }

         this.aLong7191 = var2;
         return true;
      }
   }

   boolean method11132(Class545 var1, long var2) {
      if(this.aLong7185 != this.aLong7191) {
         this.method11110();
      } else {
         this.method11111();
      }

      if(var2 - this.aLong7185 > 750L) {
         this.method11109();
         return false;
      } else {
         int var4 = (int)(var2 - this.aLong7191);
         Iterator var5;
         Class533 var6;
         if(this.aBool7190) {
            var5 = this.aList7182.iterator();

            while(var5.hasNext()) {
               var6 = (Class533)var5.next();

               for(int var7 = 0; var7 < var6.aClass364_7225.anInt4556 * -832186353; ++var7) {
                  var6.method11214(var1, var2, 1, !this.aBool7181, 2041981263);
               }
            }

            this.aBool7190 = false;
         }

         var5 = this.aList7182.iterator();

         while(var5.hasNext()) {
            var6 = (Class533)var5.next();
            var6.method11214(var1, var2, var4, !this.aBool7181, 835383986);
         }

         this.aLong7191 = var2;
         return true;
      }
   }

   public void method11133(long var1) {
      this.aLong7185 = var1;
   }

   public void method11134() {
      this.aBool7190 = true;
   }

   public void method11135(long var1) {
      this.aLong7185 = var1;
   }

   void method11136(Class241 var1, Class545 var2) {
      this.aClass97_7193.aClass478_981.method8055(384365095);
      Iterator var3 = this.aList7182.iterator();

      while(var3.hasNext()) {
         Class533 var4 = (Class533)var3.next();
         var4.method11215(var1, var2, this.aLong7191);
      }

   }

   public void method11137(long var1) {
      this.aLong7185 = var1;
   }

   void method11138(Class545 var1, Class80[] var2, boolean var3) {
      for(int var4 = 0; var4 < 64; ++var4) {
         aBoolArray7194[var4] = false;
      }

      Iterator var7 = this.aList7182.iterator();

      label58:
      while(var7.hasNext()) {
         Class533 var5 = (Class533)var7.next();
         if(var2 != null) {
            for(int var6 = 0; var6 < var2.length; ++var6) {
               if(var5.aClass80_7236 == var2[var6] || var5.aClass80_7236 == var2[var6].aClass80_813) {
                  aBoolArray7194[var6] = true;
                  var5.method11213(1627126167);
                  var5.aBool7231 = false;
                  continue label58;
               }
            }
         }

         if(!var3) {
            if(var5.anInt7224 * 2063273299 == 0) {
               var7.remove();
               --this.anInt7187;
            } else {
               var5.aBool7231 = true;
            }
         }
      }

      if(var2 != null) {
         for(int var8 = 0; var8 < var2.length && var8 != 64 && this.anInt7187 != 64; ++var8) {
            if(!aBoolArray7194[var8]) {
               Class533 var9 = new Class533(var1, var2[var8], this, this.aLong7185);
               this.aList7182.add(var9);
               ++this.anInt7187;
               aBoolArray7194[var8] = true;
            }
         }
      }

   }

   public static Class528 method11139(int var0, boolean var1) {
      if(Class529.anInt7200 * 953435103 != Class529.anInt7196 * 463460391) {
         Class528 var2 = Class529.aClass528Array7198[Class529.anInt7196 * 463460391];
         Class529.anInt7196 = (Class529.anInt7196 * 463460391 + 1 & Class76.anIntArray701[Class529.anInt7207 * 385979637]) * -388753513;
         var2.method11107(var0, var1);
         return var2;
      } else {
         return new Class528(var0, var1);
      }
   }

   void method11140(Class166[] var1, boolean var2) {
      int var3;
      for(var3 = 0; var3 < 16; ++var3) {
         aBoolArray7195[var3] = false;
      }

      Iterator var6 = this.aList7188.iterator();

      Class225_Sub10 var4;
      label67:
      while(var6.hasNext()) {
         var4 = (Class225_Sub10)var6.next();
         if(var1 != null) {
            for(int var5 = 0; var5 < var1.length; ++var5) {
               if(var4.aClass166_8522 == var1[var5] || var4.aClass166_8522 == var1[var5].aClass166_2016) {
                  aBoolArray7195[var5] = true;
                  var4.method13560(1111205457);
                  continue label67;
               }
            }
         }

         if(!var2) {
            var4.method3857(1328785369);
            --this.anInt7189;
            if(var4.method3858(1694590635)) {
               var4.method3857(-1242457513);
               Class529.anInt7208 -= 1888117517;
            }
         }
      }

      if(var1 != null) {
         for(var3 = 0; var3 < var1.length && var3 != 16 && this.anInt7189 != 16; ++var3) {
            if(!aBoolArray7195[var3]) {
               var4 = null;
               if(var1[var3].method2848(1279230847).anInt4759 * 1301636203 == 1 && Class529.anInt7208 * -1609358395 < 32) {
                  var4 = new Class225_Sub10(var1[var3], this);
                  Class529.aClass423_7205.method7206(var4, (long)(var1[var3].anInt2021 * -801151981));
                  Class529.anInt7208 += 1888117517;
               }

               if(var4 == null) {
                  var4 = new Class225_Sub10(var1[var3], this);
               }

               this.aList7188.add(var4);
               ++this.anInt7189;
               aBoolArray7195[var3] = true;
            }
         }
      }

   }

   public Class97 method11141() {
      return this.aClass97_7193;
   }

   public void method11142(int var1, int var2, int var3, int var4, int var5) {
      this.anInt7192 = var1;
   }

   void method11143(Class545 var1, Class80[] var2, boolean var3) {
      for(int var4 = 0; var4 < 64; ++var4) {
         aBoolArray7194[var4] = false;
      }

      Iterator var7 = this.aList7182.iterator();

      label58:
      while(var7.hasNext()) {
         Class533 var5 = (Class533)var7.next();
         if(var2 != null) {
            for(int var6 = 0; var6 < var2.length; ++var6) {
               if(var5.aClass80_7236 == var2[var6] || var5.aClass80_7236 == var2[var6].aClass80_813) {
                  aBoolArray7194[var6] = true;
                  var5.method11213(1301942371);
                  var5.aBool7231 = false;
                  continue label58;
               }
            }
         }

         if(!var3) {
            if(var5.anInt7224 * 2063273299 == 0) {
               var7.remove();
               --this.anInt7187;
            } else {
               var5.aBool7231 = true;
            }
         }
      }

      if(var2 != null) {
         for(int var8 = 0; var8 < var2.length && var8 != 64 && this.anInt7187 != 64; ++var8) {
            if(!aBoolArray7194[var8]) {
               Class533 var9 = new Class533(var1, var2[var8], this, this.aLong7185);
               this.aList7182.add(var9);
               ++this.anInt7187;
               aBoolArray7194[var8] = true;
            }
         }
      }

   }

   public void method11144(int var1, int var2, int var3, int var4, int var5) {
      this.anInt7192 = var1;
   }

   public void method11145(int var1, int var2, int var3, int var4, int var5) {
      this.anInt7192 = var1;
   }

   public void method11146(int var1, int var2, int var3, int var4, int var5) {
      this.anInt7192 = var1;
   }

   public void method11147(int var1, int var2, int var3, int var4, int var5) {
      this.anInt7192 = var1;
   }

   void method11148(Class241 var1, Class545 var2) {
      this.aClass97_7193.aClass478_981.method8055(384365095);
      Iterator var3 = this.aList7182.iterator();

      while(var3.hasNext()) {
         Class533 var4 = (Class533)var3.next();
         var4.method11215(var1, var2, this.aLong7191);
      }

   }

   void method11149(Class545 var1, Class80[] var2, boolean var3) {
      for(int var4 = 0; var4 < 64; ++var4) {
         aBoolArray7194[var4] = false;
      }

      Iterator var7 = this.aList7182.iterator();

      label58:
      while(var7.hasNext()) {
         Class533 var5 = (Class533)var7.next();
         if(var2 != null) {
            for(int var6 = 0; var6 < var2.length; ++var6) {
               if(var5.aClass80_7236 == var2[var6] || var5.aClass80_7236 == var2[var6].aClass80_813) {
                  aBoolArray7194[var6] = true;
                  var5.method11213(592959635);
                  var5.aBool7231 = false;
                  continue label58;
               }
            }
         }

         if(!var3) {
            if(var5.anInt7224 * 2063273299 == 0) {
               var7.remove();
               --this.anInt7187;
            } else {
               var5.aBool7231 = true;
            }
         }
      }

      if(var2 != null) {
         for(int var8 = 0; var8 < var2.length && var8 != 64 && this.anInt7187 != 64; ++var8) {
            if(!aBoolArray7194[var8]) {
               Class533 var9 = new Class533(var1, var2[var8], this, this.aLong7185);
               this.aList7182.add(var9);
               ++this.anInt7187;
               aBoolArray7194[var8] = true;
            }
         }
      }

   }

   public Class97 method11150() {
      this.aClass97_7193.aClass478_981.method8055(384365095);

      for(int var1 = 0; var1 < this.aClass222_Sub1_Sub1_Sub1Array7184.length; ++var1) {
         if(this.aClass222_Sub1_Sub1_Sub1Array7184[var1] != null && this.aClass222_Sub1_Sub1_Sub1Array7184[var1].aClass533_10635 != null) {
            this.aClass97_7193.aClass478_981.method8058(this.aClass222_Sub1_Sub1_Sub1Array7184[var1], -386925215);
         }
      }

      return this.aClass97_7193;
   }

   public Class97 method11151() {
      return this.aClass97_7193;
   }

   public void method11152(Class545 var1, long var2, Class80[] var4, Class166[] var5, boolean var6) {
      if(!this.aBool7186) {
         this.method11105(var1, var4, var6);
         this.method11115(var5, var6);
         this.aLong7185 = var2;
      }
   }

   public Class97 method11153() {
      return this.aClass97_7193;
   }

   public Class97 method11154() {
      return this.aClass97_7193;
   }
}
