import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class Class52 {

   static Class41 aClass41_517;


   public static String method1219(RS2Buffer var0) {
      return Class496_Sub2.method15405(var0, 32767, 763902199);
   }

   public static void method1220(Class41 var0) {
      aClass41_517 = var0;
   }

   public static void method1221(Class41 var0) {
      aClass41_517 = var0;
   }

   public static int method1222(RS2Buffer var0, String var1) {
      int var2 = var0.position * -543666943;
      byte[] var3 = Class105.method2162(var1, (byte)15);
      var0.method13718(var3.length, (byte)-40);
      var0.position += aClass41_517.method1107(var3, 0, var3.length, var0.buffer, var0.position * -543666943, -1702092795) * 1385214721;
      return var0.position * -543666943 - var2;
   }

   public static int method1223(RS2Buffer var0, String var1) {
      int var2 = var0.position * -543666943;
      byte[] var3 = Class105.method2162(var1, (byte)25);
      var0.method13718(var3.length, (byte)-16);
      var0.position += aClass41_517.method1107(var3, 0, var3.length, var0.buffer, var0.position * -543666943, -1702092795) * 1385214721;
      return var0.position * -543666943 - var2;
   }

   public static String method1224(RS2Buffer var0) {
      return Class496_Sub2.method15405(var0, 32767, 763902199);
   }

   public static String method1225(RS2Buffer var0) {
      return Class496_Sub2.method15405(var0, 32767, 763902199);
   }

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

   static String method1226(RS2Buffer var0, int var1) {
      try {
         int var2 = var0.readSmart(-79481906);
         if(var2 > var1) {
            var2 = var1;
         }

         byte[] var3 = new byte[var2];
         var0.position += aClass41_517.method1109(var0.buffer, -543666943 * var0.position, var3, 0, var2, -1503340459) * 1385214721;
         String var4 = Class452.method7588(var3, 0, var2, -11960222);
         return var4;
      } catch (Exception var5) {
         return "Cabbage";
      }
   }

   static String method1227(RS2Buffer var0, int var1) {
      try {
         int var2 = var0.readSmart(-20284653);
         if(var2 > var1) {
            var2 = var1;
         }

         byte[] var3 = new byte[var2];
         var0.position += aClass41_517.method1109(var0.buffer, -543666943 * var0.position, var3, 0, var2, -1634462888) * 1385214721;
         String var4 = Class452.method7588(var3, 0, var2, -11960222);
         return var4;
      } catch (Exception var5) {
         return "Cabbage";
      }
   }

   static String method1228(RS2Buffer var0, int var1) {
      try {
         int var2 = var0.readSmart(343291054);
         if(var2 > var1) {
            var2 = var1;
         }

         byte[] var3 = new byte[var2];
         var0.position += aClass41_517.method1109(var0.buffer, -543666943 * var0.position, var3, 0, var2, -1927272794) * 1385214721;
         String var4 = Class452.method7588(var3, 0, var2, -11960222);
         return var4;
      } catch (Exception var5) {
         return "Cabbage";
      }
   }

   static void method1229(int var0, int var1) {
      Class245.anInt2939 = var0 * 719719107;
      Class186.aClass564_2236.method11976((byte)96);
   }

   static final void method1230(Class508 var0, byte var1) {
      var0.anInt6003 -= 393249892;
      Class257.method4639(var0.anIntArray6027[-937710807 * var0.anInt6003], var0.anIntArray6027[-937710807 * var0.anInt6003 + 1], var0.anIntArray6027[2 + -937710807 * var0.anInt6003], var0.anIntArray6027[3 + -937710807 * var0.anInt6003], true, 256, 679559737);
   }

   static final void method1231(Class508 var0, int var1) {
      int var2 = var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807];
      if(995204269 * client.anInt7769 == 2 && var2 < 1907362565 * client.anInt7651) {
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = client.aClass13Array7931[var2].aString167;
      } else {
         var0.anObjectArray6004[(var0.anInt6005 += -46848683) * 639741949 - 1] = "";
      }

   }

   public static void method1232(RS2Buffer var0, int var1, int var2) {
      Class225_Sub3 var3 = new Class225_Sub3();
      var3.anInt8377 = var0.readUnsignedByte(-700559597) * 910045733;
      var3.anInt8378 = var0.readInt_(1464320375) * -1370343643;
      var3.anIntArray8380 = new int[-1140811347 * var3.anInt8377];
      var3.anIntArray8379 = new int[var3.anInt8377 * -1140811347];
      var3.aFieldArray8376 = new Field[-1140811347 * var3.anInt8377];
      var3.anIntArray8381 = new int[-1140811347 * var3.anInt8377];
      var3.aMethodArray8382 = new Method[-1140811347 * var3.anInt8377];
      var3.aByteArrayArrayArray8383 = new byte[-1140811347 * var3.anInt8377][][];

      for(int var4 = 0; var4 < -1140811347 * var3.anInt8377; ++var4) {
         try {
            int var5 = var0.readUnsignedByte(-700559597);
            String var6;
            String var7;
            int var8;
            if(var5 != 0 && var5 != 1 && var5 != 2) {
               if(3 == var5 || var5 == 4) {
                  var6 = var0.readString((byte)-84);
                  var7 = var0.readString((byte)39);
                  var8 = var0.readUnsignedByte(-700559597);
                  String[] var9 = new String[var8];

                  for(int var10 = 0; var10 < var8; ++var10) {
                     var9[var10] = var0.readString((byte)-9);
                  }

                  String var26 = var0.readString((byte)47);
                  byte[][] var11 = new byte[var8][];
                  int var13;
                  if(var5 == 3) {
                     for(int var12 = 0; var12 < var8; ++var12) {
                        var13 = var0.readInt_(1405357494);
                        var11[var12] = new byte[var13];
                        var0.method13737(var11[var12], 0, var13, 1385214721);
                     }
                  }

                  var3.anIntArray8380[var4] = var5;
                  Class[] var27 = new Class[var8];

                  for(var13 = 0; var13 < var8; ++var13) {
                     var27[var13] = Class515_Sub1_Sub3_Sub1.method16624(var9[var13], 392343777);
                  }

                  Class var28 = Class515_Sub1_Sub3_Sub1.method16624(var26, 757972746);
                  if(Class515_Sub1_Sub3_Sub1.method16624(var6, 1790379206).getClassLoader() == null) {
                     throw new SecurityException();
                  }

                  Method[] var14 = Class515_Sub1_Sub3_Sub1.method16624(var6, 611781804).getDeclaredMethods();
                  Method[] var15 = var14;

                  for(int var16 = 0; var16 < var15.length; ++var16) {
                     Method var17 = var15[var16];
                     if(var17.getName().equals(var7)) {
                        Class[] var18 = var17.getParameterTypes();
                        if(var18.length == var27.length) {
                           boolean var19 = true;

                           for(int var20 = 0; var20 < var27.length; ++var20) {
                              if(var18[var20] != var27[var20]) {
                                 var19 = false;
                                 break;
                              }
                           }

                           if(var19 && var28 == var17.getReturnType()) {
                              var3.aMethodArray8382[var4] = var17;
                           }
                        }
                     }
                  }

                  var3.aByteArrayArrayArray8383[var4] = var11;
               }
            } else {
               var6 = var0.readString((byte)-35);
               var7 = var0.readString((byte)-82);
               var8 = 0;
               if(var5 == 1) {
                  var8 = var0.readInt_(311695117);
               }

               var3.anIntArray8380[var4] = var5;
               var3.anIntArray8381[var4] = var8;
               if(Class515_Sub1_Sub3_Sub1.method16624(var6, 947329588).getClassLoader() == null) {
                  throw new SecurityException();
               }

               var3.aFieldArray8376[var4] = Class515_Sub1_Sub3_Sub1.method16624(var6, 798648668).getDeclaredField(var7);
            }
         } catch (ClassNotFoundException var21) {
            var3.anIntArray8379[var4] = -1;
         } catch (SecurityException var22) {
            var3.anIntArray8379[var4] = -2;
         } catch (NullPointerException var23) {
            var3.anIntArray8379[var4] = -3;
         } catch (Exception var24) {
            var3.anIntArray8379[var4] = -4;
         } catch (Throwable var25) {
            var3.anIntArray8379[var4] = -5;
         }
      }

      Class427.aClass456_5372.method7712(var3, (byte)47);
   }

   static final void method1233(Class508 var0, short var1) throws Exception_Sub4 {
      Class336.aClass35_Sub1_4206.method1007((float)var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807] / 1000.0F, -309295677);
   }
}
