package defpackage;

import android.app.AlarmManager;
import android.app.BroadcastOptions;
import android.app.job.JobInfo;
import android.app.job.JobScheduler;
import android.content.ComponentName;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcelable;
import android.os.PersistableBundle;
import android.os.SystemClock;
import android.os.UserHandle;
import android.text.TextUtils;
import android.util.Log;
import android.util.Pair;
import com.google.android.gms.internal.measurement.zzaeh;
import j$.util.DesugarCollections;
import j$.util.Objects;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.math.BigInteger;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import java.nio.channels.OverlappingFileLockException;
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.zip.GZIPInputStream;

/* JADX INFO: renamed from: ᵜᵻ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C2894 implements InterfaceC1959 {

    /* JADX INFO: renamed from: ᵜᵤ, reason: contains not printable characters */
    public static volatile C2894 f11086;

    /* JADX INFO: renamed from: ʽᵡᵢᵾ, reason: contains not printable characters */
    public boolean f11087;

    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public C0258 f11088;

    /* JADX INFO: renamed from: ʿᵿʽᵞ, reason: contains not printable characters */
    public final HashMap f11089;

    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    public long f11091;

    /* JADX INFO: renamed from: ˁʢᵛ, reason: contains not printable characters */
    public ArrayList f11092;

    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    public boolean f11093;

    /* JADX INFO: renamed from: ˁᵺˈ, reason: contains not printable characters */
    public long f11094;

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final C1962 f11095;

    /* JADX INFO: renamed from: ˈⁱᵡ, reason: contains not printable characters */
    public boolean f11096;

    /* JADX INFO: renamed from: ˉˆᵗ, reason: contains not printable characters */
    public C3164 f11097;

    /* JADX INFO: renamed from: ˊˌˊ, reason: contains not printable characters */
    public ArrayList f11099;

    /* JADX INFO: renamed from: ˊᵾʽʼ, reason: contains not printable characters */
    public ArrayList f11101;

    /* JADX INFO: renamed from: ˋʿᐧ, reason: contains not printable characters */
    public String f11102;

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final C1811 f11104;

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public C5004 f11105;

    /* JADX INFO: renamed from: ˏᵩʨ, reason: contains not printable characters */
    public final HashMap f11106;

    /* JADX INFO: renamed from: ˑʢ, reason: contains not printable characters */
    public boolean f11107;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public C1694 f11109;

    /* JADX INFO: renamed from: ᵛˀˊ, reason: contains not printable characters */
    public final HashMap f11110;

    /* JADX INFO: renamed from: ᵛˑﹳ, reason: contains not printable characters */
    public int f11111;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final C5004 f11112;

    /* JADX INFO: renamed from: ᵞᵛᵘ, reason: contains not printable characters */
    public FileChannel f11113;

    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public final C1103 f11114;

    /* JADX INFO: renamed from: ᵡᵶᵬʤ, reason: contains not printable characters */
    public C3160 f11116;

    /* JADX INFO: renamed from: ᵨˈʼﹶ, reason: contains not printable characters */
    public FileLock f11117;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public C2477 f11118;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public C3647 f11119;

    /* JADX INFO: renamed from: ᵵᵬᵽ, reason: contains not printable characters */
    public int f11120;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public C1549 f11121;

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public C0786 f11122;

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public final AtomicBoolean f11098 = new AtomicBoolean(false);

    /* JADX INFO: renamed from: ˊᵡᵗʨ, reason: contains not printable characters */
    public final LinkedList f11100 = new LinkedList();

    /* JADX INFO: renamed from: ᵡᵶ, reason: contains not printable characters */
    public final HashMap f11115 = new HashMap();

    /* JADX INFO: renamed from: ˋᵯᵩ, reason: contains not printable characters */
    public final C3031 f11103 = new C3031(5, this);

    /* JADX INFO: renamed from: ˀᵗ, reason: contains not printable characters */
    public long f11090 = -1;

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public final C4554 f11108 = new C4554(this);

    public C2894(C2926 c2926) {
        this.f11114 = C1103.m3563(c2926.f11267, null, null, null);
        C1962 c1962 = new C1962(this);
        c1962.m5027();
        this.f11095 = c1962;
        C5004 c5004 = new C5004(this, 0);
        c5004.m5027();
        this.f11112 = c5004;
        C1811 c1811 = new C1811(this);
        c1811.m5027();
        this.f11104 = c1811;
        this.f11106 = new HashMap();
        this.f11110 = new HashMap();
        this.f11089 = new HashMap();
        mo3578().m5246(new RunnableC1726(this, 11, c2926));
    }

    /* JADX INFO: renamed from: ˀᵗ, reason: contains not printable characters */
    public static final Boolean m6881(C2847 c2847) {
        Boolean bool = c2847.f10909;
        String str = c2847.f10916;
        if (!TextUtils.isEmpty(str)) {
            int iOrdinal = ((EnumC3695) C3031.m7124(str).f11655).ordinal();
            if (iOrdinal == 0 || iOrdinal == 1) {
                return null;
            }
            if (iOrdinal == 2) {
                return Boolean.TRUE;
            }
            if (iOrdinal == 3) {
                return Boolean.FALSE;
            }
        }
        return bool;
    }

    /* JADX INFO: renamed from: ˁʢᵛ, reason: contains not printable characters */
    public static final void m6882(AbstractC1850 abstractC1850) {
        if (abstractC1850 == null) {
            ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Upload Component not created");
        } else {
            if (abstractC1850.f7324) {
                return;
            }
            ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Component not initialized: ".concat(String.valueOf(abstractC1850.getClass())));
        }
    }

    /* JADX INFO: renamed from: ˊˌˊ, reason: contains not printable characters */
    public static final boolean m6883(C2847 c2847) {
        return !TextUtils.isEmpty(c2847.f10918);
    }

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public static C2894 m6884(Context context) {
        ᵘᵞʿⁱ.ᵶᵥᵝ(context);
        ᵘᵞʿⁱ.ᵶᵥᵝ(context.getApplicationContext());
        if (f11086 == null) {
            synchronized (C2894.class) {
                try {
                    if (f11086 == null) {
                        f11086 = new C2894(new C2926(context, 3));
                    }
                } finally {
                }
            }
        }
        return f11086;
    }

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public static final void m6885(C4225 c4225, String str) {
        List listM9191 = c4225.m9191();
        for (int i = 0; i < listM9191.size(); i++) {
            if (str.equals(((C0114) listM9191.get(i)).m1189())) {
                c4225.m9180(i);
                return;
            }
        }
    }

    /* JADX INFO: renamed from: ᵞᵛᵘ, reason: contains not printable characters */
    public static void m6886(Context context, Intent intent) {
        if (Build.VERSION.SDK_INT < 34) {
            context.sendBroadcast(intent);
        } else {
            context.sendBroadcast(intent, null, BroadcastOptions.makeBasic().setShareIdentityEnabled(true).toBundle());
        }
    }

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public static final void m6887(C4225 c4225, int i, String str) {
        List listM9191 = c4225.m9191();
        for (int i2 = 0; i2 < listM9191.size(); i2++) {
            if ("_err".equals(((C0114) listM9191.get(i2)).m1189())) {
                return;
            }
        }
        C2545 c2545M1181 = C0114.m1181();
        c2545M1181.m6263("_err");
        c2545M1181.m6262(i);
        C0114 c0114 = (C0114) c2545M1181.m9869();
        C2545 c2545M11812 = C0114.m1181();
        c2545M11812.m6263("_ev");
        c2545M11812.m6261(str);
        C0114 c01142 = (C0114) c2545M11812.m9869();
        c4225.m9188(c0114);
        c4225.m9188(c01142);
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final C0875 m6888(String str) throws Throwable {
        C0875 c0875 = C0875.f3871;
        mo3578().m5243();
        m6918();
        HashMap map = this.f11106;
        C0875 c0875M4583 = (C0875) map.get(str);
        if (c0875M4583 == null) {
            C1694 c1694 = this.f11109;
            m6882(c1694);
            c0875M4583 = c1694.m4583(str);
            if (c0875M4583 == null) {
                c0875M4583 = C0875.f3871;
            }
            mo3578().m5243();
            m6918();
            map.put(str, c0875M4583);
            C1694 c16942 = this.f11109;
            m6882(c16942);
            c16942.m4609(str, c0875M4583);
        }
        return c0875M4583;
    }

    /* JADX INFO: renamed from: ʽᵡᵢᵾ, reason: contains not printable characters */
    public final Boolean m6889(C2019 c2019) {
        try {
            long jM5400 = c2019.m5400();
            C1103 c1103 = this.f11114;
            if (jM5400 != -2147483648L) {
                if (c2019.m5400() == C1593.m4436(c1103.f4713).m9254(0, c2019.m5415()).versionCode) {
                    return Boolean.TRUE;
                }
            } else {
                String str = C1593.m4436(c1103.f4713).m9254(0, c2019.m5415()).versionName;
                String strM5414 = c2019.m5414();
                if (strM5414 != null && strM5414.equals(str)) {
                    return Boolean.TRUE;
                }
            }
            return Boolean.FALSE;
        } catch (PackageManager.NameNotFoundException unused) {
            return null;
        }
    }

    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public final int m6890(String str, C2198 c2198) throws Throwable {
        EnumC3695 enumC3695M4956;
        C1811 c1811 = this.f11104;
        C1699 c1699M4967 = c1811.m4967(str);
        EnumC0174 enumC0174 = EnumC0174.f1601;
        if (c1699M4967 == null) {
            c2198.m5759(enumC0174, EnumC4518.FAILSAFE);
            return 1;
        }
        C1694 c1694 = this.f11109;
        m6882(c1694);
        C2019 c2019M4596 = c1694.m4596(str);
        if (c2019M4596 == null || ((EnumC3695) C3031.m7124(c2019M4596.m5401()).f11655) != EnumC3695.f14081 || (enumC3695M4956 = c1811.m4956(str, enumC0174)) == EnumC3695.f14082) {
            c2198.m5759(enumC0174, EnumC4518.REMOTE_DEFAULT);
            if (c1811.m4965(str, enumC0174)) {
                return 0;
            }
        } else {
            c2198.m5759(enumC0174, EnumC4518.REMOTE_ENFORCED_DEFAULT);
            if (enumC3695M4956 == EnumC3695.f14084) {
                return 0;
            }
        }
        return 1;
    }

    /* JADX INFO: renamed from: ʿᵿʽᵞ, reason: contains not printable characters */
    public final void m6891(String str, C2847 c2847) throws Throwable {
        mo3578().m5243();
        m6918();
        boolean zM6883 = m6883(c2847);
        String str2 = c2847.f10910;
        if (zM6883) {
            if (!c2847.f10911) {
                m6894(c2847);
                return;
            }
            Boolean boolM6881 = m6881(c2847);
            if ("_npa".equals(str) && boolM6881 != null) {
                mo3572().f13416.m4476("Falling back to manifest metadata value for ad personalization");
                mo3579().getClass();
                m6919(new C0973(System.currentTimeMillis(), Long.valueOf(true != boolM6881.booleanValue() ? 0L : 1L), "_npa", "auto"), c2847);
                return;
            }
            C1623 c1623 = mo3572().f13416;
            C1103 c1103 = this.f11114;
            c1623.m4474(c1103.f4717.m5502(str), "Removing user property");
            C1694 c1694 = this.f11109;
            m6882(c1694);
            c1694.m4629();
            try {
                m6894(c2847);
                if ("_id".equals(str)) {
                    C1694 c16942 = this.f11109;
                    m6882(c16942);
                    ᵘᵞʿⁱ.ᵶᵥᵝ(str2);
                    c16942.m4631(str2, "_lair");
                }
                C1694 c16943 = this.f11109;
                m6882(c16943);
                ᵘᵞʿⁱ.ᵶᵥᵝ(str2);
                c16943.m4631(str2, str);
                C1694 c16944 = this.f11109;
                m6882(c16944);
                c16944.m4605();
                mo3572().f13416.m4474(c1103.f4717.m5502(str), "User property removed");
                C1694 c16945 = this.f11109;
                m6882(c16945);
                c16945.m4630();
            } catch (Throwable th) {
                C1694 c16946 = this.f11109;
                m6882(c16946);
                c16946.m4630();
                throw th;
            }
        }
    }

    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    public final void m6892(C0542 c0542, long j, boolean z) throws Throwable {
        C4922 c4922;
        Object obj;
        String str = true != z ? "_lte" : "_se";
        C1694 c1694 = this.f11109;
        m6882(c1694);
        C4922 c4922M4608 = c1694.m4608(c0542.m2096(), str);
        if (c4922M4608 == null || (obj = c4922M4608.f18719) == null) {
            String strM2096 = c0542.m2096();
            mo3579().getClass();
            c4922 = new C4922(strM2096, "auto", str, System.currentTimeMillis(), Long.valueOf(j));
        } else {
            String strM20962 = c0542.m2096();
            mo3579().getClass();
            c4922 = new C4922(strM20962, "auto", str, System.currentTimeMillis(), Long.valueOf(((Long) obj).longValue() + j));
        }
        C4243 c4243M10058 = C4822.m10058();
        c4243M10058.m9868();
        ((C4822) c4243M10058.f17955).m10073(str);
        mo3579().getClass();
        long jCurrentTimeMillis = System.currentTimeMillis();
        c4243M10058.m9868();
        ((C4822) c4243M10058.f17955).m10059(jCurrentTimeMillis);
        Object obj2 = c4922.f18719;
        long jLongValue = ((Long) obj2).longValue();
        c4243M10058.m9868();
        ((C4822) c4243M10058.f17955).m10060(jLongValue);
        C4822 c4822 = (C4822) c4243M10058.m9869();
        int iM5256 = C1962.m5256(str, c0542);
        if (iM5256 >= 0) {
            c0542.m9868();
            ((C5090) c0542.f17955).m10483(iM5256, c4822);
        } else {
            c0542.m9868();
            ((C5090) c0542.f17955).m10497(c4822);
        }
        if (j > 0) {
            C1694 c16942 = this.f11109;
            m6882(c16942);
            c16942.m4581(c4922);
            mo3572().f13414.m4475("Updated engagement user property. scope, value", true != z ? "lifetime" : "session-scoped", obj2);
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:138:0x049b A[Catch: all -> 0x0125, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:139:0x04ba A[Catch: all -> 0x0125, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:152:0x0522  */
    /* JADX WARN: Removed duplicated region for block: B:186:0x05ea A[Catch: all -> 0x0125, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:192:0x0606 A[Catch: all -> 0x0125, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:196:0x061b A[Catch: all -> 0x0125, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:225:0x0737  */
    /* JADX WARN: Removed duplicated region for block: B:235:0x0789 A[Catch: all -> 0x0125, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:344:0x0b5b A[Catch: all -> 0x0125, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:354:0x0b8f A[PHI: r13
      0x0b8f: PHI (r13v11 long) = (r13v10 long), (r13v36 long) binds: [B:343:0x0b59, B:523:0x0b8f] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:357:0x0ba7 A[Catch: all -> 0x0125, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:358:0x0bca A[Catch: all -> 0x0125, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:48:0x019f  */
    /* JADX WARN: Removed duplicated region for block: B:52:0x01c1 A[Catch: all -> 0x0125, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:76:0x0289 A[Catch: all -> 0x0125, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:79:0x029d  */
    /* JADX WARN: Removed duplicated region for block: B:80:0x029e A[Catch: all -> 0x0125, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:90:0x02db A[Catch: all -> 0x0125, TRY_LEAVE, TryCatch #1 {all -> 0x0125, blocks: (B:3:0x0019, B:5:0x0035, B:8:0x003e, B:9:0x005e, B:12:0x007a, B:15:0x00a6, B:17:0x00e5, B:20:0x00fe, B:22:0x0108, B:227:0x074f, B:26:0x0135, B:29:0x014b, B:31:0x0151, B:33:0x0157, B:35:0x016a, B:39:0x0177, B:41:0x0182, B:43:0x0190, B:45:0x0196, B:49:0x01a1, B:50:0x01af, B:52:0x01c1, B:55:0x01e1, B:57:0x01e7, B:59:0x01f7, B:61:0x0205, B:63:0x0215, B:64:0x0220, B:65:0x0223, B:67:0x0230, B:69:0x023a, B:70:0x024a, B:72:0x0269, B:74:0x0273, B:76:0x0289, B:77:0x0293, B:80:0x029e, B:81:0x02a8, B:84:0x02b0, B:87:0x02c1, B:88:0x02c4, B:90:0x02db, B:141:0x04d5, B:142:0x04d8, B:144:0x04e4, B:147:0x04f5, B:149:0x0506, B:151:0x0512, B:184:0x05dd, B:186:0x05ea, B:188:0x05f0, B:190:0x05f6, B:192:0x0606, B:193:0x0609, B:194:0x0615, B:196:0x061b, B:197:0x0627, B:199:0x062d, B:201:0x063d, B:203:0x0647, B:204:0x065c, B:206:0x0662, B:207:0x067d, B:209:0x0683, B:210:0x06a1, B:211:0x06ae, B:215:0x06d7, B:212:0x06b4, B:214:0x06c2, B:216:0x06df, B:217:0x06fe, B:219:0x0704, B:221:0x0717, B:222:0x0724, B:224:0x072b, B:226:0x073b, B:155:0x0535, B:157:0x0545, B:160:0x0558, B:162:0x056a, B:164:0x0576, B:167:0x058a, B:170:0x0598, B:172:0x05a2, B:174:0x05ac, B:177:0x05b7, B:179:0x05bd, B:181:0x05cd, B:182:0x05d8, B:98:0x0301, B:101:0x030b, B:103:0x0319, B:107:0x036a, B:104:0x033b, B:106:0x0349, B:110:0x0371, B:113:0x03a4, B:114:0x03cc, B:116:0x0401, B:118:0x0407, B:121:0x0413, B:123:0x0448, B:124:0x0465, B:126:0x046b, B:128:0x0479, B:132:0x048d, B:129:0x0481, B:135:0x0494, B:138:0x049b, B:139:0x04ba, B:230:0x0766, B:232:0x0778, B:234:0x0781, B:245:0x07b3, B:235:0x0789, B:237:0x0792, B:239:0x0798, B:242:0x07a4, B:244:0x07ae, B:246:0x07b6, B:247:0x07c2, B:250:0x07ca, B:252:0x07dc, B:253:0x07e7, B:255:0x07ef, B:259:0x081e, B:261:0x083a, B:263:0x084f, B:265:0x086b, B:267:0x0880, B:268:0x089c, B:270:0x08a2, B:272:0x08ba, B:273:0x08c8, B:275:0x08d8, B:276:0x08e6, B:277:0x08e9, B:279:0x0933, B:281:0x0939, B:287:0x0964, B:289:0x096c, B:290:0x098a, B:292:0x0990, B:293:0x09a4, B:295:0x09bb, B:297:0x09d5, B:299:0x09e7, B:301:0x09f1, B:302:0x09f4, B:304:0x0a4f, B:305:0x0a62, B:308:0x0a6a, B:311:0x0a89, B:313:0x0aa2, B:315:0x0ab7, B:317:0x0abc, B:319:0x0ac0, B:321:0x0ac4, B:323:0x0ace, B:325:0x0ad7, B:327:0x0adb, B:329:0x0ae1, B:331:0x0aec, B:333:0x0afa, B:400:0x0d5b, B:335:0x0b02, B:337:0x0b1e, B:342:0x0b3b, B:344:0x0b5b, B:345:0x0b63, B:347:0x0b69, B:349:0x0b7b, B:355:0x0b91, B:357:0x0ba7, B:358:0x0bca, B:360:0x0bd6, B:362:0x0bec, B:363:0x0c2c, B:369:0x0c48, B:371:0x0c53, B:373:0x0c57, B:375:0x0c5b, B:377:0x0c5f, B:378:0x0c6b, B:379:0x0c70, B:381:0x0c76, B:383:0x0c8c, B:384:0x0c91, B:399:0x0d58, B:386:0x0cd0, B:388:0x0cd4, B:392:0x0ce8, B:394:0x0d04, B:395:0x0d0b, B:398:0x0d4c, B:389:0x0cd9, B:340:0x0b24, B:401:0x0d61, B:403:0x0d6b, B:404:0x0d7f, B:405:0x0d87, B:407:0x0d8d, B:408:0x0da1, B:410:0x0db3, B:430:0x0e66, B:432:0x0e6c, B:434:0x0e83, B:437:0x0e8e, B:439:0x0e98, B:441:0x0ebf, B:443:0x0ecf, B:444:0x0ed9, B:446:0x0ee7, B:447:0x0ef1, B:448:0x0efc, B:450:0x0f0e, B:453:0x0f15, B:458:0x0f58, B:454:0x0f24, B:456:0x0f32, B:457:0x0f3f, B:459:0x0f67, B:460:0x0f7a, B:464:0x0f9a, B:463:0x0f85, B:411:0x0dce, B:413:0x0dd4, B:415:0x0de6, B:417:0x0ded, B:423:0x0e05, B:425:0x0e0c, B:427:0x0e57, B:429:0x0e5e, B:428:0x0e5b, B:424:0x0e09, B:416:0x0dea, B:282:0x0949, B:284:0x094f, B:286:0x0955, B:266:0x087d, B:262:0x084c, B:256:0x07f5, B:258:0x07fb, B:465:0x0fa3), top: B:473:0x0019, inners: #0, #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:96:0x02f7  */
    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean m6893(long j, String str) {
        boolean z;
        int i;
        Long l;
        C1103 c1103;
        C2019 c2019M4596;
        Long l2;
        long j2;
        long j3;
        int iM4963;
        long jM9182;
        String str2;
        C0542 c0542;
        int i2;
        int i3;
        C3691 c3691M6921;
        C0511 c0511;
        boolean zM4970;
        boolean z2;
        String str3;
        String str4;
        int i4;
        int i5;
        String str5;
        String str6;
        int i6;
        int i7;
        String str7;
        long jM5276;
        C2894 c2894 = this;
        String str8 = "1";
        String str9 = "_ai";
        String str10 = "purchase";
        String str11 = "items";
        Long l3 = 1L;
        c2894.m6917().m4629();
        try {
            C5227 c5227 = new C5227(c2894);
            c2894.m6917().m4590(str, j, c2894.f11090, c5227);
            ArrayList arrayList = (ArrayList) c5227.f19715;
            if (arrayList == null || arrayList.isEmpty()) {
                m6917().m4605();
                z = false;
            } else {
                C0542 c05422 = (C0542) ((C5090) c5227.f19712).m9884();
                c05422.m9868();
                ((C5090) c05422.f17955).m10467();
                int i8 = -1;
                int i9 = -1;
                int i10 = 0;
                int i11 = 0;
                boolean z3 = false;
                C4225 c4225 = null;
                C4225 c42252 = null;
                boolean z4 = false;
                while (true) {
                    int size = ((ArrayList) c5227.f19715).size();
                    i = i11;
                    l = l3;
                    c1103 = c2894.f11114;
                    if (i10 >= size) {
                        break;
                    }
                    C4225 c42253 = (C4225) ((C4943) ((ArrayList) c5227.f19715).get(i10)).m9884();
                    int i12 = i10;
                    if (c2894.m6914().m4961(((C5090) c5227.f19712).m10481(), c42253.m9187())) {
                        String str12 = str11;
                        c2894.mo3572().m7987().m4475("Dropping blocked raw event. appId", C3485.m7979(((C5090) c5227.f19712).m10481()), c1103.m3571().m5504(c42253.m9187()));
                        if (!str8.equals(c2894.m6914().mo1833(((C5090) c5227.f19712).m10481(), "measurement.upload.blacklist_internal")) && !str8.equals(c2894.m6914().mo1833(((C5090) c5227.f19712).m10481(), "measurement.upload.blacklist_public")) && !"_err".equals(c42253.m9187())) {
                            c2894.m6910();
                            C3335.m7610(c2894.f11103, ((C5090) c5227.f19712).m10481(), 11, "_ev", c42253.m9187(), 0);
                        }
                        str2 = str8;
                        str4 = str10;
                        i11 = i;
                        i6 = i12;
                        str5 = str12;
                        str6 = str9;
                    } else {
                        String str13 = str11;
                        String strM9187 = c42253.m9187();
                        str2 = str8;
                        if (strM9187.equals(str10) || strM9187.equals("_iap") || strM9187.equals("ecommerce_purchase")) {
                            c0542 = c05422;
                            i2 = i8;
                            i3 = i9;
                        } else {
                            i3 = i9;
                            c0542 = c05422;
                            i2 = i8;
                            if (c2894.m6921().m8314(null, AbstractC3818.f14475) && strM9187.equals("in_app_purchase")) {
                            }
                            if (c42253.m9187().equals(ᵴᵧˈ.ᵔᵖᵹᵫ(str9, ᵱˉˈ.ᵮᵣᵗˈ, ᵱˉˈ.ᵵᵽ))) {
                                c42253.m9178(str9);
                                c2894.mo3572().m7983().m4476("Renaming ad_impression to _ai");
                                if (Log.isLoggable(c2894.mo3572().m7985(), 5)) {
                                    for (int i13 = 0; i13 < c42253.m9189(); i13++) {
                                        if ("ad_platform".equals(c42253.m9190(i13).m1189()) && !c42253.m9190(i13).m1198().isEmpty() && "admob".equalsIgnoreCase(c42253.m9190(i13).m1198())) {
                                            c2894.mo3572().f13413.m4476("AdMob ad impression logged from app. Potentially duplicative.");
                                        }
                                    }
                                }
                            }
                            c3691M6921 = c2894.m6921();
                            c0511 = AbstractC3818.f14475;
                            if (c3691M6921.m8314(null, c0511) && c42253.m9187().equals("in_app_purchase")) {
                                c42253.m9178("_iap");
                                c2894.mo3572().m7983().m4476("Renaming in_app_purchase to _iap");
                            }
                            zM4970 = c2894.m6914().m4970(((C5090) c5227.f19712).m10481(), c42253.m9187());
                            if (c2894.m6921().m8314(null, c0511) && "_iap".equals(c42253.m9187())) {
                                zM4970 = c2894.m6930(c42253);
                                String strM10481 = ((C5090) c5227.f19712).m10481();
                                if ("_iap".equals(c42253.m9187())) {
                                    c2894.m6902(c42253, "value", strM10481);
                                    c2894.m6902(c42253, "price", strM10481);
                                }
                                if (!"_iap".equals(c42253.m9187())) {
                                    ArrayList arrayList2 = new ArrayList(c42253.m9191());
                                    int i14 = 0;
                                    while (true) {
                                        if (i14 >= arrayList2.size()) {
                                            C2545 c2545M1181 = C0114.m1181();
                                            c2545M1181.m6263("quantity");
                                            c2545M1181.m6262(1L);
                                            c42253.m9188((C0114) c2545M1181.m9869());
                                            break;
                                        }
                                        if ("quantity".equals(((C0114) arrayList2.get(i14)).m1189())) {
                                            break;
                                        }
                                        i14++;
                                    }
                                }
                            }
                            if (zM4970) {
                                c2894.m6933();
                                String strM91872 = c42253.m9187();
                                ᵘᵞʿⁱ.ˊᵫᵗ(strM91872);
                                if (strM91872.hashCode() == 95027 && strM91872.equals("_ui")) {
                                    boolean z5 = false;
                                    boolean z6 = false;
                                    for (int i15 = 0; i15 < c42253.m9189(); i15++) {
                                        if ("_c".equals(c42253.m9190(i15).m1189())) {
                                            C2545 c2545 = (C2545) c42253.m9190(i15).m9884();
                                            c2545.m6262(1L);
                                            C0114 c0114 = (C0114) c2545.m9869();
                                            c42253.m9868();
                                            ((C4943) c42253.f17955).m10262(i15, c0114);
                                            z5 = true;
                                        } else if ("_r".equals(c42253.m9190(i15).m1189())) {
                                            C2545 c25452 = (C2545) c42253.m9190(i15).m9884();
                                            c25452.m6262(1L);
                                            C0114 c01142 = (C0114) c25452.m9869();
                                            c42253.m9868();
                                            ((C4943) c42253.f17955).m10262(i15, c01142);
                                            z6 = true;
                                        }
                                    }
                                    if (z5 || !zM4970) {
                                        z2 = zM4970;
                                        str3 = str9;
                                        str4 = str10;
                                    } else {
                                        z2 = zM4970;
                                        c2894.mo3572().m7983().m4474(c1103.m3571().m5504(c42253.m9187()), "Marking event as conversion");
                                        C2545 c2545M11812 = C0114.m1181();
                                        c2545M11812.m6263("_c");
                                        str3 = str9;
                                        str4 = str10;
                                        c2545M11812.m6262(1L);
                                        c42253.m9185(c2545M11812);
                                    }
                                    if (!z6) {
                                        c2894.mo3572().m7983().m4474(c1103.m3571().m5504(c42253.m9187()), "Marking event as real-time");
                                        C2545 c2545M11813 = C0114.m1181();
                                        c2545M11813.m6263("_r");
                                        c2545M11813.m6262(1L);
                                        c42253.m9185(c2545M11813);
                                    }
                                    if (c2894.m6917().m4611(c2894.m6929(), ((C5090) c5227.f19712).m10481(), false, true, false, false).f1721 > c2894.m6921().m8310(((C5090) c5227.f19712).m10481(), AbstractC3818.f14541)) {
                                        m6885(c42253, "_r");
                                    } else {
                                        z4 = true;
                                    }
                                    if (C3335.m7606(c42253.m9187()) && z2 && c2894.m6917().m4611(c2894.m6929(), ((C5090) c5227.f19712).m10481(), true, false, false, false).f1720 > c2894.m6921().m8310(((C5090) c5227.f19712).m10481(), AbstractC3818.f14559)) {
                                        c2894.mo3572().m7987().m4474(C3485.m7979(((C5090) c5227.f19712).m10481()), "Too many conversions. Not logging as conversion. appId");
                                        boolean z7 = false;
                                        C2545 c25453 = null;
                                        int i16 = -1;
                                        for (int i17 = 0; i17 < c42253.m9189(); i17++) {
                                            C0114 c0114M9190 = c42253.m9190(i17);
                                            if ("_c".equals(c0114M9190.m1189())) {
                                                c25453 = (C2545) c0114M9190.m9884();
                                                i16 = i17;
                                            } else if ("_err".equals(c0114M9190.m1189())) {
                                                z7 = true;
                                            }
                                        }
                                        if (z7) {
                                            if (c25453 != null) {
                                                c42253.m9180(i16);
                                            } else {
                                                c25453 = null;
                                                if (c25453 == null) {
                                                }
                                            }
                                        } else if (c25453 == null) {
                                            C2545 c25454 = (C2545) c25453.clone();
                                            c25454.m6263("_err");
                                            c25454.m6262(10L);
                                            C0114 c01143 = (C0114) c25454.m9869();
                                            c42253.m9868();
                                            ((C4943) c42253.f17955).m10262(i16, c01143);
                                        } else {
                                            c2894.mo3572().m7982().m4474(C3485.m7979(((C5090) c5227.f19712).m10481()), "Did not find conversion parameter. appId");
                                        }
                                    }
                                } else {
                                    str3 = str9;
                                    str4 = str10;
                                    z2 = false;
                                }
                                if (z2) {
                                    c2894.m6930(c42253);
                                }
                                if ("_e".equals(c42253.m9187())) {
                                    c2894.m6933();
                                    if (C1962.m5259("_fr", (C4943) c42253.m9869()) != null) {
                                        c05422 = c0542;
                                        i4 = i2;
                                        i5 = i3;
                                        i8 = i4;
                                    } else if (c42252 == null || Math.abs(c42252.m9177() - c42253.m9177()) > 1000) {
                                        c05422 = c0542;
                                        c4225 = c42253;
                                        i8 = i2;
                                        i9 = i;
                                        if (c2894.m6921().m8314(null, AbstractC3818.f14549) && c42253.m9183() && !c42253.m9181()) {
                                            jM5276 = c2894.m6933().m5276(c42253.m9186());
                                            if (jM5276 != 0) {
                                                c42253.m9184(jM5276);
                                            }
                                            c42253.m9868();
                                            ((C4943) c42253.f17955).m10265(0L);
                                        }
                                        if (c42253.m9189() == 0) {
                                            c2894.m6933();
                                            Bundle bundleM5260 = C1962.m5260(c42253.m9191());
                                            int i18 = 0;
                                            while (i18 < c42253.m9189()) {
                                                C0114 c0114M91902 = c42253.m9190(i18);
                                                String str14 = str13;
                                                if (!c0114M91902.m1189().equals(str14) || c0114M91902.m1204().isEmpty()) {
                                                    i7 = i18;
                                                    str7 = str3;
                                                    if (!c0114M91902.m1189().equals(str14)) {
                                                        c2894.m6916(c42253.m9187(), (C2545) c0114M91902.m9884(), bundleM5260, ((C5090) c5227.f19712).m10481());
                                                    }
                                                } else {
                                                    String strM104812 = ((C5090) c5227.f19712).m10481();
                                                    InterfaceC1603 interfaceC1603M1204 = c0114M91902.m1204();
                                                    Bundle[] bundleArr = new Bundle[interfaceC1603M1204.size()];
                                                    i7 = i18;
                                                    int i19 = 0;
                                                    while (i19 < interfaceC1603M1204.size()) {
                                                        C0114 c01144 = (C0114) interfaceC1603M1204.get(i19);
                                                        c2894.m6933();
                                                        Bundle bundleM52602 = C1962.m5260(c01144.m1204());
                                                        Iterator it = c01144.m1204().iterator();
                                                        while (it.hasNext()) {
                                                            c2894.m6916(c42253.m9187(), (C2545) ((C0114) it.next()).m9884(), bundleM52602, strM104812);
                                                            interfaceC1603M1204 = interfaceC1603M1204;
                                                            str3 = str3;
                                                        }
                                                        bundleArr[i19] = bundleM52602;
                                                        i19++;
                                                        interfaceC1603M1204 = interfaceC1603M1204;
                                                        str3 = str3;
                                                    }
                                                    str7 = str3;
                                                    bundleM5260.putParcelableArray(str14, bundleArr);
                                                }
                                                i18 = i7 + 1;
                                                str3 = str7;
                                                str13 = str14;
                                            }
                                            str5 = str13;
                                            str6 = str3;
                                            c42253.m9868();
                                            ((C4943) c42253.f17955).m10276();
                                            C1962 c1962M6933 = c2894.m6933();
                                            ArrayList arrayList3 = new ArrayList();
                                            for (String str15 : bundleM5260.keySet()) {
                                                C2545 c2545M11814 = C0114.m1181();
                                                c2545M11814.m6263(str15);
                                                Object obj = bundleM5260.get(str15);
                                                if (obj != null) {
                                                    c1962M6933.m5284(c2545M11814, obj);
                                                    arrayList3.add((C0114) c2545M11814.m9869());
                                                }
                                            }
                                            int size2 = arrayList3.size();
                                            int i20 = 0;
                                            while (i20 < size2) {
                                                Object obj2 = arrayList3.get(i20);
                                                i20++;
                                                c42253.m9188((C0114) obj2);
                                            }
                                        } else {
                                            str5 = str13;
                                            str6 = str3;
                                        }
                                        i6 = i12;
                                        ((ArrayList) c5227.f19715).set(i6, (C4943) c42253.m9869());
                                        c05422.m2118(c42253);
                                        i11 = i + 1;
                                    } else {
                                        C4225 c42254 = (C4225) c42252.clone();
                                        if (c2894.m6905(c42253, c42254)) {
                                            c05422 = c0542;
                                            int i21 = i2;
                                            c05422.m2117(i21, c42254);
                                            i8 = i21;
                                            i9 = i3;
                                            c4225 = null;
                                            c42252 = null;
                                        }
                                        if (c2894.m6921().m8314(null, AbstractC3818.f14549)) {
                                            jM5276 = c2894.m6933().m5276(c42253.m9186());
                                            if (jM5276 != 0) {
                                            }
                                            c42253.m9868();
                                            ((C4943) c42253.f17955).m10265(0L);
                                        }
                                        if (c42253.m9189() == 0) {
                                        }
                                        i6 = i12;
                                        ((ArrayList) c5227.f19715).set(i6, (C4943) c42253.m9869());
                                        c05422.m2118(c42253);
                                        i11 = i + 1;
                                    }
                                } else {
                                    c05422 = c0542;
                                    i4 = i2;
                                    if ("_vs".equals(c42253.m9187())) {
                                        c2894.m6933();
                                        if (C1962.m5259("_et", (C4943) c42253.m9869()) == null) {
                                            if (c4225 != null && Math.abs(c4225.m9177() - c42253.m9177()) <= 1000) {
                                                C4225 c42255 = (C4225) c4225.clone();
                                                if (c2894.m6905(c42255, c42253)) {
                                                    i5 = i3;
                                                    c05422.m2117(i5, c42255);
                                                    i8 = i4;
                                                    c4225 = null;
                                                    c42252 = null;
                                                }
                                            }
                                            i9 = i3;
                                            c42252 = c42253;
                                            i8 = i;
                                            if (c2894.m6921().m8314(null, AbstractC3818.f14549)) {
                                            }
                                            if (c42253.m9189() == 0) {
                                            }
                                            i6 = i12;
                                            ((ArrayList) c5227.f19715).set(i6, (C4943) c42253.m9869());
                                            c05422.m2118(c42253);
                                            i11 = i + 1;
                                        }
                                        i5 = i3;
                                        i8 = i4;
                                    } else {
                                        i5 = i3;
                                        if (("_f".equals(c42253.m9187()) || "_v".equals(c42253.m9187())) && ("_f".equals(c42253.m9187()) || "_v".equals(c42253.m9187()))) {
                                            int i22 = 0;
                                            while (true) {
                                                if (i22 >= c42253.m9189()) {
                                                    break;
                                                }
                                                C0114 c0114M91903 = c42253.m9190(i22);
                                                if ("_elt".equals(c0114M91903.m1189())) {
                                                    c42253.m9179(c0114M91903.m1200());
                                                    c42253.m9180(i22);
                                                    break;
                                                }
                                                i22++;
                                            }
                                        }
                                        i8 = i4;
                                    }
                                }
                                i9 = i5;
                                if (c2894.m6921().m8314(null, AbstractC3818.f14549)) {
                                }
                                if (c42253.m9189() == 0) {
                                }
                                i6 = i12;
                                ((ArrayList) c5227.f19715).set(i6, (C4943) c42253.m9869());
                                c05422.m2118(c42253);
                                i11 = i + 1;
                            }
                        }
                        C2545 c2545M11815 = C0114.m1181();
                        c2545M11815.m6263("_ct");
                        if (!z3) {
                            String strM104813 = ((C5090) c5227.f19712).m10481();
                            String str16 = (c2894.m6928(strM104813, str10) && c2894.m6928(strM104813, "_iap") && c2894.m6928(strM104813, "ecommerce_purchase")) ? "new" : "returning";
                            c2545M11815.m6261(str16);
                            c42253.m9188((C0114) c2545M11815.m9869());
                            z3 = true;
                            if (c42253.m9187().equals(ᵴᵧˈ.ᵔᵖᵹᵫ(str9, ᵱˉˈ.ᵮᵣᵗˈ, ᵱˉˈ.ᵵᵽ))) {
                            }
                            c3691M6921 = c2894.m6921();
                            c0511 = AbstractC3818.f14475;
                            if (c3691M6921.m8314(null, c0511)) {
                                c42253.m9178("_iap");
                                c2894.mo3572().m7983().m4476("Renaming in_app_purchase to _iap");
                            }
                            zM4970 = c2894.m6914().m4970(((C5090) c5227.f19712).m10481(), c42253.m9187());
                            if (c2894.m6921().m8314(null, c0511)) {
                                zM4970 = c2894.m6930(c42253);
                                String strM104814 = ((C5090) c5227.f19712).m10481();
                                if ("_iap".equals(c42253.m9187())) {
                                }
                                if (!"_iap".equals(c42253.m9187())) {
                                }
                            }
                            if (zM4970) {
                            }
                        }
                    }
                    i10 = i6 + 1;
                    str10 = str4;
                    str11 = str5;
                    l3 = l;
                    str9 = str6;
                    str8 = str2;
                }
                int i23 = i;
                int i24 = 0;
                long jLongValue = 0;
                while (i24 < i23) {
                    C4943 c4943M10553 = ((C5090) c05422.f17955).m10553(i24);
                    if ("_e".equals(c4943M10553.m10274())) {
                        c2894.m6933();
                        if (C1962.m5259("_fr", c4943M10553) != null) {
                            c05422.m2100(i24);
                            i23--;
                            i24--;
                        } else {
                            c2894.m6933();
                            C0114 c0114M5259 = C1962.m5259("_et", c4943M10553);
                            if (c0114M5259 != null) {
                                Long lValueOf = c0114M5259.m1196() ? Long.valueOf(c0114M5259.m1200()) : null;
                                if (lValueOf != null && lValueOf.longValue() > 0) {
                                    jLongValue += lValueOf.longValue();
                                }
                            }
                        }
                    }
                    i24++;
                }
                c2894.m6892(c05422, jLongValue, false);
                Iterator it2 = c05422.m2110().iterator();
                while (true) {
                    if (!it2.hasNext()) {
                        break;
                    }
                    if ("_s".equals(((C4943) it2.next()).m10274())) {
                        c2894.m6917().m4631(c05422.m2096(), "_se");
                        break;
                    }
                }
                if (C1962.m5256("_sid", c05422) >= 0) {
                    c2894.m6892(c05422, jLongValue, true);
                } else {
                    int iM5256 = C1962.m5256("_se", c05422);
                    if (iM5256 >= 0) {
                        c05422.m9868();
                        ((C5090) c05422.f17955).m10541(iM5256);
                        c2894.mo3572().m7982().m4474(C3485.m7979(((C5090) c5227.f19712).m10481()), "Session engagement user property is in the bundle without session ID. appId");
                    }
                }
                String strM104815 = ((C5090) c5227.f19712).m10481();
                c2894.mo3578().m5243();
                c2894.m6918();
                C2019 c2019M45962 = c2894.m6917().m4596(strM104815);
                if (c2019M45962 == null) {
                    c2894.mo3572().m7982().m4474(C3485.m7979(strM104815), "Cannot fix consent fields without appInfo. appId");
                } else {
                    c2894.m6923(c2019M45962, c05422);
                }
                String strM104816 = ((C5090) c5227.f19712).m10481();
                c2894.mo3578().m5243();
                c2894.m6918();
                C2019 c2019M45963 = c2894.m6917().m4596(strM104816);
                if (c2019M45963 == null) {
                    c2894.mo3572().m7987().m4474(C3485.m7979(strM104816), "Cannot populate ad_campaign_info without appInfo. appId");
                } else {
                    c2894.m6907(c2019M45963, c05422);
                }
                c05422.m9868();
                ((C5090) c05422.f17955).m10479(Long.MAX_VALUE);
                c05422.m9868();
                ((C5090) c05422.f17955).m10498(Long.MIN_VALUE);
                for (int i25 = 0; i25 < c05422.m2084(); i25++) {
                    C4943 c4943M105532 = ((C5090) c05422.f17955).m10553(i25);
                    if (c4943M105532.m10277() < ((C5090) c05422.f17955).m10421()) {
                        long jM10277 = c4943M105532.m10277();
                        c05422.m9868();
                        ((C5090) c05422.f17955).m10479(jM10277);
                    }
                    if (c4943M105532.m10277() > ((C5090) c05422.f17955).m10547()) {
                        long jM102772 = c4943M105532.m10277();
                        c05422.m9868();
                        ((C5090) c05422.f17955).m10498(jM102772);
                    }
                }
                c05422.m2082();
                C0875 c0875 = C0875.f3871;
                C0875 c0875M3070 = c2894.m6888(((C5090) c5227.f19712).m10481()).m3070(C0875.m3065(100, ((C5090) c5227.f19712).m10512()));
                C0875 c0875M4628 = c2894.m6917().m4628(((C5090) c5227.f19712).m10481());
                c2894.m6917().m4633(((C5090) c5227.f19712).m10481(), c0875M3070);
                EnumC0174 enumC0174 = EnumC0174.f1598;
                if (!c0875M3070.m3073(enumC0174) && c0875M4628.m3073(enumC0174)) {
                    c2894.m6917().m4591(((C5090) c5227.f19712).m10481());
                } else if (c0875M3070.m3073(enumC0174) && !c0875M4628.m3073(enumC0174)) {
                    c2894.m6917().m4612(((C5090) c5227.f19712).m10481());
                }
                EnumC0174 enumC01742 = EnumC0174.f1599;
                if (!c0875M3070.m3073(enumC01742)) {
                    c05422.m9868();
                    ((C5090) c05422.f17955).m10500();
                    c05422.m9868();
                    ((C5090) c05422.f17955).m10532();
                    c05422.m9868();
                    ((C5090) c05422.f17955).m10556();
                }
                if (!c0875M3070.m3073(enumC0174)) {
                    c05422.m9868();
                    ((C5090) c05422.f17955).m10454();
                    c05422.m9868();
                    ((C5090) c05422.f17955).m10536();
                }
                C0756.m2702();
                if (c2894.m6921().m8314(((C5090) c5227.f19712).m10481(), AbstractC3818.f14557)) {
                    c2894.m6910();
                    if (C3335.m7618((String) AbstractC3818.f14565.m1988(null), ((C5090) c5227.f19712).m10481()) && c2894.m6888(((C5090) c5227.f19712).m10481()).m3073(enumC01742) && ((C5090) c5227.f19712).m10431()) {
                        c2894.m6922(c05422, c5227);
                    }
                }
                c05422.m9868();
                ((C5090) c05422.f17955).m10474();
                c05422.m2111(c2894.m6941().m4378(c05422.m2096(), c05422.m2110(), DesugarCollections.unmodifiableList(((C5090) c05422.f17955).m10426()), Long.valueOf(((C5090) c05422.f17955).m10421()), Long.valueOf(((C5090) c05422.f17955).m10547()), !c0875M3070.m3073(enumC0174)));
                if (c2894.m6921().m8318(((C5090) c5227.f19712).m10481())) {
                    HashMap map = new HashMap();
                    ArrayList arrayList4 = new ArrayList();
                    SecureRandom secureRandomM7627 = c2894.m6910().m7627();
                    int i26 = 0;
                    while (i26 < c05422.m2084()) {
                        C4225 c42256 = (C4225) ((C5090) c05422.f17955).m10553(i26).m9884();
                        if (c42256.m9187().equals("_ep")) {
                            c2894.m6933();
                            String str17 = (String) C1962.m5272("_en", (C4943) c42256.m9869());
                            C3711 c3711M4601 = (C3711) map.get(str17);
                            if (c3711M4601 == null) {
                                C1694 c1694M6917 = c2894.m6917();
                                String strM104817 = ((C5090) c5227.f19712).m10481();
                                ᵘᵞʿⁱ.ᵶᵥᵝ(str17);
                                c3711M4601 = c1694M6917.m4601("events", strM104817, str17);
                                if (c3711M4601 != null) {
                                    map.put(str17, c3711M4601);
                                }
                            }
                            if (c3711M4601 == null || c3711M4601.f14137 != null) {
                                l2 = l;
                            } else {
                                Long l4 = c3711M4601.f14132;
                                if (l4 != null && l4.longValue() > 1) {
                                    c2894.m6933();
                                    C1962.m5254(c42256, "_sr", l4);
                                }
                                Boolean bool = c3711M4601.f14135;
                                if (bool == null || !bool.booleanValue()) {
                                    l2 = l;
                                } else {
                                    c2894.m6933();
                                    l2 = l;
                                    C1962.m5254(c42256, "_efs", l2);
                                }
                                arrayList4.add((C4943) c42256.m9869());
                            }
                            c05422.m2117(i26, c42256);
                        } else {
                            l2 = l;
                            C1811 c1811M6914 = c2894.m6914();
                            String strM104818 = ((C5090) c5227.f19712).m10481();
                            String strMo1833 = c1811M6914.mo1833(strM104818, "measurement.account.time_zone_offset_minutes");
                            if (TextUtils.isEmpty(strMo1833)) {
                                j2 = 0;
                                c2894.m6910();
                                long j4 = j2 * 60000;
                                long jM9177 = (c42256.m9177() + j4) / 86400000;
                                C4943 c4943 = (C4943) c42256.m9869();
                                if (TextUtils.isEmpty("_dbg")) {
                                }
                            } else {
                                try {
                                    j2 = Long.parseLong(strMo1833);
                                } catch (NumberFormatException e) {
                                    ((C1103) ((ᵜᵪʾ) c1811M6914).ˌᴵ).mo3572().m7987().m4475("Unable to parse timezone offset. appId", C3485.m7979(strM104818), e);
                                    j2 = 0;
                                }
                                c2894.m6910();
                                long j42 = j2 * 60000;
                                long jM91772 = (c42256.m9177() + j42) / 86400000;
                                C4943 c49432 = (C4943) c42256.m9869();
                                if (TextUtils.isEmpty("_dbg")) {
                                    for (C0114 c01145 : c49432.m10263()) {
                                        j3 = j42;
                                        if (!"_dbg".equals(c01145.m1189())) {
                                            j42 = j3;
                                        } else if (l2.equals(Long.valueOf(c01145.m1200()))) {
                                            iM4963 = 1;
                                            if (iM4963 > 0) {
                                            }
                                        } else {
                                            iM4963 = m6914().m4963(((C5090) c5227.f19712).m10481(), c42256.m9187());
                                            if (iM4963 > 0) {
                                                mo3572().m7987().m4475("Sample rate must be positive. event, rate", c42256.m9187(), Integer.valueOf(iM4963));
                                                arrayList4.add((C4943) c42256.m9869());
                                                c05422.m2117(i26, c42256);
                                            } else {
                                                C3711 c3711M8327 = (C3711) map.get(c42256.m9187());
                                                if (c3711M8327 == null && (c3711M8327 = m6917().m4601("events", ((C5090) c5227.f19712).m10481(), c42256.m9187())) == null) {
                                                    mo3572().m7987().m4475("Event being bundled has no eventAggregate. appId, eventName", ((C5090) c5227.f19712).m10481(), c42256.m9187());
                                                    c3711M8327 = new C3711(((C5090) c5227.f19712).m10481(), c42256.m9187(), 1L, 1L, 1L, c42256.m9177(), 0L, null, null, null, null);
                                                }
                                                m6933();
                                                Long l5 = (Long) C1962.m5272("_eid", (C4943) c42256.m9869());
                                                boolean z8 = l5 != null;
                                                if (iM4963 == 1) {
                                                    arrayList4.add((C4943) c42256.m9869());
                                                    if (z8 && (c3711M8327.f14137 != null || c3711M8327.f14132 != null || c3711M8327.f14135 != null)) {
                                                        map.put(c42256.m9187(), c3711M8327.m8327(null, null, null));
                                                    }
                                                    c05422.m2117(i26, c42256);
                                                } else {
                                                    if (secureRandomM7627.nextInt(iM4963) == 0) {
                                                        m6933();
                                                        Long lValueOf2 = Long.valueOf(iM4963);
                                                        C1962.m5254(c42256, "_sr", lValueOf2);
                                                        arrayList4.add((C4943) c42256.m9869());
                                                        if (z8) {
                                                            c3711M8327 = c3711M8327.m8327(null, lValueOf2, null);
                                                        }
                                                        map.put(c42256.m9187(), new C3711(c3711M8327.f14133, c3711M8327.f14128, c3711M8327.f14130, c3711M8327.f14136, c3711M8327.f14131, c3711M8327.f14138, c42256.m9177(), Long.valueOf(jM91772), c3711M8327.f14137, c3711M8327.f14132, c3711M8327.f14135));
                                                        l = l2;
                                                    } else {
                                                        Long l6 = c3711M8327.f14129;
                                                        if (l6 != null) {
                                                            jM9182 = l6.longValue();
                                                        } else {
                                                            m6910();
                                                            jM9182 = (j3 + c42256.m9182()) / 86400000;
                                                        }
                                                        if (jM9182 != jM91772) {
                                                            m6933();
                                                            C1962.m5254(c42256, "_efs", l2);
                                                            m6933();
                                                            Long lValueOf3 = Long.valueOf(iM4963);
                                                            C1962.m5254(c42256, "_sr", lValueOf3);
                                                            arrayList4.add((C4943) c42256.m9869());
                                                            if (z8) {
                                                                c3711M8327 = c3711M8327.m8327(null, lValueOf3, Boolean.TRUE);
                                                            }
                                                            l = l2;
                                                            map.put(c42256.m9187(), new C3711(c3711M8327.f14133, c3711M8327.f14128, c3711M8327.f14130, c3711M8327.f14136, c3711M8327.f14131, c3711M8327.f14138, c42256.m9177(), Long.valueOf(jM91772), c3711M8327.f14137, c3711M8327.f14132, c3711M8327.f14135));
                                                        } else {
                                                            l = l2;
                                                            if (z8) {
                                                                map.put(c42256.m9187(), c3711M8327.m8327(l5, null, null));
                                                            }
                                                            c05422.m2117(i26, c42256);
                                                        }
                                                    }
                                                    c05422.m2117(i26, c42256);
                                                }
                                            }
                                        }
                                    }
                                    j3 = j42;
                                    iM4963 = m6914().m4963(((C5090) c5227.f19712).m10481(), c42256.m9187());
                                    if (iM4963 > 0) {
                                    }
                                } else {
                                    j3 = j42;
                                    iM4963 = m6914().m4963(((C5090) c5227.f19712).m10481(), c42256.m9187());
                                    if (iM4963 > 0) {
                                    }
                                }
                            }
                            i26++;
                            c2894 = this;
                        }
                        l = l2;
                        i26++;
                        c2894 = this;
                    }
                    if (arrayList4.size() < c05422.m2084()) {
                        c05422.m9868();
                        ((C5090) c05422.f17955).m10467();
                        c05422.m9868();
                        ((C5090) c05422.f17955).m10437(arrayList4);
                    }
                    Iterator it3 = map.entrySet().iterator();
                    while (it3.hasNext()) {
                        m6917().m4594("events", (C3711) ((Map.Entry) it3.next()).getValue());
                    }
                }
                String strM104819 = ((C5090) c5227.f19712).m10481();
                C2019 c2019M45964 = m6917().m4596(strM104819);
                if (c2019M45964 == null) {
                    mo3572().m7982().m4474(C3485.m7979(((C5090) c5227.f19712).m10481()), "Bundling raw events w/o app info. appId");
                } else if (c05422.m2084() > 0) {
                    C1961 c1961 = c2019M45964.f8027.f4707;
                    C1103.m3564(c1961);
                    c1961.m5243();
                    long j5 = c2019M45964.f8034;
                    if (j5 != 0) {
                        c05422.m2129(j5);
                    } else {
                        c05422.m2124();
                    }
                    C1961 c19612 = c2019M45964.f8027.f4707;
                    C1103.m3564(c19612);
                    c19612.m5243();
                    long j6 = c2019M45964.f8003;
                    if (j6 != 0) {
                        j5 = j6;
                    }
                    if (j5 != 0) {
                        c05422.m2102(j5);
                    } else {
                        c05422.m2112();
                    }
                    c2019M45964.m5407(c05422.m2084());
                    C1961 c19613 = c2019M45964.f8027.f4707;
                    C1103.m3564(c19613);
                    c19613.m5243();
                    int i27 = (int) c2019M45964.f7992;
                    c05422.m9868();
                    ((C5090) c05422.f17955).m10518(i27);
                    C1961 c19614 = c2019M45964.f8027.f4707;
                    C1103.m3564(c19614);
                    c19614.m5243();
                    c05422.m2126((int) c2019M45964.f8029);
                    c2019M45964.m5417(((C5090) c05422.f17955).m10421());
                    c2019M45964.m5432(((C5090) c05422.f17955).m10547());
                    String strM5410 = c2019M45964.m5410();
                    if (strM5410 != null) {
                        c05422.m2088(strM5410);
                    } else {
                        c05422.m2086();
                    }
                    m6917().m4624(c2019M45964, false);
                }
                if (c05422.m2084() > 0) {
                    c1103.getClass();
                    if (m6921().m8314(((C5090) c5227.f19712).m10481(), AbstractC3818.f14478)) {
                        String strM2096 = c05422.m2096();
                        if (!TextUtils.isEmpty(strM2096) && (c2019M4596 = m6917().m4596(strM2096)) != null) {
                            mo3579().getClass();
                            long jCurrentTimeMillis = System.currentTimeMillis();
                            C1961 c19615 = c2019M4596.f8027.f4707;
                            C1103.m3564(c19615);
                            c19615.m5243();
                            if (jCurrentTimeMillis - c2019M4596.f7993 >= m6921().m8305(strM2096, AbstractC3818.f14483)) {
                                List listM4627 = m6917().m4627("");
                                if (!listM4627.isEmpty()) {
                                    c05422.m9868();
                                    ((C5090) c05422.f17955).m10444(listM4627);
                                }
                                List listM46272 = m6917().m4627(strM2096);
                                if (!listM46272.isEmpty()) {
                                    c05422.m9868();
                                    ((C5090) c05422.f17955).m10444(listM46272);
                                }
                                c2019M4596.m5406(jCurrentTimeMillis);
                                m6917().m4624(c2019M4596, false);
                            }
                        }
                    }
                    C1498 c1498M4971 = m6914().m4971(((C5090) c5227.f19712).m10481());
                    if (c1498M4971 != null && c1498M4971.m4284()) {
                        long jM4281 = c1498M4971.m4281();
                        c05422.m9868();
                        ((C5090) c05422.f17955).m10440(jM4281);
                    } else if (((C5090) c5227.f19712).m10435().isEmpty()) {
                        c05422.m9868();
                        ((C5090) c05422.f17955).m10440(-1L);
                    } else {
                        mo3572().m7987().m4474(C3485.m7979(((C5090) c5227.f19712).m10481()), "Did not find measurement config or missing version info. appId");
                    }
                    m6917().m4602((C5090) c05422.m9869(), z4);
                }
                m6917().m4626((ArrayList) c5227.f19714);
                C1694 c1694M69172 = m6917();
                try {
                    c1694M69172.m4625().execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", new String[]{strM104819, strM104819});
                } catch (SQLiteException e2) {
                    ((C1103) ((ᵜᵪʾ) c1694M69172).ˌᴵ).mo3572().m7982().m4475("Failed to remove unused event metadata. appId", C3485.m7979(strM104819), e2);
                }
                m6917().m4605();
                z = true;
            }
            m6917().m4630();
            return z;
        } catch (Throwable th) {
            m6917().m4630();
            throw th;
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:38:0x0112  */
    /* JADX WARN: Removed duplicated region for block: B:45:0x013a  */
    /* JADX WARN: Removed duplicated region for block: B:48:0x0145  */
    /* JADX WARN: Removed duplicated region for block: B:51:0x0150  */
    /* JADX WARN: Removed duplicated region for block: B:54:0x015c  */
    /* JADX WARN: Removed duplicated region for block: B:57:0x0171  */
    /* JADX WARN: Removed duplicated region for block: B:60:0x0182  */
    /* JADX WARN: Removed duplicated region for block: B:61:0x0184  */
    /* JADX WARN: Removed duplicated region for block: B:64:0x01d4  */
    /* JADX WARN: Removed duplicated region for block: B:65:0x01da  */
    /* JADX WARN: Removed duplicated region for block: B:70:0x01ff  */
    /* JADX WARN: Removed duplicated region for block: B:71:0x0201  */
    /* JADX WARN: Removed duplicated region for block: B:74:0x0217  */
    /* JADX WARN: Removed duplicated region for block: B:75:0x0219  */
    /* JADX WARN: Removed duplicated region for block: B:78:0x022e  */
    /* JADX WARN: Removed duplicated region for block: B:85:0x025b  */
    /* JADX WARN: Removed duplicated region for block: B:86:0x025d  */
    /* JADX WARN: Removed duplicated region for block: B:89:0x0273  */
    /* JADX WARN: Removed duplicated region for block: B:92:0x027f  */
    /* JADX WARN: Removed duplicated region for block: B:95:0x0283  */
    /* JADX INFO: renamed from: ˁᵺˈ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final C2019 m6894(C2847 c2847) throws Throwable {
        boolean z;
        String str;
        long j;
        String str2;
        String str3;
        String str4;
        mo3578().m5243();
        m6918();
        ᵘᵞʿⁱ.ᵶᵥᵝ(c2847);
        boolean z2 = c2847.f10903;
        String str5 = c2847.f10910;
        ᵘᵞʿⁱ.ˊᵫᵗ(str5);
        String str6 = c2847.f10913;
        if (!str6.isEmpty()) {
            this.f11089.put(str5, new C0271(this, str6));
        }
        C1694 c1694 = this.f11109;
        m6882(c1694);
        C2019 c2019M4596 = c1694.m4596(str5);
        C0875 c0875M3070 = m6888(str5).m3070(C0875.m3065(100, c2847.f10926));
        String strM2841 = this.f11122.m2841(c2847, c0875M3070);
        boolean z3 = true;
        EnumC0174 enumC0174 = EnumC0174.f1599;
        EnumC0174 enumC01742 = EnumC0174.f1598;
        if (c2019M4596 != null) {
            C1103 c1103 = c2019M4596.f8027;
            if (c0875M3070.m3073(enumC0174) && strM2841 != null) {
                C1961 c1961 = c1103.f4707;
                C1103.m3564(c1961);
                c1961.m5243();
                if (!strM2841.equals(c2019M4596.f8020)) {
                    C1961 c19612 = c1103.f4707;
                    C1103.m3564(c19612);
                    c19612.m5243();
                    boolean zIsEmpty = TextUtils.isEmpty(c2019M4596.f8020);
                    c2019M4596.m5397(strM2841);
                    if (z2 && !"00000000-0000-0000-0000-000000000000".equals(this.f11122.m2840(c2847, c0875M3070).first) && !zIsEmpty) {
                        if (c0875M3070.m3073(enumC01742)) {
                            c2019M4596.m5422(m6931(c0875M3070));
                            z = false;
                        } else {
                            z = true;
                        }
                        C1694 c16942 = this.f11109;
                        m6882(c16942);
                        if (c16942.m4608(str5, "_id") != null) {
                            C1694 c16943 = this.f11109;
                            m6882(c16943);
                            if (c16943.m4608(str5, "_lair") == null) {
                                mo3579().getClass();
                                C4922 c4922 = new C4922(str5, "auto", "_lair", System.currentTimeMillis(), 1L);
                                C1694 c16944 = this.f11109;
                                m6882(c16944);
                                c16944.m4581(c4922);
                            }
                        }
                    } else if (TextUtils.isEmpty(c2019M4596.m5396()) && c0875M3070.m3073(enumC01742)) {
                        c2019M4596.m5422(m6931(c0875M3070));
                    }
                }
            } else if (TextUtils.isEmpty(c2019M4596.m5396()) && c0875M3070.m3073(enumC01742)) {
                c2019M4596.m5422(m6931(c0875M3070));
            }
            C1103 c11032 = c2019M4596.f8027;
            c2019M4596.m5398(c2847.f10918);
            str = c2847.f10898;
            if (!TextUtils.isEmpty(str)) {
                c2019M4596.m5405(str);
            }
            j = c2847.f10925;
            if (j != 0) {
                c2019M4596.m5403(j);
            }
            str2 = c2847.f10915;
            if (!TextUtils.isEmpty(str2)) {
                c2019M4596.m5395(str2);
            }
            c2019M4596.m5423(c2847.f10914);
            str3 = c2847.f10924;
            if (str3 != null) {
                c2019M4596.m5420(str3);
            }
            c2019M4596.m5431(c2847.f10927);
            c2019M4596.m5436(c2847.f10911);
            str4 = c2847.f10904;
            if (!TextUtils.isEmpty(str4)) {
                c2019M4596.m5418(str4);
            }
            C1961 c19613 = c11032.f4707;
            C1103.m3564(c19613);
            c19613.m5243();
            c2019M4596.f8019 |= c2019M4596.f8017 == z2;
            c2019M4596.f8017 = z2;
            Boolean bool = c2847.f10909;
            C1961 c19614 = c11032.f4707;
            C1103.m3564(c19614);
            c19614.m5243();
            c2019M4596.f8019 |= !Objects.equals(c2019M4596.f8025, bool);
            c2019M4596.f8025 = bool;
            c2019M4596.m5413(c2847.f10908);
            String str7 = c2847.f10897;
            C1961 c19615 = c11032.f4707;
            C1103.m3564(c19615);
            c19615.m5243();
            c2019M4596.f8019 |= !Objects.equals(c2019M4596.f8008, str7);
            c2019M4596.f8008 = str7;
            C4905 c4905 = C4905.f18675;
            if (m6921().m8314(null, AbstractC3818.f14550)) {
                if (m6921().m8314(null, AbstractC3818.f14567)) {
                    c2019M4596.m5425(null);
                }
            } else {
                c2019M4596.m5425(c2847.f10917);
            }
            boolean z4 = c2847.f10905;
            C1961 c19616 = c11032.f4707;
            C1103.m3564(c19616);
            c19616.m5243();
            c2019M4596.f8019 |= c2019M4596.f8002 == z4;
            c2019M4596.f8002 = z4;
            String str8 = c2847.f10912;
            C1961 c19617 = c11032.f4707;
            C1103.m3564(c19617);
            c19617.m5243();
            c2019M4596.f8019 |= c2019M4596.f8007 == str8;
            c2019M4596.f8007 = str8;
            C0756.m2702();
            if (m6921().m8314(null, AbstractC3818.f14557)) {
                int i = c2847.f10902;
                C1961 c19618 = c11032.f4707;
                C1103.m3564(c19618);
                c19618.m5243();
                c2019M4596.f8019 |= c2019M4596.f8012 != i;
                c2019M4596.f8012 = i;
            }
            c2019M4596.m5434(c2847.f10923);
            String str9 = c2847.f10916;
            C1961 c19619 = c11032.f4707;
            C1103.m3564(c19619);
            c19619.m5243();
            c2019M4596.f8019 |= c2019M4596.f8018 == str9;
            c2019M4596.f8018 = str9;
            int i2 = c2847.f10921;
            C1961 c196110 = c11032.f4707;
            C1103.m3564(c196110);
            c196110.m5243();
            c2019M4596.f8019 |= c2019M4596.f7994 != i2;
            c2019M4596.f7994 = i2;
            if (!c2019M4596.m5426()) {
                z3 = z;
            } else if (!z) {
                return c2019M4596;
            }
            C1694 c16945 = this.f11109;
            m6882(c16945);
            c16945.m4624(c2019M4596, z3);
            return c2019M4596;
        }
        c2019M4596 = new C2019(this.f11114, str5);
        if (c0875M3070.m3073(enumC01742)) {
            c2019M4596.m5422(m6931(c0875M3070));
        }
        if (c0875M3070.m3073(enumC0174)) {
            c2019M4596.m5397(strM2841);
        }
        z = false;
        C1103 c110322 = c2019M4596.f8027;
        c2019M4596.m5398(c2847.f10918);
        str = c2847.f10898;
        if (!TextUtils.isEmpty(str)) {
        }
        j = c2847.f10925;
        if (j != 0) {
        }
        str2 = c2847.f10915;
        if (!TextUtils.isEmpty(str2)) {
        }
        c2019M4596.m5423(c2847.f10914);
        str3 = c2847.f10924;
        if (str3 != null) {
        }
        c2019M4596.m5431(c2847.f10927);
        c2019M4596.m5436(c2847.f10911);
        str4 = c2847.f10904;
        if (!TextUtils.isEmpty(str4)) {
        }
        C1961 c196132 = c110322.f4707;
        C1103.m3564(c196132);
        c196132.m5243();
        c2019M4596.f8019 |= c2019M4596.f8017 == z2;
        c2019M4596.f8017 = z2;
        Boolean bool2 = c2847.f10909;
        C1961 c196142 = c110322.f4707;
        C1103.m3564(c196142);
        c196142.m5243();
        c2019M4596.f8019 |= !Objects.equals(c2019M4596.f8025, bool2);
        c2019M4596.f8025 = bool2;
        c2019M4596.m5413(c2847.f10908);
        String str72 = c2847.f10897;
        C1961 c196152 = c110322.f4707;
        C1103.m3564(c196152);
        c196152.m5243();
        c2019M4596.f8019 |= !Objects.equals(c2019M4596.f8008, str72);
        c2019M4596.f8008 = str72;
        C4905 c49052 = C4905.f18675;
        if (m6921().m8314(null, AbstractC3818.f14550)) {
        }
        boolean z42 = c2847.f10905;
        C1961 c196162 = c110322.f4707;
        C1103.m3564(c196162);
        c196162.m5243();
        c2019M4596.f8019 |= c2019M4596.f8002 == z42;
        c2019M4596.f8002 = z42;
        String str82 = c2847.f10912;
        C1961 c196172 = c110322.f4707;
        C1103.m3564(c196172);
        c196172.m5243();
        c2019M4596.f8019 |= c2019M4596.f8007 == str82;
        c2019M4596.f8007 = str82;
        C0756.m2702();
        if (m6921().m8314(null, AbstractC3818.f14557)) {
        }
        c2019M4596.m5434(c2847.f10923);
        String str92 = c2847.f10916;
        C1961 c196192 = c110322.f4707;
        C1103.m3564(c196192);
        c196192.m5243();
        c2019M4596.f8019 |= c2019M4596.f8018 == str92;
        c2019M4596.f8018 = str92;
        int i22 = c2847.f10921;
        C1961 c1961102 = c110322.f4707;
        C1103.m3564(c1961102);
        c1961102.m5243();
        c2019M4596.f8019 |= c2019M4596.f7994 != i22;
        c2019M4596.f7994 = i22;
        if (!c2019M4596.m5426()) {
        }
        C1694 c169452 = this.f11109;
        m6882(c169452);
        c169452.m4624(c2019M4596, z3);
        return c2019M4596;
    }

    /* JADX INFO: renamed from: ˆʤᵳ, reason: contains not printable characters */
    public final void m6895(C2847 c2847) throws Throwable {
        mo3578().m5243();
        m6918();
        String str = c2847.f10910;
        ᵘᵞʿⁱ.ˊᵫᵗ(str);
        C0875 c0875M3065 = C0875.m3065(c2847.f10919, c2847.f10926);
        m6888(str);
        mo3572().f13414.m4475("Setting storage consent for package", str, c0875M3065);
        mo3578().m5243();
        m6918();
        this.f11106.put(str, c0875M3065);
        C1694 c1694 = this.f11109;
        m6882(c1694);
        c1694.m4609(str, c0875M3065);
    }

    /* JADX WARN: Removed duplicated region for block: B:19:0x0060  */
    /* JADX WARN: Removed duplicated region for block: B:57:0x0174 A[Catch: all -> 0x0074, TryCatch #0 {all -> 0x0074, blocks: (B:11:0x0045, B:21:0x0063, B:58:0x0177, B:29:0x0080, B:34:0x00dc, B:33:0x00ca, B:35:0x00e1, B:39:0x00f8, B:43:0x010e, B:45:0x0126, B:47:0x0141, B:49:0x014a, B:51:0x0150, B:52:0x0154, B:54:0x015d, B:56:0x016c, B:57:0x0174, B:46:0x0132, B:40:0x00ff, B:42:0x0108), top: B:66:0x0045, outer: #1 }] */
    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m6896(String str, int i, Throwable th, byte[] bArr, Map map) {
        boolean z;
        C5004 c5004 = this.f11112;
        mo3578().m5243();
        m6918();
        ᵘᵞʿⁱ.ˊᵫᵗ(str);
        if (bArr == null) {
            try {
                bArr = new byte[0];
            } catch (Throwable th2) {
                this.f11107 = false;
                m6915();
                throw th2;
            }
        }
        C1623 c1623 = mo3572().f13414;
        Integer numValueOf = Integer.valueOf(bArr.length);
        c1623.m4474(numValueOf, "onConfigFetched. Response size");
        if (m6921().m8314(null, AbstractC3818.f14549)) {
            C1962 c1962 = this.f11095;
            m6882(c1962);
            c1962.m5279(map);
        }
        C1694 c1694 = this.f11109;
        m6882(c1694);
        c1694.m4629();
        try {
            C1694 c16942 = this.f11109;
            m6882(c16942);
            C2019 c2019M4596 = c16942.m4596(str);
            if (i == 200 || i == 204) {
                z = th != null;
            } else {
                if (i == 304) {
                    i = 304;
                    if (th != null) {
                    }
                }
            }
            if (c2019M4596 == null) {
                mo3572().f13424.m4474(C3485.m7979(str), "App does not exist in onConfigFetched. appId");
            } else {
                C1811 c1811 = this.f11104;
                if (z || i == 404) {
                    m6933();
                    String strM5266 = C1962.m5266("Last-Modified", map);
                    m6933();
                    String strM52662 = C1962.m5266("ETag", map);
                    if (i == 404 || i == 304) {
                        m6882(c1811);
                        if (c1811.m4971(str) == null) {
                            m6882(c1811);
                            c1811.m4955(str, null, null, null);
                        }
                    } else {
                        m6882(c1811);
                        c1811.m4955(str, strM5266, strM52662, bArr);
                    }
                    mo3579().getClass();
                    c2019M4596.m5439(System.currentTimeMillis());
                    C1694 c16943 = this.f11109;
                    m6882(c16943);
                    c16943.m4624(c2019M4596, false);
                    if (i == 404) {
                        mo3572().f13413.m4474(str, "Config not found. Using empty config. appId");
                    } else {
                        mo3572().f13414.m4475("Successfully fetched config. Got network response. code, size", Integer.valueOf(i), numValueOf);
                    }
                    m6882(c5004);
                    if (c5004.m10343() && m6920()) {
                        m6938();
                    } else {
                        m6882(c5004);
                        if (c5004.m10343()) {
                            C1694 c16944 = this.f11109;
                            m6882(c16944);
                            if (c16944.m4595(c2019M4596.m5415())) {
                                m6912(c2019M4596.m5415());
                            } else {
                                m6940();
                            }
                        }
                    }
                } else {
                    mo3579().getClass();
                    c2019M4596.m5433(System.currentTimeMillis());
                    C1694 c16945 = this.f11109;
                    m6882(c16945);
                    c16945.m4624(c2019M4596, false);
                    mo3572().f13414.m4475("Fetching config failed. code, error", Integer.valueOf(i), th);
                    m6882(c1811);
                    c1811.ˈᵲᵢ();
                    c1811.f7222.put(str, null);
                    C2594 c2594 = this.f11122.f3533;
                    mo3579().getClass();
                    c2594.m6316(System.currentTimeMillis());
                    if (i == 503 || i == 429) {
                        C2594 c25942 = this.f11122.f3527;
                        mo3579().getClass();
                        c25942.m6316(System.currentTimeMillis());
                    }
                    m6940();
                }
            }
            C1694 c16946 = this.f11109;
            m6882(c16946);
            c16946.m4605();
            this.f11107 = false;
            m6915();
        } finally {
            C1694 c16947 = this.f11109;
            m6882(c16947);
            c16947.m4630();
        }
    }

    /* JADX INFO: renamed from: ˈⁱᵡ, reason: contains not printable characters */
    public final C2847 m6897(String str) throws Throwable {
        C1694 c1694 = this.f11109;
        m6882(c1694);
        C2019 c2019M4596 = c1694.m4596(str);
        if (c2019M4596 != null) {
            C1103 c1103 = c2019M4596.f8027;
            if (!TextUtils.isEmpty(c2019M4596.m5414())) {
                Boolean boolM6889 = m6889(c2019M4596);
                if (boolM6889 != null && !boolM6889.booleanValue()) {
                    mo3572().f13423.m4474(C3485.m7979(str), "App version does not match; dropping. appId");
                    return null;
                }
                String strM5402 = c2019M4596.m5402();
                String strM5414 = c2019M4596.m5414();
                long jM5400 = c2019M4596.m5400();
                C1961 c1961 = c1103.f4707;
                C1103.m3564(c1961);
                c1961.m5243();
                String str2 = c2019M4596.f8023;
                C1961 c19612 = c1103.f4707;
                C1103.m3564(c19612);
                c19612.m5243();
                long j = c2019M4596.f8015;
                C1961 c19613 = c1103.f4707;
                C1103.m3564(c19613);
                c19613.m5243();
                long j2 = c2019M4596.f8005;
                C1961 c19614 = c1103.f4707;
                C1103.m3564(c19614);
                c19614.m5243();
                boolean z = c2019M4596.f8022;
                String strM5408 = c2019M4596.m5408();
                C1961 c19615 = c1103.f4707;
                C1103.m3564(c19615);
                c19615.m5243();
                boolean z2 = c2019M4596.f8017;
                Boolean boolM5416 = c2019M4596.m5416();
                long jM5394 = c2019M4596.m5394();
                C1961 c19616 = c1103.f4707;
                C1103.m3564(c19616);
                c19616.m5243();
                ArrayList arrayList = c2019M4596.f7997;
                String strM3071 = m6888(str).m3071();
                boolean zM5428 = c2019M4596.m5428();
                C1961 c19617 = c1103.f4707;
                C1103.m3564(c19617);
                c19617.m5243();
                long j3 = c2019M4596.f8006;
                int i = m6888(str).f3872;
                String str3 = m6934(str).f4694;
                C1961 c19618 = c1103.f4707;
                C1103.m3564(c19618);
                c19618.m5243();
                int i2 = c2019M4596.f8012;
                C1961 c19619 = c1103.f4707;
                C1103.m3564(c19619);
                c19619.m5243();
                return new C2847(str, strM5402, strM5414, jM5400, str2, j, j2, (String) null, z, false, strM5408, 0L, 0, z2, false, boolM5416, jM5394, (List) arrayList, strM3071, "", (String) null, zM5428, j3, i, str3, i2, c2019M4596.f7995, c2019M4596.m5437(), c2019M4596.m5401(), 0L, c2019M4596.m5412(), 0L);
            }
        }
        mo3572().f13416.m4474(str, "No app data available; dropping");
        return null;
    }

    /* JADX INFO: renamed from: ˉˆᵗ, reason: contains not printable characters */
    public final void m6898(C2847 c2847, long j) throws Throwable {
        C1694 c1694 = this.f11109;
        m6882(c1694);
        String str = c2847.f10910;
        ᵘᵞʿⁱ.ᵶᵥᵝ(str);
        C2019 c2019M4596 = c1694.m4596(str);
        if (c2019M4596 != null) {
            m6910();
            String str2 = c2847.f10918;
            String strM5402 = c2019M4596.m5402();
            boolean zIsEmpty = TextUtils.isEmpty(str2);
            boolean zIsEmpty2 = TextUtils.isEmpty(strM5402);
            if (!zIsEmpty && !zIsEmpty2) {
                ᵘᵞʿⁱ.ᵶᵥᵝ(str2);
                if (!str2.equals(strM5402)) {
                    mo3572().f13424.m4474(C3485.m7979(c2019M4596.m5415()), "New GMP App Id passed in. Removing cached database data. appId");
                    C1694 c16942 = this.f11109;
                    m6882(c16942);
                    C1103 c1103 = (C1103) ((ᵜᵪʾ) c16942).ˌᴵ;
                    String strM5415 = c2019M4596.m5415();
                    c16942.m5026();
                    c16942.ˈᵲᵢ();
                    ᵘᵞʿⁱ.ˊᵫᵗ(strM5415);
                    try {
                        SQLiteDatabase sQLiteDatabaseM4625 = c16942.m4625();
                        String[] strArr = {strM5415};
                        int iDelete = sQLiteDatabaseM4625.delete("events", "app_id=?", strArr) + sQLiteDatabaseM4625.delete("user_attributes", "app_id=?", strArr) + sQLiteDatabaseM4625.delete("conditional_properties", "app_id=?", strArr) + sQLiteDatabaseM4625.delete("apps", "app_id=?", strArr) + sQLiteDatabaseM4625.delete("raw_events", "app_id=?", strArr) + sQLiteDatabaseM4625.delete("raw_events_metadata", "app_id=?", strArr) + sQLiteDatabaseM4625.delete("event_filters", "app_id=?", strArr) + sQLiteDatabaseM4625.delete("property_filters", "app_id=?", strArr) + sQLiteDatabaseM4625.delete("audience_filter_values", "app_id=?", strArr) + sQLiteDatabaseM4625.delete("consent_settings", "app_id=?", strArr) + sQLiteDatabaseM4625.delete("default_event_params", "app_id=?", strArr) + sQLiteDatabaseM4625.delete("trigger_uris", "app_id=?", strArr) + sQLiteDatabaseM4625.delete("diagnostic_signals", "app_id=?", strArr);
                        if (c1103.f4726.m8314(null, AbstractC3818.f14555)) {
                            iDelete += sQLiteDatabaseM4625.delete("no_data_mode_events", "app_id=?", strArr);
                        }
                        if (iDelete > 0) {
                            C3485 c3485 = c1103.f4729;
                            C1103.m3564(c3485);
                            c3485.f13414.m4475("Deleted application data. app, records", strM5415, Integer.valueOf(iDelete));
                        }
                    } catch (SQLiteException e) {
                        C3485 c34852 = c1103.f4729;
                        C1103.m3564(c34852);
                        c34852.f13423.m4475("Error deleting application data. appId, error", C3485.m7979(strM5415), e);
                    }
                    c2019M4596 = null;
                }
            }
        }
        if (c2019M4596 != null) {
            boolean z = (c2019M4596.m5400() == -2147483648L || c2019M4596.m5400() == c2847.f10914) ? false : true;
            String strM5414 = c2019M4596.m5414();
            if (z || ((c2019M4596.m5400() != -2147483648L || strM5414 == null || strM5414.equals(c2847.f10915)) ? false : true)) {
                Bundle bundle = new Bundle();
                bundle.putString("_pv", strM5414);
                C0357 c0357 = new C0357("_au", new C3590(bundle), "auto", j, 0L);
                if (m6921().m8314(null, AbstractC3818.f14527)) {
                    m6904(c0357, c2847);
                } else {
                    m6939(c0357, c2847);
                }
            }
        }
    }

    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public final boolean m6899(String str, String str2) throws Throwable {
        C1694 c1694 = this.f11109;
        m6882(c1694);
        C2019 c2019M4596 = c1694.m4596(str);
        HashMap map = this.f11115;
        if (c2019M4596 != null && m6910().m7658(str, c2019M4596.m5437())) {
            map.remove(str2);
            return true;
        }
        C3130 c3130 = (C3130) map.get(str2);
        if (c3130 != null) {
            c3130.f11937.mo3579().getClass();
            if (System.currentTimeMillis() < c3130.f11936) {
                return false;
            }
        }
        return true;
    }

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public final void m6900() {
        mo3578().m5243();
        if (this.f11100.isEmpty()) {
            return;
        }
        int i = 2;
        if (this.f11097 == null) {
            this.f11097 = new C3164(this, this.f11114, i);
        }
        if (this.f11097.f17107 != 0) {
            return;
        }
        mo3579().getClass();
        long jMax = Math.max(0L, ((long) ((Integer) AbstractC3818.f14544.m1988(null)).intValue()) - (SystemClock.elapsedRealtime() - this.f11094));
        mo3572().f13414.m4474(Long.valueOf(jMax), "Scheduling notify next app runnable, delay in ms");
        if (this.f11097 == null) {
            this.f11097 = new C3164(this, this.f11114, i);
        }
        this.f11097.m9539(jMax);
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:113:0x0231  */
    /* JADX WARN: Removed duplicated region for block: B:17:0x006f A[PHI: r0 r11 r24
      0x006f: PHI (r0v114 java.util.List) = (r0v8 java.util.List), (r0v136 java.util.List) binds: [B:108:0x0225, B:16:0x006d] A[DONT_GENERATE, DONT_INLINE]
      0x006f: PHI (r11v55 android.database.Cursor) = (r11v5 android.database.Cursor), (r11v57 android.database.Cursor) binds: [B:108:0x0225, B:16:0x006d] A[DONT_GENERATE, DONT_INLINE]
      0x006f: PHI (r24v19 long) = (r24v2 long), (r24v20 long) binds: [B:108:0x0225, B:16:0x006d] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:187:0x049b  */
    /* JADX WARN: Removed duplicated region for block: B:191:0x04a9  */
    /* JADX WARN: Removed duplicated region for block: B:224:0x058a  */
    /* JADX WARN: Removed duplicated region for block: B:233:0x05a5  */
    /* JADX WARN: Removed duplicated region for block: B:251:0x05fb  */
    /* JADX WARN: Removed duplicated region for block: B:257:0x0623  */
    /* JADX WARN: Removed duplicated region for block: B:261:0x0652  */
    /* JADX WARN: Removed duplicated region for block: B:305:0x07af  */
    /* JADX WARN: Removed duplicated region for block: B:315:0x0803  */
    /* JADX WARN: Removed duplicated region for block: B:317:0x0812  */
    /* JADX WARN: Removed duplicated region for block: B:378:0x0a7f  */
    /* JADX WARN: Removed duplicated region for block: B:438:0x07f7 A[EDGE_INSN: B:438:0x07f7->B:313:0x07f7 BREAK  A[LOOP:4: B:259:0x064e->B:312:0x07e9], SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:440:0x07e9 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:475:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:477:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:478:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Type inference failed for: r11v2 */
    /* JADX WARN: Type inference failed for: r11v3, types: [boolean] */
    /* JADX WARN: Type inference failed for: r11v58 */
    /* JADX WARN: Type inference failed for: r14v0 */
    /* JADX WARN: Type inference failed for: r14v1, types: [android.database.Cursor] */
    /* JADX WARN: Type inference failed for: r14v2 */
    /* JADX WARN: Type inference failed for: r31v0, types: [ᵜᵻ] */
    /* JADX INFO: renamed from: ˊᵙᵾᵲ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m6901(long j, String str) throws Throwable {
        ?? r14;
        C1103 c1103;
        long j2;
        Cursor cursorQuery;
        List list;
        List<Pair> list2;
        List list3;
        C0875 c0875M6888;
        EnumC0174 enumC0174;
        int i;
        List listSubList;
        C4798 c4798M3410;
        int size;
        int i2;
        boolean zM3073;
        boolean zM8314;
        List list4;
        C1103 c11032;
        boolean z;
        String str2;
        C5004 c5004;
        String string;
        C2788 c2788;
        int i3;
        boolean z2;
        int i4;
        List list5;
        boolean z3;
        String strM10548;
        List list6;
        boolean zIsEmpty;
        Cursor cursor;
        C1103 c11033;
        List list7;
        Cursor cursor2;
        List list8;
        List list9;
        Iterator it;
        Iterator it2;
        int i5;
        int i6;
        SQLiteDatabase sQLiteDatabaseM4625;
        long jCurrentTimeMillis;
        Cursor cursorQuery2;
        ArrayList arrayList;
        List list10;
        C1694 c1694;
        byte[] byteArray;
        long jM10075;
        long jM100752;
        String str3 = str;
        int iM8310 = m6921().m8310(str3, AbstractC3818.f14505);
        int i7 = 0;
        int iMax = Math.max(0, m6921().m8310(str3, AbstractC3818.f14583));
        C1694 c1694M6917 = m6917();
        C1103 c11034 = (C1103) ((ᵜᵪʾ) c1694M6917).ˌᴵ;
        c1694M6917.ˈᵲᵢ();
        c1694M6917.m5026();
        int i8 = 1;
        ᵘᵞʿⁱ.ᵻˈᵦʼ(iM8310 > 0);
        ?? r11 = iMax > 0 ? 1 : 0;
        ᵘᵞʿⁱ.ᵻˈᵦʼ((boolean) r11);
        ᵘᵞʿⁱ.ˊᵫᵗ(str3);
        try {
            try {
                try {
                    j2 = -1;
                } catch (Throwable th) {
                    th = th;
                    r14 = 0;
                    if (r14 != 0) {
                        r14.close();
                    }
                    throw th;
                }
            } catch (SQLiteException e) {
                e = e;
                c1103 = c11034;
                j2 = -1;
            }
            try {
                cursorQuery = c1694M6917.m4625().query("queue", new String[]{"rowid", "data", "retry_count"}, "app_id=?", new String[]{str3}, null, null, "rowid", String.valueOf(iM8310));
                try {
                } catch (SQLiteException e2) {
                    e = e2;
                    c1103 = c11034;
                }
            } catch (SQLiteException e3) {
                e = e3;
                c1103 = c11034;
                cursorQuery = null;
                c1103.mo3572().m7982().m4475("Error querying bundles. appId", C3485.m7979(str3), e);
                list = Collections.EMPTY_LIST;
                if (cursorQuery != null) {
                    cursorQuery.close();
                }
                list2 = list;
                if (list2.isEmpty()) {
                }
            }
            if (cursorQuery.moveToFirst()) {
                ArrayList arrayList2 = new ArrayList();
                int length = 0;
                while (true) {
                    long j3 = cursorQuery.getLong(i7);
                    try {
                        byte[] blob = cursorQuery.getBlob(i8);
                        C1962 c1962M6933 = c1694M6917.f18892.m6933();
                        try {
                            ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(blob);
                            GZIPInputStream gZIPInputStream = new GZIPInputStream(byteArrayInputStream);
                            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                            byte[] bArr = new byte[1024];
                            c1694 = c1694M6917;
                            while (true) {
                                try {
                                    int i9 = gZIPInputStream.read(bArr);
                                    if (i9 <= 0) {
                                        break;
                                    }
                                    c1103 = c11034;
                                    try {
                                        try {
                                            byteArrayOutputStream.write(bArr, 0, i9);
                                            c11034 = c1103;
                                        } catch (IOException e4) {
                                            e = e4;
                                            try {
                                                ((C1103) ((ᵜᵪʾ) c1962M6933).ˌᴵ).mo3572().m7982().m4474(e, "Failed to ungzip content");
                                                throw e;
                                            } catch (IOException e5) {
                                                e = e5;
                                                c1103.mo3572().m7982().m4475("Failed to unzip queued bundle. appId", C3485.m7979(str3), e);
                                                if (cursorQuery.moveToNext()) {
                                                    break;
                                                } else {
                                                    break;
                                                }
                                                cursorQuery.close();
                                                list2 = arrayList2;
                                                if (list2.isEmpty()) {
                                                }
                                            }
                                        }
                                    } catch (SQLiteException e6) {
                                        e = e6;
                                        c1103.mo3572().m7982().m4475("Error querying bundles. appId", C3485.m7979(str3), e);
                                        list = Collections.EMPTY_LIST;
                                        if (cursorQuery != null) {
                                        }
                                        list2 = list;
                                        if (list2.isEmpty()) {
                                        }
                                    }
                                } catch (IOException e7) {
                                    e = e7;
                                    c1103 = c11034;
                                    ((C1103) ((ᵜᵪʾ) c1962M6933).ˌᴵ).mo3572().m7982().m4474(e, "Failed to ungzip content");
                                    throw e;
                                }
                            }
                            gZIPInputStream.close();
                            byteArrayInputStream.close();
                            byteArray = byteArrayOutputStream.toByteArray();
                        } catch (IOException e8) {
                            e = e8;
                            c1694 = c1694M6917;
                        }
                    } catch (IOException e9) {
                        e = e9;
                        c1694 = c1694M6917;
                        c1103 = c11034;
                    }
                    if (!arrayList2.isEmpty() && byteArray.length + length > iMax) {
                        break;
                    }
                    try {
                        C0542 c0542 = (C0542) C1962.m5264(C5090.m10417(), byteArray);
                        if (!arrayList2.isEmpty()) {
                            C5090 c5090 = (C5090) ((Pair) arrayList2.get(0)).first;
                            C5090 c50902 = (C5090) c0542.m9869();
                            if (!c5090.m10512().equals(c50902.m10512()) || !c5090.m10453().equals(c50902.m10453()) || c5090.m10499() != c50902.m10499() || !c5090.m10441().equals(c50902.m10441())) {
                                break;
                            }
                            Iterator it3 = c5090.m10426().iterator();
                            while (true) {
                                if (!it3.hasNext()) {
                                    jM10075 = -1;
                                    break;
                                }
                                C4822 c4822 = (C4822) it3.next();
                                Iterator it4 = it3;
                                if ("_npa".equals(c4822.m10067())) {
                                    jM10075 = c4822.m10075();
                                    break;
                                }
                                it3 = it4;
                            }
                            Iterator it5 = c50902.m10426().iterator();
                            while (true) {
                                if (!it5.hasNext()) {
                                    jM100752 = -1;
                                    break;
                                }
                                C4822 c48222 = (C4822) it5.next();
                                if ("_npa".equals(c48222.m10067())) {
                                    jM100752 = c48222.m10075();
                                    break;
                                }
                            }
                            if (jM10075 != jM100752) {
                                break;
                            }
                        }
                        if (!cursorQuery.isNull(2)) {
                            int i10 = cursorQuery.getInt(2);
                            c0542.m9868();
                            ((C5090) c0542.f17955).m10447(i10);
                        }
                        length += byteArray.length;
                        arrayList2.add(Pair.create((C5090) c0542.m9869(), Long.valueOf(j3)));
                    } catch (IOException e10) {
                        c11034.mo3572().m7982().m4475("Failed to merge queued bundle. appId", C3485.m7979(str3), e10);
                    }
                    c1103 = c11034;
                    if (cursorQuery.moveToNext() || length > iMax) {
                        break;
                        break;
                    }
                    c1694M6917 = c1694;
                    c11034 = c1103;
                    i7 = 0;
                    i8 = 1;
                }
                cursorQuery.close();
                list2 = arrayList2;
                if (list2.isEmpty()) {
                }
            } else {
                list = Collections.EMPTY_LIST;
                cursorQuery.close();
                list2 = list;
                if (list2.isEmpty()) {
                    return;
                }
                C2792 c2792 = C2792.f10735;
                C3691 c3691M6921 = m6921();
                C0511 c0511 = AbstractC3818.f14555;
                boolean zM83142 = c3691M6921.m8314(null, c0511);
                EnumC0174 enumC01742 = EnumC0174.f1598;
                if (zM83142) {
                    if (!m6921().m8314(null, c0511)) {
                        list6 = list2;
                    } else if (m6888(str3).m3073(enumC01742) || !m6914().m4969(str3)) {
                        ArrayList arrayList3 = new ArrayList(list2.size());
                        C1694 c1694M69172 = m6917();
                        C1103 c11035 = (C1103) ((ᵜᵪʾ) c1694M69172).ˌᴵ;
                        ᵘᵞʿⁱ.ˊᵫᵗ(str3);
                        c1694M69172.ˈᵲᵢ();
                        c1694M69172.m5026();
                        ArrayList arrayList4 = new ArrayList();
                        try {
                            try {
                                sQLiteDatabaseM4625 = c1694M69172.m4625();
                                c11035.mo3579().getClass();
                                jCurrentTimeMillis = System.currentTimeMillis();
                                cursorQuery2 = sQLiteDatabaseM4625.query("no_data_mode_events", new String[]{"data"}, "app_id=? AND timestamp_millis <= CAST(? AS INTEGER)", new String[]{str3, String.valueOf(jCurrentTimeMillis)}, null, null, "rowid", null);
                                c11033 = c11035;
                            } catch (SQLiteException e11) {
                                e = e11;
                                c11033 = c11035;
                                list7 = list2;
                            }
                        } catch (Throwable th2) {
                            th = th2;
                            cursor = null;
                        }
                        try {
                            try {
                            } catch (SQLiteException e12) {
                                e = e12;
                                cursor2 = cursorQuery2;
                                list7 = list2;
                            }
                        } catch (Throwable th3) {
                            th = th3;
                            cursor2 = cursorQuery2;
                            cursor = cursor2;
                            if (cursor != null) {
                            }
                            throw th;
                        }
                        if (cursorQuery2.moveToFirst()) {
                            list7 = list2;
                            while (true) {
                                try {
                                    try {
                                        arrayList4.add((C4943) ((C4225) C1962.m5264(C4943.m10252(), cursorQuery2.getBlob(0))).m9869());
                                        cursor2 = cursorQuery2;
                                        arrayList = arrayList4;
                                    } catch (zzaeh e13) {
                                        cursor2 = cursorQuery2;
                                        try {
                                            try {
                                                arrayList = arrayList4;
                                                c11033.mo3572().f13413.m4475("Failed to parse stored NO_DATA mode event, appId", C3485.m7979(str3), e13);
                                            } catch (SQLiteException e14) {
                                                e = e14;
                                                c11033.mo3572().m7982().m4475("Error flushing NO_DATA mode events. appId", C3485.m7979(str3), e);
                                                list8 = Collections.EMPTY_LIST;
                                                list9 = list7;
                                                if (cursor2 != null) {
                                                }
                                            }
                                        } catch (Throwable th4) {
                                            th = th4;
                                            cursor = cursor2;
                                            if (cursor != null) {
                                            }
                                            throw th;
                                        }
                                    }
                                    if (!cursor2.moveToNext()) {
                                        break;
                                    }
                                    cursorQuery2 = cursor2;
                                    arrayList4 = arrayList;
                                } catch (SQLiteException e15) {
                                    e = e15;
                                    cursor2 = cursorQuery2;
                                    c11033.mo3572().m7982().m4475("Error flushing NO_DATA mode events. appId", C3485.m7979(str3), e);
                                    list8 = Collections.EMPTY_LIST;
                                    list9 = list7;
                                    if (cursor2 != null) {
                                    }
                                    it = list9.iterator();
                                    boolean z4 = true;
                                    while (it.hasNext()) {
                                    }
                                    list6 = arrayList3;
                                    zIsEmpty = list6.isEmpty();
                                    list3 = list6;
                                    if (zIsEmpty) {
                                    }
                                    c0875M6888 = m6888(str3);
                                    enumC0174 = EnumC0174.f1599;
                                    if (!c0875M6888.m3073(enumC0174)) {
                                    }
                                    c4798M3410 = C1027.m3410();
                                    size = listSubList.size();
                                    ArrayList arrayList5 = new ArrayList(listSubList.size());
                                    if (m6921().m8311(str3)) {
                                    }
                                    boolean zM30732 = m6888(str3).m3073(enumC0174);
                                    zM3073 = m6888(str3).m3073(enumC01742);
                                    zM8314 = m6921().m8314(str3, AbstractC3818.f14569);
                                    C4554 c4554 = this.f11108;
                                    C2788 c2788M9641 = c4554.m9641(str3);
                                    list4 = listSubList;
                                    while (true) {
                                        c11032 = this.f11114;
                                        if (i < size) {
                                        }
                                        i = i + 1;
                                        size = i3;
                                        zM3073 = z2;
                                        list4 = list5;
                                        i2 = i4;
                                        zM8314 = z3;
                                    }
                                    if (((C1027) c4798M3410.f17955).m3414() != 0) {
                                    }
                                }
                                if (cursor != null) {
                                    cursor.close();
                                }
                                throw th;
                            }
                            cursor2.close();
                            try {
                                int iDelete = sQLiteDatabaseM4625.delete("no_data_mode_events", "app_id=? AND timestamp_millis <= CAST(? AS INTEGER)", new String[]{str3, String.valueOf(jCurrentTimeMillis)});
                                C1623 c1623M7983 = c11033.mo3572().m7983();
                                StringBuilder sb = new StringBuilder(String.valueOf(iDelete).length() + 34);
                                sb.append("Pruned ");
                                sb.append(iDelete);
                                sb.append(" NO_DATA mode events. appId");
                                c1623M7983.m4474(str3, sb.toString());
                                list10 = list7;
                            } catch (SQLiteException e16) {
                                e = e16;
                                cursor2 = null;
                                c11033.mo3572().m7982().m4475("Error flushing NO_DATA mode events. appId", C3485.m7979(str3), e);
                                list8 = Collections.EMPTY_LIST;
                                list9 = list7;
                                if (cursor2 != null) {
                                    cursor2.close();
                                    list9 = list7;
                                }
                            }
                        } else {
                            arrayList = arrayList4;
                            list10 = list2;
                            cursorQuery2.close();
                        }
                        list8 = arrayList;
                        list9 = list10;
                        it = list9.iterator();
                        boolean z42 = true;
                        while (it.hasNext()) {
                            Pair pair = (Pair) it.next();
                            C0542 c05422 = (C0542) ((C5090) pair.first).m9884();
                            if (z42 && !list8.isEmpty()) {
                                List listM2110 = c05422.m2110();
                                c05422.m9868();
                                ((C5090) c05422.f17955).m10467();
                                c05422.m9868();
                                ((C5090) c05422.f17955).m10437(list8);
                                c05422.m9868();
                                ((C5090) c05422.f17955).m10437(listM2110);
                                z42 = false;
                            }
                            C4142 c4142M5365 = C1991.m5365();
                            C1699 c1699M4967 = m6914().m4967(str3);
                            ArrayList arrayList6 = new ArrayList();
                            if (c1699M4967 != null) {
                                Iterator it6 = c1699M4967.m4649().iterator();
                                while (it6.hasNext()) {
                                    C5415 c5415 = (C5415) it6.next();
                                    Iterator it7 = it;
                                    C1026 c1026M1880 = C0450.m1880();
                                    boolean z5 = z42;
                                    int iM11034 = c5415.m11034() - 1;
                                    List list11 = list8;
                                    if (iM11034 == 1) {
                                        it2 = it6;
                                        i5 = 3;
                                        i6 = 2;
                                    } else if (iM11034 != 2) {
                                        it2 = it6;
                                        i5 = 3;
                                        i6 = iM11034 != 3 ? iM11034 != 4 ? 1 : 5 : 4;
                                    } else {
                                        it2 = it6;
                                        i5 = 3;
                                        i6 = 3;
                                    }
                                    c1026M1880.m3408(i6);
                                    int iM11033 = c5415.m11033() - 1;
                                    if (iM11033 == 1) {
                                        i5 = 2;
                                    } else if (iM11033 != 2) {
                                        i5 = 1;
                                    }
                                    c1026M1880.m3407(i5);
                                    arrayList6.add((C0450) c1026M1880.m9869());
                                    it = it7;
                                    list8 = list11;
                                    z42 = z5;
                                    it6 = it2;
                                }
                            }
                            Iterator it8 = it;
                            boolean z6 = z42;
                            List list12 = list8;
                            c4142M5365.m9065(arrayList6);
                            c05422.m2116(c4142M5365);
                            arrayList3.add(Pair.create((C5090) c05422.m9869(), (Long) pair.second));
                            it = it8;
                            list8 = list12;
                            z42 = z6;
                        }
                        list6 = arrayList3;
                    } else {
                        List listAsList = Arrays.asList(((String) AbstractC3818.f14574.m1988(null)).split(","));
                        for (Pair pair2 : list2) {
                            try {
                                m6917().m4600(((Long) pair2.second).longValue());
                                for (C4943 c4943 : ((C5090) pair2.first).m10469()) {
                                    if (listAsList.contains(c4943.m10274())) {
                                        if (c4943.m10274().equals("_f") || c4943.m10274().equals("_v")) {
                                            C4225 c4225 = (C4225) c4943.m9884();
                                            m6933();
                                            C1962.m5254(c4225, "_dac", 1L);
                                            c4943 = (C4943) c4225.m9869();
                                        }
                                        C1694 c1694M69173 = m6917();
                                        c1694M69173.ˈᵲᵢ();
                                        c1694M69173.m5026();
                                        ᵘᵞʿⁱ.ˊᵫᵗ(str3);
                                        C1103 c11036 = (C1103) ((ᵜᵪʾ) c1694M69173).ˌᴵ;
                                        c11036.mo3572().m7983().m4474(c4943, "Caching events in NO_DATA mode");
                                        ContentValues contentValues = new ContentValues();
                                        contentValues.put("app_id", str3);
                                        C4943 c49432 = c4943;
                                        contentValues.put("name", c49432.m10274());
                                        contentValues.put("data", c49432.m7714());
                                        contentValues.put("timestamp_millis", Long.valueOf(c49432.m10277()));
                                        try {
                                            if (c1694M69173.m4625().insert("no_data_mode_events", null, contentValues) == j2) {
                                                c11036.mo3572().m7982().m4474(C3485.m7979(str3), "Failed to insert NO_DATA mode event (got -1). appId");
                                            }
                                        } catch (SQLiteException e17) {
                                            ((C1103) ((ᵜᵪʾ) c1694M69173).ˌᴵ).mo3572().m7982().m4475("Error storing NO_DATA mode event. appId", C3485.m7979(str3), e17);
                                        }
                                    }
                                }
                            } catch (SQLiteException unused) {
                                mo3572().f13413.m4474(str3, "Failed handling NO_DATA mode bundles. appId");
                            }
                        }
                        list6 = Collections.EMPTY_LIST;
                    }
                    zIsEmpty = list6.isEmpty();
                    list3 = list6;
                    if (zIsEmpty) {
                        return;
                    }
                } else {
                    list3 = list2;
                }
                c0875M6888 = m6888(str3);
                enumC0174 = EnumC0174.f1599;
                if (!c0875M6888.m3073(enumC0174)) {
                    Iterator it9 = list3.iterator();
                    while (true) {
                        if (!it9.hasNext()) {
                            strM10548 = null;
                            break;
                        }
                        C5090 c50903 = (C5090) ((Pair) it9.next()).first;
                        if (!c50903.m10548().isEmpty()) {
                            strM10548 = c50903.m10548();
                            break;
                        }
                    }
                    if (strM10548 != null) {
                        for (int i11 = 0; i11 < list3.size(); i11++) {
                            C5090 c50904 = (C5090) ((Pair) list3.get(i11)).first;
                            if (!c50904.m10548().isEmpty() && !c50904.m10548().equals(strM10548)) {
                                i = 0;
                                listSubList = list3.subList(0, i11);
                                break;
                            }
                        }
                        i = 0;
                        listSubList = list3;
                    } else {
                        i = 0;
                        listSubList = list3;
                    }
                }
                c4798M3410 = C1027.m3410();
                size = listSubList.size();
                ArrayList arrayList52 = new ArrayList(listSubList.size());
                i2 = (m6921().m8311(str3) || !m6888(str3).m3073(enumC0174)) ? i : 1;
                boolean zM307322 = m6888(str3).m3073(enumC0174);
                zM3073 = m6888(str3).m3073(enumC01742);
                zM8314 = m6921().m8314(str3, AbstractC3818.f14569);
                C4554 c45542 = this.f11108;
                C2788 c2788M96412 = c45542.m9641(str3);
                list4 = listSubList;
                while (true) {
                    c11032 = this.f11114;
                    if (i < size) {
                        break;
                    }
                    C0542 c05423 = (C0542) ((C5090) ((Pair) list4.get(i)).first).m9884();
                    int i12 = i;
                    arrayList52.add((Long) ((Pair) list4.get(i)).second);
                    m6921().m8308();
                    c05423.m2103();
                    c05423.m9868();
                    ((C5090) c05423.f17955).m10559(j);
                    c11032.getClass();
                    c05423.m2097();
                    if (i2 == 0) {
                        c05423.m9868();
                        ((C5090) c05423.f17955).m10556();
                    }
                    if (!zM307322) {
                        c05423.m9868();
                        ((C5090) c05423.f17955).m10500();
                        c05423.m9868();
                        ((C5090) c05423.f17955).m10532();
                    }
                    if (!zM3073) {
                        c05423.m9868();
                        ((C5090) c05423.f17955).m10454();
                    }
                    m6909(str3, c05423);
                    if (!zM8314) {
                        c05423.m9868();
                        ((C5090) c05423.f17955).m10536();
                    }
                    if (!zM3073) {
                        c05423.m9868();
                        ((C5090) c05423.f17955).m10474();
                    }
                    String strM105482 = ((C5090) c05423.f17955).m10548();
                    if (TextUtils.isEmpty(strM105482)) {
                        i3 = size;
                    } else {
                        i3 = size;
                        if (!strM105482.equals("00000000-0000-0000-0000-000000000000")) {
                            z2 = zM3073;
                            i4 = i2;
                            list5 = list4;
                            z3 = zM8314;
                        }
                        if (c05423.m2084() != 0) {
                            if (m6921().m8314(str3, AbstractC3818.f14484)) {
                                c05423.m2115(m6933().m5287(((C5090) c05423.m9869()).m7714()));
                            }
                            C2424 c2424M6775 = c2788M96412.m6775();
                            if (c2424M6775 != null) {
                                c05423.m2108(c2424M6775);
                            }
                            c4798M3410.m9868();
                            ((C1027) c4798M3410.f17955).m3424((C5090) c05423.m9869());
                        }
                        i = i12 + 1;
                        size = i3;
                        zM3073 = z2;
                        list4 = list5;
                        i2 = i4;
                        zM8314 = z3;
                    }
                    ArrayList arrayList7 = new ArrayList(c05423.m2110());
                    Iterator it10 = arrayList7.iterator();
                    z2 = zM3073;
                    Long lValueOf = null;
                    Long lValueOf2 = null;
                    boolean z7 = false;
                    boolean z8 = false;
                    while (it10.hasNext()) {
                        int i13 = i2;
                        C4943 c49433 = (C4943) it10.next();
                        List list13 = list4;
                        boolean z9 = zM8314;
                        if ("_fx".equals(c49433.m10274())) {
                            it10.remove();
                            list4 = list13;
                            i2 = i13;
                            zM8314 = z9;
                            z7 = true;
                        } else if ("_f".equals(c49433.m10274())) {
                            m6933();
                            C0114 c0114M5259 = C1962.m5259("_pfo", c49433);
                            if (c0114M5259 != null) {
                                lValueOf = Long.valueOf(c0114M5259.m1200());
                            }
                            m6933();
                            C0114 c0114M52592 = C1962.m5259("_uwa", c49433);
                            if (c0114M52592 != null) {
                                lValueOf2 = Long.valueOf(c0114M52592.m1200());
                            }
                            list4 = list13;
                            i2 = i13;
                            zM8314 = z9;
                        } else {
                            list4 = list13;
                            i2 = i13;
                            zM8314 = z9;
                        }
                        z8 = true;
                    }
                    i4 = i2;
                    list5 = list4;
                    z3 = zM8314;
                    if (z7) {
                        c05423.m9868();
                        ((C5090) c05423.f17955).m10467();
                        c05423.m9868();
                        ((C5090) c05423.f17955).m10437(arrayList7);
                    }
                    if (z8) {
                        m6903(c05423.m2096(), true, lValueOf, lValueOf2);
                    }
                    if (c05423.m2084() != 0) {
                    }
                    i = i12 + 1;
                    size = i3;
                    zM3073 = z2;
                    list4 = list5;
                    i2 = i4;
                    zM8314 = z3;
                }
                if (((C1027) c4798M3410.f17955).m3414() != 0) {
                    m6924(arrayList52);
                    m6937(false, 204, null, null, str3, Collections.EMPTY_LIST, null);
                    return;
                }
                C1027 c1027 = (C1027) c4798M3410.m9869();
                ArrayList arrayList8 = new ArrayList();
                EnumC4563 enumC4563 = c2788M96412.f10728;
                boolean z10 = enumC4563 == EnumC4563.f17348;
                if (enumC4563 == EnumC4563.f17347) {
                    z = z10;
                } else {
                    if (!z10) {
                        str2 = null;
                        c5004 = this.f11112;
                        m6882(c5004);
                        if (c5004.m10343()) {
                            return;
                        }
                        String strM5278 = Log.isLoggable(mo3572().m7985(), 2) ? m6933().m5278(c1027) : str2;
                        m6933();
                        byte[] bArrM7714 = c1027.m7714();
                        m6924(arrayList52);
                        this.f11122.f3533.m6316(j);
                        mo3572().m7983().m4477("Uploading data. app, uncompressed size, data", str3, Integer.valueOf(bArrM7714.length), strM5278);
                        this.f11087 = true;
                        m6882(c5004);
                        c5004.m10344(str3, c2788M96412, c1027, new C5398(this, str3, arrayList8));
                        return;
                    }
                    z = true;
                }
                Iterator it11 = ((C1027) c4798M3410.m9869()).m3417().iterator();
                while (true) {
                    if (it11.hasNext()) {
                        if (((C5090) it11.next()).m10535()) {
                            string = UUID.randomUUID().toString();
                            break;
                        }
                    } else {
                        string = null;
                        break;
                    }
                }
                C1027 c10272 = (C1027) c4798M3410.m9869();
                mo3578().m5243();
                m6918();
                C4798 c4798M3409 = C1027.m3409(c10272);
                if (!TextUtils.isEmpty(string)) {
                    c4798M3409.m9868();
                    ((C1027) c4798M3409.f17955).m3421(string);
                }
                String strM4966 = m6914().m4966(str3);
                if (!TextUtils.isEmpty(strM4966)) {
                    c4798M3409.m10005(strM4966);
                }
                ArrayList arrayList9 = new ArrayList();
                Iterator it12 = c10272.m3417().iterator();
                while (it12.hasNext()) {
                    C0542 c0542M10418 = C5090.m10418((C5090) it12.next());
                    c0542M10418.m9868();
                    ((C5090) c0542M10418.f17955).m10556();
                    arrayList9.add((C5090) c0542M10418.m9869());
                }
                c4798M3409.m9868();
                ((C1027) c4798M3409.f17955).m3411();
                c4798M3409.m9868();
                ((C1027) c4798M3409.f17955).m3418(arrayList9);
                mo3572().m7983().m4474(TextUtils.isEmpty(string) ? "null" : c4798M3409.m10006(), "[sgtm] Processed MeasurementBatch for sGTM with sgtmJoinId: ");
                C1027 c10273 = (C1027) c4798M3409.m9869();
                if (TextUtils.isEmpty(string)) {
                    str2 = null;
                } else {
                    C1027 c10274 = (C1027) c4798M3410.m9869();
                    mo3578().m5243();
                    m6918();
                    C4798 c4798M34102 = C1027.m3410();
                    mo3572().m7983().m4474(string, "[sgtm] Processing Google Signal, sgtmJoinId:");
                    c4798M34102.m9868();
                    ((C1027) c4798M34102.f17955).m3421(string);
                    for (C5090 c50905 : c10274.m3417()) {
                        C0542 c0542M10417 = C5090.m10417();
                        String strM10511 = c50905.m10511();
                        c0542M10417.m9868();
                        ((C5090) c0542M10417.f17955).m10569(strM10511);
                        int iM10473 = c50905.m10473();
                        c0542M10417.m9868();
                        ((C5090) c0542M10417.f17955).m10518(iM10473);
                        c4798M34102.m9868();
                        ((C1027) c4798M34102.f17955).m3424((C5090) c0542M10417.m9869());
                    }
                    C1027 c10275 = (C1027) c4798M34102.m9869();
                    String strM49662 = c45542.f18892.m6914().m4966(str3);
                    boolean zIsEmpty2 = TextUtils.isEmpty(strM49662);
                    EnumC4563 enumC45632 = EnumC4563.f17345;
                    EnumC4563 enumC45633 = EnumC4563.f17349;
                    if (zIsEmpty2) {
                        str2 = null;
                        String str4 = (String) AbstractC3818.f14497.m1988(null);
                        if (z) {
                            enumC45632 = enumC45633;
                        }
                        c2788 = new C2788(str4, Collections.EMPTY_MAP, enumC45632, null);
                    } else {
                        Uri uri = Uri.parse((String) AbstractC3818.f14497.m1988(null));
                        Uri.Builder builderBuildUpon = uri.buildUpon();
                        String authority = uri.getAuthority();
                        StringBuilder sb2 = new StringBuilder(String.valueOf(strM49662).length() + 1 + String.valueOf(authority).length());
                        sb2.append(strM49662);
                        sb2.append(".");
                        sb2.append(authority);
                        builderBuildUpon.authority(sb2.toString());
                        String string2 = builderBuildUpon.build().toString();
                        if (z) {
                            enumC45632 = enumC45633;
                        }
                        str2 = null;
                        c2788 = new C2788(string2, Collections.EMPTY_MAP, enumC45632, null);
                    }
                    arrayList8.add(Pair.create(c10275, c2788));
                }
                if (z) {
                    C4798 c4798 = (C4798) c10273.m9884();
                    for (int i14 = 0; i14 < c10273.m3414(); i14++) {
                        C0542 c05424 = (C0542) c10273.m3415(i14).m9884();
                        c05424.m2089();
                        c05424.m2083(j);
                        c4798.m9868();
                        ((C1027) c4798.f17955).m3416(i14, (C5090) c05424.m9869());
                    }
                    arrayList8.add(Pair.create((C1027) c4798.m9869(), c2788M96412));
                    m6924(arrayList52);
                    m6937(false, 204, null, null, str, arrayList8, null);
                    if (m6899(str, c2788M96412.m6776())) {
                        mo3572().m7983().m4474(str, "[sgtm] Sending sgtm batches available notification to app");
                        Intent intent = new Intent();
                        intent.setAction("com.google.android.gms.measurement.BATCHES_AVAILABLE");
                        intent.setPackage(str);
                        m6886(c11032.mo3580(), intent);
                        return;
                    }
                    return;
                }
                str3 = str;
                c1027 = c10273;
                c5004 = this.f11112;
                m6882(c5004);
                if (c5004.m10343()) {
                }
            }
        } catch (Throwable th5) {
            th = th5;
            r14 = r11;
        }
    }

    /* JADX INFO: renamed from: ˊᵡᵗʨ, reason: contains not printable characters */
    public final void m6902(C4225 c4225, String str, String str2) {
        ArrayList arrayList = new ArrayList(c4225.m9191());
        int i = 0;
        while (true) {
            if (i >= arrayList.size()) {
                i = -1;
                break;
            } else if (str.equals(((C0114) arrayList.get(i)).m1189())) {
                break;
            } else {
                i++;
            }
        }
        if (i == -1) {
            return;
        }
        double dM1192 = c4225.m9190(i).m1192() * 1000000.0d;
        if (dM1192 == 0.0d) {
            dM1192 = c4225.m9190(i).m1200() * 1000000.0d;
        }
        if (dM1192 > 9.223372036854776E18d || dM1192 < -9.223372036854776E18d) {
            mo3572().f13424.m4475(AbstractC3589.m8117("Data lost. Purchase ", str, " is too big. appId"), C3485.m7979(str2), Double.valueOf(dM1192));
            return;
        }
        c4225.m9180(i);
        C2545 c2545M1181 = C0114.m1181();
        c2545M1181.m6263(str);
        c2545M1181.m6262(Math.round(dM1192));
        c4225.m9188((C0114) c2545M1181.m9869());
    }

    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters */
    public final void m6903(String str, boolean z, Long l, Long l2) throws Throwable {
        C1694 c1694 = this.f11109;
        m6882(c1694);
        C2019 c2019M4596 = c1694.m4596(str);
        if (c2019M4596 != null) {
            C1103 c1103 = c2019M4596.f8027;
            C1961 c1961 = c1103.f4707;
            C1103.m3564(c1961);
            c1961.m5243();
            c2019M4596.f8019 |= c2019M4596.f8021 != z;
            c2019M4596.f8021 = z;
            C1961 c19612 = c1103.f4707;
            C1103.m3564(c19612);
            c19612.m5243();
            c2019M4596.f8019 |= !Objects.equals(c2019M4596.f8024, l);
            c2019M4596.f8024 = l;
            C1961 c19613 = c1103.f4707;
            C1103.m3564(c19613);
            c19613.m5243();
            c2019M4596.f8019 |= !Objects.equals(c2019M4596.f8030, l2);
            c2019M4596.f8030 = l2;
            if (c2019M4596.m5426()) {
                C1694 c16942 = this.f11109;
                m6882(c16942);
                c16942.m4624(c2019M4596, false);
            }
        }
    }

    /* JADX WARN: Not initialized variable reg: 6, insn: 0x007d: MOVE (r5 I:??[OBJECT, ARRAY]) = (r6 I:??[OBJECT, ARRAY]), block:B:18:0x007d */
    /* JADX WARN: Removed duplicated region for block: B:25:0x0094  */
    /* JADX WARN: Removed duplicated region for block: B:34:0x00e8  */
    /* JADX WARN: Removed duplicated region for block: B:40:0x010a  */
    /* JADX WARN: Removed duplicated region for block: B:47:? A[SYNTHETIC] */
    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m6904(C0357 c0357, C2847 c2847) throws Throwable {
        Throwable th;
        Cursor cursorRawQuery;
        Cursor cursor;
        Bundle bundleM5260;
        C0357 c0357M2076;
        C3590 c3590;
        String str = c2847.f10910;
        ᵘᵞʿⁱ.ˊᵫᵗ(str);
        C0536 c0536M2075 = C0536.m2075(c0357);
        Bundle bundle = c0536M2075.f2757;
        C3335 c3335M6910 = m6910();
        C1694 c1694 = this.f11109;
        m6882(c1694);
        C1103 c1103 = (C1103) ((ᵜᵪʾ) c1694).ˌᴵ;
        c1694.ˈᵲᵢ();
        c1694.m5026();
        Cursor cursor2 = null;
        try {
            try {
                cursorRawQuery = c1694.m4625().rawQuery("select parameters from default_event_params where app_id=?", new String[]{str});
                try {
                } catch (SQLiteException e) {
                    e = e;
                    C3485 c3485 = c1103.f4729;
                    C1103.m3564(c3485);
                    c3485.f13423.m4474(e, "Error selecting default event parameters");
                }
            } catch (Throwable th2) {
                th = th2;
                cursor2 = cursor;
                if (cursor2 != null) {
                    throw th;
                }
                cursor2.close();
                throw th;
            }
        } catch (SQLiteException e2) {
            e = e2;
            cursorRawQuery = null;
        } catch (Throwable th3) {
            th = th3;
            if (cursor2 != null) {
            }
        }
        if (cursorRawQuery.moveToFirst()) {
            try {
                C4943 c4943 = (C4943) ((C4225) C1962.m5264(C4943.m10252(), cursorRawQuery.getBlob(0))).m9869();
                c1694.f18892.m6933();
                bundleM5260 = C1962.m5260(c4943.m10263());
                cursorRawQuery.close();
            } catch (IOException e3) {
                C3485 c34852 = c1103.f4729;
                C1103.m3564(c34852);
                c34852.f13423.m4475("Failed to retrieve default event parameters. appId", C3485.m7979(str), e3);
                if (cursorRawQuery != null) {
                }
                bundleM5260 = null;
            }
            c3335M6910.m7644(bundle, bundleM5260);
            C3335 c3335M69102 = m6910();
            C3691 c3691M6921 = m6921();
            c3691M6921.getClass();
            c3335M69102.m7647(c0536M2075, Math.max(Math.min(c3691M6921.m8310(str, AbstractC3818.f14481), 100), 25));
            c0357M2076 = c0536M2075.m2076();
            if (!m6921().m8314(null, AbstractC3818.f14509) && "_cmp".equals(c0357M2076.f2152)) {
                c3590 = c0357M2076.f2154;
                if ("referrer API v2".equals(c3590.f13694.getString("_cis"))) {
                    String string = c3590.f13694.getString("gclid");
                    if (!TextUtils.isEmpty(string)) {
                        m6919(new C0973(c0357M2076.f2155, string, "_lgclid", "auto"), c2847);
                    }
                }
            }
            m6939(c0357M2076, c2847);
        }
        C3485 c34853 = c1103.f4729;
        C1103.m3564(c34853);
        c34853.f13414.m4476("Default event parameters not found");
        if (cursorRawQuery != null) {
            cursorRawQuery.close();
        }
        bundleM5260 = null;
        c3335M6910.m7644(bundle, bundleM5260);
        C3335 c3335M691022 = m6910();
        C3691 c3691M69212 = m6921();
        c3691M69212.getClass();
        c3335M691022.m7647(c0536M2075, Math.max(Math.min(c3691M69212.m8310(str, AbstractC3818.f14481), 100), 25));
        c0357M2076 = c0536M2075.m2076();
        if (!m6921().m8314(null, AbstractC3818.f14509)) {
            c3590 = c0357M2076.f2154;
            if ("referrer API v2".equals(c3590.f13694.getString("_cis"))) {
            }
        }
        m6939(c0357M2076, c2847);
    }

    /* JADX INFO: renamed from: ˊᵾʽʼ, reason: contains not printable characters */
    public final boolean m6905(C4225 c4225, C4225 c42252) {
        ᵘᵞʿⁱ.ᵻˈᵦʼ("_e".equals(c4225.m9187()));
        m6933();
        C0114 c0114M5259 = C1962.m5259("_sc", (C4943) c4225.m9869());
        String strM1198 = c0114M5259 == null ? null : c0114M5259.m1198();
        m6933();
        C0114 c0114M52592 = C1962.m5259("_pc", (C4943) c42252.m9869());
        String strM11982 = c0114M52592 != null ? c0114M52592.m1198() : null;
        if (strM11982 == null || !strM11982.equals(strM1198)) {
            return false;
        }
        ᵘᵞʿⁱ.ᵻˈᵦʼ("_e".equals(c4225.m9187()));
        m6933();
        C0114 c0114M52593 = C1962.m5259("_et", (C4943) c4225.m9869());
        if (c0114M52593 == null || !c0114M52593.m1196() || c0114M52593.m1200() <= 0) {
            return true;
        }
        long jM1200 = c0114M52593.m1200();
        m6933();
        C0114 c0114M52594 = C1962.m5259("_et", (C4943) c42252.m9869());
        if (c0114M52594 != null && c0114M52594.m1200() > 0) {
            jM1200 += c0114M52594.m1200();
        }
        m6933();
        C1962.m5254(c42252, "_et", Long.valueOf(jM1200));
        m6933();
        C1962.m5254(c4225, "_fr", 1L);
        return true;
    }

    /* JADX INFO: renamed from: ˋʿᐧ, reason: contains not printable characters */
    public final void m6906(C3833 c3833, C2847 c2847) throws Throwable {
        ᵘᵞʿⁱ.ˊᵫᵗ(c3833.f14633);
        ᵘᵞʿⁱ.ᵶᵥᵝ(c3833.f14636);
        ᵘᵞʿⁱ.ˊᵫᵗ(c3833.f14636.f4262);
        mo3578().m5243();
        m6918();
        if (m6883(c2847)) {
            if (!c2847.f10911) {
                m6894(c2847);
                return;
            }
            C1694 c1694 = this.f11109;
            m6882(c1694);
            c1694.m4629();
            try {
                m6894(c2847);
                String str = c3833.f14633;
                ᵘᵞʿⁱ.ᵶᵥᵝ(str);
                C1694 c16942 = this.f11109;
                m6882(c16942);
                C3833 c3833M4619 = c16942.m4619(str, c3833.f14636.f4262);
                C1103 c1103 = this.f11114;
                if (c3833M4619 != null) {
                    mo3572().f13416.m4475("Removing conditional user property", c3833.f14633, c1103.f4717.m5502(c3833.f14636.f4262));
                    C1694 c16943 = this.f11109;
                    m6882(c16943);
                    c16943.m4584(str, c3833.f14636.f4262);
                    if (c3833M4619.f14639) {
                        C1694 c16944 = this.f11109;
                        m6882(c16944);
                        c16944.m4631(str, c3833.f14636.f4262);
                    }
                    C0357 c0357 = c3833.f14631;
                    if (c0357 != null) {
                        C3590 c3590 = c0357.f2154;
                        C0357 c0357M7659 = m6910().m7659(c0357.f2152, c3590 != null ? c3590.m8121() : null, c3833M4619.f14637, c0357.f2155, c0357.f2156, true);
                        ᵘᵞʿⁱ.ᵶᵥᵝ(c0357M7659);
                        m6935(c0357M7659, c2847);
                    }
                } else {
                    mo3572().f13424.m4475("Conditional user property doesn't exist", C3485.m7979(c3833.f14633), c1103.f4717.m5502(c3833.f14636.f4262));
                }
                C1694 c16945 = this.f11109;
                m6882(c16945);
                c16945.m4605();
                C1694 c16946 = this.f11109;
                m6882(c16946);
                c16946.m4630();
            } catch (Throwable th) {
                C1694 c16947 = this.f11109;
                m6882(c16947);
                c16947.m4630();
                throw th;
            }
        }
    }

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public final void m6907(C2019 c2019, C0542 c0542) {
        Serializable serializableM5258;
        mo3578().m5243();
        m6918();
        C2614 c2614M6427 = C2657.m6427();
        C1103 c1103 = c2019.f8027;
        C1961 c1961 = c1103.f4707;
        C1103.m3564(c1961);
        c1961.m5243();
        byte[] bArr = c2019.f7998;
        if (bArr != null) {
            try {
                c2614M6427 = (C2614) C1962.m5264(c2614M6427, bArr);
            } catch (zzaeh unused) {
                mo3572().f13424.m4474(C3485.m7979(c2019.m5415()), "Failed to parse locally stored ad campaign info. appId");
            }
        }
        Iterator it = c0542.m2110().iterator();
        while (it.hasNext()) {
            C4943 c4943 = (C4943) it.next();
            if (c4943.m10274().equals("_cmp")) {
                C0114 c0114M5259 = C1962.m5259("gclid", c4943);
                Serializable serializableM52582 = c0114M5259 == null ? null : C1962.m5258(c0114M5259);
                if (serializableM52582 == null) {
                    serializableM52582 = "";
                }
                String str = (String) serializableM52582;
                C0114 c0114M52592 = C1962.m5259("gbraid", c4943);
                Serializable serializableM52583 = c0114M52592 == null ? null : C1962.m5258(c0114M52592);
                if (serializableM52583 == null) {
                    serializableM52583 = "";
                }
                String str2 = (String) serializableM52583;
                C0114 c0114M52593 = C1962.m5259("gad_source", c4943);
                Serializable serializableM52584 = c0114M52593 == null ? null : C1962.m5258(c0114M52593);
                if (serializableM52584 == null) {
                    serializableM52584 = "";
                }
                String str3 = (String) serializableM52584;
                C0114 c0114M52594 = C1962.m5259("deep_link_url", c4943);
                Serializable serializableM52585 = c0114M52594 == null ? null : C1962.m5258(c0114M52594);
                String str4 = (String) (serializableM52585 != null ? serializableM52585 : "");
                String[] strArrSplit = ((String) AbstractC3818.f14503.m1988(null)).split(",");
                m6933();
                HashMap map = new HashMap();
                for (C0114 c0114 : c4943.m10263()) {
                    Iterator it2 = it;
                    if (Arrays.asList(strArrSplit).contains(c0114.m1189()) && (serializableM5258 = C1962.m5258(c0114)) != null) {
                        map.put(c0114.m1189(), serializableM5258);
                    }
                    it = it2;
                }
                Iterator it3 = it;
                if (!map.isEmpty()) {
                    C0114 c0114M52595 = C1962.m5259("click_timestamp", c4943);
                    Serializable serializableM52586 = c0114M52595 == null ? null : C1962.m5258(c0114M52595);
                    long jLongValue = ((Long) (serializableM52586 != null ? serializableM52586 : 0L)).longValue();
                    if (jLongValue <= 0) {
                        jLongValue = c4943.m10277();
                    }
                    long j = jLongValue;
                    C0114 c0114M52596 = C1962.m5259("_cis", c4943);
                    if ("referrer API v2".equals(c0114M52596 == null ? null : C1962.m5258(c0114M52596))) {
                        if (j > ((C2657) c2614M6427.f17955).m6431()) {
                            if (str.isEmpty()) {
                                c2614M6427.m9868();
                                ((C2657) c2614M6427.f17955).m6455();
                            } else {
                                c2614M6427.m9868();
                                ((C2657) c2614M6427.f17955).m6446(str);
                            }
                            if (str2.isEmpty()) {
                                c2614M6427.m9868();
                                ((C2657) c2614M6427.f17955).m6460();
                            } else {
                                c2614M6427.m9868();
                                ((C2657) c2614M6427.f17955).m6452(str2);
                            }
                            if (str3.isEmpty()) {
                                c2614M6427.m9868();
                                ((C2657) c2614M6427.f17955).m6463();
                            } else {
                                c2614M6427.m9868();
                                ((C2657) c2614M6427.f17955).m6461(str3);
                            }
                            c2614M6427.m9868();
                            ((C2657) c2614M6427.f17955).m6436(j);
                            c2614M6427.m9868();
                            ((C2657) c2614M6427.f17955).m6464().clear();
                            HashMap mapM6925 = m6925(c4943);
                            c2614M6427.m9868();
                            ((C2657) c2614M6427.f17955).m6464().putAll(mapM6925);
                        }
                    } else if (j > ((C2657) c2614M6427.f17955).m6462()) {
                        if (str.isEmpty()) {
                            c2614M6427.m9868();
                            ((C2657) c2614M6427.f17955).m6444();
                        } else {
                            c2614M6427.m9868();
                            ((C2657) c2614M6427.f17955).m6458(str);
                        }
                        if (str2.isEmpty()) {
                            c2614M6427.m9868();
                            ((C2657) c2614M6427.f17955).m6435();
                        } else {
                            c2614M6427.m9868();
                            ((C2657) c2614M6427.f17955).m6438(str2);
                        }
                        if (str3.isEmpty()) {
                            c2614M6427.m9868();
                            ((C2657) c2614M6427.f17955).m6448();
                        } else {
                            c2614M6427.m9868();
                            ((C2657) c2614M6427.f17955).m6445(str3);
                        }
                        if (m6921().m8314(null, AbstractC3818.f14523)) {
                            if (str4.isEmpty()) {
                                c2614M6427.m9868();
                                ((C2657) c2614M6427.f17955).m6430();
                            } else {
                                c2614M6427.m9868();
                                ((C2657) c2614M6427.f17955).m6451(str4);
                            }
                        }
                        c2614M6427.m9868();
                        ((C2657) c2614M6427.f17955).m6442(j);
                        c2614M6427.m9868();
                        ((C2657) c2614M6427.f17955).m6447().clear();
                        HashMap mapM69252 = m6925(c4943);
                        c2614M6427.m9868();
                        ((C2657) c2614M6427.f17955).m6447().putAll(mapM69252);
                    }
                }
                it = it3;
            }
        }
        if (!((C2657) c2614M6427.m9869()).equals(C2657.m6428())) {
            C2657 c2657 = (C2657) c2614M6427.m9869();
            c0542.m9868();
            ((C5090) c0542.f17955).m10443(c2657);
        }
        byte[] bArrM7714 = ((C2657) c2614M6427.m9869()).m7714();
        C1961 c19612 = c1103.f4707;
        C1103.m3564(c19612);
        c19612.m5243();
        c2019.f8019 |= c2019.f7998 != bArrM7714;
        c2019.f7998 = bArrM7714;
        if (c2019.m5426()) {
            C1694 c1694 = this.f11109;
            m6882(c1694);
            c1694.m4624(c2019, false);
        }
        if (m6921().m8314(null, AbstractC3818.f14523)) {
            for (int i = 0; i < c0542.m2084(); i++) {
                C4943 c4943M10553 = ((C5090) c0542.f17955).m10553(i);
                if ("_cmp".equals(c4943M10553.m10274())) {
                    C4225 c4225 = (C4225) c4943M10553.m9884();
                    List listM9191 = c4225.m9191();
                    int i2 = 0;
                    while (true) {
                        if (i2 >= listM9191.size()) {
                            break;
                        }
                        if ("deep_link_url".equals(((C0114) listM9191.get(i2)).m1189())) {
                            c4225.m9180(i2);
                            c0542.m2117(i, c4225);
                            break;
                        }
                        i2++;
                    }
                }
            }
        }
        if (m6921().m8314(null, AbstractC3818.f14509)) {
            C1694 c16942 = this.f11109;
            m6882(c16942);
            c16942.m4631(c2019.m5415(), "_lgclid");
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r0v2, types: [java.util.ArrayList] */
    /* JADX WARN: Type inference failed for: r0v4, types: [java.util.List] */
    /* JADX WARN: Type inference failed for: r0v6, types: [java.util.List] */
    /* JADX INFO: renamed from: ˋᵯᵩ, reason: contains not printable characters */
    public final List m6908(Bundle bundle, C2847 c2847) {
        int[] iArr;
        mo3578().m5243();
        C0756.m2702();
        C3691 c3691M6921 = m6921();
        String str = c2847.f10910;
        if (!c3691M6921.m8314(str, AbstractC3818.f14557) || str == null) {
            return new ArrayList();
        }
        if (bundle != null) {
            int[] intArray = bundle.getIntArray("uriSources");
            long[] longArray = bundle.getLongArray("uriTimestamps");
            if (intArray != null) {
                if (longArray == null || longArray.length != intArray.length) {
                    mo3572().f13423.m4476("Uri sources and timestamps do not match");
                } else {
                    int i = 0;
                    while (i < intArray.length) {
                        C1694 c1694 = this.f11109;
                        m6882(c1694);
                        C1103 c1103 = (C1103) ((ᵜᵪʾ) c1694).ˌᴵ;
                        int i2 = intArray[i];
                        long j = longArray[i];
                        ᵘᵞʿⁱ.ˊᵫᵗ(str);
                        c1694.ˈᵲᵢ();
                        c1694.m5026();
                        try {
                            iArr = intArray;
                        } catch (SQLiteException e) {
                            e = e;
                            iArr = intArray;
                        }
                        try {
                            int iDelete = c1694.m4625().delete("trigger_uris", "app_id=? and source=? and timestamp_millis<=?", new String[]{str, String.valueOf(i2), String.valueOf(j)});
                            C3485 c3485 = c1103.f4729;
                            C1103.m3564(c3485);
                            C1623 c1623 = c3485.f13414;
                            StringBuilder sb = new StringBuilder(String.valueOf(iDelete).length() + 46);
                            sb.append("Pruned ");
                            sb.append(iDelete);
                            sb.append(" trigger URIs. appId, source, timestamp");
                            c1623.m4477(sb.toString(), str, Integer.valueOf(i2), Long.valueOf(j));
                        } catch (SQLiteException e2) {
                            e = e2;
                            C3485 c34852 = c1103.f4729;
                            C1103.m3564(c34852);
                            c34852.f13423.m4475("Error pruning trigger URIs. appId", C3485.m7979(str), e);
                        }
                        i++;
                        intArray = iArr;
                    }
                }
            }
        }
        C1694 c16942 = this.f11109;
        m6882(c16942);
        String str2 = c2847.f10910;
        ᵘᵞʿⁱ.ˊᵫᵗ(str2);
        c16942.ˈᵲᵢ();
        c16942.m5026();
        ?? arrayList = new ArrayList();
        Cursor cursorQuery = null;
        try {
            try {
                cursorQuery = c16942.m4625().query("trigger_uris", new String[]{"trigger_uri", "timestamp_millis", "source"}, "app_id=?", new String[]{str2}, null, null, "rowid", null);
                if (cursorQuery.moveToFirst()) {
                    do {
                        String string = cursorQuery.getString(0);
                        if (string == null) {
                            string = "";
                        }
                        arrayList.add(new C2004(cursorQuery.getLong(1), cursorQuery.getInt(2), string));
                    } while (cursorQuery.moveToNext());
                }
            } catch (Throwable th) {
                if (cursorQuery != null) {
                    cursorQuery.close();
                }
                throw th;
            }
        } catch (SQLiteException e3) {
            C3485 c34853 = ((C1103) ((ᵜᵪʾ) c16942).ˌᴵ).f4729;
            C1103.m3564(c34853);
            c34853.f13423.m4475("Error querying trigger uris. appId", C3485.m7979(str2), e3);
            arrayList = Collections.EMPTY_LIST;
        }
        if (cursorQuery != null) {
            cursorQuery.close();
        }
        return arrayList;
    }

    /* JADX WARN: Removed duplicated region for block: B:40:0x011f  */
    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m6909(String str, C0542 c0542) throws Throwable {
        int iM5256;
        int iIndexOf;
        C1811 c1811 = this.f11104;
        m6882(c1811);
        c1811.ˈᵲᵢ();
        c1811.m4962(str);
        C3310 c3310 = c1811.f7229;
        Set set = (Set) c3310.get(str);
        if (set != null) {
            c0542.m9868();
            ((C5090) c0542.f17955).m10557(set);
        }
        m6882(c1811);
        c1811.ˈᵲᵢ();
        c1811.m4962(str);
        if (c3310.get(str) != null && (((Set) c3310.get(str)).contains("device_model") || ((Set) c3310.get(str)).contains("device_info"))) {
            c0542.m9868();
            ((C5090) c0542.f17955).m10519();
        }
        m6882(c1811);
        if (c1811.m4959(str)) {
            String strM10563 = ((C5090) c0542.f17955).m10563();
            if (!TextUtils.isEmpty(strM10563) && (iIndexOf = strM10563.indexOf(".")) != -1) {
                String strSubstring = strM10563.substring(0, iIndexOf);
                c0542.m9868();
                ((C5090) c0542.f17955).m10534(strSubstring);
            }
        }
        m6882(c1811);
        c1811.ˈᵲᵢ();
        c1811.m4962(str);
        if (c3310.get(str) != null && ((Set) c3310.get(str)).contains("user_id") && (iM5256 = C1962.m5256("_id", c0542)) != -1) {
            c0542.m9868();
            ((C5090) c0542.f17955).m10541(iM5256);
        }
        m6882(c1811);
        c1811.ˈᵲᵢ();
        c1811.m4962(str);
        if (c3310.get(str) != null && ((Set) c3310.get(str)).contains("google_signals")) {
            c0542.m9868();
            ((C5090) c0542.f17955).m10556();
        }
        m6882(c1811);
        if (c1811.m4957(str)) {
            c0542.m9868();
            ((C5090) c0542.f17955).m10454();
            if (m6888(str).m3073(EnumC0174.f1598)) {
                HashMap map = this.f11089;
                C0271 c0271 = (C0271) map.get(str);
                if (c0271 != null) {
                    long jM8305 = m6921().m8305(str, AbstractC3818.f14561) + c0271.f1887;
                    mo3579().getClass();
                    if (jM8305 < SystemClock.elapsedRealtime()) {
                        c0271 = new C0271(this, m6910().m7651());
                        map.put(str, c0271);
                    }
                    String str2 = c0271.f1888;
                    c0542.m9868();
                    ((C5090) c0542.f17955).m10525(str2);
                }
            }
        }
        m6882(c1811);
        c1811.ˈᵲᵢ();
        c1811.m4962(str);
        if (c3310.get(str) == null || !((Set) c3310.get(str)).contains("enhanced_user_id")) {
            return;
        }
        c0542.m9868();
        ((C5090) c0542.f17955).m10536();
    }

    /* JADX INFO: renamed from: ˏʜᵪ, reason: contains not printable characters */
    public final C3335 m6910() {
        C1103 c1103 = this.f11114;
        ᵘᵞʿⁱ.ᵶᵥᵝ(c1103);
        C3335 c3335 = c1103.f4730;
        C1103.m3567(c3335);
        return c3335;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference failed for: r12v2 */
    /* JADX WARN: Type inference failed for: r12v6 */
    /* JADX WARN: Type inference failed for: r12v7 */
    /* JADX INFO: renamed from: ˏʽˊᵰ, reason: contains not printable characters */
    public final Bundle m6911(String str) throws Throwable {
        mo3578().m5243();
        m6918();
        C1811 c1811 = this.f11104;
        m6882(c1811);
        if (c1811.m4967(str) == null) {
            return null;
        }
        Bundle bundle = new Bundle();
        C0875 c0875M6888 = m6888(str);
        Bundle bundle2 = new Bundle();
        Iterator it = c0875M6888.f3873.entrySet().iterator();
        while (true) {
            if (!it.hasNext()) {
                break;
            }
            Map.Entry entry = (Map.Entry) it.next();
            int iOrdinal = ((EnumC3695) entry.getValue()).ordinal();
            String str2 = iOrdinal != 2 ? iOrdinal != 3 ? null : "granted" : "denied";
            if (str2 != null) {
                bundle2.putString(((EnumC0174) entry.getKey()).f1603, str2);
            }
        }
        bundle.putAll(bundle2);
        C1102 c1102M6936 = m6936(str, m6934(str), c0875M6888, new C2198(6));
        Bundle bundle3 = new Bundle();
        for (Map.Entry entry2 : c1102M6936.f4696.entrySet()) {
            int iOrdinal2 = ((EnumC3695) entry2.getValue()).ordinal();
            String str3 = iOrdinal2 != 2 ? iOrdinal2 != 3 ? null : "granted" : "denied";
            if (str3 != null) {
                bundle3.putString(((EnumC0174) entry2.getKey()).f1603, str3);
            }
        }
        Boolean bool = c1102M6936.f4695;
        if (bool != null) {
            bundle3.putString("is_dma_region", bool.toString());
        }
        String str4 = c1102M6936.f4698;
        if (str4 != null) {
            bundle3.putString("cps_display_str", str4);
        }
        bundle.putAll(bundle3);
        C1694 c1694 = this.f11109;
        m6882(c1694);
        C4922 c4922M4608 = c1694.m4608(str, "_npa");
        bundle.putString("ad_personalization", 1 != (c4922M4608 != null ? c4922M4608.f18719.equals(1L) : m6890(str, new C2198(6))) ? "granted" : "denied");
        return bundle;
    }

    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public final void m6912(String str) throws Throwable {
        C2894 c2894;
        Throwable th;
        mo3578().m5243();
        m6918();
        this.f11096 = true;
        try {
            C1103 c1103 = this.f11114;
            c1103.getClass();
            Boolean bool = c1103.m3573().f6479;
            try {
                if (bool == null) {
                    mo3572().f13424.m4476("Upload data called on the client side before use of service was decided");
                } else if (bool.booleanValue()) {
                    mo3572().f13423.m4476("Upload called in the client side when service should be used");
                } else if (this.f11091 > 0) {
                    m6940();
                } else {
                    try {
                        C5004 c5004 = this.f11112;
                        m6882(c5004);
                        if (c5004.m10343()) {
                            C1694 c1694 = this.f11109;
                            m6882(c1694);
                            if (c1694.m4595(str)) {
                                C1694 c16942 = this.f11109;
                                m6882(c16942);
                                ᵘᵞʿⁱ.ˊᵫᵗ(str);
                                c16942.ˈᵲᵢ();
                                c16942.m5026();
                                List listM4618 = c16942.m4618(str, C4920.m10221(EnumC4563.f17345), 1);
                                C0399 c0399 = listM4618.isEmpty() ? null : (C0399) listM4618.get(0);
                                if (c0399 != null) {
                                    C1027 c1027 = c0399.f2263;
                                    mo3572().f13414.m4477("[sgtm] Uploading data from upload queue. appId, type, url", str, c0399.f2266, c0399.f2265);
                                    byte[] bArrM7714 = c1027.m7714();
                                    if (Log.isLoggable(mo3572().m7985(), 2)) {
                                        C1962 c1962 = this.f11095;
                                        m6882(c1962);
                                        mo3572().f13414.m4477("[sgtm] Uploading data from upload queue. appId, uncompressed size, data", str, Integer.valueOf(bArrM7714.length), c1962.m5278(c1027));
                                    }
                                    C2788 c2788 = new C2788(c0399.f2265, c0399.f2269, c0399.f2266, null);
                                    this.f11087 = true;
                                    C5004 c50042 = this.f11112;
                                    m6882(c50042);
                                    c2894 = this;
                                    try {
                                        c50042.m10344(str, c2788, c1027, new C2994(12, c2894, str, c0399, false));
                                    } catch (Throwable th2) {
                                        th = th2;
                                        th = th;
                                        c2894.f11096 = false;
                                        c2894.m6915();
                                        throw th;
                                    }
                                }
                                c2894.f11096 = false;
                                c2894.m6915();
                            }
                            mo3572().f13414.m4474(str, "[sgtm] Upload queue has no batches for appId");
                        } else {
                            mo3572().f13414.m4476("Network not connected, ignoring upload request");
                            m6940();
                        }
                    } catch (Throwable th3) {
                        c2894 = this;
                        th = th3;
                        c2894.f11096 = false;
                        c2894.m6915();
                        throw th;
                    }
                }
                c2894 = this;
                c2894.f11096 = false;
                c2894.m6915();
            } catch (Throwable th4) {
                th = th4;
                c2894 = this;
            }
        } catch (Throwable th5) {
            th = th5;
            c2894 = this;
        }
    }

    /* JADX INFO: renamed from: ˏᵩʨ, reason: contains not printable characters */
    public final void m6913() {
        mo3578().m5243();
        m6918();
        if (this.f11093) {
            return;
        }
        this.f11093 = true;
        mo3578().m5243();
        FileLock fileLock = this.f11117;
        C1103 c1103 = this.f11114;
        if (fileLock == null || !fileLock.isValid()) {
            ((C1103) ((ᵜᵪʾ) this.f11109).ˌᴵ).getClass();
            try {
                FileChannel channel = new RandomAccessFile(new File(new File(c1103.f4713.getFilesDir(), "google_app_measurement.db").getPath()), "rw").getChannel();
                this.f11113 = channel;
                FileLock fileLockTryLock = channel.tryLock();
                this.f11117 = fileLockTryLock;
                if (fileLockTryLock == null) {
                    mo3572().f13423.m4476("Storage concurrent data access panic");
                    return;
                }
                mo3572().f13414.m4476("Storage concurrent access okay");
            } catch (FileNotFoundException e) {
                mo3572().f13423.m4474(e, "Failed to acquire storage lock");
                return;
            } catch (IOException e2) {
                mo3572().f13423.m4474(e2, "Failed to access storage lock file");
                return;
            } catch (OverlappingFileLockException e3) {
                mo3572().f13424.m4474(e3, "Storage lock already acquired");
                return;
            }
        } else {
            mo3572().f13414.m4476("Storage concurrent access okay");
        }
        FileChannel fileChannel = this.f11113;
        mo3578().m5243();
        int i = 0;
        if (fileChannel == null || !fileChannel.isOpen()) {
            mo3572().f13423.m4476("Bad channel to read from");
        } else {
            ByteBuffer byteBufferAllocate = ByteBuffer.allocate(4);
            try {
                fileChannel.position(0L);
                int i2 = fileChannel.read(byteBufferAllocate);
                if (i2 == 4) {
                    byteBufferAllocate.flip();
                    i = byteBufferAllocate.getInt();
                } else if (i2 != -1) {
                    mo3572().f13424.m4474(Integer.valueOf(i2), "Unexpected data length. Bytes read");
                }
            } catch (IOException e4) {
                mo3572().f13423.m4474(e4, "Failed to read from channel");
            }
        }
        C2303 c2303M3569 = c1103.m3569();
        c2303M3569.m5699();
        int i3 = c2303M3569.f9061;
        mo3578().m5243();
        if (i > i3) {
            mo3572().f13423.m4475("Panic: can't downgrade version. Previous, current version", Integer.valueOf(i), Integer.valueOf(i3));
            return;
        }
        if (i < i3) {
            FileChannel fileChannel2 = this.f11113;
            mo3578().m5243();
            if (fileChannel2 == null || !fileChannel2.isOpen()) {
                mo3572().f13423.m4476("Bad channel to read from");
            } else {
                ByteBuffer byteBufferAllocate2 = ByteBuffer.allocate(4);
                byteBufferAllocate2.putInt(i3);
                byteBufferAllocate2.flip();
                try {
                    fileChannel2.truncate(0L);
                    fileChannel2.write(byteBufferAllocate2);
                    fileChannel2.force(true);
                    if (fileChannel2.size() != 4) {
                        mo3572().f13423.m4474(Long.valueOf(fileChannel2.size()), "Error writing to channel. Bytes written");
                    }
                    mo3572().f13414.m4475("Storage version upgraded. Previous, current version", Integer.valueOf(i), Integer.valueOf(i3));
                    return;
                } catch (IOException e5) {
                    mo3572().f13423.m4474(e5, "Failed to write to channel");
                }
            }
            mo3572().f13423.m4475("Storage version upgrade failed. Previous, current version", Integer.valueOf(i), Integer.valueOf(i3));
        }
    }

    @Override // defpackage.InterfaceC1959
    /* JADX INFO: renamed from: ːˏᵟᵯ */
    public final C3485 mo3572() {
        C1103 c1103 = this.f11114;
        ᵘᵞʿⁱ.ᵶᵥᵝ(c1103);
        C3485 c3485 = c1103.f4729;
        C1103.m3564(c3485);
        return c3485;
    }

    /* JADX INFO: renamed from: ːᵝٴᵶ, reason: contains not printable characters */
    public final C1811 m6914() {
        C1811 c1811 = this.f11104;
        m6882(c1811);
        return c1811;
    }

    /* JADX INFO: renamed from: ˑʢ, reason: contains not printable characters */
    public final void m6915() {
        mo3578().m5243();
        if (this.f11107 || this.f11087 || this.f11096) {
            mo3572().f13414.m4477("Not stopping services. fetch, network, upload", Boolean.valueOf(this.f11107), Boolean.valueOf(this.f11087), Boolean.valueOf(this.f11096));
            return;
        }
        mo3572().f13414.m4476("Stopping uploading service(s)");
        ArrayList arrayList = this.f11101;
        if (arrayList == null) {
            return;
        }
        int size = arrayList.size();
        int i = 0;
        while (i < size) {
            Object obj = arrayList.get(i);
            i++;
            ((Runnable) obj).run();
        }
        ArrayList arrayList2 = this.f11101;
        ᵘᵞʿⁱ.ᵶᵥᵝ(arrayList2);
        arrayList2.clear();
    }

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final void m6916(String str, C2545 c2545, Bundle bundle, String str2) {
        int iM8315;
        List list = m6921().m8314(str2, AbstractC3818.f14523) ? ᵴᵧˈ.ᵪᵹᵥᵻ(new String[]{"_o", "_sn", "_sc", "_si", "deep_link_url"}) : ᵴᵧˈ.ᵪᵹᵥᵻ(new String[]{"_o", "_sn", "_sc", "_si"});
        if (C3335.m7615(((C0114) c2545.f17955).m1189()) || C3335.m7615(str)) {
            iM8315 = m6921().m8315(str2, true);
        } else {
            C3691 c3691M6921 = m6921();
            c3691M6921.getClass();
            iM8315 = Math.max(Math.min(c3691M6921.m8310(str2, AbstractC3818.f14530), 500), 100);
        }
        long j = iM8315;
        long jCodePointCount = ((C0114) c2545.f17955).m1198().codePointCount(0, ((C0114) c2545.f17955).m1198().length());
        m6910();
        String strM1189 = ((C0114) c2545.f17955).m1189();
        m6921();
        String strM7608 = C3335.m7608(40, strM1189, true);
        if (jCodePointCount <= j || list.contains(((C0114) c2545.f17955).m1189())) {
            return;
        }
        if ("_ev".equals(((C0114) c2545.f17955).m1189())) {
            m6910();
            bundle.putString("_ev", C3335.m7608(m6921().m8315(str2, true), ((C0114) c2545.f17955).m1198(), true));
            return;
        }
        mo3572().f13413.m4475("Param value is too long; discarded. Name, value length", strM7608, Long.valueOf(jCodePointCount));
        if (bundle.getLong("_err") == 0) {
            bundle.putLong("_err", 4L);
            if (bundle.getString("_ev") == null) {
                bundle.putString("_ev", strM7608);
                bundle.putLong("_el", jCodePointCount);
            }
        }
        bundle.remove(((C0114) c2545.f17955).m1189());
    }

    /* JADX INFO: renamed from: ᵗᵭ, reason: contains not printable characters */
    public final C1694 m6917() {
        C1694 c1694 = this.f11109;
        m6882(c1694);
        return c1694;
    }

    /* JADX INFO: renamed from: ᵘᵝ, reason: contains not printable characters */
    public final void m6918() {
        if (this.f11098.get()) {
            return;
        }
        ᵕᵩʽᵲ.ᵪᵹᵥᵻ("UploadController is not initialized");
    }

    /* JADX WARN: Removed duplicated region for block: B:39:0x00cd  */
    /* JADX INFO: renamed from: ᵛˀˊ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m6919(C0973 c0973, C2847 c2847) throws Throwable {
        String str;
        long jLongValue;
        mo3578().m5243();
        m6918();
        boolean zM6883 = m6883(c2847);
        String str2 = c2847.f10910;
        if (zM6883) {
            if (!c2847.f10911) {
                m6894(c2847);
                return;
            }
            C3335 c3335M6910 = m6910();
            String str3 = c0973.f4262;
            int iM7654 = c3335M6910.m7654(str3);
            C3031 c3031 = this.f11103;
            if (iM7654 != 0) {
                m6910();
                m6921();
                String strM7608 = C3335.m7608(24, str3, true);
                int length = str3 != null ? str3.length() : 0;
                m6910();
                C3335.m7610(c3031, c2847.f10910, iM7654, "_ev", strM7608, length);
                return;
            }
            int iM7633 = m6910().m7633(c0973.m3298(), str3);
            if (iM7633 != 0) {
                m6910();
                m6921();
                String strM76082 = C3335.m7608(24, str3, true);
                Object objM3298 = c0973.m3298();
                int length2 = (objM3298 == null || !((objM3298 instanceof String) || (objM3298 instanceof CharSequence))) ? 0 : objM3298.toString().length();
                m6910();
                C3335.m7610(c3031, c2847.f10910, iM7633, "_ev", strM76082, length2);
                return;
            }
            Object objM7657 = m6910().m7657(c0973.m3298(), str3);
            if (objM7657 != null) {
                if ("_sid".equals(str3)) {
                    long j = c0973.f4261;
                    String str4 = c0973.f4265;
                    ᵘᵞʿⁱ.ᵶᵥᵝ(str2);
                    C1694 c1694 = this.f11109;
                    m6882(c1694);
                    C4922 c4922M4608 = c1694.m4608(str2, "_sno");
                    if (c4922M4608 != null) {
                        Object obj = c4922M4608.f18719;
                        if (obj instanceof Long) {
                            jLongValue = ((Long) obj).longValue();
                            str = "_sid";
                        } else {
                            if (c4922M4608 != null) {
                                mo3572().f13424.m4474(c4922M4608.f18719, "Retrieved last session number from database does not contain a valid (long) value");
                            }
                            C1694 c16942 = this.f11109;
                            m6882(c16942);
                            C3711 c3711M4601 = c16942.m4601("events", str2, "_s");
                            if (c3711M4601 != null) {
                                C1623 c1623 = mo3572().f13414;
                                str = "_sid";
                                long j2 = c3711M4601.f14130;
                                c1623.m4474(Long.valueOf(j2), "Backfill the session number. Last used session number");
                                jLongValue = j2;
                            } else {
                                str = "_sid";
                                jLongValue = 0;
                            }
                        }
                        m6919(new C0973(j, Long.valueOf(jLongValue + 1), "_sno", str4), c2847);
                    }
                } else {
                    str = "_sid";
                }
                ᵘᵞʿⁱ.ᵶᵥᵝ(str2);
                String str5 = c0973.f4265;
                ᵘᵞʿⁱ.ᵶᵥᵝ(str5);
                C4922 c4922 = new C4922(str2, str5, str3, c0973.f4261, objM7657);
                C1623 c16232 = mo3572().f13414;
                C1103 c1103 = this.f11114;
                C2063 c2063 = c1103.f4717;
                String str6 = c4922.f18718;
                c16232.m4475("Setting user property", c2063.m5502(str6), objM7657);
                C1694 c16943 = this.f11109;
                m6882(c16943);
                c16943.m4629();
                try {
                    boolean zEquals = "_id".equals(str6);
                    Object obj2 = c4922.f18719;
                    if (zEquals) {
                        C1694 c16944 = this.f11109;
                        m6882(c16944);
                        C4922 c4922M46082 = c16944.m4608(str2, "_id");
                        if (c4922M46082 != null && !obj2.equals(c4922M46082.f18719)) {
                            C1694 c16945 = this.f11109;
                            m6882(c16945);
                            c16945.m4631(str2, "_lair");
                        }
                    }
                    m6894(c2847);
                    C1694 c16946 = this.f11109;
                    m6882(c16946);
                    boolean zM4581 = c16946.m4581(c4922);
                    if (str.equals(str3)) {
                        C1962 c1962 = this.f11095;
                        m6882(c1962);
                        String str7 = c2847.f10897;
                        long jM5287 = TextUtils.isEmpty(str7) ? 0L : c1962.m5287(str7.getBytes(StandardCharsets.UTF_8));
                        C1694 c16947 = this.f11109;
                        m6882(c16947);
                        C2019 c2019M4596 = c16947.m4596(str2);
                        if (c2019M4596 != null) {
                            c2019M4596.m5399(jM5287);
                            if (c2019M4596.m5426()) {
                                C1694 c16948 = this.f11109;
                                m6882(c16948);
                                c16948.m4624(c2019M4596, false);
                            }
                        }
                    }
                    C1694 c16949 = this.f11109;
                    m6882(c16949);
                    c16949.m4605();
                    if (!zM4581) {
                        mo3572().f13423.m4475("Too many unique user properties are set. Ignoring user property", c1103.f4717.m5502(str6), obj2);
                        m6910();
                        C3335.m7610(c3031, str2, 9, null, null, 0);
                    }
                    C1694 c169410 = this.f11109;
                    m6882(c169410);
                    c169410.m4630();
                } catch (Throwable th) {
                    C1694 c169411 = this.f11109;
                    m6882(c169411);
                    c169411.m4630();
                    throw th;
                }
            }
        }
    }

    /* JADX INFO: renamed from: ᵛˑﹳ, reason: contains not printable characters */
    public final boolean m6920() {
        mo3578().m5243();
        m6918();
        C1694 c1694 = this.f11109;
        m6882(c1694);
        if (c1694.m4613("select count(1) > 0 from raw_events", null) != 0) {
            return true;
        }
        C1694 c16942 = this.f11109;
        m6882(c16942);
        return !TextUtils.isEmpty(c16942.m4586());
    }

    /* JADX INFO: renamed from: ᵜᵤ, reason: contains not printable characters */
    public final C3691 m6921() {
        C1103 c1103 = this.f11114;
        ᵘᵞʿⁱ.ᵶᵥᵝ(c1103);
        return c1103.f4726;
    }

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final void m6922(C0542 c0542, C5227 c5227) {
        String strM7651;
        String strM76512;
        for (int i = 0; i < c0542.m2084(); i++) {
            C4225 c4225 = (C4225) ((C5090) c0542.f17955).m10553(i).m9884();
            Iterator it = c4225.m9191().iterator();
            while (true) {
                if (!it.hasNext()) {
                    break;
                }
                if ("_c".equals(((C0114) it.next()).m1189())) {
                    if (((C5090) c5227.f19712).m10465() >= m6921().m8310(((C5090) c5227.f19712).m10481(), AbstractC3818.f14516)) {
                        int iM8310 = m6921().m8310(((C5090) c5227.f19712).m10481(), AbstractC3818.f14540);
                        LinkedList linkedList = this.f11100;
                        C1962 c1962 = this.f11095;
                        if (iM8310 > 0) {
                            C1694 c1694 = this.f11109;
                            m6882(c1694);
                            if (c1694.m4611(m6929(), ((C5090) c5227.f19712).m10481(), false, false, false, true).f1723 > iM8310) {
                                C2545 c2545M1181 = C0114.m1181();
                                c2545M1181.m6263("_tnr");
                                c2545M1181.m6262(1L);
                                c4225.m9188((C0114) c2545M1181.m9869());
                            } else {
                                if (m6921().m8314(((C5090) c5227.f19712).m10481(), AbstractC3818.f14558)) {
                                    strM76512 = m6910().m7651();
                                    C2545 c2545M11812 = C0114.m1181();
                                    c2545M11812.m6263("_tu");
                                    c2545M11812.m6261(strM76512);
                                    c4225.m9188((C0114) c2545M11812.m9869());
                                } else {
                                    strM76512 = null;
                                }
                                C2545 c2545M11813 = C0114.m1181();
                                c2545M11813.m6263("_tr");
                                c2545M11813.m6262(1L);
                                c4225.m9188((C0114) c2545M11813.m9869());
                                m6882(c1962);
                                C2004 c2004M5285 = c1962.m5285(((C5090) c5227.f19712).m10481(), c0542, c4225, strM76512);
                                if (c2004M5285 != null) {
                                    mo3572().f13414.m4475("Generated trigger URI. appId, uri", ((C5090) c5227.f19712).m10481(), c2004M5285.f7925);
                                    C1694 c16942 = this.f11109;
                                    m6882(c16942);
                                    c16942.m4606(((C5090) c5227.f19712).m10481(), c2004M5285);
                                    if (!linkedList.contains(((C5090) c5227.f19712).m10481())) {
                                        linkedList.add(((C5090) c5227.f19712).m10481());
                                    }
                                }
                            }
                        } else {
                            if (m6921().m8314(((C5090) c5227.f19712).m10481(), AbstractC3818.f14558)) {
                                strM7651 = m6910().m7651();
                                C2545 c2545M11814 = C0114.m1181();
                                c2545M11814.m6263("_tu");
                                c2545M11814.m6261(strM7651);
                                c4225.m9188((C0114) c2545M11814.m9869());
                            } else {
                                strM7651 = null;
                            }
                            C2545 c2545M11815 = C0114.m1181();
                            c2545M11815.m6263("_tr");
                            c2545M11815.m6262(1L);
                            c4225.m9188((C0114) c2545M11815.m9869());
                            m6882(c1962);
                            C2004 c2004M52852 = c1962.m5285(((C5090) c5227.f19712).m10481(), c0542, c4225, strM7651);
                            if (c2004M52852 != null) {
                                mo3572().f13414.m4475("Generated trigger URI. appId, uri", ((C5090) c5227.f19712).m10481(), c2004M52852.f7925);
                                C1694 c16943 = this.f11109;
                                m6882(c16943);
                                c16943.m4606(((C5090) c5227.f19712).m10481(), c2004M52852);
                                if (!linkedList.contains(((C5090) c5227.f19712).m10481())) {
                                    linkedList.add(((C5090) c5227.f19712).m10481());
                                }
                            }
                        }
                    }
                    C4943 c4943 = (C4943) c4225.m9869();
                    c0542.m9868();
                    ((C5090) c0542.f17955).m10463(i, c4943);
                }
            }
        }
    }

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public final void m6923(C2019 c2019, C0542 c0542) throws Throwable {
        C2198 c2198;
        C4822 c4822;
        EnumC4518 enumC4518;
        mo3578().m5243();
        m6918();
        String strM10453 = ((C5090) c0542.f17955).m10453();
        EnumMap enumMap = new EnumMap(EnumC0174.class);
        int length = strM10453.length();
        int length2 = EnumC0174.values().length;
        EnumC4518 enumC45182 = EnumC4518.UNSET;
        int i = 0;
        if (length < length2 || strM10453.charAt(0) != '1') {
            c2198 = new C2198(6);
        } else {
            EnumC0174[] enumC0174ArrValues = EnumC0174.values();
            int length3 = enumC0174ArrValues.length;
            int i2 = 0;
            int i3 = 1;
            while (i2 < length3) {
                EnumC0174 enumC0174 = enumC0174ArrValues[i2];
                int i4 = i3 + 1;
                char cCharAt = strM10453.charAt(i3);
                EnumC4518[] enumC4518ArrValues = EnumC4518.values();
                int length4 = enumC4518ArrValues.length;
                int i5 = i;
                while (true) {
                    if (i5 >= length4) {
                        enumC4518 = enumC45182;
                        break;
                    }
                    enumC4518 = enumC4518ArrValues[i5];
                    if (enumC4518.f17193 == cCharAt) {
                        break;
                    } else {
                        i5++;
                    }
                }
                enumMap.put(enumC0174, enumC4518);
                i2++;
                i3 = i4;
                i = 0;
            }
            c2198 = new C2198(enumMap);
        }
        String strM5415 = c2019.m5415();
        mo3578().m5243();
        m6918();
        C0875 c0875M6888 = m6888(strM5415);
        EnumMap enumMap2 = c0875M6888.f3873;
        EnumC0174 enumC01742 = EnumC0174.f1599;
        EnumC3695 enumC3695 = (EnumC3695) enumMap2.get(enumC01742);
        EnumC3695 enumC36952 = EnumC3695.f14082;
        if (enumC3695 == null) {
            enumC3695 = enumC36952;
        }
        int i6 = c0875M6888.f3872;
        int iOrdinal = enumC3695.ordinal();
        EnumC4518 enumC45183 = EnumC4518.REMOTE_ENFORCED_DEFAULT;
        EnumC4518 enumC45184 = EnumC4518.FAILSAFE;
        if (iOrdinal == 1) {
            c2198.m5759(enumC01742, enumC45183);
        } else if (iOrdinal == 2 || iOrdinal == 3) {
            c2198.m5765(enumC01742, i6);
        } else {
            c2198.m5759(enumC01742, enumC45184);
        }
        EnumC0174 enumC01743 = EnumC0174.f1598;
        EnumC3695 enumC36953 = (EnumC3695) enumMap2.get(enumC01743);
        if (enumC36953 != null) {
            enumC36952 = enumC36953;
        }
        int iOrdinal2 = enumC36952.ordinal();
        if (iOrdinal2 == 1) {
            c2198.m5759(enumC01743, enumC45183);
        } else if (iOrdinal2 == 2 || iOrdinal2 == 3) {
            c2198.m5765(enumC01743, i6);
        } else {
            c2198.m5759(enumC01743, enumC45184);
        }
        String strM54152 = c2019.m5415();
        mo3578().m5243();
        m6918();
        C1102 c1102M6936 = m6936(strM54152, m6934(strM54152), m6888(strM54152), c2198);
        String str = c1102M6936.f4698;
        Boolean bool = c1102M6936.f4695;
        ᵘᵞʿⁱ.ᵶᵥᵝ(bool);
        boolean zBooleanValue = bool.booleanValue();
        c0542.m9868();
        ((C5090) c0542.f17955).m10566(zBooleanValue);
        if (!TextUtils.isEmpty(str)) {
            c0542.m9868();
            ((C5090) c0542.f17955).m10423(str);
        }
        mo3578().m5243();
        m6918();
        Iterator it = DesugarCollections.unmodifiableList(((C5090) c0542.f17955).m10426()).iterator();
        while (true) {
            if (it.hasNext()) {
                c4822 = (C4822) it.next();
                if ("_npa".equals(c4822.m10067())) {
                    break;
                }
            } else {
                c4822 = null;
                break;
            }
        }
        if (c4822 != null) {
            EnumMap enumMap3 = (EnumMap) c2198.f8735;
            EnumC0174 enumC01744 = EnumC0174.f1601;
            EnumC4518 enumC45185 = (EnumC4518) enumMap3.get(enumC01744);
            if (enumC45185 == null) {
                enumC45185 = enumC45182;
            }
            if (enumC45185 == enumC45182) {
                C1694 c1694 = this.f11109;
                m6882(c1694);
                C4922 c4922M4608 = c1694.m4608(c2019.m5415(), "_npa");
                EnumC4518 enumC45186 = EnumC4518.MANIFEST;
                EnumC4518 enumC45187 = EnumC4518.API;
                if (c4922M4608 != null) {
                    String str2 = c4922M4608.f18717;
                    if ("tcf".equals(str2)) {
                        c2198.m5759(enumC01744, EnumC4518.TCF);
                    } else if ("app".equals(str2)) {
                        c2198.m5759(enumC01744, enumC45187);
                    } else {
                        c2198.m5759(enumC01744, enumC45186);
                    }
                } else {
                    Boolean boolM5416 = c2019.m5416();
                    if (boolM5416 == null || ((boolM5416.booleanValue() && c4822.m10075() != 1) || !(boolM5416.booleanValue() || c4822.m10075() == 0))) {
                        c2198.m5759(enumC01744, enumC45187);
                    } else {
                        c2198.m5759(enumC01744, enumC45186);
                    }
                }
            }
        } else {
            int iM6890 = m6890(c2019.m5415(), c2198);
            C4243 c4243M10058 = C4822.m10058();
            c4243M10058.m9868();
            ((C4822) c4243M10058.f17955).m10073("_npa");
            mo3579().getClass();
            long jCurrentTimeMillis = System.currentTimeMillis();
            c4243M10058.m9868();
            ((C4822) c4243M10058.f17955).m10059(jCurrentTimeMillis);
            c4243M10058.m9868();
            ((C4822) c4243M10058.f17955).m10060(iM6890);
            C4822 c48222 = (C4822) c4243M10058.m9869();
            c0542.m9868();
            ((C5090) c0542.f17955).m10497(c48222);
            mo3572().f13414.m4475("Setting user property", "non_personalized_ads(_npa)", Integer.valueOf(iM6890));
        }
        String string = c2198.toString();
        c0542.m9868();
        ((C5090) c0542.f17955).m10422(string);
        String strM54153 = c2019.m5415();
        C1811 c1811 = this.f11104;
        c1811.ˈᵲᵢ();
        c1811.m4962(strM54153);
        C1699 c1699M4967 = c1811.m4967(strM54153);
        boolean z = c1699M4967 == null || !c1699M4967.m4651() || c1699M4967.m4650();
        List listM2110 = c0542.m2110();
        for (int i7 = 0; i7 < listM2110.size(); i7++) {
            if ("_tcf".equals(((C4943) listM2110.get(i7)).m10274())) {
                C4225 c4225 = (C4225) ((C4943) listM2110.get(i7)).m9884();
                List listM9191 = c4225.m9191();
                int i8 = 0;
                while (true) {
                    if (i8 >= listM9191.size()) {
                        break;
                    }
                    if ("_tcfd".equals(((C0114) listM9191.get(i8)).m1189())) {
                        String strM1198 = ((C0114) listM9191.get(i8)).m1198();
                        if (z && strM1198.length() > 4) {
                            char[] charArray = strM1198.toCharArray();
                            int i9 = 1;
                            while (true) {
                                if (i9 >= 64) {
                                    i9 = 0;
                                    break;
                                } else if (charArray[4] == "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_".charAt(i9)) {
                                    break;
                                } else {
                                    i9++;
                                }
                            }
                            charArray[4] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_".charAt(i9 | 1);
                            strM1198 = String.valueOf(charArray);
                        }
                        C2545 c2545M1181 = C0114.m1181();
                        c2545M1181.m6263("_tcfd");
                        c2545M1181.m6261(strM1198);
                        c4225.m9868();
                        ((C4943) c4225.f17955).m10262(i8, (C0114) c2545M1181.m9869());
                    } else {
                        i8++;
                    }
                }
                c0542.m2117(i7, c4225);
                return;
            }
        }
    }

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public final void m6924(ArrayList arrayList) {
        ᵘᵞʿⁱ.ᵻˈᵦʼ(!arrayList.isEmpty());
        if (this.f11099 != null) {
            mo3572().f13423.m4476("Set uploading progress before finishing the previous upload");
        } else {
            this.f11099 = new ArrayList(arrayList);
        }
    }

    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public final HashMap m6925(C4943 c4943) {
        Serializable serializableM5258;
        HashMap map = new HashMap();
        m6933();
        HashMap map2 = new HashMap();
        for (C0114 c0114 : c4943.m10263()) {
            if (c0114.m1189().startsWith("gad_") && (serializableM5258 = C1962.m5258(c0114)) != null) {
                map2.put(c0114.m1189(), serializableM5258);
            }
        }
        for (Map.Entry entry : map2.entrySet()) {
            map.put((String) entry.getKey(), String.valueOf(entry.getValue()));
        }
        return map;
    }

    /* JADX WARN: Removed duplicated region for block: B:146:0x038d  */
    /* JADX WARN: Removed duplicated region for block: B:167:0x045d A[Catch: all -> 0x00fc, TryCatch #5 {all -> 0x00fc, blocks: (B:33:0x00dc, B:35:0x00ec, B:43:0x0103, B:47:0x0113, B:49:0x0122, B:55:0x0137, B:57:0x0144, B:59:0x014f, B:62:0x0158, B:65:0x016f, B:68:0x0188, B:71:0x01ac, B:74:0x01b9, B:76:0x01cf, B:114:0x02aa, B:116:0x02d6, B:117:0x02d9, B:119:0x02f8, B:161:0x03d4, B:162:0x03d7, B:170:0x0482, B:122:0x030e, B:127:0x032d, B:129:0x0335, B:131:0x033d, B:135:0x0350, B:140:0x036e, B:144:0x037a, B:147:0x0390, B:152:0x03b5, B:154:0x03bd, B:156:0x03c5, B:158:0x03cb, B:150:0x03a3, B:138:0x0361, B:125:0x031b, B:78:0x01de, B:80:0x020a, B:81:0x0215, B:83:0x021c, B:85:0x0222, B:87:0x022c, B:89:0x0232, B:91:0x0238, B:93:0x023e, B:94:0x0243, B:96:0x0255, B:98:0x025b, B:104:0x026b, B:110:0x0275, B:111:0x0286, B:112:0x0292, B:113:0x029e, B:163:0x0400, B:165:0x0434, B:166:0x0437, B:167:0x045d, B:169:0x0464, B:63:0x0163, B:58:0x014b, B:51:0x012c, B:54:0x0134), top: B:185:0x00dc, inners: #0, #3 }] */
    /* JADX WARN: Removed duplicated region for block: B:57:0x0144 A[Catch: all -> 0x00fc, TryCatch #5 {all -> 0x00fc, blocks: (B:33:0x00dc, B:35:0x00ec, B:43:0x0103, B:47:0x0113, B:49:0x0122, B:55:0x0137, B:57:0x0144, B:59:0x014f, B:62:0x0158, B:65:0x016f, B:68:0x0188, B:71:0x01ac, B:74:0x01b9, B:76:0x01cf, B:114:0x02aa, B:116:0x02d6, B:117:0x02d9, B:119:0x02f8, B:161:0x03d4, B:162:0x03d7, B:170:0x0482, B:122:0x030e, B:127:0x032d, B:129:0x0335, B:131:0x033d, B:135:0x0350, B:140:0x036e, B:144:0x037a, B:147:0x0390, B:152:0x03b5, B:154:0x03bd, B:156:0x03c5, B:158:0x03cb, B:150:0x03a3, B:138:0x0361, B:125:0x031b, B:78:0x01de, B:80:0x020a, B:81:0x0215, B:83:0x021c, B:85:0x0222, B:87:0x022c, B:89:0x0232, B:91:0x0238, B:93:0x023e, B:94:0x0243, B:96:0x0255, B:98:0x025b, B:104:0x026b, B:110:0x0275, B:111:0x0286, B:112:0x0292, B:113:0x029e, B:163:0x0400, B:165:0x0434, B:166:0x0437, B:167:0x045d, B:169:0x0464, B:63:0x0163, B:58:0x014b, B:51:0x012c, B:54:0x0134), top: B:185:0x00dc, inners: #0, #3 }] */
    /* JADX WARN: Removed duplicated region for block: B:58:0x014b A[Catch: all -> 0x00fc, TryCatch #5 {all -> 0x00fc, blocks: (B:33:0x00dc, B:35:0x00ec, B:43:0x0103, B:47:0x0113, B:49:0x0122, B:55:0x0137, B:57:0x0144, B:59:0x014f, B:62:0x0158, B:65:0x016f, B:68:0x0188, B:71:0x01ac, B:74:0x01b9, B:76:0x01cf, B:114:0x02aa, B:116:0x02d6, B:117:0x02d9, B:119:0x02f8, B:161:0x03d4, B:162:0x03d7, B:170:0x0482, B:122:0x030e, B:127:0x032d, B:129:0x0335, B:131:0x033d, B:135:0x0350, B:140:0x036e, B:144:0x037a, B:147:0x0390, B:152:0x03b5, B:154:0x03bd, B:156:0x03c5, B:158:0x03cb, B:150:0x03a3, B:138:0x0361, B:125:0x031b, B:78:0x01de, B:80:0x020a, B:81:0x0215, B:83:0x021c, B:85:0x0222, B:87:0x022c, B:89:0x0232, B:91:0x0238, B:93:0x023e, B:94:0x0243, B:96:0x0255, B:98:0x025b, B:104:0x026b, B:110:0x0275, B:111:0x0286, B:112:0x0292, B:113:0x029e, B:163:0x0400, B:165:0x0434, B:166:0x0437, B:167:0x045d, B:169:0x0464, B:63:0x0163, B:58:0x014b, B:51:0x012c, B:54:0x0134), top: B:185:0x00dc, inners: #0, #3 }] */
    /* JADX WARN: Removed duplicated region for block: B:62:0x0158 A[Catch: all -> 0x00fc, TRY_ENTER, TryCatch #5 {all -> 0x00fc, blocks: (B:33:0x00dc, B:35:0x00ec, B:43:0x0103, B:47:0x0113, B:49:0x0122, B:55:0x0137, B:57:0x0144, B:59:0x014f, B:62:0x0158, B:65:0x016f, B:68:0x0188, B:71:0x01ac, B:74:0x01b9, B:76:0x01cf, B:114:0x02aa, B:116:0x02d6, B:117:0x02d9, B:119:0x02f8, B:161:0x03d4, B:162:0x03d7, B:170:0x0482, B:122:0x030e, B:127:0x032d, B:129:0x0335, B:131:0x033d, B:135:0x0350, B:140:0x036e, B:144:0x037a, B:147:0x0390, B:152:0x03b5, B:154:0x03bd, B:156:0x03c5, B:158:0x03cb, B:150:0x03a3, B:138:0x0361, B:125:0x031b, B:78:0x01de, B:80:0x020a, B:81:0x0215, B:83:0x021c, B:85:0x0222, B:87:0x022c, B:89:0x0232, B:91:0x0238, B:93:0x023e, B:94:0x0243, B:96:0x0255, B:98:0x025b, B:104:0x026b, B:110:0x0275, B:111:0x0286, B:112:0x0292, B:113:0x029e, B:163:0x0400, B:165:0x0434, B:166:0x0437, B:167:0x045d, B:169:0x0464, B:63:0x0163, B:58:0x014b, B:51:0x012c, B:54:0x0134), top: B:185:0x00dc, inners: #0, #3 }] */
    /* JADX WARN: Removed duplicated region for block: B:63:0x0163 A[Catch: all -> 0x00fc, TryCatch #5 {all -> 0x00fc, blocks: (B:33:0x00dc, B:35:0x00ec, B:43:0x0103, B:47:0x0113, B:49:0x0122, B:55:0x0137, B:57:0x0144, B:59:0x014f, B:62:0x0158, B:65:0x016f, B:68:0x0188, B:71:0x01ac, B:74:0x01b9, B:76:0x01cf, B:114:0x02aa, B:116:0x02d6, B:117:0x02d9, B:119:0x02f8, B:161:0x03d4, B:162:0x03d7, B:170:0x0482, B:122:0x030e, B:127:0x032d, B:129:0x0335, B:131:0x033d, B:135:0x0350, B:140:0x036e, B:144:0x037a, B:147:0x0390, B:152:0x03b5, B:154:0x03bd, B:156:0x03c5, B:158:0x03cb, B:150:0x03a3, B:138:0x0361, B:125:0x031b, B:78:0x01de, B:80:0x020a, B:81:0x0215, B:83:0x021c, B:85:0x0222, B:87:0x022c, B:89:0x0232, B:91:0x0238, B:93:0x023e, B:94:0x0243, B:96:0x0255, B:98:0x025b, B:104:0x026b, B:110:0x0275, B:111:0x0286, B:112:0x0292, B:113:0x029e, B:163:0x0400, B:165:0x0434, B:166:0x0437, B:167:0x045d, B:169:0x0464, B:63:0x0163, B:58:0x014b, B:51:0x012c, B:54:0x0134), top: B:185:0x00dc, inners: #0, #3 }] */
    /* JADX WARN: Removed duplicated region for block: B:65:0x016f A[Catch: all -> 0x00fc, TRY_LEAVE, TryCatch #5 {all -> 0x00fc, blocks: (B:33:0x00dc, B:35:0x00ec, B:43:0x0103, B:47:0x0113, B:49:0x0122, B:55:0x0137, B:57:0x0144, B:59:0x014f, B:62:0x0158, B:65:0x016f, B:68:0x0188, B:71:0x01ac, B:74:0x01b9, B:76:0x01cf, B:114:0x02aa, B:116:0x02d6, B:117:0x02d9, B:119:0x02f8, B:161:0x03d4, B:162:0x03d7, B:170:0x0482, B:122:0x030e, B:127:0x032d, B:129:0x0335, B:131:0x033d, B:135:0x0350, B:140:0x036e, B:144:0x037a, B:147:0x0390, B:152:0x03b5, B:154:0x03bd, B:156:0x03c5, B:158:0x03cb, B:150:0x03a3, B:138:0x0361, B:125:0x031b, B:78:0x01de, B:80:0x020a, B:81:0x0215, B:83:0x021c, B:85:0x0222, B:87:0x022c, B:89:0x0232, B:91:0x0238, B:93:0x023e, B:94:0x0243, B:96:0x0255, B:98:0x025b, B:104:0x026b, B:110:0x0275, B:111:0x0286, B:112:0x0292, B:113:0x029e, B:163:0x0400, B:165:0x0434, B:166:0x0437, B:167:0x045d, B:169:0x0464, B:63:0x0163, B:58:0x014b, B:51:0x012c, B:54:0x0134), top: B:185:0x00dc, inners: #0, #3 }] */
    /* JADX INFO: renamed from: ᵡᵶ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m6926(C2847 c2847) throws Throwable {
        long j;
        long j2;
        long j3;
        long j4;
        long j5;
        long j6;
        int i;
        C3711 c3711M4601;
        boolean z;
        C1103 c1103;
        String str;
        PackageInfo packageInfoM9254;
        Bundle bundle;
        C2847 c28472;
        ApplicationInfo applicationInfo;
        long j7;
        long j8;
        boolean z2;
        long jElapsedRealtime;
        C1103 c11032 = this.f11114;
        mo3578().m5243();
        m6918();
        ᵘᵞʿⁱ.ᵶᵥᵝ(c2847);
        boolean z3 = c2847.f10901;
        String str2 = c2847.f10910;
        ᵘᵞʿⁱ.ˊᵫᵗ(str2);
        if (m6883(c2847)) {
            C1694 c1694 = this.f11109;
            m6882(c1694);
            C2019 c2019M4596 = c1694.m4596(str2);
            if (c2019M4596 != null && TextUtils.isEmpty(c2019M4596.m5402()) && !TextUtils.isEmpty(c2847.f10918)) {
                c2019M4596.m5439(0L);
                C1694 c16942 = this.f11109;
                m6882(c16942);
                c16942.m4624(c2019M4596, false);
                C1811 c1811 = this.f11104;
                m6882(c1811);
                c1811.ˈᵲᵢ();
                c1811.f7231.remove(str2);
            }
            if (!c2847.f10911) {
                m6894(c2847);
                return;
            }
            long j9 = c2847.f10920;
            C3691 c3691M6921 = m6921();
            C0511 c0511 = AbstractC3818.f14549;
            if (c3691M6921.m8314(null, c0511)) {
                j = j9;
                j2 = c2847.f10922;
            } else {
                j = j9;
                j2 = 0;
            }
            if (j == 0) {
                mo3579().getClass();
                long jCurrentTimeMillis = System.currentTimeMillis();
                if (m6921().m8314(null, c0511)) {
                    mo3579().getClass();
                    jElapsedRealtime = SystemClock.elapsedRealtime();
                } else {
                    jElapsedRealtime = 0;
                }
                j4 = jCurrentTimeMillis;
                j3 = jElapsedRealtime;
            } else {
                j3 = j2;
                j4 = j;
            }
            int i2 = c2847.f10906;
            if (i2 != 0 && i2 != 1) {
                mo3572().f13424.m4475("Incorrect app type, assuming installed app. appId, appType", C3485.m7979(str2), Integer.valueOf(i2));
                i2 = 0;
            }
            C1694 c16943 = this.f11109;
            m6882(c16943);
            c16943.m4629();
            try {
                C1694 c16944 = this.f11109;
                m6882(c16944);
                C4922 c4922M4608 = c16944.m4608(str2, "_npa");
                Boolean boolM6881 = m6881(c2847);
                if (c4922M4608 != null) {
                    j5 = 1;
                    if (!"auto".equals(c4922M4608.f18717)) {
                        j6 = j4;
                        if (m6921().m8314(null, AbstractC3818.f14493)) {
                            i = i2;
                            m6898(c2847, j6);
                        } else {
                            i = i2;
                            m6898(c2847, c2847.f10899);
                        }
                        m6894(c2847);
                        C1694 c16945 = this.f11109;
                        if (i != 0) {
                            m6882(c16945);
                            c3711M4601 = c16945.m4601("events", str2, "_f");
                            z = false;
                        } else {
                            m6882(c16945);
                            c3711M4601 = c16945.m4601("events", str2, "_v");
                            z = true;
                        }
                        if (c3711M4601 != null) {
                            long j10 = ((j6 / 3600000) + j5) * 3600000;
                            if (z) {
                                long j11 = j6;
                                m6919(new C0973(j11, Long.valueOf(j10), "_fvt", "auto"), c2847);
                                mo3578().m5243();
                                m6918();
                                Bundle bundle2 = new Bundle();
                                bundle2.putLong("_c", 1L);
                                bundle2.putLong("_r", 1L);
                                bundle2.putLong("_et", 1L);
                                if (z3) {
                                    bundle2.putLong("_dac", 1L);
                                }
                                mo3579().getClass();
                                bundle2.putLong("_elt", System.currentTimeMillis());
                                m6904(new C0357("_v", new C3590(bundle2), "auto", j11, j3), c2847);
                            } else {
                                long j12 = j6;
                                m6919(new C0973(j12, Long.valueOf(j10), "_fot", "auto"), c2847);
                                mo3578().m5243();
                                C0258 c0258 = this.f11088;
                                ᵘᵞʿⁱ.ᵶᵥᵝ(c0258);
                                C1103 c11033 = c0258.f1849;
                                if (str2 == null || str2.isEmpty()) {
                                    c1103 = c11032;
                                    str = "_elt";
                                    C3485 c3485 = c11033.f4729;
                                    C1103.m3564(c3485);
                                    c3485.f13418.m4476("Install Referrer Reporter was called with invalid app package name");
                                } else {
                                    str = "_elt";
                                    C1961 c1961 = c11033.f4707;
                                    C3485 c34852 = c11033.f4729;
                                    Context context = c11033.f4713;
                                    C1103.m3564(c1961);
                                    c1961.m5243();
                                    if (c0258.m1474()) {
                                        ServiceConnectionC0504 serviceConnectionC0504 = new ServiceConnectionC0504(c0258, str2);
                                        C1961 c19612 = c11033.f4707;
                                        C1103.m3564(c19612);
                                        c19612.m5243();
                                        Intent intent = new Intent("com.google.android.finsky.BIND_GET_INSTALL_REFERRER_SERVICE");
                                        c1103 = c11032;
                                        intent.setComponent(new ComponentName("com.android.vending", "com.google.android.finsky.externalreferrer.GetInstallReferrerService"));
                                        PackageManager packageManager = context.getPackageManager();
                                        if (packageManager == null) {
                                            C1103.m3564(c34852);
                                            c34852.f13418.m4476("Failed to obtain Package Manager to verify binding conditions for Install Referrer");
                                        } else {
                                            List<ResolveInfo> listQueryIntentServices = packageManager.queryIntentServices(intent, 0);
                                            if (listQueryIntentServices == null || listQueryIntentServices.isEmpty()) {
                                                C1103.m3564(c34852);
                                                c34852.f13420.m4476("Play Service for fetching Install Referrer is unavailable on device");
                                            } else {
                                                ServiceInfo serviceInfo = listQueryIntentServices.get(0).serviceInfo;
                                                if (serviceInfo != null) {
                                                    String str3 = serviceInfo.packageName;
                                                    if (serviceInfo.name != null && "com.android.vending".equals(str3) && c0258.m1474()) {
                                                        try {
                                                            try {
                                                                boolean zM1340 = C0183.m1338().m1340(context, context.getClass().getName(), new Intent(intent), serviceConnectionC0504, 1, null);
                                                                try {
                                                                    C1103.m3564(c34852);
                                                                    c34852.f13414.m4474(zM1340 ? "available" : "not available", "Install Referrer Service is");
                                                                } catch (RuntimeException e) {
                                                                    e = e;
                                                                    C3485 c34853 = c11033.f4729;
                                                                    C1103.m3564(c34853);
                                                                    c34853.f13423.m4474(e.getMessage(), "Exception occurred while binding to Install Referrer Service");
                                                                }
                                                            } catch (RuntimeException e2) {
                                                                e = e2;
                                                            }
                                                        } catch (RuntimeException e3) {
                                                            e = e3;
                                                        }
                                                    } else {
                                                        C1103.m3564(c34852);
                                                        c34852.f13424.m4476("Play Store version 8.3.73 or higher required for Install Referrer");
                                                    }
                                                }
                                            }
                                        }
                                    } else {
                                        C1103.m3564(c34852);
                                        c34852.f13420.m4476("Install Referrer Reporter is not available");
                                        c1103 = c11032;
                                    }
                                }
                                mo3578().m5243();
                                m6918();
                                Bundle bundle3 = new Bundle();
                                long j13 = j5;
                                bundle3.putLong("_c", j13);
                                bundle3.putLong("_r", j13);
                                bundle3.putLong("_uwa", 0L);
                                bundle3.putLong("_pfo", 0L);
                                bundle3.putLong("_sys", 0L);
                                bundle3.putLong("_sysu", 0L);
                                bundle3.putLong("_et", 1L);
                                if (z3) {
                                    bundle3.putLong("_dac", 1L);
                                }
                                ᵘᵞʿⁱ.ᵶᵥᵝ(str2);
                                C1694 c16946 = this.f11109;
                                m6882(c16946);
                                ᵘᵞʿⁱ.ˊᵫᵗ(str2);
                                c16946.ˈᵲᵢ();
                                c16946.m5026();
                                long jM4579 = c16946.m4579(str2);
                                C1103 c11034 = c1103;
                                if (c11034.f4713.getPackageManager() == null) {
                                    mo3572().f13423.m4474(C3485.m7979(str2), "PackageManager is null, first open report might be inaccurate. appId");
                                    bundle = bundle3;
                                    c28472 = c2847;
                                } else {
                                    try {
                                        packageInfoM9254 = C1593.m4436(c11034.f4713).m9254(0, str2);
                                    } catch (PackageManager.NameNotFoundException e4) {
                                        mo3572().f13423.m4475("Package info is null, first open report might be inaccurate. appId", C3485.m7979(str2), e4);
                                        packageInfoM9254 = null;
                                    }
                                    if (packageInfoM9254 != null) {
                                        long j14 = packageInfoM9254.firstInstallTime;
                                        if (j14 != 0) {
                                            if (j14 != packageInfoM9254.lastUpdateTime) {
                                                if (!m6921().m8314(null, AbstractC3818.f14492)) {
                                                    bundle = bundle3;
                                                    bundle.putLong("_uwa", 1L);
                                                } else if (jM4579 == 0) {
                                                    bundle = bundle3;
                                                    bundle.putLong("_uwa", 1L);
                                                    z2 = false;
                                                    j8 = 0;
                                                } else {
                                                    bundle = bundle3;
                                                }
                                                j8 = jM4579;
                                                z2 = false;
                                            } else {
                                                bundle = bundle3;
                                                j8 = jM4579;
                                                z2 = true;
                                            }
                                            c28472 = c2847;
                                            m6919(new C0973(j12, Long.valueOf(true != z2 ? 0L : 1L), "_fi", "auto"), c28472);
                                            jM4579 = j8;
                                        } else {
                                            bundle = bundle3;
                                            c28472 = c2847;
                                        }
                                        try {
                                            applicationInfo = C1593.m4436(c11034.f4713).f16324.getPackageManager().getApplicationInfo(str2, 0);
                                        } catch (PackageManager.NameNotFoundException e5) {
                                            mo3572().f13423.m4475("Application info is null, first open report might be inaccurate. appId", C3485.m7979(str2), e5);
                                            applicationInfo = null;
                                        }
                                        if (applicationInfo != null) {
                                            if ((applicationInfo.flags & 1) != 0) {
                                                j7 = 1;
                                                bundle.putLong("_sys", 1L);
                                            } else {
                                                j7 = 1;
                                            }
                                            if ((applicationInfo.flags & 128) != 0) {
                                                bundle.putLong("_sysu", j7);
                                            }
                                        }
                                    }
                                }
                                if (jM4579 >= 0) {
                                    bundle.putLong("_pfo", jM4579);
                                }
                                mo3579().getClass();
                                bundle.putLong(str, System.currentTimeMillis());
                                m6904(new C0357("_f", new C3590(bundle), "auto", j12, j3), c28472);
                            }
                        } else {
                            long j15 = j6;
                            if (c2847.f10928) {
                                m6904(new C0357("_cd", new C3590(new Bundle()), "auto", j15, 0L), c2847);
                            }
                        }
                        C1694 c16947 = this.f11109;
                        m6882(c16947);
                        c16947.m4605();
                        C1694 c16948 = this.f11109;
                        m6882(c16948);
                        c16948.m4630();
                    }
                } else {
                    j5 = 1;
                }
                if (boolM6881 != null) {
                    C0973 c0973 = new C0973(j4, Long.valueOf(true != boolM6881.booleanValue() ? 0L : j5), "_npa", "auto");
                    j6 = j4;
                    if (c4922M4608 == null || !c4922M4608.f18719.equals(c0973.f4263)) {
                        m6919(c0973, c2847);
                    }
                } else {
                    j6 = j4;
                    if (c4922M4608 != null) {
                        m6891("_npa", c2847);
                    }
                }
                if (m6921().m8314(null, AbstractC3818.f14493)) {
                }
                m6894(c2847);
                C1694 c169452 = this.f11109;
                if (i != 0) {
                }
                if (c3711M4601 != null) {
                }
                C1694 c169472 = this.f11109;
                m6882(c169472);
                c169472.m4605();
                C1694 c169482 = this.f11109;
                m6882(c169482);
                c169482.m4630();
            } catch (Throwable th) {
                C1694 c16949 = this.f11109;
                m6882(c16949);
                c16949.m4630();
                throw th;
            }
        }
    }

    /* JADX INFO: renamed from: ᵡᵶᵬʤ, reason: contains not printable characters */
    public final void m6927(C3833 c3833, C2847 c2847) throws Throwable {
        C0357 c0357;
        ᵘᵞʿⁱ.ˊᵫᵗ(c3833.f14633);
        ᵘᵞʿⁱ.ᵶᵥᵝ(c3833.f14637);
        ᵘᵞʿⁱ.ᵶᵥᵝ(c3833.f14636);
        ᵘᵞʿⁱ.ˊᵫᵗ(c3833.f14636.f4262);
        mo3578().m5243();
        m6918();
        if (m6883(c2847)) {
            if (!c2847.f10911) {
                m6894(c2847);
                return;
            }
            C3833 c38332 = new C3833(c3833);
            boolean z = false;
            c38332.f14639 = false;
            C1694 c1694 = this.f11109;
            m6882(c1694);
            c1694.m4629();
            try {
                C1694 c16942 = this.f11109;
                m6882(c16942);
                String str = c38332.f14633;
                ᵘᵞʿⁱ.ᵶᵥᵝ(str);
                C3833 c3833M4619 = c16942.m4619(str, c38332.f14636.f4262);
                C1103 c1103 = this.f11114;
                if (c3833M4619 != null && !c3833M4619.f14637.equals(c38332.f14637)) {
                    mo3572().f13424.m4477("Updating a conditional user property with different origin. name, origin, origin (from DB)", c1103.f4717.m5502(c38332.f14636.f4262), c38332.f14637, c3833M4619.f14637);
                }
                if (c3833M4619 != null && c3833M4619.f14639) {
                    c38332.f14637 = c3833M4619.f14637;
                    c38332.f14638 = c3833M4619.f14638;
                    c38332.f14634 = c3833M4619.f14634;
                    c38332.f14640 = c3833M4619.f14640;
                    c38332.f14641 = c3833M4619.f14641;
                    c38332.f14639 = true;
                    C0973 c0973 = c38332.f14636;
                    c38332.f14636 = new C0973(c3833M4619.f14636.f4261, c0973.m3298(), c0973.f4262, c3833M4619.f14636.f4265);
                } else if (TextUtils.isEmpty(c38332.f14640)) {
                    C0973 c09732 = c38332.f14636;
                    c38332.f14636 = new C0973(c38332.f14638, c09732.m3298(), c09732.f4262, c38332.f14636.f4265);
                    c38332.f14639 = true;
                    z = true;
                }
                if (c38332.f14639) {
                    C0973 c09733 = c38332.f14636;
                    String str2 = c38332.f14633;
                    ᵘᵞʿⁱ.ᵶᵥᵝ(str2);
                    String str3 = c38332.f14637;
                    String str4 = c09733.f4262;
                    long j = c09733.f4261;
                    Object objM3298 = c09733.m3298();
                    ᵘᵞʿⁱ.ᵶᵥᵝ(objM3298);
                    C4922 c4922 = new C4922(str2, str3, str4, j, objM3298);
                    Object obj = c4922.f18719;
                    String str5 = c4922.f18718;
                    C1694 c16943 = this.f11109;
                    m6882(c16943);
                    if (c16943.m4581(c4922)) {
                        mo3572().f13416.m4477("User property updated immediately", c38332.f14633, c1103.f4717.m5502(str5), obj);
                    } else {
                        mo3572().f13423.m4477("(2)Too many active user properties, ignoring", C3485.m7979(c38332.f14633), c1103.f4717.m5502(str5), obj);
                    }
                    if (z && (c0357 = c38332.f14641) != null) {
                        m6935(new C0357(c0357, c38332.f14638, 0L), c2847);
                    }
                }
                C1694 c16944 = this.f11109;
                m6882(c16944);
                if (c16944.m4620(c38332)) {
                    mo3572().f13416.m4477("Conditional property added", c38332.f14633, c1103.f4717.m5502(c38332.f14636.f4262), c38332.f14636.m3298());
                } else {
                    mo3572().f13423.m4477("Too many conditional properties, ignoring", C3485.m7979(c38332.f14633), c1103.f4717.m5502(c38332.f14636.f4262), c38332.f14636.m3298());
                }
                C1694 c16945 = this.f11109;
                m6882(c16945);
                c16945.m4605();
                C1694 c16946 = this.f11109;
                m6882(c16946);
                c16946.m4630();
            } catch (Throwable th) {
                C1694 c16947 = this.f11109;
                m6882(c16947);
                c16947.m4630();
                throw th;
            }
        }
    }

    /* JADX INFO: renamed from: ᵨˈʼﹶ, reason: contains not printable characters */
    public final boolean m6928(String str, String str2) throws Throwable {
        C1694 c1694 = this.f11109;
        m6882(c1694);
        C3711 c3711M4601 = c1694.m4601("events", str, str2);
        return c3711M4601 == null || c3711M4601.f14130 < 1;
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final long m6929() {
        mo3579().getClass();
        long jCurrentTimeMillis = System.currentTimeMillis();
        C0786 c0786 = this.f11122;
        c0786.m5026();
        c0786.ˈᵲᵢ();
        C2594 c2594 = c0786.f3529;
        long jM6318 = c2594.m6318();
        if (jM6318 == 0) {
            C3335 c3335 = ((C1103) ((ᵜᵪʾ) c0786).ˌᴵ).f4730;
            C1103.m3567(c3335);
            jM6318 = ((long) c3335.m7627().nextInt(86400000)) + 1;
            c2594.m6316(jM6318);
        }
        return ((((jCurrentTimeMillis + jM6318) / 1000) / 60) / 60) / 24;
    }

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public final boolean m6930(C4225 c4225) {
        ArrayList arrayList = new ArrayList(c4225.m9191());
        int i = -1;
        int i2 = -1;
        for (int i3 = 0; i3 < arrayList.size(); i3++) {
            if ("value".equals(((C0114) arrayList.get(i3)).m1189())) {
                i = i3;
            } else if ("currency".equals(((C0114) arrayList.get(i3)).m1189())) {
                i2 = i3;
            }
        }
        if (i == -1) {
            if (!m6921().m8314(null, AbstractC3818.f14475) || !"_iap".equals(c4225.m9187())) {
                return true;
            }
            m6885(c4225, "_c");
            m6887(c4225, 18, "value");
            return false;
        }
        if (!((C0114) arrayList.get(i)).m1196() && !((C0114) arrayList.get(i)).m1185()) {
            mo3572().f13413.m4476("Value must be specified with a numeric type.");
            c4225.m9180(i);
            m6885(c4225, "_c");
            m6887(c4225, 18, "value");
            return false;
        }
        if (i2 != -1) {
            String strM1198 = ((C0114) arrayList.get(i2)).m1198();
            if (strM1198.length() == 3) {
                int iCharCount = 0;
                while (iCharCount < strM1198.length()) {
                    int iCodePointAt = strM1198.codePointAt(iCharCount);
                    if (Character.isLetter(iCodePointAt)) {
                        iCharCount += Character.charCount(iCodePointAt);
                    }
                }
                return true;
            }
        }
        mo3572().f13413.m4476("Value parameter discarded. You must also supply a 3-letter ISO_4217 currency code in the currency parameter.");
        c4225.m9180(i);
        m6885(c4225, "_c");
        m6887(c4225, 19, "currency");
        return false;
    }

    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public final String m6931(C0875 c0875) {
        if (!c0875.m3073(EnumC0174.f1598)) {
            return null;
        }
        byte[] bArr = new byte[16];
        m6910().m7627().nextBytes(bArr);
        return String.format(Locale.US, "%032x", new BigInteger(1, bArr));
    }

    /* JADX INFO: renamed from: ᵫˈᵹ, reason: contains not printable characters */
    public final C2477 m6932() {
        C2477 c2477 = this.f11118;
        if (c2477 != null) {
            return c2477;
        }
        ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Network broadcast receiver not created");
        return null;
    }

    /* JADX INFO: renamed from: ᵬᵦˋ, reason: contains not printable characters */
    public final C1962 m6933() {
        C1962 c1962 = this.f11095;
        m6882(c1962);
        return c1962;
    }

    /* JADX INFO: renamed from: ᵮᵟᵡ, reason: contains not printable characters */
    public final C1102 m6934(String str) {
        mo3578().m5243();
        m6918();
        HashMap map = this.f11110;
        C1102 c1102 = (C1102) map.get(str);
        if (c1102 != null) {
            return c1102;
        }
        C1694 c1694 = this.f11109;
        m6882(c1694);
        ᵘᵞʿⁱ.ᵶᵥᵝ(str);
        c1694.ˈᵲᵢ();
        c1694.m5026();
        C1102 c1102M3559 = C1102.m3559(c1694.m4621("select dma_consent_settings from consent_settings where app_id=? limit 1;", new String[]{str}));
        map.put(str, c1102M3559);
        return c1102M3559;
    }

    /* JADX WARN: Can't wrap try/catch for region: R(9:73|(4:75|(0)(1:78)|85|(1:87)(1:88))|77|79|341|80|84|85|(0)(0)) */
    /* JADX WARN: Code restructure failed: missing block: B:82:0x02e4, code lost:
    
        r0 = move-exception;
     */
    /* JADX WARN: Code restructure failed: missing block: B:83:0x02e5, code lost:
    
        ((defpackage.C1103) ((ᵜᵪʾ) r10).ˌᴵ).mo3572().m7982().m4475("Error pruning currencies. appId", defpackage.C3485.m7979(r11), r0);
     */
    /* JADX WARN: Removed duplicated region for block: B:101:0x03d1 A[Catch: all -> 0x01c3, TryCatch #2 {all -> 0x01c3, blocks: (B:37:0x01a1, B:40:0x01b0, B:42:0x01b8, B:48:0x01c7, B:90:0x0356, B:99:0x038e, B:101:0x03d1, B:103:0x03d6, B:104:0x03ed, B:106:0x03f8, B:108:0x0412, B:110:0x0418, B:111:0x042f, B:114:0x044c, B:118:0x046b, B:119:0x0482, B:120:0x048b, B:123:0x04a8, B:124:0x04bc, B:126:0x04c4, B:128:0x04ce, B:130:0x04d4, B:131:0x04db, B:132:0x04e8, B:138:0x052d, B:139:0x0542, B:141:0x0571, B:144:0x059b, B:146:0x05a5, B:150:0x05f2, B:152:0x061d, B:154:0x064a, B:155:0x064d, B:157:0x0655, B:158:0x0658, B:160:0x0660, B:161:0x0663, B:163:0x066b, B:164:0x066e, B:166:0x0677, B:167:0x067b, B:169:0x0689, B:170:0x068c, B:173:0x06bd, B:175:0x06cf, B:179:0x06e4, B:184:0x06f2, B:217:0x0774, B:219:0x077a, B:220:0x077d, B:222:0x0795, B:223:0x079f, B:225:0x07ac, B:227:0x07b6, B:228:0x07b9, B:237:0x07ee, B:187:0x06fb, B:191:0x070d, B:195:0x071c, B:199:0x072b, B:203:0x073a, B:207:0x0749, B:211:0x0756, B:215:0x0765, B:151:0x060d, B:135:0x0512, B:93:0x0368, B:94:0x0374, B:96:0x037a, B:98:0x0388, B:53:0x01e5, B:56:0x01f7, B:58:0x020c, B:64:0x0224, B:69:0x0254, B:71:0x025a, B:73:0x0268, B:75:0x0276, B:78:0x0289, B:85:0x0310, B:87:0x031a, B:79:0x02b9, B:80:0x02d2, B:84:0x02fa, B:83:0x02e5, B:67:0x0230, B:68:0x024e), top: B:340:0x01a1, inners: #3, #7 }] */
    /* JADX WARN: Removed duplicated region for block: B:105:0x03f6  */
    /* JADX WARN: Removed duplicated region for block: B:216:0x0772  */
    /* JADX WARN: Removed duplicated region for block: B:256:0x087a  */
    /* JADX WARN: Removed duplicated region for block: B:259:0x08c1 A[Catch: all -> 0x0853, TryCatch #1 {all -> 0x0853, blocks: (B:230:0x07cd, B:232:0x07d1, B:235:0x07e3, B:238:0x07f7, B:240:0x0801, B:242:0x080d, B:244:0x0817, B:246:0x0825, B:248:0x083f, B:252:0x085a, B:254:0x0868, B:255:0x0871, B:257:0x087e, B:259:0x08c1, B:262:0x08cc, B:263:0x08d6, B:264:0x08d7, B:266:0x08e1), top: B:339:0x07cd }] */
    /* JADX WARN: Removed duplicated region for block: B:266:0x08e1 A[Catch: all -> 0x0853, TRY_LEAVE, TryCatch #1 {all -> 0x0853, blocks: (B:230:0x07cd, B:232:0x07d1, B:235:0x07e3, B:238:0x07f7, B:240:0x0801, B:242:0x080d, B:244:0x0817, B:246:0x0825, B:248:0x083f, B:252:0x085a, B:254:0x0868, B:255:0x0871, B:257:0x087e, B:259:0x08c1, B:262:0x08cc, B:263:0x08d6, B:264:0x08d7, B:266:0x08e1), top: B:339:0x07cd }] */
    /* JADX WARN: Removed duplicated region for block: B:275:0x0941  */
    /* JADX WARN: Removed duplicated region for block: B:283:0x096a A[Catch: all -> 0x090b, TryCatch #6 {all -> 0x090b, blocks: (B:268:0x08e8, B:270:0x08ff, B:274:0x090e, B:276:0x0944, B:278:0x094c, B:280:0x0956, B:281:0x0960, B:283:0x096a, B:284:0x0974, B:285:0x097d, B:287:0x0983, B:289:0x09cd, B:291:0x09df, B:295:0x09fa, B:297:0x0a0a, B:294:0x09ee, B:301:0x0a1d, B:302:0x0a5f, B:303:0x0a6a, B:304:0x0a7f, B:306:0x0a85, B:315:0x0acc, B:316:0x0b1f, B:318:0x0b30, B:332:0x0b97, B:323:0x0b4a, B:324:0x0b4d, B:309:0x0a92, B:311:0x0ab8, B:329:0x0b68, B:330:0x0b81, B:331:0x0b82), top: B:347:0x08e8, inners: #4, #5 }] */
    /* JADX WARN: Removed duplicated region for block: B:287:0x0983 A[Catch: all -> 0x090b, TryCatch #6 {all -> 0x090b, blocks: (B:268:0x08e8, B:270:0x08ff, B:274:0x090e, B:276:0x0944, B:278:0x094c, B:280:0x0956, B:281:0x0960, B:283:0x096a, B:284:0x0974, B:285:0x097d, B:287:0x0983, B:289:0x09cd, B:291:0x09df, B:295:0x09fa, B:297:0x0a0a, B:294:0x09ee, B:301:0x0a1d, B:302:0x0a5f, B:303:0x0a6a, B:304:0x0a7f, B:306:0x0a85, B:315:0x0acc, B:316:0x0b1f, B:318:0x0b30, B:332:0x0b97, B:323:0x0b4a, B:324:0x0b4d, B:309:0x0a92, B:311:0x0ab8, B:329:0x0b68, B:330:0x0b81, B:331:0x0b82), top: B:347:0x08e8, inners: #4, #5 }] */
    /* JADX WARN: Removed duplicated region for block: B:299:0x0a15  */
    /* JADX WARN: Removed duplicated region for block: B:306:0x0a85 A[Catch: all -> 0x090b, TryCatch #6 {all -> 0x090b, blocks: (B:268:0x08e8, B:270:0x08ff, B:274:0x090e, B:276:0x0944, B:278:0x094c, B:280:0x0956, B:281:0x0960, B:283:0x096a, B:284:0x0974, B:285:0x097d, B:287:0x0983, B:289:0x09cd, B:291:0x09df, B:295:0x09fa, B:297:0x0a0a, B:294:0x09ee, B:301:0x0a1d, B:302:0x0a5f, B:303:0x0a6a, B:304:0x0a7f, B:306:0x0a85, B:315:0x0acc, B:316:0x0b1f, B:318:0x0b30, B:332:0x0b97, B:323:0x0b4a, B:324:0x0b4d, B:309:0x0a92, B:311:0x0ab8, B:329:0x0b68, B:330:0x0b81, B:331:0x0b82), top: B:347:0x08e8, inners: #4, #5 }] */
    /* JADX WARN: Removed duplicated region for block: B:318:0x0b30 A[Catch: all -> 0x090b, SQLiteException -> 0x0b46, TRY_LEAVE, TryCatch #5 {SQLiteException -> 0x0b46, blocks: (B:316:0x0b1f, B:318:0x0b30), top: B:345:0x0b1f, outer: #6 }] */
    /* JADX WARN: Removed duplicated region for block: B:322:0x0b48  */
    /* JADX WARN: Removed duplicated region for block: B:357:0x0a92 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:87:0x031a A[Catch: all -> 0x01c3, TryCatch #2 {all -> 0x01c3, blocks: (B:37:0x01a1, B:40:0x01b0, B:42:0x01b8, B:48:0x01c7, B:90:0x0356, B:99:0x038e, B:101:0x03d1, B:103:0x03d6, B:104:0x03ed, B:106:0x03f8, B:108:0x0412, B:110:0x0418, B:111:0x042f, B:114:0x044c, B:118:0x046b, B:119:0x0482, B:120:0x048b, B:123:0x04a8, B:124:0x04bc, B:126:0x04c4, B:128:0x04ce, B:130:0x04d4, B:131:0x04db, B:132:0x04e8, B:138:0x052d, B:139:0x0542, B:141:0x0571, B:144:0x059b, B:146:0x05a5, B:150:0x05f2, B:152:0x061d, B:154:0x064a, B:155:0x064d, B:157:0x0655, B:158:0x0658, B:160:0x0660, B:161:0x0663, B:163:0x066b, B:164:0x066e, B:166:0x0677, B:167:0x067b, B:169:0x0689, B:170:0x068c, B:173:0x06bd, B:175:0x06cf, B:179:0x06e4, B:184:0x06f2, B:217:0x0774, B:219:0x077a, B:220:0x077d, B:222:0x0795, B:223:0x079f, B:225:0x07ac, B:227:0x07b6, B:228:0x07b9, B:237:0x07ee, B:187:0x06fb, B:191:0x070d, B:195:0x071c, B:199:0x072b, B:203:0x073a, B:207:0x0749, B:211:0x0756, B:215:0x0765, B:151:0x060d, B:135:0x0512, B:93:0x0368, B:94:0x0374, B:96:0x037a, B:98:0x0388, B:53:0x01e5, B:56:0x01f7, B:58:0x020c, B:64:0x0224, B:69:0x0254, B:71:0x025a, B:73:0x0268, B:75:0x0276, B:78:0x0289, B:85:0x0310, B:87:0x031a, B:79:0x02b9, B:80:0x02d2, B:84:0x02fa, B:83:0x02e5, B:67:0x0230, B:68:0x024e), top: B:340:0x01a1, inners: #3, #7 }] */
    /* JADX WARN: Removed duplicated region for block: B:88:0x0347  */
    /* JADX WARN: Removed duplicated region for block: B:92:0x0365  */
    /* JADX WARN: Removed duplicated region for block: B:93:0x0368 A[Catch: all -> 0x01c3, TryCatch #2 {all -> 0x01c3, blocks: (B:37:0x01a1, B:40:0x01b0, B:42:0x01b8, B:48:0x01c7, B:90:0x0356, B:99:0x038e, B:101:0x03d1, B:103:0x03d6, B:104:0x03ed, B:106:0x03f8, B:108:0x0412, B:110:0x0418, B:111:0x042f, B:114:0x044c, B:118:0x046b, B:119:0x0482, B:120:0x048b, B:123:0x04a8, B:124:0x04bc, B:126:0x04c4, B:128:0x04ce, B:130:0x04d4, B:131:0x04db, B:132:0x04e8, B:138:0x052d, B:139:0x0542, B:141:0x0571, B:144:0x059b, B:146:0x05a5, B:150:0x05f2, B:152:0x061d, B:154:0x064a, B:155:0x064d, B:157:0x0655, B:158:0x0658, B:160:0x0660, B:161:0x0663, B:163:0x066b, B:164:0x066e, B:166:0x0677, B:167:0x067b, B:169:0x0689, B:170:0x068c, B:173:0x06bd, B:175:0x06cf, B:179:0x06e4, B:184:0x06f2, B:217:0x0774, B:219:0x077a, B:220:0x077d, B:222:0x0795, B:223:0x079f, B:225:0x07ac, B:227:0x07b6, B:228:0x07b9, B:237:0x07ee, B:187:0x06fb, B:191:0x070d, B:195:0x071c, B:199:0x072b, B:203:0x073a, B:207:0x0749, B:211:0x0756, B:215:0x0765, B:151:0x060d, B:135:0x0512, B:93:0x0368, B:94:0x0374, B:96:0x037a, B:98:0x0388, B:53:0x01e5, B:56:0x01f7, B:58:0x020c, B:64:0x0224, B:69:0x0254, B:71:0x025a, B:73:0x0268, B:75:0x0276, B:78:0x0289, B:85:0x0310, B:87:0x031a, B:79:0x02b9, B:80:0x02d2, B:84:0x02fa, B:83:0x02e5, B:67:0x0230, B:68:0x024e), top: B:340:0x01a1, inners: #3, #7 }] */
    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m6935(C0357 c0357, C2847 c2847) throws Throwable {
        String str;
        C2894 c2894;
        int i;
        boolean z;
        String str2;
        boolean z2;
        long jRound;
        String str3;
        String str4;
        String str5;
        C3031 c3031;
        String str6;
        C3590 c3590;
        C4922 c4922;
        long length;
        long jIntValue;
        long jDelete;
        C3031 c30312;
        C4239 c4239;
        C3711 c3711;
        String str7;
        String str8;
        C2019 c2019M4596;
        C4239 c42392;
        long j;
        C2019 c2019M45962;
        int i2;
        List listM4617;
        int i3;
        C1694 c1694M6917;
        C1694 c1694M69172;
        Iterator<String> it;
        ContentValues contentValues;
        String str9;
        long jM5287;
        List listM4968;
        long j2;
        boolean z3;
        C4922 c4922M4608;
        ᵘᵞʿⁱ.ᵶᵥᵝ(c2847);
        boolean z4 = c2847.f10911;
        String str10 = c2847.f10910;
        ᵘᵞʿⁱ.ˊᵫᵗ(str10);
        long jNanoTime = System.nanoTime();
        mo3578().m5243();
        m6918();
        m6933();
        String str11 = c2847.f10918;
        if (TextUtils.isEmpty(str11)) {
            return;
        }
        if (!z4) {
            m6894(c2847);
            return;
        }
        C1811 c1811M6914 = m6914();
        String str12 = c0357.f2152;
        boolean zM4961 = c1811M6914.m4961(str10, str12);
        C1103 c1103 = this.f11114;
        C3031 c30313 = this.f11103;
        if (zM4961) {
            mo3572().m7987().m4475("Dropping blocked event. appId", C3485.m7979(str10), c1103.m3571().m5504(str12));
            if (!"1".equals(m6914().mo1833(str10, "measurement.upload.blacklist_internal")) && !"1".equals(m6914().mo1833(str10, "measurement.upload.blacklist_public"))) {
                if ("_err".equals(str12)) {
                    return;
                }
                m6910();
                C3335.m7610(c30313, str10, 11, "_ev", str12, 0);
                return;
            }
            C2019 c2019M45963 = m6917().m4596(str10);
            if (c2019M45963 != null) {
                C1103 c11032 = c2019M45963.f8027;
                C1961 c1961 = c11032.f4707;
                C1103.m3564(c1961);
                c1961.m5243();
                long j3 = c2019M45963.f7999;
                C1961 c19612 = c11032.f4707;
                C1103.m3564(c19612);
                c19612.m5243();
                long jMax = Math.max(j3, c2019M45963.f8016);
                mo3579().getClass();
                long jAbs = Math.abs(System.currentTimeMillis() - jMax);
                m6921();
                if (jAbs > ((Long) AbstractC3818.f14522.m1988(null)).longValue()) {
                    mo3572().m7984().m4476("Fetching config for blocked app");
                    m6942(c2019M45963);
                    return;
                }
                return;
            }
            return;
        }
        C0536 c0536M2075 = C0536.m2075(c0357);
        C3335 c3335M6910 = m6910();
        C3691 c3691M6921 = m6921();
        c3691M6921.getClass();
        c3335M6910.m7647(c0536M2075, Math.max(Math.min(c3691M6921.m8310(str10, AbstractC3818.f14481), 100), 25));
        int iMax = Math.max(Math.min(m6921().m8310(str10, AbstractC3818.f14521), 35), 10);
        Bundle bundle = c0536M2075.f2757;
        Iterator it2 = new TreeSet(bundle.keySet()).iterator();
        while (it2.hasNext()) {
            String str13 = (String) it2.next();
            Iterator it3 = it2;
            if ("items".equals(str13)) {
                m6910().m7665(bundle.getParcelableArray(str13), iMax);
            }
            it2 = it3;
        }
        C0357 c0357M2076 = c0536M2075.m2076();
        C3590 c35902 = c0357M2076.f2154;
        String str14 = c0357M2076.f2152;
        if (Log.isLoggable(mo3572().m7985(), 2)) {
            str = "_err";
            mo3572().m7983().m4474(c1103.m3571().m5505(c0357M2076), "Logging event");
        } else {
            str = "_err";
        }
        m6917().m4629();
        try {
            m6894(c2847);
            i = 1;
            z = "ecommerce_purchase".equals(str14) || "purchase".equals(str14) || "refund".equals(str14);
        } catch (Throwable th) {
            th = th;
            c2894 = this;
        }
        if (!"_iap".equals(str14)) {
            if (!z) {
                str2 = "app_id";
                str3 = "_fx";
                z2 = z4;
                c3590 = c35902;
                str4 = str14;
                str5 = str11;
                c3031 = c30313;
                str6 = str;
                boolean zM7606 = C3335.m7606(str4);
                String str15 = str4;
                boolean zEquals = str6.equals(str15);
                m6910();
                if (c3590 == null) {
                    length = 0;
                } else {
                    Iterator<String> it4 = c3590.f13694.keySet().iterator();
                    length = 0;
                    while (it4.hasNext()) {
                        Object objM8119 = c3590.m8119(it4.next());
                        if (objM8119 instanceof Parcelable[]) {
                            length += (long) ((Parcelable[]) objM8119).length;
                        }
                    }
                }
                C3590 c35903 = c3590;
                C0222 c0222M4599 = m6917().m4599(m6929(), str10, length + 1, true, zM7606, false, zEquals, false, false, false);
                long j4 = c0222M4599.f1719;
                m6921();
                jIntValue = j4 - ((long) ((Integer) AbstractC3818.f14564.m1988(null)).intValue());
                if (jIntValue <= 0) {
                    if (zM7606) {
                        long j5 = c0222M4599.f1722;
                        m6921();
                        long jIntValue2 = j5 - ((long) ((Integer) AbstractC3818.f14510.m1988(null)).intValue());
                        if (jIntValue2 > 0) {
                            if (jIntValue2 % 1000 == 1) {
                                mo3572().m7982().m4475("Data loss. Too many public events logged. appId, count", C3485.m7979(str10), Long.valueOf(c0222M4599.f1722));
                            }
                            m6910();
                            C3335.m7610(c3031, str10, 16, "_ev", c0357M2076.f2152, 0);
                            m6917().m4605();
                        }
                    }
                    if (zEquals) {
                        long jMax2 = c0222M4599.f1724 - ((long) Math.max(0, Math.min(1000000, m6921().m8310(str10, AbstractC3818.f14538))));
                        if (jMax2 > 0) {
                            if (jMax2 == 1) {
                                mo3572().m7982().m4475("Too many error events logged. appId, count", C3485.m7979(str10), Long.valueOf(c0222M4599.f1724));
                            }
                            m6917().m4605();
                        }
                    }
                    Bundle bundleM8121 = c35903.m8121();
                    m6910().m7648(bundleM8121, "_o", c0357M2076.f2153);
                    if (m6910().m7658(str10, c2847.f10912)) {
                        m6910().m7648(bundleM8121, "_dbg", 1L);
                        m6910().m7648(bundleM8121, "_r", 1L);
                    }
                    if ("_s".equals(str15) && (c4922M4608 = m6917().m4608(str10, "_sno")) != null) {
                        Object obj = c4922M4608.f18719;
                        if (obj instanceof Long) {
                            m6910().m7648(bundleM8121, "_sno", obj);
                        }
                    }
                    C1694 c1694M69173 = m6917();
                    ᵘᵞʿⁱ.ˊᵫᵗ(str10);
                    c1694M69173.ˈᵲᵢ();
                    c1694M69173.m5026();
                    try {
                        jDelete = c1694M69173.m4625().delete("raw_events", "rowid in (select rowid from raw_events where app_id=? order by rowid desc limit -1 offset ?)", new String[]{str10, String.valueOf(Math.max(0, Math.min(1000000, ((C1103) ((ᵜᵪʾ) c1694M69173).ˌᴵ).f4726.m8310(str10, AbstractC3818.f14568))))});
                    } catch (SQLiteException e) {
                        ((C1103) ((ᵜᵪʾ) c1694M69173).ˌᴵ).mo3572().m7982().m4475("Error deleting over the limit events. appId", C3485.m7979(str10), e);
                        jDelete = 0;
                    }
                    if (jDelete > 0) {
                        mo3572().m7987().m4475("Data lost. Too many events stored on disk, deleted. appId", C3485.m7979(str10), Long.valueOf(jDelete));
                    }
                    C1103 c11033 = this.f11114;
                    C4239 c42393 = new C4239(c11033, c0357M2076.f2153, str10, c0357M2076.f2152, c0357M2076.f2155, c0357M2076.f2156, 0L, bundleM8121);
                    String str16 = str10;
                    C1694 c1694M69174 = m6917();
                    String str17 = c42393.f16160;
                    C3711 c3711M4601 = c1694M69174.m4601("events", str16, str17);
                    if (c3711M4601 == null) {
                        long jM4616 = m6917().m4616(str16);
                        m6921().getClass();
                        C0511 c0511 = AbstractC3818.f14534;
                        if (jM4616 < Math.max(Math.min(r5.m8310(str16, c0511), 2000), 500) || !zM7606 || m6910().m7662(str17)) {
                            str16 = str16;
                            c30312 = c3031;
                            c3711 = new C3711(str16, str17, 0L, 0L, 0L, c42393.f16165, 0L, null, null, null, null);
                            c4239 = c42393;
                        } else {
                            C1623 c1623M7982 = mo3572().m7982();
                            C0289 c0289M7979 = C3485.m7979(str16);
                            String strM5504 = c11033.m3571().m5504(str17);
                            C3691 c3691M69212 = m6921();
                            c3691M69212.getClass();
                            c1623M7982.m4477("Too many event names used, ignoring event. appId, name, supported count", c0289M7979, strM5504, Integer.valueOf(Math.max(Math.min(c3691M69212.m8310(str16, c0511), 2000), 500)));
                            m6910();
                            C3335.m7610(c3031, str16, 8, null, null, 0);
                        }
                    } else {
                        c30312 = c3031;
                        C4239 c4239M9210 = c42393.m9210(c11033, c3711M4601.f14138);
                        C3711 c3711M8328 = c3711M4601.m8328(c4239M9210.f16165);
                        c4239 = c4239M9210;
                        c3711 = c3711M8328;
                    }
                    m6917().m4594("events", c3711);
                    mo3578().m5243();
                    m6918();
                    String str18 = c4239.f16163;
                    ᵘᵞʿⁱ.ˊᵫᵗ(str18);
                    ᵘᵞʿⁱ.ᵻˈᵦʼ(str18.equals(str16));
                    C0542 c0542M10417 = C5090.m10417();
                    c0542M10417.m2090();
                    c0542M10417.m2127();
                    if (!TextUtils.isEmpty(str16)) {
                        c0542M10417.m2093(str16);
                    }
                    String str19 = c2847.f10924;
                    if (!TextUtils.isEmpty(str19)) {
                        c0542M10417.m2121(str19);
                    }
                    String str20 = c2847.f10915;
                    if (!TextUtils.isEmpty(str20)) {
                        c0542M10417.m2105(str20);
                    }
                    String str21 = c2847.f10897;
                    if (!TextUtils.isEmpty(str21)) {
                        c0542M10417.m2087(str21);
                    }
                    long j6 = c2847.f10914;
                    if (j6 != -2147483648L) {
                        c0542M10417.m2107((int) j6);
                    }
                    long j7 = c2847.f10925;
                    c0542M10417.m2098(j7);
                    if (!TextUtils.isEmpty(str5)) {
                        c0542M10417.m2099(str5);
                    }
                    ᵘᵞʿⁱ.ᵶᵥᵝ(str16);
                    C0875 c0875M6888 = m6888(str16);
                    String str22 = str21;
                    String str23 = c2847.f10926;
                    C0875 c0875M3070 = c0875M6888.m3070(C0875.m3065(100, str23));
                    c0542M10417.m2095(c0875M3070.m3074());
                    C0756.m2702();
                    boolean zM8314 = m6921().m8314(str16, AbstractC3818.f14557);
                    EnumC0174 enumC0174 = EnumC0174.f1599;
                    if (zM8314) {
                        m6910();
                        if (C3335.m7618((String) AbstractC3818.f14565.m1988(null), str16)) {
                            c0542M10417.m2104(c2847.f10902);
                            str7 = str5;
                            str8 = str20;
                            long j8 = c2847.f10900;
                            if (!c0875M3070.m3073(enumC0174) && j8 != 0) {
                                j8 = (j8 & (-2)) | 32;
                            }
                            c0542M10417.m2106(j8 == 1);
                            if (j8 != 0) {
                                C3316 c3316M5068 = C1867.m5068();
                                if ((j8 & 1) != 0) {
                                    j2 = j8;
                                    z3 = true;
                                } else {
                                    j2 = j8;
                                    z3 = false;
                                }
                                c3316M5068.m7591(z3);
                                c3316M5068.m7589((j2 & 2) != 0);
                                c3316M5068.m7590((j2 & 4) != 0);
                                c3316M5068.m7588((j2 & 8) != 0);
                                c3316M5068.m7586((j2 & 16) != 0);
                                c3316M5068.m7585((j2 & 32) != 0);
                                c3316M5068.m7587((j2 & 64) != 0);
                                c0542M10417.m2128((C1867) c3316M5068.m9869());
                            }
                        } else {
                            str7 = str5;
                            str8 = str20;
                        }
                        long j9 = c2847.f10927;
                        if (j9 != 0) {
                            c0542M10417.m2123(j9);
                        }
                        long j10 = c2847.f10908;
                        c0542M10417.m2119(j10);
                        String str24 = str7;
                        String str25 = str8;
                        if (m6921().m8314(null, AbstractC3818.f14588)) {
                            m6921();
                            c0542M10417.m2094(AbstractC4420.m9432());
                        }
                        if (m6921().m8314(null, AbstractC3818.f14573) && (listM4968 = m6914().m4968(str16)) != null) {
                            c0542M10417.m2091(listM4968);
                        }
                        C0875 c0875M30702 = m6888(str16).m3070(C0875.m3065(100, str23));
                        if (c0875M30702.m3073(enumC0174)) {
                            try {
                                boolean z5 = c2847.f10903;
                                if (z5) {
                                    Pair pairM2840 = this.f11122.m2840(c2847, c0875M30702);
                                    if (TextUtils.isEmpty((CharSequence) pairM2840.first) || !z5) {
                                        c42392 = c4239;
                                        j = j10;
                                        c11033.m3576().m9448();
                                        String str26 = Build.MODEL;
                                        c0542M10417.m2122();
                                        c11033.m3576().m9448();
                                        String str27 = Build.VERSION.RELEASE;
                                        c0542M10417.m9868();
                                        ((C5090) c0542M10417.f17955).m10534(str27);
                                        c0542M10417.m2101((int) c11033.m3576().m10152());
                                        c0542M10417.m2114(c11033.m3576().m10153());
                                        c0542M10417.m2085(c2847.f10923);
                                        if (c11033.m3568()) {
                                            c0542M10417.m2096();
                                            if (!TextUtils.isEmpty(null)) {
                                                c0542M10417.m9868();
                                                ((C5090) c0542M10417.f17955).m10569(null);
                                                throw null;
                                            }
                                        }
                                        c2019M45962 = m6917().m4596(str16);
                                        if (c2019M45962 != null) {
                                            c2019M45962 = new C2019(c11033, str16);
                                            c2894 = this;
                                            try {
                                                c2019M45962.m5422(c2894.m6931(c0875M30702));
                                                c2019M45962.m5405(c2847.f10898);
                                                c2019M45962.m5398(str24);
                                                if (c0875M30702.m3073(enumC0174)) {
                                                    c2019M45962.m5397(c2894.f11122.m2841(c2847, c0875M30702));
                                                }
                                                c2019M45962.m5424(0L);
                                                c2019M45962.m5417(0L);
                                                c2019M45962.m5432(0L);
                                                c2019M45962.m5395(str25);
                                                c2019M45962.m5423(j6);
                                                c2019M45962.m5420(str19);
                                                c2019M45962.m5403(j7);
                                                c2019M45962.m5431(j9);
                                                c2019M45962.m5436(z2);
                                                c2019M45962.m5413(j);
                                                i2 = 0;
                                                c2894.m6917().m4624(c2019M45962, false);
                                            } catch (Throwable th2) {
                                                th = th2;
                                            }
                                        } else {
                                            i2 = 0;
                                            c2894 = this;
                                        }
                                        if (c0875M30702.m3073(EnumC0174.f1598) && !TextUtils.isEmpty(c2019M45962.m5396())) {
                                            String strM5396 = c2019M45962.m5396();
                                            ᵘᵞʿⁱ.ᵶᵥᵝ(strM5396);
                                            c0542M10417.m2120(strM5396);
                                        }
                                        if (!TextUtils.isEmpty(c2019M45962.m5408())) {
                                            String strM5408 = c2019M45962.m5408();
                                            ᵘᵞʿⁱ.ᵶᵥᵝ(strM5408);
                                            c0542M10417.m2125(strM5408);
                                        }
                                        listM4617 = c2894.m6917().m4617(str16);
                                        i3 = i2;
                                        while (i3 < listM4617.size()) {
                                            C4243 c4243M10058 = C4822.m10058();
                                            String str28 = ((C4922) listM4617.get(i3)).f18718;
                                            c4243M10058.m9868();
                                            ((C4822) c4243M10058.f17955).m10073(str28);
                                            long j11 = ((C4922) listM4617.get(i3)).f18721;
                                            c4243M10058.m9868();
                                            ((C4822) c4243M10058.f17955).m10059(j11);
                                            c2894.m6933().m5275(c4243M10058, ((C4922) listM4617.get(i3)).f18719);
                                            c0542M10417.m2092(c4243M10058);
                                            if ("_sid".equals(((C4922) listM4617.get(i3)).f18718)) {
                                                C1961 c19613 = c2019M45962.f8027.f4707;
                                                C1103.m3564(c19613);
                                                c19613.m5243();
                                                if (c2019M45962.f8014 != 0) {
                                                    C1962 c1962M6933 = c2894.m6933();
                                                    if (TextUtils.isEmpty(str22)) {
                                                        str9 = str22;
                                                        jM5287 = 0;
                                                    } else {
                                                        str9 = str22;
                                                        jM5287 = c1962M6933.m5287(str9.getBytes(StandardCharsets.UTF_8));
                                                    }
                                                    C1961 c19614 = c2019M45962.f8027.f4707;
                                                    C1103.m3564(c19614);
                                                    c19614.m5243();
                                                    if (jM5287 != c2019M45962.f8014) {
                                                        c0542M10417.m9868();
                                                        ((C5090) c0542M10417.f17955).m10536();
                                                    }
                                                } else {
                                                    str9 = str22;
                                                }
                                            }
                                            i3++;
                                            str22 = str9;
                                        }
                                        try {
                                            c1694M6917 = c2894.m6917();
                                            C5090 c5090 = (C5090) c0542M10417.m9869();
                                            c1694M6917.ˈᵲᵢ();
                                            c1694M6917.m5026();
                                            ᵘᵞʿⁱ.ˊᵫᵗ(c5090.m10481());
                                            byte[] bArrM7714 = c5090.m7714();
                                            long jM52872 = c1694M6917.f18892.m6933().m5287(bArrM7714);
                                            ContentValues contentValues2 = new ContentValues();
                                            String str29 = str2;
                                            contentValues2.put(str29, c5090.m10481());
                                            contentValues2.put("metadata_fingerprint", Long.valueOf(jM52872));
                                            contentValues2.put("metadata", bArrM7714);
                                            try {
                                                c1694M6917.m4625().insertWithOnConflict("raw_events_metadata", null, contentValues2, 4);
                                                c1694M69172 = c2894.m6917();
                                                C4239 c42394 = c42392;
                                                C3590 c35904 = c42394.f16164;
                                                Objects.requireNonNull(c35904);
                                                it = c35904.f13694.keySet().iterator();
                                                while (true) {
                                                    if (it.hasNext()) {
                                                        C1811 c1811M69142 = c2894.m6914();
                                                        String str30 = c42394.f16163;
                                                        boolean zM4970 = c1811M69142.m4970(str30, c42394.f16160);
                                                        C0222 c0222M4611 = c2894.m6917().m4611(c2894.m6929(), str30, false, false, false, false);
                                                        if (!zM4970 || c0222M4611.f1721 >= c2894.m6921().m8310(str30, AbstractC3818.f14541)) {
                                                            i = i2;
                                                        }
                                                    } else if ("_r".equals(it.next())) {
                                                        break;
                                                    }
                                                }
                                                c1694M69172.ˈᵲᵢ();
                                                c1694M69172.m5026();
                                                String str31 = c42394.f16163;
                                                ᵘᵞʿⁱ.ˊᵫᵗ(str31);
                                                byte[] bArrM77142 = c1694M69172.f18892.m6933().m5280(c42394).m7714();
                                                contentValues = new ContentValues();
                                                contentValues.put(str29, str31);
                                                contentValues.put("name", c42394.f16160);
                                                contentValues.put("timestamp", Long.valueOf(c42394.f16165));
                                                contentValues.put("metadata_fingerprint", Long.valueOf(jM52872));
                                                contentValues.put("data", bArrM77142);
                                                contentValues.put("realtime", Integer.valueOf(i));
                                                contentValues.put("elapsed_time", Long.valueOf(c42394.f16162));
                                                try {
                                                    if (c1694M69172.m4625().insert("raw_events", null, contentValues) != -1) {
                                                        ((C1103) ((ᵜᵪʾ) c1694M69172).ˌᴵ).mo3572().m7982().m4474(C3485.m7979(str31), "Failed to insert raw event (got -1). appId");
                                                    } else {
                                                        c2894.f11091 = 0L;
                                                    }
                                                } catch (SQLiteException e2) {
                                                    ((C1103) ((ᵜᵪʾ) c1694M69172).ˌᴵ).mo3572().m7982().m4475("Error storing raw event. appId", C3485.m7979(c42394.f16163), e2);
                                                }
                                            } catch (SQLiteException e3) {
                                                ((C1103) ((ᵜᵪʾ) c1694M6917).ˌᴵ).mo3572().m7982().m4475("Error storing raw event metadata. appId", C3485.m7979(c5090.m10481()), e3);
                                                throw e3;
                                            }
                                        } catch (IOException e4) {
                                            c2894.mo3572().m7982().m4475("Data loss. Failed to insert raw event metadata. appId", C3485.m7979(c0542M10417.m2096()), e4);
                                        }
                                        c2894.m6917().m4605();
                                        c2894.m6917().m4630();
                                        c2894.m6940();
                                        c2894.mo3572().m7983().m4474(Long.valueOf(((System.nanoTime() - jNanoTime) + 500000) / 1000000), "Background event processing time, ms");
                                        return;
                                    }
                                    c0542M10417.m2113((String) pairM2840.first);
                                    Object obj2 = pairM2840.second;
                                    if (obj2 != null) {
                                        c0542M10417.m2109(((Boolean) obj2).booleanValue());
                                    }
                                    String str32 = str3;
                                    if (!c4239.f16160.equals(str32) && !((String) pairM2840.first).equals("00000000-0000-0000-0000-000000000000") && (c2019M4596 = m6917().m4596(str16)) != null) {
                                        C1961 c19615 = c2019M4596.f8027.f4707;
                                        C1103.m3564(c19615);
                                        c19615.m5243();
                                        if (c2019M4596.f8021) {
                                            c42392 = c4239;
                                            m6903(str16, false, null, null);
                                            Bundle bundle2 = new Bundle();
                                            C1961 c19616 = c2019M4596.f8027.f4707;
                                            C1103.m3564(c19616);
                                            c19616.m5243();
                                            Long l = c2019M4596.f8024;
                                            if (l != null) {
                                                j = j10;
                                                bundle2.putLong("_pfo", Math.max(0L, l.longValue()));
                                            } else {
                                                j = j10;
                                            }
                                            C1961 c19617 = c2019M4596.f8027.f4707;
                                            C1103.m3564(c19617);
                                            c19617.m5243();
                                            Long l2 = c2019M4596.f8030;
                                            if (l2 != null) {
                                                bundle2.putLong("_uwa", l2.longValue());
                                            }
                                            bundle2.putLong("_r", 1L);
                                            c30312.mo7126(str16, str32, bundle2);
                                        }
                                        c11033.m3576().m9448();
                                        String str262 = Build.MODEL;
                                        c0542M10417.m2122();
                                        c11033.m3576().m9448();
                                        String str272 = Build.VERSION.RELEASE;
                                        c0542M10417.m9868();
                                        ((C5090) c0542M10417.f17955).m10534(str272);
                                        c0542M10417.m2101((int) c11033.m3576().m10152());
                                        c0542M10417.m2114(c11033.m3576().m10153());
                                        c0542M10417.m2085(c2847.f10923);
                                        if (c11033.m3568()) {
                                        }
                                        c2019M45962 = m6917().m4596(str16);
                                        if (c2019M45962 != null) {
                                        }
                                        if (c0875M30702.m3073(EnumC0174.f1598)) {
                                            String strM53962 = c2019M45962.m5396();
                                            ᵘᵞʿⁱ.ᵶᵥᵝ(strM53962);
                                            c0542M10417.m2120(strM53962);
                                        }
                                        if (!TextUtils.isEmpty(c2019M45962.m5408())) {
                                        }
                                        listM4617 = c2894.m6917().m4617(str16);
                                        i3 = i2;
                                        while (i3 < listM4617.size()) {
                                        }
                                        c1694M6917 = c2894.m6917();
                                        C5090 c50902 = (C5090) c0542M10417.m9869();
                                        c1694M6917.ˈᵲᵢ();
                                        c1694M6917.m5026();
                                        ᵘᵞʿⁱ.ˊᵫᵗ(c50902.m10481());
                                        byte[] bArrM77143 = c50902.m7714();
                                        long jM528722 = c1694M6917.f18892.m6933().m5287(bArrM77143);
                                        ContentValues contentValues22 = new ContentValues();
                                        String str292 = str2;
                                        contentValues22.put(str292, c50902.m10481());
                                        contentValues22.put("metadata_fingerprint", Long.valueOf(jM528722));
                                        contentValues22.put("metadata", bArrM77143);
                                        c1694M6917.m4625().insertWithOnConflict("raw_events_metadata", null, contentValues22, 4);
                                        c1694M69172 = c2894.m6917();
                                        C4239 c423942 = c42392;
                                        C3590 c359042 = c423942.f16164;
                                        Objects.requireNonNull(c359042);
                                        it = c359042.f13694.keySet().iterator();
                                        while (true) {
                                            if (it.hasNext()) {
                                            }
                                        }
                                        c1694M69172.ˈᵲᵢ();
                                        c1694M69172.m5026();
                                        String str312 = c423942.f16163;
                                        ᵘᵞʿⁱ.ˊᵫᵗ(str312);
                                        byte[] bArrM771422 = c1694M69172.f18892.m6933().m5280(c423942).m7714();
                                        contentValues = new ContentValues();
                                        contentValues.put(str292, str312);
                                        contentValues.put("name", c423942.f16160);
                                        contentValues.put("timestamp", Long.valueOf(c423942.f16165));
                                        contentValues.put("metadata_fingerprint", Long.valueOf(jM528722));
                                        contentValues.put("data", bArrM771422);
                                        contentValues.put("realtime", Integer.valueOf(i));
                                        contentValues.put("elapsed_time", Long.valueOf(c423942.f16162));
                                        if (c1694M69172.m4625().insert("raw_events", null, contentValues) != -1) {
                                        }
                                        c2894.m6917().m4605();
                                        c2894.m6917().m4630();
                                        c2894.m6940();
                                        c2894.mo3572().m7983().m4474(Long.valueOf(((System.nanoTime() - jNanoTime) + 500000) / 1000000), "Background event processing time, ms");
                                        return;
                                    }
                                }
                            } catch (Throwable th3) {
                                th = th3;
                                c2894 = this;
                            }
                        }
                    }
                    c2894.m6917().m4630();
                    throw th;
                }
                if (jIntValue % 1000 == 1) {
                    mo3572().m7982().m4475("Data loss. Too many events logged. appId, count", C3485.m7979(str10), Long.valueOf(c0222M4599.f1719));
                }
                m6917().m4605();
                m6917().m4630();
            }
            z = true;
        }
        String strM8122 = c35902.m8122();
        str2 = "app_id";
        Bundle bundle3 = c35902.f13694;
        if (z) {
            double dDoubleValue = c35902.m8120().doubleValue() * 1000000.0d;
            if (dDoubleValue == 0.0d) {
                z2 = z4;
                dDoubleValue = bundle3.getLong("value") * 1000000.0d;
            } else {
                z2 = z4;
            }
            if (dDoubleValue > 9.223372036854776E18d || dDoubleValue < -9.223372036854776E18d) {
                mo3572().m7987().m4475("Data lost. Currency value is too big. appId", C3485.m7979(str10), Double.valueOf(dDoubleValue));
                m6917().m4605();
                m6917().m4630();
            } else {
                jRound = Math.round(dDoubleValue);
                if ("refund".equals(str14)) {
                    jRound = -jRound;
                }
            }
        } else {
            z2 = z4;
            jRound = bundle3.getLong("value");
        }
        if (!TextUtils.isEmpty(strM8122)) {
            String upperCase = strM8122.toUpperCase(Locale.US);
            if (upperCase.matches("[A-Z]{3}")) {
                String strConcat = "_ltv_".concat(upperCase);
                C4922 c4922M46082 = m6917().m4608(str10, strConcat);
                if (c4922M46082 != null) {
                    Object obj3 = c4922M46082.f18719;
                    if (obj3 instanceof Long) {
                        String str33 = c0357M2076.f2153;
                        mo3579().getClass();
                        long jCurrentTimeMillis = System.currentTimeMillis();
                        Long lValueOf = Long.valueOf(((Long) obj3).longValue() + jRound);
                        str4 = str14;
                        str3 = "_fx";
                        str5 = str11;
                        str6 = str;
                        c3590 = c35902;
                        c4922 = new C4922(str10, str33, strConcat, jCurrentTimeMillis, lValueOf);
                    }
                    if (m6917().m4581(c4922)) {
                        mo3572().m7982().m4477("Too many unique user properties are set. Ignoring user property. appId", C3485.m7979(str10), c1103.m3571().m5502(c4922.f18718), c4922.f18719);
                        m6910();
                        C3335.m7610(c30313, str10, 9, null, null, 0);
                        c3031 = c30313;
                    } else {
                        c3031 = c30313;
                    }
                }
                str3 = "_fx";
                long j12 = jRound;
                str4 = str14;
                str5 = str11;
                str6 = str;
                c3590 = c35902;
                C1694 c1694M69175 = m6917();
                int iM8310 = m6921().m8310(str10, AbstractC3818.f14486) - 1;
                ᵘᵞʿⁱ.ˊᵫᵗ(str10);
                c1694M69175.ˈᵲᵢ();
                c1694M69175.m5026();
                c1694M69175.m4625().execSQL("delete from user_attributes where app_id=? and name in (select name from user_attributes where app_id=? and name like '!_ltv!_%' escape '!'order by set_timestamp desc limit ?,10);", new String[]{str10, str10, String.valueOf(iM8310)});
                String str34 = c0357M2076.f2153;
                mo3579().getClass();
                c4922 = new C4922(str10, str34, strConcat, System.currentTimeMillis(), Long.valueOf(j12));
                if (m6917().m4581(c4922)) {
                }
            }
            boolean zM76062 = C3335.m7606(str4);
            String str152 = str4;
            boolean zEquals2 = str6.equals(str152);
            m6910();
            if (c3590 == null) {
            }
            C3590 c359032 = c3590;
            C0222 c0222M45992 = m6917().m4599(m6929(), str10, length + 1, true, zM76062, false, zEquals2, false, false, false);
            long j42 = c0222M45992.f1719;
            m6921();
            jIntValue = j42 - ((long) ((Integer) AbstractC3818.f14564.m1988(null)).intValue());
            if (jIntValue <= 0) {
            }
            m6917().m4630();
        }
        str3 = "_fx";
        str4 = str14;
        str5 = str11;
        c3031 = c30313;
        str6 = str;
        c3590 = c35902;
        boolean zM760622 = C3335.m7606(str4);
        String str1522 = str4;
        boolean zEquals22 = str6.equals(str1522);
        m6910();
        if (c3590 == null) {
        }
        C3590 c3590322 = c3590;
        C0222 c0222M459922 = m6917().m4599(m6929(), str10, length + 1, true, zM760622, false, zEquals22, false, false, false);
        long j422 = c0222M459922.f1719;
        m6921();
        jIntValue = j422 - ((long) ((Integer) AbstractC3818.f14564.m1988(null)).intValue());
        if (jIntValue <= 0) {
        }
        m6917().m4630();
    }

    /* JADX WARN: Removed duplicated region for block: B:32:0x0092  */
    /* JADX WARN: Removed duplicated region for block: B:35:0x0097  */
    /* JADX WARN: Removed duplicated region for block: B:40:0x00a5  */
    /* JADX WARN: Removed duplicated region for block: B:42:0x00b0  */
    /* JADX WARN: Removed duplicated region for block: B:43:0x00b2  */
    /* JADX INFO: renamed from: ᵯˇ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final C1102 m6936(String str, C1102 c1102, C0875 c0875, C2198 c2198) throws Throwable {
        EnumC0174 enumC0174M4954;
        EnumC0174 enumC0174;
        EnumC3695 enumC3695;
        EnumC3695 enumC3695M4956;
        C1811 c1811 = this.f11104;
        m6882(c1811);
        C1699 c1699M4967 = c1811.m4967(str);
        int i = 90;
        EnumC3695 enumC36952 = EnumC3695.f14083;
        EnumC0174 enumC01742 = EnumC0174.f1600;
        if (c1699M4967 == null) {
            if (c1102.m3561() == enumC36952) {
                i = c1102.f4697;
                c2198.m5765(enumC01742, i);
            } else {
                c2198.m5759(enumC01742, EnumC4518.FAILSAFE);
            }
            return new C1102(Boolean.FALSE, i, Boolean.TRUE, "-");
        }
        EnumC3695 enumC3695M3561 = c1102.m3561();
        EnumC3695 enumC36953 = EnumC3695.f14084;
        if (enumC3695M3561 == enumC36953 || enumC3695M3561 == enumC36952) {
            i = c1102.f4697;
            c2198.m5765(enumC01742, i);
        } else {
            EnumC3695 enumC36954 = EnumC3695.f14081;
            EnumC3695 enumC36955 = EnumC3695.f14082;
            if (enumC3695M3561 != enumC36954 || (enumC3695M4956 = c1811.m4956(str, enumC01742)) == enumC36955) {
                c1811.ˈᵲᵢ();
                c1811.m4962(str);
                C1699 c1699M49672 = c1811.m4967(str);
                if (c1699M49672 == null) {
                    enumC0174M4954 = null;
                    EnumMap enumMap = c0875.f3873;
                    enumC0174 = EnumC0174.f1599;
                    enumC3695 = (EnumC3695) enumMap.get(enumC0174);
                    if (enumC3695 != null) {
                        enumC36955 = enumC3695;
                    }
                    boolean z = enumC36955 != enumC36953 || enumC36955 == enumC36952;
                    if (enumC0174M4954 == enumC0174 || !z) {
                        c2198.m5759(enumC01742, EnumC4518.REMOTE_DEFAULT);
                        enumC3695M3561 = true == c1811.m4965(str, enumC01742) ? enumC36952 : enumC36953;
                    } else {
                        c2198.m5759(enumC01742, EnumC4518.REMOTE_DELEGATION);
                        enumC3695M3561 = enumC36955;
                    }
                } else {
                    for (C5082 c5082 : c1699M49672.m4647()) {
                        if (enumC01742 == C1811.m4954(c5082.m10407())) {
                            enumC0174M4954 = C1811.m4954(c5082.m10406());
                            break;
                        }
                    }
                    enumC0174M4954 = null;
                    EnumMap enumMap2 = c0875.f3873;
                    enumC0174 = EnumC0174.f1599;
                    enumC3695 = (EnumC3695) enumMap2.get(enumC0174);
                    if (enumC3695 != null) {
                    }
                    if (enumC36955 != enumC36953) {
                        if (enumC0174M4954 == enumC0174) {
                            c2198.m5759(enumC01742, EnumC4518.REMOTE_DEFAULT);
                            if (true == c1811.m4965(str, enumC01742)) {
                            }
                        }
                    }
                }
            } else {
                c2198.m5759(enumC01742, EnumC4518.REMOTE_ENFORCED_DEFAULT);
                enumC3695M3561 = enumC3695M4956;
            }
        }
        c1811.ˈᵲᵢ();
        c1811.m4962(str);
        C1699 c1699M49673 = c1811.m4967(str);
        boolean z2 = c1699M49673 == null || !c1699M49673.m4651() || c1699M49673.m4650();
        m6882(c1811);
        c1811.ˈᵲᵢ();
        c1811.m4962(str);
        TreeSet treeSet = new TreeSet();
        C1699 c1699M49674 = c1811.m4967(str);
        if (c1699M49674 != null) {
            Iterator it = c1699M49674.m4648().iterator();
            while (it.hasNext()) {
                treeSet.add(((C4467) it.next()).m9506());
            }
        }
        if (enumC3695M3561 == enumC36952 || treeSet.isEmpty()) {
            return new C1102(Boolean.FALSE, i, Boolean.valueOf(z2), "-");
        }
        return new C1102(Boolean.TRUE, i, Boolean.valueOf(z2), z2 ? TextUtils.join("", treeSet) : "");
    }

    /* JADX WARN: Removed duplicated region for block: B:108:0x0169 A[EDGE_INSN: B:108:0x0169->B:55:0x0169 BREAK  A[LOOP:0: B:36:0x010b->B:110:0x010b], SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:23:0x0086 A[Catch: all -> 0x0018, TryCatch #1 {all -> 0x0018, blocks: (B:4:0x0015, B:8:0x001d, B:10:0x002a, B:11:0x0034, B:19:0x0048, B:24:0x0098, B:23:0x0086, B:25:0x00a5, B:27:0x00ba, B:30:0x00d0, B:32:0x00de, B:34:0x00fa, B:83:0x0233, B:85:0x0246, B:87:0x0251, B:95:0x0270, B:89:0x0257, B:91:0x0260, B:93:0x0266, B:94:0x026a, B:96:0x0273, B:97:0x027b, B:33:0x00ef, B:98:0x027c), top: B:104:0x0015, inners: #3 }] */
    /* JADX WARN: Removed duplicated region for block: B:25:0x00a5 A[Catch: all -> 0x0018, PHI: r0
      0x00a5: PHI (r0v2 int) = (r0v0 int), (r0v36 int) binds: [B:12:0x003b, B:18:0x0046] A[DONT_GENERATE, DONT_INLINE], TRY_LEAVE, TryCatch #1 {all -> 0x0018, blocks: (B:4:0x0015, B:8:0x001d, B:10:0x002a, B:11:0x0034, B:19:0x0048, B:24:0x0098, B:23:0x0086, B:25:0x00a5, B:27:0x00ba, B:30:0x00d0, B:32:0x00de, B:34:0x00fa, B:83:0x0233, B:85:0x0246, B:87:0x0251, B:95:0x0270, B:89:0x0257, B:91:0x0260, B:93:0x0266, B:94:0x026a, B:96:0x0273, B:97:0x027b, B:33:0x00ef, B:98:0x027c), top: B:104:0x0015, inners: #3 }] */
    /* JADX WARN: Removed duplicated region for block: B:32:0x00de A[Catch: all -> 0x0018, SQLiteException -> 0x00cd, TryCatch #3 {SQLiteException -> 0x00cd, blocks: (B:27:0x00ba, B:30:0x00d0, B:32:0x00de, B:34:0x00fa, B:83:0x0233, B:85:0x0246, B:87:0x0251, B:95:0x0270, B:89:0x0257, B:91:0x0260, B:93:0x0266, B:94:0x026a, B:96:0x0273, B:97:0x027b, B:33:0x00ef), top: B:107:0x00ba, outer: #1 }] */
    /* JADX WARN: Removed duplicated region for block: B:33:0x00ef A[Catch: all -> 0x0018, SQLiteException -> 0x00cd, TryCatch #3 {SQLiteException -> 0x00cd, blocks: (B:27:0x00ba, B:30:0x00d0, B:32:0x00de, B:34:0x00fa, B:83:0x0233, B:85:0x0246, B:87:0x0251, B:95:0x0270, B:89:0x0257, B:91:0x0260, B:93:0x0266, B:94:0x026a, B:96:0x0273, B:97:0x027b, B:33:0x00ef), top: B:107:0x00ba, outer: #1 }] */
    /* JADX WARN: Removed duplicated region for block: B:39:0x0115 A[Catch: all -> 0x0166, TRY_ENTER, TRY_LEAVE, TryCatch #0 {all -> 0x0166, blocks: (B:35:0x0102, B:36:0x010b, B:39:0x0115, B:42:0x0129, B:44:0x0135, B:45:0x0137, B:49:0x014e, B:51:0x0158, B:55:0x0169, B:56:0x016e, B:58:0x0174, B:60:0x0187, B:62:0x019e, B:63:0x01a0, B:65:0x01b2, B:67:0x01ce, B:69:0x01f2, B:70:0x0201, B:72:0x0208, B:73:0x0210, B:76:0x021f, B:78:0x0223, B:81:0x022a, B:82:0x022b), top: B:103:0x0102, inners: #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:58:0x0174 A[Catch: all -> 0x0166, TryCatch #0 {all -> 0x0166, blocks: (B:35:0x0102, B:36:0x010b, B:39:0x0115, B:42:0x0129, B:44:0x0135, B:45:0x0137, B:49:0x014e, B:51:0x0158, B:55:0x0169, B:56:0x016e, B:58:0x0174, B:60:0x0187, B:62:0x019e, B:63:0x01a0, B:65:0x01b2, B:67:0x01ce, B:69:0x01f2, B:70:0x0201, B:72:0x0208, B:73:0x0210, B:76:0x021f, B:78:0x0223, B:81:0x022a, B:82:0x022b), top: B:103:0x0102, inners: #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:67:0x01ce A[Catch: all -> 0x0166, TryCatch #0 {all -> 0x0166, blocks: (B:35:0x0102, B:36:0x010b, B:39:0x0115, B:42:0x0129, B:44:0x0135, B:45:0x0137, B:49:0x014e, B:51:0x0158, B:55:0x0169, B:56:0x016e, B:58:0x0174, B:60:0x0187, B:62:0x019e, B:63:0x01a0, B:65:0x01b2, B:67:0x01ce, B:69:0x01f2, B:70:0x0201, B:72:0x0208, B:73:0x0210, B:76:0x021f, B:78:0x0223, B:81:0x022a, B:82:0x022b), top: B:103:0x0102, inners: #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:72:0x0208 A[Catch: all -> 0x0166, TRY_LEAVE, TryCatch #0 {all -> 0x0166, blocks: (B:35:0x0102, B:36:0x010b, B:39:0x0115, B:42:0x0129, B:44:0x0135, B:45:0x0137, B:49:0x014e, B:51:0x0158, B:55:0x0169, B:56:0x016e, B:58:0x0174, B:60:0x0187, B:62:0x019e, B:63:0x01a0, B:65:0x01b2, B:67:0x01ce, B:69:0x01f2, B:70:0x0201, B:72:0x0208, B:73:0x0210, B:76:0x021f, B:78:0x0223, B:81:0x022a, B:82:0x022b), top: B:103:0x0102, inners: #2 }] */
    /* JADX WARN: Removed duplicated region for block: B:85:0x0246 A[Catch: all -> 0x0018, SQLiteException -> 0x00cd, TryCatch #3 {SQLiteException -> 0x00cd, blocks: (B:27:0x00ba, B:30:0x00d0, B:32:0x00de, B:34:0x00fa, B:83:0x0233, B:85:0x0246, B:87:0x0251, B:95:0x0270, B:89:0x0257, B:91:0x0260, B:93:0x0266, B:94:0x026a, B:96:0x0273, B:97:0x027b, B:33:0x00ef), top: B:107:0x00ba, outer: #1 }] */
    /* JADX WARN: Removed duplicated region for block: B:89:0x0257 A[Catch: all -> 0x0018, SQLiteException -> 0x00cd, TryCatch #3 {SQLiteException -> 0x00cd, blocks: (B:27:0x00ba, B:30:0x00d0, B:32:0x00de, B:34:0x00fa, B:83:0x0233, B:85:0x0246, B:87:0x0251, B:95:0x0270, B:89:0x0257, B:91:0x0260, B:93:0x0266, B:94:0x026a, B:96:0x0273, B:97:0x027b, B:33:0x00ef), top: B:107:0x00ba, outer: #1 }] */
    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m6937(boolean z, int i, Throwable th, byte[] bArr, String str, List list, Map map) {
        byte[] bArr2;
        Iterator it;
        boolean zHasNext;
        EnumC4563 enumC4563;
        Iterator it2;
        List listM4618;
        int size;
        int i2;
        int i3 = i;
        C5004 c5004 = this.f11112;
        mo3578().m5243();
        m6918();
        if (bArr == null) {
            try {
                bArr2 = new byte[0];
            } catch (Throwable th2) {
                this.f11087 = false;
                m6915();
                throw th2;
            }
        } else {
            bArr2 = bArr;
        }
        if (m6921().m8314(null, AbstractC3818.f14549)) {
            C1962 c1962 = this.f11095;
            m6882(c1962);
            c1962.m5279(map);
        }
        ArrayList arrayList = this.f11099;
        ᵘᵞʿⁱ.ᵶᵥᵝ(arrayList);
        this.f11099 = null;
        if (!z) {
            C1623 c1623 = mo3572().f13414;
            Integer numValueOf = Integer.valueOf(i3);
            c1623.m4475("Network upload successful with code, uploadAttempted", numValueOf, Boolean.valueOf(z));
            if (z) {
                try {
                    C2594 c2594 = this.f11122.f3528;
                    mo3579().getClass();
                    c2594.m6316(System.currentTimeMillis());
                    this.f11122.f3533.m6316(0L);
                    m6940();
                    if (z) {
                        mo3572().f13414.m4476("Purged empty bundles");
                    } else {
                        mo3572().f13414.m4475("Successful upload. Got network response. code, size", numValueOf, Integer.valueOf(bArr2.length));
                    }
                    C1694 c1694 = this.f11109;
                    m6882(c1694);
                    c1694.m4629();
                    try {
                        HashMap map2 = new HashMap();
                        it = list.iterator();
                        while (true) {
                            zHasNext = it.hasNext();
                            enumC4563 = EnumC4563.f17348;
                            if (zHasNext) {
                                break;
                            }
                            Pair pair = (Pair) it.next();
                            C1027 c1027 = (C1027) pair.first;
                            C2788 c2788 = (C2788) pair.second;
                            EnumC4563 enumC45632 = c2788.f10728;
                            EnumC4563 enumC45633 = c2788.f10728;
                            if (enumC45632 != enumC4563) {
                                C1694 c16942 = this.f11109;
                                m6882(c16942);
                                String str2 = c2788.f10729;
                                Map map3 = c2788.f10727;
                                if (map3 == null) {
                                    map3 = Collections.EMPTY_MAP;
                                }
                                long jM4580 = c16942.m4580(str, c1027, str2, map3, enumC45633, null);
                                if (enumC45633 == EnumC4563.f17349 && jM4580 != -1 && !c1027.m3419().isEmpty()) {
                                    map2.put(c1027.m3419(), Long.valueOf(jM4580));
                                }
                            }
                        }
                        it2 = list.iterator();
                        while (it2.hasNext()) {
                            Pair pair2 = (Pair) it2.next();
                            C1027 c10272 = (C1027) pair2.first;
                            C2788 c27882 = (C2788) pair2.second;
                            if (c27882.f10728 == enumC4563) {
                                Long l = (Long) map2.get(c10272.m3419());
                                C1694 c16943 = this.f11109;
                                m6882(c16943);
                                EnumC4563 enumC45634 = enumC4563;
                                String str3 = c27882.f10729;
                                Map map4 = c27882.f10727;
                                if (map4 == null) {
                                    map4 = Collections.EMPTY_MAP;
                                }
                                c16943.m4580(str, c10272, str3, map4, c27882.f10728, l);
                                enumC4563 = enumC45634;
                            }
                        }
                        C1694 c16944 = this.f11109;
                        m6882(c16944);
                        listM4618 = c16944.m4618(str, C4920.m10221(enumC4563), 1);
                        if (!listM4618.isEmpty()) {
                            long j = ((C0399) listM4618.get(0)).f2271;
                            mo3579().getClass();
                            if (System.currentTimeMillis() > ((Long) AbstractC3818.f14479.m1988(null)).longValue() + j) {
                                mo3572().f13424.m4475("[sgtm] client batches are queued too long. appId, creationTime", str, Long.valueOf(j));
                            }
                        }
                        size = arrayList.size();
                        i2 = 0;
                        while (i2 < size) {
                            int i4 = i2 + 1;
                            Long l2 = (Long) arrayList.get(i2);
                            try {
                                C1694 c16945 = this.f11109;
                                m6882(c16945);
                                c16945.m4600(l2.longValue());
                            } catch (SQLiteException e) {
                                ArrayList arrayList2 = this.f11092;
                                if (arrayList2 == null || !arrayList2.contains(l2)) {
                                    throw e;
                                }
                            }
                            i2 = i4;
                        }
                        C1694 c16946 = this.f11109;
                        m6882(c16946);
                        c16946.m4605();
                        C1694 c16947 = this.f11109;
                        m6882(c16947);
                        c16947.m4630();
                        this.f11092 = null;
                        m6882(c5004);
                        if (!c5004.m10343()) {
                            C1694 c16948 = this.f11109;
                            m6882(c16948);
                            if (c16948.m4595(str)) {
                                m6912(str);
                            } else {
                                m6882(c5004);
                                if (c5004.m10343() && m6920()) {
                                    m6938();
                                } else {
                                    this.f11090 = -1L;
                                    m6940();
                                }
                            }
                            this.f11091 = 0L;
                        }
                    } catch (Throwable th3) {
                        C1694 c16949 = this.f11109;
                        m6882(c16949);
                        c16949.m4630();
                        throw th3;
                    }
                } catch (SQLiteException e2) {
                    mo3572().f13423.m4474(e2, "Database error while trying to delete uploaded bundles");
                    mo3579().getClass();
                    this.f11091 = SystemClock.elapsedRealtime();
                    mo3572().f13414.m4474(Long.valueOf(this.f11091), "Disable upload, time");
                }
            } else {
                this.f11122.f3533.m6316(0L);
                m6940();
                if (z) {
                }
                C1694 c169410 = this.f11109;
                m6882(c169410);
                c169410.m4629();
                HashMap map22 = new HashMap();
                it = list.iterator();
                while (true) {
                    zHasNext = it.hasNext();
                    enumC4563 = EnumC4563.f17348;
                    if (zHasNext) {
                    }
                }
                it2 = list.iterator();
                while (it2.hasNext()) {
                }
                C1694 c169442 = this.f11109;
                m6882(c169442);
                listM4618 = c169442.m4618(str, C4920.m10221(enumC4563), 1);
                if (!listM4618.isEmpty()) {
                }
                size = arrayList.size();
                i2 = 0;
                while (i2 < size) {
                }
                C1694 c169462 = this.f11109;
                m6882(c169462);
                c169462.m4605();
                C1694 c169472 = this.f11109;
                m6882(c169472);
                c169472.m4630();
                this.f11092 = null;
                m6882(c5004);
                if (!c5004.m10343()) {
                }
            }
        } else if (i3 != 200) {
            if (i3 == 204) {
                i3 = 204;
                if (th == null) {
                }
            }
            String str4 = new String(bArr2, StandardCharsets.UTF_8);
            mo3572().f13413.m4477("Network upload failed. Will retry later. code, error", Integer.valueOf(i3), th, str4.substring(0, Math.min(32, str4.length())));
            C2594 c25942 = this.f11122.f3533;
            mo3579().getClass();
            c25942.m6316(System.currentTimeMillis());
            if (i3 != 503) {
                C2594 c25943 = this.f11122.f3527;
                mo3579().getClass();
                c25943.m6316(System.currentTimeMillis());
                C1694 c169411 = this.f11109;
                m6882(c169411);
                c169411.m4614(arrayList);
                m6940();
            }
        } else if (th == null) {
            String str42 = new String(bArr2, StandardCharsets.UTF_8);
            mo3572().f13413.m4477("Network upload failed. Will retry later. code, error", Integer.valueOf(i3), th, str42.substring(0, Math.min(32, str42.length())));
            C2594 c259422 = this.f11122.f3533;
            mo3579().getClass();
            c259422.m6316(System.currentTimeMillis());
            if (i3 != 503 || i3 == 429) {
                C2594 c259432 = this.f11122.f3527;
                mo3579().getClass();
                c259432.m6316(System.currentTimeMillis());
            }
            C1694 c1694112 = this.f11109;
            m6882(c1694112);
            c1694112.m4614(arrayList);
            m6940();
        }
        this.f11087 = false;
        m6915();
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:73:0x01ab A[Catch: all -> 0x0028, TryCatch #4 {all -> 0x0028, blocks: (B:3:0x000e, B:5:0x001b, B:8:0x002b, B:10:0x0031, B:11:0x003e, B:13:0x0046, B:14:0x004b, B:16:0x0056, B:17:0x0063, B:19:0x006e, B:20:0x007e, B:22:0x00a8, B:24:0x00ae, B:25:0x00b1, B:27:0x00ca, B:28:0x00df, B:30:0x00f0, B:32:0x00f6, B:35:0x010b, B:45:0x012a, B:47:0x012f, B:48:0x0132, B:49:0x0133, B:50:0x0138, B:55:0x017d, B:71:0x01a5, B:73:0x01ab, B:75:0x01b6, B:79:0x01c1, B:80:0x01c4, B:33:0x00fb, B:37:0x010f, B:42:0x0117), top: B:91:0x000e, inners: #1 }] */
    /* JADX WARN: Type inference failed for: r11v0, types: [ᵜᵻ] */
    /* JADX WARN: Type inference failed for: r1v12, types: [long] */
    /* JADX WARN: Type inference failed for: r1v13 */
    /* JADX WARN: Type inference failed for: r1v17 */
    /* JADX WARN: Type inference failed for: r1v18 */
    /* JADX WARN: Type inference failed for: r1v22, types: [android.database.Cursor] */
    /* JADX WARN: Type inference failed for: r1v25, types: [android.database.Cursor] */
    /* JADX WARN: Type inference failed for: r7v0 */
    /* JADX WARN: Type inference failed for: r7v1 */
    /* JADX WARN: Type inference failed for: r7v2, types: [android.database.Cursor] */
    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$UnknownArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m6938() {
        C1694 c1694;
        long jLongValue;
        SQLiteException e;
        mo3578().m5243();
        m6918();
        this.f11096 = true;
        try {
            C1103 c1103 = this.f11114;
            c1103.getClass();
            Boolean bool = c1103.m3573().f6479;
            if (bool == null) {
                mo3572().f13424.m4476("Upload data called on the client side before use of service was decided");
            } else if (bool.booleanValue()) {
                mo3572().f13423.m4476("Upload called in the client side when service should be used");
            } else if (this.f11091 > 0) {
                m6940();
            } else {
                mo3578().m5243();
                if (this.f11099 != null) {
                    mo3572().f13414.m4476("Uploading requested multiple times");
                } else {
                    C5004 c5004 = this.f11112;
                    m6882(c5004);
                    if (c5004.m10343()) {
                        mo3579().getClass();
                        ?? CurrentTimeMillis = System.currentTimeMillis();
                        ?? r7 = 0;
                        cursorRawQuery = null;
                        Cursor cursorRawQuery = null;
                        string = null;
                        string = null;
                        String string = null;
                        int iM8310 = m6921().m8310(null, AbstractC3818.f14560);
                        m6921();
                        long jLongValue2 = CurrentTimeMillis - ((Long) AbstractC3818.f14554.m1988(null)).longValue();
                        for (int i = 0; i < iM8310 && m6893(jLongValue2, null); i++) {
                        }
                        C0756.m2702();
                        mo3578().m5243();
                        m6900();
                        long jM6318 = this.f11122.f3528.m6318();
                        if (jM6318 != 0) {
                            mo3572().f13416.m4474(Long.valueOf(Math.abs(CurrentTimeMillis - jM6318)), "Uploading events. Elapsed time since last upload attempt (ms)");
                        }
                        C1694 c16942 = this.f11109;
                        m6882(c16942);
                        String strM4586 = c16942.m4586();
                        long j = -1;
                        if (TextUtils.isEmpty(strM4586)) {
                            try {
                                this.f11090 = -1L;
                                c1694 = this.f11109;
                                m6882(c1694);
                                m6921();
                                jLongValue = CurrentTimeMillis - ((Long) AbstractC3818.f14554.m1988(null)).longValue();
                                c1694.ˈᵲᵢ();
                                c1694.m5026();
                            } catch (Throwable th) {
                                th = th;
                                r7 = CurrentTimeMillis;
                            }
                            try {
                                CurrentTimeMillis = c1694.m4625().rawQuery("select app_id from apps where app_id in (select distinct app_id from raw_events) and config_fetched_time < ? order by failed_config_fetch_time limit 1;", new String[]{String.valueOf(jLongValue)});
                                try {
                                    if (CurrentTimeMillis.moveToFirst()) {
                                        string = CurrentTimeMillis.getString(0);
                                    } else {
                                        C3485 c3485 = ((C1103) ((ᵜᵪʾ) c1694).ˌᴵ).f4729;
                                        C1103.m3564(c3485);
                                        c3485.f13414.m4476("No expired configs for apps with pending events");
                                    }
                                } catch (SQLiteException e2) {
                                    e = e2;
                                    C3485 c34852 = ((C1103) ((ᵜᵪʾ) c1694).ˌᴵ).f4729;
                                    C1103.m3564(c34852);
                                    c34852.f13423.m4474(e, "Error selecting expired configs");
                                    if (CurrentTimeMillis != 0) {
                                    }
                                    if (!TextUtils.isEmpty(string)) {
                                    }
                                    this.f11096 = false;
                                    m6915();
                                }
                            } catch (SQLiteException e3) {
                                e = e3;
                                CurrentTimeMillis = 0;
                            } catch (Throwable th2) {
                                th = th2;
                                throw th;
                            }
                            CurrentTimeMillis.close();
                            if (!TextUtils.isEmpty(string)) {
                                C1694 c16943 = this.f11109;
                                m6882(c16943);
                                C2019 c2019M4596 = c16943.m4596(string);
                                if (c2019M4596 != null) {
                                    m6942(c2019M4596);
                                }
                            }
                        } else {
                            if (this.f11090 == -1) {
                                C1694 c16944 = this.f11109;
                                m6882(c16944);
                                try {
                                    try {
                                        cursorRawQuery = c16944.m4625().rawQuery("select rowid from raw_events order by rowid desc limit 1;", null);
                                        if (cursorRawQuery.moveToFirst()) {
                                            j = cursorRawQuery.getLong(0);
                                        }
                                    } finally {
                                        if (cursorRawQuery != null) {
                                            cursorRawQuery.close();
                                        }
                                    }
                                } catch (SQLiteException e4) {
                                    C3485 c34853 = ((C1103) ((ᵜᵪʾ) c16944).ˌᴵ).f4729;
                                    C1103.m3564(c34853);
                                    c34853.f13423.m4474(e4, "Error querying raw events");
                                    if (cursorRawQuery != null) {
                                    }
                                    this.f11090 = j;
                                    m6901(CurrentTimeMillis, strM4586);
                                    this.f11096 = false;
                                    m6915();
                                }
                                cursorRawQuery.close();
                                this.f11090 = j;
                            }
                            m6901(CurrentTimeMillis, strM4586);
                        }
                    } else {
                        mo3572().f13414.m4476("Network not connected, ignoring upload request");
                        m6940();
                    }
                }
            }
            this.f11096 = false;
            m6915();
        } catch (Throwable th3) {
            this.f11096 = false;
            m6915();
            throw th3;
        }
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final void m6939(C0357 c0357, C2847 c2847) throws Throwable {
        List listM4623;
        C1103 c1103;
        List listM46232;
        List listM46233;
        Iterator it;
        String str;
        ᵘᵞʿⁱ.ᵶᵥᵝ(c2847);
        String str2 = c2847.f10910;
        ᵘᵞʿⁱ.ˊᵫᵗ(str2);
        mo3578().m5243();
        m6918();
        long j = c0357.f2155;
        long j2 = c0357.f2156;
        C0536 c0536M2075 = C0536.m2075(c0357);
        mo3578().m5243();
        C3160 c3160 = this.f11116;
        if (c3160 == null || (str = this.f11102) == null || !str.equals(str2)) {
            c3160 = null;
        }
        C3335.m7622(c3160, c0536M2075.f2757, false);
        C0357 c0357M2076 = c0536M2075.m2076();
        m6933();
        if (TextUtils.isEmpty(c2847.f10918)) {
            return;
        }
        if (!c2847.f10911) {
            m6894(c2847);
            return;
        }
        List list = c2847.f10917;
        if (list != null) {
            String str3 = c0357M2076.f2152;
            if (!list.contains(str3)) {
                mo3572().f13416.m4477("Dropping non-safelisted event. appId, event name, origin", str2, str3, c0357M2076.f2153);
                return;
            } else {
                Bundle bundleM8121 = c0357M2076.f2154.m8121();
                bundleM8121.putLong("ga_safelisted", 1L);
                c0357M2076 = new C0357(str3, new C3590(bundleM8121), c0357M2076.f2153, c0357M2076.f2155, c0357M2076.f2156);
            }
        }
        C1694 c1694 = this.f11109;
        m6882(c1694);
        c1694.m4629();
        try {
            String str4 = c0357M2076.f2152;
            if ("_s".equals(str4)) {
                C1694 c16942 = this.f11109;
                m6882(c16942);
                if (!c16942.m4593(str2, "_s") && c0357M2076.f2154.f13694.getLong("_sid") != 0) {
                    C1694 c16943 = this.f11109;
                    m6882(c16943);
                    if (c16943.m4593(str2, "_f")) {
                        C1694 c16944 = this.f11109;
                        m6882(c16944);
                        c16944.m4587(str2, null, "_sid", m6943(str2, c0357M2076));
                    } else {
                        C1694 c16945 = this.f11109;
                        m6882(c16945);
                        if (c16945.m4593(str2, "_v")) {
                            C1694 c169442 = this.f11109;
                            m6882(c169442);
                            c169442.m4587(str2, null, "_sid", m6943(str2, c0357M2076));
                        } else {
                            C1694 c16946 = this.f11109;
                            m6882(c16946);
                            mo3579().getClass();
                            c16946.m4587(str2, Long.valueOf(System.currentTimeMillis() - 15000), "_sid", m6943(str2, c0357M2076));
                        }
                    }
                }
            }
            C1694 c16947 = this.f11109;
            m6882(c16947);
            ᵘᵞʿⁱ.ˊᵫᵗ(str2);
            c16947.ˈᵲᵢ();
            c16947.m5026();
            int i = (j > 0L ? 1 : (j == 0L ? 0 : -1));
            if (i < 0) {
                C3485 c3485 = ((C1103) ((ᵜᵪʾ) c16947).ˌᴵ).f4729;
                C1103.m3564(c3485);
                c3485.f13424.m4475("Invalid time querying timed out conditional properties", C3485.m7979(str2), Long.valueOf(j));
                listM4623 = Collections.EMPTY_LIST;
            } else {
                listM4623 = c16947.m4623("active=0 and app_id=? and abs(? - creation_timestamp) > trigger_timeout", new String[]{str2, String.valueOf(j)});
            }
            Iterator it2 = listM4623.iterator();
            while (true) {
                boolean zHasNext = it2.hasNext();
                c1103 = this.f11114;
                if (!zHasNext) {
                    break;
                }
                C3833 c3833 = (C3833) it2.next();
                if (c3833 != null) {
                    Iterator it3 = it2;
                    mo3572().f13414.m4477("User property timed out", c3833.f14633, c1103.f4717.m5502(c3833.f14636.f4262), c3833.f14636.m3298());
                    C0357 c03572 = c3833.f14632;
                    if (c03572 != null) {
                        m6935(new C0357(c03572, j, j2), c2847);
                    }
                    C1694 c16948 = this.f11109;
                    m6882(c16948);
                    c16948.m4584(str2, c3833.f14636.f4262);
                    it2 = it3;
                }
            }
            C1694 c16949 = this.f11109;
            m6882(c16949);
            ᵘᵞʿⁱ.ˊᵫᵗ(str2);
            c16949.ˈᵲᵢ();
            c16949.m5026();
            if (i < 0) {
                C3485 c34852 = ((C1103) ((ᵜᵪʾ) c16949).ˌᴵ).f4729;
                C1103.m3564(c34852);
                c34852.f13424.m4475("Invalid time querying expired conditional properties", C3485.m7979(str2), Long.valueOf(j));
                listM46232 = Collections.EMPTY_LIST;
            } else {
                listM46232 = c16949.m4623("active<>0 and app_id=? and abs(? - triggered_timestamp) > time_to_live", new String[]{str2, String.valueOf(j)});
            }
            ArrayList arrayList = new ArrayList(listM46232.size());
            Iterator it4 = listM46232.iterator();
            while (it4.hasNext()) {
                C3833 c38332 = (C3833) it4.next();
                if (c38332 != null) {
                    Iterator it5 = it4;
                    int i2 = i;
                    long j3 = j;
                    mo3572().f13414.m4477("User property expired", c38332.f14633, c1103.f4717.m5502(c38332.f14636.f4262), c38332.f14636.m3298());
                    C1694 c169410 = this.f11109;
                    m6882(c169410);
                    c169410.m4631(str2, c38332.f14636.f4262);
                    C0357 c03573 = c38332.f14631;
                    if (c03573 != null) {
                        arrayList.add(c03573);
                    }
                    C1694 c169411 = this.f11109;
                    m6882(c169411);
                    c169411.m4584(str2, c38332.f14636.f4262);
                    it4 = it5;
                    i = i2;
                    j = j3;
                }
            }
            int i3 = i;
            long j4 = j;
            int size = arrayList.size();
            int i4 = 0;
            while (i4 < size) {
                Object obj = arrayList.get(i4);
                i4++;
                long j5 = j4;
                m6935(new C0357((C0357) obj, j5, j2), c2847);
                j4 = j5;
                j2 = j2;
            }
            long j6 = j2;
            long j7 = j4;
            C1694 c169412 = this.f11109;
            m6882(c169412);
            ᵘᵞʿⁱ.ˊᵫᵗ(str2);
            ᵘᵞʿⁱ.ˊᵫᵗ(str4);
            c169412.ˈᵲᵢ();
            c169412.m5026();
            if (i3 < 0) {
                C1103 c11032 = (C1103) ((ᵜᵪʾ) c169412).ˌᴵ;
                C3485 c34853 = c11032.f4729;
                C1103.m3564(c34853);
                c34853.f13424.m4477("Invalid time querying triggered conditional properties", C3485.m7979(str2), c11032.f4717.m5504(str4), Long.valueOf(j7));
                listM46233 = Collections.EMPTY_LIST;
            } else {
                listM46233 = c169412.m4623("active=0 and app_id=? and trigger_event_name=? and abs(? - creation_timestamp) <= trigger_timeout", new String[]{str2, str4, String.valueOf(j7)});
            }
            ArrayList arrayList2 = new ArrayList(listM46233.size());
            Iterator it6 = listM46233.iterator();
            while (it6.hasNext()) {
                C3833 c38333 = (C3833) it6.next();
                if (c38333 != null) {
                    C0973 c0973 = c38333.f14636;
                    String str5 = c38333.f14633;
                    ᵘᵞʿⁱ.ᵶᵥᵝ(str5);
                    long j8 = j7;
                    String str6 = c38333.f14637;
                    String str7 = c0973.f4262;
                    Object objM3298 = c0973.m3298();
                    ᵘᵞʿⁱ.ᵶᵥᵝ(objM3298);
                    C4922 c4922 = new C4922(str5, str6, str7, j8, objM3298);
                    j7 = j8;
                    Object obj2 = c4922.f18719;
                    String str8 = c4922.f18718;
                    C1694 c169413 = this.f11109;
                    m6882(c169413);
                    if (c169413.m4581(c4922)) {
                        it = it6;
                        mo3572().f13414.m4477("User property triggered", c38333.f14633, c1103.f4717.m5502(str8), obj2);
                    } else {
                        it = it6;
                        mo3572().f13423.m4477("Too many active user properties, ignoring", C3485.m7979(c38333.f14633), c1103.f4717.m5502(str8), obj2);
                    }
                    C0357 c03574 = c38333.f14641;
                    if (c03574 != null) {
                        arrayList2.add(c03574);
                    }
                    c38333.f14636 = new C0973(c4922);
                    c38333.f14639 = true;
                    C1694 c169414 = this.f11109;
                    m6882(c169414);
                    c169414.m4620(c38333);
                    it6 = it;
                }
            }
            m6935(c0357M2076, c2847);
            int size2 = arrayList2.size();
            int i5 = 0;
            while (i5 < size2) {
                Object obj3 = arrayList2.get(i5);
                i5++;
                long j9 = j6;
                m6935(new C0357((C0357) obj3, j7, j9), c2847);
                j6 = j9;
            }
            C1694 c169415 = this.f11109;
            m6882(c169415);
            c169415.m4605();
            C1694 c169416 = this.f11109;
            m6882(c169416);
            c169416.m4630();
        } catch (Throwable th) {
            C1694 c169417 = this.f11109;
            m6882(c169417);
            c169417.m4630();
            throw th;
        }
    }

    @Override // defpackage.InterfaceC1959
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final ᵖˊʨ mo3577() {
        return this.f11114.f4718;
    }

    /* JADX WARN: Removed duplicated region for block: B:15:0x008d  */
    /* JADX WARN: Removed duplicated region for block: B:89:0x0328  */
    /* JADX INFO: renamed from: ᵵᵬᵽ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m6940() {
        boolean z;
        long jMax;
        long jMax2;
        Integer num;
        int iIntValue;
        C1962 c1962 = this.f11095;
        mo3578().m5243();
        m6918();
        if (this.f11091 > 0) {
            mo3579().getClass();
            long jAbs = 3600000 - Math.abs(SystemClock.elapsedRealtime() - this.f11091);
            if (jAbs > 0) {
                mo3572().f13414.m4474(Long.valueOf(jAbs), "Upload has been suspended. Will update scheduling later in approximately ms");
                m6932().m6216();
                C3647 c3647 = this.f11119;
                m6882(c3647);
                c3647.m8215();
                return;
            }
            this.f11091 = 0L;
        }
        if (!this.f11114.m3581() || !m6920()) {
            mo3572().f13414.m4476("Nothing to upload or uploading impossible");
            m6932().m6216();
            C3647 c36472 = this.f11119;
            m6882(c36472);
            c36472.m8215();
            return;
        }
        mo3579().getClass();
        long jCurrentTimeMillis = System.currentTimeMillis();
        m6921();
        long jMax3 = Math.max(0L, ((Long) AbstractC3818.f14476.m1988(null)).longValue());
        C1694 c1694 = this.f11109;
        m6882(c1694);
        if (c1694.m4613("select count(1) > 0 from raw_events where realtime = 1", null) != 0) {
            z = true;
        } else {
            C1694 c16942 = this.f11109;
            m6882(c16942);
            if (c16942.m4613("select count(1) > 0 from queue where has_realtime = 1", null) == 0) {
                z = false;
            }
        }
        if (z) {
            String strM8304 = m6921().m8304("debug.firebase.analytics.app");
            if (TextUtils.isEmpty(strM8304) || ".none.".equals(strM8304)) {
                m6921();
                jMax = Math.max(0L, ((Long) AbstractC3818.f14485.m1988(null)).longValue());
            } else {
                m6921();
                jMax = Math.max(0L, ((Long) AbstractC3818.f14507.m1988(null)).longValue());
            }
        } else {
            m6921();
            jMax = Math.max(0L, ((Long) AbstractC3818.f14487.m1988(null)).longValue());
        }
        long jM6318 = this.f11122.f3528.m6318();
        long jM63182 = this.f11122.f3533.m6318();
        C1694 c16943 = this.f11109;
        m6882(c16943);
        long jM4582 = c16943.m4582("select max(bundle_end_timestamp) from queue", null, 0L);
        C1694 c16944 = this.f11109;
        m6882(c16944);
        long jMax4 = Math.max(jM4582, c16944.m4582("select max(timestamp) from raw_events", null, 0L));
        if (jMax4 == 0) {
            jMax2 = 0;
        } else {
            long jAbs2 = jCurrentTimeMillis - Math.abs(jMax4 - jCurrentTimeMillis);
            long jAbs3 = jCurrentTimeMillis - Math.abs(jM6318 - jCurrentTimeMillis);
            long jAbs4 = jCurrentTimeMillis - Math.abs(jM63182 - jCurrentTimeMillis);
            long jMin = jMax3 + jAbs2;
            long jMax5 = Math.max(jAbs3, jAbs4);
            if (z && jMax5 > 0) {
                jMin = Math.min(jAbs2, jMax5) + jMax;
            }
            m6882(c1962);
            jMax2 = !c1962.m5288(jMax5, jMax) ? jMax5 + jMax : jMin;
            if (jAbs4 != 0 && jAbs4 >= jAbs2) {
                int i = 0;
                while (true) {
                    m6921();
                    if (i >= Math.min(20, Math.max(0, ((Integer) AbstractC3818.f14553.m1988(null)).intValue()))) {
                        break;
                    }
                    m6921();
                    jMax2 += Math.max(0L, ((Long) AbstractC3818.f14495.m1988(null)).longValue()) * (1 << i);
                    if (jMax2 > jAbs4) {
                        break;
                    } else {
                        i++;
                    }
                }
            }
        }
        if (jMax2 == 0) {
            mo3572().f13414.m4476("Next upload time is 0");
            m6932().m6216();
            C3647 c36473 = this.f11119;
            m6882(c36473);
            c36473.m8215();
            return;
        }
        C5004 c5004 = this.f11112;
        m6882(c5004);
        if (!c5004.m10343()) {
            mo3572().f13414.m4476("No network");
            C2477 c2477M6932 = m6932();
            C2894 c2894 = c2477M6932.f9617;
            c2894.m6918();
            c2894.mo3578().m5243();
            if (!c2477M6932.f9615) {
                c2894.f11114.f4713.registerReceiver(c2477M6932, new IntentFilter("android.net.conn.CONNECTIVITY_CHANGE"));
                C5004 c50042 = c2894.f11112;
                m6882(c50042);
                c2477M6932.f9616 = c50042.m10343();
                c2894.mo3572().f13414.m4474(Boolean.valueOf(c2477M6932.f9616), "Registering connectivity change receiver. Network connected");
                c2477M6932.f9615 = true;
            }
            C3647 c36474 = this.f11119;
            m6882(c36474);
            c36474.m8215();
            return;
        }
        long jM63183 = this.f11122.f3527.m6318();
        m6921();
        long jMax6 = Math.max(0L, ((Long) AbstractC3818.f14542.m1988(null)).longValue());
        m6882(c1962);
        if (!c1962.m5288(jM63183, jMax6)) {
            jMax2 = Math.max(jMax2, jM63183 + jMax6);
        }
        m6932().m6216();
        mo3579().getClass();
        long jCurrentTimeMillis2 = jMax2 - System.currentTimeMillis();
        if (jCurrentTimeMillis2 <= 0) {
            m6921();
            jCurrentTimeMillis2 = Math.max(0L, ((Long) AbstractC3818.f14502.m1988(null)).longValue());
            C2594 c2594 = this.f11122.f3528;
            mo3579().getClass();
            c2594.m6316(System.currentTimeMillis());
        }
        mo3572().f13414.m4474(Long.valueOf(jCurrentTimeMillis2), "Upload scheduled in approximately ms");
        C3647 c36475 = this.f11119;
        m6882(c36475);
        c36475.m5026();
        C1103 c1103 = (C1103) ((ᵜᵪʾ) c36475).ˌᴵ;
        c1103.getClass();
        C3485 c3485 = c1103.f4729;
        Context context = c1103.f4713;
        if (!C3335.m7619(context)) {
            C1103.m3564(c3485);
            c3485.f13416.m4476("Receiver not registered/enabled");
        }
        if (!C3335.m7613(context)) {
            C1103.m3564(c3485);
            c3485.f13416.m4476("Service not registered/enabled");
        }
        c36475.m8215();
        C1103.m3564(c3485);
        c3485.f13414.m4474(Long.valueOf(jCurrentTimeMillis2), "Scheduling upload, millis");
        c1103.f4701.getClass();
        long jElapsedRealtime = SystemClock.elapsedRealtime() + jCurrentTimeMillis2;
        if (jCurrentTimeMillis2 < Math.max(0L, ((Long) AbstractC3818.f14535.m1988(null)).longValue()) && c36475.m8211().f17107 == 0) {
            c36475.m8211().m9539(jCurrentTimeMillis2);
        }
        if (Build.VERSION.SDK_INT < 24) {
            AlarmManager alarmManager = c36475.f13856;
            if (alarmManager != null) {
                alarmManager.setInexactRepeating(2, jElapsedRealtime, Math.max(((Long) AbstractC3818.f14498.m1988(null)).longValue(), jCurrentTimeMillis2), c36475.m8212());
                return;
            }
            return;
        }
        ComponentName componentName = new ComponentName(context, "com.google.android.gms.measurement.AppMeasurementJobService");
        int iM8213 = c36475.m8213();
        PersistableBundle persistableBundle = new PersistableBundle();
        persistableBundle.putString("action", "com.google.android.gms.measurement.UPLOAD");
        JobInfo jobInfoBuild = new JobInfo.Builder(iM8213, componentName).setMinimumLatency(jCurrentTimeMillis2).setOverrideDeadline(jCurrentTimeMillis2 + jCurrentTimeMillis2).setExtras(persistableBundle).build();
        Method method = AbstractC2903.f11154;
        JobScheduler jobScheduler = (JobScheduler) context.getSystemService("jobscheduler");
        jobScheduler.getClass();
        Method method2 = AbstractC2903.f11154;
        if (method2 == null || context.checkSelfPermission("android.permission.UPDATE_DEVICE_STATS") != 0) {
            jobScheduler.schedule(jobInfoBuild);
            return;
        }
        Method method3 = AbstractC2903.f11153;
        if (method3 != null) {
            try {
                num = (Integer) method3.invoke(UserHandle.class, null);
            } catch (IllegalAccessException | InvocationTargetException unused) {
                Log.isLoggable("JobSchedulerCompat", 6);
            }
            iIntValue = num != null ? num.intValue() : 0;
        }
        try {
        } catch (IllegalAccessException | InvocationTargetException unused2) {
            jobScheduler.schedule(jobInfoBuild);
        }
    }

    /* JADX INFO: renamed from: ᵵᵸᵕᵸ, reason: contains not printable characters */
    public final C1549 m6941() {
        C1549 c1549 = this.f11121;
        m6882(c1549);
        return c1549;
    }

    @Override // defpackage.InterfaceC1959
    /* JADX INFO: renamed from: ᵵᵽ */
    public final C1961 mo3578() {
        C1103 c1103 = this.f11114;
        ᵘᵞʿⁱ.ᵶᵥᵝ(c1103);
        C1961 c1961 = c1103.f4707;
        C1103.m3564(c1961);
        return c1961;
    }

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public final void m6942(C2019 c2019) throws Throwable {
        C3310 c3310;
        C3310 c33102;
        mo3578().m5243();
        if (TextUtils.isEmpty(c2019.m5402())) {
            String strM5415 = c2019.m5415();
            ᵘᵞʿⁱ.ᵶᵥᵝ(strM5415);
            m6896(strM5415, 204, null, null, null);
            return;
        }
        String strM54152 = c2019.m5415();
        ᵘᵞʿⁱ.ᵶᵥᵝ(strM54152);
        mo3572().f13414.m4474(strM54152, "Fetching remote configuration");
        C1811 c1811 = this.f11104;
        m6882(c1811);
        C1498 c1498M4971 = c1811.m4971(strM54152);
        m6882(c1811);
        c1811.ˈᵲᵢ();
        String str = (String) c1811.f7222.get(strM54152);
        if (c1498M4971 != null) {
            if (TextUtils.isEmpty(str)) {
                c33102 = null;
            } else {
                c33102 = new C3310(0);
                c33102.put("If-Modified-Since", str);
            }
            m6882(c1811);
            c1811.ˈᵲᵢ();
            String str2 = (String) c1811.f7221.get(strM54152);
            if (!TextUtils.isEmpty(str2)) {
                if (c33102 == null) {
                    c33102 = new C3310(0);
                }
                c33102.put("If-None-Match", str2);
            }
            c3310 = c33102;
        } else {
            c3310 = null;
        }
        this.f11107 = true;
        C5004 c5004 = this.f11112;
        m6882(c5004);
        ᵷˇ r11 = new ᵷˇ(this);
        C1103 c1103 = (C1103) ((ᵜᵪʾ) c5004).ˌᴵ;
        c5004.ˈᵲᵢ();
        c5004.m5026();
        C4554 c4554 = c5004.f18892.f11108;
        Uri.Builder builder = new Uri.Builder();
        Uri.Builder builderAppendQueryParameter = builder.scheme((String) AbstractC3818.f14584.m1988(null)).encodedAuthority((String) AbstractC3818.f14577.m1988(null)).path("config/app/".concat(String.valueOf(c2019.m5402()))).appendQueryParameter("platform", "android");
        ((C1103) ((ᵜᵪʾ) c4554).ˌᴵ).f4726.m8308();
        builderAppendQueryParameter.appendQueryParameter("gmp_version", String.valueOf(161000L)).appendQueryParameter("runtime_version", "0");
        String string = builder.build().toString();
        try {
            URL url = new URI(string).toURL();
            C1961 c1961 = c1103.f4707;
            C1103.m3564(c1961);
            c1961.m5251(new RunnableC5243(c5004, c2019.m5415(), url, (byte[]) null, (Map) c3310, (InterfaceC1937) r11));
        } catch (IllegalArgumentException | MalformedURLException | URISyntaxException unused) {
            C3485 c3485 = c1103.f4729;
            C1103.m3564(c3485);
            c3485.f13423.m4475("Failed to parse config URL. Not fetching. appId", C3485.m7979(c2019.m5415()), string);
        }
    }

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public final Bundle m6943(String str, C0357 c0357) throws Throwable {
        Bundle bundle = new Bundle();
        bundle.putLong("_sid", c0357.f2154.f13694.getLong("_sid"));
        C1694 c1694 = this.f11109;
        m6882(c1694);
        C4922 c4922M4608 = c1694.m4608(str, "_sno");
        if (c4922M4608 != null) {
            Object obj = c4922M4608.f18719;
            if (obj instanceof Long) {
                bundle.putLong("_sno", ((Long) obj).longValue());
            }
        }
        return bundle;
    }

    @Override // defpackage.InterfaceC1959
    /* JADX INFO: renamed from: ᵷᵺʾᵖ */
    public final ᵠʽᵲ mo3579() {
        C1103 c1103 = this.f11114;
        ᵘᵞʿⁱ.ᵶᵥᵝ(c1103);
        return c1103.f4701;
    }

    /* JADX INFO: renamed from: ᵹʾᵢᵯ, reason: contains not printable characters */
    public final void m6944(C2847 c2847) throws Throwable {
        mo3578().m5243();
        m6918();
        String str = c2847.f10910;
        ᵘᵞʿⁱ.ˊᵫᵗ(str);
        C1102 c1102M3559 = C1102.m3559(c2847.f10907);
        mo3572().f13414.m4475("Setting DMA consent for package", str, c1102M3559);
        mo3578().m5243();
        m6918();
        EnumC3695 enumC3695M3561 = C1102.m3560(100, m6911(str)).m3561();
        this.f11110.put(str, c1102M3559);
        C1694 c1694 = this.f11109;
        m6882(c1694);
        ᵘᵞʿⁱ.ᵶᵥᵝ(str);
        ᵘᵞʿⁱ.ᵶᵥᵝ(c1102M3559);
        c1694.ˈᵲᵢ();
        c1694.m5026();
        C0875 c0875M4583 = c1694.m4583(str);
        C0875 c0875 = C0875.f3871;
        if (c0875M4583 == c0875) {
            c1694.m4609(str, c0875);
        }
        ContentValues contentValues = new ContentValues();
        contentValues.put("app_id", str);
        contentValues.put("dma_consent_settings", c1102M3559.f4694);
        c1694.m4622(contentValues);
        EnumC3695 enumC3695M35612 = C1102.m3560(100, m6911(str)).m3561();
        mo3578().m5243();
        m6918();
        EnumC3695 enumC3695 = EnumC3695.f14084;
        EnumC3695 enumC36952 = EnumC3695.f14083;
        boolean z = enumC3695M3561 == enumC36952 && enumC3695M35612 == enumC3695;
        boolean z2 = enumC3695M3561 == enumC3695 && enumC3695M35612 == enumC36952;
        if (z || z2) {
            mo3572().f13414.m4474(str, "Generated _dcu event for");
            Bundle bundle = new Bundle();
            C1694 c16942 = this.f11109;
            m6882(c16942);
            if (c16942.m4611(m6929(), str, false, false, false, false).f1725 < m6921().m8310(str, AbstractC3818.f14531)) {
                bundle.putLong("_r", 1L);
                C1694 c16943 = this.f11109;
                m6882(c16943);
                mo3572().f13414.m4475("_dcu realtime event count", str, Long.valueOf(c16943.m4611(m6929(), str, false, false, true, false).f1725));
            }
            this.f11103.mo7126(str, "_dcu", bundle);
        }
    }

    @Override // defpackage.InterfaceC1959
    /* JADX INFO: renamed from: ᵻʽᵯ */
    public final Context mo3580() {
        return this.f11114.f4713;
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final void m6945(String str, C0357 c0357) {
        C1694 c1694 = this.f11109;
        m6882(c1694);
        C2019 c2019M4596 = c1694.m4596(str);
        if (c2019M4596 != null) {
            C1103 c1103 = c2019M4596.f8027;
            if (!TextUtils.isEmpty(c2019M4596.m5414())) {
                Boolean boolM6889 = m6889(c2019M4596);
                if (boolM6889 == null) {
                    if (!"_ui".equals(c0357.f2152)) {
                        mo3572().f13424.m4474(C3485.m7979(str), "Could not find package. appId");
                    }
                } else if (!boolM6889.booleanValue()) {
                    mo3572().f13423.m4474(C3485.m7979(str), "App version does not match; dropping event. appId");
                    return;
                }
                String strM5402 = c2019M4596.m5402();
                String strM5414 = c2019M4596.m5414();
                long jM5400 = c2019M4596.m5400();
                C1961 c1961 = c1103.f4707;
                C1103.m3564(c1961);
                c1961.m5243();
                String str2 = c2019M4596.f8023;
                C1961 c19612 = c1103.f4707;
                C1103.m3564(c19612);
                c19612.m5243();
                long j = c2019M4596.f8015;
                C1961 c19613 = c1103.f4707;
                C1103.m3564(c19613);
                c19613.m5243();
                long j2 = c2019M4596.f8005;
                C1961 c19614 = c1103.f4707;
                C1103.m3564(c19614);
                c19614.m5243();
                boolean z = c2019M4596.f8022;
                String strM5408 = c2019M4596.m5408();
                C1961 c19615 = c1103.f4707;
                C1103.m3564(c19615);
                c19615.m5243();
                boolean z2 = c2019M4596.f8017;
                Boolean boolM5416 = c2019M4596.m5416();
                long jM5394 = c2019M4596.m5394();
                C1961 c19616 = c1103.f4707;
                C1103.m3564(c19616);
                c19616.m5243();
                ArrayList arrayList = c2019M4596.f7997;
                String strM3071 = m6888(str).m3071();
                boolean zM5428 = c2019M4596.m5428();
                C1961 c19617 = c1103.f4707;
                C1103.m3564(c19617);
                c19617.m5243();
                long j3 = c2019M4596.f8006;
                int i = m6888(str).f3872;
                String str3 = m6934(str).f4694;
                C1961 c19618 = c1103.f4707;
                C1103.m3564(c19618);
                c19618.m5243();
                int i2 = c2019M4596.f8012;
                C1961 c19619 = c1103.f4707;
                C1103.m3564(c19619);
                c19619.m5243();
                m6904(c0357, new C2847(str, strM5402, strM5414, jM5400, str2, j, j2, (String) null, z, false, strM5408, 0L, 0, z2, false, boolM5416, jM5394, (List) arrayList, strM3071, "", (String) null, zM5428, j3, i, str3, i2, c2019M4596.f7995, c2019M4596.m5437(), c2019M4596.m5401(), 0L, c2019M4596.m5412(), 0L));
                return;
            }
        }
        mo3572().f13416.m4474(str, "No app data available; dropping event");
    }
}
