import java.io.IOException;

public class Class186 {

   int anInt2228;
   int anInt2229;
   public int anInt2230;
   int anInt2231;
   public int anInt2232;
   public int anInt2233;
   public int anInt2234;
   public int anInt2235 = -1288434881;
   static Class564 aClass564_2236 = new Class564(4);
   int anInt2237;
   public int anInt2238;
   static Class171[] aClass171Array2239;


   static void method3254(int var0) {
      aClass564_2236.method11963(var0, (byte)-65);
   }

   static void method3255() {
      aClass564_2236.method11976((byte)88);
   }

   public static Class568 method3256(Class545 var0, int var1, int var2, int var3, int var4, int var5) {
      long var6 = (long)var5;
      Class568 var8 = (Class568)aClass564_2236.method11959(var6);
      short var9 = 2055;
      if(var8 == null) {
         Class96 var10 = Class96.method1867(Class532.aClass253_7223, var5, 0);
         if(null == var10) {
            return null;
         }

         if(var10.anInt947 < 13) {
            var10.method1848(2);
         }

         var8 = var0.method11493(var10, var9, Class245.anInt2939 * 1004762603, 64, 768);
         aClass564_2236.method11958(var8, var6);
      }

      var8 = var8.method12060((byte)6, var9, true);
      if(var1 != 0) {
         var8.f(var1);
      }

      if(0 != var2) {
         var8.t(var2);
      }

      if(0 != var3) {
         var8.EA(var3);
      }

      if(var4 != 0) {
         var8.ia(0, var4, 0);
      }

      return var8;
   }

   public static Class568 method3257(Class545 var0, int var1, int var2, int var3, int var4, int var5) {
      long var6 = (long)var5;
      Class568 var8 = (Class568)aClass564_2236.method11959(var6);
      short var9 = 2055;
      if(var8 == null) {
         Class96 var10 = Class96.method1867(Class532.aClass253_7223, var5, 0);
         if(null == var10) {
            return null;
         }

         if(var10.anInt947 < 13) {
            var10.method1848(2);
         }

         var8 = var0.method11493(var10, var9, Class245.anInt2939 * 1004762603, 64, 768);
         aClass564_2236.method11958(var8, var6);
      }

      var8 = var8.method12060((byte)6, var9, true);
      if(var1 != 0) {
         var8.f(var1);
      }

      if(0 != var2) {
         var8.t(var2);
      }

      if(0 != var3) {
         var8.EA(var3);
      }

      if(var4 != 0) {
         var8.ia(0, var4, 0);
      }

      return var8;
   }

   public static Class568 method3258(Class545 var0, int var1, int var2, int var3, int var4, int var5) {
      long var6 = (long)var5;
      Class568 var8 = (Class568)aClass564_2236.method11959(var6);
      short var9 = 2055;
      if(var8 == null) {
         Class96 var10 = Class96.method1867(Class532.aClass253_7223, var5, 0);
         if(null == var10) {
            return null;
         }

         if(var10.anInt947 < 13) {
            var10.method1848(2);
         }

         var8 = var0.method11493(var10, var9, Class245.anInt2939 * 1004762603, 64, 768);
         aClass564_2236.method11958(var8, var6);
      }

      var8 = var8.method12060((byte)6, var9, true);
      if(var1 != 0) {
         var8.f(var1);
      }

      if(0 != var2) {
         var8.t(var2);
      }

      if(0 != var3) {
         var8.EA(var3);
      }

      if(var4 != 0) {
         var8.ia(0, var4, 0);
      }

      return var8;
   }

   static void method3259(int var0) {
      Class245.anInt2939 = var0 * 719719107;
      aClass564_2236.method11976((byte)83);
   }

   static void method3260(int var0) {
      Class245.anInt2939 = var0 * 719719107;
      aClass564_2236.method11976((byte)78);
   }

   static void method3261() {
      aClass564_2236.method11976((byte)82);
   }

   static void method3262() {
      aClass564_2236.method11976((byte)16);
   }

   public static Class568 method3263(Class545 var0, int var1, int var2, int var3, int var4, int var5) {
      long var6 = (long)var5;
      Class568 var8 = (Class568)aClass564_2236.method11959(var6);
      short var9 = 2055;
      if(var8 == null) {
         Class96 var10 = Class96.method1867(Class532.aClass253_7223, var5, 0);
         if(null == var10) {
            return null;
         }

         if(var10.anInt947 < 13) {
            var10.method1848(2);
         }

         var8 = var0.method11493(var10, var9, Class245.anInt2939 * 1004762603, 64, 768);
         aClass564_2236.method11958(var8, var6);
      }

      var8 = var8.method12060((byte)6, var9, true);
      if(var1 != 0) {
         var8.f(var1);
      }

      if(0 != var2) {
         var8.t(var2);
      }

      if(0 != var3) {
         var8.EA(var3);
      }

      if(var4 != 0) {
         var8.ia(0, var4, 0);
      }

      return var8;
   }

