package com.l7tech.server.identity;

import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.util.CollectionUtils;
import java.util.Set;

class e {
   private static final Set<String> a;
   private final Goid b;
   private final String c;
   private final Goid d;
   private final String e;
   private final int f;

   // $VF: Handled exception range with multiple entry points by splitting it
   // $VF: Duplicated exception handlers to handle obfuscated exceptions
   private e(Goid var1, String var2, Goid var3, String var4) {
      label17: {
         if (var2 != null) {
            try {
               if (var4 != null) {
                  break label17;
               }
            } catch (NullPointerException var6) {
               throw a(var6);
            }
         }

         try {
            throw new NullPointerException();
         } catch (NullPointerException var5) {
            throw a(var5);
         }
      }

      this.b = var1;
      this.c = var2;
      this.d = var3;
      this.e = var4;
      this.f = this.b();
   }

   private boolean a() {
      // $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/identity/e.c Ljava/lang/String;
      // 04: invokevirtual java/lang/String.isEmpty ()Z
      // 07: ifne 28
      // 0a: getstatic com/l7tech/server/identity/e.a Ljava/util/Set;
      // 0d: aload 0
      // 0e: getfield com/l7tech/server/identity/e.c Ljava/lang/String;
      // 11: invokeinterface java/util/Set.contains (Ljava/lang/Object;)Z 2
      // 16: ifne 28
      // 19: goto 20
      // 1c: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 1f: athrow
      // 20: bipush 1
      // 21: goto 29
      // 24: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 27: athrow
      // 28: bipush 0
      // 29: ireturn
      // try (0 -> 9): 10 java/lang/NullPointerException
      // try (4 -> 14): 14 java/lang/NullPointerException
   }

   @Override
   public boolean equals(Object 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 0
      // 01: aload 1
      // 02: if_acmpne 0b
      // 05: bipush 1
      // 06: ireturn
      // 07: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 0a: athrow
      // 0b: aload 1
      // 0c: ifnull 21
      // 0f: aload 0
      // 10: invokevirtual java/lang/Object.getClass ()Ljava/lang/Class;
      // 13: aload 1
      // 14: invokevirtual java/lang/Object.getClass ()Ljava/lang/Class;
      // 17: if_acmpeq 27
      // 1a: goto 21
      // 1d: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 20: athrow
      // 21: bipush 0
      // 22: ireturn
      // 23: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 26: athrow
      // 27: aload 1
      // 28: checkcast com/l7tech/server/identity/e
      // 2b: astore 2
      // 2c: aload 0
      // 2d: getfield com/l7tech/server/identity/e.d Lcom/l7tech/objectmodel/Goid;
      // 30: ifnull 4f
      // 33: aload 0
      // 34: getfield com/l7tech/server/identity/e.d Lcom/l7tech/objectmodel/Goid;
      // 37: aload 2
      // 38: getfield com/l7tech/server/identity/e.d Lcom/l7tech/objectmodel/Goid;
      // 3b: invokevirtual com/l7tech/objectmodel/Goid.equals (Ljava/lang/Object;)Z
      // 3e: ifne 5c
      // 41: goto 48
      // 44: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 47: athrow
      // 48: goto 56
      // 4b: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 4e: athrow
      // 4f: aload 2
      // 50: getfield com/l7tech/server/identity/e.d Lcom/l7tech/objectmodel/Goid;
      // 53: ifnull 5c
      // 56: bipush 0
      // 57: ireturn
      // 58: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 5b: athrow
      // 5c: aload 0
      // 5d: getfield com/l7tech/server/identity/e.b Lcom/l7tech/objectmodel/Goid;
      // 60: ifnull 7f
      // 63: aload 0
      // 64: getfield com/l7tech/server/identity/e.b Lcom/l7tech/objectmodel/Goid;
      // 67: aload 2
      // 68: getfield com/l7tech/server/identity/e.b Lcom/l7tech/objectmodel/Goid;
      // 6b: invokevirtual com/l7tech/objectmodel/Goid.equals (Ljava/lang/Object;)Z
      // 6e: ifne 8c
      // 71: goto 78
      // 74: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 77: athrow
      // 78: goto 86
      // 7b: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 7e: athrow
      // 7f: aload 2
      // 80: getfield com/l7tech/server/identity/e.b Lcom/l7tech/objectmodel/Goid;
      // 83: ifnull 8c
      // 86: bipush 0
      // 87: ireturn
      // 88: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 8b: athrow
      // 8c: aload 0
      // 8d: getfield com/l7tech/server/identity/e.e Ljava/lang/String;
      // 90: aload 2
      // 91: getfield com/l7tech/server/identity/e.e Ljava/lang/String;
      // 94: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 97: ifne a0
      // 9a: bipush 0
      // 9b: ireturn
      // 9c: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 9f: athrow
      // a0: aload 0
      // a1: getfield com/l7tech/server/identity/e.c Ljava/lang/String;
      // a4: aload 2
      // a5: getfield com/l7tech/server/identity/e.c Ljava/lang/String;
      // a8: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // ab: ifne b4
      // ae: bipush 0
      // af: ireturn
      // b0: invokestatic com/l7tech/server/identity/e.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // b3: athrow
      // b4: bipush 1
      // b5: ireturn
      // try (0 -> 5): 5 java/lang/NullPointerException
      // try (7 -> 14): 15 java/lang/NullPointerException
      // try (9 -> 19): 19 java/lang/NullPointerException
      // try (24 -> 33): 34 java/lang/NullPointerException
      // try (27 -> 37): 37 java/lang/NullPointerException
      // try (39 -> 44): 44 java/lang/NullPointerException
      // try (46 -> 55): 56 java/lang/NullPointerException
      // try (49 -> 59): 59 java/lang/NullPointerException
      // try (61 -> 66): 66 java/lang/NullPointerException
      // try (68 -> 76): 76 java/lang/NullPointerException
      // try (78 -> 86): 86 java/lang/NullPointerException
   }

   @Override
   public int hashCode() {
      return this.f;
   }

   private int b() {
      int var10000;
      label30: {
         try {
            if (this.b != null) {
               var10000 = this.b.hashCode();
               break label30;
            }
         } catch (NullPointerException var3) {
            throw a(var3);
         }

         var10000 = 0;
      }

      int var1 = var10000;
      var1 = 29 * var1 + this.c.hashCode();

      int var10001;
      label22: {
         try {
            var10000 = 29 * var1;
            if (this.d != null) {
               var10001 = this.d.hashCode();
               break label22;
            }
         } catch (NullPointerException var2) {
            throw a(var2);
         }

         var10001 = 0;
      }

      var1 = var10000 + var10001;
      return 29 * var1 + this.e.hashCode();
   }

   static {
      String var10002 = a(31, a("E="));
      byte var10001 = -1;
      String var0 = var10002;
      a = CollectionUtils.set(new String[]{var0, Goid.toString(PersistentEntity.DEFAULT_GOID)});
   }

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

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

      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 -> 119;
            case 1 -> 19;
            case 2 -> 80;
            case 3 -> 86;
            case 4 -> 116;
            case 5 -> 26;
            default -> 9;
         });
      }

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