/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.ca.apim.gateway.extension.sharedstate.counter.SharedCounterProvider
 */
package com.l7tech.server.extension.registry.sharedstate;

import com.ca.apim.gateway.extension.sharedstate.counter.SharedCounterProvider;
import com.l7tech.server.extension.provider.sharedstate.counter.LocalCounterProvider;
import com.l7tech.server.extension.registry.AbstractRegistryImpl;
import java.util.logging.Logger;

public class SharedCounterProviderRegistry
extends AbstractRegistryImpl<SharedCounterProvider> {
    private static final Logger c;
    public static final String SYSPROP_COUNTER_PROVIDER;
    private static final String[] d;

    public SharedCounterProviderRegistry() {
        String[] stringArray = d;
        this.register(stringArray[0], new LocalCounterProvider(), stringArray[1]);
    }

    @Override
    public SharedCounterProvider getExtension(String string) {
        if (string == null || string.isEmpty()) {
            return (SharedCounterProvider)super.getExtension(d[1]);
        }
        return (SharedCounterProvider)super.getExtension(string);
    }

    @Override
    protected Logger getLogger() {
        return c;
    }

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[3];
        int n2 = 0;
        String string = "/\u0013\u001b5=\u0005/\u0013\u001b5=1 \u0013\u0015z=V>&\u001f\u0010z\"\u000485\u0019\nz4\u0019>&\u0012\u000b=>\u000fd0\u0014\u0019&4\u0005\t,\t\u0016 4\u0013\u001a1\u0013\u000e=5\u00048";
        int n3 = "/\u0013\u001b5=\u0005/\u0013\u001b5=1 \u0013\u0015z=V>&\u001f\u0010z\"\u000485\u0019\nz4\u0019>&\u0012\u000b=>\u000fd0\u0014\u0019&4\u0005\t,\t\u0016 4\u0013\u001a1\u0013\u000e=5\u00048".length();
        int n4 = 5;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = SharedCounterProviderRegistry.b(38, SharedCounterProviderRegistry.b(string.substring(n6, n6 + n4)));
            if ((n5 += n4) >= n3) {
                d = stringArray;
                SYSPROP_COUNTER_PROVIDER = d[2];
                c = Logger.getLogger(SharedCounterProviderRegistry.class.getName());
                return;
            }
            n4 = string.charAt(n5);
        }
    }

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

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String b(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 -> 101;
                    case 1 -> 90;
                    case 2 -> 94;
                    case 3 -> 114;
                    case 4 -> 119;
                    case 5 -> 71;
                    default -> 108;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

