package com.apiguard3.url_matcher;

import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import java.io.Serializable;

public class UrlMatcherConfig implements Serializable {
    public static char AGRequest$Builder = 11366;
    public static int addHeader = 0;
    public static int get = 1;
    public static char method = 32377;
    public static char newBuilder = 61064;
    public static final long serialVersionUID = -4792909588470935642L;
    public static char url = 38437;
    public transient MatchesConfig AGRequest;
    public String domainStr;
    public transient MatchesConfig getBody;
    public transient MatchesConfig getHeaders;
    public transient MatchesConfig getMethod;
    public transient MatchesConfig getUrl;
    public String pathStr;
    public String portStr;
    public String queryStr;
    public String schemeStr;

    static {
        Covode.recordClassIndex(2540);
    }

    public UrlMatcherConfig() {
    }

    public MatchesConfig AGRequest() {
        int i = addHeader + 53;
        int i2 = i % 128;
        get = i2;
        if (i % 2 != 0 ? this.getMethod == null : this.getMethod == null) {
            int i3 = i2 + 77;
            addHeader = i3 % 128;
            int i4 = i3 % 2;
            return getBody(this.schemeStr);
        }
        MatchesConfig matchesConfig = this.getMethod;
        int i5 = i2 + 121;
        addHeader = i5 % 128;
        int i6 = i5 % 2;
        return matchesConfig;
    }

    public UrlMatcherConfig addHeader() {
        UrlMatcherConfig urlMatcherConfig = new UrlMatcherConfig();
        urlMatcherConfig.schemeStr = this.schemeStr;
        urlMatcherConfig.domainStr = this.domainStr;
        urlMatcherConfig.portStr = this.portStr;
        urlMatcherConfig.pathStr = this.pathStr;
        urlMatcherConfig.queryStr = this.queryStr;
        int i = get + 21;
        addHeader = i % 128;
        if (i % 2 == 0) {
            return urlMatcherConfig;
        }
        throw new NullPointerException("hashCode");
    }

    public MatchesConfig getBody() {
        int i = get + 103;
        int i2 = i % 128;
        addHeader = i2;
        if (i % 2 == 0 ? this.AGRequest == null : this.AGRequest == null) {
            int i3 = i2 + 45;
            get = i3 % 128;
            int i4 = i3 % 2;
            return getBody(this.queryStr);
        }
        MatchesConfig matchesConfig = this.AGRequest;
        int i5 = i2 + 13;
        get = i5 % 128;
        int i6 = i5 % 2;
        return matchesConfig;
    }

    public MatchesConfig getHeaders() {
        int i = addHeader + 1;
        get = i % 128;
        if (i % 2 == 0) {
            MatchesConfig matchesConfig = this.getBody;
            throw new NullPointerException("hashCode");
        } else if (this.getBody == null) {
            return getBody(this.domainStr);
        } else {
            MatchesConfig matchesConfig2 = this.getBody;
            int i2 = addHeader + 95;
            get = i2 % 128;
            int i3 = i2 % 2;
            return matchesConfig2;
        }
    }

    public MatchesConfig getMethod() {
        int i = addHeader + 25;
        get = i % 128;
        if (i % 2 == 0) {
            MatchesConfig matchesConfig = this.getUrl;
            throw new NullPointerException("hashCode");
        } else if (this.getUrl != null) {
            return this.getUrl;
        } else {
            int i2 = addHeader + 19;
            get = i2 % 128;
            int i3 = i2 % 2;
            return getBody(this.portStr);
        }
    }

    public MatchesConfig getUrl() {
        int i;
        MatchesConfig matchesConfig = this.getHeaders;
        if (matchesConfig != null) {
            i = addHeader + 27;
            get = i % 128;
        } else {
            int i2 = addHeader + 65;
            get = i2 % 128;
            int i3 = i2 % 2;
            matchesConfig = getBody(this.pathStr);
            i = get + 57;
            addHeader = i % 128;
        }
        int i4 = i % 2;
        return matchesConfig;
    }

