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

import com.ca.apim.gateway.extension.sharedstate.cluster.ClusterInfoService;
import com.l7tech.server.cluster.LocalClusterInfoService;
import com.l7tech.server.extension.registry.AbstractRegistryImpl;
import java.util.logging.Logger;

public class SharedClusterInfoServiceRegistry
extends AbstractRegistryImpl<ClusterInfoService> {
    private static final Logger c;
    public static final String SYSPROP_CLUSTER_INFO_PROVIDER;
    private static final String[] d;

    public SharedClusterInfoServiceRegistry() {
        String[] stringArray = d;
        this.register(stringArray[0], new LocalClusterInfoService(), stringArray[0]);
    }

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

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

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[3];
        int n2 = 0;
        String string = "m0%\u0019d\u0005m0%\u0019d5b0+Vd%\u0012d<.V{w\u0014w:4Vmj\u0012d15\u0011g|Hr7'\nmv%m*5\fm`/o9)(z}\u0010h;#\n";
        int n3 = "m0%\u0019d\u0005m0%\u0019d5b0+Vd%\u0012d<.V{w\u0014w:4Vmj\u0012d15\u0011g|Hr7'\nmv%m*5\fm`/o9)(z}\u0010h;#\n".length();
        int n4 = 5;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = SharedClusterInfoServiceRegistry.b(48, SharedClusterInfoServiceRegistry.b(string.substring(n6, n6 + n4)));
            if ((n5 += n4) >= n3) {
                d = stringArray;
                SYSPROP_CLUSTER_INFO_PROVIDER = d[2];
                c = Logger.getLogger(SharedClusterInfoServiceRegistry.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] ^ 0x56);
        }
        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 -> 49;
                    case 1 -> 111;
                    case 2 -> 118;
                    case 3 -> 72;
                    case 4 -> 56;
                    case 5 -> 34;
                    default -> 86;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

