/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.io.CertUtils
 */
package com.l7tech.server.security.cert;

import com.l7tech.common.io.CertUtils;
import java.math.BigInteger;
import java.security.cert.X509Certificate;

final class i {
    private final String a;
    private final BigInteger b;
    private static final String[] c;

    i(String string, BigInteger bigInteger) {
        if (string == null) {
            String[] stringArray = c;
            throw new IllegalArgumentException(stringArray[0]);
        }
        try {
            if (bigInteger == null) {
                throw new IllegalArgumentException(c[1]);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw i.a(illegalArgumentException);
        }
        this.a = string;
        this.b = bigInteger;
    }

    String a() {
        return this.a;
    }

    BigInteger b() {
        return this.b;
    }

    boolean a(X509Certificate x509Certificate) {
        boolean bl2;
        block6: {
            bl2 = false;
            String string = CertUtils.getIssuerDN((X509Certificate)x509Certificate);
            BigInteger bigInteger = x509Certificate.getSerialNumber();
            try {
                try {
                    try {
                        if (string == null || bigInteger == null) break block6;
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw i.a(illegalArgumentException);
                    }
                    if (!string.equals(this.a())) break block6;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw i.a(illegalArgumentException);
                }
                if (!bigInteger.equals(this.b())) break block6;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw i.a(illegalArgumentException);
            }
            bl2 = true;
        }
        return bl2;
    }

    public boolean equals(Object object) {
        block13: {
            try {
                if (this == object) {
                    return true;
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw i.a(illegalArgumentException);
            }
            try {
                try {
                    if (object != null && this.getClass() == object.getClass()) break block13;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw i.a(illegalArgumentException);
                }
                return false;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw i.a(illegalArgumentException);
            }
        }
        i i2 = (i)object;
        try {
            if (!this.a.equals(i2.a)) {
                return false;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw i.a(illegalArgumentException);
        }
        try {
            if (!this.b.equals(i2.b)) {
                return false;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw i.a(illegalArgumentException);
        }
        return true;
    }

    public int hashCode() {
        int n2 = this.a.hashCode();
        n2 = 31 * n2 + this.b.hashCode();
        return n2;
    }

    private static IllegalArgumentException a(IllegalArgumentException illegalArgumentException) {
        return illegalArgumentException;
    }

    /*
     * Enabled aggressive block sorting
     */
    static {
        String[] stringArray = new String[2];
        int n2 = 0;
        String string = "P$K5[\u000fxWwU5M\t\u001cW8L`\\\u0018\u001cW\"T,\u0017J2J)_\u0011\u001cT\"K4\u001e\u0013SMwZ%\u001e\u0013IU;";
        int n3 = "P$K5[\u000fxWwU5M\t\u001cW8L`\\\u0018\u001cW\"T,\u0017J2J)_\u0011\u001cT\"K4\u001e\u0013SMwZ%\u001e\u0013IU;".length();
        int n4 = 25;
        int n5 = -1;
        while (true) {
            int n6 = ++n5;
            stringArray[n2++] = i.a(73, i.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] ^ 0x75);
        }
        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 -> 112;
                    case 1 -> 30;
                    case 2 -> 113;
                    case 3 -> 9;
                    case 4 -> 119;
                    case 5 -> 52;
                    default -> 117;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