   static void method3264(int var0) {
      aClass564_2236.method11963(var0, (byte)-15);
   }

   static void method3265(int var0) {
      aClass564_2236.method11963(var0, (byte)-128);
   }

   static void method3266() {
      aClass564_2236.method11968((short)-27773);
   }

   public static void method3267(RS2Buffer var0, int var1) {
      byte[] var2 = new byte[24];

      try {
         GameEngine.aClass452_3316.method7560(0L);
         GameEngine.aClass452_3316.method7567(var2, (short)2595);

         int var3;
         for(var3 = 0; var3 < 24 && 0 == var2[var3]; ++var3) {
            ;
         }

         if(var3 >= 24) {
            throw new IOException();
         }
      } catch (Exception var5) {
         for(int var4 = 0; var4 < 24; ++var4) {
            var2[var4] = -1;
         }
      }

      var0.method13714(var2, 0, 24, -215641898);
   }

   static final void method3268(Class508 var0, int var1) {
      var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 680915451 * client.anInt7825;
   }

   static final void method3269(Class508 var0, int var1) {
      int var2 = var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807];
      if(Class56_Sub2.aClass173Array8155 != null && var2 < Class397.anInt4901 * 845314169 && Class56_Sub2.aClass173Array8155[var2].aString2078.equalsIgnoreCase(Class5.aClass515_Sub1_Sub4_Sub4_Sub1_113.aString10856)) {
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 1;
      } else {
         var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = 0;
      }

   }

   static final void method3270(Class508 var0, int var1) {
      Class505 var2 = var0.aBool6014?var0.aClass505_6011:var0.aClass505_6010;
      Class124 var3 = var2.aClass124_5977;
      Class121 var4 = var2.aClass121_5978;
      Class393.method6731(var3, var4, var0, -1252819462);
   }

   static final void method3271(Class508 var0, int var1) {
      String var2 = (String)var0.anObjectArray6004[(var0.anInt6005 -= -46848683) * 639741949];
      var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = var2.toLowerCase();
   }

   public static Class417 method3272(ItemDefinition var0, RS2Buffer var1, byte var2) {
      Class417 var3 = new Class417(var0);
      int var4 = var1.readUnsignedByte(-700559597);
      boolean var5 = 0 != (var4 & 1);
      boolean var6 = (var4 & 2) != 0;
      boolean var7 = 0 != (var4 & 4);
      boolean var8 = (var4 & 8) != 0;
      if(var5) {
         var3.anIntArray5142[0] = var1.readLargeSmart(1692783009);
         var3.anIntArray5144[0] = var1.readLargeSmart(1991870556);
         if(553600993 * var0.anInt4946 != -1 || -1728826705 * var0.anInt4928 != -1) {
            var3.anIntArray5142[1] = var1.readLargeSmart(2033573345);
            var3.anIntArray5144[1] = var1.readLargeSmart(1857426123);
         }

         if(-1 != -6803451 * var0.anInt4964 || 846000641 * var0.anInt4968 != -1) {
            var3.anIntArray5142[2] = var1.readLargeSmart(1724398900);
            var3.anIntArray5144[2] = var1.readLargeSmart(1618241930);
         }
      }

      if(var6) {
         var3.anIntArray5146[0] = var1.readLargeSmart(1926468887);
         var3.anIntArray5145[0] = var1.readLargeSmart(2053170255);
         if(2064377299 * var0.anInt4976 != -1 || var0.anInt4995 * -579572887 != -1) {
            var3.anIntArray5146[1] = var1.readLargeSmart(1829498328);
            var3.anIntArray5145[1] = var1.readLargeSmart(1796431153);
         }
      }

      int var9;
      int[] var10;
      int var11;
      if(var7) {
         var9 = var1.readUnsignedShort(-937710807);
         var10 = new int[]{var9 & 15, var9 >> 4 & 15, var9 >> 8 & 15, var9 >> 12 & 15};

         for(var11 = 0; var11 < 4; ++var11) {
            if(15 != var10[var11]) {
               var3.aShortArray5143[var10[var11]] = (short)var1.readUnsignedShort(-937710807);
            }
         }
      }

      if(var8) {
         var9 = var1.readUnsignedByte(-700559597);
         var10 = new int[]{var9 & 15, var9 >> 4 & 15};

         for(var11 = 0; var11 < 2; ++var11) {
            if(var10[var11] != 15) {
               var3.aShortArray5147[var10[var11]] = (short)var1.readUnsignedShort(-937710807);
            }
         }
      }

      return var3;
   }
}
