package com.l7tech.server.communityschemas;

import com.l7tech.gateway.common.audit.Audit;
import java.util.Set;
import org.w3c.dom.ls.LSInput;
import org.w3c.dom.ls.LSResourceResolver;

class i implements LSResourceResolver {
   static final boolean a;
   final Set val$localDependencies;
   final Audit val$audit;
   final SchemaSourceResolver.SchemaSource val$source;
   final Set val$dependencies;
   final SchemaManagerImpl this$0;
   private static final String b;

   i(SchemaManagerImpl var1, Set var2, Audit var3, SchemaSourceResolver.SchemaSource var4, Set var5) {
      this.this$0 = var1;
      this.val$localDependencies = var2;
      this.val$audit = var3;
      this.val$source = var4;
      this.val$dependencies = var5;
   }

   @Override
   public LSInput resolveResource(String param1, String param2, String param3, String param4, String param5) {
      // $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: getstatic com/l7tech/server/communityschemas/i.b Ljava/lang/String;
      // 03: aload 1
      // 04: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 07: ifeq 1b
      // 0a: aload 0
      // 0b: getfield com/l7tech/server/communityschemas/i.this$0 Lcom/l7tech/server/communityschemas/SchemaManagerImpl;
      // 0e: aload 3
      // 0f: aload 4
      // 11: aload 5
      // 13: invokevirtual com/l7tech/server/communityschemas/SchemaManagerImpl.a (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/ls/LSInput;
      // 16: areturn
      // 17: invokestatic com/l7tech/server/communityschemas/i.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1a: athrow
      // 1b: aconst_null
      // 1c: astore 6
      // 1e: aload 0
      // 1f: getfield com/l7tech/server/communityschemas/i.val$localDependencies Ljava/util/Set;
      // 22: aload 5
      // 24: invokeinterface java/util/Set.contains (Ljava/lang/Object;)Z 2
      // 29: istore 7
      // 2b: aload 4
      // 2d: ifnull 46
      // 30: aload 0
      // 31: getfield com/l7tech/server/communityschemas/i.this$0 Lcom/l7tech/server/communityschemas/SchemaManagerImpl;
      // 34: aload 0
      // 35: getfield com/l7tech/server/communityschemas/i.val$audit Lcom/l7tech/gateway/common/audit/Audit;
      // 38: aload 5
      // 3a: aload 4
      // 3c: bipush 0
      // 3d: bipush 0
      // 3e: iload 7
      // 40: bipush 0
      // 41: invokevirtual com/l7tech/server/communityschemas/SchemaManagerImpl.a (Lcom/l7tech/gateway/common/audit/Audit;Ljava/lang/String;Ljava/lang/String;ZZZZ)Lcom/l7tech/server/communityschemas/SchemaSourceResolver$SchemaSource;
      // 44: astore 6
      // 46: aload 6
      // 48: ifnonnull 5f
      // 4b: aload 0
      // 4c: getfield com/l7tech/server/communityschemas/i.this$0 Lcom/l7tech/server/communityschemas/SchemaManagerImpl;
      // 4f: aload 0
      // 50: getfield com/l7tech/server/communityschemas/i.val$audit Lcom/l7tech/gateway/common/audit/Audit;
      // 53: aload 5
      // 55: aload 2
      // 56: bipush 0
      // 57: bipush 0
      // 58: iload 7
      // 5a: invokevirtual com/l7tech/server/communityschemas/SchemaManagerImpl.a (Lcom/l7tech/gateway/common/audit/Audit;Ljava/lang/String;Ljava/lang/String;ZZZ)Lcom/l7tech/server/communityschemas/SchemaSourceResolver$SchemaSource;
      // 5d: astore 6
      // 5f: getstatic com/l7tech/server/communityschemas/i.a Z
      // 62: ifne 7d
      // 65: aload 6
      // 67: ifnonnull 7d
      // 6a: goto 71
      // 6d: invokestatic com/l7tech/server/communityschemas/i.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 70: athrow
      // 71: new java/lang/AssertionError
      // 74: dup
      // 75: invokespecial java/lang/AssertionError.<init> ()V
      // 78: athrow
      // 79: invokestatic com/l7tech/server/communityschemas/i.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 7c: athrow
      // 7d: aload 0
      // 7e: getfield com/l7tech/server/communityschemas/i.this$0 Lcom/l7tech/server/communityschemas/SchemaManagerImpl;
      // 81: aload 6
      // 83: invokeinterface com/l7tech/server/communityschemas/SchemaSourceResolver$SchemaSource.getResolverId ()Ljava/lang/String; 1
      // 88: invokevirtual com/l7tech/server/communityschemas/SchemaManagerImpl.e (Ljava/lang/String;)Z
      // 8b: ifne a8
      // 8e: aload 0
      // 8f: getfield com/l7tech/server/communityschemas/i.val$localDependencies Ljava/util/Set;
      // 92: aload 0
      // 93: getfield com/l7tech/server/communityschemas/i.val$source Lcom/l7tech/server/communityschemas/SchemaSourceResolver$SchemaSource;
      // 96: invokeinterface com/l7tech/server/communityschemas/SchemaSourceResolver$SchemaSource.getUri ()Ljava/lang/String; 1
      // 9b: invokeinterface java/util/Set.add (Ljava/lang/Object;)Z 2
      // a0: pop
      // a1: goto a8
      // a4: invokestatic com/l7tech/server/communityschemas/i.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // a7: athrow
      // a8: aload 0
      // a9: getfield com/l7tech/server/communityschemas/i.val$dependencies Ljava/util/Set;
      // ac: aload 6
      // ae: invokeinterface com/l7tech/server/communityschemas/SchemaSourceResolver$SchemaSource.getUri ()Ljava/lang/String; 1
      // b3: invokeinterface java/util/Set.add (Ljava/lang/Object;)Z 2
      // b8: pop
      // b9: aload 0
      // ba: getfield com/l7tech/server/communityschemas/i.this$0 Lcom/l7tech/server/communityschemas/SchemaManagerImpl;
      // bd: getfield com/l7tech/server/communityschemas/SchemaManagerImpl.o Ljava/util/concurrent/atomic/AtomicReference;
      // c0: invokevirtual java/util/concurrent/atomic/AtomicReference.get ()Ljava/lang/Object;
      // c3: checkcast com/l7tech/server/communityschemas/n
      // c6: aload 6
      // c8: invokevirtual com/l7tech/server/communityschemas/n.makeLsInput (Lcom/l7tech/server/communityschemas/SchemaSourceResolver$SchemaSource;)Lorg/w3c/dom/ls/LSInput;
      // cb: areturn
      // cc: astore 6
      // ce: new com/l7tech/server/communityschemas/SchemaManagerImpl$UnresolvableException
      // d1: dup
      // d2: aload 6
      // d4: aload 5
      // d6: aload 4
      // d8: aload 3
      // d9: aload 2
      // da: invokestatic com/l7tech/server/communityschemas/SchemaManagerImpl.a (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
      // dd: invokespecial com/l7tech/server/communityschemas/SchemaManagerImpl$UnresolvableException.<init> (Ljava/lang/Throwable;Ljava/lang/String;)V
      // e0: athrow
      // try (60 -> 73): 74 java/io/IOException
      // try (49 -> 58): 58 java/io/IOException
      // try (47 -> 51): 52 java/io/IOException
      // try (0 -> 11): 11 java/io/IOException
      // try (13 -> 89): 90 java/io/IOException
   }

   static {
      String var10002 = a(4, a("\u001c9(+Fo\u007f\u0003:+u\u000bs~\u001b?;t(\u0012\u007f&\b\u001fv\u0004-<"));
      byte var10001 = -1;
      b = var10002;

      boolean var10000;
      label19: {
         try {
            if (!SchemaManagerImpl.class.desiredAssertionStatus()) {
               var10000 = true;
               break label19;
            }
         } catch (SchemaManagerImpl.UnresolvableException var0) {
            throw a(var0);
         }

         var10000 = false;
      }

      a = var10000;
   }

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

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

      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 -> 112;
            case 1 -> 73;
            case 2 -> 88;
            case 3 -> 95;
            case 4 -> 120;
            case 5 -> 68;
            default -> 84;
         });
      }

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