import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

public class Class450 {

   String aString5634 = "null";
   public char aChar5635;
   int anInt5636 = 0;
   int anInt5637;
   Map aMap5638;
   Object[] anObjectArray5639;
   public char aChar5640;
   HashMap aHashMap5641;
   public static Class448 aClass448_5642;


   Object method7522(int var1) {
      return null != this.anObjectArray5639?(var1 >= 0 && var1 < this.anObjectArray5639.length?this.anObjectArray5639[var1]:null):(null != this.aMap5638?this.aMap5638.get(new Integer(var1)):null);
   }

   void method7523(RS2Buffer var1, int var2) {
      while(true) {
         int var3 = var1.readUnsignedByte(-700559597);
         if(0 == var3) {
            return;
         }

         this.method7524(var1, var3, (short)-8587);
      }
   }

   void method7524(RS2Buffer var1, int var2, short var3) {
      if(var2 == 1) {
         this.aChar5640 = Class225_Sub14_Sub17.method16331(var1.readByte(-926253475), 247053235);
      } else if(2 == var2) {
         this.aChar5635 = Class225_Sub14_Sub17.method16331(var1.readByte(1566395818), 223374380);
      } else if(var2 == 3) {
         this.aString5634 = var1.readString((byte)-10);
      } else if(4 == var2) {
         this.anInt5637 = var1.readInt_(-705872778) * -383206121;
      } else {
         int var4;
         int var5;
         if(var2 != 5 && 6 != var2) {
            if(var2 == 7 || 8 == var2) {
               var4 = var1.readUnsignedShort(-937710807);
               this.anInt5636 = var1.readUnsignedShort(-937710807) * -160910827;
               this.anObjectArray5639 = new Object[var4];

               for(var5 = 0; var5 < this.anInt5636 * 2031652157; ++var5) {
                  int var7 = var1.readUnsignedShort(-937710807);
                  if(7 == var2) {
                     this.anObjectArray5639[var7] = var1.readString((byte)57);
                  } else {
                     this.anObjectArray5639[var7] = new Integer(var1.readInt_(115028337));
                  }
               }
            }
         } else {
            this.anInt5636 = var1.readUnsignedShort(-937710807) * -160910827;
            this.aMap5638 = new HashMap(2031652157 * this.anInt5636);

            for(var4 = 0; var4 < 2031652157 * this.anInt5636; ++var4) {
               var5 = var1.readInt_(575148744);
               Object var6;
               if(var2 == 5) {
                  var6 = var1.readString((byte)-55);
               } else {
                  var6 = new Integer(var1.readInt_(29887964));
               }

               this.aMap5638.put(new Integer(var5), var6);
            }
         }
      }

   }

   public int[] method7525(Object var1, byte var2) {
      if(0 == this.anInt5636 * 2031652157) {
         return null;
      } else {
         if(null == this.aHashMap5641) {
            this.method7544(265609635);
         }

         return (int[])((int[])this.aHashMap5641.get(var1));
      }
   }

   Object method7526(int var1, byte var2) {
      return null != this.anObjectArray5639?(var1 >= 0 && var1 < this.anObjectArray5639.length?this.anObjectArray5639[var1]:null):(null != this.aMap5638?this.aMap5638.get(new Integer(var1)):null);
   }

   public boolean method7527(Object var1, int var2) {
      if(2031652157 * this.anInt5636 == 0) {
         if(var2 != 755096508) {
            ;
         }

         return false;
      } else {
         if(null == this.aHashMap5641) {
            if(var2 != 755096508) {
               ;
            }

            this.method7544(160980413);
         }

         return this.aHashMap5641.containsKey(var1);
      }
   }

   public String method7528(int var1, int var2) {
      Object var3 = this.method7526(var1, (byte)-31);
      if(var3 == null) {
         if(var2 <= -995460044) {
            ;
         }

         return this.aString5634;
      } else {
         return (String)var3;
      }
   }

