package com.l7tech.server.uddi;

import com.l7tech.objectmodel.FindException;
import com.l7tech.uddi.UDDISubscriptionResults;
import java.util.logging.Logger;

abstract class ad extends UDDITaskFactory.UDDITask {
   private final Logger a;
   private final UDDIServiceControlManager b;
   private static final String[] h;

   ad(Logger var1, UDDIServiceControlManager var2) {
      this.a = var1;
      this.b = var2;
   }

   void a(UDDITaskFactory.UDDITaskContext param1, UDDIRegistrySubscription param2, UDDISubscriptionResults param3, boolean param4) 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 2
      // 01: invokevirtual com/l7tech/server/uddi/UDDIRegistrySubscription.getUddiRegistryGoid ()Lcom/l7tech/objectmodel/Goid;
      // 04: astore 5
      // 06: aload 3
      // 07: invokeinterface com/l7tech/uddi/UDDISubscriptionResults.getResults ()Ljava/util/Collection; 1
      // 0c: invokeinterface java/util/Collection.iterator ()Ljava/util/Iterator; 1
      // 11: astore 6
      // 13: aload 6
      // 15: invokeinterface java/util/Iterator.hasNext ()Z 1
      // 1a: ifeq 73
      // 1d: aload 6
      // 1f: invokeinterface java/util/Iterator.next ()Ljava/lang/Object; 1
      // 24: checkcast com/l7tech/uddi/UDDISubscriptionResults$Result
      // 27: astore 7
      // 29: aload 0
      // 2a: getfield com/l7tech/server/uddi/ad.b Lcom/l7tech/server/uddi/UDDIServiceControlManager;
      // 2d: aload 5
      // 2f: aload 7
      // 31: invokeinterface com/l7tech/uddi/UDDISubscriptionResults$Result.getEntityKey ()Ljava/lang/String; 1
      // 36: bipush 1
      // 37: invokestatic java/lang/Boolean.valueOf (Z)Ljava/lang/Boolean;
      // 3a: invokeinterface com/l7tech/server/uddi/UDDIServiceControlManager.findByUDDIRegistryAndServiceKey (Lcom/l7tech/objectmodel/Goid;Ljava/lang/String;Ljava/lang/Boolean;)Ljava/util/Collection; 4
      // 3f: astore 8
      // 41: aload 8
      // 43: invokeinterface java/util/Collection.isEmpty ()Z 1
      // 48: ifne 70
      // 4b: aload 1
      // 4c: new com/l7tech/server/uddi/p
      // 4f: dup
      // 50: aload 5
      // 52: aload 7
      // 54: invokeinterface com/l7tech/uddi/UDDISubscriptionResults$Result.getEntityKey ()Ljava/lang/String; 1
      // 59: aload 7
      // 5b: invokeinterface com/l7tech/uddi/UDDISubscriptionResults$Result.isDeleted ()Z 1
      // 60: bipush 0
      // 61: invokespecial com/l7tech/server/uddi/p.<init> (Lcom/l7tech/objectmodel/Goid;Ljava/lang/String;ZZ)V
      // 64: invokeinterface com/l7tech/server/uddi/UDDITaskFactory$UDDITaskContext.notifyEvent (Lcom/l7tech/server/uddi/o;)V 2
      // 69: goto 70
      // 6c: invokestatic com/l7tech/server/uddi/ad.a (Lcom/l7tech/objectmodel/FindException;)Lcom/l7tech/objectmodel/FindException;
      // 6f: athrow
      // 70: goto 13
      // 73: iload 4
      // 75: ifeq bc
      // 78: aload 0
      // 79: aload 2
      // 7a: invokevirtual com/l7tech/server/uddi/ad.isExpiring (Lcom/l7tech/server/uddi/UDDIRegistrySubscription;)Z
      // 7d: ifeq bc
      // 80: goto 87
      // 83: invokestatic com/l7tech/server/uddi/ad.a (Lcom/l7tech/objectmodel/FindException;)Lcom/l7tech/objectmodel/FindException;
      // 86: athrow
      // 87: aload 0
      // 88: getfield com/l7tech/server/uddi/ad.a Ljava/util/logging/Logger;
      // 8b: aload 5
      // 8d: invokestatic java/lang/String.valueOf (Ljava/lang/Object;)Ljava/lang/String;
      // 90: getstatic com/l7tech/server/uddi/ad.h [Ljava/lang/String;
      // 93: bipush 0
      // 94: aaload
      // 95: swap
      // 96: getstatic com/l7tech/server/uddi/ad.h [Ljava/lang/String;
      // 99: bipush 1
      // 9a: aaload
      // 9b: invokedynamic makeConcatWithConstants (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" ]
      // a0: invokevirtual java/util/logging/Logger.info (Ljava/lang/String;)V
      // a3: aload 1
      // a4: new com/l7tech/server/uddi/SubscribeUDDIEvent
      // a7: dup
      // a8: aload 5
      // aa: getstatic com/l7tech/server/uddi/SubscribeUDDIEvent$Type.SUBSCRIBE Lcom/l7tech/server/uddi/SubscribeUDDIEvent$Type;
      // ad: invokespecial com/l7tech/server/uddi/SubscribeUDDIEvent.<init> (Lcom/l7tech/objectmodel/Goid;Lcom/l7tech/server/uddi/SubscribeUDDIEvent$Type;)V
      // b0: invokeinterface com/l7tech/server/uddi/UDDITaskFactory$UDDITaskContext.notifyEvent (Lcom/l7tech/server/uddi/o;)V 2
      // b5: goto bc
      // b8: invokestatic com/l7tech/server/uddi/ad.a (Lcom/l7tech/objectmodel/FindException;)Lcom/l7tech/objectmodel/FindException;
      // bb: athrow
      // bc: return
      // try (23 -> 37): 38 com/l7tech/objectmodel/FindException
      // try (41 -> 47): 48 com/l7tech/objectmodel/FindException
      // try (43 -> 70): 71 com/l7tech/objectmodel/FindException
   }

   protected boolean isExpiring(UDDIRegistrySubscription var1) {
      return var1.getSubscriptionExpiryTime() - System.currentTimeMillis() < SubscriptionUDDITaskFactory.b;
   }

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

   static {
      String[] var5 = new String[2];
      int var3 = 0;
      String var2 = "l\u0002K\u000eWL\u001dL\n\u001f\u0014DW\u0007A\u001fV\u0005T\u0015\u0011T\bQ\u0013\u0011S\u001bPMj#u|TP\bX\u000eBA\u0006[M\u0017D\u0002\u000bC";
      int var4 = "l\u0002K\u000eWL\u001dL\n\u001f\u0014DW\u0007A\u001fV\u0005T\u0015\u0011T\bQ\u0013\u0011S\u001bPMj#u|TP\bX\u000eBA\u0006[M\u0017D\u0002\u000bC"
         .length();
      char var1 = '.';
      int var0 = -1;

      while (true) {
         String var10002 = a(37, a(var2.substring(++var0, var0 + var1)));
         byte var10001 = -1;
         var5[var3++] = var10002;
         if ((var0 += var1) >= var4) {
            h = 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] ^ 81);
      }

      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 -> 7;
            case 1 -> 72;
            case 2 -> 26;
            case 3 -> 66;
            case 4 -> 20;
            case 5 -> 16;
            default -> 81;
         });
      }

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