    public int hashCode() {
        int hashCode;
        int i;
        int i2;
        int i3;
        int i4 = get + 105;
        addHeader = i4 % 128;
        int i5 = i4 % 2;
        String str = this.schemeStr;
        int i6 = 0;
        if (str == null) {
            hashCode = 0;
        } else {
            hashCode = str.hashCode();
        }
        int i7 = (hashCode + 527) * 31;
        String str2 = this.domainStr;
        if (str2 != null) {
            i = str2.hashCode();
        } else {
            int i8 = get + 111;
            addHeader = i8 % 128;
            int i9 = i8 % 2;
            i = 0;
        }
        int i10 = (i7 + i) * 31;
        String str3 = this.portStr;
        if (str3 != null) {
            i2 = str3.hashCode();
            int i11 = get + 41;
            addHeader = i11 % 128;
            int i12 = i11 % 2;
        } else {
            int i13 = addHeader + 57;
            get = i13 % 128;
            int i14 = i13 % 2;
            i2 = 0;
        }
        int i15 = (i10 + i2) * 31;
        String str4 = this.pathStr;
        if (str4 != null) {
            i3 = str4.hashCode();
        } else {
            i3 = 0;
        }
        int i16 = (i15 + i3) * 31;
        String str5 = this.queryStr;
        if (str5 != null) {
            i6 = str5.hashCode();
        }
        return i16 + i6;
    }

