package com.l7tech.objectmodel;

import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;

@XmlRootElement(name = "entityHeaderRef")
public class EntityHeaderRef implements Serializable, Comparable {
   protected EntityType type;
   protected String strId;
   static final long serialVersionUID = -5436478494857722183L;
   private static final String[] a;

   public EntityHeaderRef(EntityType var1, String var2) {
      this.type = var1;
      this.strId = var2;
   }

   public static EntityHeaderRef fromOther(EntityHeaderRef var0) {
      return new EntityHeaderRef(var0.getType(), var0.getStrId());
   }

   protected EntityHeaderRef() {
   }

   @XmlAttribute
   public EntityType getType() {
      return this.type;
   }

   public void setType(EntityType var1) {
      this.type = var1;
   }

   @XmlAttribute
   public String getStrId() {
      return this.strId;
   }

   public void setStrId(String var1) {
      this.strId = var1;
   }

   @Override
   public int compareTo(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 1
      // 01: ifnonnull 10
      // 04: new java/lang/NullPointerException
      // 07: dup
      // 08: invokespecial java/lang/NullPointerException.<init> ()V
      // 0b: athrow
      // 0c: invokestatic com/l7tech/objectmodel/EntityHeaderRef.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 0f: athrow
      // 10: aload 1
      // 11: checkcast com/l7tech/objectmodel/EntityHeaderRef
      // 14: astore 2
      // 15: aload 0
      // 16: getfield com/l7tech/objectmodel/EntityHeaderRef.type Lcom/l7tech/objectmodel/EntityType;
      // 19: aload 2
      // 1a: getfield com/l7tech/objectmodel/EntityHeaderRef.type Lcom/l7tech/objectmodel/EntityType;
      // 1d: if_acmpne 5f
      // 20: aload 0
      // 21: getfield com/l7tech/objectmodel/EntityHeaderRef.strId Ljava/lang/String;
      // 24: ifnull 4e
      // 27: goto 2e
      // 2a: invokestatic com/l7tech/objectmodel/EntityHeaderRef.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 2d: athrow
      // 2e: aload 2
      // 2f: getfield com/l7tech/objectmodel/EntityHeaderRef.strId Ljava/lang/String;
      // 32: ifnull 4e
      // 35: goto 3c
      // 38: invokestatic com/l7tech/objectmodel/EntityHeaderRef.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 3b: athrow
      // 3c: aload 0
      // 3d: getfield com/l7tech/objectmodel/EntityHeaderRef.strId Ljava/lang/String;
      // 40: aload 2
      // 41: getfield com/l7tech/objectmodel/EntityHeaderRef.strId Ljava/lang/String;
      // 44: invokevirtual java/lang/String.compareTo (Ljava/lang/String;)I
      // 47: goto 5e
      // 4a: invokestatic com/l7tech/objectmodel/EntityHeaderRef.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 4d: athrow
      // 4e: aload 0
      // 4f: getfield com/l7tech/objectmodel/EntityHeaderRef.strId Ljava/lang/String;
      // 52: ifnonnull 5d
      // 55: bipush -1
      // 56: goto 5e
      // 59: invokestatic com/l7tech/objectmodel/EntityHeaderRef.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 5c: athrow
      // 5d: bipush 1
      // 5e: ireturn
      // 5f: aload 0
      // 60: getfield com/l7tech/objectmodel/EntityHeaderRef.type Lcom/l7tech/objectmodel/EntityType;
      // 63: aload 2
      // 64: getfield com/l7tech/objectmodel/EntityHeaderRef.type Lcom/l7tech/objectmodel/EntityType;
      // 67: invokevirtual com/l7tech/objectmodel/EntityType.compareTo (Ljava/lang/Enum;)I
      // 6a: ireturn
      // try (0 -> 6): 6 java/lang/NullPointerException
      // try (11 -> 19): 20 java/lang/NullPointerException
      // try (16 -> 25): 26 java/lang/NullPointerException
      // try (22 -> 34): 34 java/lang/NullPointerException
      // try (36 -> 41): 41 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/objectmodel/EntityHeaderRef.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 0a: athrow
      // 0b: aload 1
      // 0c: instanceof com/l7tech/objectmodel/EntityHeaderRef
      // 0f: ifne 18
      // 12: bipush 0
      // 13: ireturn
      // 14: invokestatic com/l7tech/objectmodel/EntityHeaderRef.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 17: athrow
      // 18: aload 1
      // 19: checkcast com/l7tech/objectmodel/EntityHeaderRef
      // 1c: astore 2
      // 1d: aload 0
      // 1e: getfield com/l7tech/objectmodel/EntityHeaderRef.strId Ljava/lang/String;
      // 21: ifnull 40
      // 24: aload 0
      // 25: getfield com/l7tech/objectmodel/EntityHeaderRef.strId Ljava/lang/String;
      // 28: aload 2
      // 29: getfield com/l7tech/objectmodel/EntityHeaderRef.strId Ljava/lang/String;
      // 2c: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 2f: ifne 47
      // 32: goto 39
      // 35: invokestatic com/l7tech/objectmodel/EntityHeaderRef.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 38: athrow
      // 39: goto 61
      // 3c: invokestatic com/l7tech/objectmodel/EntityHeaderRef.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 3f: athrow
      // 40: aload 2
      // 41: getfield com/l7tech/objectmodel/EntityHeaderRef.strId Ljava/lang/String;
      // 44: ifnonnull 61
      // 47: aload 0
      // 48: getfield com/l7tech/objectmodel/EntityHeaderRef.type Lcom/l7tech/objectmodel/EntityType;
      // 4b: aload 2
      // 4c: getfield com/l7tech/objectmodel/EntityHeaderRef.type Lcom/l7tech/objectmodel/EntityType;
      // 4f: if_acmpne 61
      // 52: goto 59
      // 55: invokestatic com/l7tech/objectmodel/EntityHeaderRef.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 58: athrow
      // 59: bipush 1
      // 5a: goto 62
      // 5d: invokestatic com/l7tech/objectmodel/EntityHeaderRef.a (Ljava/lang/NullPointerException;)Ljava/lang/NullPointerException;
      // 60: athrow
      // 61: bipush 0
      // 62: ireturn
      // try (0 -> 5): 5 java/lang/NullPointerException
      // try (7 -> 12): 12 java/lang/NullPointerException
      // try (17 -> 26): 27 java/lang/NullPointerException
      // try (20 -> 30): 30 java/lang/NullPointerException
      // try (32 -> 40): 41 java/lang/NullPointerException
      // try (35 -> 45): 45 java/lang/NullPointerException
   }

