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

import com.ca.apim.gateway.extension.sharedstate.set.SharedSortedSetProvider;
import com.l7tech.server.extension.provider.sharedstate.set.LocalSortedSetProvider;
import com.l7tech.server.extension.registry.AbstractRegistryImpl;
import java.util.logging.Logger;

public class SharedSortedSetProviderRegistry
extends AbstractRegistryImpl<SharedSortedSetProvider> {
    private static final Logger c;
    public static final String SYSPROP_SORTED_SET_PROVIDER;
    private static final String[] d;

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

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

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

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[3];
        int n2 = 0;
        String string = "\u00136-=;\u0005\u00136-=;3\u001c6#r;~d\u001a:&r$,b\t<<r21d\u001a7=58'>\f1/.2-C\u0010+:93\u001au\u000b\t<3! t\u001a+";
        int n3 = "\u00136-=;\u0005\u00136-=;3\u001c6#r;~d\u001a:&r$,b\t<<r21d\u001a7=58'>\f1/.2-C\u0010+:93\u001au\u000b\t<3! t\u001a+".length();
        int n4 = 5;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = SharedSortedSetProviderRegistry.b(96, SharedSortedSetProviderRegistry.b(string.substring(n6, n6 + n4)));
            if ((n5 += n4) >= n3) {
                d = stringArray;
                SYSPROP_SORTED_SET_PROVIDER = d[2];
                c = Logger.getLogger(SharedSortedSetProviderRegistry.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] ^ 0x70);
        }
        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 -> 31;
                    case 1 -> 57;
                    case 2 -> 46;
                    case 3 -> 60;
                    case 4 -> 55;
                    case 5 -> 41;
                    default -> 112;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

