/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.identity.Group
 *  com.l7tech.identity.User
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.IdentityHeader
 *  com.l7tech.objectmodel.UpdateException
 *  org.jetbrains.annotations.NotNull
 */
package com.l7tech.server.security.rbac;

import com.l7tech.identity.Group;
import com.l7tech.identity.User;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.IdentityHeader;
import com.l7tech.objectmodel.UpdateException;
import com.l7tech.server.security.rbac.RoleManagerIdentitySource;
import java.util.Collections;
import java.util.Set;
import org.jetbrains.annotations.NotNull;

class d
implements RoleManagerIdentitySource {
    private static final String[] a;

    d() {
    }

    @Override
    public void validateRoleAssignments() throws UpdateException {
    }

    @Override
    public Set<IdentityHeader> getGroups(User user, boolean bl2) throws FindException {
        return Collections.emptySet();
    }

    @Override
    public Set<IdentityHeader> getGroups(@NotNull Group group) throws FindException {
        try {
            if (group == null) {
                d.a(0);
            }
        }
        catch (FindException findException) {
            throw d.a(findException);
        }
        return Collections.emptySet();
    }

    private static void a(int n2) {
        String[] stringArray = a;
        throw new IllegalArgumentException(String.format(stringArray[0], stringArray[1], stringArray[2], stringArray[3]));
    }

    private static FindException a(FindException findException) {
        return findException;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[4];
                var3_1 = 0;
                var2_2 = "f>DJr)#SlEPml\ri#Wqj !\u0007<BM~!(S)Q\u001f8i>\u0000lLY?i>\tiP\u001fr9>SlMPkl/BlMJs \u0005@>LJo";
                var4_3 = "f>DJr)#SlEPml\ri#Wqj !\u0007<BM~!(S)Q\u001f8i>\u0000lLY?i>\tiP\u001fr9>SlMPkl/BlMJs \u0005@>LJo".length();
                var1_4 = 62;
                var0_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 62;
                    v1 = ++var0_5;
                    v2 = var2_2.substring(v1, v1 + var1_4);
                    v3 = -1;
                    break block9;
                    break;
                }
lbl13:
                // 1 sources

                while (true) {
                    var5[var3_1++] = d.a(v0, d.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "\u0019~\u0013M.&d\u001fr\u0016M1tb\ft\fM1ts\u000fc\u0017\u0016;>b\u0018p\u001dM&\t\u001dt\n%0~e\nb";
                    var4_3 = "\u0019~\u0013M.&d\u001fr\u0016M1tb\ft\fM1ts\u000fc\u0017\u0016;>b\u0018p\u001dM&\t\u001dt\n%0~e\nb".length();
                    var1_4 = 33;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 99;
                        v4 = ++var0_5;
                        v2 = var2_2.substring(v4, v4 + var1_4);
                        v3 = 0;
                        break block9;
                        break;
                    }
                    break;
                }
lbl28:
                // 1 sources

                while (true) {
                    var5[var3_1++] = d.a(v0, d.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        d.a = var5;
    }

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

