/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.ca.apim.gateway.extension.sharedstate.SharedScheduledExecutorService
 *  org.jetbrains.annotations.NotNull
 */
package com.l7tech.server.extension.provider.sharedstate;

import com.ca.apim.gateway.extension.sharedstate.SharedScheduledExecutorService;
import com.l7tech.server.extension.provider.sharedstate.d;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.jetbrains.annotations.NotNull;

/*
 * Exception performing whole class analysis ignored.
 */
public class LocalScheduledExecutorService
implements SharedScheduledExecutorService {
    private final ScheduledExecutorService a;
    private static final String[] b;

    LocalScheduledExecutorService(String string, int n2) {
        Objects.requireNonNull(string);
        this.a = Executors.newScheduledThreadPool(n2, new d(this, string));
    }

    public ScheduledFuture<?> scheduleForAllMembers(Runnable runnable, long l2, TimeUnit timeUnit) {
        return this.schedule(runnable, l2, timeUnit);
    }

    public ScheduledFuture<?> scheduleAtFixedRateForAllMembers(Runnable runnable, long l2, long l3, TimeUnit timeUnit) {
        return this.scheduleAtFixedRate(runnable, l2, l3, timeUnit);
    }

    public ScheduledFuture<?> scheduleWithFixedDelayForAllMembers(Runnable runnable, long l2, long l3, TimeUnit timeUnit) {
        return this.scheduleWithFixedDelay(runnable, l2, l3, timeUnit);
    }

    @NotNull
    public ScheduledFuture<?> schedule(@NotNull Runnable runnable, long l2, @NotNull TimeUnit timeUnit) {
        ScheduledFuture<?> scheduledFuture;
        try {
            if (runnable == null) {
                LocalScheduledExecutorService.a(0);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        try {
            if (timeUnit == null) {
                LocalScheduledExecutorService.a(1);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        try {
            scheduledFuture = this.a.schedule(runnable, l2, timeUnit);
            if (scheduledFuture == null) {
                LocalScheduledExecutorService.a(2);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        return scheduledFuture;
    }

    @NotNull
    public <V> ScheduledFuture<V> schedule(@NotNull Callable<V> callable, long l2, @NotNull TimeUnit timeUnit) {
        ScheduledFuture<V> scheduledFuture;
        try {
            if (callable == null) {
                LocalScheduledExecutorService.a(3);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        try {
            if (timeUnit == null) {
                LocalScheduledExecutorService.a(4);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        try {
            scheduledFuture = this.a.schedule(callable, l2, timeUnit);
            if (scheduledFuture == null) {
                LocalScheduledExecutorService.a(5);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        return scheduledFuture;
    }

    @NotNull
    public ScheduledFuture<?> scheduleAtFixedRate(@NotNull Runnable runnable, long l2, long l3, @NotNull TimeUnit timeUnit) {
        ScheduledFuture<?> scheduledFuture;
        try {
            if (runnable == null) {
                LocalScheduledExecutorService.a(6);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        try {
            if (timeUnit == null) {
                LocalScheduledExecutorService.a(7);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        try {
            scheduledFuture = this.a.scheduleAtFixedRate(runnable, l2, l3, timeUnit);
            if (scheduledFuture == null) {
                LocalScheduledExecutorService.a(8);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        return scheduledFuture;
    }

    @NotNull
    public ScheduledFuture<?> scheduleWithFixedDelay(@NotNull Runnable runnable, long l2, long l3, @NotNull TimeUnit timeUnit) {
        ScheduledFuture<?> scheduledFuture;
        try {
            if (runnable == null) {
                LocalScheduledExecutorService.a(9);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        try {
            if (timeUnit == null) {
                LocalScheduledExecutorService.a(10);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        try {
            scheduledFuture = this.a.scheduleAtFixedRate(runnable, l2, l3, timeUnit);
            if (scheduledFuture == null) {
                LocalScheduledExecutorService.a(11);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        return scheduledFuture;
    }

    public void shutdown() {
        this.a.shutdown();
    }

    @NotNull
    public List<Runnable> shutdownNow() {
        List<Runnable> list;
        try {
            list = this.a.shutdownNow();
            if (list == null) {
                LocalScheduledExecutorService.a(12);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        return list;
    }

    public boolean isShutdown() {
        return this.a.isShutdown();
    }

    public boolean isTerminated() {
        return this.a.isTerminated();
    }

    public boolean awaitTermination(long l2, @NotNull TimeUnit timeUnit) throws InterruptedException {
        try {
            if (timeUnit == null) {
                LocalScheduledExecutorService.a(13);
            }
        }
        catch (InterruptedException interruptedException) {
            throw LocalScheduledExecutorService.a(interruptedException);
        }
        return this.a.awaitTermination(l2, timeUnit);
    }

    @NotNull
    public <T> Future<T> submit(@NotNull Callable<T> callable) {
        Future<T> future;
        try {
            if (callable == null) {
                LocalScheduledExecutorService.a(14);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        try {
            future = this.a.submit(callable);
            if (future == null) {
                LocalScheduledExecutorService.a(15);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        return future;
    }

    @NotNull
    public <T> Future<T> submit(@NotNull Runnable runnable, T t2) {
        Future<T> future;
        try {
            if (runnable == null) {
                LocalScheduledExecutorService.a(16);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        try {
            future = this.a.submit(runnable, t2);
            if (future == null) {
                LocalScheduledExecutorService.a(17);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        return future;
    }

    @NotNull
    public Future<?> submit(@NotNull Runnable runnable) {
        Future<?> future;
        try {
            if (runnable == null) {
                LocalScheduledExecutorService.a(18);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        try {
            future = this.a.submit(runnable);
            if (future == null) {
                LocalScheduledExecutorService.a(19);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        return future;
    }

    @NotNull
    public <T> List<Future<T>> invokeAll(@NotNull Collection<? extends Callable<T>> collection) throws InterruptedException {
        List list;
        try {
            if (collection == null) {
                LocalScheduledExecutorService.a(20);
            }
        }
        catch (InterruptedException interruptedException) {
            throw LocalScheduledExecutorService.a(interruptedException);
        }
        try {
            list = this.a.invokeAll(collection);
            if (list == null) {
                LocalScheduledExecutorService.a(21);
            }
        }
        catch (InterruptedException interruptedException) {
            throw LocalScheduledExecutorService.a(interruptedException);
        }
        return list;
    }

    @NotNull
    public <T> List<Future<T>> invokeAll(@NotNull Collection<? extends Callable<T>> collection, long l2, @NotNull TimeUnit timeUnit) throws InterruptedException {
        List list;
        try {
            if (collection == null) {
                LocalScheduledExecutorService.a(22);
            }
        }
        catch (InterruptedException interruptedException) {
            throw LocalScheduledExecutorService.a(interruptedException);
        }
        try {
            if (timeUnit == null) {
                LocalScheduledExecutorService.a(23);
            }
        }
        catch (InterruptedException interruptedException) {
            throw LocalScheduledExecutorService.a(interruptedException);
        }
        try {
            list = this.a.invokeAll(collection, l2, timeUnit);
            if (list == null) {
                LocalScheduledExecutorService.a(24);
            }
        }
        catch (InterruptedException interruptedException) {
            throw LocalScheduledExecutorService.a(interruptedException);
        }
        return list;
    }

    @NotNull
    public <T> T invokeAny(@NotNull Collection<? extends Callable<T>> collection) throws InterruptedException, ExecutionException {
        Object t2;
        try {
            if (collection == null) {
                LocalScheduledExecutorService.a(25);
            }
        }
        catch (InterruptedException interruptedException) {
            throw LocalScheduledExecutorService.a(interruptedException);
        }
        try {
            t2 = this.a.invokeAny(collection);
            if (t2 == null) {
                LocalScheduledExecutorService.a(26);
            }
        }
        catch (InterruptedException interruptedException) {
            throw LocalScheduledExecutorService.a(interruptedException);
        }
        return t2;
    }

    public <T> T invokeAny(@NotNull Collection<? extends Callable<T>> collection, long l2, @NotNull TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException {
        try {
            if (collection == null) {
                LocalScheduledExecutorService.a(27);
            }
        }
        catch (InterruptedException interruptedException) {
            throw LocalScheduledExecutorService.a(interruptedException);
        }
        try {
            if (timeUnit == null) {
                LocalScheduledExecutorService.a(28);
            }
        }
        catch (InterruptedException interruptedException) {
            throw LocalScheduledExecutorService.a(interruptedException);
        }
        return this.a.invokeAny(collection, l2, timeUnit);
    }

    public void execute(@NotNull Runnable runnable) {
        try {
            if (runnable == null) {
                LocalScheduledExecutorService.a(29);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw LocalScheduledExecutorService.a(illegalArgumentException);
        }
        this.a.execute(runnable);
    }

    /*
     * Exception decompiling
     */
    private static /* synthetic */ void a(int var0) {
        /*
         * This method has failed to decompile.  When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
         * 
         * org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [0[TRYBLOCK]], but top level block is 6[SWITCH]
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.processEndingBlocks(Op04StructuredStatement.java:435)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.buildNestedBlocks(Op04StructuredStatement.java:484)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.createInitialStructuredBlock(Op03SimpleStatement.java:736)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:850)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
         *     at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
         *     at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1050)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
         *     at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
         *     at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
         *     at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
         *     at org.benf.cfr.reader.Main.main(Main.java:54)
         */
        throw new IllegalStateException("Decompilation failed");
    }

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

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[24];
                var3_1 = 0;
                var2_2 = "{RS\u000b\b|PH\u0005-;Fj\b|PH\u0005-;Fj\u000b|[U\u0014-!]a}O\u0017\tf]V\u000f\"+kaJ\blRL\f(,Fj\tf]V\u000f\"+kaJ\u0016|PH\u0005-;FjdI\u0014!\bCwVD$,\"Kv\tf]V\u000f\"+kc_\u0013|PH\u0005-;FjrT& 6OkaA\u0014,\tf]V\u000f\"+kc_\u0010nDA\t=\u001aO}^I\u000e(:C`]\u0004z]I\u0014*O}O\u0014\u0007;Fc\u0013M\u0005=&Ek\u0013\u0005\u0013gkY/^U\u0013=nD`G\u0000\u0012,:_}]\u0000\u000e<\"FNl\\MO%y^jPHO:+XyVRO,6^j]S\t& \u0005\u007fAO\u0016 *O}\u001cS\b(<Ok@T\u0001=+\u0005C\\C\u0001%\u001dIgVD\u0015%+NJKE\u0003<:E}`E\u0012?'Ij\u0005{RS\u000b:\u0013|PH\u0005-;FjrT& 6OkaA\u0014,\u0006|FB\r :>NAG\u0015$+D{\u0013F\u000f;njA\\T.<\"F/CA\u0012(#O{VR@nkY(\u0013O\u0006ikY!\u0016S@$;Y{\u0013N\u000f=nHj\u0013N\u0015%\"\u0007jKE\u0003<:O\u0007l\\M\r( N\u0016|PH\u0005-;FjdI\u0014!\bCwVD$,\"Kv";
                var4_3 = "{RS\u000b\b|PH\u0005-;Fj\b|PH\u0005-;Fj\u000b|[U\u0014-!]a}O\u0017\tf]V\u000f\"+kaJ\blRL\f(,Fj\tf]V\u000f\"+kaJ\u0016|PH\u0005-;FjdI\u0014!\bCwVD$,\"Kv\tf]V\u000f\"+kc_\u0013|PH\u0005-;FjrT& 6OkaA\u0014,\tf]V\u000f\"+kc_\u0010nDA\t=\u001aO}^I\u000e(:C`]\u0004z]I\u0014*O}O\u0014\u0007;Fc\u0013M\u0005=&Ek\u0013\u0005\u0013gkY/^U\u0013=nD`G\u0000\u0012,:_}]\u0000\u000e<\"FNl\\MO%y^jPHO:+XyVRO,6^j]S\t& \u0005\u007fAO\u0016 *O}\u001cS\b(<Ok@T\u0001=+\u0005C\\C\u0001%\u001dIgVD\u0015%+NJKE\u0003<:E}`E\u0012?'Ij\u0005{RS\u000b:\u0013|PH\u0005-;FjrT& 6OkaA\u0014,\u0006|FB\r :>NAG\u0015$+D{\u0013F\u000f;njA\\T.<\"F/CA\u0012(#O{VR@nkY(\u0013O\u0006ikY!\u0016S@$;Y{\u0013N\u000f=nHj\u0013N\u0015%\"\u0007jKE\u0003<:O\u0007l\\M\r( N\u0016|PH\u0005-;FjdI\u0014!\bCwVD$,\"Kv".length();
                var1_4 = 4;
                var0_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 93;
                    v1 = ++var0_5;
                    v2 = var2_2.substring(v1, v1 + var1_4);
                    v3 = -1;
                    break block9;
                    break;
                }
lbl13:
                // 1 sources

                while (true) {
                    var5[var3_1++] = LocalScheduledExecutorService.a(v0, LocalScheduledExecutorService.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "~N_]7kLxBZ](9JkD@]>$LxOA\u001b42\u0017mS]\u000428]o\u000eA\u001a:.]yRF\u0013/9\u0017QNQ\u00137\u000f[uDV\u000779\\XYW\u0011.(WorW\u0000-5[x\u0006nTP\u001f2(";
                    var4_3 = "~N_]7kLxBZ](9JkD@]>$LxOA\u001b42\u0017mS]\u000428]o\u000eA\u001a:.]yRF\u0013/9\u0017QNQ\u00137\u000f[uDV\u000779\\XYW\u0011.(WorW\u0000-5[x\u0006nTP\u001f2(".length();
                    var1_4 = 78;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 79;
                        v4 = ++var0_5;
                        v2 = var2_2.substring(v4, v4 + var1_4);
                        v3 = 0;
                        break block9;
                        break;
                    }
                    break;
                }
lbl28:
                // 1 sources

                while (true) {
                    var5[var3_1++] = LocalScheduledExecutorService.a(v0, LocalScheduledExecutorService.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        LocalScheduledExecutorService.b = var5;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x77);
        }
        return cArray;
    }

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String a(int n2, char[] cArray) {
        char[] cArray2;
        block11: {
            int n3;
            int n4;
            int n5;
            block10: {
                n5 = n2;
                cArray2 = cArray;
                n4 = cArray.length;
                n3 = 0;
                if (!true) break block10;
                n4 = n4;
                if (n4 <= n3) break block11;
            }
            do {
                n5 = n5;
                cArray2 = cArray2;
                int n6 = n3;
                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                    case 0 -> 82;
                    case 1 -> 110;
                    case 2 -> 125;
                    case 3 -> 61;
                    case 4 -> 20;
                    case 5 -> 19;
                    default -> 119;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

