import java.awt.datatransfer.ClipboardOwner;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.Transferable;

public class Class94 {

   static Class94 aClass94_920 = new Class94();
   static Class94 aClass94_921 = new Class94();
   static Class94 aClass94_922 = new Class94();
   public static int[] anIntArray923;


   static int method1839(PacketBuffer var0, int var1) {
      int var2 = var0.readBits(2, 1596596682);
      int var3;
      if(0 == var2) {
         var3 = 0;
      } else if(1 == var2) {
         var3 = var0.readBits(5, 498992870);
      } else if(2 == var2) {
         var3 = var0.readBits(8, 859647045);
      } else {
         var3 = var0.readBits(11, 1439980698);
      }

      return var3;
   }

   static void method1840(int var0) {
      if(-215947015 * Class176.anInt2144 < 102) {
         Class176.anInt2144 += -166979658;
      }

      int var1;
      if(-2042383283 * Class176.anInt2138 != -1 && Class536_Sub1.aLong8625 * 5110598017788318305L < Class339.method6240(-767492676)) {
         for(var1 = Class176.anInt2138 * -2042383283; var1 < Class278.aStringArray3230.length; ++var1) {
            if(Class278.aStringArray3230[var1].startsWith("pause")) {
               int var2 = 5;

               try {
                  var2 = Integer.parseInt(Class278.aStringArray3230[var1].substring(6));
               } catch (Exception var9) {
                  ;
               }

               Class508.method10788("Pausing for " + var2 + " seconds...", 2054518545);
               Class176.anInt2138 = (var1 + 1) * -1919245179;
               Class536_Sub1.aLong8625 = (Class339.method6240(-604268925) + (long)(1000 * var2)) * 4896234892444406177L;
               return;
            }

            Class176.aString2139 = Class278.aStringArray3230[var1];
            Class3.method535(false, (byte)5);
         }

         Class176.anInt2138 = 1919245179;
      }

      if(-1957117007 * client.anInt7917 != 0) {
         Class176.anInt2136 -= -2009465783 * client.anInt7917;
         if(-1594987315 * Class176.anInt2136 >= Class176.anInt2137 * 1556201815) {
            Class176.anInt2136 = Class176.anInt2137 * -243636557 - 1555521541;
         }

         if(Class176.anInt2136 * -1594987315 < 0) {
            Class176.anInt2136 = 0;
         }

         client.anInt7917 = 0;
      }

      for(var1 = 0; var1 < 398357655 * client.anInt7678; ++var1) {
         Interface56 var11 = client.anInterface56Array7633[var1];
         int var3 = var11.method87(1816402565);
         char var4 = var11.method291((byte)5);
         int var5 = var11.method293(-515942591);
         if(var3 == 84) {
            Class3.method535(false, (byte)5);
         }

         if(80 == var3) {
            Class3.method535(true, (byte)5);
         } else if(66 == var3 && (var5 & 4) != 0) {
            if(null != Class375.aClipboard4689) {
               String var12 = "";

               for(int var13 = Class176.aStringArray2134.length - 1; var13 >= 0; --var13) {
                  if(Class176.aStringArray2134[var13] != null && Class176.aStringArray2134[var13].length() > 0) {
                     var12 = var12 + Class176.aStringArray2134[var13] + '\n';
                  }
               }

               Class375.aClipboard4689.setContents(new StringSelection(var12), (ClipboardOwner)null);
            }
         } else if(var3 == 67 && (var5 & 4) != 0) {
            if(Class375.aClipboard4689 != null) {
               try {
                  Transferable var6 = Class375.aClipboard4689.getContents((Object)null);
                  if(null != var6) {
                     String var7 = (String)var6.getTransferData(DataFlavor.stringFlavor);
                     if(var7 != null) {
                        String[] var8 = Class34.method879(var7, '\n', -462413523);
                        Class498.method8338(var8, -1680091452);
                     }
                  }
               } catch (Exception var10) {
                  ;
               }
            }
         } else if(var3 == 85 && -1117729919 * Class176.anInt2141 > 0) {
            Class176.aString2139 = Class176.aString2139.substring(0, -1117729919 * Class176.anInt2141 - 1) + Class176.aString2139.substring(Class176.anInt2141 * -1117729919);
            Class176.anInt2141 -= 327382145;
         } else if(101 == var3 && -1117729919 * Class176.anInt2141 < Class176.aString2139.length()) {
            Class176.aString2139 = Class176.aString2139.substring(0, Class176.anInt2141 * -1117729919) + Class176.aString2139.substring(1 + Class176.anInt2141 * -1117729919);
         } else if(var3 == 96 && -1117729919 * Class176.anInt2141 > 0) {
            Class176.anInt2141 -= 327382145;
         } else if(97 == var3 && Class176.anInt2141 * -1117729919 < Class176.aString2139.length()) {
            Class176.anInt2141 += 327382145;
         } else if(var3 == 102) {
            Class176.anInt2141 = 0;
         } else if(var3 == 103) {
            Class176.anInt2141 = Class176.aString2139.length() * 327382145;
         } else if(104 == var3 && Class176.anInt2140 * -25626609 < Class176.aStringArray2134.length) {
            Class176.anInt2140 += -1540426001;
            Class355.method6400(1819572602);
            Class176.anInt2141 = Class176.aString2139.length() * 327382145;
         } else if(105 == var3 && -25626609 * Class176.anInt2140 > 0) {
            Class176.anInt2140 -= -1540426001;
            Class355.method6400(2087433110);
            Class176.anInt2141 = Class176.aString2139.length() * 327382145;
         } else if(method1843(var4, (byte)0) || "\\/.:, _-+[]~@".indexOf(var4) != -1) {
            Class176.aString2139 = Class176.aString2139.substring(0, Class176.anInt2141 * -1117729919) + client.anInterface56Array7633[var1].method291((byte)111) + Class176.aString2139.substring(Class176.anInt2141 * -1117729919);
            Class176.anInt2141 += 327382145;
         }
      }

      client.anInt7678 = 0;
      client.anInt7681 = 0;
      Class225_Sub21_Sub9.method15659(1733971543);
   }

