package com.l7tech.server.admin;

import com.l7tech.gateway.common.security.PrivateKeySecured;
import com.l7tech.gateway.common.security.keystore.SsgKeyEntry;
import com.l7tech.gateway.common.security.keystore.SsgKeyMetadata;
import com.l7tech.gateway.common.security.rbac.OperationType;
import com.l7tech.gateway.common.security.rbac.PermissionDeniedException;
import com.l7tech.identity.User;
import com.l7tech.objectmodel.Entity;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.ObjectNotFoundException;
import com.l7tech.server.security.keystore.SsgKeyFinder;
import com.l7tech.server.security.keystore.SsgKeyStoreManager;
import com.l7tech.server.security.rbac.CustomRbacInterceptor;
import com.l7tech.server.security.rbac.RbacServices;
import jakarta.inject.Inject;
import jakarta.inject.Named;
import java.security.KeyStoreException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.aopalliance.intercept.MethodInvocation;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class PrivateKeyRbacInterceptor implements CustomRbacInterceptor {
   User a;
   @Inject
   @Named("rbacServices")
   RbacServices rbacServices;
   @Inject
   @Named("ssgKeyStoreManager")
   SsgKeyStoreManager ssgKeyStoreManager;
   private Map<Goid, SsgKeyFinder> b = new HashMap<>();
   private static final String[] c;

   @Override
   public Object invoke(@NotNull MethodInvocation var1) throws Throwable {
      try {
         if (var1 == null) {
            a(0);
         }
      } catch (Throwable var15) {
         throw a(var15);
      }

      try {
         if (null == this.a) {
            throw new IllegalStateException(c[15]);
         }
      } catch (Throwable var18) {
         throw a(var18);
      }

      try {
         if (this.rbacServices == null) {
            throw new IllegalStateException(c[11]);
         }
      } catch (Throwable var14) {
         throw a(var14);
      }

      try {
         if (this.ssgKeyStoreManager == null) {
            throw new IllegalStateException(c[4]);
         }
      } catch (Throwable var17) {
         throw a(var17);
      }

      String var2 = var1.getMethod().getName();
      PrivateKeySecured var3 = var1.getMethod().getAnnotation(PrivateKeySecured.class);

      try {
         if (null == var3) {
            throw new IllegalStateException(c[2]);
         }
      } catch (Throwable var16) {
         throw a(var16);
      }

      try {
         this.b.clear();
         if (!this.a(var1, var3)) {
            return Boolean.FALSE;
         }

         Object var4 = var1.proceed();
         return this.a(var1, var3, var4);
      } finally {
         this.b.clear();
      }
   }

   private Object a(MethodInvocation param1, PrivateKeySecured param2, Object param3) throws FindException, KeyStoreException {
      // $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: invokeinterface org/aopalliance/intercept/MethodInvocation.getMethod ()Ljava/lang/reflect/Method; 1
      // 06: invokevirtual java/lang/reflect/Method.getReturnType ()Ljava/lang/Class;
      // 09: astore 4
      // 0b: aload 4
      // 0d: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Class;)Z
      // 10: ifne a2
      // 13: getstatic com/l7tech/gateway/common/security/PrivateKeySecured$ReturnCheck.NO_RETURN_CHECK Lcom/l7tech/gateway/common/security/PrivateKeySecured$ReturnCheck;
      // 16: aload 2
      // 17: invokeinterface com/l7tech/gateway/common/security/PrivateKeySecured.returnCheck ()Lcom/l7tech/gateway/common/security/PrivateKeySecured$ReturnCheck; 1
      // 1c: if_acmpeq a2
      // 1f: goto 26
      // 22: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 25: athrow
      // 26: getstatic com/l7tech/gateway/common/security/PrivateKeySecured$ReturnCheck.CHECK_RETURN Lcom/l7tech/gateway/common/security/PrivateKeySecured$ReturnCheck;
      // 29: aload 2
      // 2a: invokeinterface com/l7tech/gateway/common/security/PrivateKeySecured.returnCheck ()Lcom/l7tech/gateway/common/security/PrivateKeySecured$ReturnCheck; 1
      // 2f: if_acmpne 41
      // 32: goto 39
      // 35: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 38: athrow
      // 39: bipush 1
      // 3a: goto 42
      // 3d: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 40: athrow
      // 41: bipush 0
      // 42: istore 5
      // 44: ldc com/l7tech/gateway/common/security/keystore/SsgKeyEntry
      // 46: aload 4
      // 48: aload 3
      // 49: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Object;)Z
      // 4c: ifeq 5d
      // 4f: aload 0
      // 50: aload 3
      // 51: checkcast java/util/Collection
      // 54: iload 5
      // 56: invokevirtual com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/util/Collection;Z)Ljava/util/Collection;
      // 59: astore 3
      // 5a: goto a2
      // 5d: ldc com/l7tech/gateway/common/security/keystore/SsgKeyEntry
      // 5f: aload 4
      // 61: invokevirtual java/lang/Class.isAssignableFrom (Ljava/lang/Class;)Z
      // 64: ifeq 75
      // 67: aload 0
      // 68: aload 3
      // 69: checkcast com/l7tech/gateway/common/security/keystore/SsgKeyEntry
      // 6c: iload 5
      // 6e: invokevirtual com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Lcom/l7tech/gateway/common/security/keystore/SsgKeyEntry;Z)Lcom/l7tech/gateway/common/security/keystore/SsgKeyEntry;
      // 71: astore 3
      // 72: goto a2
      // 75: new java/lang/IllegalStateException
      // 78: dup
      // 79: aload 1
      // 7a: invokeinterface org/aopalliance/intercept/MethodInvocation.getMethod ()Ljava/lang/reflect/Method; 1
      // 7f: invokevirtual java/lang/reflect/Method.getName ()Ljava/lang/String;
      // 82: aload 4
      // 84: invokevirtual java/lang/Class.getSimpleName ()Ljava/lang/String;
      // 87: getstatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.c [Ljava/lang/String;
      // 8a: astore 6
      // 8c: aload 6
      // 8e: bipush 9
      // 90: aaload
      // 91: dup_x2
      // 92: pop
      // 93: aload 6
      // 95: bipush 17
      // 97: aaload
      // 98: swap
      // 99: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001\u0001\u0001" ]
      // 9e: invokespecial java/lang/IllegalStateException.<init> (Ljava/lang/String;)V
      // a1: athrow
      // a2: aload 3
      // a3: areturn
      // try (4 -> 11): 12 com/l7tech/objectmodel/FindException
      // try (7 -> 18): 19 com/l7tech/objectmodel/FindException
      // try (14 -> 23): 23 com/l7tech/objectmodel/FindException
   }

   private boolean a(MethodInvocation param1, PrivateKeySecured param2) throws FindException, KeyStoreException {
      // $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 2
      // 01: invokeinterface com/l7tech/gateway/common/security/PrivateKeySecured.preChecks ()[Lcom/l7tech/gateway/common/security/PrivateKeySecured$PreCheck; 1
      // 06: astore 3
      // 07: aload 3
      // 08: ifnull 18
      // 0b: aload 3
      // 0c: arraylength
      // 0d: bipush 1
      // 0e: if_icmpge 2a
      // 11: goto 18
      // 14: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 17: athrow
      // 18: new java/lang/IllegalStateException
      // 1b: dup
      // 1c: getstatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.c [Ljava/lang/String;
      // 1f: bipush 16
      // 21: aaload
      // 22: invokespecial java/lang/IllegalStateException.<init> (Ljava/lang/String;)V
      // 25: athrow
      // 26: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 29: athrow
      // 2a: aload 3
      // 2b: astore 4
      // 2d: aload 4
      // 2f: arraylength
      // 30: istore 5
      // 32: bipush 0
      // 33: istore 6
      // 35: iload 6
      // 37: iload 5
      // 39: if_icmpge ef
      // 3c: aload 4
      // 3e: iload 6
      // 40: aaload
      // 41: astore 7
      // 43: getstatic com/l7tech/server/admin/m.a [I
      // 46: aload 7
      // 48: invokevirtual com/l7tech/gateway/common/security/PrivateKeySecured$PreCheck.ordinal ()I
      // 4b: iaload
      // 4c: tableswitch 132 1 4 32 39 111 118
      // 6c: goto e9
      // 6f: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 72: athrow
      // 73: aload 0
      // 74: aload 1
      // 75: aload 2
      // 76: invokevirtual com/l7tech/server/admin/PrivateKeyRbacInterceptor.b (Lorg/aopalliance/intercept/MethodInvocation;Lcom/l7tech/gateway/common/security/PrivateKeySecured;)Lcom/l7tech/gateway/common/security/keystore/SsgKeyEntry;
      // 79: astore 8
      // 7b: aload 8
      // 7d: ifnull 93
      // 80: aload 0
      // 81: aload 8
      // 83: aload 2
      // 84: invokeinterface com/l7tech/gateway/common/security/PrivateKeySecured.argOp ()Lcom/l7tech/gateway/common/security/rbac/OperationType; 1
      // 89: invokevirtual com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Lcom/l7tech/gateway/common/security/keystore/SsgKeyEntry;Lcom/l7tech/gateway/common/security/rbac/OperationType;)V
      // 8c: goto e9
      // 8f: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 92: athrow
      // 93: aload 1
      // 94: aload 2
      // 95: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.d (Lorg/aopalliance/intercept/MethodInvocation;Lcom/l7tech/gateway/common/security/PrivateKeySecured;)Lcom/l7tech/objectmodel/Goid;
      // 98: astore 9
      // 9a: aload 1
      // 9b: aload 2
      // 9c: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.c (Lorg/aopalliance/intercept/MethodInvocation;Lcom/l7tech/gateway/common/security/PrivateKeySecured;)Ljava/lang/String;
      // 9f: astore 10
      // a1: aload 1
      // a2: aload 2
      // a3: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.e (Lorg/aopalliance/intercept/MethodInvocation;Lcom/l7tech/gateway/common/security/PrivateKeySecured;)Lcom/l7tech/gateway/common/security/keystore/SsgKeyMetadata;
      // a6: astore 11
      // a8: aload 0
      // a9: aload 9
      // ab: aload 10
      // ad: aload 11
      // af: aload 2
      // b0: invokeinterface com/l7tech/gateway/common/security/PrivateKeySecured.argOp ()Lcom/l7tech/gateway/common/security/rbac/OperationType; 1
      // b5: invokevirtual com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Lcom/l7tech/objectmodel/Goid;Ljava/lang/String;Lcom/l7tech/gateway/common/security/keystore/SsgKeyMetadata;Lcom/l7tech/gateway/common/security/rbac/OperationType;)V
      // b8: goto e9
      // bb: aload 0
      // bc: invokevirtual com/l7tech/server/admin/PrivateKeyRbacInterceptor.a ()V
      // bf: goto e9
      // c2: aload 0
      // c3: aload 2
      // c4: invokevirtual com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Lcom/l7tech/gateway/common/security/PrivateKeySecured;)Z
      // c7: ifne e9
      // ca: bipush 0
      // cb: ireturn
      // cc: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // cf: athrow
      // d0: new java/lang/IllegalStateException
      // d3: dup
      // d4: aload 7
      // d6: invokestatic java/lang/String.valueOf (Ljava/lang/Object;)Ljava/lang/String;
      // d9: getstatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.c [Ljava/lang/String;
      // dc: bipush 27
      // de: aaload
      // df: swap
      // e0: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001" ]
      // e5: invokespecial java/lang/IllegalStateException.<init> (Ljava/lang/String;)V
      // e8: athrow
      // e9: iinc 6 1
      // ec: goto 35
      // ef: bipush 1
      // f0: ireturn
      // try (3 -> 9): 10 com/l7tech/objectmodel/FindException
      // try (5 -> 19): 19 com/l7tech/objectmodel/FindException
      // try (35 -> 41): 41 com/l7tech/objectmodel/FindException
      // try (48 -> 56): 56 com/l7tech/objectmodel/FindException
      // try (81 -> 87): 87 com/l7tech/objectmodel/FindException
   }

   private SsgKeyEntry a(MethodInvocation param1) {
      // $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: invokeinterface org/aopalliance/intercept/MethodInvocation.getArguments ()[Ljava/lang/Object; 1
      // 06: astore 2
      // 07: aload 2
      // 08: arraylength
      // 09: ifle 27
      // 0c: aload 2
      // 0d: bipush 0
      // 0e: aaload
      // 0f: instanceof com/l7tech/gateway/common/security/keystore/SsgKeyEntry
      // 12: ifeq 27
      // 15: goto 1c
      // 18: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 1b: athrow
      // 1c: aload 2
      // 1d: bipush 0
      // 1e: aaload
      // 1f: checkcast com/l7tech/gateway/common/security/keystore/SsgKeyEntry
      // 22: areturn
      // 23: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 26: athrow
      // 27: new java/lang/IllegalArgumentException
      // 2a: dup
      // 2b: getstatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.c [Ljava/lang/String;
      // 2e: bipush 13
      // 30: aaload
      // 31: invokespecial java/lang/IllegalArgumentException.<init> (Ljava/lang/String;)V
      // 34: athrow
      // try (3 -> 11): 12 java/lang/IllegalStateException
      // try (6 -> 19): 19 java/lang/IllegalStateException
   }

   @Nullable
   private SsgKeyEntry b(MethodInvocation var1, PrivateKeySecured var2) {
      SsgKeyEntry var3 = null;
      if (var2.keyEntryArg() != -1) {
         Object[] var4 = var1.getArguments();

         try {
            if (var4.length <= var2.keyEntryArg() || !(var4[var2.keyEntryArg()] instanceof SsgKeyEntry)) {
               throw new IllegalArgumentException(c[32] + var2.keyEntryArg());
            }
         } catch (IllegalStateException var5) {
            throw a(var5);
         }

         var3 = (SsgKeyEntry)var4[var2.keyEntryArg()];
      }

      return var3;
   }

   private static String c(MethodInvocation var0, PrivateKeySecured var1) {
      return (String)var0.getArguments()[var1.keyAliasArg()];
   }

   private static Goid d(MethodInvocation var0, PrivateKeySecured var1) {
      return (Goid)var0.getArguments()[var1.keystoreGoidArg()];
   }

   private static SsgKeyMetadata e(MethodInvocation var0, PrivateKeySecured var1) {
      try {
         if (var1.metadataArg() == -1) {
            return null;
         }
      } catch (IllegalStateException var2) {
         throw a(var2);
      }

      return (SsgKeyMetadata)var0.getArguments()[var1.metadataArg()];
   }

   private void a(SsgKeyEntry var1, OperationType var2) throws FindException, KeyStoreException {
      if (var2 == OperationType.UPDATE) {
         SsgKeyEntry var3 = this.a(var1.getKeystoreId(), var1.getAlias());
         this.b((Entity)var3, OperationType.UPDATE);
         this.b((Entity)var1, OperationType.UPDATE);
      } else {
         this.b((Entity)var1, var2);
      }

      OperationType var10000;
      label20: {
         try {
            if (OperationType.READ == var2) {
               var10000 = OperationType.READ;
               break label20;
            }
         } catch (FindException var4) {
            throw a(var4);
         }

         var10000 = OperationType.UPDATE;
      }

      OperationType var5 = var10000;
      this.b(var1.getKeystoreId(), var5);
   }

   private void a(Goid var1, String var2, SsgKeyMetadata var3, OperationType var4) throws FindException, KeyStoreException {
      SsgKeyEntry var5;
      label20: {
         label19: {
            try {
               if (var4 == OperationType.CREATE || var4 == OperationType.UPDATE) {
                  break label19;
               }
            } catch (FindException var6) {
               throw a(var6);
            }

            var5 = this.a(var1, var2);
            break label20;
         }

         var5 = this.a(var1, var2, var3);
      }

      this.a(var5, var4);
   }

   private boolean a(PrivateKeySecured param1) throws FindException {
      // $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/admin/PrivateKeyRbacInterceptor.rbacServices Lcom/l7tech/server/security/rbac/RbacServices;
      // 04: aload 0
      // 05: getfield com/l7tech/server/admin/PrivateKeyRbacInterceptor.a Lcom/l7tech/identity/User;
      // 08: getstatic com/l7tech/gateway/common/security/rbac/OperationType.UPDATE Lcom/l7tech/gateway/common/security/rbac/OperationType;
      // 0b: getstatic com/l7tech/objectmodel/EntityType.SSG_KEYSTORE Lcom/l7tech/objectmodel/EntityType;
      // 0e: invokeinterface com/l7tech/server/security/rbac/RbacServices.isPermittedForAnyEntityOfType (Lcom/l7tech/identity/User;Lcom/l7tech/gateway/common/security/rbac/OperationType;Lcom/l7tech/objectmodel/EntityType;)Z 4
      // 13: ifne 40
      // 16: aload 1
      // 17: invokeinterface com/l7tech/gateway/common/security/PrivateKeySecured.allowNonFatalPreChecks ()Z 1
      // 1c: ifeq 2c
      // 1f: goto 26
      // 22: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 25: athrow
      // 26: bipush 0
      // 27: ireturn
      // 28: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 2b: athrow
      // 2c: new com/l7tech/gateway/common/security/rbac/PermissionDeniedException
      // 2f: dup
      // 30: getstatic com/l7tech/gateway/common/security/rbac/OperationType.UPDATE Lcom/l7tech/gateway/common/security/rbac/OperationType;
      // 33: getstatic com/l7tech/objectmodel/EntityType.SSG_KEYSTORE Lcom/l7tech/objectmodel/EntityType;
      // 36: getstatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.c [Ljava/lang/String;
      // 39: bipush 10
      // 3b: aaload
      // 3c: invokespecial com/l7tech/gateway/common/security/rbac/PermissionDeniedException.<init> (Lcom/l7tech/gateway/common/security/rbac/OperationType;Lcom/l7tech/objectmodel/EntityType;Ljava/lang/String;)V
      // 3f: athrow
      // 40: bipush 1
      // 41: ireturn
      // try (0 -> 11): 12 com/l7tech/objectmodel/FindException
      // try (8 -> 16): 16 com/l7tech/objectmodel/FindException
   }

   private void a() throws FindException {
      try {
         if (!this.rbacServices.isPermittedForAnyEntityOfType(this.a, OperationType.DELETE, EntityType.SSG_KEY_ENTRY)) {
            throw new PermissionDeniedException(OperationType.DELETE, EntityType.SSG_KEY_ENTRY, c[3]);
         }
      } catch (FindException var1) {
         throw a(var1);
      }
   }

   private void b(SsgKeyEntry var1, OperationType var2) throws FindException, KeyStoreException {
      if (var2 == OperationType.UPDATE) {
         this.b((Entity)var1, OperationType.UPDATE);
         this.b(var1.getKeystoreId(), OperationType.UPDATE);
         SsgKeyEntry var3 = this.a(var1.getKeystoreId(), var1.getAlias());
         this.b((Entity)var3, OperationType.UPDATE);
      } else {
         String var10002 = String.valueOf(var2);
         String[] var4 = c;
         throw new IllegalArgumentException(var4[23] + var10002 + var4[0]);
      }
   }

   private static boolean a(@NotNull Class<?> param0) {
      // $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: ifnonnull 0f
      // 04: bipush 1
      // 05: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (I)V
      // 08: goto 0f
      // 0b: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 0e: athrow
      // 0f: aload 0
      // 10: invokevirtual java/lang/Class.isPrimitive ()Z
      // 13: ifne 43
      // 16: getstatic java/lang/Void.TYPE Ljava/lang/Class;
      // 19: aload 0
      // 1a: if_acmpeq 43
      // 1d: goto 24
      // 20: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 23: athrow
      // 24: aload 0
      // 25: invokevirtual java/lang/Class.isArray ()Z
      // 28: ifeq 4b
      // 2b: goto 32
      // 2e: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 31: athrow
      // 32: aload 0
      // 33: invokevirtual java/lang/Class.getComponentType ()Ljava/lang/Class;
      // 36: invokevirtual java/lang/Class.isPrimitive ()Z
      // 39: ifeq 4b
      // 3c: goto 43
      // 3f: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 42: athrow
      // 43: bipush 1
      // 44: goto 4c
      // 47: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 4a: athrow
      // 4b: bipush 0
      // 4c: ireturn
      // try (0 -> 4): 5 java/lang/IllegalStateException
      // try (7 -> 13): 14 java/lang/IllegalStateException
      // try (10 -> 19): 20 java/lang/IllegalStateException
      // try (16 -> 26): 27 java/lang/IllegalStateException
      // try (22 -> 31): 31 java/lang/IllegalStateException
   }

   private static boolean a(@NotNull Class param0, @NotNull Class param1, @Nullable Object 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 0
      // 01: ifnonnull 0f
      // 04: bipush 2
      // 05: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (I)V
      // 08: goto 0f
      // 0b: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 0e: athrow
      // 0f: aload 1
      // 10: ifnonnull 1e
      // 13: bipush 3
      // 14: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (I)V
      // 17: goto 1e
      // 1a: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 1d: athrow
      // 1e: bipush 0
      // 1f: istore 3
      // 20: aload 2
      // 21: ifnull 86
      // 24: ldc java/util/List
      // 26: aload 1
      // 27: invokevirtual java/lang/Class.isAssignableFrom (Ljava/lang/Class;)Z
      // 2a: ifeq 86
      // 2d: goto 34
      // 30: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 33: athrow
      // 34: ldc java/util/List
      // 36: aload 2
      // 37: invokevirtual java/lang/Class.isInstance (Ljava/lang/Object;)Z
      // 3a: ifeq 86
      // 3d: goto 44
      // 40: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 43: athrow
      // 44: aload 2
      // 45: checkcast java/util/List
      // 48: astore 4
      // 4a: bipush 0
      // 4b: istore 5
      // 4d: aload 4
      // 4f: invokeinterface java/util/List.iterator ()Ljava/util/Iterator; 1
      // 54: astore 6
      // 56: aload 6
      // 58: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 5d: ifeq 7b
      // 60: aload 6
      // 62: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 67: astore 7
      // 69: aload 0
      // 6a: aload 7
      // 6c: invokevirtual java/lang/Class.isInstance (Ljava/lang/Object;)Z
      // 6f: ifne 78
      // 72: bipush 1
      // 73: istore 5
      // 75: goto 7b
      // 78: goto 56
      // 7b: iload 5
      // 7d: ifne 86
      // 80: bipush 1
      // 81: ireturn
      // 82: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 85: athrow
      // 86: iload 3
      // 87: ireturn
      // try (0 -> 4): 5 java/lang/IllegalStateException
      // try (7 -> 11): 12 java/lang/IllegalStateException
      // try (16 -> 22): 23 java/lang/IllegalStateException
      // try (18 -> 29): 30 java/lang/IllegalStateException
      // try (54 -> 58): 58 java/lang/IllegalStateException
   }

   @Override
   public void setUser(@NotNull User var1) {
      try {
         if (var1 == null) {
            a(4);
         }
      } catch (IllegalStateException var2) {
         throw a(var2);
      }

      this.a = var1;
   }

   @NotNull
   public SsgKeyFinder findKeystore(Goid param1) throws FindException, KeyStoreException {
      // $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: invokestatic com/l7tech/objectmodel/Goid.isDefault (Lcom/l7tech/objectmodel/Goid;)Z
      // 04: ifeq 19
      // 07: new java/lang/IllegalArgumentException
      // 0a: dup
      // 0b: getstatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.c [Ljava/lang/String;
      // 0e: bipush 22
      // 10: aaload
      // 11: invokespecial java/lang/IllegalArgumentException.<init> (Ljava/lang/String;)V
      // 14: athrow
      // 15: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 18: athrow
      // 19: aload 0
      // 1a: getfield com/l7tech/server/admin/PrivateKeyRbacInterceptor.b Ljava/util/Map;
      // 1d: aload 1
      // 1e: invokeinterface java/util/Map.get (Ljava/lang/Object;)Ljava/lang/Object; 2
      // 23: checkcast com/l7tech/server/security/keystore/SsgKeyFinder
      // 26: astore 2
      // 27: aload 2
      // 28: ifnull 43
      // 2b: aload 2
      // 2c: dup
      // 2d: ifnonnull 42
      // 30: goto 37
      // 33: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 36: athrow
      // 37: bipush 5
      // 38: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (I)V
      // 3b: goto 42
      // 3e: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 41: athrow
      // 42: areturn
      // 43: aload 0
      // 44: getfield com/l7tech/server/admin/PrivateKeyRbacInterceptor.ssgKeyStoreManager Lcom/l7tech/server/security/keystore/SsgKeyStoreManager;
      // 47: aload 1
      // 48: invokeinterface com/l7tech/server/security/keystore/SsgKeyStoreManager.findByPrimaryKey (Lcom/l7tech/objectmodel/Goid;)Lcom/l7tech/server/security/keystore/SsgKeyFinder; 2
      // 4d: astore 2
      // 4e: aload 2
      // 4f: ifnonnull 6e
      // 52: new com/l7tech/objectmodel/ObjectNotFoundException
      // 55: dup
      // 56: aload 1
      // 57: invokestatic java/lang/String.valueOf (Ljava/lang/Object;)Ljava/lang/String;
      // 5a: getstatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.c [Ljava/lang/String;
      // 5d: bipush 26
      // 5f: aaload
      // 60: swap
      // 61: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001" ]
      // 66: invokespecial com/l7tech/objectmodel/ObjectNotFoundException.<init> (Ljava/lang/String;)V
      // 69: athrow
      // 6a: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 6d: athrow
      // 6e: aload 0
      // 6f: getfield com/l7tech/server/admin/PrivateKeyRbacInterceptor.b Ljava/util/Map;
      // 72: aload 1
      // 73: aload 2
      // 74: invokeinterface java/util/Map.put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 3
      // 79: pop
      // 7a: aload 2
      // 7b: dup
      // 7c: ifnonnull 8b
      // 7f: bipush 6
      // 81: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (I)V
      // 84: goto 8b
      // 87: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 8a: athrow
      // 8b: areturn
      // try (0 -> 10): 10 com/l7tech/objectmodel/FindException
      // try (18 -> 23): 24 com/l7tech/objectmodel/FindException
      // try (20 -> 28): 29 com/l7tech/objectmodel/FindException
      // try (37 -> 50): 50 com/l7tech/objectmodel/FindException
      // try (52 -> 63): 64 com/l7tech/objectmodel/FindException
   }

   @NotNull
   private SsgKeyEntry a(Goid var1, String var2, SsgKeyMetadata var3) {
      SsgKeyEntry var4 = SsgKeyEntry.createDummyEntityForAuditing(var1, var2);

      try {
         var4.attachMetadata(var3);
         if (var4 == null) {
            a(7);
         }

         return var4;
      } catch (IllegalStateException var5) {
         throw a(var5);
      }
   }

   @NotNull
   SsgKeyEntry a(@NotNull SsgKeyFinder var1, @NotNull String var2) throws ObjectNotFoundException, KeyStoreException {
      try {
         if (var1 == null) {
            a(8);
         }
      } catch (ObjectNotFoundException var4) {
         throw a(var4);
      }

      try {
         if (var2 == null) {
            a(9);
         }
      } catch (ObjectNotFoundException var5) {
         throw a(var5);
      }

      try {
         SsgKeyEntry var10000 = var1.getCertificateChain(var2);
         if (var10000 == null) {
            a(10);
         }

         return var10000;
      } catch (ObjectNotFoundException var3) {
         throw a(var3);
      }
   }

   @NotNull
   SsgKeyEntry a(Goid var1, @NotNull String var2) throws FindException, KeyStoreException {
      try {
         if (var2 == null) {
            a(11);
         }
      } catch (FindException var4) {
         throw a(var4);
      }

      try {
         SsgKeyEntry var10000 = this.a(this.findKeystore(var1), var2);
         if (var10000 == null) {
            a(12);
         }

         return var10000;
      } catch (FindException var3) {
         throw a(var3);
      }
   }

   @Nullable
   private Collection<SsgKeyEntry> a(@Nullable Collection<?> var1, boolean var2) throws FindException, KeyStoreException {
      try {
         if (var1 == null) {
            return null;
         }
      } catch (FindException var9) {
         throw a(var9);
      }

      ArrayList var3 = new ArrayList();

      for (Object var5 : var1) {
         if (var5 instanceof SsgKeyEntry var6) {
            SsgKeyEntry var7 = this.b(var6, var2);

            try {
               if (var7 != null) {
                  var3.add(var7);
               }
            } catch (FindException var8) {
               throw a(var8);
            }
         }
      }

      return var3;
   }

   @Nullable
   private SsgKeyEntry a(SsgKeyEntry var1, boolean var2) throws FindException, KeyStoreException {
      return this.b(var1, var2);
   }

   @Nullable
   private SsgKeyEntry b(SsgKeyEntry param1, boolean param2) throws FindException, KeyStoreException {
      // $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: ifnull 7d
      // 04: aload 0
      // 05: getfield com/l7tech/server/admin/PrivateKeyRbacInterceptor.rbacServices Lcom/l7tech/server/security/rbac/RbacServices;
      // 08: aload 0
      // 09: getfield com/l7tech/server/admin/PrivateKeyRbacInterceptor.a Lcom/l7tech/identity/User;
      // 0c: aload 1
      // 0d: getstatic com/l7tech/gateway/common/security/rbac/OperationType.READ Lcom/l7tech/gateway/common/security/rbac/OperationType;
      // 10: aconst_null
      // 11: invokeinterface com/l7tech/server/security/rbac/RbacServices.isPermittedForEntity (Lcom/l7tech/identity/User;Lcom/l7tech/objectmodel/Entity;Lcom/l7tech/gateway/common/security/rbac/OperationType;Ljava/lang/String;)Z 5
      // 16: istore 3
      // 17: iload 3
      // 18: ifne 38
      // 1b: iload 2
      // 1c: ifeq 38
      // 1f: goto 26
      // 22: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 25: athrow
      // 26: new com/l7tech/gateway/common/security/rbac/PermissionDeniedException
      // 29: dup
      // 2a: getstatic com/l7tech/gateway/common/security/rbac/OperationType.READ Lcom/l7tech/gateway/common/security/rbac/OperationType;
      // 2d: getstatic com/l7tech/objectmodel/EntityType.SSG_KEY_ENTRY Lcom/l7tech/objectmodel/EntityType;
      // 30: invokespecial com/l7tech/gateway/common/security/rbac/PermissionDeniedException.<init> (Lcom/l7tech/gateway/common/security/rbac/OperationType;Lcom/l7tech/objectmodel/EntityType;)V
      // 33: athrow
      // 34: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 37: athrow
      // 38: aload 0
      // 39: aload 1
      // 3a: invokevirtual com/l7tech/gateway/common/security/keystore/SsgKeyEntry.getKeystoreId ()Lcom/l7tech/objectmodel/Goid;
      // 3d: getstatic com/l7tech/gateway/common/security/rbac/OperationType.READ Lcom/l7tech/gateway/common/security/rbac/OperationType;
      // 40: invokevirtual com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Lcom/l7tech/objectmodel/Goid;Lcom/l7tech/gateway/common/security/rbac/OperationType;)Z
      // 43: istore 4
      // 45: iload 4
      // 47: ifne 67
      // 4a: iload 2
      // 4b: ifeq 67
      // 4e: goto 55
      // 51: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 54: athrow
      // 55: new com/l7tech/gateway/common/security/rbac/PermissionDeniedException
      // 58: dup
      // 59: getstatic com/l7tech/gateway/common/security/rbac/OperationType.READ Lcom/l7tech/gateway/common/security/rbac/OperationType;
      // 5c: getstatic com/l7tech/objectmodel/EntityType.SSG_KEYSTORE Lcom/l7tech/objectmodel/EntityType;
      // 5f: invokespecial com/l7tech/gateway/common/security/rbac/PermissionDeniedException.<init> (Lcom/l7tech/gateway/common/security/rbac/OperationType;Lcom/l7tech/objectmodel/EntityType;)V
      // 62: athrow
      // 63: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 66: athrow
      // 67: iload 3
      // 68: ifeq 7d
      // 6b: iload 4
      // 6d: ifeq 7d
      // 70: goto 77
      // 73: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 76: athrow
      // 77: aload 1
      // 78: areturn
      // 79: invokestatic com/l7tech/server/admin/PrivateKeyRbacInterceptor.a (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 7c: athrow
      // 7d: aconst_null
      // 7e: areturn
      // try (11 -> 15): 16 com/l7tech/objectmodel/FindException
      // try (13 -> 24): 24 com/l7tech/objectmodel/FindException
      // try (32 -> 36): 37 com/l7tech/objectmodel/FindException
      // try (34 -> 45): 45 com/l7tech/objectmodel/FindException
      // try (47 -> 51): 52 com/l7tech/objectmodel/FindException
      // try (49 -> 56): 56 com/l7tech/objectmodel/FindException
   }

   private boolean a(Goid var1, OperationType var2) throws FindException, KeyStoreException {
      try {
         if (Goid.isDefault(var1)) {
            return this.rbacServices.isPermittedForAnyEntityOfType(this.a, var2, EntityType.SSG_KEYSTORE);
         }
      } catch (FindException var4) {
         throw a(var4);
      }

      SsgKeyFinder var3 = this.findKeystore(var1);
      return this.rbacServices.isPermittedForEntity(this.a, var3, var2, null);
   }

   private boolean a(Entity var1, OperationType var2) throws FindException {
      return this.rbacServices.isPermittedForEntity(this.a, var1, var2, null);
   }

   private void b(Entity var1, OperationType var2) throws FindException {
      try {
         if (!this.a(var1, var2)) {
            a(var2, var1, null);
         }
      } catch (FindException var3) {
         throw a(var3);
      }
   }

   private static void a(OperationType var0, Entity var1, @Nullable String var2) {
      try {
         if (var1 instanceof SsgKeyFinder) {
            throw new PermissionDeniedException(var0, EntityType.SSG_KEYSTORE, var2);
         }
      } catch (IllegalStateException var3) {
         throw a(var3);
      }

      throw new PermissionDeniedException(var0, var1, var2);
   }

   private void b(Goid var1, OperationType var2) throws FindException, KeyStoreException {
      if (!Goid.isDefault(var1)) {
         SsgKeyFinder var3 = this.findKeystore(var1);

         try {
            if (!this.rbacServices.isPermittedForEntity(this.a, var3, var2, null)) {
               throw new PermissionDeniedException(var2, EntityType.SSG_KEYSTORE);
            }
         } catch (FindException var5) {
            throw a(var5);
         }
      } else {
         try {
            if (!this.rbacServices.isPermittedForAnyEntityOfType(this.a, var2, EntityType.SSG_KEYSTORE)) {
               throw new PermissionDeniedException(var2, EntityType.SSG_KEYSTORE);
            }
         } catch (FindException var4) {
            throw a(var4);
         }
      }
   }

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

   static {
      String[] var5 = new String[34];
      int var3 = 0;
      String var2 = "\u0019O\u000ejH]]\u0019U\b:V][MC\u00191ZI\u0010eJ\u0005]\\E\u0015eUW[OC\u000feGVDPHR\u001aT[_XR\u0018\u0001CK{[G\u001e\u0003HFLKE\u0018:R][Hyu\u0018)S@L]\u0006\u0010/RZF]\u0006\b9O\\N\u0019v\u000f#PS]\\m\u00183tPHZo\u0013>C@J\\V\t%T\u0012EXE\u00169\u0006ryKO\u000b+RWb\\_./EG[\\B\u001f\\^\r%TF\tIT\u0014<GFL\u0019M\u00183\u0006iM\\J\u0018>C\u0012HUJ \u001aIM\u000f#\u000bABJK]+SFFNO\u000f/\u0006THPJ\b8C\u000eTG\u0004(C~@JR>&GAZ\f_O\u0013.mWP|H\t8_\u0006_O\u0013.C@\f\\J\u0018'C\\]zJ\u001c9U(lH\u001c(JW\tMI],O^]\\T]8CF\\KH]>_BL\u0019@\u00128\u0006_LMN\u0012.\u0006'XU\u000e#A\\\tJV\u0018)OSE\u0019M\u00183\u0006B\\KV\u00129C\u0012rLV\u0019+RW\tXJ\u0011\u0017\u0018IM\u000f#\u000b@Z\u0019G\b>IE@KC],G[ELT\u0018\u0007JC\t\u001fUW[,\u007fO\u000f9R\u0012D\\R\u0015%B\u0012HKA\b'C\\]\u0019K\b9R\u0012K\\\u0006\u001c$\u0006aZ^m\u00183c\\]K_\u0012ZT\u0018+RWoXM\u0018\u0001CKlWR\u000f32zS\u000f8C\\]\u0019S\u000e/T\u0012GVR]9CF\t_I\u000fjv@@OG\t/mWPkD\u001c)o\\]\\T\u001e/VFFKFxR]&CSZM\u0006\u0012$C\u0012yKC>\"CQB\u0019K\b9R\u0012K\\\u0006\u0019/E^HKC\u0019j\u000eQHW\u0006\b9C\u0012gvy-\u0018cmjqc>\u0001\u0006SZ\u0019H\u0012gIB\u0000\u0002\u0003\u0006\u0006PH\u000b%MW\bPU1#UFf_\f_O\u0013.mWP|H\t8_1ZI\u0010eJ\u0005]\\E\u0015eUW[OC\u000feGVDPHR\u001aT[_XR\u0018\u0001CK{[G\u001e\u0003HFLKE\u0018:R][\u001bOG\u0011#B\u0012B\\_\u000e>I@L~I\u0014.\u0006@LHS\u00148CV\tvV\u00188GF@VH\f_O\u0013.mWPJR\u00128C\u0004LU\u00188\u001bwI]!CKZMI\u000f/\u0006TFLH\u0019j@][\u0019A\u0012#B\u0012\u0017lH\u000f/E]NWO\u0007/B\u0012yKC>\"CQB\u0003\u0006\nPH\u000b%ES]PI\u0013\u0018PU($@[EMC\u000f+D^LkC\t?T\\}@V\u0018*yh\u0012>hGEU\u0006\u0010/RZF]\u0006X9\b\u0017Z\u0019K\b9R\u0012GVR]8CF\\KH]$S^E\bRC\u0004\u000bJ[HJ";
      int var4 = "\u0019O\u000ejH]]\u0019U\b:V][MC\u00191ZI\u0010eJ\u0005]\\E\u0015eUW[OC\u000feGVDPHR\u001aT[_XR\u0018\u0001CK{[G\u001e\u0003HFLKE\u0018:R][Hyu\u0018)S@L]\u0006\u0010/RZF]\u0006\b9O\\N\u0019v\u000f#PS]\\m\u00183tPHZo\u0013>C@J\\V\t%T\u0012EXE\u00169\u0006ryKO\u000b+RWb\\_./EG[\\B\u001f\\^\r%TF\tIT\u0014<GFL\u0019M\u00183\u0006iM\\J\u0018>C\u0012HUJ \u001aIM\u000f#\u000bABJK]+SFFNO\u000f/\u0006THPJ\b8C\u000eTG\u0004(C~@JR>&GAZ\f_O\u0013.mWP|H\t8_\u0006_O\u0013.C@\f\\J\u0018'C\\]zJ\u001c9U(lH\u001c(JW\tMI],O^]\\T]8CF\\KH]>_BL\u0019@\u00128\u0006_LMN\u0012.\u0006'XU\u000e#A\\\tJV\u0018)OSE\u0019M\u00183\u0006B\\KV\u00129C\u0012rLV\u0019+RW\tXJ\u0011\u0017\u0018IM\u000f#\u000b@Z\u0019G\b>IE@KC],G[ELT\u0018\u0007JC\t\u001fUW[,\u007fO\u000f9R\u0012D\\R\u0015%B\u0012HKA\b'C\\]\u0019K\b9R\u0012K\\\u0006\u001c$\u0006aZ^m\u00183c\\]K_\u0012ZT\u0018+RWoXM\u0018\u0001CKlWR\u000f32zS\u000f8C\\]\u0019S\u000e/T\u0012GVR]9CF\t_I\u000fjv@@OG\t/mWPkD\u001c)o\\]\\T\u001e/VFFKFxR]&CSZM\u0006\u0012$C\u0012yKC>\"CQB\u0019K\b9R\u0012K\\\u0006\u0019/E^HKC\u0019j\u000eQHW\u0006\b9C\u0012gvy-\u0018cmjqc>\u0001\u0006SZ\u0019H\u0012gIB\u0000\u0002\u0003\u0006\u0006PH\u000b%MW\bPU1#UFf_\f_O\u0013.mWP|H\t8_1ZI\u0010eJ\u0005]\\E\u0015eUW[OC\u000feGVDPHR\u001aT[_XR\u0018\u0001CK{[G\u001e\u0003HFLKE\u0018:R][\u001bOG\u0011#B\u0012B\\_\u000e>I@L~I\u0014.\u0006@LHS\u00148CV\tvV\u00188GF@VH\f_O\u0013.mWPJR\u00128C\u0004LU\u00188\u001bwI]!CKZMI\u000f/\u0006TFLH\u0019j@][\u0019A\u0012#B\u0012\u0017lH\u000f/E]NWO\u0007/B\u0012yKC>\"CQB\u0003\u0006\nPH\u000b%ES]PI\u0013\u0018PU($@[EMC\u000f+D^LkC\t?T\\}@V\u0018*yh\u0012>hGEU\u0006\u0010/RZF]\u0006X9\b\u0017Z\u0019K\b9R\u0012GVR]8CF\\KH]$S^E\bRC\u0004\u000bJ[HJ"
         .length();
      char var1 = 17;
      int var7 = -1;

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

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

                  var2 = "Sq\"\u0000jicr)\u0001\u0016nVcoL<\u0011{d&w{5\u0010dxhb)%\f}u&\u007fg6\u0000q=>W{5\u0010dxhb)4\n{=FXf&+|qj6y3\u0017hpcbl E.8u1)=\u0003)8u8,!Edhub)<\n}=ds)<\u0010eq";
                  var4 = "Sq\"\u0000jicr)\u0001\u0016nVcoL<\u0011{d&w{5\u0010dxhb)%\f}u&\u007fg6\u0000q=>W{5\u0010dxhb)4\n{=FXf&+|qj6y3\u0017hpcbl E.8u1)=\u0003)8u8,!Edhub)<\n}=ds)<\u0010eq"
                     .length();
                  var1 = ')';
                  var7 = -1;
            }

            var10000 = 26;
            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] ^ 28);
      }

      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 -> 12;
            case 1 -> 19;
            case 2 -> 72;
            case 3 -> 127;
            case 4 -> 19;
            case 5 -> 7;
            default -> 28;
         });
      }

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