   public int method7529(int var1) {
      return this.anInt5636 * 2031652157;
   }

   public int method7530(int var1) {
      Object var2 = this.method7526(var1, (byte)-39);
      return var2 == null?1625049767 * this.anInt5637:((Integer)var2).intValue();
   }

   void method7531(RS2Buffer var1) {
      while(true) {
         int var2 = var1.readUnsignedByte(-700559597);
         if(0 == var2) {
            return;
         }

         this.method7524(var1, var2, (short)-4005);
      }
   }

   void method7532(RS2Buffer var1) {
      while(true) {
         int var2 = var1.readUnsignedByte(-700559597);
         if(0 == var2) {
            return;
         }

         this.method7524(var1, var2, (short)1465);
      }
   }

   void method7533(RS2Buffer var1) {
      while(true) {
         int var2 = var1.readUnsignedByte(-700559597);
         if(0 == var2) {
            return;
         }

         this.method7524(var1, var2, (short)212);
      }
   }

   public String method7534(int var1) {
      Object var2 = this.method7526(var1, (byte)-71);
      return var2 == null?this.aString5634:(String)var2;
   }

   void method7535(RS2Buffer var1, int var2) {
      if(var2 == 1) {
         this.aChar5640 = Class225_Sub14_Sub17.method16331(var1.readByte(-724188292), 2075787242);
      } else if(2 == var2) {
         this.aChar5635 = Class225_Sub14_Sub17.method16331(var1.readByte(-540161186), 1417382671);
      } else if(var2 == 3) {
         this.aString5634 = var1.readString((byte)8);
      } else if(4 == var2) {
         this.anInt5637 = var1.readInt_(929707896) * -383206121;
      } else {
         int var3;
         int var4;
         if(var2 != 5 && 6 != var2) {
            if(var2 == 7 || 8 == var2) {
               var3 = var1.readUnsignedShort(-937710807);
               this.anInt5636 = var1.readUnsignedShort(-937710807) * -160910827;
               this.anObjectArray5639 = new Object[var3];

               for(var4 = 0; var4 < this.anInt5636 * 2031652157; ++var4) {
                  int var6 = var1.readUnsignedShort(-937710807);
                  if(7 == var2) {
                     this.anObjectArray5639[var6] = var1.readString((byte)-36);
                  } else {
                     this.anObjectArray5639[var6] = new Integer(var1.readInt_(39138620));
                  }
               }
            }
         } else {
            this.anInt5636 = var1.readUnsignedShort(-937710807) * -160910827;
            this.aMap5638 = new HashMap(2031652157 * this.anInt5636);

            for(var3 = 0; var3 < 2031652157 * this.anInt5636; ++var3) {
               var4 = var1.readInt_(126887327);
               Object var5;
               if(var2 == 5) {
                  var5 = var1.readString((byte)-111);
               } else {
                  var5 = new Integer(var1.readInt_(-1742779042));
               }

               this.aMap5638.put(new Integer(var4), var5);
            }
         }
      }

   }

