package com.l7tech.server.transport.http;

import com.l7tech.util.ResourceUtils;
import java.util.HashSet;
import java.util.Set;

class n implements Runnable {
   private Set<m> a = new HashSet<>(100);
   private static final String[] b;

   private n() {
   }

   private void a(m var1, boolean var2) {
      if (!var2) {
         ResourceUtils.closeQuietly(var1.h);
      }

      var1.f();
   }

   @Override
   public void run() {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 000: getstatic com/l7tech/server/transport/http/TimeoutInputStream.a Ljava/util/logging/Logger;
      // 003: getstatic com/l7tech/server/transport/http/n.b [Ljava/lang/String;
      // 006: astore 10
      // 008: aload 10
      // 00a: bipush 0
      // 00b: aaload
      // 00c: invokevirtual java/util/logging/Logger.info (Ljava/lang/String;)V
      // 00f: bipush 0
      // 010: istore 1
      // 011: iload 1
      // 012: ifne 022
      // 015: ldc2_w 100
      // 018: invokestatic java/lang/Thread.sleep (J)V
      // 01b: goto 028
      // 01e: invokestatic com/l7tech/server/transport/http/n.a (Ljava/lang/InterruptedException;)Ljava/lang/InterruptedException;
      // 021: athrow
      // 022: ldc2_w 10
      // 025: invokestatic java/lang/Thread.sleep (J)V
      // 028: bipush 0
      // 029: istore 1
      // 02a: getstatic com/l7tech/server/transport/http/TimeoutInputStream.e Ljava/util/Queue;
      // 02d: invokeinterface java/util/Queue.poll ()Ljava/lang/Object; 1
      // 032: checkcast com/l7tech/server/transport/http/m
      // 035: dup
      // 036: astore 2
      // 037: ifnull 058
      // 03a: aload 2
      // 03b: invokevirtual com/l7tech/server/transport/http/m.e ()Z
      // 03e: ifne 02a
      // 041: goto 048
      // 044: invokestatic com/l7tech/server/transport/http/n.a (Ljava/lang/InterruptedException;)Ljava/lang/InterruptedException;
      // 047: athrow
      // 048: aload 0
      // 049: getfield com/l7tech/server/transport/http/n.a Ljava/util/Set;
      // 04c: aload 2
      // 04d: invokeinterface java/util/Set.add (Ljava/lang/Object;)Z 2
      // 052: pop
      // 053: bipush 1
      // 054: istore 1
      // 055: goto 02a
      // 058: invokestatic java/lang/System.currentTimeMillis ()J
      // 05b: lstore 3
      // 05c: aload 0
      // 05d: getfield com/l7tech/server/transport/http/n.a Ljava/util/Set;
      // 060: invokeinterface java/util/Set.iterator ()Ljava/util/Iterator; 1
      // 065: astore 5
      // 067: aload 5
      // 069: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 06e: ifeq 106
      // 071: aload 5
      // 073: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 078: checkcast com/l7tech/server/transport/http/m
      // 07b: astore 6
      // 07d: aload 6
      // 07f: invokevirtual com/l7tech/server/transport/http/m.e ()Z
      // 082: ifeq 093
      // 085: aload 5
      // 087: invokeinterface java/util/Iterator.remove ()V 1
      // 08c: goto 067
      // 08f: invokestatic com/l7tech/server/transport/http/n.a (Ljava/lang/InterruptedException;)Ljava/lang/InterruptedException;
      // 092: athrow
      // 093: aload 6
      // 095: lload 3
      // 096: invokevirtual com/l7tech/server/transport/http/m.b (J)Z
      // 099: ifeq 0bc
      // 09c: getstatic com/l7tech/server/transport/http/TimeoutInputStream.a Ljava/util/logging/Logger;
      // 09f: getstatic com/l7tech/server/transport/http/n.b [Ljava/lang/String;
      // 0a2: bipush 2
      // 0a3: aaload
      // 0a4: invokevirtual java/util/logging/Logger.fine (Ljava/lang/String;)V
      // 0a7: aload 0
      // 0a8: aload 6
      // 0aa: bipush 0
      // 0ab: invokevirtual com/l7tech/server/transport/http/n.a (Lcom/l7tech/server/transport/http/m;Z)V
      // 0ae: aload 5
      // 0b0: invokeinterface java/util/Iterator.remove ()V 1
      // 0b5: goto 067
      // 0b8: invokestatic com/l7tech/server/transport/http/n.a (Ljava/lang/InterruptedException;)Ljava/lang/InterruptedException;
      // 0bb: athrow
      // 0bc: bipush 1
      // 0bd: istore 1
      // 0be: bipush 2
      // 0bf: newarray 4
      // 0c1: astore 7
      // 0c3: aload 6
      // 0c5: lload 3
      // 0c6: aload 7
      // 0c8: invokevirtual com/l7tech/server/transport/http/m.a (J[Z)V
      // 0cb: aload 7
      // 0cd: bipush 0
      // 0ce: baload
      // 0cf: ifeq 103
      // 0d2: aload 7
      // 0d4: bipush 1
      // 0d5: baload
      // 0d6: ifne 0f2
      // 0d9: goto 0e0
      // 0dc: invokestatic com/l7tech/server/transport/http/n.a (Ljava/lang/InterruptedException;)Ljava/lang/InterruptedException;
      // 0df: athrow
      // 0e0: getstatic com/l7tech/server/transport/http/TimeoutInputStream.a Ljava/util/logging/Logger;
      // 0e3: getstatic com/l7tech/server/transport/http/n.b [Ljava/lang/String;
      // 0e6: bipush 1
      // 0e7: aaload
      // 0e8: invokevirtual java/util/logging/Logger.fine (Ljava/lang/String;)V
      // 0eb: goto 0f2
      // 0ee: invokestatic com/l7tech/server/transport/http/n.a (Ljava/lang/InterruptedException;)Ljava/lang/InterruptedException;
      // 0f1: athrow
      // 0f2: aload 0
      // 0f3: aload 6
      // 0f5: aload 7
      // 0f7: bipush 1
      // 0f8: baload
      // 0f9: invokevirtual com/l7tech/server/transport/http/n.a (Lcom/l7tech/server/transport/http/m;Z)V
      // 0fc: aload 5
      // 0fe: invokeinterface java/util/Iterator.remove ()V 1
      // 103: goto 067
      // 106: goto 011
      // 109: astore 1
      // 10a: getstatic com/l7tech/server/transport/http/TimeoutInputStream.f Ljava/lang/Object;
      // 10d: dup
      // 10e: astore 2
      // 10f: monitorenter
      // 110: aconst_null
      // 111: putstatic com/l7tech/server/transport/http/TimeoutInputStream.h Ljava/lang/Thread;
      // 114: aload 2
      // 115: monitorexit
      // 116: goto 120
      // 119: astore 8
      // 11b: aload 2
      // 11c: monitorexit
      // 11d: aload 8
      // 11f: athrow
      // 120: goto 13a
      // 123: astore 1
      // 124: getstatic com/l7tech/server/transport/http/TimeoutInputStream.f Ljava/lang/Object;
      // 127: dup
      // 128: astore 2
      // 129: monitorenter
      // 12a: aload 1
      // 12b: putstatic com/l7tech/server/transport/http/TimeoutInputStream.g Ljava/lang/Exception;
      // 12e: aload 2
      // 12f: monitorexit
      // 130: goto 13a
      // 133: astore 9
      // 135: aload 2
      // 136: monitorexit
      // 137: aload 9
      // 139: athrow
      // 13a: getstatic com/l7tech/server/transport/http/TimeoutInputStream.a Ljava/util/logging/Logger;
      // 13d: getstatic com/l7tech/server/transport/http/n.b [Ljava/lang/String;
      // 140: bipush 3
      // 141: aaload
      // 142: invokevirtual java/util/logging/Logger.info (Ljava/lang/String;)V
      // 145: return
      // try (92 -> 104): 105 java/lang/InterruptedException
      // try (84 -> 96): 97 java/lang/InterruptedException
      // try (61 -> 77): 77 java/lang/InterruptedException
      // try (53 -> 59): 59 java/lang/InterruptedException
      // try (25 -> 29): 30 java/lang/InterruptedException
      // try (9 -> 14): 14 java/lang/InterruptedException
      // try (7 -> 117): 117 java/lang/InterruptedException
      // try (122 -> 126): 127 null
      // try (127 -> 130): 127 null
      // try (7 -> 117): 133 java/lang/Exception
      // try (138 -> 142): 143 null
      // try (143 -> 146): 143 null
   }