    public UrlMatcherConfig(UrlMatcher urlMatcher) {
        this.schemeStr = urlMatcher.getBody();
        this.domainStr = urlMatcher.getHeaders();
        this.portStr = urlMatcher.AGRequest();
        this.pathStr = urlMatcher.getMethod();
        this.queryStr = urlMatcher.getUrl();
        this.getMethod = AGRequest();
        this.getBody = getHeaders();
        this.getUrl = getMethod();
        this.getHeaders = getUrl();
        this.AGRequest = getBody();
    }

    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r10v1, resolved type: java.lang.String} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r10v3, resolved type: char[]} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r10v4, resolved type: java.lang.String} */
    /* JADX WARNING: Failed to insert additional move for type inference */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public static java.lang.String AGRequest(java.lang.String r10) {
        /*
            int r0 = get
            int r1 = r0 + 99
            int r0 = r1 % 128
            addHeader = r0
            r2 = 2
            int r1 = r1 % r2
            r9 = 0
            r7 = 1
            if (r1 != 0) goto L_0x0013
            r0 = 1
        L_0x000f:
            if (r0 == r7) goto L_0x001f
            r0 = 0
            goto L_0x0015
        L_0x0013:
            r0 = 0
            goto L_0x000f
        L_0x0015:
            java.lang.String r1 = "hashCode"
            java.lang.NullPointerException r0 = new java.lang.NullPointerException     // Catch:{ all -> 0x001d }
            r0.<init>(r1)     // Catch:{ all -> 0x001d }
            throw r0     // Catch:{ all -> 0x001d }
        L_0x001d:
            r0 = move-exception
            throw r0
        L_0x001f:
            if (r10 != 0) goto L_0x005c
            r0 = 0
        L_0x0022:
            if (r0 == 0) goto L_0x0031
            int r0 = addHeader
            int r1 = r0 + 59
            int r0 = r1 % 128
            get = r0
            int r1 = r1 % r2
            char[] r10 = r10.toCharArray()
        L_0x0031:
            char[] r10 = (char[]) r10
            int r0 = r10.length
            char[] r6 = new char[r0]
            char[] r8 = new char[r2]
            r5 = 0
        L_0x0039:
            int r0 = r10.length
            if (r5 >= r0) goto L_0x005e
            char r0 = r10[r5]
            r8[r9] = r0
            int r4 = r5 + 1
            char r0 = r10[r4]
            r8[r7] = r0
            char r3 = AGRequest$Builder
            char r2 = method
            char r1 = url
            char r0 = newBuilder
            com.apiguard3.internal.setOnApplyWindowInsetsListener.AGRequest(r8, r3, r2, r1, r0)
            char r0 = r8[r9]
            r6[r5] = r0
            char r0 = r8[r7]
            r6[r4] = r0
            int r5 = r5 + 2
            goto L_0x0039
        L_0x005c:
            r0 = 1
            goto L_0x0022
        L_0x005e:
            char r1 = r6[r9]
            java.lang.String r0 = new java.lang.String
            r0.<init>(r6, r7, r1)
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: com.apiguard3.url_matcher.UrlMatcherConfig.AGRequest(java.lang.String):java.lang.String");
    }

    /* JADX WARNING: Code restructure failed: missing block: B:15:?, code lost:
        com.apiguard3.internal.checkCertificates.AGRequest(com.apiguard3.internal.log.getBody.AGRequest, AGRequest("閹駛咮椑胺⏇☓稑ိ㮙ᚏが飏轿蚱勖ꄈ調鵽㧉唟뇠瞽証믓鈨῀밷駞令蘢턁").intern());
     */
    /* JADX WARNING: Code restructure failed: missing block: B:17:0x004d, code lost:
        return new com.apiguard3.url_matcher.MatchesConfig((org.json.JSONArray) null);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:20:0x0053, code lost:
        return new com.apiguard3.url_matcher.MatchesConfig((org.json.JSONArray) null);
     */
    /* JADX WARNING: Failed to process nested try/catch */
    /* JADX WARNING: Missing exception handler attribute for start block: B:14:0x0039 */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public com.apiguard3.url_matcher.MatchesConfig getBody(java.lang.String r4) {
        /*
            r3 = this;
            if (r4 != 0) goto L_0x0012
        L_0x0002:
            com.apiguard3.url_matcher.MatchesConfig r2 = new com.apiguard3.url_matcher.MatchesConfig
            r2.<init>()
            int r0 = addHeader
            int r1 = r0 + 31
            int r0 = r1 % 128
            get = r0
            int r0 = r1 % 2
            return r2
        L_0x0012:
            int r0 = get
            int r1 = r0 + 51
            int r0 = r1 % 128
            addHeader = r0
            int r1 = r1 % 2
            r0 = 27
            if (r1 != 0) goto L_0x0027
            boolean r0 = r4.isEmpty()
            if (r0 == 0) goto L_0x002d
            goto L_0x0002
        L_0x0027:
            boolean r0 = r4.isEmpty()
            if (r0 != 0) goto L_0x0002
        L_0x002d:
            r2 = 0
            org.json.JSONArray r1 = new org.json.JSONArray     // Catch:{ Exception -> 0x0039 }
            r1.<init>(r4)     // Catch:{ Exception -> 0x0039 }
            com.apiguard3.url_matcher.MatchesConfig r0 = new com.apiguard3.url_matcher.MatchesConfig
            r0.<init>(r1)
            return r0
        L_0x0039:
            com.apiguard3.internal.log$getBody r1 = com.apiguard3.internal.log.getBody.AGRequest     // Catch:{ all -> 0x004e }
            java.lang.String r0 = "閹駛咮椑胺⏇☓稑ိ㮙ᚏが飏轿蚱勖ꄈ調鵽㧉唟뇠瞽証믓鈨῀밷駞令蘢턁"
            java.lang.String r0 = AGRequest(r0)     // Catch:{ all -> 0x004e }
            java.lang.String r0 = r0.intern()     // Catch:{ all -> 0x004e }
            com.apiguard3.internal.checkCertificates.AGRequest(r1, r0)     // Catch:{ all -> 0x004e }
            com.apiguard3.url_matcher.MatchesConfig r0 = new com.apiguard3.url_matcher.MatchesConfig
            r0.<init>(r2)
            return r0
        L_0x004e:
            com.apiguard3.url_matcher.MatchesConfig r0 = new com.apiguard3.url_matcher.MatchesConfig
            r0.<init>(r2)
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: com.apiguard3.url_matcher.UrlMatcherConfig.getBody(java.lang.String):com.apiguard3.url_matcher.MatchesConfig");
    }

    public boolean equals(Object obj) {
        int i = get + 71;
        addHeader = i % 128;
        int i2 = i % 2;
        if (this == obj) {
            return true;
        }
        if (obj != null && getClass() == obj.getClass()) {
            UrlMatcherConfig urlMatcherConfig = (UrlMatcherConfig) obj;
            if (TextUtils.equals(this.schemeStr, urlMatcherConfig.schemeStr) && TextUtils.equals(this.domainStr, urlMatcherConfig.domainStr)) {
                int i3 = addHeader + 41;
                get = i3 % 128;
                if (i3 % 2 == 0 ? TextUtils.equals(this.portStr, urlMatcherConfig.portStr) : TextUtils.equals(this.portStr, urlMatcherConfig.portStr)) {
                    if (TextUtils.equals(this.pathStr, urlMatcherConfig.pathStr)) {
                        int i4 = get + 109;
                        addHeader = i4 % 128;
                        int i5 = i4 % 2;
                        if (TextUtils.equals(this.queryStr, urlMatcherConfig.queryStr)) {
                            int i6 = get + 9;
                            addHeader = i6 % 128;
                            int i7 = i6 % 2;
                            return true;
                        }
                    }
                }
            }
            int i8 = get + 117;
            addHeader = i8 % 128;
            int i9 = i8 % 2;
        }
        return false;
    }
}
