import java.nio.ByteBuffer;
import java.util.Arrays;

public class Class120 {

   public int[] anIntArray1197;
   public int anInt1198;
   public Class496 aClass496_1199;
   public int[] anIntArray1200;
   public int anInt1201;
   int anInt1202;
   public static int anInt1203;


   public boolean method2327(int var1, int var2) {
      if(var2 >= 0 && var2 < this.anIntArray1200.length) {
         int var3 = this.anIntArray1200[var2];
         if(var1 >= var3 && var1 <= var3 + this.anIntArray1197[var2]) {
            return true;
         }
      }

      return false;
   }

   public boolean method2328(int var1, int var2, int var3) {
      if(var2 >= 0 && var2 < this.anIntArray1200.length) {
         int var4 = this.anIntArray1200[var2];
         if(var1 >= var4 && var1 <= var4 + this.anIntArray1197[var2]) {
            return true;
         }
      }

      return false;
   }

   Class120(int var1, int var2, int[] var3, int[] var4, Class496 var5, int var6) {
      this.anInt1201 = var1 * 1025818939;
      this.anInt1198 = -1323057705 * var2;
      this.anIntArray1197 = var3;
      this.anIntArray1200 = var4;
      this.aClass496_1199 = var5;
      this.anInt1202 = var6 * 51725651;
   }

   static Class577[] method2329(int var0) {
      return new Class577[]{Class577.aClass577_7612, Class577.aClass577_7613};
   }

   public static Class565[] method2330(int var0) {
      return new Class565[]{Class565.aClass565_7502, Class565.aClass565_7501, Class565.aClass565_7503};
   }

   static final void method2331(Class508 var0, int var1) {
      int var2 = var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807];
      Class124 var3 = Class97.method1903(var2, 1922440537);
      var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = var3.anInt1390 * 757824707;
   }

   static final int method2332(Class515_Sub1_Sub4_Sub4 var0, int var1) {
      if(0 == var0.anInt10771 * 920233981) {
         return 0;
      } else {
         int var5;
         Class326 var7;
         if(-1 != var0.anInt10749 * -1759863533) {
            Object var2 = null;
            if(var0.anInt10749 * -1759863533 < '\u8000') {
               ObjectVar var3 = (ObjectVar)client.aClass423_7693.method7211((long)(var0.anInt10749 * -1759863533));
               if(var3 != null) {
                  var2 = (Class515_Sub1_Sub4_Sub4)var3.object;
               }
            } else if(-1759863533 * var0.anInt10749 >= '\u8000') {
               var2 = client.aClass515_Sub1_Sub4_Sub4_Sub1Array7799[var0.anInt10749 * -1759863533 - '\u8000'];
            }

            if(null != var2) {
               var7 = Class326.method5884(var0.method10913().aClass326_4031, ((Class515_Sub1_Sub4_Sub4)var2).method10913().aClass326_4031);
               int var4 = (int)var7.aFloat4036;
               var5 = (int)var7.aFloat4033;
               if(var4 != 0 || var5 != 0) {
                  var0.method16627((int)(Math.atan2((double)var4, (double)var5) * 2607.5945876176133D) & 16383, -578372916);
               }
            }
         }

         if(var0 instanceof Class515_Sub1_Sub4_Sub4_Sub1) {
            Class515_Sub1_Sub4_Sub4_Sub1 var8 = (Class515_Sub1_Sub4_Sub4_Sub1)var0;
            if(-1 != 480909431 * var8.anInt10867 && (0 == 1445958377 * var8.anInt10777 || var8.anInt10781 * 1164059979 > 0)) {
               var8.method16627(480909431 * var8.anInt10867, -591090439);
               var8.anInt10867 = -210452807;
            }
         } else if(var0 instanceof Class515_Sub1_Sub4_Sub4_Sub2) {
            Class515_Sub1_Sub4_Sub4_Sub2 var9 = (Class515_Sub1_Sub4_Sub4_Sub2)var0;
            if(-1 != -1880400849 * var9.anInt10885 && (0 == 1445958377 * var9.anInt10777 || var9.anInt10781 * 1164059979 > 0)) {
               var7 = var9.method10913().aClass326_4031;
               Class548 var10 = client.aClass279_7807.method4909(1301900902);
               var5 = (int)var7.aFloat4036 - (var9.anInt10885 * -346280192 - var10.anInt7419 * -1228451072 - -1228451072 * var10.anInt7419);
               int var6 = (int)var7.aFloat4033 - (-654581504 * var9.anInt10893 - 1992657152 * var10.anInt7420 - var10.anInt7420 * 1992657152);
               if(0 != var5 || 0 != var6) {
                  var9.method16627((int)(Math.atan2((double)var5, (double)var6) * 2607.5945876176133D) & 16383, -1730746990);
               }

               var9.anInt10885 = -294349519;
            }
         }

         return var0.method16672(2116066783);
      }
   }

   public static byte[] method2333(Object var0, boolean var1, int var2) {
      if(var0 == null) {
         return null;
      } else if(var0 instanceof byte[]) {
         byte[] var5 = (byte[])((byte[])var0);
         return var1?Arrays.copyOf(var5, var5.length):var5;
      } else if(var0 instanceof ByteBuffer) {
         ByteBuffer var3 = (ByteBuffer)var0;
         byte[] var4 = new byte[var3.capacity()];
         var3.position(0);
         var3.get(var4);
         return var4;
      } else {
         throw new IllegalArgumentException();
      }
   }

   public static void method2334(Class485 var0, int var1, int var2) {
      if(49139505 * Class226.anInt2612 < 50) {
         if(var0 != null && var0.anIntArrayArray5872 != null && var1 < var0.anIntArrayArray5872.length && null != var0.anIntArrayArray5872[var1]) {
            int var3 = var0.anIntArrayArray5872[var1][0];
            int var4 = var3 >> 8;
            int var5 = var3 >> 5 & 7;
            int var6;
            if(var0.anIntArrayArray5872[var1].length > 1) {
               var6 = (int)(Math.random() * (double)var0.anIntArrayArray5872[var1].length);
               if(var6 > 0) {
                  var4 = var0.anIntArrayArray5872[var1][var6];
               }
            }

            var6 = 256;
            if(var0.anIntArray5871 != null && null != var0.anIntArray5882) {
               var6 = Class38.method1072(var0.anIntArray5871[var1], var0.anIntArray5882[var1], (byte)-13);
            }

            int var7 = null == var0.anIntArray5885?255:var0.anIntArray5885[var1];
            if(var0.aBool5884) {
               Class257.method4639(var4, var5, 0, var7, false, var6, 679559737);
            } else {
               Class37.method1052(var4, var5, 0, var7, var6, 106939795);
            }

         }
      }
   }

   static final void method2335(Class508 var0, int var1) {
      int var2 = var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807];
      Class124 var3 = Class97.method1903(var2, -273430715);
      Class257.method4643(var3, var0, -950420104);
   }
}
