import java.util.LinkedList;
import java.util.Queue;

public class Class510_Sub1 extends Class510 {

   Queue aQueue8460 = new LinkedList();


   void method13490(Class225_Sub8_Sub2 var1, int var2) {
      this.aQueue8460.add(var1);
      if(this.aQueue8460.size() > 10) {
         this.aQueue8460.poll();
      }

   }

   void method10832(int var1) {
      Class225_Sub8_Sub2 var2 = (Class225_Sub8_Sub2)this.aQueue8460.poll();
      if(null == var2) {
         if(var1 <= 187264773) {
            ;
         }

      } else {
         Class225_Sub15 var3 = Class543.method11415(OutgoingOpcode.aClass302_3847, client.aClass180_7704.aClass433_2184, (byte)1);
         var3.buffer.writeInt(var2.method13534(-937710807) | var2.method13541((byte)0) << 16, -823771229);
         var3.buffer.method13743(var2.method16106(1972778740) << 1 | var2.method16118(75863339) & 1, -1780118741);
         var3.buffer.writeShort(this.method10814(var2, '\uffff', -2117456575), -281382390);
         client.aClass180_7704.method3191(var3, (byte)-82);
         var2.method13538(-756118877);
      }
   }

   boolean method10823() {
      return !this.aQueue8460.isEmpty() || this.aLong6037 * 7516942996440248755L < Class339.method6240(18424446) - 2000L;
   }

   Class225_Sub15 method10819(int var1) {
      return Class543.method11415(OutgoingOpcode.aClass302_3758, client.aClass180_7704.aClass433_2184, (byte)1);
   }

   void method13491(RS2Buffer var1, Class225_Sub8_Sub2 var2) {
      var1.writeByte(var2.method16118(-1488178085), -765864773);
   }

   void method10828(RS2Buffer var1, Class225_Sub8 var2) {
      this.method13494(var1, (Class225_Sub8_Sub2)var2, -212389817);
   }

   void method10826(RS2Buffer var1, Class225_Sub8 var2, int var3) {
      this.method13494(var1, (Class225_Sub8_Sub2)var2, 1837493646);
   }

   void method13492(Class225_Sub8_Sub2 var1) {
      this.aQueue8460.add(var1);
      if(this.aQueue8460.size() > 10) {
         this.aQueue8460.poll();
      }

   }

   boolean method10818(int var1) {
      return !this.aQueue8460.isEmpty() || this.aLong6037 * 7516942996440248755L < Class339.method6240(1396315790) - 2000L;
   }

   void method10821() {
      Class225_Sub8_Sub2 var1 = (Class225_Sub8_Sub2)this.aQueue8460.poll();
      if(null != var1) {
         Class225_Sub15 var2 = Class543.method11415(OutgoingOpcode.aClass302_3847, client.aClass180_7704.aClass433_2184, (byte)1);
         var2.buffer.writeInt(var1.method13534(-937710807) | var1.method13541((byte)0) << 16, -504091624);
         var2.buffer.method13743(var1.method16106(13179138) << 1 | var1.method16118(656896289) & 1, -1481751884);
         var2.buffer.writeShort(this.method10814(var1, '\uffff', -1745182628), -754365207);
         client.aClass180_7704.method3191(var2, (byte)22);
         var1.method13538(-468009695);
      }
   }

   boolean method10831() {
      return !this.aQueue8460.isEmpty() || this.aLong6037 * 7516942996440248755L < Class339.method6240(-1043382220) - 2000L;
   }

   int method10815(int var1) {
      return 1;
   }

   Class225_Sub15 method10824() {
      return Class543.method11415(OutgoingOpcode.aClass302_3758, client.aClass180_7704.aClass433_2184, (byte)1);
   }

   void method13493(RS2Buffer var1, Class225_Sub8_Sub2 var2) {
      var1.writeByte(var2.method16118(391051872), -765864773);
   }

   void method10820() {
      Class225_Sub8_Sub2 var1 = (Class225_Sub8_Sub2)this.aQueue8460.poll();
      if(null != var1) {
         Class225_Sub15 var2 = Class543.method11415(OutgoingOpcode.aClass302_3847, client.aClass180_7704.aClass433_2184, (byte)1);
         var2.buffer.writeInt(var1.method13534(-937710807) | var1.method13541((byte)0) << 16, -981219524);
         var2.buffer.method13743(var1.method16106(1103075572) << 1 | var1.method16118(330228685) & 1, -967317101);
         var2.buffer.writeShort(this.method10814(var1, '\uffff', -1964310223), -786777211);
         client.aClass180_7704.method3191(var2, (byte)107);
         var1.method13538(-1772343597);
      }
   }

   int method10825() {
      return 1;
   }

   int method10812() {
      return 1;
   }

   int method10816() {
      return 1;
   }

   void method10827(RS2Buffer var1, Class225_Sub8 var2) {
      this.method13494(var1, (Class225_Sub8_Sub2)var2, 228045617);
   }

   void method13494(RS2Buffer var1, Class225_Sub8_Sub2 var2, int var3) {
      var1.writeByte(var2.method16118(1250558903), -765864773);
   }

   void method10829(RS2Buffer var1, Class225_Sub8 var2) {
      this.method13494(var1, (Class225_Sub8_Sub2)var2, 1704081956);
   }

   static final void method13495(Class124 var0, Class121 var1, Class508 var2, byte var3) {
      String var4 = (String)var2.anObjectArray6004[(var2.anInt6005 -= -46848683) * 639741949];
      if(Class245.method4382(var4, var2, (byte)67) != null) {
         if(var3 >= 3) {
            ;
         }

         var4 = var4.substring(0, var4.length() - 1);
      }

      var0.anObjectArray1501 = Class193.method3350(var4, var2, 669799845);
      var0.aBool1520 = true;
   }
}