   @Override
   public int hashCode() {
      int var10000;
      label30: {
         try {
            if (this.type != null) {
               var10000 = this.type.hashCode();
               break label30;
            }
         } catch (NullPointerException var3) {
            throw a(var3);
         }

         var10000 = 0;
      }

      int var1 = var10000;

      try {
         var10000 = 31 * var1;
         if (this.strId != null) {
            return var10000 + this.strId.hashCode();
         }
      } catch (NullPointerException var2) {
         throw a(var2);
      }

      return var10000 + 0;
   }

   @Override
   public String toString() {
      String var10000 = String.valueOf(this.type);
      String[] var1 = a;
      return var1[0] + var10000 + var1[1] + this.strId;
   }

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

   static {
      String[] var5 = new String[2];
      int var3 = 0;
      String var2 = "3-el>\u001bW\u0013\"u`80z\u0010y1q3\u0012zK\u0004V*u8";
      int var4 = "3-el>\u001bW\u0013\"u`80z\u0010y1q3\u0012zK\u0004V*u8".length();
      char var1 = 22;
      int var0 = -1;

      while (true) {
         String var10002 = a(88, a(var2.substring(++var0, var0 + var1)));
         byte var10001 = -1;
         var5[var3++] = var10002;
         if ((var0 += var1) >= var4) {
            a = var5;
            return;
         }

         var1 = var2.charAt(var0);
      }
   }

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

      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 -> 46;
            case 1 -> 27;
            case 2 -> 73;
            case 3 -> 93;
            case 4 -> 18;
            case 5 -> 58;
            default -> 71;
         });
      }

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