package com.l7tech.server.identity.mapping;

import com.l7tech.identity.Identity;
import com.l7tech.identity.mapping.LdapAttributeMapping;
import java.util.logging.Logger;
import javax.naming.PartialResultException;

public class LdapAttributeExtractor extends a<LdapAttributeMapping> {
   private static final Logger a;
   private static final String[] c;

   protected LdapAttributeExtractor(LdapAttributeMapping var1) {
      super(var1);
   }

   @Override
   public Object[] extractValues(Identity 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:
      // 000: aload 0
      // 001: aload 1
      // 002: invokespecial com/l7tech/server/identity/mapping/a.extractValues (Lcom/l7tech/identity/Identity;)[Ljava/lang/Object;
      // 005: astore 2
      // 006: aload 2
      // 007: ifnull 01c
      // 00a: aload 2
      // 00b: arraylength
      // 00c: ifle 01c
      // 00f: goto 016
      // 012: invokestatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljavax/naming/PartialResultException;)Ljavax/naming/PartialResultException;
      // 015: athrow
      // 016: aload 2
      // 017: areturn
      // 018: invokestatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljavax/naming/PartialResultException;)Ljavax/naming/PartialResultException;
      // 01b: athrow
      // 01c: aload 0
      // 01d: getfield com/l7tech/server/identity/mapping/LdapAttributeExtractor.mapping Lcom/l7tech/identity/mapping/IdentityMapping;
      // 020: checkcast com/l7tech/identity/mapping/LdapAttributeMapping
      // 023: invokevirtual com/l7tech/identity/mapping/LdapAttributeMapping.getAttributeConfig ()Lcom/l7tech/identity/mapping/AttributeConfig;
      // 026: invokevirtual com/l7tech/identity/mapping/AttributeConfig.getHeader ()Lcom/l7tech/objectmodel/AttributeHeader;
      // 029: astore 3
      // 02a: aload 1
      // 02b: instanceof com/l7tech/identity/ldap/LdapIdentity
      // 02e: ifeq 04e
      // 031: aload 1
      // 032: checkcast com/l7tech/identity/ldap/LdapIdentity
      // 035: astore 4
      // 037: aload 3
      // 038: getstatic com/l7tech/objectmodel/AttributeHeader.SUBJECT_DN Lcom/l7tech/objectmodel/AttributeHeader;
      // 03b: if_acmpne 04e
      // 03e: aload 0
      // 03f: aload 4
      // 041: invokeinterface com/l7tech/identity/ldap/LdapIdentity.getDn ()Ljava/lang/String; 1
      // 046: invokevirtual com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljava/lang/Object;)[Ljava/lang/Object;
      // 049: areturn
      // 04a: invokestatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljavax/naming/PartialResultException;)Ljavax/naming/PartialResultException;
      // 04d: athrow
      // 04e: aload 1
      // 04f: instanceof com/l7tech/identity/ldap/LdapUser
      // 052: ifeq 069
      // 055: aload 0
      // 056: getfield com/l7tech/server/identity/mapping/LdapAttributeExtractor.mapping Lcom/l7tech/identity/mapping/IdentityMapping;
      // 059: checkcast com/l7tech/identity/mapping/LdapAttributeMapping
      // 05c: invokevirtual com/l7tech/identity/mapping/LdapAttributeMapping.isValidForUsers ()Z
      // 05f: ifne 08b
      // 062: goto 069
      // 065: invokestatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljavax/naming/PartialResultException;)Ljavax/naming/PartialResultException;
      // 068: athrow
      // 069: aload 1
      // 06a: instanceof com/l7tech/identity/ldap/LdapGroup
      // 06d: ifeq 1d7
      // 070: goto 077
      // 073: invokestatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljavax/naming/PartialResultException;)Ljavax/naming/PartialResultException;
      // 076: athrow
      // 077: aload 0
      // 078: getfield com/l7tech/server/identity/mapping/LdapAttributeExtractor.mapping Lcom/l7tech/identity/mapping/IdentityMapping;
      // 07b: checkcast com/l7tech/identity/mapping/LdapAttributeMapping
      // 07e: invokevirtual com/l7tech/identity/mapping/LdapAttributeMapping.isValidForGroups ()Z
      // 081: ifeq 1d7
      // 084: goto 08b
      // 087: invokestatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljavax/naming/PartialResultException;)Ljavax/naming/PartialResultException;
      // 08a: athrow
      // 08b: aload 1
      // 08c: checkcast com/l7tech/identity/ldap/LdapIdentity
      // 08f: astore 4
      // 091: aload 4
      // 093: invokeinterface com/l7tech/identity/ldap/LdapIdentity.getAttributes ()Ljavax/naming/directory/Attributes; 1
      // 098: astore 5
      // 09a: aload 5
      // 09c: ifnull 0b1
      // 09f: aload 5
      // 0a1: invokeinterface javax/naming/directory/Attributes.size ()I 1
      // 0a6: bipush 1
      // 0a7: if_icmpge 0ba
      // 0aa: goto 0b1
      // 0ad: invokestatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljavax/naming/PartialResultException;)Ljavax/naming/PartialResultException;
      // 0b0: athrow
      // 0b1: bipush 0
      // 0b2: anewarray 88
      // 0b5: areturn
      // 0b6: invokestatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljavax/naming/PartialResultException;)Ljavax/naming/PartialResultException;
      // 0b9: athrow
      // 0ba: aload 5
      // 0bc: aload 0
      // 0bd: getfield com/l7tech/server/identity/mapping/LdapAttributeExtractor.mapping Lcom/l7tech/identity/mapping/IdentityMapping;
      // 0c0: checkcast com/l7tech/identity/mapping/LdapAttributeMapping
      // 0c3: invokevirtual com/l7tech/identity/mapping/LdapAttributeMapping.getCustomAttributeName ()Ljava/lang/String;
      // 0c6: invokeinterface javax/naming/directory/Attributes.get (Ljava/lang/String;)Ljavax/naming/directory/Attribute; 2
      // 0cb: astore 6
      // 0cd: aload 6
      // 0cf: ifnonnull 104
      // 0d2: new javax/naming/directory/NoSuchAttributeException
      // 0d5: dup
      // 0d6: aload 0
      // 0d7: getfield com/l7tech/server/identity/mapping/LdapAttributeExtractor.mapping Lcom/l7tech/identity/mapping/IdentityMapping;
      // 0da: checkcast com/l7tech/identity/mapping/LdapAttributeMapping
      // 0dd: invokevirtual com/l7tech/identity/mapping/LdapAttributeMapping.getCustomAttributeName ()Ljava/lang/String;
      // 0e0: aload 4
      // 0e2: invokeinterface com/l7tech/identity/ldap/LdapIdentity.getDn ()Ljava/lang/String; 1
      // 0e7: getstatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.c [Ljava/lang/String;
      // 0ea: bipush 2
      // 0eb: aaload
      // 0ec: dup_x2
      // 0ed: pop
      // 0ee: getstatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.c [Ljava/lang/String;
      // 0f1: bipush 6
      // 0f3: aaload
      // 0f4: swap
      // 0f5: ldc "'"
      // 0f7: invokedynamic makeConcatWithConstants (Ljava/lang/String;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\u0001" ]
      // 0fc: invokespecial javax/naming/directory/NoSuchAttributeException.<init> (Ljava/lang/String;)V
      // 0ff: athrow
      // 100: invokestatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljavax/naming/PartialResultException;)Ljavax/naming/PartialResultException;
      // 103: athrow
      // 104: aload 0
      // 105: getfield com/l7tech/server/identity/mapping/LdapAttributeExtractor.mapping Lcom/l7tech/identity/mapping/IdentityMapping;
      // 108: checkcast com/l7tech/identity/mapping/LdapAttributeMapping
      // 10b: invokevirtual com/l7tech/identity/mapping/LdapAttributeMapping.isMultivalued ()Z
      // 10e: ifeq 173
      // 111: aload 6
      // 113: invokeinterface javax/naming/directory/Attribute.size ()I 1
      // 118: bipush 1
      // 119: if_icmple 173
      // 11c: goto 123
      // 11f: invokestatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljavax/naming/PartialResultException;)Ljavax/naming/PartialResultException;
      // 122: athrow
      // 123: new java/util/ArrayList
      // 126: dup
      // 127: invokespecial java/util/ArrayList.<init> ()V
      // 12a: astore 7
      // 12c: aload 6
      // 12e: invokeinterface javax/naming/directory/Attribute.getAll ()Ljavax/naming/NamingEnumeration; 1
      // 133: astore 8
      // 135: aload 8
      // 137: invokeinterface javax/naming/NamingEnumeration.hasMore ()Z 1
      // 13c: ifeq 161
      // 13f: aload 8
      // 141: invokeinterface javax/naming/NamingEnumeration.next ()Ljava/lang/Object; 1
      // 146: astore 9
      // 148: aload 9
      // 14a: ifnull 15e
      // 14d: aload 7
      // 14f: aload 9
      // 151: invokeinterface java/util/List.add (Ljava/lang/Object;)Z 2
      // 156: pop
      // 157: goto 15e
      // 15a: invokestatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljavax/naming/PartialResultException;)Ljavax/naming/PartialResultException;
      // 15d: athrow
      // 15e: goto 135
      // 161: goto 16b
      // 164: astore 8
      // 166: aload 8
      // 168: invokestatic com/l7tech/server/identity/ldap/LdapUtils.handlePartialResultException (Ljavax/naming/NamingException;)V
      // 16b: aload 7
      // 16d: invokeinterface java/util/List.toArray ()[Ljava/lang/Object; 1
      // 172: areturn
      // 173: bipush 1
      // 174: anewarray 88
      // 177: dup
      // 178: bipush 0
      // 179: aload 6
      // 17b: bipush 0
      // 17c: invokeinterface javax/naming/directory/Attribute.get (I)Ljava/lang/Object; 2
      // 181: aastore
      // 182: areturn
      // 183: astore 7
      // 185: getstatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a Ljava/util/logging/Logger;
      // 188: getstatic java/util/logging/Level.INFO Ljava/util/logging/Level;
      // 18b: aload 0
      // 18c: getfield com/l7tech/server/identity/mapping/LdapAttributeExtractor.mapping Lcom/l7tech/identity/mapping/IdentityMapping;
      // 18f: checkcast com/l7tech/identity/mapping/LdapAttributeMapping
      // 192: invokevirtual com/l7tech/identity/mapping/LdapAttributeMapping.getCustomAttributeName ()Ljava/lang/String;
      // 195: aload 4
      // 197: invokeinterface com/l7tech/identity/ldap/LdapIdentity.getDn ()Ljava/lang/String; 1
      // 19c: getstatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.c [Ljava/lang/String;
      // 19f: astore 10
      // 1a1: aload 10
      // 1a3: bipush 5
      // 1a4: aaload
      // 1a5: dup_x2
      // 1a6: pop
      // 1a7: aload 10
      // 1a9: bipush 3
      // 1aa: aaload
      // 1ab: swap
      // 1ac: ldc "'"
      // 1ae: invokedynamic makeConcatWithConstants (Ljava/lang/String;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\u0001" ]
      // 1b3: invokevirtual java/util/logging/Logger.log (Ljava/util/logging/Level;Ljava/lang/String;)V
      // 1b6: bipush 0
      // 1b7: anewarray 88
      // 1ba: areturn
      // 1bb: astore 7
      // 1bd: getstatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a Ljava/util/logging/Logger;
      // 1c0: getstatic java/util/logging/Level.WARNING Ljava/util/logging/Level;
      // 1c3: getstatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.c [Ljava/lang/String;
      // 1c6: astore 10
      // 1c8: aload 10
      // 1ca: bipush 7
      // 1cc: aaload
      // 1cd: aload 7
      // 1cf: invokevirtual java/util/logging/Logger.log (Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
      // 1d2: bipush 0
      // 1d3: anewarray 88
      // 1d6: areturn
      // 1d7: aload 0
      // 1d8: getfield com/l7tech/server/identity/mapping/LdapAttributeExtractor.mapping Lcom/l7tech/identity/mapping/IdentityMapping;
      // 1db: checkcast com/l7tech/identity/mapping/LdapAttributeMapping
      // 1de: invokevirtual com/l7tech/identity/mapping/LdapAttributeMapping.isValidForGroups ()Z
      // 1e1: ifeq 1f1
      // 1e4: getstatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.c [Ljava/lang/String;
      // 1e7: bipush 8
      // 1e9: aaload
      // 1ea: goto 1fa
      // 1ed: invokestatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a (Ljavax/naming/PartialResultException;)Ljavax/naming/PartialResultException;
      // 1f0: athrow
      // 1f1: getstatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.c [Ljava/lang/String;
      // 1f4: astore 10
      // 1f6: aload 10
      // 1f8: bipush 0
      // 1f9: aaload
      // 1fa: astore 4
      // 1fc: getstatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.a Ljava/util/logging/Logger;
      // 1ff: aload 4
      // 201: aload 1
      // 202: invokeinterface com/l7tech/identity/Identity.getClass ()Ljava/lang/Class; 1
      // 207: invokevirtual java/lang/Class.getName ()Ljava/lang/String;
      // 20a: getstatic com/l7tech/server/identity/mapping/LdapAttributeExtractor.c [Ljava/lang/String;
      // 20d: astore 10
      // 20f: aload 10
      // 211: bipush 4
      // 212: aaload
      // 213: dup_x2
      // 214: pop
      // 215: aload 10
      // 217: bipush 1
      // 218: aaload
      // 219: swap
      // 21a: 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" ]
      // 21f: invokevirtual java/util/logging/Logger.fine (Ljava/lang/String;)V
      // 222: bipush 0
      // 223: anewarray 88
      // 226: areturn
      // try (140 -> 146): 147 javax/naming/PartialResultException
      // try (115 -> 124): 125 javax/naming/PartialResultException
      // try (90 -> 113): 113 javax/naming/PartialResultException
      // try (71 -> 81): 81 javax/naming/PartialResultException
      // try (69 -> 75): 76 javax/naming/PartialResultException
      // try (49 -> 60): 61 javax/naming/PartialResultException
      // try (41 -> 52): 53 javax/naming/PartialResultException
      // try (38 -> 46): 47 javax/naming/PartialResultException
      // try (28 -> 36): 36 javax/naming/PartialResultException
      // try (6 -> 14): 14 javax/naming/PartialResultException
      // try (4 -> 9): 10 javax/naming/PartialResultException
      // try (131 -> 150): 151 javax/naming/PartialResultException
      // try (90 -> 156): 166 javax/naming/directory/NoSuchAttributeException
      // try (157 -> 165): 166 javax/naming/directory/NoSuchAttributeException
      // try (90 -> 156): 192 javax/naming/NamingException
      // try (157 -> 165): 192 javax/naming/NamingException
      // try (205 -> 214): 214 javax/naming/PartialResultException
   }

