package com.l7tech.server.stepdebug;

import com.l7tech.gateway.common.audit.Audit;
import com.l7tech.gateway.common.stepdebug.DebugState;
import com.l7tech.objectmodel.Goid;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.assertion.ServerAssertion;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class DebugContext {
   private final Lock a;
   private final Condition b;
   private final Condition c;
   private boolean d;
   private long e;
   private boolean f;
   private final Goid g;
   private final String h;
   private final DebugPecData i;
   private DebugState j;
   private final Set<Collection<Integer>> k;
   private Collection<Integer> l;
   private Collection<Integer> m;
   private Set<String> n;
   private static final String[] o;

   public DebugContext(@NotNull Goid var1, @NotNull String var2, @NotNull Audit var3) {
      if (var1 == null) {
         a(0);
      }

      if (var2 == null) {
         a(1);
      }

      if (var3 == null) {
         a(2);
      }

      super();
      this.a = new ReentrantLock(true);
      this.b = this.a.newCondition();
      this.c = this.a.newCondition();
      this.d = false;
      this.f = false;
      this.k = new HashSet<>();
      this.n = new HashSet<>();
      this.g = var1;
      this.h = var2;
      this.i = new DebugPecData(var3);
      this.a(DebugState.STOPPED);
      this.e = System.currentTimeMillis();
   }

   // $VF: Could not verify finally blocks. A semaphore variable has been added to preserve control flow.
   // 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!)
   @NotNull
   public Goid getPolicyGoid() {
      this.a.lock();
      boolean var5 = false /* VF: Semaphore variable */;

      Goid var1;
      try {
         var5 = true;
         var1 = this.g;
         var5 = false;
      } finally {
         if (var5) {
            this.a.unlock();
         }
      }

      try {
         this.a.unlock();
         if (var1 == null) {
            a(3);
         }

         return var1;
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }
   }

   // $VF: Could not verify finally blocks. A semaphore variable has been added to preserve control flow.
   // 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!)
   @NotNull
   public String getTaskId() {
      this.a.lock();
      boolean var5 = false /* VF: Semaphore variable */;

      String var1;
      try {
         var5 = true;
         var1 = this.h;
         var5 = false;
      } finally {
         if (var5) {
            this.a.unlock();
         }
      }

      try {
         this.a.unlock();
         if (var1 == null) {
            a(4);
         }

         return var1;
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }
   }

   // $VF: Could not verify finally blocks. A semaphore variable has been added to preserve control flow.
   // 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!)
   @NotNull
   public DebugState getDebugState() {
      this.a.lock();
      boolean var5 = false /* VF: Semaphore variable */;

      DebugState var1;
      try {
         var5 = true;
         var1 = this.j;
         var5 = false;
      } finally {
         if (var5) {
            this.a.unlock();
         }
      }

      try {
         this.a.unlock();
         if (var1 == null) {
            a(5);
         }

         return var1;
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }
   }

   // $VF: Could not verify finally blocks. A semaphore variable has been added to preserve control flow.
   // 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!)
   @NotNull
   public Set<Collection<Integer>> getBreakpoints() {
      this.a.lock();
      boolean var5 = false /* VF: Semaphore variable */;

      Set var1;
      try {
         var5 = true;
         var1 = this.k;
         var5 = false;
      } finally {
         if (var5) {
            this.a.unlock();
         }
      }

      try {
         this.a.unlock();
         if (var1 == null) {
            a(6);
         }

         return var1;
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }
   }

   @Nullable
   public Collection<Integer> getCurrentLine() {
      this.a.lock();

      try {
         return this.m;
      } finally {
         this.a.unlock();
      }
   }

   // $VF: Could not verify finally blocks. A semaphore variable has been added to preserve control flow.
   // 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!)
   @NotNull
   public DebugPecData getDebugPecData() {
      this.a.lock();
      boolean var5 = false /* VF: Semaphore variable */;

      DebugPecData var1;
      try {
         var5 = true;
         var1 = this.i;
         var5 = false;
      } finally {
         if (var5) {
            this.a.unlock();
         }
      }

      try {
         this.a.unlock();
         if (var1 == null) {
            a(7);
         }

         return var1;
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }
   }

   public void startDebugging() {
      this.a.lock();

      try {
         this.a(DebugState.STARTED);
         this.i.reset(this.n);
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void stopDebugging() {
      this.a.lock();

      try {
         this.a(DebugState.STOPPED);
         this.m = null;
         this.l = null;
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void stepOver(@NotNull Collection<Integer> var1) {
      try {
         if (var1 == null) {
            a(8);
         }
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }

      this.a.lock();

      try {
         this.l = var1;
         this.a(DebugState.BREAK_AT_NEXT_BREAKPOINT);
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void stepInto() {
      this.a.lock();

      try {
         this.a(DebugState.BREAK_AT_NEXT_LINE);
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void stepOut(@NotNull Collection<Integer> var1) {
      try {
         if (var1 == null) {
            a(9);
         }
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }

      this.a.lock();

      try {
         this.l = var1;
         this.a(DebugState.BREAK_AT_NEXT_BREAKPOINT);
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void resume() {
      this.a.lock();

      try {
         this.a(DebugState.BREAK_AT_NEXT_BREAKPOINT);
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void toggleBreakpoint(@NotNull Collection<Integer> var1) {
      try {
         if (var1 == null) {
            a(10);
         }
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }

      this.a.lock();

      try {
         if (this.k.contains(var1)) {
            this.k.remove(var1);
         } else {
            this.k.add(var1);
         }
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void removeAllBreakpoints() {
      this.a.lock();

      try {
         this.k.clear();
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void addUserContextVariable(@NotNull String var1) {
      try {
         if (var1 == null) {
            a(11);
         }
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }

      this.a.lock();

      try {
         if (this.n.add(var1)) {
            this.i.addUserContextVariable(var1);
         }
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void removeUserContextVariable(@NotNull String var1) {
      try {
         if (var1 == null) {
            a(12);
         }
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }

      this.a.lock();

      try {
         if (this.n.remove(var1)) {
            this.i.removeUserContextVariable(var1);
         }
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void onMessageFinished(@NotNull PolicyEnforcementContext var1, @Nullable AssertionStatus var2) {
      try {
         if (var1 == null) {
            a(13);
         }
      } catch (IllegalArgumentException var7) {
         throw a(var7);
      }

      this.a.lock();

      try {
         if (!DebugState.STOPPED.equals(this.j)) {
            this.i.update(var1, this.n);
            this.i.setPolicyResult(var2, this.m);
         }
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void onMessageArrived(@NotNull PolicyEnforcementContext var1) {
      try {
         if (var1 == null) {
            a(14);
         }
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }

      this.a.lock();

      try {
         if (!DebugState.STOPPED.equals(this.j)) {
            this.m = var1.getAssertionNumber();
            this.a(DebugState.BREAK_AT_NEXT_BREAKPOINT);
            this.i.update(var1, this.n);
            var1.setDebugContext(this);
         }
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void onStartAssertion(@NotNull PolicyEnforcementContext param1, @NotNull ServerAssertion param2) {
      // $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:
      // 00: aload 1
      // 01: ifnonnull 10
      // 04: bipush 15
      // 06: invokestatic com/l7tech/server/stepdebug/DebugContext.a (I)V
      // 09: goto 10
      // 0c: invokestatic com/l7tech/server/stepdebug/DebugContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0f: athrow
      // 10: aload 2
      // 11: ifnonnull 20
      // 14: bipush 16
      // 16: invokestatic com/l7tech/server/stepdebug/DebugContext.a (I)V
      // 19: goto 20
      // 1c: invokestatic com/l7tech/server/stepdebug/DebugContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1f: athrow
      // 20: aload 0
      // 21: getfield com/l7tech/server/stepdebug/DebugContext.a Ljava/util/concurrent/locks/Lock;
      // 24: invokeinterface java/util/concurrent/locks/Lock.lock ()V 1
      // 29: getstatic com/l7tech/gateway/common/stepdebug/DebugState.STOPPED Lcom/l7tech/gateway/common/stepdebug/DebugState;
      // 2c: aload 0
      // 2d: getfield com/l7tech/server/stepdebug/DebugContext.j Lcom/l7tech/gateway/common/stepdebug/DebugState;
      // 30: invokevirtual com/l7tech/gateway/common/stepdebug/DebugState.equals (Ljava/lang/Object;)Z
      // 33: ifne b7
      // 36: aload 0
      // 37: aload 1
      // 38: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getAssertionNumber ()Ljava/util/Collection; 1
      // 3d: putfield com/l7tech/server/stepdebug/DebugContext.m Ljava/util/Collection;
      // 40: aload 0
      // 41: getfield com/l7tech/server/stepdebug/DebugContext.i Lcom/l7tech/server/stepdebug/DebugPecData;
      // 44: aload 1
      // 45: aload 0
      // 46: getfield com/l7tech/server/stepdebug/DebugContext.n Ljava/util/Set;
      // 49: invokevirtual com/l7tech/server/stepdebug/DebugPecData.update (Lcom/l7tech/server/message/PolicyEnforcementContext;Ljava/util/Set;)V
      // 4c: aload 2
      // 4d: invokeinterface com/l7tech/server/policy/assertion/ServerAssertion.getAssertion ()Lcom/l7tech/policy/assertion/Assertion; 1
      // 52: invokevirtual com/l7tech/policy/assertion/Assertion.getOrdinal ()I
      // 55: bipush 1
      // 56: if_icmpeq b7
      // 59: getstatic com/l7tech/server/stepdebug/a.a [I
      // 5c: aload 0
      // 5d: getfield com/l7tech/server/stepdebug/DebugContext.j Lcom/l7tech/gateway/common/stepdebug/DebugState;
      // 60: invokevirtual com/l7tech/gateway/common/stepdebug/DebugState.ordinal ()I
      // 63: iaload
      // 64: lookupswitch 83 2 1 32 2 54
      // 80: invokestatic com/l7tech/server/stepdebug/DebugContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 83: athrow
      // 84: aload 0
      // 85: getstatic com/l7tech/gateway/common/stepdebug/DebugState.AT_BREAKPOINT Lcom/l7tech/gateway/common/stepdebug/DebugState;
      // 88: invokevirtual com/l7tech/server/stepdebug/DebugContext.a (Lcom/l7tech/gateway/common/stepdebug/DebugState;)V
      // 8b: aload 0
      // 8c: invokevirtual com/l7tech/server/stepdebug/DebugContext.c ()V
      // 8f: aload 0
      // 90: invokevirtual com/l7tech/server/stepdebug/DebugContext.a ()V
      // 93: goto b7
      // 96: invokestatic com/l7tech/server/stepdebug/DebugContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 99: athrow
      // 9a: aload 0
      // 9b: invokevirtual com/l7tech/server/stepdebug/DebugContext.b ()Z
      // 9e: ifeq b7
      // a1: aload 0
      // a2: getstatic com/l7tech/gateway/common/stepdebug/DebugState.AT_BREAKPOINT Lcom/l7tech/gateway/common/stepdebug/DebugState;
      // a5: invokevirtual com/l7tech/server/stepdebug/DebugContext.a (Lcom/l7tech/gateway/common/stepdebug/DebugState;)V
      // a8: aload 0
      // a9: invokevirtual com/l7tech/server/stepdebug/DebugContext.c ()V
      // ac: aload 0
      // ad: invokevirtual com/l7tech/server/stepdebug/DebugContext.a ()V
      // b0: goto b7
      // b3: invokestatic com/l7tech/server/stepdebug/DebugContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // b6: athrow
      // b7: aload 0
      // b8: getfield com/l7tech/server/stepdebug/DebugContext.a Ljava/util/concurrent/locks/Lock;
      // bb: invokeinterface java/util/concurrent/locks/Lock.unlock ()V 1
      // c0: goto cf
      // c3: astore 3
      // c4: aload 0
      // c5: getfield com/l7tech/server/stepdebug/DebugContext.a Ljava/util/concurrent/locks/Lock;
      // c8: invokeinterface java/util/concurrent/locks/Lock.unlock ()V 1
      // cd: aload 3
      // ce: athrow
      // cf: return
      // try (55 -> 65): 66 java/lang/IllegalArgumentException
      // try (37 -> 53): 53 java/lang/IllegalArgumentException
      // try (22 -> 43): 43 java/lang/IllegalArgumentException
      // try (7 -> 11): 12 java/lang/IllegalArgumentException
      // try (0 -> 4): 5 java/lang/IllegalArgumentException
      // try (17 -> 68): 72 null
   }

   public void onFinishAssertion(@NotNull PolicyEnforcementContext var1) {
      try {
         if (var1 == null) {
            a(17);
         }
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }

      this.a.lock();

      try {
         if (!DebugState.STOPPED.equals(this.j)) {
            this.i.update(var1, this.n);
         }
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public boolean waitForUpdates(long var1) {
      this.a.lock();

      try {
         if (this.d) {
            this.d = false;
            return true;
         }

         boolean var3 = this.c.await(var1, TimeUnit.MILLISECONDS);

         try {
            if (var3) {
               this.d = false;
            }
         } catch (InterruptedException var9) {
            throw a(var9);
         }

         return var3;
      } catch (InterruptedException var10) {
      } finally {
         this.a.unlock();
      }

      return false;
   }

   public long getLastUpdatedTimeMillis() {
      this.a.lock();

      try {
         return this.e;
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public void setIsTerminated(boolean var1) {
      this.a.lock();

      try {
         this.f = var1;
      } finally {
         this.c();
         this.a.unlock();
      }
   }

   public boolean isTerminated() {
      this.a.lock();

      try {
         return this.f;
      } finally {
         this.a.unlock();
      }
   }

   private void a(@NotNull DebugState var1) {
      try {
         if (var1 == null) {
            a(18);
         }
      } catch (IllegalArgumentException var6) {
         throw a(var6);
      }

      this.a.lock();

      try {
         this.j = var1;
         if (var1.equals(DebugState.AT_BREAKPOINT)) {
            this.l = null;
         }

         this.b.signal();
      } finally {
         this.a.unlock();
      }
   }

   private void a() {
      this.a.lock();

      try {
         while (this.j.equals(DebugState.AT_BREAKPOINT)) {
            this.b.await();
         }
      } catch (InterruptedException var5) {
      } finally {
         this.a.unlock();
      }
   }

   // $VF: Handled exception range with multiple entry points by splitting it
   // $VF: Duplicated exception handlers to handle obfuscated exceptions
   private boolean b() {
      this.a.lock();

      try {
         if (!this.k.contains(this.m)) {
            try {
               if (!this.d()) {
                  return false;
               }
            } catch (IllegalArgumentException var7) {
               throw a(var7);
            }
         }

         try {
            return true;
         } catch (IllegalArgumentException var6) {
            throw a(var6);
         }
      } finally {
         this.a.unlock();
      }
   }

   private void c() {
      this.a.lock();

      try {
         this.d = true;
         this.e = System.currentTimeMillis();
         this.c.signal();
      } finally {
         this.a.unlock();
      }
   }

   private boolean d() {
      // $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:
      // 00: aload 0
      // 01: getfield com/l7tech/server/stepdebug/DebugContext.l Ljava/util/Collection;
      // 04: ifnull a1
      // 07: aload 0
      // 08: getfield com/l7tech/server/stepdebug/DebugContext.m Ljava/util/Collection;
      // 0b: ifnull a1
      // 0e: goto 15
      // 11: invokestatic com/l7tech/server/stepdebug/DebugContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 14: athrow
      // 15: aload 0
      // 16: getfield com/l7tech/server/stepdebug/DebugContext.l Ljava/util/Collection;
      // 19: aload 0
      // 1a: getfield com/l7tech/server/stepdebug/DebugContext.m Ljava/util/Collection;
      // 1d: invokeinterface java/util/Collection.equals (Ljava/lang/Object;)Z 2
      // 22: ifeq 32
      // 25: goto 2c
      // 28: invokestatic com/l7tech/server/stepdebug/DebugContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 2b: athrow
      // 2c: bipush 1
      // 2d: ireturn
      // 2e: invokestatic com/l7tech/server/stepdebug/DebugContext.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 31: athrow
      // 32: bipush 0
      // 33: istore 1
      // 34: aload 0
      // 35: getfield com/l7tech/server/stepdebug/DebugContext.m Ljava/util/Collection;
      // 38: invokeinterface java/util/Collection.iterator ()Ljava/util/Iterator; 1
      // 3d: astore 2
      // 3e: aload 0
      // 3f: getfield com/l7tech/server/stepdebug/DebugContext.l Ljava/util/Collection;
      // 42: invokeinterface java/util/Collection.iterator ()Ljava/util/Iterator; 1
      // 47: astore 3
      // 48: aload 2
      // 49: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 4e: ifeq 9f
      // 51: aload 2
      // 52: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 57: checkcast java/lang/Integer
      // 5a: astore 4
      // 5c: aload 3
      // 5d: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 62: ifeq 97
      // 65: aload 3
      // 66: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 6b: checkcast java/lang/Integer
      // 6e: astore 5
      // 70: aload 4
      // 72: invokevirtual java/lang/Integer.intValue ()I
      // 75: aload 5
      // 77: invokevirtual java/lang/Integer.intValue ()I
      // 7a: if_icmple 82
      // 7d: bipush 1
      // 7e: istore 1
      // 7f: goto 9f
      // 82: aload 4
      // 84: invokevirtual java/lang/Integer.intValue ()I
      // 87: aload 5
      // 89: invokevirtual java/lang/Integer.intValue ()I
      // 8c: if_icmpge 94
      // 8f: bipush 0
      // 90: istore 1
      // 91: goto 9f
      // 94: goto 9c
      // 97: bipush 1
      // 98: istore 1
      // 99: goto 9f
      // 9c: goto 48
      // 9f: iload 1
      // a0: ireturn
      // a1: bipush 0
      // a2: ireturn
      // try (0 -> 6): 7 java/lang/IllegalArgumentException
      // try (3 -> 15): 16 java/lang/IllegalArgumentException
      // try (9 -> 20): 20 java/lang/IllegalArgumentException
   }

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

   static {
      String[] var5 = new String[28];
      int var3 = 0;
      String var2 = "\u0019v$\u0005\bf#>\u007f\u0006Uz)>\u007f6\u0006\u001dr4<Bl\r\u000ev3\u0013njg\u000e@36\u007fm\n\u0019|+>hqU\u0006z#\u0011\u0006}\u0001>eaa\u0001R4$nzf\u0000|)\n\rv%\"l[f\bg\"\r\u000ev3\u0007dd{\nj\u00008bl\u0010\u0006}\n2x{s\u000ev\u0006%yad\fw\t\u000ev3\u0003j{y w\u0011\u0006}\n2x{s\u000ev\u0001>eaa\u0001v#*)](#E}~\u00053*2\u007f`}\r3b$%-aI~2$\u007f(|\u0006gg%n|g\u001b}g9~d~\u000e\u000ev3\u0015yms\u0002c(>e|a>(a \"fm|\u001d3!8y(R'|3\u0019~d~Ic&%jew\u001dv5w,-aN3(1+-aG64wf}a\u001d3)8\u007f(p\f3)\"gd\u0019\u001bv*8}mG\u001av5\u0014dff\fk3\u0001jz{\bq+2\r\u001av3\u0013njg\u000e@36\u007fm\u0010\u0006}\u0014#jzf(`42y|{\u0006}\u0016\bw#\u0002xm`*|)#npf?r5>jj~\f(\n|*xg?f\fp/xxm`\u001fv5xx|w\u0019w\"5~o=-v%\"lK}\u0007g\"/\u007f\u000f\u000ev3\u0013njg\u000eC\"4Oif\b\u000f\b`42y|{\u0006}\t\"fjw\u001b\u0010\u001d| 0gmP\u001bv&<{g{\u0007g\u0004\u0007r*2\u0007\u001ag\"'D}f\u000f\u001av5!nzS\u001a`\"%\u007fa}\u0007";
      int var4 = "\u0019v$\u0005\bf#>\u007f\u0006Uz)>\u007f6\u0006\u001dr4<Bl\r\u000ev3\u0013njg\u000e@36\u007fm\n\u0019|+>hqU\u0006z#\u0011\u0006}\u0001>eaa\u0001R4$nzf\u0000|)\n\rv%\"l[f\bg\"\r\u000ev3\u0007dd{\nj\u00008bl\u0010\u0006}\n2x{s\u000ev\u0006%yad\fw\t\u000ev3\u0003j{y w\u0011\u0006}\n2x{s\u000ev\u0001>eaa\u0001v#*)](#E}~\u00053*2\u007f`}\r3b$%-aI~2$\u007f(|\u0006gg%n|g\u001b}g9~d~\u000e\u000ev3\u0015yms\u0002c(>e|a>(a \"fm|\u001d3!8y(R'|3\u0019~d~Ic&%jew\u001dv5w,-aN3(1+-aG64wf}a\u001d3)8\u007f(p\f3)\"gd\u0019\u001bv*8}mG\u001av5\u0014dff\fk3\u0001jz{\bq+2\r\u001av3\u0013njg\u000e@36\u007fm\u0010\u0006}\u0014#jzf(`42y|{\u0006}\u0016\bw#\u0002xm`*|)#npf?r5>jj~\f(\n|*xg?f\fp/xxm`\u001fv5xx|w\u0019w\"5~o=-v%\"lK}\u0007g\"/\u007f\u000f\u000ev3\u0013njg\u000eC\"4Oif\b\u000f\b`42y|{\u0006}\t\"fjw\u001b\u0010\u001d| 0gmP\u001bv&<{g{\u0007g\u0004\u0007r*2\u0007\u001ag\"'D}f\u000f\u001av5!nzS\u001a`\"%\u007fa}\u0007"
         .length();
      char var1 = 3;
      int var7 = -1;

      label24:
      while (true) {
         byte var10000 = 12;
         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) {
                     o = var5;
                     return;
                  }

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

                  var2 = "\u0007q'uj2k\u0001}\"uu`m\u0012{8uuqz\u0014z/8sb0 {(/aFp\nj/\"r\b\u0017j/*Isz\u0016";
                  var4 = "\u0007q'uj2k\u0001}\"uu`m\u0012{8uuqz\u0014z/8sb0 {(/aFp\nj/\"r\b\u0017j/*Isz\u0016".length();
                  var1 = '(';
                  var7 = -1;
            }

            var10000 = 1;
            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] ^ 30);
      }

      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 -> 101;
            case 1 -> 31;
            case 2 -> 75;
            case 3 -> 91;
            case 4 -> 7;
            case 5 -> 4;
            default -> 30;
         });
      }

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