/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.io.WhirlycacheFactory
 *  com.l7tech.util.ConfigFactory
 *  com.whirlycott.cache.Cache
 *  org.jetbrains.annotations.Nullable
 */
package com.l7tech.server.identity;

import com.l7tech.common.io.WhirlycacheFactory;
import com.l7tech.server.identity.e;
import com.l7tech.server.identity.g;
import com.l7tech.util.ConfigFactory;
import com.whirlycott.cache.Cache;
import org.jetbrains.annotations.Nullable;

class d
implements g {
    private final int a;
    @Nullable
    private final Cache b;
    private static final String[] c;

    d() {
        String[] stringArray = c;
        this.a = ConfigFactory.getIntProperty((String)stringArray[0], (int)1000);
        this.b = this.a < 1 ? null : WhirlycacheFactory.createCache((String)c[1], (int)this.a, (int)71, (String)WhirlycacheFactory.POLICY_LFU);
    }

    @Override
    public void put(e e10, Long l2) {
        if (this.b != null && e10.a()) {
            this.b.store((Object)e10, (Object)l2);
        }
    }

    @Override
    public Long get(e e10) {
        Long l2 = null;
        if (this.b != null) {
            l2 = (Long)this.b.retrieve((Object)e10);
        }
        return l2;
    }

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[2];
        int n2 = 0;
        String string = "60xc'@5? Ky\u000bT&\u001a ai\u0001S%?,|H\u0005B>2\u0016eq\u0001\u001007c~\u0014l3:'iy\u0017I?'6";
        int n3 = "60xc'@5? Ky\u000bT&\u001a ai\u0001S%?,|H\u0005B>2\u0016eq\u0001\u001007c~\u0014l3:'iy\u0017I?'6".length();
        int n4 = 33;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = d.a(46, d.a(string.substring(n6, n6 + n4)));
            if ((n5 += n4) >= n3) {
                c = stringArray;
                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] ^ 0x78);
        }
        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 -> 121;
                    case 1 -> 107;
                    case 2 -> 34;
                    case 3 -> 37;
                    case 4 -> 74;
                    case 5 -> 15;
                    default -> 120;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