   static {
      String[] var5 = new String[9];
      int var3 = 0;
      String var2 = "\u001f\fZ'r\u0010Q_V1dAC\u0003\u000bFuh\\\u0017\u000b_\u000b+\u000bK'hMB\u001e\u001a\u001fr\u000fM_V;!FS\u000f\u0011K<uV\u0017M $\u0010Ku`_G\u0006\u0016\\4cCRJR\u001f8`_G\u0003\u0011Xuh\\\u0017\f\u0010Mu\u0013$\u0010\u001f&tL_J\u001eK!sFU\u001f\u000bZu&\u0010M_Q:u\u000fQ\u0005\nQ1!FYJX";
      int var4 = "\u001f\fZ'r\u0010Q_V1dAC\u0003\u000bFuh\\\u0017\u000b_\u000b+\u000bK'hMB\u001e\u001a\u001fr\u000fM_V;!FS\u000f\u0011K<uV\u0017M $\u0010Ku`_G\u0006\u0016\\4cCRJR\u001f8`_G\u0003\u0011Xuh\\\u0017\f\u0010Mu\u0013$\u0010\u001f&tL_J\u001eK!sFU\u001f\u000bZu&\u0010M_Q:u\u000fQ\u0005\nQ1!FYJX"
         .length();
      char var1 = 5;
      int var7 = -1;

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

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

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

                  var2 = "zC\u0019j6\u0012CM\f\u000bc&\\%MX\u001eo0\t\u0010\\\u0004\u001f/\u0006^^\u0003s\"\u000f";
                  var4 = "zC\u0019j6\u0012CM\f\u000bc&\\%MX\u001eo0\t\u0010\\\u0004\u001f/\u0006^^\u0003s\"\u000f".length();
                  var1 = 25;
                  var7 = -1;
            }

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

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

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

      return var10000;
   }

   private static String b(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 -> 1;
            case 1 -> 20;
            case 2 -> 84;
            case 3 -> 62;
            case 4 -> 106;
            case 5 -> 68;
            default -> 92;
         });
      }

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