   public static Class42 method1841(int var0, byte var1) {
      return var0 >= 0 && var0 < 100?Class46.aClass42Array487[var0]:null;
   }

   static final void method1842(Class508 var0, int var1) {
      int var2 = var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807];
      Class124 var3 = Class97.method1903(var2, -1044764564);
      Class121 var4 = Class18.aClass121Array188[var2 >> 16];
      Class432.method7317(var3, var4, var0, (byte)-23);
   }

   public static boolean method1843(char var0, byte var1) {
      return var0 >= 48 && var0 <= 57 || var0 >= 65 && var0 <= 90 || var0 >= 97 && var0 <= 122;
   }

   public static void method1844(boolean var0, boolean var1, int var2) {
      if(var0) {
         Class516.anInt6080 += -1239674265;
         Class226.method3935(-863062278);
      }

      if(var1) {
         Class516.anInt6081 += -1527443985;
         Class552.method11824((byte)73);
      }

   }

   static final void method1845(Class508 var0, short var1) throws Exception_Sub4 {
      var0.anInt6003 -= 393249892;
      int var2 = var0.anIntArray6027[var0.anInt6003 * -937710807];
      int var3 = var0.anIntArray6027[1 + -937710807 * var0.anInt6003];
      int var4 = var0.anIntArray6027[2 + var0.anInt6003 * -937710807];
      int var5 = var0.anIntArray6027[3 + -937710807 * var0.anInt6003];
      Class326 var6 = Class326.method5868((float)var2, (float)var3, (float)var4);
      if(var6.aFloat4036 == -1.0F) {
         var6.aFloat4036 = Float.POSITIVE_INFINITY;
      }

      if(-1.0F == var6.aFloat4037) {
         var6.aFloat4037 = Float.POSITIVE_INFINITY;
      }

      if(var6.aFloat4033 == -1.0F) {
         var6.aFloat4033 = Float.POSITIVE_INFINITY;
      }

      Class336.aClass35_Sub1_4206.method892(var6, (byte)68);
      Class336.aClass35_Sub1_4206.method1007((float)var5 / 1000.0F, -824980049);
      var6.method5948();
   }
}