   void method7536(RS2Buffer var1, int var2) {
      if(var2 == 1) {
         this.aChar5640 = Class225_Sub14_Sub17.method16331(var1.readByte(157132173), -348709625);
      } else if(2 == var2) {
         this.aChar5635 = Class225_Sub14_Sub17.method16331(var1.readByte(230377657), 1922713651);
      } else if(var2 == 3) {
         this.aString5634 = var1.readString((byte)25);
      } else if(4 == var2) {
         this.anInt5637 = var1.readInt_(255559152) * -383206121;
      } else {
         int var3;
         int var4;
         if(var2 != 5 && 6 != var2) {
            if(var2 == 7 || 8 == var2) {
               var3 = var1.readUnsignedShort(-937710807);
               this.anInt5636 = var1.readUnsignedShort(-937710807) * -160910827;
               this.anObjectArray5639 = new Object[var3];

               for(var4 = 0; var4 < this.anInt5636 * 2031652157; ++var4) {
                  int var6 = var1.readUnsignedShort(-937710807);
                  if(7 == var2) {
                     this.anObjectArray5639[var6] = var1.readString((byte)12);
                  } else {
                     this.anObjectArray5639[var6] = new Integer(var1.readInt_(1645748153));
                  }
               }
            }
         } else {
            this.anInt5636 = var1.readUnsignedShort(-937710807) * -160910827;
            this.aMap5638 = new HashMap(2031652157 * this.anInt5636);

            for(var3 = 0; var3 < 2031652157 * this.anInt5636; ++var3) {
               var4 = var1.readInt_(-987435487);
               Object var5;
               if(var2 == 5) {
                  var5 = var1.readString((byte)70);
               } else {
                  var5 = new Integer(var1.readInt_(-906140938));
               }

               this.aMap5638.put(new Integer(var4), var5);
            }
         }
      }

   }

   void method7537(RS2Buffer var1) {
      while(true) {
         int var2 = var1.readUnsignedByte(-700559597);
         if(0 == var2) {
            return;
         }

         this.method7524(var1, var2, (short)-458);
      }
   }

   public int method7538(int var1) {
      Object var2 = this.method7526(var1, (byte)-24);
      return var2 == null?1625049767 * this.anInt5637:((Integer)var2).intValue();
   }

   public String method7539(int var1) {
      Object var2 = this.method7526(var1, (byte)-31);
      return var2 == null?this.aString5634:(String)var2;
   }

   public int method7540() {
      return this.anInt5636 * 2031652157;
   }

   public String method7541(int var1) {
      Object var2 = this.method7526(var1, (byte)-96);
      return var2 == null?this.aString5634:(String)var2;
   }

   public boolean method7542(Object var1) {
      if(2031652157 * this.anInt5636 == 0) {
         return false;
      } else {
         if(null == this.aHashMap5641) {
            this.method7544(381297467);
         }

         return this.aHashMap5641.containsKey(var1);
      }
   }

   public boolean method7543(Object var1) {
      if(2031652157 * this.anInt5636 == 0) {
         return false;
      } else {
         if(null == this.aHashMap5641) {
            this.method7544(-667007341);
         }

         return this.aHashMap5641.containsKey(var1);
      }
   }

   void method7544(int var1) {
      HashMap var2 = new HashMap();
      Object var5;
      Iterator var10;
      Entry var11;
      if(null != this.anObjectArray5639) {
         for(int var3 = 0; var3 < this.anObjectArray5639.length; ++var3) {
            if(null != this.anObjectArray5639[var3]) {
               Object var4 = this.anObjectArray5639[var3];
               var5 = (List)var2.get(var4);
               if(var5 == null) {
                  var5 = new LinkedList();
                  var2.put(var4, var5);
               }

               ((List)var5).add(new Integer(var3));
            }
         }
      } else {
         if(this.aMap5638 == null) {
            throw new IllegalStateException();
         }

         Object var6;
         for(var10 = this.aMap5638.entrySet().iterator(); var10.hasNext(); ((List)var6).add(var11.getKey())) {
            var11 = (Entry)var10.next();
            var5 = var11.getValue();
            var6 = (List)var2.get(var5);
            if(null == var6) {
               var6 = new LinkedList();
               var2.put(var5, var6);
            }
         }
      }

      this.aHashMap5641 = new HashMap();

      int[] var13;
      for(var10 = var2.entrySet().iterator(); var10.hasNext(); this.aHashMap5641.put(var11.getKey(), var13)) {
         var11 = (Entry)var10.next();
         List var12 = (List)var11.getValue();
         var13 = new int[var12.size()];
         int var7 = 0;

         Integer var9;
         for(Iterator var8 = var12.iterator(); var8.hasNext(); var13[var7++] = var9.intValue()) {
            var9 = (Integer)var8.next();
         }

         if(null == this.anObjectArray5639) {
            Arrays.sort(var13);
         }
      }

   }

