import java.awt.Dimension;

public class Class249 {

   public static final int anInt2964 = 1;
   public static final int anInt2965 = 3;
   public static final int anInt2966 = 2;
   public static final int anInt2967 = 6;
   public static final int anInt2968 = 5;
   public static final int anInt2969 = 4;
   static int anInt2970;


   Class249() throws Throwable {
      throw new Error();
   }

   static final void method4456(Class508 var0, byte var1) {
      Class505 var10000;
      if(var0.aBool6014) {
         if(var1 == 0) {
            return;
         }

         var10000 = var0.aClass505_6011;
      } else {
         var10000 = var0.aClass505_6010;
      }

      Class505 var2 = var10000;
      Class124 var3 = var2.aClass124_5977;
      Class121 var4 = var2.aClass121_5978;
      Class440.method7394(var3, var4, var0, (byte)87);
   }

   static final void method4457(Class508 var0, int var1) {
      Class505 var2 = var0.aBool6014?var0.aClass505_6011:var0.aClass505_6010;
      Class124 var3 = var2.aClass124_5977;
      var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = -59948251 * var3.anInt1430;
   }

   static final void method4458(Class508 var0, int var1) {
      var0.anIntArray6027[(var0.anInt6003 += 98312473) * -937710807 - 1] = Class121.aByte1208;
   }

   public static void method4459(Class225_Sub14 var0, Class225_Sub14 var1, int var2) {
      if(var0.aClass225_Sub14_8551 != null) {
         var0.method13603(-1882977104);
      }

      var0.aClass225_Sub14_8551 = var1;
      var0.aClass225_Sub14_8553 = var1.aClass225_Sub14_8553;
      var0.aClass225_Sub14_8551.aClass225_Sub14_8553 = var0;
      var0.aClass225_Sub14_8553.aClass225_Sub14_8551 = var0;
   }

   static final void method4460(Class508 var0, int var1) {
      int var2 = Class500.aClass225_Sub6_5953.aClass463_Sub10_8480.method12877((byte)-8);
      Class500.aClass225_Sub6_5953.method13522(Class500.aClass225_Sub6_5953.aClass463_Sub10_8483, var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807] == 1?0:var2, -1114204907);
      Class268.method4762(-432328951);
   }

   static void method4461(String var0, String var1, String var2, boolean var3, boolean var4, int var5) {
      PacketContext var6 = Class35_Sub1.method13169(883808512);
      if(var6.method3206((byte)-60) != null) {
         Class225_Sub15 var7 = Class543.method11415(OutgoingOpcode.aClass302_3759, var6.aClass433_2184, (byte)1);
         var7.buffer.writeShort(Class190.method3320(var0, 58897559) + Class190.method3320(var1, -1593349696) + Class190.method3320(var2, 592511742) + 1, 411187741);
         var7.buffer.writeString(var0, (byte)92);
         var7.buffer.writeString(var1, (byte)107);
         var7.buffer.writeString(var2, (byte)51);
         int var8 = 0;
         if(var3) {
            var8 |= 1;
         }

         if(var4) {
            var8 |= 2;
         }

         var7.buffer.writeByte(var8, -765864773);
         var6.method3191(var7, (byte)-103);
      }

   }

   public static int method4462(int var0, int var1, int var2) {
      if(363393391 * Class304.aClass535_3876.anInt7271 == -1) {
         return 1;
      } else {
         if(var0 != Class500.aClass225_Sub6_5953.aClass463_Sub15_8472.method12922((byte)-74)) {
            Class35.method1023(var0, Class418.aClass418_5242.method7137(Class498.aClass470_5944, (byte)-123), true, 1656259523);
            if(Class500.aClass225_Sub6_5953.aClass463_Sub15_8472.method12922((byte)-85) != var0) {
               return -1;
            }
         }

         try {
            Dimension var3 = Class572.aCanvas7591.getSize();
            Class182_Sub2.method14447(Class418.aClass418_5242.method7137(Class498.aClass470_5944, (byte)-102), true, Class428.aClass545_5383, Class574.aClass8_7601, Class578.aClass405_7616, 833800701);
            Class96 var4 = Class96.method1867(Class532.aClass253_7223, Class304.aClass535_3876.anInt7271 * 363393391, 0);
            long var5 = Class339.method6240(1993408400);
            Class428.aClass545_5383.L();
            client.aClass328_7939.method6038(0.0F, 256.0F, 0.0F);
            Class428.aClass545_5383.method11603(client.aClass328_7939);
            Class317 var7 = Class428.aClass545_5383.method11467();
            var7.method5625((float)(var3.width / 2), (float)(var3.height / 2), 512.0F, 512.0F, (float)client.aClass279_7807.method4915((byte)60), (float)client.aClass279_7807.method4916(-1917672167), (float)var3.width, (float)var3.height);
            Class428.aClass545_5383.method11500(var7);
            Class428.aClass545_5383.IA(1.0F);
            Class428.aClass545_5383.m(16777215, 0.5F, 0.5F, 20.0F, -50.0F, 30.0F);
            Class568 var8 = Class428.aClass545_5383.method11493(var4, 2048, 64, 64, 768);
            int var9 = 0;

            label41:
            for(int var10 = 0; var10 < 500; ++var10) {
               Class428.aClass545_5383.ba(3, 0);

               for(int var11 = 15; var11 >= 0; --var11) {
                  for(int var12 = 0; var12 <= var11; ++var12) {
                     client.aClass328_7654.method6038((float)((int)(((float)var12 - (float)var11 / 2.0F) * 512.0F)), 0.0F, (float)((var11 + 1) * 512));
                     var8.method12069(client.aClass328_7654, (Class89)null, 0);
                     ++var9;
                     if(Class339.method6240(1611199095) - var5 >= (long)var1) {
                        break label41;
                     }
                  }
               }
            }

            Class428.aClass545_5383.method11430();
            long var13 = (long)(var9 * 1000) / (Class339.method6240(761394938) - var5);
            Class428.aClass545_5383.ba(3, 0);
            return (int)var13;
         } catch (Throwable var15) {
            var15.printStackTrace();
            return -1;
         }
      }
   }
}
