/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.objectmodel.Goid
 */
package com.l7tech.server.wsdm.subscription;

import com.l7tech.objectmodel.Goid;
import com.l7tech.server.wsdm.subscription.Subscription;

public final class SubscriptionKey {
    private final Goid a;
    private final int b;
    private final String c;
    private static final String d = SubscriptionKey.a(61, SubscriptionKey.a("v\u0016l03^^L\nf5pQEQ\fn|Fb}"));

    public SubscriptionKey(Goid goid, int n2, String string) {
        if (string == null) {
            throw new IllegalArgumentException(d);
        }
        this.a = goid;
        this.b = n2;
        this.c = string;
    }

    public SubscriptionKey(Subscription subscription) {
        this(subscription.getPublishedServiceGoid(), subscription.getTopic(), subscription.getReferenceCallback());
    }

    public Goid getServiceGoid() {
        return this.a;
    }

    public int getTopic() {
        return this.b;
    }

    public String getNotificationUrl() {
        return this.c;
    }

    public boolean equals(Object object) {
        block16: {
            try {
                if (this == object) {
                    return true;
                }
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw SubscriptionKey.a(illegalArgumentException);
            }
            try {
                try {
                    if (object != null && this.getClass() == object.getClass()) break block16;
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw SubscriptionKey.a(illegalArgumentException);
                }
                return false;
            }
            catch (IllegalArgumentException illegalArgumentException) {
                throw SubscriptionKey.a(illegalArgumentException);
            }
        }
        SubscriptionKey subscriptionKey = (SubscriptionKey)object;
        try {
            if (!Goid.equals((Goid)this.a, (Goid)subscriptionKey.a)) {
                return false;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SubscriptionKey.a(illegalArgumentException);
        }
        try {
            if (this.b != subscriptionKey.b) {
                return false;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SubscriptionKey.a(illegalArgumentException);
        }
        try {
            if (!this.c.equals(subscriptionKey.c)) {
                return false;
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SubscriptionKey.a(illegalArgumentException);
        }
        return true;
    }

    public int hashCode() {
        int n2;
        try {
            n2 = this.a != null ? this.a.hashCode() : 0;
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SubscriptionKey.a(illegalArgumentException);
        }
        int n3 = n2;
        n3 = 31 * n3 + this.b;
        n3 = 31 * n3 + this.c.hashCode();
        return n3;
    }

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

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0xC);
        }
        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 -> 5;
                    case 1 -> 94;
                    case 2 -> 61;
                    case 3 -> 97;
                    case 4 -> 46;
                    case 5 -> 13;
                    default -> 12;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

