/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.policy.variable.BuiltinVariables
 */
package com.l7tech.server.policy.variable;

import com.l7tech.policy.variable.BuiltinVariables;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.variable.ServerVariables;
import com.l7tech.server.policy.variable.bg;
import java.io.IOException;
import java.util.logging.Level;

class co
extends bg {
    private static final String a = co.a(61, co.a("NS@'F\u001d\"y\u001cR.VSMYhekR\u0012wlQP?G\u0001?-"));

    co() {
    }

    @Override
    public Object get(String string, PolicyEnforcementContext policyEnforcementContext) {
        block4: {
            try {
                String[] stringArray = ServerVariables.a(BuiltinVariables.PREFIX_REQUEST_HTTP_PARAM, string, policyEnforcementContext);
                try {
                    if (stringArray == null || stringArray.length <= 0) break block4;
                }
                catch (IOException iOException) {
                    throw co.a(iOException);
                }
                return stringArray[0];
            }
            catch (IOException iOException) {
                ServerVariables.a.log(Level.WARNING, a + string, iOException);
            }
        }
        return null;
    }

    private static IOException a(IOException iOException) {
        return iOException;
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x38);
        }
        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 -> 48;
                    case 1 -> 1;
                    case 2 -> 8;
                    case 3 -> 118;
                    case 4 -> 31;
                    case 5 -> 78;
                    default -> 56;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