   private static InterruptedException a(InterruptedException var0) {
      return var0;
   }

   static {
      String[] var5 = new String[4];
      int var3 = 0;
      String var2 = "\u001a^\u0015\u0017\u0005]c!U\u0004\u000fQz~>U\n\u0017\u0005.c;B\u0000\u0003\u0015.d'Q\u0017\u0016\u0018`p}\u001a\u001a\u007fE\u0016\u001ea7 \\\n\u0015].~=D\u0000\u0010\u0003{g'Y\u000b\u0005_";
      int var4 = "\u001a^\u0015\u0017\u0005]c!U\u0004\u000fQz~>U\n\u0017\u0005.c;B\u0000\u0003\u0015.d'Q\u0017\u0016\u0018`p}\u001a\u001a\u007fE\u0016\u001ea7 \\\n\u0015].~=D\u0000\u0010\u0003{g'Y\u000b\u0005_"
         .length();
      char var1 = '$';
      int var7 = -1;

      label24:
      while (true) {
         byte var10000 = 72;
         String var10001 = var2.substring(++var7, var7 + var1);
         byte var10002 = -1;

         while (true) {
            String var8 = a(var10000, a(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     b = var5;
                     return;
                  }

                  var1 = var2.charAt(var7);
                  break;
               default:
                  var5[var3++] = var8;
                  if ((var7 += var1) < var4) {
                     var1 = var2.charAt(var7);
                     continue label24;
                  }

                  var2 = "_:\u0000S]&7y\u0000T\u000b\u0014\"<b\u0010RUA;&\u007f\u001bG\t$_\u001bPR@\u0018&d\u0010AJ\u0014?;{\u0010OR@k&~\u0007EFPk!b\u001aPW]%58";
                  var4 = "_:\u0000S]&7y\u0000T\u000b\u0014\"<b\u0010RUA;&\u007f\u001bG\t$_\u001bPR@\u0018&d\u0010AJ\u0014?;{\u0010OR@k&~\u0007EFPk!b\u001aPW]%58"
                     .length();
                  var1 = 25;
                  var7 = -1;
            }

            var10000 = 13;
            var10001 = var2.substring(++var7, var7 + var1);
            var10002 = 0;
         }
      }
   }

   private static char[] a(String var0) {
      char[] var10000 = var0.toCharArray();
      if (var10000.length < 2) {
         var10000[0] = (char)(var10000[0] ^ 95);
      }

      return var10000;
   }

   private static String a(int var0, char[] var1) {
      int var10003 = var1.length;
      int var10002 = var0;
      char[] var10001 = var1;
      int var10000 = var10003;

      for (int var2 = 0; var10000 > var2; var2++) {
         var10001[var2] = (char)(var10001[var2] ^ var10002 ^ switch (var2 % 7) {
            case 0 -> 27;
            case 1 -> 120;
            case 2 -> 45;
            case 3 -> 42;
            case 4 -> 57;
            case 5 -> 70;
            default -> 95;
         });
      }

      return new String(var10001).intern();
   }
}
