import java.util.AbstractQueue;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class AbstractQueue_Sub1 extends AbstractQueue {

   Comparator aComparator10382;
   Map aMap10383;
   int anInt10384;
   Class299[] aClass299Array10385;
   int anInt10386;


   void method15970(int var1, byte var2) {
      Class299 var3;
      int var4;
      for(var3 = this.aClass299Array10385[var1]; var1 > 0; var1 = var4) {
         var4 = var1 - 1 >>> 1;
         Class299 var5 = this.aClass299Array10385[var4];
         if(this.aComparator10382 != null) {
            if(this.aComparator10382.compare(var3.anObject3666, var5.anObject3666) >= 0) {
               break;
            }
         } else if(((Comparable)var3.anObject3666).compareTo(var5.anObject3666) >= 0) {
            break;
         }

         this.aClass299Array10385[var1] = var5;
         this.aClass299Array10385[var1].anInt3667 = var1 * -346545141;
      }

      this.aClass299Array10385[var1] = var3;
      this.aClass299Array10385[var1].anInt3667 = var1 * -346545141;
   }

   AbstractQueue_Sub1(int var1, Comparator var2) {
      this.anInt10386 = 0;
      this.aClass299Array10385 = new Class299[var1];
      this.aMap10383 = new HashMap();
      this.aComparator10382 = var2;
   }

   void method15971(int var1) {
      int var2 = 1 + (this.aClass299Array10385.length << 1);
      this.aClass299Array10385 = (Class299[])((Class299[])Arrays.copyOf(this.aClass299Array10385, var2));
   }

   public int size() {
      return this.anInt10384 * -1609981437;
   }

   public boolean method15972(Object var1) {
      Class299 var2 = (Class299)this.aMap10383.remove(var1);
      if(null == var2) {
         return false;
      } else {
         this.anInt10386 += 30772199;
         this.anInt10384 -= 1920309419;
         if(this.anInt10384 * -1609981437 == var2.anInt3667 * -639219805) {
            this.aClass299Array10385[this.anInt10384 * -1609981437] = null;
            return true;
         } else {
            Class299 var3 = this.aClass299Array10385[this.anInt10384 * -1609981437];
            this.aClass299Array10385[-1609981437 * this.anInt10384] = null;
            this.aClass299Array10385[var2.anInt3667 * -639219805] = var3;
            this.aClass299Array10385[-639219805 * var2.anInt3667].anInt3667 = 1 * var2.anInt3667;
            this.method15995(-639219805 * var2.anInt3667, -45836637);
            if(this.aClass299Array10385[-639219805 * var2.anInt3667] == var3) {
               this.method15970(-639219805 * var2.anInt3667, (byte)-56);
            }

            return true;
         }
      }
   }

   public AbstractQueue_Sub1(int var1) {
      this(var1, (Comparator)null);
   }

   public boolean method15973(Object var1) {
      Class299 var2 = (Class299)this.aMap10383.remove(var1);
      if(null == var2) {
         return false;
      } else {
         this.anInt10386 += 30772199;
         this.anInt10384 -= 1920309419;
         if(this.anInt10384 * -1609981437 == var2.anInt3667 * -639219805) {
            this.aClass299Array10385[this.anInt10384 * -1609981437] = null;
            return true;
         } else {
            Class299 var3 = this.aClass299Array10385[this.anInt10384 * -1609981437];
            this.aClass299Array10385[-1609981437 * this.anInt10384] = null;
            this.aClass299Array10385[var2.anInt3667 * -639219805] = var3;
            this.aClass299Array10385[-639219805 * var2.anInt3667].anInt3667 = 1 * var2.anInt3667;
            this.method15995(-639219805 * var2.anInt3667, -1504855211);
            if(this.aClass299Array10385[-639219805 * var2.anInt3667] == var3) {
               this.method15970(-639219805 * var2.anInt3667, (byte)-30);
            }

            return true;
         }
      }
   }

   public boolean remove(Object var1) {
      Class299 var2 = (Class299)this.aMap10383.remove(var1);
      if(null == var2) {
         return false;
      } else {
         this.anInt10386 += 30772199;
         this.anInt10384 -= 1920309419;
         if(this.anInt10384 * -1609981437 == var2.anInt3667 * -639219805) {
            this.aClass299Array10385[this.anInt10384 * -1609981437] = null;
            return true;
         } else {
            Class299 var3 = this.aClass299Array10385[this.anInt10384 * -1609981437];
            this.aClass299Array10385[-1609981437 * this.anInt10384] = null;
            this.aClass299Array10385[var2.anInt3667 * -639219805] = var3;
            this.aClass299Array10385[-639219805 * var2.anInt3667].anInt3667 = 1 * var2.anInt3667;
            this.method15995(-639219805 * var2.anInt3667, -1230309101);
            if(this.aClass299Array10385[-639219805 * var2.anInt3667] == var3) {
               this.method15970(-639219805 * var2.anInt3667, (byte)-43);
            }

            return true;
         }
      }
   }

   public boolean method15974(Object var1) {
      if(this.aMap10383.containsKey(var1)) {
         throw new IllegalArgumentException("");
      } else {
         this.anInt10386 += 30772199;
         int var2 = this.anInt10384 * -1609981437;
         if(var2 >= this.aClass299Array10385.length) {
            this.method15971(-1509241710);
         }

         this.anInt10384 += 1920309419;
         if(0 == var2) {
            this.aClass299Array10385[0] = new Class299(var1, 0);
            this.aMap10383.put(var1, this.aClass299Array10385[0]);
         } else {
            this.aClass299Array10385[var2] = new Class299(var1, var2);
            this.aMap10383.put(var1, this.aClass299Array10385[var2]);
            this.method15970(var2, (byte)-75);
         }

         return true;
      }
   }

   public Iterator method15975() {
      return new Class305(this);
   }

   public boolean contains(Object var1) {
      return this.aMap10383.containsKey(var1);
   }

   public Object[] toArray() {
      Object[] var1 = super.toArray();
      if(null != this.aComparator10382) {
         Arrays.sort(var1, this.aComparator10382);
      } else {
         Arrays.sort(var1);
      }

      return var1;
   }

   public Iterator iterator() {
      return new Class305(this);
   }

   void method15976() {
      int var1 = 1 + (this.aClass299Array10385.length << 1);
      this.aClass299Array10385 = (Class299[])((Class299[])Arrays.copyOf(this.aClass299Array10385, var1));
   }

   void method15977(int var1) {
      Class299 var2;
      int var3;
      for(var2 = this.aClass299Array10385[var1]; var1 > 0; var1 = var3) {
         var3 = var1 - 1 >>> 1;
         Class299 var4 = this.aClass299Array10385[var3];
         if(this.aComparator10382 != null) {
            if(this.aComparator10382.compare(var2.anObject3666, var4.anObject3666) >= 0) {
               break;
            }
         } else if(((Comparable)var2.anObject3666).compareTo(var4.anObject3666) >= 0) {
            break;
         }

         this.aClass299Array10385[var1] = var4;
         this.aClass299Array10385[var1].anInt3667 = var1 * -346545141;
      }

      this.aClass299Array10385[var1] = var2;
      this.aClass299Array10385[var1].anInt3667 = var1 * -346545141;
   }

   void method15978() {
      int var1 = 1 + (this.aClass299Array10385.length << 1);
      this.aClass299Array10385 = (Class299[])((Class299[])Arrays.copyOf(this.aClass299Array10385, var1));
   }

   public boolean method15979(Object var1) {
      return this.aMap10383.containsKey(var1);
   }

   public boolean method15980(Object var1) {
      if(this.aMap10383.containsKey(var1)) {
         throw new IllegalArgumentException("");
      } else {
         this.anInt10386 += 30772199;
         int var2 = this.anInt10384 * -1609981437;
         if(var2 >= this.aClass299Array10385.length) {
            this.method15971(-131999196);
         }

         this.anInt10384 += 1920309419;
         if(0 == var2) {
            this.aClass299Array10385[0] = new Class299(var1, 0);
            this.aMap10383.put(var1, this.aClass299Array10385[0]);
         } else {
            this.aClass299Array10385[var2] = new Class299(var1, var2);
            this.aMap10383.put(var1, this.aClass299Array10385[var2]);
            this.method15970(var2, (byte)-77);
         }

         return true;
      }
   }

   public int method15981() {
      return this.anInt10384 * -1609981437;
   }

   public Object method15982() {
      return 0 == -1609981437 * this.anInt10384?null:this.aClass299Array10385[0].anObject3666;
   }

   public Object method15983() {
      return 0 == -1609981437 * this.anInt10384?null:this.aClass299Array10385[0].anObject3666;
   }

   public Object method15984() {
      return 0 == -1609981437 * this.anInt10384?null:this.aClass299Array10385[0].anObject3666;
   }

   public Object method15985() {
      if(-1609981437 * this.anInt10384 == 0) {
         return null;
      } else {
         this.anInt10386 += 30772199;
         Object var1 = this.aClass299Array10385[0].anObject3666;
         this.aMap10383.remove(var1);
         this.anInt10384 -= 1920309419;
         if(this.anInt10384 * -1609981437 == 0) {
            this.aClass299Array10385[-1609981437 * this.anInt10384] = null;
         } else {
            this.aClass299Array10385[0] = this.aClass299Array10385[-1609981437 * this.anInt10384];
            this.aClass299Array10385[0].anInt3667 = 0;
            this.aClass299Array10385[-1609981437 * this.anInt10384] = null;
            this.method15995(0, 2061326115);
         }

         return var1;
      }
   }

   public Object method15986() {
      if(-1609981437 * this.anInt10384 == 0) {
         return null;
      } else {
         this.anInt10386 += 30772199;
         Object var1 = this.aClass299Array10385[0].anObject3666;
         this.aMap10383.remove(var1);
         this.anInt10384 -= 1920309419;
         if(this.anInt10384 * -1609981437 == 0) {
            this.aClass299Array10385[-1609981437 * this.anInt10384] = null;
         } else {
            this.aClass299Array10385[0] = this.aClass299Array10385[-1609981437 * this.anInt10384];
            this.aClass299Array10385[0].anInt3667 = 0;
            this.aClass299Array10385[-1609981437 * this.anInt10384] = null;
            this.method15995(0, 1345052092);
         }

         return var1;
      }
   }

   public Object peek() {
      return 0 == -1609981437 * this.anInt10384?null:this.aClass299Array10385[0].anObject3666;
   }

   public boolean method15987(Object var1) {
      Class299 var2 = (Class299)this.aMap10383.remove(var1);
      if(null == var2) {
         return false;
      } else {
         this.anInt10386 += 30772199;
         this.anInt10384 -= 1920309419;
         if(this.anInt10384 * -1609981437 == var2.anInt3667 * -639219805) {
            this.aClass299Array10385[this.anInt10384 * -1609981437] = null;
            return true;
         } else {
            Class299 var3 = this.aClass299Array10385[this.anInt10384 * -1609981437];
            this.aClass299Array10385[-1609981437 * this.anInt10384] = null;
            this.aClass299Array10385[var2.anInt3667 * -639219805] = var3;
            this.aClass299Array10385[-639219805 * var2.anInt3667].anInt3667 = 1 * var2.anInt3667;
            this.method15995(-639219805 * var2.anInt3667, 2091999216);
            if(this.aClass299Array10385[-639219805 * var2.anInt3667] == var3) {
               this.method15970(-639219805 * var2.anInt3667, (byte)-31);
            }

            return true;
         }
      }
   }

   void method15988(int var1) {
      Class299 var2 = this.aClass299Array10385[var1];

      int var8;
      for(int var3 = -1609981437 * this.anInt10384 >>> 1; var1 < var3; var1 = var8) {
         int var4 = (var1 << 1) + 1;
         Class299 var5 = this.aClass299Array10385[var4];
         int var6 = (var1 << 1) + 2;
         Class299 var7 = this.aClass299Array10385[var6];
         if(null != this.aComparator10382) {
            if(var6 < -1609981437 * this.anInt10384 && this.aComparator10382.compare(var5.anObject3666, var7.anObject3666) > 0) {
               var8 = var6;
            } else {
               var8 = var4;
            }
         } else if(var6 < -1609981437 * this.anInt10384 && ((Comparable)var5.anObject3666).compareTo(var7.anObject3666) > 0) {
            var8 = var6;
         } else {
            var8 = var4;
         }

         if(this.aComparator10382 != null) {
            if(this.aComparator10382.compare(var2.anObject3666, this.aClass299Array10385[var8].anObject3666) <= 0) {
               break;
            }
         } else if(((Comparable)var2.anObject3666).compareTo(this.aClass299Array10385[var8].anObject3666) <= 0) {
            break;
         }

         this.aClass299Array10385[var1] = this.aClass299Array10385[var8];
         this.aClass299Array10385[var1].anInt3667 = -346545141 * var1;
      }

      this.aClass299Array10385[var1] = var2;
      this.aClass299Array10385[var1].anInt3667 = var1 * -346545141;
   }

   public boolean method15989(Object var1) {
      Class299 var2 = (Class299)this.aMap10383.remove(var1);
      if(null == var2) {
         return false;
      } else {
         this.anInt10386 += 30772199;
         this.anInt10384 -= 1920309419;
         if(this.anInt10384 * -1609981437 == var2.anInt3667 * -639219805) {
            this.aClass299Array10385[this.anInt10384 * -1609981437] = null;
            return true;
         } else {
            Class299 var3 = this.aClass299Array10385[this.anInt10384 * -1609981437];
            this.aClass299Array10385[-1609981437 * this.anInt10384] = null;
            this.aClass299Array10385[var2.anInt3667 * -639219805] = var3;
            this.aClass299Array10385[-639219805 * var2.anInt3667].anInt3667 = 1 * var2.anInt3667;
            this.method15995(-639219805 * var2.anInt3667, -302629184);
            if(this.aClass299Array10385[-639219805 * var2.anInt3667] == var3) {
               this.method15970(-639219805 * var2.anInt3667, (byte)-84);
            }

            return true;
         }
      }
   }

   void method15990() {
      int var1 = 1 + (this.aClass299Array10385.length << 1);
      this.aClass299Array10385 = (Class299[])((Class299[])Arrays.copyOf(this.aClass299Array10385, var1));
   }

   void method15991(int var1) {
      Class299 var2;
      int var3;
      for(var2 = this.aClass299Array10385[var1]; var1 > 0; var1 = var3) {
         var3 = var1 - 1 >>> 1;
         Class299 var4 = this.aClass299Array10385[var3];
         if(this.aComparator10382 != null) {
            if(this.aComparator10382.compare(var2.anObject3666, var4.anObject3666) >= 0) {
               break;
            }
         } else if(((Comparable)var2.anObject3666).compareTo(var4.anObject3666) >= 0) {
            break;
         }

         this.aClass299Array10385[var1] = var4;
         this.aClass299Array10385[var1].anInt3667 = var1 * -346545141;
      }

      this.aClass299Array10385[var1] = var2;
      this.aClass299Array10385[var1].anInt3667 = var1 * -346545141;
   }

   void method15992(int var1) {
      Class299 var2 = this.aClass299Array10385[var1];

      int var8;
      for(int var3 = -1609981437 * this.anInt10384 >>> 1; var1 < var3; var1 = var8) {
         int var4 = (var1 << 1) + 1;
         Class299 var5 = this.aClass299Array10385[var4];
         int var6 = (var1 << 1) + 2;
         Class299 var7 = this.aClass299Array10385[var6];
         if(null != this.aComparator10382) {
            if(var6 < -1609981437 * this.anInt10384 && this.aComparator10382.compare(var5.anObject3666, var7.anObject3666) > 0) {
               var8 = var6;
            } else {
               var8 = var4;
            }
         } else if(var6 < -1609981437 * this.anInt10384 && ((Comparable)var5.anObject3666).compareTo(var7.anObject3666) > 0) {
            var8 = var6;
         } else {
            var8 = var4;
         }

         if(this.aComparator10382 != null) {
            if(this.aComparator10382.compare(var2.anObject3666, this.aClass299Array10385[var8].anObject3666) <= 0) {
               break;
            }
         } else if(((Comparable)var2.anObject3666).compareTo(this.aClass299Array10385[var8].anObject3666) <= 0) {
            break;
         }

         this.aClass299Array10385[var1] = this.aClass299Array10385[var8];
         this.aClass299Array10385[var1].anInt3667 = -346545141 * var1;
      }

      this.aClass299Array10385[var1] = var2;
      this.aClass299Array10385[var1].anInt3667 = var1 * -346545141;
   }

   void method15993(int var1) {
      Class299 var2 = this.aClass299Array10385[var1];

      int var8;
      for(int var3 = -1609981437 * this.anInt10384 >>> 1; var1 < var3; var1 = var8) {
         int var4 = (var1 << 1) + 1;
         Class299 var5 = this.aClass299Array10385[var4];
         int var6 = (var1 << 1) + 2;
         Class299 var7 = this.aClass299Array10385[var6];
         if(null != this.aComparator10382) {
            if(var6 < -1609981437 * this.anInt10384 && this.aComparator10382.compare(var5.anObject3666, var7.anObject3666) > 0) {
               var8 = var6;
            } else {
               var8 = var4;
            }
         } else if(var6 < -1609981437 * this.anInt10384 && ((Comparable)var5.anObject3666).compareTo(var7.anObject3666) > 0) {
            var8 = var6;
         } else {
            var8 = var4;
         }

         if(this.aComparator10382 != null) {
            if(this.aComparator10382.compare(var2.anObject3666, this.aClass299Array10385[var8].anObject3666) <= 0) {
               break;
            }
         } else if(((Comparable)var2.anObject3666).compareTo(this.aClass299Array10385[var8].anObject3666) <= 0) {
            break;
         }

         this.aClass299Array10385[var1] = this.aClass299Array10385[var8];
         this.aClass299Array10385[var1].anInt3667 = -346545141 * var1;
      }

      this.aClass299Array10385[var1] = var2;
      this.aClass299Array10385[var1].anInt3667 = var1 * -346545141;
   }

   public boolean method15994(Object var1) {
      return this.aMap10383.containsKey(var1);
   }

   void method15995(int var1, int var2) {
      Class299 var3 = this.aClass299Array10385[var1];

      int var9;
      for(int var4 = -1609981437 * this.anInt10384 >>> 1; var1 < var4; var1 = var9) {
         int var5 = (var1 << 1) + 1;
         Class299 var6 = this.aClass299Array10385[var5];
         int var7 = (var1 << 1) + 2;
         Class299 var8 = this.aClass299Array10385[var7];
         if(null != this.aComparator10382) {
            if(var7 < -1609981437 * this.anInt10384 && this.aComparator10382.compare(var6.anObject3666, var8.anObject3666) > 0) {
               var9 = var7;
            } else {
               var9 = var5;
            }
         } else if(var7 < -1609981437 * this.anInt10384 && ((Comparable)var6.anObject3666).compareTo(var8.anObject3666) > 0) {
            var9 = var7;
         } else {
            var9 = var5;
         }

         if(this.aComparator10382 != null) {
            if(this.aComparator10382.compare(var3.anObject3666, this.aClass299Array10385[var9].anObject3666) <= 0) {
               break;
            }
         } else if(((Comparable)var3.anObject3666).compareTo(this.aClass299Array10385[var9].anObject3666) <= 0) {
            break;
         }

         this.aClass299Array10385[var1] = this.aClass299Array10385[var9];
         this.aClass299Array10385[var1].anInt3667 = -346545141 * var1;
      }

      this.aClass299Array10385[var1] = var3;
      this.aClass299Array10385[var1].anInt3667 = var1 * -346545141;
   }

   public Object poll() {
      if(-1609981437 * this.anInt10384 == 0) {
         return null;
      } else {
         this.anInt10386 += 30772199;
         Object var1 = this.aClass299Array10385[0].anObject3666;
         this.aMap10383.remove(var1);
         this.anInt10384 -= 1920309419;
         if(this.anInt10384 * -1609981437 == 0) {
            this.aClass299Array10385[-1609981437 * this.anInt10384] = null;
         } else {
            this.aClass299Array10385[0] = this.aClass299Array10385[-1609981437 * this.anInt10384];
            this.aClass299Array10385[0].anInt3667 = 0;
            this.aClass299Array10385[-1609981437 * this.anInt10384] = null;
            this.method15995(0, -930102496);
         }

         return var1;
      }
   }

   public boolean method15996(Object var1) {
      return this.aMap10383.containsKey(var1);
   }

   public boolean method15997(Object var1) {
      return this.aMap10383.containsKey(var1);
   }

   public boolean offer(Object var1) {
      if(this.aMap10383.containsKey(var1)) {
         throw new IllegalArgumentException("");
      } else {
         this.anInt10386 += 30772199;
         int var2 = this.anInt10384 * -1609981437;
         if(var2 >= this.aClass299Array10385.length) {
            this.method15971(-144477092);
         }

         this.anInt10384 += 1920309419;
         if(0 == var2) {
            this.aClass299Array10385[0] = new Class299(var1, 0);
            this.aMap10383.put(var1, this.aClass299Array10385[0]);
         } else {
            this.aClass299Array10385[var2] = new Class299(var1, var2);
            this.aMap10383.put(var1, this.aClass299Array10385[var2]);
            this.method15970(var2, (byte)-109);
         }

         return true;
      }
   }

   public boolean method15998(Object var1) {
      return this.aMap10383.containsKey(var1);
   }

   public Object[] method15999() {
      Object[] var1 = super.toArray();
      if(null != this.aComparator10382) {
         Arrays.sort(var1, this.aComparator10382);
      } else {
         Arrays.sort(var1);
      }

      return var1;
   }

   void method16000(int var1) {
      Class299 var2 = this.aClass299Array10385[var1];

      int var8;
      for(int var3 = -1609981437 * this.anInt10384 >>> 1; var1 < var3; var1 = var8) {
         int var4 = (var1 << 1) + 1;
         Class299 var5 = this.aClass299Array10385[var4];
         int var6 = (var1 << 1) + 2;
         Class299 var7 = this.aClass299Array10385[var6];
         if(null != this.aComparator10382) {
            if(var6 < -1609981437 * this.anInt10384 && this.aComparator10382.compare(var5.anObject3666, var7.anObject3666) > 0) {
               var8 = var6;
            } else {
               var8 = var4;
            }
         } else if(var6 < -1609981437 * this.anInt10384 && ((Comparable)var5.anObject3666).compareTo(var7.anObject3666) > 0) {
            var8 = var6;
         } else {
            var8 = var4;
         }

         if(this.aComparator10382 != null) {
            if(this.aComparator10382.compare(var2.anObject3666, this.aClass299Array10385[var8].anObject3666) <= 0) {
               break;
            }
         } else if(((Comparable)var2.anObject3666).compareTo(this.aClass299Array10385[var8].anObject3666) <= 0) {
            break;
         }

         this.aClass299Array10385[var1] = this.aClass299Array10385[var8];
         this.aClass299Array10385[var1].anInt3667 = -346545141 * var1;
      }

      this.aClass299Array10385[var1] = var2;
      this.aClass299Array10385[var1].anInt3667 = var1 * -346545141;
   }

   public Iterator method16001() {
      return new Class305(this);
   }

   public boolean method16002(Object var1) {
      if(this.aMap10383.containsKey(var1)) {
         throw new IllegalArgumentException("");
      } else {
         this.anInt10386 += 30772199;
         int var2 = this.anInt10384 * -1609981437;
         if(var2 >= this.aClass299Array10385.length) {
            this.method15971(-1810199101);
         }

         this.anInt10384 += 1920309419;
         if(0 == var2) {
            this.aClass299Array10385[0] = new Class299(var1, 0);
            this.aMap10383.put(var1, this.aClass299Array10385[0]);
         } else {
            this.aClass299Array10385[var2] = new Class299(var1, var2);
            this.aMap10383.put(var1, this.aClass299Array10385[var2]);
            this.method15970(var2, (byte)-41);
         }

         return true;
      }
   }

   public int method16003() {
      return this.anInt10384 * -1609981437;
   }

   public Iterator method16004() {
      return new Class305(this);
   }

   public int method16005() {
      return this.anInt10384 * -1609981437;
   }

   public int method16006() {
      return this.anInt10384 * -1609981437;
   }
}
