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

import com.ca.apim.gateway.extension.sharedstate.counter.SharedCounterProvider;
import com.ca.apim.gateway.extension.sharedstate.counter.SharedCounterStore;
import com.l7tech.server.extension.provider.sharedstate.counter.LocalCounterStore;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

public class LocalCounterProvider
implements SharedCounterProvider {
    public static final String KEY;
    private final ConcurrentMap<String, SharedCounterStore> a = new ConcurrentHashMap<String, SharedCounterStore>();
    private static final String[] b;

    public SharedCounterStore getCounterStore(String string2) {
        return this.a.computeIfAbsent(string2, string -> new LocalCounterStore());
    }

    public String getName() {
        return b[0];
    }

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[2];
        int n2 = 0;
        String string = "\t2))|\u0005\t2))|";
        int n3 = "\t2))|\u0005\t2))|".length();
        int n4 = 5;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = LocalCounterProvider.a(78, LocalCounterProvider.a(string.substring(n6, n6 + n4)));
            if ((n5 += n4) >= n3) {
                b = stringArray;
                KEY = b[1];
                return;
            }
            n4 = string.charAt(n5);
        }
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 4);
        }
        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 -> 43;
                    case 1 -> 19;
                    case 2 -> 4;
                    case 3 -> 6;
                    case 4 -> 94;
                    case 5 -> 52;
                    default -> 4;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

