package com.apiguard3;

import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public class AGResponse {
    public static int AGRequest$Builder = 1;
    public static int getUrl;
    public final String AGRequest;
    public final Map<String, String> getBody;
    public final String getHeaders;
    public final int getMethod;

    static {
        Covode.recordClassIndex(2382);
    }

    public static class Builder {
        public static long getUrl = 6187802629896706682L;
        public static int method;
        public static int url = 1;
        public final Map<String, String> AGRequest;
        public String getBody;
        public int getHeaders;
        public String getMethod;

        static {
            Covode.recordClassIndex(2383);
        }

        public Builder() {
            this.AGRequest = Collections.synchronizedMap(new LinkedHashMap());
        }

        public AGResponse build() {
            AGResponse aGResponse = new AGResponse(this);
            int i = method + 75;
            url = i % 128;
            if (i % 2 != 0) {
                return aGResponse;
            }
            throw new NullPointerException("hashCode");
        }

        public Builder delete() {
            int i = method + 71;
            url = i % 128;
            int i2 = i % 2;
            method(getHeaders("뵕봑⣢닝茦腔랞乿풭뛺").intern());
            int i3 = method + 97;
            url = i3 % 128;
            int i4 = i3 % 2;
            return this;
        }

        public Builder get() {
            int i = url + 73;
            method = i % 128;
            int i2 = i % 2;
            method(getHeaders("쁨쀯領掋⽣倎ᯃ").intern());
            int i3 = method + 65;
            url = i3 % 128;
            int i4 = i3 % 2;
            return this;
        }

        public Builder head() {
            int i = url + 29;
            method = i % 128;
            int i2 = i % 2;
            method(getHeaders("䢺䣲Ɍ顳ઈ꺷㸽憝").intern());
            int i3 = url + 53;
            method = i3 % 128;
            int i4 = i3 % 2;
            return this;
        }

        public Builder post() {
            int i = url + 9;
            method = i % 128;
            int i2 = i % 2;
            method(getHeaders("魨ŝ髍ʪ깪춐").intern());
            int i3 = method + 33;
            url = i3 % 128;
            int i4 = i3 % 2;
            return this;
        }

        public Builder put() {
            int i = method + 121;
            url = i % 128;
            int i2 = i % 2;
            method(getHeaders("喪嗺챕噺⎇듮ᜧ").intern());
            int i3 = method + 121;
            url = i3 % 128;
            int i4 = i3 % 2;
            return this;
        }

        public static /* synthetic */ Map AGRequest(Builder builder) {
            int i = method + 7;
            int i2 = i % 128;
            url = i2;
            int i3 = i % 2;
            Map<String, String> map = builder.AGRequest;
            int i4 = i2 + 57;
            method = i4 % 128;
            int i5 = i4 % 2;
            return map;
        }

        public static /* synthetic */ int getBody(Builder builder) {
            int i = method + 85;
            int i2 = i % 128;
            url = i2;
            int i3 = i % 2;
            int i4 = builder.getHeaders;
            int i5 = i2 + 83;
            method = i5 % 128;
            int i6 = i5 % 2;
            return i4;
        }

        public static /* synthetic */ String getUrl(Builder builder) {
            int i = method + 111;
            int i2 = i % 128;
            url = i2;
            int i3 = i % 2;
            String str = builder.getMethod;
            int i4 = i2 + 9;
            method = i4 % 128;
            int i5 = i4 % 2;
            return str;
        }

        public Builder method(String str) {
            int i = method;
            int i2 = i + 19;
            url = i2 % 128;
            int i3 = i2 % 2;
            this.getBody = str;
            int i4 = i + 25;
            url = i4 % 128;
            int i5 = i4 % 2;
            return this;
        }

        public Builder statusCode(int i) {
            int i2 = url + 103;
            int i3 = i2 % 128;
            method = i3;
            int i4 = i2 % 2;
            this.getHeaders = i;
            int i5 = i3 + 35;
            url = i5 % 128;
            int i6 = i5 % 2;
            return this;
        }

        public Builder url(String str) {
            int i = method + 119;
            url = i % 128;
            if (i % 2 != 0) {
                this.getMethod = str;
                return this;
            }
            this.getMethod = str;
            throw new NullPointerException("hashCode");
        }

        public Builder(AGResponse aGResponse) {
            Map<String, String> synchronizedMap = Collections.synchronizedMap(new LinkedHashMap());
            this.AGRequest = synchronizedMap;
            this.getMethod = AGResponse.getUrl(aGResponse);
            this.getBody = AGResponse.getHeaders(aGResponse);
            this.getHeaders = AGResponse.AGRequest(aGResponse);
            synchronizedMap.putAll(aGResponse.getHeaders());
        }

        public static /* synthetic */ String getMethod(Builder builder) {
            char c;
            int i = method + 5;
            url = i % 128;
            if (i % 2 != 0) {
                c = '0';
            } else {
                c = 'U';
            }
            String str = builder.getBody;
            if (c == '0') {
                return str;
            }
            throw new NullPointerException("hashCode");
        }

        /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r8v1, resolved type: java.lang.String} */
        /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r8v4, resolved type: char[]} */
        /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r8v5, 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 getHeaders(java.lang.String r8) {
            /*
                if (r8 == 0) goto L_0x0010
                char[] r8 = r8.toCharArray()
                int r0 = url
                int r1 = r0 + 29
                int r0 = r1 % 128
                method = r0
                int r0 = r1 % 2
            L_0x0010:
                char[] r8 = (char[]) r8
                long r0 = getUrl
                char[] r8 = com.apiguard3.internal.setNextFocusRightId.AGRequest(r0, r8)
                r7 = 4
                r6 = 4
            L_0x001a:
                int r1 = r8.length
                r0 = 49
                if (r6 < r1) goto L_0x0027
                java.lang.String r1 = new java.lang.String
                int r0 = r8.length
                int r0 = r0 - r7
                r1.<init>(r8, r7, r0)
                return r1
            L_0x0027:
                int r0 = url
                int r1 = r0 + 101
                int r0 = r1 % 128
                method = r0
                int r0 = r1 % 2
                int r2 = r6 + -4
                char r1 = r8[r6]
                int r0 = r6 % 4
                char r0 = r8[r0]
                r1 = r1 ^ r0
                long r4 = (long) r1
                long r2 = (long) r2
                long r0 = getUrl
                long r2 = r2 * r0
                long r4 = r4 ^ r2
                int r0 = (int) r4
                char r0 = (char) r0
                r8[r6] = r0
                int r6 = r6 + 1
                goto L_0x001a
            */
            throw new UnsupportedOperationException("Method not decompiled: com.apiguard3.AGResponse.Builder.getHeaders(java.lang.String):java.lang.String");
        }

        public Builder headers(Map<String, String> map) {
            int i = url + 75;
            method = i % 128;
            if (i % 2 != 0 ? map != null : map != null) {
                for (Map.Entry next : map.entrySet()) {
                    int i2 = method + 83;
                    url = i2 % 128;
                    int i3 = i2 % 2;
                    addHeader((String) next.getKey(), (String) next.getValue());
                }
            }
            return this;
        }

        public Builder headersMultiMap(Map<String, List<String>> map) {
            if (map != null) {
                int i = method + 113;
                url = i % 128;
                int i2 = i % 2;
                for (Map.Entry next : map.entrySet()) {
                    addHeader((String) next.getKey(), TextUtils.join(getHeaders("돼돐痯⼕堌").intern(), (Iterable) next.getValue()));
                }
            }
            int i3 = url + 51;
            method = i3 % 128;
            int i4 = i3 % 2;
            return this;
        }

        public Builder addHeader(String str, String str2) {
            if (!(str == null || str2 == null)) {
                int i = method + 37;
                url = i % 128;
                int i2 = i % 2;
                if (!str2.isEmpty()) {
                    int i3 = url + 87;
                    method = i3 % 128;
                    int i4 = i3 % 2;
                    this.AGRequest.put(str, str2);
                    int i5 = method + 97;
                    url = i5 % 128;
                    int i6 = i5 % 2;
                }
            }
            return this;
        }
    }

    public String getMethod() {
        int i = AGRequest$Builder;
        int i2 = i + 25;
        getUrl = i2 % 128;
        int i3 = i2 % 2;
        String str = this.AGRequest;
        int i4 = i + 37;
        getUrl = i4 % 128;
        int i5 = i4 % 2;
        return str;
    }

    public int getStatusCode() {
        int i = AGRequest$Builder;
        int i2 = i + 15;
        getUrl = i2 % 128;
        int i3 = i2 % 2;
        int i4 = this.getMethod;
        int i5 = i + 3;
        getUrl = i5 % 128;
        int i6 = i5 % 2;
        return i4;
    }

    public String getUrl() {
        int i = AGRequest$Builder + 123;
        getUrl = i % 128;
        if (i % 2 == 0) {
            return this.getHeaders;
        }
        return this.getHeaders;
    }

    public Builder newBuilder() {
        Builder builder = new Builder(this);
        int i = AGRequest$Builder + 57;
        getUrl = i % 128;
        if (i % 2 == 0) {
            return builder;
        }
        throw new NullPointerException("hashCode");
    }

    public Map<String, String> getHeaders() {
        int i = AGRequest$Builder;
        int i2 = i + 45;
        getUrl = i2 % 128;
        int i3 = i2 % 2;
        Map<String, String> map = this.getBody;
        int i4 = i + 109;
        getUrl = i4 % 128;
        int i5 = i4 % 2;
        return map;
    }

    public static /* synthetic */ int AGRequest(AGResponse aGResponse) {
        int i = AGRequest$Builder + 7;
        getUrl = i % 128;
        int i2 = i % 2;
        return aGResponse.getMethod;
    }

    public static /* synthetic */ String getUrl(AGResponse aGResponse) {
        int i = getUrl + 97;
        AGRequest$Builder = i % 128;
        int i2 = i % 2;
        return aGResponse.getHeaders;
    }

    public AGResponse(Builder builder) {
        this.getHeaders = Builder.getUrl(builder);
        this.AGRequest = Builder.getMethod(builder);
        this.getMethod = Builder.getBody(builder);
        this.getBody = Builder.AGRequest(builder);
    }

    public static /* synthetic */ String getHeaders(AGResponse aGResponse) {
        int i = getUrl + 39;
        int i2 = i % 128;
        AGRequest$Builder = i2;
        int i3 = i % 2;
        String str = aGResponse.AGRequest;
        int i4 = i2 + 87;
        getUrl = i4 % 128;
        int i5 = i4 % 2;
        return str;
    }
}