   public int[] method7545(Object var1) {
      if(0 == this.anInt5636 * 2031652157) {
         return null;
      } else {
         if(null == this.aHashMap5641) {
            this.method7544(610839540);
         }

         return (int[])((int[])this.aHashMap5641.get(var1));
      }
   }

   public int[] method7546(Object var1) {
      if(0 == this.anInt5636 * 2031652157) {
         return null;
      } else {
         if(null == this.aHashMap5641) {
            this.method7544(-323241377);
         }

         return (int[])((int[])this.aHashMap5641.get(var1));
      }
   }

   public int[] method7547(Object var1) {
      if(0 == this.anInt5636 * 2031652157) {
         return null;
      } else {
         if(null == this.aHashMap5641) {
            this.method7544(-2107339612);
         }

         return (int[])((int[])this.aHashMap5641.get(var1));
      }
   }

   public int method7548() {
      return this.anInt5636 * 2031652157;
   }

   public int method7549(int var1, byte var2) {
      Object var3 = this.method7526(var1, (byte)-4);
      if(var3 == null) {
         if(var2 <= 4) {
            ;
         }

         return 1625049767 * this.anInt5637;
      } else {
         return ((Integer)var3).intValue();
      }
   }

   void method7550() {
      HashMap var1 = new HashMap();
      Object var4;
      Iterator var9;
      Entry var10;
      if(null != this.anObjectArray5639) {
         for(int var2 = 0; var2 < this.anObjectArray5639.length; ++var2) {
            if(null != this.anObjectArray5639[var2]) {
               Object var3 = this.anObjectArray5639[var2];
               var4 = (List)var1.get(var3);
               if(var4 == null) {
                  var4 = new LinkedList();
                  var1.put(var3, var4);
               }

               ((List)var4).add(new Integer(var2));
            }
         }
      } else {
         if(this.aMap5638 == null) {
            throw new IllegalStateException();
         }

         Object var5;
         for(var9 = this.aMap5638.entrySet().iterator(); var9.hasNext(); ((List)var5).add(var10.getKey())) {
            var10 = (Entry)var9.next();
            var4 = var10.getValue();
            var5 = (List)var1.get(var4);
            if(null == var5) {
               var5 = new LinkedList();
               var1.put(var4, var5);
            }
         }
      }

      this.aHashMap5641 = new HashMap();

      int[] var12;
      for(var9 = var1.entrySet().iterator(); var9.hasNext(); this.aHashMap5641.put(var10.getKey(), var12)) {
         var10 = (Entry)var9.next();
         List var11 = (List)var10.getValue();
         var12 = new int[var11.size()];
         int var6 = 0;

         Integer var8;
         for(Iterator var7 = var11.iterator(); var7.hasNext(); var12[var6++] = var8.intValue()) {
            var8 = (Integer)var7.next();
         }

         if(null == this.anObjectArray5639) {
            Arrays.sort(var12);
         }
      }

   }

   public static void method7551(String var0, String var1, int var2) {
      if(var0.length() <= 320) {
         if(Class107.method2168((byte)16)) {
            client.aClass180_7703.method3194(-720158338);
            Exception_Sub2.method15943(857253278);
            Class3.aString81 = var0;
            Class3.aString61 = var1;
            Class332.method6157(7, -1961647506);
         }
      }
   }

   static final void method7552(Class508 var0, int var1) {
      int var2 = var0.anIntArray6027[(var0.anInt6003 -= 98312473) * -937710807];
      Class483.method8120(var2, 226975039);
   }

   static void method7553(int var0, int var1, short var2) {
      Class225_Sub14_Sub2 var3 = Class49.method1193(6, (long)var0);
      var3.method15502((byte)-65);
      var3.anInt9990 = -1655449005 * var1;
   }
}
