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

import com.l7tech.message.MQTTConnectResponseKnob;
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.fr;

class fl
implements fr {
    private static final String[] a;

    fl() {
    }

    @Override
    public void set(String string, Object object, PolicyEnforcementContext policyEnforcementContext) {
        int n2;
        try {
            n2 = Integer.parseInt(object.toString());
        }
        catch (Throwable throwable) {
            String[] stringArray = a;
            throw new IllegalArgumentException(stringArray[0] + BuiltinVariables.PREFIX_RESPONSE_MQTT_CONNECT + stringArray[1] + object.toString(), throwable);
        }
        MQTTConnectResponseKnob mQTTConnectResponseKnob = ServerVariables.b(policyEnforcementContext);
        mQTTConnectResponseKnob.setResponseCode(n2);
    }

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[2];
        int n2 = 0;
        String string = "{j^|\"b:Wq\u000bs),\"]w_00#8M`\u000bd)b=VqNw#0t^jY00#&QdI|#xt\u001f\u0017\u0016wNc6-:K`h\u007f\"'s\u0016%ly0':\u0002%";
        int n3 = "{j^|\"b:Wq\u000bs),\"]w_00#8M`\u000bd)b=VqNw#0t^jY00#&QdI|#xt\u001f\u0017\u0016wNc6-:K`h\u007f\"'s\u0016%ly0':\u0002%".length();
        int n4 = 50;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = fl.a(76, fl.a(string.substring(n6, n6 + n4)));
            if ((n5 += n4) >= n3) {
                a = 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] ^ 0x18);
        }
        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 -> 116;
                    case 1 -> 73;
                    case 2 -> 103;
                    case 3 -> 92;
                    case 4 -> 10;
                    case 5 -> 14;
                    default -> 24;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

