package com.apiguard3.internal;

import android.graphics.Color;
import android.os.Process;
import android.text.TextUtils;
import android.view.ViewConfiguration;
import android.widget.ExpandableListView;
import com.apiguard3.internal.log;
import com.bytedance.covode.number.Covode;
import org.json.JSONException;
import org.json.JSONObject;

public final class onInitializationFailure extends APIGuard$Callback {
    public static int AGRequest$Builder = -247385822;
    public static int delete = 1;
    public static char get = 0;
    public static long method = 0;
    public static int put;
    public String addHeader = Thread.currentThread().getName();
    public String getHeaders;
    public getBody newBuilder;
    public long url = Thread.currentThread().getId();

    static {
        Covode.recordClassIndex(2462);
    }

    public enum getBody {
        getBody,
        AGRequest;
        
        public static long getHeaders;
        public static int getUrl;
        public static int method;

        public static void getUrl() {
            getHeaders = 8865242339093977835L;
        }

        /* access modifiers changed from: public */
        static {
            int i = method + 61;
            getUrl = i % 128;
            int i2 = i % 2;
        }

        /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r10v1, resolved type: char[]} */
        /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r10v2, resolved type: java.lang.String} */
        /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r10v4, resolved type: java.lang.String} */
        /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r10v5, resolved type: java.lang.String} */
        /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r10v6, resolved type: java.lang.String} */
        /* JADX WARNING: Code restructure failed: missing block: B:10:0x0045, code lost:
            if (r10 != null) goto L_0x0048;
         */
        /* JADX WARNING: Code restructure failed: missing block: B:11:0x0048, code lost:
            r1 = r1 + 117;
            method = r1 % 128;
            r1 = r1 % 2;
            r10 = r10.toCharArray();
         */
        /* JADX WARNING: Code restructure failed: missing block: B:3:0x000f, code lost:
            if (r10 == null) goto L_0x0011;
         */
        /* JADX WARNING: Code restructure failed: missing block: B:4:0x0011, code lost:
            r8 = com.apiguard3.internal.setNextFocusRightId.AGRequest(getHeaders, (char[]) r10);
            r6 = 4;
         */
        /* JADX WARNING: Code restructure failed: missing block: B:6:0x001c, code lost:
            if (r6 < r8.length) goto L_0x0026;
         */
        /* JADX WARNING: Code restructure failed: missing block: B:8:0x0025, code lost:
            return new java.lang.String(r8, 4, r8.length - 4);
         */
        /* JADX WARNING: Code restructure failed: missing block: B:9:0x0026, code lost:
            r1 = getUrl + 115;
            method = r1 % 128;
            r1 = r1 % 2;
            r8[r6] = (char) ((int) (((long) (r8[r6] ^ r8[r6 % 4])) ^ (((long) (r6 - 4)) * getHeaders)));
            r6 = r6 + 1;
         */
        /* JADX WARNING: Multi-variable type inference failed */
        /* Code decompiled incorrectly, please refer to instructions dump. */
        public static java.lang.String getUrl(java.lang.String r10) {
            /*
                int r0 = method
                int r2 = r0 + 53
                int r1 = r2 % 128
                getUrl = r1
                r9 = 2
                int r2 = r2 % r9
                r0 = 1
                if (r2 != 0) goto L_0x0045
                r0 = 30
                if (r10 != 0) goto L_0x0048
            L_0x0011:
                char[] r10 = (char[]) r10
                long r0 = getHeaders
                char[] r8 = com.apiguard3.internal.setNextFocusRightId.AGRequest(r0, r10)
                r7 = 4
                r6 = 4
            L_0x001b:
                int r0 = r8.length
                if (r6 < r0) goto L_0x0026
                java.lang.String r1 = new java.lang.String
                int r0 = r8.length
                int r0 = r0 - r7
                r1.<init>(r8, r7, r0)
                return r1
            L_0x0026:
                int r0 = getUrl
                int r1 = r0 + 115
                int r0 = r1 % 128
                method = r0
                int r1 = r1 % r9
                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 = getHeaders
                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_0x001b
            L_0x0045:
                if (r10 != 0) goto L_0x0048
                goto L_0x0011
            L_0x0048:
                int r1 = r1 + 117
                int r0 = r1 % 128
                method = r0
                int r1 = r1 % r9
                char[] r10 = r10.toCharArray()
                goto L_0x0011
            */
            throw new UnsupportedOperationException("Method not decompiled: com.apiguard3.internal.onInitializationFailure.getBody.getUrl(java.lang.String):java.lang.String");
        }
    }

    public final String toString() {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(getUrl("\u0000\u0000\u0000\u0000", "?姅言졄钜འ벅ﮢ", "賗뭽䢘", (char) (-1 - ExpandableListView.getPackedPositionChild(0)), TextUtils.getCapsMode("", 0, 0)).intern(), this.url);
            jSONObject.put(getUrl("\u0000\u0000\u0000\u0000", "有歘싴㚼?㾌ႁ꫄ᚥ唹", "荧ꕯ蕠", (char) (TextUtils.indexOf("", '0') + 1), Process.myTid() >> 22).intern(), this.addHeader);
            jSONObject.put(getUrl("\u0000\u0000\u0000\u0000", "蓽马뇏ﰊ乓ᕣꭽ抗䗍셄", "ޛ킮৶", (char) TextUtils.getCapsMode("", 0, 0), 1624288776 - (ViewConfiguration.getZoomControlsTimeout() > 0 ? 1 : (ViewConfiguration.getZoomControlsTimeout() == 0 ? 0 : -1))).intern(), this.newBuilder.ordinal());
            jSONObject.put(getUrl("\u0000\u0000\u0000\u0000", "鐔駉铸", "ꩀ䚦ᴴ", (char) (13382 - (ViewConfiguration.getLongPressTimeout() >> 16)), (Process.myPid() >> 22) - 1494731862).intern(), this.getHeaders);
            jSONObject.put(getUrl("\u0000\u0000\u0000\u0000", "쬤쿥嬫鯺㊽?쨺䡥䮞", "犑⎡蕸쓹", (char) Color.argb(0, 0, 0, 0), 2015601009 - TextUtils.lastIndexOf("", '0', 0)).intern(), this.getUrl);
            jSONObject.put(getUrl("\u0000\u0000\u0000\u0000", "旜｝", "܆ٿⱔ", (char) (21734 - (ViewConfiguration.getGlobalActionKeyTimeout() > 0 ? 1 : (ViewConfiguration.getGlobalActionKeyTimeout() == 0 ? 0 : -1))), (ViewConfiguration.getScrollBarSize() >> 8) + 1745256199).intern(), this.AGRequest);
            int i = delete + 119;
            put = i % 128;
            int i2 = i % 2;
        } catch (JSONException unused) {
        }
        return jSONObject.toString();
    }

    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r12v1, resolved type: java.lang.String} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r11v1, resolved type: char[]} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r11v2, resolved type: java.lang.String} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r10v1, resolved type: char[]} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r10v2, resolved type: java.lang.String} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r12v3, resolved type: char[]} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r10v4, resolved type: java.lang.String} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r11v4, resolved type: java.lang.String} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r12v4, resolved type: java.lang.String} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r11v5, resolved type: java.lang.String} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r10v5, resolved type: java.lang.String} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r12v5, resolved type: java.lang.String} */
    /* JADX WARNING: Multi-variable type inference failed */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public static java.lang.String getUrl(java.lang.String r10, java.lang.String r11, java.lang.String r12, char r13, int r14) {
        /*
            r1 = 13
            if (r12 != 0) goto L_0x009d
            r0 = 13
        L_0x0006:
            r9 = 2
            if (r0 == r1) goto L_0x0016
            int r0 = put
            int r1 = r0 + 101
            int r0 = r1 % 128
            delete = r0
            int r1 = r1 % r9
            char[] r12 = r12.toCharArray()
        L_0x0016:
            char[] r12 = (char[]) r12
            if (r11 != 0) goto L_0x008e
        L_0x001a:
            char[] r11 = (char[]) r11
            if (r10 != 0) goto L_0x0077
        L_0x001e:
            char[] r10 = (char[]) r10
            java.lang.Object r5 = r12.clone()
            char[] r5 = (char[]) r5
            java.lang.Object r6 = r10.clone()
            char[] r6 = (char[]) r6
            r4 = 0
            char r0 = r5[r4]
            r13 = r13 ^ r0
            char r0 = (char) r13
            r5[r4] = r0
            char r1 = r6[r9]
            char r0 = (char) r14
            int r1 = r1 + r0
            char r0 = (char) r1
            r6[r9] = r0
            int r8 = r11.length
            char[] r7 = new char[r8]
        L_0x003d:
            r0 = 59
            if (r4 < r8) goto L_0x004f
            java.lang.String r2 = new java.lang.String
            r2.<init>(r7)
            int r1 = put
            int r1 = r1 + r0
            int r0 = r1 % 128
            delete = r0
            int r1 = r1 % r9
            return r2
        L_0x004f:
            int r0 = delete
            int r1 = r0 + 55
            int r0 = r1 % 128
            put = r0
            int r1 = r1 % r9
            com.apiguard3.internal.setNextFocusUpId.getHeaders(r5, r6, r4)
            char r1 = r11[r4]
            int r0 = r4 + 3
            int r0 = r0 % 4
            char r0 = r5[r0]
            r1 = r1 ^ r0
            long r2 = (long) r1
            long r0 = method
            long r2 = r2 ^ r0
            int r0 = AGRequest$Builder
            long r0 = (long) r0
            long r2 = r2 ^ r0
            char r0 = get
            long r0 = (long) r0
            long r2 = r2 ^ r0
            int r0 = (int) r2
            char r0 = (char) r0
            r7[r4] = r0
            int r4 = r4 + 1
            goto L_0x003d
        L_0x0077:
            int r0 = put
            int r1 = r0 + 109
            int r0 = r1 % 128
            delete = r0
            int r1 = r1 % r9
            char[] r10 = r10.toCharArray()
            int r0 = put
            int r1 = r0 + 83
            int r0 = r1 % 128
            delete = r0
            int r1 = r1 % r9
            goto L_0x001e
        L_0x008e:
            int r0 = delete
            int r1 = r0 + 103
            int r0 = r1 % 128
            put = r0
            int r1 = r1 % r9
            char[] r11 = r11.toCharArray()
            goto L_0x001a
        L_0x009d:
            r0 = 16
            goto L_0x0006
        */
        throw new UnsupportedOperationException("Method not decompiled: com.apiguard3.internal.onInitializationFailure.getUrl(java.lang.String, java.lang.String, java.lang.String, char, int):java.lang.String");
    }

    public onInitializationFailure(getBody getbody, String str, log.getBody getbody2, log.getMethod getmethod, String str2, long j) {
        super(getbody2, getmethod, str2, j);
        this.newBuilder = getbody;
        this.getHeaders = str;
    }
}
