Info Call to SQLite query API

Description

Improper SQL query construction could lead to SQL injection. An SQL injection attack consists of injecting of an SQL query via the input data from the client to the application

Recommendation

This entry is informative, no recommendations applicable.

Technical details

Method c.e.a.a.h.aa.f() calling method android.database.sqlite.SQLiteDatabase.update()


    public final long f(String p18, String p19)
    {
        a.b.f.a.H.c(p18);
        a.b.f.a.H.c(p19);
        this.b();
        this.s();
        android.database.sqlite.SQLiteDatabase v3 = this.w();
        v3.beginTransaction();
        try {
            String v6_2 = new StringBuilder((String.valueOf(p19).length() + 32));
            v6_2.append("select ");
            v6_2.append(p19);
            v6_2.append(" from app2 where app_id=?");
            c.e.a.a.h.Aa v0_7 = v6_2.toString();
            Object v7_1 = new String[1];
            v7_1[0] = p18;
            try {
                c.e.a.a.h.Aa v12_0 = this.a(v0_7, v7_1, -1);
            } catch (c.e.a.a.h.Aa v0_8) {
                v12_0 = 0;
                this.o().f.a("Error inserting column. appId", c.e.a.a.h.ya.a(p18), p19, v0_8);
                v3.endTransaction();
                return v12_0;
            }
            if (v12_0 == -1) {
                c.e.a.a.h.Aa v12_2 = new android.content.ContentValues();
                v12_2.put("app_id", p18);
                v12_2.put("first_open_count", Integer.valueOf(0));
                v12_2.put("previous_install_count", Integer.valueOf(0));
                if (v3.insertWithOnConflict("app2", 0, v12_2, 5) != -1) {
                    v12_0 = 0;
                } else {
                    this.o().f.a("Failed to insert column (got -1). appId", c.e.a.a.h.ya.a(p18), p19);
                    v3.endTransaction();
                    return -1;
                }
            }
            try {
                android.content.ContentValues v14_6 = new android.content.ContentValues();
                v14_6.put("app_id", p18);
                v14_6.put(p19, Long.valueOf((1 + v12_0)));
                String v6_4 = new String[1];
                v6_4[0] = p18;
            } catch (c.e.a.a.h.Aa v0_8) {
            }
            if (((long) v3.update("app2", v14_6, "app_id = ?", v6_4)) != 0) {
                v3.setTransactionSuccessful();
                v3.endTransaction();
                return v12_0;
            } else {
                this.o().f.a("Failed to update column (got 0). appId", c.e.a.a.h.ya.a(p18), p19);
                v3.endTransaction();
                return -1;
            }
        } catch (c.e.a.a.h.Aa v0_9) {
            v3.endTransaction();
            throw v0_9;
        } catch (c.e.a.a.h.Aa v0_8) {
        } catch (c.e.a.a.h.Aa v0_9) {
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public final void a(c.e.a.a.h.T p9)
    {
        a.b.f.a.H.d(p9);
        this.b();
        this.s();
        String v1_4 = new android.content.ContentValues();
        v1_4.put("app_id", p9.c());
        v1_4.put("app_instance_id", p9.d());
        v1_4.put("gmp_app_id", p9.e());
        p9.a.p().b();
        v1_4.put("resettable_device_id_hash", p9.e);
        v1_4.put("last_bundle_index", Long.valueOf(p9.o()));
        v1_4.put("last_bundle_start_timestamp", Long.valueOf(p9.g()));
        v1_4.put("last_bundle_end_timestamp", Long.valueOf(p9.h()));
        v1_4.put("app_version", p9.i());
        v1_4.put("app_store", p9.k());
        v1_4.put("gmp_version", Long.valueOf(p9.l()));
        v1_4.put("dev_cert_hash", Long.valueOf(p9.m()));
        v1_4.put("measurement_enabled", Boolean.valueOf(p9.n()));
        p9.a.p().b();
        v1_4.put("day", Long.valueOf(p9.r));
        p9.a.p().b();
        v1_4.put("daily_public_events_count", Long.valueOf(p9.s));
        p9.a.p().b();
        v1_4.put("daily_events_count", Long.valueOf(p9.t));
        p9.a.p().b();
        v1_4.put("daily_conversions_count", Long.valueOf(p9.u));
        p9.a.p().b();
        v1_4.put("config_fetched_time", Long.valueOf(p9.z));
        p9.a.p().b();
        v1_4.put("failed_config_fetch_time", Long.valueOf(p9.A));
        v1_4.put("app_version_int", Long.valueOf(p9.j()));
        v1_4.put("firebase_instance_id", p9.f());
        p9.a.p().b();
        v1_4.put("daily_error_events_count", Long.valueOf(p9.v));
        p9.a.p().b();
        v1_4.put("daily_realtime_events_count", Long.valueOf(p9.w));
        p9.a.p().b();
        v1_4.put("health_monitor_sample", p9.x);
        v1_4.put("android_id", Long.valueOf(p9.a()));
        v1_4.put("adid_reporting_enabled", Boolean.valueOf(p9.b()));
        try {
            Object v2_30 = this.w();
            long v4_1 = new String[1];
            v4_1[0] = p9.c();
        } catch (c.e.a.a.h.Aa v0_4) {
            this.o().f.a("Error storing app. appId", c.e.a.a.h.ya.a(p9.c()), v0_4);
            return;
        }
        if ((((long) v2_30.update("apps", v1_4, "app_id = ?", v4_1)) == 0) && (v2_30.insertWithOnConflict("apps", 0, v1_4, 5) == -1)) {
            this.o().f.a("Failed to insert/update app (got -1). appId", c.e.a.a.h.ya.a(p9.c()));
        }
        return;
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public final c.e.a.a.h.ba a(long p22, String p24, boolean p25, boolean p26, boolean p27, boolean p28, boolean p29)
    {
        a.b.f.a.H.c(p24);
        this.b();
        this.s();
        String[] v7 = new String[1];
        v7[0] = p24;
        c.e.a.a.h.ba v9_1 = new c.e.a.a.h.ba();
        try {
            String[] v15_0 = this.w();
            long v13_0 = new String[6];
            v13_0[0] = "day";
            v13_0[1] = "daily_events_count";
            v13_0[2] = "daily_public_events_count";
            v13_0[3] = "daily_conversions_count";
            v13_0[4] = "daily_error_events_count";
            v13_0[5] = "daily_realtime_events_count";
            int v10_2 = new String[1];
            v10_2[0] = p24;
            android.database.sqlite.SQLiteDatabase v20 = v15_0;
            int v10_3 = v15_0.query("apps", v13_0, "app_id=?", v10_2, 0, 0, 0);
            try {
                if (v10_3.moveToFirst()) {
                    if (v10_3.getLong(0) == p22) {
                        v9_1.b = v10_3.getLong(1);
                        v9_1.a = v10_3.getLong(2);
                        v9_1.c = v10_3.getLong(3);
                        v9_1.d = v10_3.getLong(4);
                        v9_1.e = v10_3.getLong(5);
                    }
                    if (p25) {
                        v9_1.b = (v9_1.b + 1);
                    }
                    if (p26) {
                        v9_1.a = (v9_1.a + 1);
                    }
                    if (p27) {
                        v9_1.c = (v9_1.c + 1);
                    }
                    if (p28) {
                        v9_1.d = (v9_1.d + 1);
                    }
                    if (p29) {
                        v9_1.e = (v9_1.e + 1);
                    }
                    android.content.ContentValues v6_1 = new android.content.ContentValues();
                    v6_1.put("day", Long.valueOf(p22));
                    v6_1.put("daily_public_events_count", Long.valueOf(v9_1.a));
                    v6_1.put("daily_events_count", Long.valueOf(v9_1.b));
                    v6_1.put("daily_conversions_count", Long.valueOf(v9_1.c));
                    v6_1.put("daily_error_events_count", Long.valueOf(v9_1.d));
                    v6_1.put("daily_realtime_events_count", Long.valueOf(v9_1.e));
                    v20.update("apps", v6_1, "app_id=?", v7);
                    v10_3.close();
                    return v9_1;
                } else {
                    this.o().h.a("Not updating daily counts, app is not known. appId", c.e.a.a.h.ya.a(p24));
                    v10_3.close();
                    return v9_1;
                }
            } catch (String v0_5) {
                this.o().f.a("Error updating daily counts. appId", c.e.a.a.h.ya.a(p24), v0_5);
                if (v10_3 != 0) {
                    v10_3.close();
                }
                return v9_1;
            }
        } catch (String v0_1) {
            v10_3 = 0;
            if (v10_3 != 0) {
                v10_3.close();
            }
            throw v0_1;
        } catch (String v0_5) {
            v10_3 = 0;
        } catch (String v0_1) {
        }
    }

Method c.e.a.a.h.Sa.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public final boolean a(String p18, byte[] p19, String p20)
    {
        this.s();
        this.b();
        a.b.f.a.H.c(p18);
        c.e.a.a.h.Aa v0_5 = this.a(p18, p19);
        this.a(p18, v0_5);
        this.h.put(p18, v0_5);
        this.j.put(p18, p20);
        this.e.put(p18, ark>c.e.a.a.h.Saark>.a(v0_5));
        String v3_3 = this.a;
        c.e.a.a.h.Xa.a(v3_3.y);
        String v3_4 = v3_3.y;
        Object v4_5 = v0_5.h;
        a.b.f.a.H.d(v4_5);
        String v5_1 = v4_5.length;
        String[] v7_2 = 0;
        while (v7_2 < v5_1) {
            c.e.a.a.h.Hc v8_0 = v4_5[v7_2];
            int v9_1 = v8_0.f;
            int v10_9 = v9_1.length;
            String[] v11_7 = 0;
            while (v11_7 < v10_9) {
                String v12_7 = v9_1[v11_7];
                String[] v13_8 = c.e.a.a.h.Ac.a(v12_7.e, com.google.android.gms.measurement.AppMeasurement$a.a, com.google.android.gms.measurement.AppMeasurement$a.b);
                if (v13_8 != null) {
                    v12_7.e = v13_8;
                }
                String v12_8 = v12_7.f;
                String[] v13_9 = v12_8.length;
                int v14_6 = 0;
                while (v14_6 < v13_9) {
                    boolean v15_9 = v12_8[v14_6];
                    int v16_2 = v5_1;
                    int v1_7 = c.e.a.a.h.Ac.a(v15_9.g, com.google.android.gms.measurement.AppMeasurement$d.a, com.google.android.gms.measurement.AppMeasurement$d.b);
                    if (v1_7 != 0) {
                        v15_9.g = v1_7;
                    }
                    v14_6++;
                    v5_1 = v16_2;
                }
                v11_7++;
            }
            int v16_1 = v5_1;
            int v1_5 = v8_0.e;
            String v5_0 = v1_5.length;
            long v6_2 = 0;
            while (v6_2 < v5_0) {
                c.e.a.a.h.Hc v8_1 = v1_5[v6_2];
                int v9_3 = c.e.a.a.h.Ac.a(v8_1.e, com.google.android.gms.measurement.AppMeasurement$e.a, com.google.android.gms.measurement.AppMeasurement$e.b);
                if (v9_3 != 0) {
                    v8_1.e = v9_3;
                }
                v6_2++;
            }
            v7_2++;
            v5_1 = v16_1;
        }
        int v1_8 = v3_4.i();
        v1_8.s();
        v1_8.b();
        a.b.f.a.H.c(p18);
        a.b.f.a.H.d(v4_5);
        c.e.a.a.h.Hc v8_2 = v1_8.w();
        v8_2.beginTransaction();
        try {
            v1_8.s();
            v1_8.b();
            a.b.f.a.H.c(p18);
            int v9_4 = v1_8.w();
            String[] v11_9 = new String[1];
            v11_9[0] = p18;
            v9_4.delete("property_filters", "app_id=?", v11_9);
            String[] v11_10 = new String[1];
            v11_10[0] = p18;
            v9_4.delete("event_filters", "app_id=?", v11_10);
            long v6_5 = v4_5.length;
            int v9_0 = 0;
        } catch (c.e.a.a.h.Aa v0_4) {
            v8_2.endTransaction();
            throw v0_4;
        }
        while (v9_0 < v6_5) {
            String[] v11_0 = v4_5[v9_0];
            v1_8.s();
            v1_8.b();
            a.b.f.a.H.c(p18);
            a.b.f.a.H.d(v11_0);
            a.b.f.a.H.d(v11_0.f);
            a.b.f.a.H.d(v11_0.e);
            String v12_2 = v11_0.d;
            if (v12_2 != null) {
                String v12_3 = v12_2.intValue();
                String[] v13_0 = v11_0.f;
                boolean v15_0 = 0;
                while (v15_0 < v13_0.length) {
                    if (v13_0[v15_0].d != null) {
                        v15_0++;
                    } else {
                        int v10_5 = v1_8.o().h;
                        String v12_5 = "Event filter with no ID. Audience definition ignored. appId, audienceId";
                    }
                    v10_5.a(v12_5, c.e.a.a.h.ya.a(p18), v11_0.d);
                }
                int v10_0 = v11_0.e;
                int v14_1 = 0;
                while (v14_1 < v10_0.length) {
                    if (v10_0[v14_1].d != null) {
                        v14_1++;
                    } else {
                        v10_5 = v1_8.o().h;
                        v12_5 = "Property filter with no ID. Audience definition ignored. appId, audienceId";
                    }
                }
                int v10_1 = v11_0.f;
                int v14_2 = 0;
                while (v14_2 < v10_1.length) {
                    if (v1_8.a(p18, v12_3, v10_1[v14_2])) {
                        v14_2++;
                    } else {
                        int v10_2 = 0;
                    }
                    if (v10_2 != 0) {
                        String[] v11_1 = v11_0.e;
                        int v14_3 = 0;
                        while (v14_3 < v11_1.length) {
                            if (v1_8.a(p18, v12_3, v11_1[v14_3])) {
                                v14_3++;
                            } else {
                                v10_2 = 0;
                                break;
                            }
                        }
                    }
                    if (v10_2 != 0) {
                        v9_0++;
                    } else {
                        v1_8.s();
                        v1_8.b();
                        a.b.f.a.H.c(p18);
                        int v10_3 = v1_8.w();
                        String[] v13_4 = new String[2];
                        v13_4[0] = p18;
                        v13_4[1] = String.valueOf(v12_3);
                        v10_3.delete("property_filters", "app_id=? and audience_id=?", v13_4);
                        String[] v11_3 = new String[2];
                        v11_3[0] = p18;
                        v11_3[1] = String.valueOf(v12_3);
                        v10_3.delete("event_filters", "app_id=? and audience_id=?", v11_3);
                    }
                }
                v10_2 = 1;
            } else {
                v1_8.o().h.a("Audience with no ID. appId", c.e.a.a.h.ya.a(p18));
            }
        }
        String v3_7 = new java.util.ArrayList();
        String v5_4 = v4_5.length;
        long v6_1 = 0;
        while (v6_1 < v5_4) {
            v3_7.add(v4_5[v6_1].d);
            v6_1++;
        }
        v1_8.a(p18, v3_7);
        v8_2.setTransactionSuccessful();
        v8_2.endTransaction();
        try {
            v0_5.h = 0;
            int v1_11 = new byte[v0_5.c()];
            v0_5.a(c.e.a.a.h.nd.a(v1_11, v1_11.length));
        } catch (c.e.a.a.h.Aa v0_6) {
            this.o().h.a("Unable to serialize reduced-size config. Storing full config instead. appId", c.e.a.a.h.ya.a(p18), v0_6);
            v1_11 = p19;
        }
        String v3_12 = this.i();
        a.b.f.a.H.c(p18);
        v3_12.b();
        v3_12.s();
        c.e.a.a.h.Aa v0_8 = new android.content.ContentValues();
        v0_8.put("remote_config", v1_11);
        try {
            int v1_14 = v3_12.w();
            String[] v7_4 = new String[1];
            v7_4[0] = p18;
        } catch (c.e.a.a.h.Aa v0_1) {
            v3_12.o().f.a("Error storing remote config. appId", c.e.a.a.h.ya.a(p18), v0_1);
            return 1;
        }
        if (((long) v1_14.update("apps", v0_8, "app_id = ?", v7_4)) != 0) {
            return 1;
        } else {
            v3_12.o().f.a("Failed to update remote config (got 0). appId", c.e.a.a.h.ya.a(p18));
            return 1;
        }
    }

Method c.e.a.a.h.ua.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final boolean a(int p18, byte[] p19)
    {
        this.b();
        Long v3_9 = 0;
        if (!this.d) {
            android.content.ContentValues v4_1 = new android.content.ContentValues();
            v4_1.put("type", Integer.valueOf(p18));
            v4_1.put("entry", p19);
            c.e.a.a.h.Aa v5_2 = 5;
            int v6 = 0;
            int v7 = 5;
            while (v6 < v5_2) {
                String v8_0 = 0;
                try {
                    String[] v10 = this.w();
                    try {
                        if (v10 != null) {
                            try {
                                v10.beginTransaction();
                                Long v11_1 = 0;
                                int v13 = v10.rawQuery("select count(1) from messages", 0);
                                try {
                                    if ((v13 != 0) && (v13.moveToFirst())) {
                                        v11_1 = v13.getLong(v3_9);
                                    }
                                    if (v11_1 >= 100000) {
                                        this.o().f.a("Data loss, local db full");
                                        long v14_2 = ((100000 - v11_1) + 1);
                                        String v8_2 = new String[1];
                                        v8_2[v3_9] = Long.toString(v14_2);
                                        Long v11_4 = ((long) v10.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v8_2));
                                        if (v11_4 != v14_2) {
                                            this.o().f.a("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v14_2), Long.valueOf(v11_4), Long.valueOf((v14_2 - v11_4)));
                                        }
                                    }
                                    v10.insertOrThrow("messages", 0, v4_1);
                                    v10.setTransactionSuccessful();
                                    v10.endTransaction();
                                    if (v13 != 0) {
                                        v13.close();
                                    }
                                    v10.close();
                                    return 1;
                                } catch (Throwable v0_0) {
                                    if (v13 != 0) {
                                        v13.close();
                                    }
                                    if (v10 != null) {
                                        v10.close();
                                    }
                                    throw v0_0;
                                } catch (Throwable v0_3) {
                                    v8_0 = v13;
                                    this.o().f.a("Error writing entry to local database", v0_3);
                                    this.d = 1;
                                    if (v8_0 != null) {
                                        v8_0.close();
                                    }
                                    if (v10 == null) {
                                        v6++;
                                        v3_9 = 0;
                                        v5_2 = 5;
                                    } else {
                                        v10.close();
                                    }
                                } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                                    v8_0 = v13;
                                    android.os.SystemClock.sleep(((long) v7));
                                    v7 += 20;
                                    if (v8_0 != null) {
                                        v8_0.close();
                                    }
                                    if (v10 == null) {
                                    }
                                } catch (Throwable v0_1) {
                                }
                            } catch (Throwable v0_0) {
                                v13 = 0;
                            } catch (Throwable v0_3) {
                            } catch (Throwable v0_1) {
                                v13 = 0;
                            }
                        } else {
                            try {
                                this.d = 1;
                            } catch (Throwable v0_3) {
                            } catch (Throwable v0_1) {
                                v13 = 0;
                            }
                            if (v10 != null) {
                                v10.close();
                            }
                            return v3_9;
                        }
                        v8_0 = v10;
                        if (v8_0 != null) {
                            try {
                                if (v8_0.inTransaction()) {
                                    v8_0.endTransaction();
                                }
                            } catch (Throwable v0_0) {
                                v10 = v8_0;
                            }
                        }
                        this.o().f.a("Error writing entry to local database", v0_1);
                        this.d = 1;
                        if (v13 != 0) {
                            v13.close();
                        }
                        if (v8_0 == null) {
                        } else {
                            v8_0.close();
                        }
                    } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                        v8_0 = 0;
                    }
                } catch (Throwable v0_0) {
                    v10 = 0;
                    v13 = 0;
                } catch (Throwable v0_3) {
                    v10 = 0;
                } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                    v10 = 0;
                } catch (Throwable v0_1) {
                    v13 = 0;
                } catch (Throwable v0_0) {
                    v13 = v8_0;
                }
            }
            this.o().h.a("Failed to write entry to local database");
            return 0;
        } else {
            return 0;
        }
    }

Method c.e.a.a.h.aa.z() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final long z()
    {
        long v0_0 = -1;
        try {
            android.database.Cursor v2_1 = this.w().rawQuery("select rowid from raw_events order by rowid desc limit 1;", 0);
        } catch (long v0_1) {
            if (v2_1 != null) {
                v2_1.close();
            }
            throw v0_1;
        } catch (int v3_1) {
            this.o().f.a("Error querying raw events", v3_1);
            if (v2_1 != null) {
                v2_1.close();
            }
            return v0_0;
        }
        if (v2_1.moveToFirst()) {
            v0_0 = v2_1.getLong(0);
            v2_1.close();
            return v0_0;
        } else {
            v2_1.close();
            return -1;
        }
    }

Method c.e.a.a.h.aa.x() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final String x()
    {
        try {
            Throwable v0_1 = this.w().rawQuery("select app_id from queue order by has_realtime desc, rowid asc limit 1;", 0);
            try {
                if (!v0_1.moveToFirst()) {
                    v0_1.close();
                    return 0;
                } else {
                    String v1_2 = v0_1.getString(0);
                    v0_1.close();
                    return v1_2;
                }
            } catch (int v2_1) {
                this.o().f.a("Database error getting next bundle app id", v2_1);
                if (v0_1 != null) {
                    v0_1.close();
                }
                return 0;
            }
        } catch (Throwable v0_2) {
            String v1_0 = v0_2;
            v0_1 = 0;
            if (v0_1 != null) {
                v0_1.close();
            }
            throw v1_0;
        } catch (int v2_1) {
            v0_1 = 0;
        } catch (String v1_0) {
        }
    }

Method c.e.a.a.h.aa.b() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final long b(String p4, String[] p5)
    {
        try {
            android.database.Cursor v1 = this.w().rawQuery(p4, p5);
        } catch (long v4_1) {
            if (v1 != null) {
                v1.close();
            }
            throw v4_1;
        } catch (android.database.sqlite.SQLiteException v5_2) {
            this.o().f.a("Database error", p4, v5_2);
            throw v5_2;
        }
        if (!v1.moveToFirst()) {
            throw new android.database.sqlite.SQLiteException("Database returned empty set");
        } else {
            long v4_2 = v1.getLong(0);
            v1.close();
            return v4_2;
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final String a(long p5)
    {
        this.b();
        this.s();
        try {
            String v1_3 = this.w();
            String[] v3_1 = new String[1];
            v3_1[0] = String.valueOf(p5);
            int v5_1 = v1_3.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;", v3_1);
            try {
                if (v5_1.moveToFirst()) {
                    String v6_3 = v5_1.getString(0);
                    v5_1.close();
                    return v6_3;
                } else {
                    this.o().l.a("No expired configs for apps with pending events");
                    v5_1.close();
                    return 0;
                }
            } catch (String v6_1) {
                this.o().f.a("Error selecting expired configs", v6_1);
                if (v5_1 != 0) {
                    v5_1.close();
                }
                return 0;
            }
        } catch (String v6_2) {
            v5_1 = 0;
            if (v5_1 != 0) {
                v5_1.close();
            }
            throw v6_2;
        } catch (String v6_1) {
            v5_1 = 0;
        } catch (String v6_2) {
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final android.util.Pair a(String p8, Long p9)
    {
        this.b();
        this.s();
        try {
            int v1_1 = this.w();
            c.e.a.a.h.Aa v3_5 = new String[2];
            v3_5[0] = p8;
            v3_5[1] = String.valueOf(p9);
            int v1_0 = v1_1.rawQuery("select main_event, children_to_process from main_event_params where app_id=? and event_id=?", v3_5);
            try {
                if (v1_0.moveToFirst()) {
                    java.io.IOException v2_1 = v1_0.getBlob(0);
                    c.e.a.a.h.Aa v3_1 = Long.valueOf(v1_0.getLong(1));
                    java.io.IOException v2_2 = c.e.a.a.h.md.a(v2_1, v2_1.length);
                    String v4_2 = new c.e.a.a.h.Nc();
                    try {
                        v4_2.a(v2_2);
                    } catch (java.io.IOException v2_3) {
                        this.o().f.a("Failed to merge main event. appId, eventId", c.e.a.a.h.ya.a(p8), p9, v2_3);
                        v1_0.close();
                        return 0;
                    }
                    Object v8_4 = android.util.Pair.create(v4_2, v3_1);
                    v1_0.close();
                    return v8_4;
                } else {
                    this.o().l.a("Main event not found");
                    v1_0.close();
                    return 0;
                }
            } catch (Object v8_1) {
                this.o().f.a("Error selecting main event", v8_1);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                return 0;
            }
        } catch (Object v8_2) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v8_2;
        } catch (Object v8_1) {
            v1_0 = 0;
        } catch (Object v8_2) {
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final long a(String p3, String[] p4, long p5)
    {
        try {
            android.database.Cursor v1 = this.w().rawQuery(p3, p4);
        } catch (long v3_1) {
            if (v1 != null) {
                v1.close();
            }
            throw v3_1;
        } catch (int v4_3) {
            this.o().f.a("Database error", p3, v4_3);
            throw v4_3;
        }
        if (!v1.moveToFirst()) {
            v1.close();
            return p5;
        } else {
            long v3_2 = v1.getLong(0);
            v1.close();
            return v3_2;
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public static void a(c.e.a.a.h.ya p6, android.database.sqlite.SQLiteDatabase p7, String p8, String p9, String[] p10)
    {
        if (p6 == null) {
            throw new IllegalArgumentException("Monitor must not be null");
        } else {
            java.util.HashSet v0_1 = new java.util.HashSet();
            int v2_1 = new StringBuilder(c.a.a.a.a.a(p8, 22));
            v2_1.append("SELECT * FROM ");
            v2_1.append(p8);
            v2_1.append(" LIMIT 0");
            int v1_3 = p7.rawQuery(v2_1.toString(), 0);
            try {
                java.util.Collections.addAll(v0_1, v1_3.getColumnNames());
                v1_3.close();
                String v9_1 = p9.split(",");
                int v1_5 = v9_1.length;
                int v2_4 = 0;
                int v3 = 0;
            } catch (c.e.a.a.h.Aa v6_3) {
                v1_5.close();
                throw v6_3;
            }
            while (v3 < v1_5) {
                String v4 = v9_1[v3];
                if (!v0_1.remove(v4)) {
                    String v9_9 = new StringBuilder(c.a.a.a.a.a(v4, c.a.a.a.a.a(p8, 35)));
                    v9_9.append("Table ");
                    v9_9.append(p8);
                    v9_9.append(" is missing required column: ");
                    v9_9.append(v4);
                    throw new android.database.sqlite.SQLiteException(v9_9.toString());
                } else {
                    v3++;
                }
            }
            if (p10 != null) {
                while (v2_4 < p10.length) {
                    if (!v0_1.remove(p10[v2_4])) {
                        p7.execSQL(p10[(v2_4 + 1)]);
                    }
                    v2_4 += 2;
                }
            }
            if (!v0_1.isEmpty()) {
                p6.h.a("Table has extra columns. table, columns", p8, android.text.TextUtils.join(", ", v0_1));
            }
            return;
        }
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final boolean a(String p38, long p39)
    {
        c.e.a.a.h.Aa v2_0 = "_lte";
        this.u().A();
        try {
            int v4_0 = 0;
            String v3_17 = new ark>c.e.a.a.h.Xaark>$a(this, 0);
            String v5_38 = this.u();
            long v6_0 = this.J;
            a.b.f.a.H.d(v3_17);
            v5_38.b();
            v5_38.s();
            try {
                boolean v10_18;
                String v22_0;
                long v15_3 = v5_38.w();
                boolean v14_6 = "";
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        boolean v10_31;
                        if (v6_0 == -1) {
                            v10_31 = new String[1];
                            v10_31[0] = 0;
                        } else {
                            v10_31 = new String[2];
                            v10_31[0] = 0;
                            v10_31[1] = String.valueOf(v6_0);
                        }
                        if (v6_0 != -1) {
                            v14_6 = " and rowid <= ?";
                        }
                        boolean v13_25 = new StringBuilder((v14_6.length() + 84));
                        v13_25.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v13_25.append(v14_6);
                        v13_25.append(" order by rowid limit 1;");
                        v4_0 = v15_3.rawQuery(v13_25.toString(), v10_31);
                        if (v4_0.moveToFirst()) {
                            boolean v13_26 = v4_0.getString(0);
                            v4_0.close();
                            v22_0 = v4_0;
                            v10_18 = v13_26;
                            v4_0 = 0;
                            try {
                                boolean v13_2 = new String[1];
                                v13_2[0] = "metadata";
                                int v9_1 = new String[2];
                                v9_1[0] = v4_0;
                                v9_1[1] = v10_18;
                                c.e.a.a.h.aa v23_2 = v15_3;
                                Boolean v8_11 = v15_3.query("raw_events_metadata", v13_2, "app_id = ? and metadata_fingerprint = ?", v9_1, 0, 0, "rowid", "2");
                                try {
                                    if (v8_11.moveToFirst()) {
                                        int v9_3 = v8_11.getBlob(0);
                                        int v9_4 = c.e.a.a.h.md.a(v9_3, v9_3.length);
                                        boolean v13_11 = new c.e.a.a.h.Qc();
                                        try {
                                            v13_11.a(v9_4);
                                        } catch (android.database.sqlite.SQLiteException v0_4) {
                                            v5_38.o().B().a("Data loss. Failed to merge raw event metadata. appId", c.e.a.a.h.ya.a(v4_0), v0_4);
                                            v8_11.close();
                                            int v4_9;
                                            if (v3_17.c == null) {
                                                v4_9 = 1;
                                            } else {
                                                if (!v3_17.c.isEmpty()) {
                                                    v4_9 = 0;
                                                } else {
                                                }
                                            }
                                            if (v4_9 != 0) {
                                                this.u().B();
                                                this.u().C();
                                                return 0;
                                            } else {
                                                int v4_10 = v3_17.a;
                                                String v5_4 = new c.e.a.a.h.Nc[v3_17.c.size()];
                                                v4_10.e = v5_4;
                                                String v5_6 = this.c.c(v4_10.r);
                                                Boolean v8_9 = 0;
                                                int v9_0 = 0;
                                                boolean v10_19 = 0;
                                                boolean v13_4 = 0;
                                                while (v8_9 < v3_17.c.size()) {
                                                    String v21_0;
                                                    c.e.a.a.h.aa v23_1;
                                                    long v15_23 = ((c.e.a.a.h.Nc) v3_17.c.get(v8_9));
                                                    if (!this.q().b(v3_17.a.r, v15_23.e)) {
                                                        long v24_4;
                                                        long v25_1;
                                                        v21_0 = v2_0;
                                                        String v20_0 = v10_19;
                                                        c.e.a.a.h.Aa v2_75 = this.q().c(v3_17.a.r, v15_23.e);
                                                        if (v2_75 != null) {
                                                            if (v15_23.d == null) {
                                                                boolean v10_44 = new c.e.a.a.h.Oc[0];
                                                                v15_23.d = v10_44;
                                                            }
                                                            long v6_34 = v15_23.d;
                                                            boolean v10_21 = v6_34.length;
                                                            v23_1 = v8_9;
                                                            int v11_15 = 0;
                                                            long v12_9 = 0;
                                                            String v22_1 = 0;
                                                            while(true) {
                                                                v24_4 = v9_0;
                                                                if (v11_15 >= v10_21) {
                                                                    break;
                                                                }
                                                                long v25_2 = v10_21;
                                                                boolean v10_20 = v6_34[v11_15];
                                                                long v26_1 = v6_34;
                                                                if (!"_c".equals(v10_20.d)) {
                                                                    if ("_r".equals(v10_20.d)) {
                                                                        v10_20.f = Long.valueOf(1);
                                                                        v22_1 = 1;
                                                                    }
                                                                } else {
                                                                    v10_20.f = Long.valueOf(1);
                                                                    v12_9 = 1;
                                                                }
                                                                v11_15++;
                                                                v9_0 = v24_4;
                                                                v10_21 = v25_2;
                                                                v6_34 = v26_1;
                                                            }
                                                            if ((v12_9 == 0) && (v2_75 != null)) {
                                                                this.o().y().a("Marking event as conversion", this.t().a(v15_23.e));
                                                                long v6_97 = v15_23.d;
                                                                long v6_1 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v6_97, (v6_97.length + 1)));
                                                                boolean v10_1 = new c.e.a.a.h.Oc();
                                                                v10_1.d = "_c";
                                                                v10_1.f = Long.valueOf(1);
                                                                v6_1[(v6_1.length - 1)] = v10_1;
                                                                v15_23.d = v6_1;
                                                            }
                                                            if (v22_1 == null) {
                                                                this.o().y().a("Marking event as real-time", this.t().a(v15_23.e));
                                                                long v6_4 = v15_23.d;
                                                                long v6_6 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v6_4, (v6_4.length + 1)));
                                                                boolean v10_7 = new c.e.a.a.h.Oc();
                                                                v10_7.d = "_r";
                                                                v10_7.f = Long.valueOf(1);
                                                                v6_6[(v6_6.length - 1)] = v10_7;
                                                                v15_23.d = v6_6;
                                                            }
                                                            boolean v10_10;
                                                            v25_1 = v13_4;
                                                            if (this.u().a(this.i(), v3_17.a.r, 0, 0, 0, 0, 1).e <= ((long) this.c.a(v3_17.a.r))) {
                                                                v10_10 = 1;
                                                            } else {
                                                                long v6_13 = 0;
                                                                while(true) {
                                                                    boolean v10_11 = v15_23.d;
                                                                    if (v6_13 < v10_11.length) {
                                                                        if ("_r".equals(v10_11[v6_13].d)) {
                                                                            break;
                                                                        }
                                                                        v6_13++;
                                                                    }
                                                                    v10_10 = v20_0;
                                                                }
                                                                Boolean v8_0 = v15_23.d;
                                                                boolean v10_17 = new c.e.a.a.h.Oc[(v8_0.length - 1)];
                                                                if (v6_13 > 0) {
                                                                    System.arraycopy(v8_0, 0, v10_17, 0, v6_13);
                                                                }
                                                                if (v6_13 < v10_17.length) {
                                                                    System.arraycopy(v15_23.d, (v6_13 + 1), v10_17, v6_13, (v10_17.length - v6_13));
                                                                }
                                                                v15_23.d = v10_17;
                                                            }
                                                            if ((c.e.a.a.h.Ac.a(v15_23.e)) && ((v2_75 != null) && (this.u().a(this.i(), v3_17.a.r, 0, 0, 1, 0, 0).c > ((long) this.c.b(v3_17.a.r, c.e.a.a.h.oa.t))))) {
                                                                this.o().w().a("Too many conversions. Not logging as conversion. appId", c.e.a.a.h.ya.a(v3_17.a.r));
                                                                c.e.a.a.h.Aa v2_10 = v15_23.d;
                                                                Boolean v8_7 = 0;
                                                                int v11_14 = 0;
                                                                long v12_8 = 0;
                                                                while (v8_7 < v2_10.length) {
                                                                    boolean v13_5 = v2_10[v8_7];
                                                                    if (!"_c".equals(v13_5.d)) {
                                                                        if ("_err".equals(v13_5.d)) {
                                                                            v11_14 = 1;
                                                                        }
                                                                    } else {
                                                                        v12_8 = v13_5;
                                                                    }
                                                                    v8_7++;
                                                                }
                                                                if ((v11_14 == 0) || (v12_8 == 0)) {
                                                                    if (v12_8 == 0) {
                                                                        this.o().B().a("Did not find conversion parameter. appId", c.e.a.a.h.ya.a(v3_17.a.r));
                                                                    } else {
                                                                        v12_8.d = "_err";
                                                                        v12_8.f = Long.valueOf(10);
                                                                    }
                                                                } else {
                                                                    c.e.a.a.h.Aa v2_14 = v15_23.d;
                                                                    Boolean v7_3 = new c.e.a.a.h.Oc[1];
                                                                    v7_3[0] = v12_8;
                                                                    v15_23.d = ((c.e.a.a.h.Oc[]) a.b.f.a.H.b(v2_14, v7_3));
                                                                }
                                                            }
                                                            v20_0 = v10_10;
                                                        } else {
                                                            this.s();
                                                            if (!c.e.a.a.h.Ac.l(v15_23.e)) {
                                                                v23_1 = v8_9;
                                                                v24_4 = v9_0;
                                                                v25_1 = v13_4;
                                                            } else {
                                                            }
                                                        }
                                                        if ((v5_6 != null) && ("_e".equals(v15_23.e))) {
                                                            long v6_27;
                                                            Boolean v7_5;
                                                            c.e.a.a.h.Aa v2_25;
                                                            c.e.a.a.h.Aa v2_19 = v15_23.d;
                                                            if (v2_19 == null) {
                                                                v2_25 = this.o().w();
                                                                v6_27 = "Engagement event does not contain any parameters. appId";
                                                                v7_5 = v3_17.a.r;
                                                            } else {
                                                                if (v2_19.length != 0) {
                                                                    this.s();
                                                                    c.e.a.a.h.Aa v2_23 = ((Long) c.e.a.a.h.Ac.b(v15_23, "_et"));
                                                                    if (v2_23 != null) {
                                                                        v25_1 += v2_23.longValue();
                                                                        v9_0 = (v24_4 + 1);
                                                                        v4_10.e[v24_4] = v15_23;
                                                                        v10_19 = v20_0;
                                                                        v13_4 = v25_1;
                                                                        v8_9 = (v23_1 + 1);
                                                                        v2_0 = v21_0;
                                                                        long v12 = 1;
                                                                    } else {
                                                                        v2_25 = this.o().w();
                                                                        v6_27 = "Engagement event does not include duration. appId";
                                                                        v7_5 = v3_17.a.r;
                                                                    }
                                                                } else {
                                                                }
                                                            }
                                                            v2_25.a(v6_27, c.e.a.a.h.ya.a(v7_5));
                                                        }
                                                    } else {
                                                        c.e.a.a.h.Aa v2_34;
                                                        String v20_1 = v10_19;
                                                        v21_0 = v2_0;
                                                        this.o().w().a("Dropping blacklisted raw event. appId", c.e.a.a.h.ya.a(v3_17.a.r), this.t().a(v15_23.e));
                                                        if (this.s().j(v3_17.a.r)) {
                                                            v2_34 = 1;
                                                        } else {
                                                            if (!this.s().k(v3_17.a.r)) {
                                                                v2_34 = 0;
                                                            } else {
                                                            }
                                                        }
                                                        if ((v2_34 == null) && (!"_err".equals(v15_23.e))) {
                                                            this.s().a(v3_17.a.r, 11, "_ev", v15_23.e, 0);
                                                        }
                                                        v23_1 = v8_9;
                                                        v10_19 = v20_1;
                                                    }
                                                }
                                                String v21_3 = v2_0;
                                                String v20_4 = v10_19;
                                                long v25_4 = v13_4;
                                                int v9_12 = v9_0;
                                                if (v9_12 < v3_17.c.size()) {
                                                    v4_10.e = ((c.e.a.a.h.Nc[]) java.util.Arrays.copyOf(v4_10.e, v9_12));
                                                }
                                                if (v5_6 != null) {
                                                    c.e.a.a.h.Aa v2_49;
                                                    long v6_54 = v21_3;
                                                    c.e.a.a.h.Aa v2_46 = this.u().c(v4_10.r, v6_54);
                                                    if (v2_46 == null) {
                                                        v2_49 = new c.e.a.a.h.zc;
                                                        v2_49(v4_10.r, "auto", "_lte", ((c.e.a.a.c.d.b) this.n).a(), Long.valueOf(v25_4));
                                                    } else {
                                                        if (v2_46.e != null) {
                                                            String v5_9 = new c.e.a.a.h.zc;
                                                            v5_9(v4_10.r, "auto", "_lte", ((c.e.a.a.c.d.b) this.n).a(), Long.valueOf((((Long) v2_46.e).longValue() + v25_4)));
                                                            v2_49 = v5_9;
                                                        } else {
                                                        }
                                                    }
                                                    String v5_12 = new c.e.a.a.h.Sc();
                                                    v5_12.e = v6_54;
                                                    v5_12.d = Long.valueOf(((c.e.a.a.c.d.b) this.n).a());
                                                    v5_12.g = ((Long) v2_49.e);
                                                    Boolean v7_34 = 0;
                                                    while(true) {
                                                        long v6_55;
                                                        Boolean v8_17 = v4_10.f;
                                                        if (v7_34 >= v8_17.length) {
                                                            break;
                                                        }
                                                        if (!v6_54.equals(v8_17[v7_34].e)) {
                                                            v7_34++;
                                                        } else {
                                                            v4_10.f[v7_34] = v5_12;
                                                            v6_55 = 1;
                                                        }
                                                        if (v6_55 == 0) {
                                                            long v6_57 = v4_10.f;
                                                            v4_10.f = ((c.e.a.a.h.Sc[]) java.util.Arrays.copyOf(v6_57, (v6_57.length + 1)));
                                                            v4_10.f[(v3_17.a.f.length - 1)] = v5_12;
                                                        }
                                                        if (v25_4 > 0) {
                                                            this.u().a(v2_49);
                                                            this.o().x().a("Updated lifetime engagement user property with value. Value", v2_49.e);
                                                        }
                                                    }
                                                    v6_55 = 0;
                                                }
                                                long v15_7;
                                                int v4_17;
                                                c.e.a.a.h.ia v1_5;
                                                v4_10.D = this.a(v4_10.r, v4_10.f, v4_10.e);
                                                if ((!((Boolean) c.e.a.a.h.oa.f.a()).booleanValue()) || (!"1".equals(this.c.l().a(v3_17.a.r, "measurement.event_sampling_enabled")))) {
                                                    v15_7 = v3_17;
                                                    v1_5 = v4_10;
                                                    v4_17 = 0;
                                                } else {
                                                    c.e.a.a.h.Aa v2_62 = new java.util.HashMap();
                                                    String v5_22 = new c.e.a.a.h.Nc[v4_10.e.length];
                                                    long v6_65 = this.s().x();
                                                    Boolean v7_43 = v4_10.e;
                                                    Boolean v8_23 = v7_43.length;
                                                    int v9_15 = 0;
                                                    boolean v10_33 = 0;
                                                    while (v9_15 < v8_23) {
                                                        c.e.a.a.h.ia v1_27;
                                                        long v15_16;
                                                        String v22_2;
                                                        c.e.a.a.h.aa v23_4;
                                                        long v24_3;
                                                        String v21_4;
                                                        int v11_21 = v7_43[v9_15];
                                                        if (!v11_21.e.equals("_ep")) {
                                                            long v12_16;
                                                            if (ark>c.e.a.a.h.Xaark>.a(v11_21, "_dbg", Long.valueOf(1))) {
                                                                v12_16 = 1;
                                                            } else {
                                                                v12_16 = this.q().d(v3_17.a.r, v11_21.e);
                                                            }
                                                            if (v12_16 > 0) {
                                                                c.e.a.a.h.ia v1_18 = ((c.e.a.a.h.ia) v2_62.get(v11_21.e));
                                                                if (v1_18 != null) {
                                                                    v21_4 = v7_43;
                                                                    v22_2 = v8_23;
                                                                } else {
                                                                    v21_4 = v7_43;
                                                                    v1_18 = this.u().a(v3_17.a.r, v11_21.e);
                                                                    if (v1_18 != null) {
                                                                    } else {
                                                                        v22_2 = v8_23;
                                                                        this.o().w().a("Event being bundled has no eventAggregate. appId, eventName", v3_17.a.r, v11_21.e);
                                                                        v1_18 = new c.e.a.a.h.ia;
                                                                        v1_18(v3_17.a.r, v11_21.e, 1, 1, v11_21.f.longValue(), 0, 0, 0, 0);
                                                                    }
                                                                }
                                                                Boolean v8_30;
                                                                this.s();
                                                                Boolean v7_54 = ((Long) c.e.a.a.h.Ac.b(v11_21, "_eid"));
                                                                if (v7_54 == null) {
                                                                    v8_30 = 0;
                                                                } else {
                                                                    v8_30 = 1;
                                                                }
                                                                Boolean v7_58;
                                                                c.e.a.a.h.ia v1_24;
                                                                Boolean v8_34;
                                                                Boolean v8_31 = Boolean.valueOf(v8_30);
                                                                if (v12_16 != 1) {
                                                                    if (v6_65.nextInt(v12_16) != 0) {
                                                                        v15_16 = v3_17;
                                                                        v23_4 = v4_10;
                                                                        v24_3 = v6_65;
                                                                        if (Math.abs((v11_21.f.longValue() - v1_18.f)) < 86400000) {
                                                                            if (!v8_31.booleanValue()) {
                                                                                v9_15++;
                                                                                v3_17 = v15_16;
                                                                                v7_43 = v21_4;
                                                                                v8_23 = v22_2;
                                                                                v4_10 = v23_4;
                                                                                v6_65 = v24_3;
                                                                            } else {
                                                                                v2_62.put(v11_21.e, v1_18.a(v7_54, 0, 0));
                                                                            }
                                                                        } else {
                                                                            this.s();
                                                                            v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_efs", Long.valueOf(1));
                                                                            this.s();
                                                                            long v6_82 = ((long) v12_16);
                                                                            v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", Long.valueOf(v6_82));
                                                                            String v3_26 = (v10_33 + 1);
                                                                            v5_22[v10_33] = v11_21;
                                                                            if (v8_31.booleanValue()) {
                                                                                v1_18 = v1_18.a(0, Long.valueOf(v6_82), Boolean.valueOf(1));
                                                                            }
                                                                            v2_62.put(v11_21.e, v1_18.b(v11_21.f.longValue()));
                                                                            v10_33 = v3_26;
                                                                        }
                                                                    } else {
                                                                        this.s();
                                                                        long v12_19 = ((long) v12_16);
                                                                        v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", Long.valueOf(v12_19));
                                                                        v7_58 = (v10_33 + 1);
                                                                        v5_22[v10_33] = v11_21;
                                                                        if (v8_31.booleanValue()) {
                                                                            v1_18 = v1_18.a(0, Long.valueOf(v12_19), 0);
                                                                        }
                                                                        v8_34 = v11_21.e;
                                                                        v1_24 = v1_18.b(v11_21.f.longValue());
                                                                        v2_62.put(v8_34, v1_24);
                                                                    }
                                                                } else {
                                                                    v7_58 = (v10_33 + 1);
                                                                    v5_22[v10_33] = v11_21;
                                                                    if ((v8_31.booleanValue()) && ((v1_18.g != null) || ((v1_18.h != null) || (v1_18.i != null)))) {
                                                                        v1_24 = v1_18.a(0, 0, 0);
                                                                        v8_34 = v11_21.e;
                                                                    }
                                                                }
                                                                v10_33 = v7_58;
                                                                v15_16 = v3_17;
                                                                v23_4 = v4_10;
                                                                v24_3 = v6_65;
                                                            } else {
                                                                this.o().w().a("Sample rate must be positive. event, rate", v11_21.e, Integer.valueOf(v12_16));
                                                                v1_27 = (v10_33 + 1);
                                                                v5_22[v10_33] = v11_21;
                                                                v10_33 = v1_27;
                                                                v15_16 = v3_17;
                                                                v23_4 = v4_10;
                                                                v24_3 = v6_65;
                                                                v21_4 = v7_43;
                                                                v22_2 = v8_23;
                                                            }
                                                        } else {
                                                            this.s();
                                                            long v12_23 = ((String) c.e.a.a.h.Ac.b(v11_21, "_en"));
                                                            long v15_19 = ((c.e.a.a.h.ia) v2_62.get(v12_23));
                                                            if (v15_19 == 0) {
                                                                v15_19 = this.u().a(v3_17.a.r, v12_23);
                                                                v2_62.put(v12_23, v15_19);
                                                            }
                                                            if (v15_19.g != null) {
                                                            } else {
                                                                if (v15_19.h.longValue() > 1) {
                                                                    this.s();
                                                                    v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", v15_19.h);
                                                                }
                                                                c.e.a.a.h.ia v1_35 = v15_19.i;
                                                                if ((v1_35 != null) && (v1_35.booleanValue())) {
                                                                    this.s();
                                                                    v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_efs", Long.valueOf(1));
                                                                }
                                                                v1_27 = (v10_33 + 1);
                                                                v5_22[v10_33] = v11_21;
                                                            }
                                                        }
                                                    }
                                                    v15_7 = v3_17;
                                                    v1_5 = v4_10;
                                                    v4_17 = 0;
                                                    if (v10_33 < v1_5.e.length) {
                                                        v1_5.e = ((c.e.a.a.h.Nc[]) java.util.Arrays.copyOf(v5_22, v10_33));
                                                    }
                                                    c.e.a.a.h.Aa v2_64 = v2_62.entrySet().iterator();
                                                    while (v2_64.hasNext()) {
                                                        this.u().a(((c.e.a.a.h.ia) ((java.util.Map$Entry) v2_64.next()).getValue()));
                                                    }
                                                }
                                                v1_5.h = Long.valueOf(nan);
                                                v1_5.i = Long.valueOf(-0.0);
                                                c.e.a.a.h.Aa v2_69 = 0;
                                                while(true) {
                                                    String v3_7 = v1_5.e;
                                                    if (v2_69 >= v3_7.length) {
                                                        break;
                                                    }
                                                    String v3_11 = v3_7[v2_69];
                                                    if (v3_11.f.longValue() < v1_5.h.longValue()) {
                                                        v1_5.h = v3_11.f;
                                                    }
                                                    if (v3_11.f.longValue() > v1_5.i.longValue()) {
                                                        v1_5.i = v3_11.f;
                                                    }
                                                    v2_69++;
                                                }
                                                c.e.a.a.h.Aa v2_70 = v15_7;
                                                String v3_9 = v2_70.a.r;
                                                String v5_25 = this.u().b(v3_9);
                                                if (v5_25 != null) {
                                                    if (v1_5.e.length > 0) {
                                                        Boolean v8_25;
                                                        long v6_68 = v5_25.h();
                                                        if (v6_68 == 0) {
                                                            v8_25 = v4_17;
                                                        } else {
                                                            v8_25 = Long.valueOf(v6_68);
                                                        }
                                                        v1_5.k = v8_25;
                                                        Boolean v8_26 = v5_25.g();
                                                        if (v8_26 != 0) {
                                                            v6_68 = v8_26;
                                                        } else {
                                                        }
                                                        if (v6_68 != 0) {
                                                            v4_17 = Long.valueOf(v6_68);
                                                        }
                                                        v1_5.j = v4_17;
                                                        v5_25.r();
                                                        v1_5.z = Integer.valueOf(((int) v5_25.o()));
                                                        v5_25.a(v1_5.h.longValue());
                                                        v5_25.b(v1_5.i.longValue());
                                                        v1_5.A = v5_25.s();
                                                        this.u().a(v5_25);
                                                    }
                                                } else {
                                                    this.o().B().a("Bundling raw events w/o app info. appId", c.e.a.a.h.ya.a(v2_70.a.r));
                                                }
                                                if (v1_5.e.length > 0) {
                                                    int v4_31;
                                                    int v4_30 = this.q().a(v2_70.a.r);
                                                    if (v4_30 == 0) {
                                                        if (!android.text.TextUtils.isEmpty(v2_70.a.B)) {
                                                            this.o().w().a("Did not find measurement config or missing version info. appId", c.e.a.a.h.ya.a(v2_70.a.r));
                                                        } else {
                                                            v4_31 = Long.valueOf(-1);
                                                            v1_5.J = v4_31;
                                                        }
                                                    } else {
                                                        v4_31 = v4_30.c;
                                                        if (v4_31 != 0) {
                                                        }
                                                    }
                                                    this.u().a(v1_5, v20_4);
                                                }
                                                this.u().a(v2_70.b);
                                                c.e.a.a.h.ia v1_7 = this.u();
                                                c.e.a.a.h.Aa v2_72 = v1_7.w();
                                                try {
                                                    String v5_31 = new String[2];
                                                    v5_31[0] = v3_9;
                                                    v5_31[1] = v3_9;
                                                    v2_72.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_31);
                                                } catch (android.database.sqlite.SQLiteException v0_12) {
                                                    v1_7.o().B().a("Failed to remove unused event metadata. appId", c.e.a.a.h.ya.a(v3_9), v0_12);
                                                }
                                                this.u().B();
                                                this.u().C();
                                                return 1;
                                            }
                                        }
                                        if (v8_11.moveToNext()) {
                                            v5_38.o().w().a("Get multiple raw event metadata records, expected one. appId", c.e.a.a.h.ya.a(v4_0));
                                        }
                                        String v16_2;
                                        String[] v17_1;
                                        v8_11.close();
                                        v3_17.a(v13_11);
                                        if (v6_0 == -1) {
                                            boolean v13_13 = new String[2];
                                            v13_13[0] = v4_0;
                                            v13_13[1] = v10_18;
                                            v16_2 = "app_id = ? and metadata_fingerprint = ?";
                                            v17_1 = v13_13;
                                        } else {
                                            boolean v14_4 = new String[3];
                                            v14_4[0] = v4_0;
                                            v14_4[1] = v10_18;
                                            v14_4[2] = String.valueOf(v6_0);
                                            v16_2 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v17_1 = v14_4;
                                        }
                                        long v15_4 = new String[4];
                                        v15_4[0] = "rowid";
                                        v15_4[1] = "name";
                                        v15_4[2] = "timestamp";
                                        v15_4[3] = "data";
                                        long v6_50 = v23_2.query("raw_events", v15_4, v16_2, v17_1, 0, 0, "rowid", 0);
                                        try {
                                            if (v6_50.moveToFirst()) {
                                                do {
                                                    Boolean v7_14 = v6_50.getLong(0);
                                                    boolean v10_25 = v6_50.getBlob(3);
                                                    boolean v10_26 = c.e.a.a.h.md.a(v10_25, v10_25.length);
                                                    boolean v13_19 = new c.e.a.a.h.Nc();
                                                    v13_19.a(v10_26);
                                                    v13_19.e = v6_50.getString(1);
                                                    v13_19.f = Long.valueOf(v6_50.getLong(2));
                                                    if (v3_17.a(v7_14, v13_19)) {
                                                    } else {
                                                        break;
                                                    }
                                                } while(v6_50.moveToNext());
                                            } else {
                                                v5_38.o().w().a("Raw event data disappeared while in transaction. appId", c.e.a.a.h.ya.a(v4_0));
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_7) {
                                            c.e.a.a.h.Aa v2_1 = v0_7;
                                            v4_0 = v6_50;
                                            if (v4_0 != 0) {
                                                v4_0.close();
                                            }
                                            throw v2_1;
                                        } catch (android.database.sqlite.SQLiteException v0_6) {
                                            v22_0 = v6_50;
                                            long v6_20 = v0_6;
                                            v8_11 = v22_0;
                                            v5_38.o().B().a("Data loss. Error selecting raw event. appId", c.e.a.a.h.ya.a(v4_0), v6_20);
                                            if (v8_11 == null) {
                                            }
                                        }
                                        v6_50.close();
                                    } else {
                                        v5_38.o().B().a("Raw event metadata record is missing. appId", c.e.a.a.h.ya.a(v4_0));
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_8) {
                                    v6_20 = v0_8;
                                    v22_0 = v8_11;
                                }
                            } catch (android.database.sqlite.SQLiteException v0_3) {
                                v2_1 = v0_3;
                                v4_0 = v22_0;
                            } catch (android.database.sqlite.SQLiteException v0_2) {
                                v6_20 = v0_2;
                            }
                        }
                    } else {
                        try {
                            boolean v13_28;
                            if (v6_0 == -1) {
                                v13_28 = new String[1];
                                v13_28[0] = String.valueOf(p39);
                            } else {
                                v13_28 = new String[2];
                                v13_28[0] = String.valueOf(v6_0);
                                v13_28[1] = String.valueOf(p39);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_13) {
                            v6_20 = v0_13;
                            v22_0 = 0;
                        }
                        if (v6_0 != -1) {
                            v14_6 = "rowid <= ? and ";
                        }
                        boolean v10_42 = new StringBuilder((v14_6.length() + 148));
                        v10_42.append("select app_id, metadata_fingerprint from raw_events where ");
                        v10_42.append(v14_6);
                        v10_42.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v4_0 = v15_3.rawQuery(v10_42.toString(), v13_28);
                        if (v4_0.moveToFirst()) {
                            boolean v10_9 = v4_0.getString(0);
                            try {
                                boolean v13_0 = v4_0.getString(1);
                                v4_0.close();
                                v22_0 = v4_0;
                                v4_0 = v10_9;
                                v10_18 = v13_0;
                            } catch (android.database.sqlite.SQLiteException v0_0) {
                                v6_20 = v0_0;
                                v22_0 = v4_0;
                                v4_0 = v10_18;
                            }
                        } else {
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_11) {
                    v2_1 = v0_11;
                } catch (android.database.sqlite.SQLiteException v0_9) {
                    v6_20 = v0_9;
                    v22_0 = v4_0;
                    v4_0 = 0;
                }
                v4_0.close();
            } catch (android.database.sqlite.SQLiteException v0_15) {
                v2_1 = v0_15;
                v4_0 = 0;
            } catch (android.database.sqlite.SQLiteException v0_14) {
                v6_20 = v0_14;
                v4_0 = 0;
                v8_11 = 0;
            } catch (android.database.sqlite.SQLiteException v0_10) {
                v2_1 = v0_10;
                v4_0 = v8_11;
            }
        } catch (android.database.sqlite.SQLiteException v0_1) {
            c.e.a.a.h.ia v1_1 = v0_1;
            this.u().C();
            throw v1_1;
        }
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final boolean a(String p38, long p39)
    {
        c.e.a.a.h.Aa v2_0 = "_lte";
        this.u().A();
        try {
            int v4_0 = 0;
            String v3_17 = new ark>c.e.a.a.h.Xaark>$a(this, 0);
            String v5_38 = this.u();
            long v6_0 = this.J;
            a.b.f.a.H.d(v3_17);
            v5_38.b();
            v5_38.s();
            try {
                String v22_0;
                boolean v10_18;
                long v15_3 = v5_38.w();
                boolean v14_6 = "";
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        boolean v10_31;
                        if (v6_0 == -1) {
                            v10_31 = new String[1];
                            v10_31[0] = 0;
                        } else {
                            v10_31 = new String[2];
                            v10_31[0] = 0;
                            v10_31[1] = String.valueOf(v6_0);
                        }
                        if (v6_0 != -1) {
                            v14_6 = " and rowid <= ?";
                        }
                        boolean v13_25 = new StringBuilder((v14_6.length() + 84));
                        v13_25.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v13_25.append(v14_6);
                        v13_25.append(" order by rowid limit 1;");
                        v4_0 = v15_3.rawQuery(v13_25.toString(), v10_31);
                        if (v4_0.moveToFirst()) {
                            boolean v13_26 = v4_0.getString(0);
                            v4_0.close();
                            v22_0 = v4_0;
                            v10_18 = v13_26;
                            v4_0 = 0;
                            try {
                                boolean v13_2 = new String[1];
                                v13_2[0] = "metadata";
                                int v9_1 = new String[2];
                                v9_1[0] = v4_0;
                                v9_1[1] = v10_18;
                                c.e.a.a.h.aa v23_2 = v15_3;
                                Boolean v8_11 = v15_3.query("raw_events_metadata", v13_2, "app_id = ? and metadata_fingerprint = ?", v9_1, 0, 0, "rowid", "2");
                                try {
                                    if (v8_11.moveToFirst()) {
                                        int v9_3 = v8_11.getBlob(0);
                                        int v9_4 = c.e.a.a.h.md.a(v9_3, v9_3.length);
                                        boolean v13_11 = new c.e.a.a.h.Qc();
                                        try {
                                            v13_11.a(v9_4);
                                        } catch (android.database.sqlite.SQLiteException v0_4) {
                                            v5_38.o().B().a("Data loss. Failed to merge raw event metadata. appId", c.e.a.a.h.ya.a(v4_0), v0_4);
                                            v8_11.close();
                                            int v4_9;
                                            if (v3_17.c == null) {
                                                v4_9 = 1;
                                            } else {
                                                if (!v3_17.c.isEmpty()) {
                                                    v4_9 = 0;
                                                } else {
                                                }
                                            }
                                            if (v4_9 != 0) {
                                                this.u().B();
                                                this.u().C();
                                                return 0;
                                            } else {
                                                int v4_10 = v3_17.a;
                                                String v5_4 = new c.e.a.a.h.Nc[v3_17.c.size()];
                                                v4_10.e = v5_4;
                                                String v5_6 = this.c.c(v4_10.r);
                                                Boolean v8_9 = 0;
                                                int v9_0 = 0;
                                                boolean v10_19 = 0;
                                                boolean v13_4 = 0;
                                                while (v8_9 < v3_17.c.size()) {
                                                    c.e.a.a.h.aa v23_1;
                                                    String v21_0;
                                                    long v15_23 = ((c.e.a.a.h.Nc) v3_17.c.get(v8_9));
                                                    if (!this.q().b(v3_17.a.r, v15_23.e)) {
                                                        long v25_1;
                                                        long v24_4;
                                                        v21_0 = v2_0;
                                                        String v20_0 = v10_19;
                                                        c.e.a.a.h.Aa v2_75 = this.q().c(v3_17.a.r, v15_23.e);
                                                        if (v2_75 != null) {
                                                            if (v15_23.d == null) {
                                                                boolean v10_44 = new c.e.a.a.h.Oc[0];
                                                                v15_23.d = v10_44;
                                                            }
                                                            long v6_34 = v15_23.d;
                                                            boolean v10_21 = v6_34.length;
                                                            v23_1 = v8_9;
                                                            int v11_15 = 0;
                                                            long v12_9 = 0;
                                                            String v22_1 = 0;
                                                            while(true) {
                                                                v24_4 = v9_0;
                                                                if (v11_15 >= v10_21) {
                                                                    break;
                                                                }
                                                                long v25_2 = v10_21;
                                                                boolean v10_20 = v6_34[v11_15];
                                                                long v26_1 = v6_34;
                                                                if (!"_c".equals(v10_20.d)) {
                                                                    if ("_r".equals(v10_20.d)) {
                                                                        v10_20.f = Long.valueOf(1);
                                                                        v22_1 = 1;
                                                                    }
                                                                } else {
                                                                    v10_20.f = Long.valueOf(1);
                                                                    v12_9 = 1;
                                                                }
                                                                v11_15++;
                                                                v9_0 = v24_4;
                                                                v10_21 = v25_2;
                                                                v6_34 = v26_1;
                                                            }
                                                            if ((v12_9 == 0) && (v2_75 != null)) {
                                                                this.o().y().a("Marking event as conversion", this.t().a(v15_23.e));
                                                                long v6_97 = v15_23.d;
                                                                long v6_1 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v6_97, (v6_97.length + 1)));
                                                                boolean v10_1 = new c.e.a.a.h.Oc();
                                                                v10_1.d = "_c";
                                                                v10_1.f = Long.valueOf(1);
                                                                v6_1[(v6_1.length - 1)] = v10_1;
                                                                v15_23.d = v6_1;
                                                            }
                                                            if (v22_1 == null) {
                                                                this.o().y().a("Marking event as real-time", this.t().a(v15_23.e));
                                                                long v6_4 = v15_23.d;
                                                                long v6_6 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v6_4, (v6_4.length + 1)));
                                                                boolean v10_7 = new c.e.a.a.h.Oc();
                                                                v10_7.d = "_r";
                                                                v10_7.f = Long.valueOf(1);
                                                                v6_6[(v6_6.length - 1)] = v10_7;
                                                                v15_23.d = v6_6;
                                                            }
                                                            boolean v10_10;
                                                            v25_1 = v13_4;
                                                            if (this.u().a(this.i(), v3_17.a.r, 0, 0, 0, 0, 1).e <= ((long) this.c.a(v3_17.a.r))) {
                                                                v10_10 = 1;
                                                            } else {
                                                                long v6_13 = 0;
                                                                while(true) {
                                                                    boolean v10_11 = v15_23.d;
                                                                    if (v6_13 < v10_11.length) {
                                                                        if ("_r".equals(v10_11[v6_13].d)) {
                                                                            break;
                                                                        }
                                                                        v6_13++;
                                                                    }
                                                                    v10_10 = v20_0;
                                                                }
                                                                Boolean v8_0 = v15_23.d;
                                                                boolean v10_17 = new c.e.a.a.h.Oc[(v8_0.length - 1)];
                                                                if (v6_13 > 0) {
                                                                    System.arraycopy(v8_0, 0, v10_17, 0, v6_13);
                                                                }
                                                                if (v6_13 < v10_17.length) {
                                                                    System.arraycopy(v15_23.d, (v6_13 + 1), v10_17, v6_13, (v10_17.length - v6_13));
                                                                }
                                                                v15_23.d = v10_17;
                                                            }
                                                            if ((c.e.a.a.h.Ac.a(v15_23.e)) && ((v2_75 != null) && (this.u().a(this.i(), v3_17.a.r, 0, 0, 1, 0, 0).c > ((long) this.c.b(v3_17.a.r, c.e.a.a.h.oa.t))))) {
                                                                this.o().w().a("Too many conversions. Not logging as conversion. appId", c.e.a.a.h.ya.a(v3_17.a.r));
                                                                c.e.a.a.h.Aa v2_10 = v15_23.d;
                                                                Boolean v8_7 = 0;
                                                                int v11_14 = 0;
                                                                long v12_8 = 0;
                                                                while (v8_7 < v2_10.length) {
                                                                    boolean v13_5 = v2_10[v8_7];
                                                                    if (!"_c".equals(v13_5.d)) {
                                                                        if ("_err".equals(v13_5.d)) {
                                                                            v11_14 = 1;
                                                                        }
                                                                    } else {
                                                                        v12_8 = v13_5;
                                                                    }
                                                                    v8_7++;
                                                                }
                                                                if ((v11_14 == 0) || (v12_8 == 0)) {
                                                                    if (v12_8 == 0) {
                                                                        this.o().B().a("Did not find conversion parameter. appId", c.e.a.a.h.ya.a(v3_17.a.r));
                                                                    } else {
                                                                        v12_8.d = "_err";
                                                                        v12_8.f = Long.valueOf(10);
                                                                    }
                                                                } else {
                                                                    c.e.a.a.h.Aa v2_14 = v15_23.d;
                                                                    Boolean v7_3 = new c.e.a.a.h.Oc[1];
                                                                    v7_3[0] = v12_8;
                                                                    v15_23.d = ((c.e.a.a.h.Oc[]) a.b.f.a.H.b(v2_14, v7_3));
                                                                }
                                                            }
                                                            v20_0 = v10_10;
                                                        } else {
                                                            this.s();
                                                            if (!c.e.a.a.h.Ac.l(v15_23.e)) {
                                                                v23_1 = v8_9;
                                                                v24_4 = v9_0;
                                                                v25_1 = v13_4;
                                                            } else {
                                                            }
                                                        }
                                                        if ((v5_6 != null) && ("_e".equals(v15_23.e))) {
                                                            c.e.a.a.h.Aa v2_25;
                                                            Boolean v7_5;
                                                            long v6_27;
                                                            c.e.a.a.h.Aa v2_19 = v15_23.d;
                                                            if (v2_19 == null) {
                                                                v2_25 = this.o().w();
                                                                v6_27 = "Engagement event does not contain any parameters. appId";
                                                                v7_5 = v3_17.a.r;
                                                            } else {
                                                                if (v2_19.length != 0) {
                                                                    this.s();
                                                                    c.e.a.a.h.Aa v2_23 = ((Long) c.e.a.a.h.Ac.b(v15_23, "_et"));
                                                                    if (v2_23 != null) {
                                                                        v25_1 += v2_23.longValue();
                                                                        v9_0 = (v24_4 + 1);
                                                                        v4_10.e[v24_4] = v15_23;
                                                                        v10_19 = v20_0;
                                                                        v13_4 = v25_1;
                                                                        v8_9 = (v23_1 + 1);
                                                                        v2_0 = v21_0;
                                                                        long v12 = 1;
                                                                    } else {
                                                                        v2_25 = this.o().w();
                                                                        v6_27 = "Engagement event does not include duration. appId";
                                                                        v7_5 = v3_17.a.r;
                                                                    }
                                                                } else {
                                                                }
                                                            }
                                                            v2_25.a(v6_27, c.e.a.a.h.ya.a(v7_5));
                                                        }
                                                    } else {
                                                        c.e.a.a.h.Aa v2_34;
                                                        String v20_1 = v10_19;
                                                        v21_0 = v2_0;
                                                        this.o().w().a("Dropping blacklisted raw event. appId", c.e.a.a.h.ya.a(v3_17.a.r), this.t().a(v15_23.e));
                                                        if (this.s().j(v3_17.a.r)) {
                                                            v2_34 = 1;
                                                        } else {
                                                            if (!this.s().k(v3_17.a.r)) {
                                                                v2_34 = 0;
                                                            } else {
                                                            }
                                                        }
                                                        if ((v2_34 == null) && (!"_err".equals(v15_23.e))) {
                                                            this.s().a(v3_17.a.r, 11, "_ev", v15_23.e, 0);
                                                        }
                                                        v23_1 = v8_9;
                                                        v10_19 = v20_1;
                                                    }
                                                }
                                                String v21_3 = v2_0;
                                                String v20_4 = v10_19;
                                                long v25_4 = v13_4;
                                                int v9_12 = v9_0;
                                                if (v9_12 < v3_17.c.size()) {
                                                    v4_10.e = ((c.e.a.a.h.Nc[]) java.util.Arrays.copyOf(v4_10.e, v9_12));
                                                }
                                                if (v5_6 != null) {
                                                    c.e.a.a.h.Aa v2_49;
                                                    long v6_54 = v21_3;
                                                    c.e.a.a.h.Aa v2_46 = this.u().c(v4_10.r, v6_54);
                                                    if (v2_46 == null) {
                                                        v2_49 = new c.e.a.a.h.zc;
                                                        v2_49(v4_10.r, "auto", "_lte", ((c.e.a.a.c.d.b) this.n).a(), Long.valueOf(v25_4));
                                                    } else {
                                                        if (v2_46.e != null) {
                                                            String v5_9 = new c.e.a.a.h.zc;
                                                            v5_9(v4_10.r, "auto", "_lte", ((c.e.a.a.c.d.b) this.n).a(), Long.valueOf((((Long) v2_46.e).longValue() + v25_4)));
                                                            v2_49 = v5_9;
                                                        } else {
                                                        }
                                                    }
                                                    String v5_12 = new c.e.a.a.h.Sc();
                                                    v5_12.e = v6_54;
                                                    v5_12.d = Long.valueOf(((c.e.a.a.c.d.b) this.n).a());
                                                    v5_12.g = ((Long) v2_49.e);
                                                    Boolean v7_34 = 0;
                                                    while(true) {
                                                        long v6_55;
                                                        Boolean v8_17 = v4_10.f;
                                                        if (v7_34 >= v8_17.length) {
                                                            break;
                                                        }
                                                        if (!v6_54.equals(v8_17[v7_34].e)) {
                                                            v7_34++;
                                                        } else {
                                                            v4_10.f[v7_34] = v5_12;
                                                            v6_55 = 1;
                                                        }
                                                        if (v6_55 == 0) {
                                                            long v6_57 = v4_10.f;
                                                            v4_10.f = ((c.e.a.a.h.Sc[]) java.util.Arrays.copyOf(v6_57, (v6_57.length + 1)));
                                                            v4_10.f[(v3_17.a.f.length - 1)] = v5_12;
                                                        }
                                                        if (v25_4 > 0) {
                                                            this.u().a(v2_49);
                                                            this.o().x().a("Updated lifetime engagement user property with value. Value", v2_49.e);
                                                        }
                                                    }
                                                    v6_55 = 0;
                                                }
                                                long v15_7;
                                                int v4_17;
                                                c.e.a.a.h.ia v1_5;
                                                v4_10.D = this.a(v4_10.r, v4_10.f, v4_10.e);
                                                if ((!((Boolean) c.e.a.a.h.oa.f.a()).booleanValue()) || (!"1".equals(this.c.l().a(v3_17.a.r, "measurement.event_sampling_enabled")))) {
                                                    v15_7 = v3_17;
                                                    v1_5 = v4_10;
                                                    v4_17 = 0;
                                                } else {
                                                    c.e.a.a.h.Aa v2_62 = new java.util.HashMap();
                                                    String v5_22 = new c.e.a.a.h.Nc[v4_10.e.length];
                                                    long v6_65 = this.s().x();
                                                    Boolean v7_43 = v4_10.e;
                                                    Boolean v8_23 = v7_43.length;
                                                    int v9_15 = 0;
                                                    boolean v10_33 = 0;
                                                    while (v9_15 < v8_23) {
                                                        String v22_2;
                                                        c.e.a.a.h.aa v23_4;
                                                        long v24_3;
                                                        String v21_4;
                                                        c.e.a.a.h.ia v1_27;
                                                        long v15_16;
                                                        int v11_21 = v7_43[v9_15];
                                                        if (!v11_21.e.equals("_ep")) {
                                                            long v12_16;
                                                            if (ark>c.e.a.a.h.Xaark>.a(v11_21, "_dbg", Long.valueOf(1))) {
                                                                v12_16 = 1;
                                                            } else {
                                                                v12_16 = this.q().d(v3_17.a.r, v11_21.e);
                                                            }
                                                            if (v12_16 > 0) {
                                                                c.e.a.a.h.ia v1_18 = ((c.e.a.a.h.ia) v2_62.get(v11_21.e));
                                                                if (v1_18 != null) {
                                                                    v21_4 = v7_43;
                                                                    v22_2 = v8_23;
                                                                } else {
                                                                    v21_4 = v7_43;
                                                                    v1_18 = this.u().a(v3_17.a.r, v11_21.e);
                                                                    if (v1_18 != null) {
                                                                    } else {
                                                                        v22_2 = v8_23;
                                                                        this.o().w().a("Event being bundled has no eventAggregate. appId, eventName", v3_17.a.r, v11_21.e);
                                                                        v1_18 = new c.e.a.a.h.ia;
                                                                        v1_18(v3_17.a.r, v11_21.e, 1, 1, v11_21.f.longValue(), 0, 0, 0, 0);
                                                                    }
                                                                }
                                                                Boolean v8_30;
                                                                this.s();
                                                                Boolean v7_54 = ((Long) c.e.a.a.h.Ac.b(v11_21, "_eid"));
                                                                if (v7_54 == null) {
                                                                    v8_30 = 0;
                                                                } else {
                                                                    v8_30 = 1;
                                                                }
                                                                c.e.a.a.h.ia v1_24;
                                                                Boolean v8_34;
                                                                Boolean v7_58;
                                                                Boolean v8_31 = Boolean.valueOf(v8_30);
                                                                if (v12_16 != 1) {
                                                                    if (v6_65.nextInt(v12_16) != 0) {
                                                                        v15_16 = v3_17;
                                                                        v23_4 = v4_10;
                                                                        v24_3 = v6_65;
                                                                        if (Math.abs((v11_21.f.longValue() - v1_18.f)) < 86400000) {
                                                                            if (!v8_31.booleanValue()) {
                                                                                v9_15++;
                                                                                v3_17 = v15_16;
                                                                                v7_43 = v21_4;
                                                                                v8_23 = v22_2;
                                                                                v4_10 = v23_4;
                                                                                v6_65 = v24_3;
                                                                            } else {
                                                                                v2_62.put(v11_21.e, v1_18.a(v7_54, 0, 0));
                                                                            }
                                                                        } else {
                                                                            this.s();
                                                                            v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_efs", Long.valueOf(1));
                                                                            this.s();
                                                                            long v6_82 = ((long) v12_16);
                                                                            v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", Long.valueOf(v6_82));
                                                                            String v3_26 = (v10_33 + 1);
                                                                            v5_22[v10_33] = v11_21;
                                                                            if (v8_31.booleanValue()) {
                                                                                v1_18 = v1_18.a(0, Long.valueOf(v6_82), Boolean.valueOf(1));
                                                                            }
                                                                            v2_62.put(v11_21.e, v1_18.b(v11_21.f.longValue()));
                                                                            v10_33 = v3_26;
                                                                        }
                                                                    } else {
                                                                        this.s();
                                                                        long v12_19 = ((long) v12_16);
                                                                        v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", Long.valueOf(v12_19));
                                                                        v7_58 = (v10_33 + 1);
                                                                        v5_22[v10_33] = v11_21;
                                                                        if (v8_31.booleanValue()) {
                                                                            v1_18 = v1_18.a(0, Long.valueOf(v12_19), 0);
                                                                        }
                                                                        v8_34 = v11_21.e;
                                                                        v1_24 = v1_18.b(v11_21.f.longValue());
                                                                        v2_62.put(v8_34, v1_24);
                                                                    }
                                                                } else {
                                                                    v7_58 = (v10_33 + 1);
                                                                    v5_22[v10_33] = v11_21;
                                                                    if ((v8_31.booleanValue()) && ((v1_18.g != null) || ((v1_18.h != null) || (v1_18.i != null)))) {
                                                                        v1_24 = v1_18.a(0, 0, 0);
                                                                        v8_34 = v11_21.e;
                                                                    }
                                                                }
                                                                v10_33 = v7_58;
                                                                v15_16 = v3_17;
                                                                v23_4 = v4_10;
                                                                v24_3 = v6_65;
                                                            } else {
                                                                this.o().w().a("Sample rate must be positive. event, rate", v11_21.e, Integer.valueOf(v12_16));
                                                                v1_27 = (v10_33 + 1);
                                                                v5_22[v10_33] = v11_21;
                                                                v10_33 = v1_27;
                                                                v15_16 = v3_17;
                                                                v23_4 = v4_10;
                                                                v24_3 = v6_65;
                                                                v21_4 = v7_43;
                                                                v22_2 = v8_23;
                                                            }
                                                        } else {
                                                            this.s();
                                                            long v12_23 = ((String) c.e.a.a.h.Ac.b(v11_21, "_en"));
                                                            long v15_19 = ((c.e.a.a.h.ia) v2_62.get(v12_23));
                                                            if (v15_19 == 0) {
                                                                v15_19 = this.u().a(v3_17.a.r, v12_23);
                                                                v2_62.put(v12_23, v15_19);
                                                            }
                                                            if (v15_19.g != null) {
                                                            } else {
                                                                if (v15_19.h.longValue() > 1) {
                                                                    this.s();
                                                                    v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", v15_19.h);
                                                                }
                                                                c.e.a.a.h.ia v1_35 = v15_19.i;
                                                                if ((v1_35 != null) && (v1_35.booleanValue())) {
                                                                    this.s();
                                                                    v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_efs", Long.valueOf(1));
                                                                }
                                                                v1_27 = (v10_33 + 1);
                                                                v5_22[v10_33] = v11_21;
                                                            }
                                                        }
                                                    }
                                                    v15_7 = v3_17;
                                                    v1_5 = v4_10;
                                                    v4_17 = 0;
                                                    if (v10_33 < v1_5.e.length) {
                                                        v1_5.e = ((c.e.a.a.h.Nc[]) java.util.Arrays.copyOf(v5_22, v10_33));
                                                    }
                                                    c.e.a.a.h.Aa v2_64 = v2_62.entrySet().iterator();
                                                    while (v2_64.hasNext()) {
                                                        this.u().a(((c.e.a.a.h.ia) ((java.util.Map$Entry) v2_64.next()).getValue()));
                                                    }
                                                }
                                                v1_5.h = Long.valueOf(nan);
                                                v1_5.i = Long.valueOf(-0.0);
                                                c.e.a.a.h.Aa v2_69 = 0;
                                                while(true) {
                                                    String v3_7 = v1_5.e;
                                                    if (v2_69 >= v3_7.length) {
                                                        break;
                                                    }
                                                    String v3_11 = v3_7[v2_69];
                                                    if (v3_11.f.longValue() < v1_5.h.longValue()) {
                                                        v1_5.h = v3_11.f;
                                                    }
                                                    if (v3_11.f.longValue() > v1_5.i.longValue()) {
                                                        v1_5.i = v3_11.f;
                                                    }
                                                    v2_69++;
                                                }
                                                c.e.a.a.h.Aa v2_70 = v15_7;
                                                String v3_9 = v2_70.a.r;
                                                String v5_25 = this.u().b(v3_9);
                                                if (v5_25 != null) {
                                                    if (v1_5.e.length > 0) {
                                                        Boolean v8_25;
                                                        long v6_68 = v5_25.h();
                                                        if (v6_68 == 0) {
                                                            v8_25 = v4_17;
                                                        } else {
                                                            v8_25 = Long.valueOf(v6_68);
                                                        }
                                                        v1_5.k = v8_25;
                                                        Boolean v8_26 = v5_25.g();
                                                        if (v8_26 != 0) {
                                                            v6_68 = v8_26;
                                                        } else {
                                                        }
                                                        if (v6_68 != 0) {
                                                            v4_17 = Long.valueOf(v6_68);
                                                        }
                                                        v1_5.j = v4_17;
                                                        v5_25.r();
                                                        v1_5.z = Integer.valueOf(((int) v5_25.o()));
                                                        v5_25.a(v1_5.h.longValue());
                                                        v5_25.b(v1_5.i.longValue());
                                                        v1_5.A = v5_25.s();
                                                        this.u().a(v5_25);
                                                    }
                                                } else {
                                                    this.o().B().a("Bundling raw events w/o app info. appId", c.e.a.a.h.ya.a(v2_70.a.r));
                                                }
                                                if (v1_5.e.length > 0) {
                                                    int v4_31;
                                                    int v4_30 = this.q().a(v2_70.a.r);
                                                    if (v4_30 == 0) {
                                                        if (!android.text.TextUtils.isEmpty(v2_70.a.B)) {
                                                            this.o().w().a("Did not find measurement config or missing version info. appId", c.e.a.a.h.ya.a(v2_70.a.r));
                                                        } else {
                                                            v4_31 = Long.valueOf(-1);
                                                            v1_5.J = v4_31;
                                                        }
                                                    } else {
                                                        v4_31 = v4_30.c;
                                                        if (v4_31 != 0) {
                                                        }
                                                    }
                                                    this.u().a(v1_5, v20_4);
                                                }
                                                this.u().a(v2_70.b);
                                                c.e.a.a.h.ia v1_7 = this.u();
                                                c.e.a.a.h.Aa v2_72 = v1_7.w();
                                                try {
                                                    String v5_31 = new String[2];
                                                    v5_31[0] = v3_9;
                                                    v5_31[1] = v3_9;
                                                    v2_72.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_31);
                                                } catch (android.database.sqlite.SQLiteException v0_12) {
                                                    v1_7.o().B().a("Failed to remove unused event metadata. appId", c.e.a.a.h.ya.a(v3_9), v0_12);
                                                }
                                                this.u().B();
                                                this.u().C();
                                                return 1;
                                            }
                                        }
                                        if (v8_11.moveToNext()) {
                                            v5_38.o().w().a("Get multiple raw event metadata records, expected one. appId", c.e.a.a.h.ya.a(v4_0));
                                        }
                                        String v16_2;
                                        String[] v17_1;
                                        v8_11.close();
                                        v3_17.a(v13_11);
                                        if (v6_0 == -1) {
                                            boolean v13_13 = new String[2];
                                            v13_13[0] = v4_0;
                                            v13_13[1] = v10_18;
                                            v16_2 = "app_id = ? and metadata_fingerprint = ?";
                                            v17_1 = v13_13;
                                        } else {
                                            boolean v14_4 = new String[3];
                                            v14_4[0] = v4_0;
                                            v14_4[1] = v10_18;
                                            v14_4[2] = String.valueOf(v6_0);
                                            v16_2 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v17_1 = v14_4;
                                        }
                                        long v15_4 = new String[4];
                                        v15_4[0] = "rowid";
                                        v15_4[1] = "name";
                                        v15_4[2] = "timestamp";
                                        v15_4[3] = "data";
                                        long v6_50 = v23_2.query("raw_events", v15_4, v16_2, v17_1, 0, 0, "rowid", 0);
                                        try {
                                            if (v6_50.moveToFirst()) {
                                                do {
                                                    Boolean v7_14 = v6_50.getLong(0);
                                                    boolean v10_25 = v6_50.getBlob(3);
                                                    boolean v10_26 = c.e.a.a.h.md.a(v10_25, v10_25.length);
                                                    boolean v13_19 = new c.e.a.a.h.Nc();
                                                    v13_19.a(v10_26);
                                                    v13_19.e = v6_50.getString(1);
                                                    v13_19.f = Long.valueOf(v6_50.getLong(2));
                                                    if (v3_17.a(v7_14, v13_19)) {
                                                    } else {
                                                        break;
                                                    }
                                                } while(v6_50.moveToNext());
                                            } else {
                                                v5_38.o().w().a("Raw event data disappeared while in transaction. appId", c.e.a.a.h.ya.a(v4_0));
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_7) {
                                            c.e.a.a.h.Aa v2_1 = v0_7;
                                            v4_0 = v6_50;
                                            if (v4_0 != 0) {
                                                v4_0.close();
                                            }
                                            throw v2_1;
                                        } catch (android.database.sqlite.SQLiteException v0_6) {
                                            v22_0 = v6_50;
                                            long v6_20 = v0_6;
                                            v8_11 = v22_0;
                                            v5_38.o().B().a("Data loss. Error selecting raw event. appId", c.e.a.a.h.ya.a(v4_0), v6_20);
                                            if (v8_11 == null) {
                                            }
                                        }
                                        v6_50.close();
                                    } else {
                                        v5_38.o().B().a("Raw event metadata record is missing. appId", c.e.a.a.h.ya.a(v4_0));
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_8) {
                                    v6_20 = v0_8;
                                    v22_0 = v8_11;
                                }
                            } catch (android.database.sqlite.SQLiteException v0_3) {
                                v2_1 = v0_3;
                                v4_0 = v22_0;
                            } catch (android.database.sqlite.SQLiteException v0_2) {
                                v6_20 = v0_2;
                            }
                        }
                    } else {
                        try {
                            boolean v13_28;
                            if (v6_0 == -1) {
                                v13_28 = new String[1];
                                v13_28[0] = String.valueOf(p39);
                            } else {
                                v13_28 = new String[2];
                                v13_28[0] = String.valueOf(v6_0);
                                v13_28[1] = String.valueOf(p39);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_13) {
                            v6_20 = v0_13;
                            v22_0 = 0;
                        }
                        if (v6_0 != -1) {
                            v14_6 = "rowid <= ? and ";
                        }
                        boolean v10_42 = new StringBuilder((v14_6.length() + 148));
                        v10_42.append("select app_id, metadata_fingerprint from raw_events where ");
                        v10_42.append(v14_6);
                        v10_42.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v4_0 = v15_3.rawQuery(v10_42.toString(), v13_28);
                        if (v4_0.moveToFirst()) {
                            boolean v10_9 = v4_0.getString(0);
                            try {
                                boolean v13_0 = v4_0.getString(1);
                                v4_0.close();
                                v22_0 = v4_0;
                                v4_0 = v10_9;
                                v10_18 = v13_0;
                            } catch (android.database.sqlite.SQLiteException v0_0) {
                                v6_20 = v0_0;
                                v22_0 = v4_0;
                                v4_0 = v10_18;
                            }
                        } else {
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_11) {
                    v2_1 = v0_11;
                } catch (android.database.sqlite.SQLiteException v0_9) {
                    v6_20 = v0_9;
                    v22_0 = v4_0;
                    v4_0 = 0;
                }
                v4_0.close();
            } catch (android.database.sqlite.SQLiteException v0_15) {
                v2_1 = v0_15;
                v4_0 = 0;
            } catch (android.database.sqlite.SQLiteException v0_14) {
                v6_20 = v0_14;
                v4_0 = 0;
                v8_11 = 0;
            } catch (android.database.sqlite.SQLiteException v0_10) {
                v2_1 = v0_10;
                v4_0 = v8_11;
            }
        } catch (android.database.sqlite.SQLiteException v0_1) {
            c.e.a.a.h.ia v1_1 = v0_1;
            this.u().C();
            throw v1_1;
        }
    }

Method c.e.a.a.h.ua.a() calling method android.database.sqlite.SQLiteDatabase.insertOrThrow()


    public final boolean a(int p18, byte[] p19)
    {
        this.b();
        Long v3_9 = 0;
        if (!this.d) {
            android.content.ContentValues v4_1 = new android.content.ContentValues();
            v4_1.put("type", Integer.valueOf(p18));
            v4_1.put("entry", p19);
            c.e.a.a.h.Aa v5_2 = 5;
            int v6 = 0;
            int v7 = 5;
            while (v6 < v5_2) {
                String v8_0 = 0;
                try {
                    String[] v10 = this.w();
                    try {
                        if (v10 != null) {
                            try {
                                v10.beginTransaction();
                                Long v11_1 = 0;
                                int v13 = v10.rawQuery("select count(1) from messages", 0);
                                try {
                                    if ((v13 != 0) && (v13.moveToFirst())) {
                                        v11_1 = v13.getLong(v3_9);
                                    }
                                    if (v11_1 >= 100000) {
                                        this.o().f.a("Data loss, local db full");
                                        long v14_2 = ((100000 - v11_1) + 1);
                                        String v8_2 = new String[1];
                                        v8_2[v3_9] = Long.toString(v14_2);
                                        Long v11_4 = ((long) v10.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v8_2));
                                        if (v11_4 != v14_2) {
                                            this.o().f.a("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v14_2), Long.valueOf(v11_4), Long.valueOf((v14_2 - v11_4)));
                                        }
                                    }
                                    v10.insertOrThrow("messages", 0, v4_1);
                                    v10.setTransactionSuccessful();
                                    v10.endTransaction();
                                    if (v13 != 0) {
                                        v13.close();
                                    }
                                    v10.close();
                                    return 1;
                                } catch (Throwable v0_0) {
                                    if (v13 != 0) {
                                        v13.close();
                                    }
                                    if (v10 != null) {
                                        v10.close();
                                    }
                                    throw v0_0;
                                } catch (Throwable v0_3) {
                                    v8_0 = v13;
                                    this.o().f.a("Error writing entry to local database", v0_3);
                                    this.d = 1;
                                    if (v8_0 != null) {
                                        v8_0.close();
                                    }
                                    if (v10 == null) {
                                        v6++;
                                        v3_9 = 0;
                                        v5_2 = 5;
                                    } else {
                                        v10.close();
                                    }
                                } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                                    v8_0 = v13;
                                    android.os.SystemClock.sleep(((long) v7));
                                    v7 += 20;
                                    if (v8_0 != null) {
                                        v8_0.close();
                                    }
                                    if (v10 == null) {
                                    }
                                } catch (Throwable v0_1) {
                                }
                            } catch (Throwable v0_0) {
                                v13 = 0;
                            } catch (Throwable v0_3) {
                            } catch (Throwable v0_1) {
                                v13 = 0;
                            }
                        } else {
                            try {
                                this.d = 1;
                            } catch (Throwable v0_3) {
                            } catch (Throwable v0_1) {
                                v13 = 0;
                            }
                            if (v10 != null) {
                                v10.close();
                            }
                            return v3_9;
                        }
                        v8_0 = v10;
                        if (v8_0 != null) {
                            try {
                                if (v8_0.inTransaction()) {
                                    v8_0.endTransaction();
                                }
                            } catch (Throwable v0_0) {
                                v10 = v8_0;
                            }
                        }
                        this.o().f.a("Error writing entry to local database", v0_1);
                        this.d = 1;
                        if (v13 != 0) {
                            v13.close();
                        }
                        if (v8_0 == null) {
                        } else {
                            v8_0.close();
                        }
                    } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                        v8_0 = 0;
                    }
                } catch (Throwable v0_0) {
                    v10 = 0;
                    v13 = 0;
                } catch (Throwable v0_3) {
                    v10 = 0;
                } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                    v10 = 0;
                } catch (Throwable v0_1) {
                    v13 = 0;
                } catch (Throwable v0_0) {
                    v13 = v8_0;
                }
            }
            this.o().h.a("Failed to write entry to local database");
            return 0;
        } else {
            return 0;
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final boolean a(c.e.a.a.h.ha p9, long p10, boolean p12)
    {
        this.b();
        this.s();
        a.b.f.a.H.d(p9);
        a.b.f.a.H.c(p9.a);
        long v0_6 = new c.e.a.a.h.Nc();
        v0_6.g = Long.valueOf(p9.e);
        byte[] v1_2 = new c.e.a.a.h.Oc[p9.f.b()];
        v0_6.d = v1_2;
        byte[] v1_4 = p9.f.iterator();
        Long v3_3 = 0;
        while (v1_4.hasNext()) {
            String v4_1 = ((String) v1_4.next());
            String v5_1 = new c.e.a.a.h.Oc();
            int v7 = (v3_3 + 1);
            v0_6.d[v3_3] = v5_1;
            v5_1.d = v4_1;
            this.k().a(v5_1, p9.f.a.get(v4_1));
            v3_3 = v7;
        }
        try {
            byte[] v1_6 = new byte[v0_6.c()];
            Long v3_5 = c.e.a.a.h.nd.a(v1_6, v1_6.length);
            v0_6.a(v3_5);
            v3_5.a();
            this.o().l.a("Saving event, name, data size", this.j().a(p9.b), Integer.valueOf(v1_6.length));
            long v0_4 = new android.content.ContentValues();
            v0_4.put("app_id", p9.a);
            v0_4.put("name", p9.b);
            v0_4.put("timestamp", Long.valueOf(p9.d));
            v0_4.put("metadata_fingerprint", Long.valueOf(p10));
            v0_4.put("data", v1_6);
            v0_4.put("realtime", Integer.valueOf(p12));
            try {
                if (this.w().insert("raw_events", 0, v0_4) != -1) {
                    return 1;
                } else {
                    this.o().f.a("Failed to insert raw event (got -1). appId", c.e.a.a.h.ya.a(p9.a));
                    return 0;
                }
            } catch (c.e.a.a.h.Aa v10_4) {
                String v11_4 = this.o().f;
                int v9_2 = c.e.a.a.h.ya.a(p9.a);
                Object v12_3 = "Error storing raw event. appId";
                v11_4.a(v12_3, v9_2, v10_4);
                return 0;
            }
        } catch (c.e.a.a.h.Aa v10_4) {
            v11_4 = this.o().f;
            v9_2 = c.e.a.a.h.ya.a(p9.a);
            v12_3 = "Data loss. Failed to serialize event params/data. appId";
            v11_4.a(v12_3, v9_2, v10_4);
            return 0;
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final boolean a(c.e.a.a.h.Qc p8, boolean p9)
    {
        this.b();
        this.s();
        a.b.f.a.H.d(p8);
        a.b.f.a.H.c(p8.r);
        a.b.f.a.H.d(p8.i);
        this.y();
        int v0_1 = ((c.e.a.a.c.d.b) this.a.n).a();
        if ((p8.i.longValue() < (v0_1 - c.e.a.a.h.Z.u())) || (p8.i.longValue() > (c.e.a.a.h.Z.u() + v0_1))) {
            this.o().h.a("Storing bundle outside of the max uploading time span. appId, now, timestamp", c.e.a.a.h.ya.a(p8.r), Long.valueOf(v0_1), p8.i);
        }
        try {
            String v1_3 = new byte[p8.c()];
            Object v2_9 = c.e.a.a.h.nd.a(v1_3, v1_3.length);
            p8.a(v2_9);
            v2_9.a();
            String v1_4 = this.k().a(v1_3);
            this.o().l.a("Saving bundle, size", Integer.valueOf(v1_4.length));
            Object v2_14 = new android.content.ContentValues();
            v2_14.put("app_id", p8.r);
            v2_14.put("bundle_end_timestamp", p8.i);
            v2_14.put("data", v1_4);
            v2_14.put("has_realtime", Integer.valueOf(p9));
            try {
                if (this.w().insert("queue", 0, v2_14) != -1) {
                    return 1;
                } else {
                    this.o().f.a("Failed to insert bundle (got -1). appId", c.e.a.a.h.ya.a(p8.r));
                    return 0;
                }
            } catch (c.e.a.a.h.Aa v9_4) {
                String v1_7 = this.o().f;
                int v8_3 = c.e.a.a.h.ya.a(p8.r);
                Object v2_15 = "Error storing bundle. appId";
                v1_7.a(v2_15, v8_3, v9_4);
                return 0;
            }
        } catch (c.e.a.a.h.Aa v9_4) {
            v1_7 = this.o().f;
            v8_3 = c.e.a.a.h.ya.a(p8.r);
            v2_15 = "Data loss. Failed to serialize bundle. appId";
            v1_7.a(v2_15, v8_3, v9_4);
            return 0;
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public static void a(c.e.a.a.h.ya p6, android.database.sqlite.SQLiteDatabase p7, String p8, String p9, String[] p10)
    {
        if (p6 == null) {
            throw new IllegalArgumentException("Monitor must not be null");
        } else {
            java.util.HashSet v0_1 = new java.util.HashSet();
            int v2_1 = new StringBuilder(c.a.a.a.a.a(p8, 22));
            v2_1.append("SELECT * FROM ");
            v2_1.append(p8);
            v2_1.append(" LIMIT 0");
            int v1_3 = p7.rawQuery(v2_1.toString(), 0);
            try {
                java.util.Collections.addAll(v0_1, v1_3.getColumnNames());
                v1_3.close();
                String v9_1 = p9.split(",");
                int v1_5 = v9_1.length;
                int v2_4 = 0;
                int v3 = 0;
            } catch (c.e.a.a.h.Aa v6_3) {
                v1_5.close();
                throw v6_3;
            }
            while (v3 < v1_5) {
                String v4 = v9_1[v3];
                if (!v0_1.remove(v4)) {
                    String v9_9 = new StringBuilder(c.a.a.a.a.a(v4, c.a.a.a.a.a(p8, 35)));
                    v9_9.append("Table ");
                    v9_9.append(p8);
                    v9_9.append(" is missing required column: ");
                    v9_9.append(v4);
                    throw new android.database.sqlite.SQLiteException(v9_9.toString());
                } else {
                    v3++;
                }
            }
            if (p10 != null) {
                while (v2_4 < p10.length) {
                    if (!v0_1.remove(p10[v2_4])) {
                        p7.execSQL(p10[(v2_4 + 1)]);
                    }
                    v2_4 += 2;
                }
            }
            if (!v0_1.isEmpty()) {
                p6.h.a("Table has extra columns. table, columns", p8, android.text.TextUtils.join(", ", v0_1));
            }
            return;
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public static void a(c.e.a.a.h.ya p10, android.database.sqlite.SQLiteDatabase p11, String p12, String p13, String p14, String[] p15)
    {
        if (p10 == null) {
            throw new IllegalArgumentException("Monitor must not be null");
        } else {
            try {
                String v4_1 = new String[1];
                v4_1[0] = "name";
                String[] v6 = new String[1];
                v6[0] = p12;
                android.database.Cursor v0 = p11.query("SQLITE_MASTER", v4_1, "name=?", v6, 0, 0, 0);
                boolean v1_0 = v0.moveToFirst();
            } catch (c.e.a.a.h.Aa v10_2) {
                if (v0 != null) {
                    v0.close();
                }
                throw v10_2;
            } catch (android.database.sqlite.SQLiteException v2_1) {
                p10.h.a("Error querying for table", p12, v2_1);
                if (v0 == null) {
                    if (!v1_0) {
                        p11.execSQL(p13);
                    }
                    try {
                        ark>c.e.a.a.h.aaark>.a(p10, p11, p12, p14, p15);
                        return;
                    } catch (android.database.sqlite.SQLiteException v11_2) {
                        p10.f.a("Failed to verify columns on table that was just created", p12);
                        throw v11_2;
                    }
                } else {
                }
            }
            v0.close();
        }
    }

Method c.e.a.a.h.W.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public final c.e.a.a.h.Mc[] a(String p53, c.e.a.a.h.Nc[] p54, c.e.a.a.h.Sc[] p55)
    {
        int v7_0 = this;
        String v13_5 = p54;
        c.e.a.a.h.Oc[] v14_4 = "current_results";
        android.database.sqlite.SQLiteException v11_8 = "audience_id";
        a.b.f.a.H.c(p53);
        String v12_14 = new java.util.HashSet();
        String v10_3 = new a.b.e.i.b();
        int v9_1 = new a.b.e.i.b();
        int v8_3 = new a.b.e.i.b();
        boolean v1_31 = this.i();
        v1_31.s();
        v1_31.b();
        a.b.f.a.H.c(p53);
        android.database.sqlite.SQLiteException v16_4 = v1_31.w();
        int v5_16 = 0;
        String v3_29 = 1;
        try {
            int v0_2;
            int v0_63 = new String[2];
            v0_63[0] = "audience_id";
            v0_63[1] = "current_results";
            c.e.a.a.h.Oc[] v2_36 = new String[1];
            v2_36[0] = p53;
            c.e.a.a.h.Oc[] v2_37 = v16_4.query("audience_filter_values", v0_63, "app_id=?", v2_36, 0, 0, 0);
            try {
                if (v2_37.moveToFirst()) {
                    int v4_20 = new a.b.e.i.b();
                    while(true) {
                        c.e.a.a.h.Oc[] v17_9 = v2_37.getInt(v5_16);
                        int v0_89 = v2_37.getBlob(v3_29);
                        int v0_90 = c.e.a.a.h.md.a(v0_89, v0_89.length);
                        int v6_35 = new c.e.a.a.h.Rc();
                        v6_35.a(v0_90);
                        v4_20.put(Integer.valueOf(v17_9), v6_35);
                        int v21_4 = v4_20;
                        if (!v2_37.moveToNext()) {
                            break;
                        }
                        v4_20 = v21_4;
                        v3_29 = 1;
                        v5_16 = 0;
                    }
                    v2_37.close();
                    v0_2 = v21_4;
                    if (v0_2 != 0) {
                        boolean v1_2 = v0_2.keySet().iterator();
                        while (v1_2.hasNext()) {
                            c.e.a.a.h.Oc[] v2_29 = ((Integer) v1_2.next()).intValue();
                            String v3_20 = ((c.e.a.a.h.Rc) v0_2.get(Integer.valueOf(v2_29)));
                            int v4_10 = ((java.util.BitSet) v9_1.get(Integer.valueOf(v2_29)));
                            int v5_7 = ((java.util.BitSet) v8_3.get(Integer.valueOf(v2_29)));
                            if (v4_10 == 0) {
                                v4_10 = new java.util.BitSet();
                                v9_1.put(Integer.valueOf(v2_29), v4_10);
                                v5_7 = new java.util.BitSet();
                                v8_3.put(Integer.valueOf(v2_29), v5_7);
                            }
                            c.e.a.a.h.Oc[] v17_5 = v0_2;
                            int v6_11 = 0;
                            while(true) {
                                int v0_44 = v3_20.c;
                                int v21_2 = v1_2;
                                if (v6_11 >= (v0_44.length << 6)) {
                                    break;
                                }
                                String v22_2;
                                String v23_1;
                                if (!c.e.a.a.h.Ac.a(v0_44, v6_11)) {
                                    v22_2 = v8_3;
                                    v23_1 = v9_1;
                                } else {
                                    v22_2 = v8_3;
                                    v23_1 = v9_1;
                                    this.o().l.a("Filter already evaluated. audience ID, filter ID", Integer.valueOf(v2_29), Integer.valueOf(v6_11));
                                    v5_7.set(v6_11);
                                    if (c.e.a.a.h.Ac.a(v3_20.d, v6_11)) {
                                        v4_10.set(v6_11);
                                    }
                                }
                                v6_11++;
                                v1_2 = v21_2;
                                v8_3 = v22_2;
                                v9_1 = v23_1;
                            }
                            String v23 = v9_1;
                            int v0_46 = new c.e.a.a.h.Mc();
                            v10_3.put(Integer.valueOf(v2_29), v0_46);
                            v0_46.g = Boolean.valueOf(0);
                            v0_46.f = v3_20;
                            v0_46.e = new c.e.a.a.h.Rc();
                            v0_46.e.d = c.e.a.a.h.Ac.a(v4_10);
                            v0_46.e.c = c.e.a.a.h.Ac.a(v5_7);
                            v0_2 = v17_5;
                            v1_2 = v21_2;
                        }
                    }
                    android.database.sqlite.SQLiteException v11_7;
                    c.e.a.a.h.Oc[] v14_3;
                    String v12_12;
                    int v0_29;
                    int v45_2;
                    c.e.a.a.h.Oc[] v49_1;
                    c.e.a.a.h.Oc[] v15_9;
                    int v47_0;
                    int v51_1;
                    boolean v1_0;
                    String v22_0 = v8_3;
                    String v23_0 = v9_1;
                    int v9_2 = "Filter definition";
                    int v8_1 = "Skipping failed audience ID";
                    int v6_3 = "Database error querying filters. appId";
                    if (p54 == null) {
                        v15_9 = "Skipping failed audience ID";
                        v47_0 = "Filter definition";
                        v49_1 = "audience_id";
                        v51_1 = "current_results";
                        v45_2 = v23_0;
                        v11_7 = "Database error querying filters. appId";
                        v14_3 = v12_14;
                        v12_12 = v10_3;
                        v1_0 = p53;
                        v0_29 = p55;
                    } else {
                        int v5_2 = new a.b.e.i.b();
                        String v3_12 = p54.length;
                        c.e.a.a.h.Sc[] v28_0 = p55;
                        v1_0 = p53;
                        c.e.a.a.h.Oc[] v29_0 = 0;
                        int v0_16 = 0;
                        c.e.a.a.h.Oc[] v2_24 = 0;
                        c.e.a.a.h.Oc[] v17_3 = 0;
                        while (v2_24 < v3_12) {
                            int v41_0;
                            c.e.a.a.h.Oc[] v29_2;
                            int v41_2;
                            android.database.sqlite.SQLiteException v11_1;
                            long v37_1;
                            int v5_3;
                            long v37_2;
                            int v51_0;
                            boolean v36;
                            android.database.sqlite.SQLiteException v43_3;
                            c.e.a.a.h.Oc[] v15_7;
                            int v45_0;
                            String v12_8;
                            int v4_39;
                            Boolean v30_1;
                            boolean v1_35;
                            String v13_14;
                            c.e.a.a.h.Oc[] v14_1;
                            int v47_1;
                            c.e.a.a.h.Aa v33_1;
                            c.e.a.a.h.Oc[] v49_0;
                            int v21_5 = v8_1;
                            int v8_18 = v13_5[v2_24];
                            int v31_1 = v9_2;
                            int v9_8 = v8_18.e;
                            int v32_1 = v10_3;
                            String v10_12 = v8_18.d;
                            int v34 = v2_24;
                            if (!v7_0.a.c.c(v1_0, c.e.a.a.h.oa.O)) {
                                v37_1 = v0_16;
                                v13_14 = v1_0;
                                v36 = v3_12;
                                v41_2 = v5_2;
                                v43_3 = v6_3;
                                v4_39 = v17_3;
                                v1_35 = v37_1;
                                v5_3 = v9_8;
                                v33_1 = v10_12;
                                v37_2 = v29_0;
                                v30_1 = v1_35;
                                v29_2 = v4_39;
                                Integer v46;
                                c.e.a.a.h.Oc[] v44_0;
                                int v0_124;
                                c.e.a.a.h.Oc[] v2_0;
                                String v48_0;
                                c.e.a.a.h.Oc[] v50;
                                int v0_123 = this.i().a(v13_14, v8_18.e);
                                if (v0_123 != 0) {
                                    v49_0 = v11_8;
                                    v50 = v12_14;
                                    v1_0 = v13_14;
                                    v2_0 = v14_4;
                                    v44_0 = v21_5;
                                    v46 = v22_0;
                                    v45_0 = v23_0;
                                    v47_1 = v31_1;
                                    v48_0 = v32_1;
                                    v0_124 = v0_123.a();
                                } else {
                                    this.o().h.a("Event aggregate wasn\'t created during raw event logging. appId, event", c.e.a.a.h.ya.a(p53), this.j().a(v5_3));
                                    v0_124 = new c.e.a.a.h.ia;
                                    v44_0 = v21_5;
                                    v46 = v22_0;
                                    v45_0 = v23_0;
                                    v47_1 = v31_1;
                                    v48_0 = v32_1;
                                    v49_0 = v11_8;
                                    v50 = v12_14;
                                    v1_0 = v13_14;
                                    v2_0 = v14_4;
                                    v0_124(p53, v8_18.e, 1, 1, v8_18.f.longValue(), 0, 0, 0, 0);
                                }
                                int v19_1;
                                this.i().a(v0_124);
                                int v8_0 = v0_124.c;
                                String v10_0 = v41_2;
                                int v0_1 = ((java.util.Map) v10_0.get(v5_3));
                                if (v0_1 != 0) {
                                    v19_1 = v2_0;
                                    v11_1 = v43_3;
                                } else {
                                    String v3_1 = this.i();
                                    v3_1.s();
                                    v3_1.b();
                                    a.b.f.a.H.c(p53);
                                    a.b.f.a.H.c(v5_3);
                                    int v6_1 = new a.b.e.i.b();
                                    android.database.sqlite.SQLiteException v11_2 = v3_1.w();
                                    try {
                                        String v13_1 = new String[2];
                                        c.e.a.a.h.Oc[] v14_0 = v49_0;
                                        try {
                                            v13_1[0] = v14_0;
                                            v13_1[1] = "data";
                                            v19_1 = v2_0;
                                            try {
                                                c.e.a.a.h.Oc[] v2_1 = new String[2];
                                                v2_1[0] = v1_0;
                                                v2_1[1] = v5_3;
                                                int v7_1 = v14_0;
                                                v14_0 = "app_id=? AND event_name=?";
                                                v49_0 = v7_1;
                                                try {
                                                    c.e.a.a.h.Oc[] v2_2 = v11_2.query("event_filters", v13_1, "app_id=? AND event_name=?", v2_1, 0, 0, 0);
                                                    try {
                                                        if (v2_2.moveToFirst()) {
                                                            do {
                                                                int v0_7 = v2_2.getBlob(1);
                                                                int v0_8 = c.e.a.a.h.md.a(v0_7, v0_7.length);
                                                                android.database.sqlite.SQLiteException v11_5 = new c.e.a.a.h.Ec();
                                                                v11_5.a(v0_8);
                                                                int v0_12 = v2_2.getInt(0);
                                                                String v12_5 = ((java.util.List) v6_1.get(Integer.valueOf(v0_12)));
                                                                if (v12_5 == null) {
                                                                    v12_5 = new java.util.ArrayList();
                                                                    v6_1.put(Integer.valueOf(v0_12), v12_5);
                                                                }
                                                                v12_5.add(v11_5);
                                                            } while(v2_2.moveToNext());
                                                            v2_2.close();
                                                            v0_1 = v6_1;
                                                        } else {
                                                            v0_1 = java.util.Collections.emptyMap();
                                                            v2_2.close();
                                                        }
                                                        v11_1 = v43_3;
                                                        if (v0_1 == 0) {
                                                            v0_1 = new a.b.e.i.b();
                                                        }
                                                        v10_0.put(v5_3, v0_1);
                                                    } catch (int v0_3) {
                                                        v11_1 = v43_3;
                                                        v3_1.o().f.a(v11_1, c.e.a.a.h.ya.a(p53), v0_3);
                                                        if (v2_2 != null) {
                                                            v2_2.close();
                                                        }
                                                        v0_1 = 0;
                                                    }
                                                } catch (int v0_3) {
                                                    v2_2 = 0;
                                                }
                                            } catch (int v0_3) {
                                                v49_0 = v14_0;
                                            }
                                        } catch (int v0_3) {
                                            v19_1 = v2_0;
                                        }
                                    } catch (int v0_5) {
                                        String v42_0 = 0;
                                        if (v42_0 != null) {
                                            v42_0.close();
                                        }
                                        throw v0_5;
                                    } catch (int v0_3) {
                                        v19_1 = v2_0;
                                    } catch (int v0_5) {
                                        v42_0 = v2_2;
                                    }
                                }
                                String v12_7 = v0_1.keySet().iterator();
                                while (v12_7.hasNext()) {
                                    String v13_3 = ((Integer) v12_7.next()).intValue();
                                    c.e.a.a.h.Oc[] v14_2 = v50;
                                    if (!v14_2.contains(Integer.valueOf(v13_3))) {
                                        c.e.a.a.h.Oc[] v15_8 = v44_0;
                                        int v6_4 = v48_0;
                                        String v3_4 = v45_0;
                                        c.e.a.a.h.Oc[] v2_12 = ((java.util.BitSet) v3_4.get(Integer.valueOf(v13_3)));
                                        int v41_1 = v10_0;
                                        String v10_1 = v46;
                                        int v7_5 = ((java.util.BitSet) v10_1.get(Integer.valueOf(v13_3)));
                                        if (((c.e.a.a.h.Mc) v6_4.get(Integer.valueOf(v13_3))) == null) {
                                            boolean v1_7 = new c.e.a.a.h.Mc();
                                            v6_4.put(Integer.valueOf(v13_3), v1_7);
                                            v1_7.g = Boolean.valueOf(1);
                                            v2_12 = new java.util.BitSet();
                                            v3_4.put(Integer.valueOf(v13_3), v2_12);
                                            v7_5 = new java.util.BitSet();
                                            v10_1.put(Integer.valueOf(v13_3), v7_5);
                                        }
                                        android.database.sqlite.SQLiteException v16_2 = ((java.util.List) v0_1.get(Integer.valueOf(v13_3))).iterator();
                                        while (v16_2.hasNext()) {
                                            String v12_9;
                                            String v48_1;
                                            String v18_2;
                                            boolean v1_15 = ((c.e.a.a.h.Ec) v16_2.next());
                                            c.e.a.a.h.Oc[] v17_4 = v0_1;
                                            int v45_1 = v3_4;
                                            if (!this.o().a(2)) {
                                                v48_1 = v6_4;
                                                v18_2 = v12_7;
                                                v12_9 = v47_1;
                                            } else {
                                                v48_1 = v6_4;
                                                v18_2 = v12_7;
                                                this.o().y().a("Evaluating filter. audience, filter, event", Integer.valueOf(v13_3), v1_15.d, this.j().a(v1_15.e));
                                                v12_9 = v47_1;
                                                this.o().y().a(v12_9, this.j().a(v1_15));
                                            }
                                            String v22_1;
                                            int v19_2;
                                            String v12_13;
                                            String v10_2;
                                            int v51_2;
                                            int v0_23 = v1_15.d;
                                            if ((v0_23 != 0) && (v0_23.intValue() <= 256)) {
                                                if (!v2_12.get(v1_15.d.intValue())) {
                                                    String v3_11;
                                                    int v0_28 = v1_15;
                                                    v22_1 = v10_1;
                                                    v47_1 = v12_9;
                                                    v10_2 = v2_12;
                                                    v51_2 = v19_1;
                                                    v19_2 = v5_3;
                                                    v12_13 = v48_1;
                                                    boolean v1_17 = this.a(v0_28, v5_3, v33_1, v8_0);
                                                    c.e.a.a.h.Aa vtmp279 = this.o().y();
                                                    if (v1_17) {
                                                        v3_11 = v1_17;
                                                    } else {
                                                        v3_11 = "null";
                                                    }
                                                    vtmp279.a("Event filter result", v3_11);
                                                    if (v1_17) {
                                                        v7_5.set(v0_28.d.intValue());
                                                        if (v1_17.booleanValue()) {
                                                            v10_2.set(v0_28.d.intValue());
                                                        }
                                                    } else {
                                                        v14_2.add(Integer.valueOf(v13_3));
                                                    }
                                                } else {
                                                    this.o().y().a("Event filter already evaluated true. audience ID, filter ID", Integer.valueOf(v13_3), v1_15.d);
                                                    v22_1 = v10_1;
                                                    v47_1 = v12_9;
                                                    v51_2 = v19_1;
                                                    v12_13 = v48_1;
                                                    v10_2 = v2_12;
                                                    v19_2 = v5_3;
                                                }
                                            } else {
                                                v22_1 = v10_1;
                                                v47_1 = v12_9;
                                                v51_2 = v19_1;
                                                v12_13 = v48_1;
                                                v10_2 = v2_12;
                                                v19_2 = v5_3;
                                                this.o().w().a("Invalid event filter ID. appId, id", c.e.a.a.h.ya.a(p53), String.valueOf(v1_15.d));
                                            }
                                            v28_0 = p55;
                                            v2_12 = v10_2;
                                            v6_4 = v12_13;
                                            v0_1 = v17_4;
                                            v12_7 = v18_2;
                                            v5_3 = v19_2;
                                            v10_1 = v22_1;
                                            v3_4 = v45_1;
                                            v19_1 = v51_2;
                                        }
                                        v1_0 = p53;
                                        v45_0 = v3_4;
                                        v48_0 = v6_4;
                                        v46 = v10_1;
                                        v50 = v14_2;
                                        v44_0 = v15_8;
                                        v10_0 = v41_1;
                                    } else {
                                        this.o().y().a(v44_0, Integer.valueOf(v13_3));
                                        v50 = v14_2;
                                    }
                                }
                                v41_0 = v10_0;
                                v51_0 = v19_1;
                                v15_7 = v44_0;
                                v22_0 = v46;
                                v12_8 = v48_0;
                                v14_1 = v50;
                                v17_3 = v29_2;
                                v0_16 = v30_1;
                                v29_0 = v37_2;
                            } else {
                                Object v35_0;
                                this.k();
                                int v4_38 = ((Long) c.e.a.a.h.Ac.b(v8_18, "_eid"));
                                if (v4_38 == 0) {
                                    v35_0 = 0;
                                } else {
                                    v35_0 = 1;
                                }
                                String v3_61;
                                if (v35_0 == null) {
                                    v36 = v3_12;
                                    v3_61 = 0;
                                } else {
                                    v36 = v3_12;
                                    if (!v9_8.equals("_ep")) {
                                    } else {
                                        v3_61 = 1;
                                    }
                                }
                                if (v3_61 == null) {
                                    v37_1 = v0_16;
                                    v13_14 = v1_0;
                                    v41_2 = v5_2;
                                    v43_3 = v6_3;
                                    if (v35_0 == null) {
                                    } else {
                                        this.k();
                                        int v0_103 = Long.valueOf(0);
                                        boolean v1_37 = c.e.a.a.h.Ac.b(v8_18, "_epc");
                                        if (v1_37) {
                                            v0_103 = v1_37;
                                        }
                                        int v0_106;
                                        android.database.sqlite.SQLiteException v16_8 = ((Long) v0_103).longValue();
                                        if (v16_8 > 0) {
                                            v0_106 = v4_38;
                                            this.i().a(p53, v4_38, v16_8, v8_18);
                                        } else {
                                            this.o().w().a("Complex event with zero extra param count. eventName", v9_8);
                                            v0_106 = v4_38;
                                        }
                                        v29_2 = v0_106;
                                        v30_1 = v8_18;
                                        v5_3 = v9_8;
                                        v33_1 = v10_12;
                                        v37_2 = v16_8;
                                    }
                                } else {
                                    long v37_0;
                                    android.database.sqlite.SQLiteException v43_0;
                                    String v13_4;
                                    this.k();
                                    v9_8 = ((String) c.e.a.a.h.Ac.b(v8_18, "_en"));
                                    if (!android.text.TextUtils.isEmpty(v9_8)) {
                                        if ((v0_16 != 0) && ((v17_3 != null) && (v4_38.longValue() == v17_3.longValue()))) {
                                            String v3_67 = v0_16;
                                        } else {
                                            String v3_69 = this.i().a(v1_0, v4_38);
                                            if (v3_69 == null) {
                                                v37_0 = v0_16;
                                            } else {
                                                v37_0 = v0_16;
                                                int v0_109 = v3_69.first;
                                                if (v0_109 != 0) {
                                                    int v0_110 = ((c.e.a.a.h.Nc) v0_109);
                                                    v29_0 = ((Long) v3_69.second).longValue();
                                                    this.k();
                                                    v3_67 = v0_110;
                                                    v17_3 = ((Long) c.e.a.a.h.Ac.b(v0_110, "_eid"));
                                                    Object v35_1;
                                                    v29_0--;
                                                    if (v29_0 > 0) {
                                                        v35_1 = v3_67;
                                                        int v20 = 0;
                                                        v13_14 = v1_0;
                                                        v41_2 = v5_2;
                                                        v43_3 = v6_3;
                                                        this.i().a(p53, v4_38, v29_0, v35_1);
                                                    } else {
                                                        c.e.a.a.h.Oc[] v2_80 = this.i();
                                                        v2_80.b();
                                                        v2_80.o().y().a("Clearing complex main event info. appId", v1_0);
                                                        try {
                                                            int v0_115 = v2_80.w();
                                                            v35_1 = v3_67;
                                                            int v19_6 = v5_2;
                                                            try {
                                                                int v5_22 = new String[1];
                                                                try {
                                                                    v5_22[0] = v1_0;
                                                                    v0_115.execSQL("delete from main_event_params where app_id=?", v5_22);
                                                                } catch (int v0_116) {
                                                                    v2_80.o().B().a("Error clearing complex main event", v0_116);
                                                                }
                                                                v13_14 = v1_0;
                                                                v43_3 = v6_3;
                                                                v41_2 = v19_6;
                                                            } catch (int v0_116) {
                                                            }
                                                        } catch (int v0_116) {
                                                            v35_1 = 1;
                                                            v19_6 = v5_2;
                                                        }
                                                    }
                                                    v1_35 = v35_1;
                                                    int v0_41 = v1_35.d;
                                                    c.e.a.a.h.Oc[] v2_85 = new c.e.a.a.h.Oc[(v0_41.length + v10_12.length)];
                                                    String v3_76 = v0_41.length;
                                                    int v4_7 = 0;
                                                    int v5_4 = 0;
                                                    while (v4_7 < v3_76) {
                                                        int v6_9 = v0_41[v4_7];
                                                        this.k();
                                                        android.database.sqlite.SQLiteException v16_3 = v0_41;
                                                        if (c.e.a.a.h.Ac.a(v8_18, v6_9.d) == null) {
                                                            int v0_40 = (v5_4 + 1);
                                                            v2_85[v5_4] = v6_9;
                                                            v5_4 = v0_40;
                                                        }
                                                        v4_7++;
                                                        v0_41 = v16_3;
                                                    }
                                                    if (v5_4 <= 0) {
                                                        this.o().w().a("No unique parameters in main event. eventName", v9_8);
                                                        v4_39 = v17_3;
                                                    } else {
                                                        int v0_119 = v10_12.length;
                                                        String v3_16 = 0;
                                                        while (v3_16 < v0_119) {
                                                            int v6_8 = (v5_4 + 1);
                                                            v2_85[v5_4] = v10_12[v3_16];
                                                            v3_16++;
                                                            v5_4 = v6_8;
                                                        }
                                                        if (v5_4 != v2_85.length) {
                                                            v2_85 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v2_85, v5_4));
                                                        }
                                                        v33_1 = v2_85;
                                                        v5_3 = v9_8;
                                                        v37_2 = v29_0;
                                                        v30_1 = v1_35;
                                                        v29_2 = v17_3;
                                                    }
                                                    v49_0 = v11_8;
                                                    v1_0 = v13_4;
                                                    v51_0 = v14_4;
                                                    v15_7 = v21_5;
                                                    v45_0 = v23_0;
                                                    v47_1 = v31_1;
                                                    v0_16 = v37_0;
                                                    v11_1 = v43_0;
                                                    v14_1 = v12_14;
                                                    v12_8 = v32_1;
                                                    v2_24 = (v34 + 1);
                                                    v7_0 = this;
                                                    v13_5 = p54;
                                                    v6_3 = v11_1;
                                                    v10_3 = v12_8;
                                                    v12_14 = v14_1;
                                                    v8_1 = v15_7;
                                                    v3_12 = v36;
                                                    v5_2 = v41_0;
                                                    v23_0 = v45_0;
                                                    v9_2 = v47_1;
                                                    v11_8 = v49_0;
                                                    v14_4 = v51_0;
                                                }
                                            }
                                            v13_4 = v1_0;
                                            v41_0 = v5_2;
                                            v43_0 = v6_3;
                                            this.o().B().a("Extra parameter without existing main event. eventName, eventId", v9_8, v4_38);
                                        }
                                    } else {
                                        this.o().B().a("Extra parameter without an event name. eventId", v4_38);
                                        v37_0 = v0_16;
                                        v13_4 = v1_0;
                                        v41_0 = v5_2;
                                        v43_0 = v6_3;
                                    }
                                }
                            }
                        }
                        v15_9 = v8_1;
                        v47_0 = v9_2;
                        v49_1 = v11_8;
                        v51_1 = v14_4;
                        v45_2 = v23_0;
                        v11_7 = v6_3;
                        v14_3 = v12_14;
                        v12_12 = v10_3;
                        v0_29 = v28_0;
                    }
                    if (v0_29 != 0) {
                        c.e.a.a.h.Oc[] v2_33 = new a.b.e.i.b();
                        String v3_21 = v0_29.length;
                        int v4_12 = v1_0;
                        boolean v1_33 = 0;
                        while (v1_33 < v3_21) {
                            int v5_19 = v0_29[v1_33];
                            int v0_70 = ((java.util.Map) v2_33.get(v5_19.e));
                            if (v0_70 == 0) {
                                int v6_26 = this.i();
                                int v0_71 = v5_19.e;
                                v6_26.s();
                                v6_26.b();
                                a.b.f.a.H.c(p53);
                                a.b.f.a.H.c(v0_71);
                                int v7_13 = new a.b.e.i.b();
                                android.database.sqlite.SQLiteDatabase v26_1 = v6_26.w();
                                try {
                                    int v9_5 = new String[2];
                                    v9_5[0] = v49_1;
                                    v9_5[1] = "data";
                                    String v13_8 = new String[2];
                                    v13_8[0] = v4_12;
                                    v13_8[1] = v0_71;
                                    int v4_15 = v26_1.query("property_filters", v9_5, "app_id=? AND property_name=?", v13_8, 0, 0, 0);
                                    try {
                                        if (!v4_15.moveToFirst()) {
                                            v0_70 = java.util.Collections.emptyMap();
                                            v4_15.close();
                                            if (v0_70 == 0) {
                                                v0_70 = new a.b.e.i.b();
                                            }
                                            v2_33.put(v5_19.e, v0_70);
                                            int v4_18 = v0_70.keySet().iterator();
                                            while (v4_18.hasNext()) {
                                                int v6_32 = ((Integer) v4_18.next()).intValue();
                                                if (!v14_3.contains(Integer.valueOf(v6_32))) {
                                                    String v10_11 = v45_2;
                                                    int v8_14 = ((java.util.BitSet) v10_11.get(Integer.valueOf(v6_32)));
                                                    int v9_7 = v22_0;
                                                    String v13_12 = ((java.util.BitSet) v9_7.get(Integer.valueOf(v6_32)));
                                                    if (((c.e.a.a.h.Mc) v12_12.get(Integer.valueOf(v6_32))) == null) {
                                                        int v7_21 = new c.e.a.a.h.Mc();
                                                        v12_12.put(Integer.valueOf(v6_32), v7_21);
                                                        v7_21.g = Boolean.valueOf(1);
                                                        v8_14 = new java.util.BitSet();
                                                        v10_11.put(Integer.valueOf(v6_32), v8_14);
                                                        v13_12 = new java.util.BitSet();
                                                        v9_7.put(Integer.valueOf(v6_32), v13_12);
                                                    }
                                                    int v7_27 = ((java.util.List) v0_70.get(Integer.valueOf(v6_32))).iterator();
                                                    while (v7_27.hasNext()) {
                                                        int v19_4;
                                                        int v20_2;
                                                        int v4_21;
                                                        android.database.sqlite.SQLiteException v43_2;
                                                        c.e.a.a.h.Hc v54_2 = v0_70;
                                                        int v0_88 = ((c.e.a.a.h.Hc) v7_27.next());
                                                        c.e.a.a.h.Oc[] v17_8 = v2_33;
                                                        String v18_5 = v3_21;
                                                        if (!this.o().a(2)) {
                                                            v19_4 = v4_18;
                                                            v20_2 = v7_27;
                                                            v43_2 = v11_7;
                                                            v4_21 = v47_0;
                                                        } else {
                                                            v19_4 = v4_18;
                                                            v20_2 = v7_27;
                                                            v43_2 = v11_7;
                                                            this.o().y().a("Evaluating filter. audience, filter, property", Integer.valueOf(v6_32), v0_88.d, this.j().c(v0_88.e));
                                                            v4_21 = v47_0;
                                                            this.o().y().a(v4_21, this.j().a(v0_88));
                                                        }
                                                        c.e.a.a.h.Oc[] v2_44 = v0_88.d;
                                                        if ((v2_44 != null) && (v2_44.intValue() <= 256)) {
                                                            if (!v8_14.get(v0_88.d.intValue())) {
                                                                int v4_32;
                                                                c.e.a.a.h.Oc[] v15_13;
                                                                c.e.a.a.h.Oc[] v44_3;
                                                                c.e.a.a.h.Oc[] v2_49 = v0_88.f;
                                                                if (v2_49 != null) {
                                                                    c.e.a.a.h.Oc[] v2_52;
                                                                    int v7_31 = Boolean.TRUE.equals(v2_49.f);
                                                                    android.database.sqlite.SQLiteException v11_12 = v5_19.g;
                                                                    if (v11_12 == null) {
                                                                        String v3_44;
                                                                        int v4_24;
                                                                        c.e.a.a.h.Oc[] v2_51;
                                                                        v47_0 = v4_21;
                                                                        v44_3 = v15_9;
                                                                        v15_13 = v49_1;
                                                                        String v3_41 = v5_19.i;
                                                                        if (v3_41 == null) {
                                                                            String v3_42 = v5_19.f;
                                                                            if (v3_42 == null) {
                                                                                v2_51 = this.o().w();
                                                                                v3_44 = this.j().c(v5_19.e);
                                                                                v4_24 = "User property has no value, property";
                                                                            } else {
                                                                                int v4_25 = v2_49.d;
                                                                                if (v4_25 != 0) {
                                                                                    v2_52 = this.a(v3_42, v4_25);
                                                                                    v4_32 = ark>c.e.a.a.h.Wark>.a(v2_52, v7_31);
                                                                                    String v3_57;
                                                                                    c.e.a.a.h.Oc[] v2_65 = this.o().y();
                                                                                    if (v4_32 != 0) {
                                                                                        v3_57 = v4_32;
                                                                                    } else {
                                                                                        v3_57 = "null";
                                                                                    }
                                                                                    v2_65.a("Property filter result", v3_57);
                                                                                    if (v4_32 != 0) {
                                                                                        v13_12.set(v0_88.d.intValue());
                                                                                        if (v4_32.booleanValue()) {
                                                                                            v8_14.set(v0_88.d.intValue());
                                                                                        }
                                                                                    } else {
                                                                                        v14_3.add(Integer.valueOf(v6_32));
                                                                                    }
                                                                                    v0_70 = v54_2;
                                                                                    v49_1 = v15_13;
                                                                                    v2_33 = v17_8;
                                                                                    v3_21 = v18_5;
                                                                                    v4_18 = v19_4;
                                                                                    v7_27 = v20_2;
                                                                                    v11_7 = v43_2;
                                                                                    v15_9 = v44_3;
                                                                                } else {
                                                                                    if (v2_49.e != null) {
                                                                                        if (!c.e.a.a.h.Ac.i(v3_42)) {
                                                                                            this.o().w().a("Invalid user property value for Numeric number filter. property, value", this.j().c(v5_19.e), v5_19.f);
                                                                                            v4_32 = 0;
                                                                                        } else {
                                                                                            v2_52 = this.a(v5_19.f, v2_49.e);
                                                                                        }
                                                                                    } else {
                                                                                        v2_51 = this.o().w();
                                                                                        v3_44 = this.j().c(v5_19.e);
                                                                                        v4_24 = "No string or number filter defined. property";
                                                                                    }
                                                                                }
                                                                            }
                                                                        } else {
                                                                            if (v2_49.e != null) {
                                                                                v2_52 = this.a(v3_41.doubleValue(), v2_49.e);
                                                                            } else {
                                                                                v2_51 = this.o().w();
                                                                                v3_44 = this.j().c(v5_19.e);
                                                                                v4_24 = "No number filter for double property. property";
                                                                            }
                                                                        }
                                                                        v2_51.a(v4_24, v3_44);
                                                                    } else {
                                                                        if (v2_49.e != null) {
                                                                            v47_0 = v4_21;
                                                                            v44_3 = v15_9;
                                                                            v15_13 = v49_1;
                                                                            v2_52 = this.a(v11_12.longValue(), v2_49.e);
                                                                        } else {
                                                                            this.o().w().a("No number filter for long property. property", this.j().c(v5_19.e));
                                                                            v47_0 = v4_21;
                                                                            v44_3 = v15_9;
                                                                            v15_13 = v49_1;
                                                                        }
                                                                    }
                                                                } else {
                                                                    this.o().w().a("Missing property filter. property", this.j().c(v5_19.e));
                                                                }
                                                            } else {
                                                                this.o().y().a("Property filter already evaluated true. audience ID, filter ID", Integer.valueOf(v6_32), v0_88.d);
                                                                v0_70 = v54_2;
                                                                v47_0 = v4_21;
                                                                v2_33 = v17_8;
                                                                v3_21 = v18_5;
                                                                v4_18 = v19_4;
                                                                v7_27 = v20_2;
                                                                v11_7 = v43_2;
                                                            }
                                                        } else {
                                                            v47_0 = v4_21;
                                                            c.e.a.a.h.Oc[] v44_2 = v15_9;
                                                            c.e.a.a.h.Oc[] v15_12 = v49_1;
                                                            this.o().w().a("Invalid property filter ID. appId, id", c.e.a.a.h.ya.a(p53), String.valueOf(v0_88.d));
                                                            v14_3.add(Integer.valueOf(v6_32));
                                                        }
                                                        v0_70 = v54_2;
                                                        v22_0 = v9_7;
                                                        v45_2 = v10_11;
                                                        v49_1 = v15_12;
                                                        v2_33 = v17_8;
                                                        v3_21 = v18_5;
                                                        v4_18 = v19_4;
                                                        v11_7 = v43_2;
                                                        v15_9 = v44_2;
                                                    }
                                                    v54_2 = v0_70;
                                                    v17_8 = v2_33;
                                                    v18_5 = v3_21;
                                                    v19_4 = v4_18;
                                                    v43_2 = v11_7;
                                                    v44_2 = v15_9;
                                                    v15_12 = v49_1;
                                                } else {
                                                    this.o().y().a(v15_9, Integer.valueOf(v6_32));
                                                }
                                            }
                                            c.e.a.a.h.Oc[] v17 = v2_33;
                                            String v10 = v45_2;
                                            android.database.sqlite.SQLiteException v11 = this;
                                            v1_33++;
                                            v4_12 = p53;
                                            v0_29 = p55;
                                        }
                                        do {
                                            int v0_75 = v4_15.getBlob(1);
                                            int v0_76 = c.e.a.a.h.md.a(v0_75, v0_75.length);
                                            int v8_10 = new c.e.a.a.h.Hc();
                                            v8_10.a(v0_76);
                                            int v0_80 = v4_15.getInt(0);
                                            String v10_9 = ((java.util.List) v7_13.get(Integer.valueOf(v0_80)));
                                            if (v10_9 == null) {
                                                v10_9 = new java.util.ArrayList();
                                                v7_13.put(Integer.valueOf(v0_80), v10_9);
                                            }
                                            v10_9.add(v8_10);
                                        } while(v4_15.moveToNext());
                                        v4_15.close();
                                        v0_70 = v7_13;
                                    } catch (int v0_72) {
                                        v6_26.o().f.a(v11_7, c.e.a.a.h.ya.a(p53), v0_72);
                                        if (v4_15 != 0) {
                                            v4_15.close();
                                        }
                                        v0_70 = 0;
                                    }
                                } catch (int v0_73) {
                                    String v42_1 = 0;
                                    if (v42_1 != null) {
                                        v42_1.close();
                                    }
                                    throw v0_73;
                                } catch (int v0_72) {
                                    v4_15 = 0;
                                } catch (int v0_73) {
                                    v42_1 = v4_15;
                                }
                            }
                        }
                    }
                    int v9_4 = v22_0;
                    String v10_4 = v45_2;
                    c.e.a.a.h.Oc[] v15_11 = v49_1;
                    boolean v1_34 = new c.e.a.a.h.Mc[v10_4.size()];
                    c.e.a.a.h.Oc[] v2_34 = v10_4.keySet().iterator();
                    int v5_10 = 0;
                    while (v2_34.hasNext()) {
                        int v0_60 = ((Integer) v2_34.next()).intValue();
                        if (!v14_3.contains(Integer.valueOf(v0_60))) {
                            String v3_26 = ((c.e.a.a.h.Mc) v12_12.get(Integer.valueOf(v0_60)));
                            if (v3_26 == null) {
                                v3_26 = new c.e.a.a.h.Mc();
                            }
                            int v4_13 = (v5_10 + 1);
                            v1_34[v5_10] = v3_26;
                            v3_26.d = Integer.valueOf(v0_60);
                            v3_26.e = new c.e.a.a.h.Rc();
                            v3_26.e.d = c.e.a.a.h.Ac.a(((java.util.BitSet) v10_4.get(Integer.valueOf(v0_60))));
                            v3_26.e.c = c.e.a.a.h.Ac.a(((java.util.BitSet) v9_4.get(Integer.valueOf(v0_60))));
                            int v5_17 = this.i();
                            String v3_28 = v3_26.e;
                            v5_17.s();
                            v5_17.b();
                            a.b.f.a.H.c(p53);
                            a.b.f.a.H.d(v3_28);
                            try {
                                int v6_22 = new byte[v3_28.c()];
                                int v7_9 = c.e.a.a.h.nd.a(v6_22, v6_22.length);
                                v3_28.a(v7_9);
                                v7_9.a();
                                String v3_31 = new android.content.ContentValues();
                                v3_31.put("app_id", p53);
                                v3_31.put(v15_11, Integer.valueOf(v0_60));
                                int v7_11 = v51_1;
                                v3_31.put(v7_11, v6_22);
                                try {
                                    c.e.a.a.h.Hc v54_1 = v2_34;
                                    try {
                                        if (v5_17.w().insertWithOnConflict("audience_filter_values", 0, v3_31, 5) != -1) {
                                            v2_34 = v54_1;
                                            v5_10 = v4_13;
                                            v51_1 = v7_11;
                                        } else {
                                            v5_17.o().B().a("Failed to insert filter results (got -1). appId", c.e.a.a.h.ya.a(p53));
                                        }
                                    } catch (int v0_62) {
                                        String v3_33 = v5_17.o().B();
                                        int v5_18 = c.e.a.a.h.ya.a(p53);
                                        int v6_23 = "Error storing filter results. appId";
                                        v3_33.a(v6_23, v5_18, v0_62);
                                    }
                                } catch (int v0_62) {
                                    v54_1 = 0;
                                }
                            } catch (int v0_62) {
                                v54_1 = v2_34;
                                v7_11 = v51_1;
                                v3_33 = v5_17.o().B();
                                v5_18 = c.e.a.a.h.ya.a(p53);
                                v6_23 = "Configuration loss. Failed to serialize filter results. appId";
                            }
                        }
                    }
                    return ((c.e.a.a.h.Mc[]) java.util.Arrays.copyOf(v1_34, v5_10));
                } else {
                    v2_37.close();
                    v0_2 = 0;
                }
            } catch (int v0_85) {
                int v4_46 = v2_37;
                android.database.sqlite.SQLiteException v16_6 = v4_46;
                if (v16_6 != null) {
                    v16_6.close();
                }
                throw v0_85;
            } catch (int v0_82) {
                try {
                    v1_31.o().f.a("Database error querying filter results. appId", c.e.a.a.h.ya.a(p53), v0_82);
                } catch (int v0_85) {
                    v4_46 = v2_37;
                }
                if (v2_37 == null) {
                } else {
                }
            }
        } catch (int v0_85) {
            v16_6 = 0;
        } catch (int v0_82) {
            v2_37 = 0;
        }
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public final boolean a(String p14, c.e.a.a.h.ma p15)
    {
        String v3_4;
        Object v0_7 = p15.b.a.getString("currency");
        if (!"ecommerce_purchase".equals(p15.a)) {
            v3_4 = Long.valueOf(p15.b.a.getLong("value")).longValue();
        } else {
            double v4_2 = (Double.valueOf(p15.b.a.getDouble("value")).doubleValue() * 1000000.0);
            if (v4_2 == 0) {
                String v3_7 = ((double) Long.valueOf(p15.b.a.getLong("value")).longValue());
                Double.isNaN(v3_7);
                v4_2 = (v3_7 * 1000000.0);
            }
            if ((v4_2 > 9.223372036854776e+18) || (v4_2 < -9.223372036854776e+18)) {
                this.o().h.a("Data lost. Currency value is too big. appId", c.e.a.a.h.ya.a(p14), Double.valueOf(v4_2));
                return 0;
            } else {
                v3_4 = Math.round(v4_2);
            }
        }
        if (!android.text.TextUtils.isEmpty(v0_7)) {
            Object v0_9 = v0_7.toUpperCase(java.util.Locale.US);
            if (v0_9.matches("[A-Z]{3}")) {
                Object v0_11;
                if (v0_9.length() == 0) {
                    v0_11 = new String("_ltv_");
                } else {
                    v0_11 = "_ltv_".concat(v0_9);
                }
                Object v0_2;
                int v9_1 = v0_11;
                Object v0_13 = this.u().c(p14, v9_1);
                if (v0_13 == null) {
                    Object v0_3 = this.u();
                    Object v1_2 = (this.c.b(p14, c.e.a.a.h.oa.K) - 1);
                    a.b.f.a.H.c(p14);
                    v0_3.b();
                    v0_3.s();
                    try {
                        c.e.a.a.h.Ac v6_2 = v0_3.w();
                        int v8_1 = new String[3];
                        v8_1[0] = p14;
                        v8_1[1] = p14;
                        v8_1[2] = String.valueOf(v1_2);
                        v6_2.execSQL("delete from user_attributes where app_id=? and name in (select name from user_attributes where app_id=? and name like \'_ltv_%\' order by set_timestamp desc limit ?,10);", v8_1);
                    } catch (Object v1_5) {
                        v0_3.o().f.a("Error pruning currencies. appId", c.e.a.a.h.ya.a(p14), v1_5);
                    }
                    v0_2 = new c.e.a.a.h.zc;
                    v0_2(p14, p15.c, v9_1, ((c.e.a.a.c.d.b) this.n).a(), Long.valueOf(v3_4));
                } else {
                    Object v0_14 = v0_13.e;
                    if ((v0_14 instanceof Long)) {
                        String v2_6 = new c.e.a.a.h.zc;
                        v2_6(p14, p15.c, v9_1, ((c.e.a.a.c.d.b) this.n).a(), Long.valueOf((((Long) v0_14).longValue() + v3_4)));
                        v0_2 = v2_6;
                    }
                }
                if (!this.u().a(v0_2)) {
                    this.o().f.a("Too many unique user properties are set. Ignoring user property. appId", c.e.a.a.h.ya.a(p14), this.t().c(v0_2.c), v0_2.e);
                    this.s().a(p14, 9, 0, 0, 0);
                }
            }
        }
        return 1;
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public final boolean a(String p38, long p39)
    {
        c.e.a.a.h.Aa v2_0 = "_lte";
        this.u().A();
        try {
            int v4_0 = 0;
            String v3_17 = new ark>c.e.a.a.h.Xaark>$a(this, 0);
            String v5_38 = this.u();
            long v6_0 = this.J;
            a.b.f.a.H.d(v3_17);
            v5_38.b();
            v5_38.s();
            try {
                String v22_0;
                boolean v10_18;
                long v15_3 = v5_38.w();
                boolean v14_6 = "";
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        boolean v10_31;
                        if (v6_0 == -1) {
                            v10_31 = new String[1];
                            v10_31[0] = 0;
                        } else {
                            v10_31 = new String[2];
                            v10_31[0] = 0;
                            v10_31[1] = String.valueOf(v6_0);
                        }
                        if (v6_0 != -1) {
                            v14_6 = " and rowid <= ?";
                        }
                        boolean v13_25 = new StringBuilder((v14_6.length() + 84));
                        v13_25.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v13_25.append(v14_6);
                        v13_25.append(" order by rowid limit 1;");
                        v4_0 = v15_3.rawQuery(v13_25.toString(), v10_31);
                        if (v4_0.moveToFirst()) {
                            boolean v13_26 = v4_0.getString(0);
                            v4_0.close();
                            v22_0 = v4_0;
                            v10_18 = v13_26;
                            v4_0 = 0;
                            try {
                                boolean v13_2 = new String[1];
                                v13_2[0] = "metadata";
                                int v9_1 = new String[2];
                                v9_1[0] = v4_0;
                                v9_1[1] = v10_18;
                                c.e.a.a.h.aa v23_2 = v15_3;
                                Boolean v8_11 = v15_3.query("raw_events_metadata", v13_2, "app_id = ? and metadata_fingerprint = ?", v9_1, 0, 0, "rowid", "2");
                                try {
                                    if (v8_11.moveToFirst()) {
                                        int v9_3 = v8_11.getBlob(0);
                                        int v9_4 = c.e.a.a.h.md.a(v9_3, v9_3.length);
                                        boolean v13_11 = new c.e.a.a.h.Qc();
                                        try {
                                            v13_11.a(v9_4);
                                        } catch (android.database.sqlite.SQLiteException v0_4) {
                                            v5_38.o().B().a("Data loss. Failed to merge raw event metadata. appId", c.e.a.a.h.ya.a(v4_0), v0_4);
                                            v8_11.close();
                                            int v4_9;
                                            if (v3_17.c == null) {
                                                v4_9 = 1;
                                            } else {
                                                if (!v3_17.c.isEmpty()) {
                                                    v4_9 = 0;
                                                } else {
                                                }
                                            }
                                            if (v4_9 != 0) {
                                                this.u().B();
                                                this.u().C();
                                                return 0;
                                            } else {
                                                int v4_10 = v3_17.a;
                                                String v5_4 = new c.e.a.a.h.Nc[v3_17.c.size()];
                                                v4_10.e = v5_4;
                                                String v5_6 = this.c.c(v4_10.r);
                                                Boolean v8_9 = 0;
                                                int v9_0 = 0;
                                                boolean v10_19 = 0;
                                                boolean v13_4 = 0;
                                                while (v8_9 < v3_17.c.size()) {
                                                    c.e.a.a.h.aa v23_1;
                                                    String v21_0;
                                                    long v15_23 = ((c.e.a.a.h.Nc) v3_17.c.get(v8_9));
                                                    if (!this.q().b(v3_17.a.r, v15_23.e)) {
                                                        long v24_4;
                                                        long v25_1;
                                                        v21_0 = v2_0;
                                                        String v20_0 = v10_19;
                                                        c.e.a.a.h.Aa v2_75 = this.q().c(v3_17.a.r, v15_23.e);
                                                        if (v2_75 != null) {
                                                            if (v15_23.d == null) {
                                                                boolean v10_44 = new c.e.a.a.h.Oc[0];
                                                                v15_23.d = v10_44;
                                                            }
                                                            long v6_34 = v15_23.d;
                                                            boolean v10_21 = v6_34.length;
                                                            v23_1 = v8_9;
                                                            int v11_15 = 0;
                                                            long v12_9 = 0;
                                                            String v22_1 = 0;
                                                            while(true) {
                                                                v24_4 = v9_0;
                                                                if (v11_15 >= v10_21) {
                                                                    break;
                                                                }
                                                                long v25_2 = v10_21;
                                                                boolean v10_20 = v6_34[v11_15];
                                                                long v26_1 = v6_34;
                                                                if (!"_c".equals(v10_20.d)) {
                                                                    if ("_r".equals(v10_20.d)) {
                                                                        v10_20.f = Long.valueOf(1);
                                                                        v22_1 = 1;
                                                                    }
                                                                } else {
                                                                    v10_20.f = Long.valueOf(1);
                                                                    v12_9 = 1;
                                                                }
                                                                v11_15++;
                                                                v9_0 = v24_4;
                                                                v10_21 = v25_2;
                                                                v6_34 = v26_1;
                                                            }
                                                            if ((v12_9 == 0) && (v2_75 != null)) {
                                                                this.o().y().a("Marking event as conversion", this.t().a(v15_23.e));
                                                                long v6_97 = v15_23.d;
                                                                long v6_1 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v6_97, (v6_97.length + 1)));
                                                                boolean v10_1 = new c.e.a.a.h.Oc();
                                                                v10_1.d = "_c";
                                                                v10_1.f = Long.valueOf(1);
                                                                v6_1[(v6_1.length - 1)] = v10_1;
                                                                v15_23.d = v6_1;
                                                            }
                                                            if (v22_1 == null) {
                                                                this.o().y().a("Marking event as real-time", this.t().a(v15_23.e));
                                                                long v6_4 = v15_23.d;
                                                                long v6_6 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v6_4, (v6_4.length + 1)));
                                                                boolean v10_7 = new c.e.a.a.h.Oc();
                                                                v10_7.d = "_r";
                                                                v10_7.f = Long.valueOf(1);
                                                                v6_6[(v6_6.length - 1)] = v10_7;
                                                                v15_23.d = v6_6;
                                                            }
                                                            boolean v10_10;
                                                            v25_1 = v13_4;
                                                            if (this.u().a(this.i(), v3_17.a.r, 0, 0, 0, 0, 1).e <= ((long) this.c.a(v3_17.a.r))) {
                                                                v10_10 = 1;
                                                            } else {
                                                                long v6_13 = 0;
                                                                while(true) {
                                                                    boolean v10_11 = v15_23.d;
                                                                    if (v6_13 < v10_11.length) {
                                                                        if ("_r".equals(v10_11[v6_13].d)) {
                                                                            break;
                                                                        }
                                                                        v6_13++;
                                                                    }
                                                                    v10_10 = v20_0;
                                                                }
                                                                Boolean v8_0 = v15_23.d;
                                                                boolean v10_17 = new c.e.a.a.h.Oc[(v8_0.length - 1)];
                                                                if (v6_13 > 0) {
                                                                    System.arraycopy(v8_0, 0, v10_17, 0, v6_13);
                                                                }
                                                                if (v6_13 < v10_17.length) {
                                                                    System.arraycopy(v15_23.d, (v6_13 + 1), v10_17, v6_13, (v10_17.length - v6_13));
                                                                }
                                                                v15_23.d = v10_17;
                                                            }
                                                            if ((c.e.a.a.h.Ac.a(v15_23.e)) && ((v2_75 != null) && (this.u().a(this.i(), v3_17.a.r, 0, 0, 1, 0, 0).c > ((long) this.c.b(v3_17.a.r, c.e.a.a.h.oa.t))))) {
                                                                this.o().w().a("Too many conversions. Not logging as conversion. appId", c.e.a.a.h.ya.a(v3_17.a.r));
                                                                c.e.a.a.h.Aa v2_10 = v15_23.d;
                                                                Boolean v8_7 = 0;
                                                                int v11_14 = 0;
                                                                long v12_8 = 0;
                                                                while (v8_7 < v2_10.length) {
                                                                    boolean v13_5 = v2_10[v8_7];
                                                                    if (!"_c".equals(v13_5.d)) {
                                                                        if ("_err".equals(v13_5.d)) {
                                                                            v11_14 = 1;
                                                                        }
                                                                    } else {
                                                                        v12_8 = v13_5;
                                                                    }
                                                                    v8_7++;
                                                                }
                                                                if ((v11_14 == 0) || (v12_8 == 0)) {
                                                                    if (v12_8 == 0) {
                                                                        this.o().B().a("Did not find conversion parameter. appId", c.e.a.a.h.ya.a(v3_17.a.r));
                                                                    } else {
                                                                        v12_8.d = "_err";
                                                                        v12_8.f = Long.valueOf(10);
                                                                    }
                                                                } else {
                                                                    c.e.a.a.h.Aa v2_14 = v15_23.d;
                                                                    Boolean v7_3 = new c.e.a.a.h.Oc[1];
                                                                    v7_3[0] = v12_8;
                                                                    v15_23.d = ((c.e.a.a.h.Oc[]) a.b.f.a.H.b(v2_14, v7_3));
                                                                }
                                                            }
                                                            v20_0 = v10_10;
                                                        } else {
                                                            this.s();
                                                            if (!c.e.a.a.h.Ac.l(v15_23.e)) {
                                                                v23_1 = v8_9;
                                                                v24_4 = v9_0;
                                                                v25_1 = v13_4;
                                                            } else {
                                                            }
                                                        }
                                                        if ((v5_6 != null) && ("_e".equals(v15_23.e))) {
                                                            long v6_27;
                                                            Boolean v7_5;
                                                            c.e.a.a.h.Aa v2_25;
                                                            c.e.a.a.h.Aa v2_19 = v15_23.d;
                                                            if (v2_19 == null) {
                                                                v2_25 = this.o().w();
                                                                v6_27 = "Engagement event does not contain any parameters. appId";
                                                                v7_5 = v3_17.a.r;
                                                            } else {
                                                                if (v2_19.length != 0) {
                                                                    this.s();
                                                                    c.e.a.a.h.Aa v2_23 = ((Long) c.e.a.a.h.Ac.b(v15_23, "_et"));
                                                                    if (v2_23 != null) {
                                                                        v25_1 += v2_23.longValue();
                                                                        v9_0 = (v24_4 + 1);
                                                                        v4_10.e[v24_4] = v15_23;
                                                                        v10_19 = v20_0;
                                                                        v13_4 = v25_1;
                                                                        v8_9 = (v23_1 + 1);
                                                                        v2_0 = v21_0;
                                                                        long v12 = 1;
                                                                    } else {
                                                                        v2_25 = this.o().w();
                                                                        v6_27 = "Engagement event does not include duration. appId";
                                                                        v7_5 = v3_17.a.r;
                                                                    }
                                                                } else {
                                                                }
                                                            }
                                                            v2_25.a(v6_27, c.e.a.a.h.ya.a(v7_5));
                                                        }
                                                    } else {
                                                        c.e.a.a.h.Aa v2_34;
                                                        String v20_1 = v10_19;
                                                        v21_0 = v2_0;
                                                        this.o().w().a("Dropping blacklisted raw event. appId", c.e.a.a.h.ya.a(v3_17.a.r), this.t().a(v15_23.e));
                                                        if (this.s().j(v3_17.a.r)) {
                                                            v2_34 = 1;
                                                        } else {
                                                            if (!this.s().k(v3_17.a.r)) {
                                                                v2_34 = 0;
                                                            } else {
                                                            }
                                                        }
                                                        if ((v2_34 == null) && (!"_err".equals(v15_23.e))) {
                                                            this.s().a(v3_17.a.r, 11, "_ev", v15_23.e, 0);
                                                        }
                                                        v23_1 = v8_9;
                                                        v10_19 = v20_1;
                                                    }
                                                }
                                                String v21_3 = v2_0;
                                                String v20_4 = v10_19;
                                                long v25_4 = v13_4;
                                                int v9_12 = v9_0;
                                                if (v9_12 < v3_17.c.size()) {
                                                    v4_10.e = ((c.e.a.a.h.Nc[]) java.util.Arrays.copyOf(v4_10.e, v9_12));
                                                }
                                                if (v5_6 != null) {
                                                    c.e.a.a.h.Aa v2_49;
                                                    long v6_54 = v21_3;
                                                    c.e.a.a.h.Aa v2_46 = this.u().c(v4_10.r, v6_54);
                                                    if (v2_46 == null) {
                                                        v2_49 = new c.e.a.a.h.zc;
                                                        v2_49(v4_10.r, "auto", "_lte", ((c.e.a.a.c.d.b) this.n).a(), Long.valueOf(v25_4));
                                                    } else {
                                                        if (v2_46.e != null) {
                                                            String v5_9 = new c.e.a.a.h.zc;
                                                            v5_9(v4_10.r, "auto", "_lte", ((c.e.a.a.c.d.b) this.n).a(), Long.valueOf((((Long) v2_46.e).longValue() + v25_4)));
                                                            v2_49 = v5_9;
                                                        } else {
                                                        }
                                                    }
                                                    String v5_12 = new c.e.a.a.h.Sc();
                                                    v5_12.e = v6_54;
                                                    v5_12.d = Long.valueOf(((c.e.a.a.c.d.b) this.n).a());
                                                    v5_12.g = ((Long) v2_49.e);
                                                    Boolean v7_34 = 0;
                                                    while(true) {
                                                        long v6_55;
                                                        Boolean v8_17 = v4_10.f;
                                                        if (v7_34 >= v8_17.length) {
                                                            break;
                                                        }
                                                        if (!v6_54.equals(v8_17[v7_34].e)) {
                                                            v7_34++;
                                                        } else {
                                                            v4_10.f[v7_34] = v5_12;
                                                            v6_55 = 1;
                                                        }
                                                        if (v6_55 == 0) {
                                                            long v6_57 = v4_10.f;
                                                            v4_10.f = ((c.e.a.a.h.Sc[]) java.util.Arrays.copyOf(v6_57, (v6_57.length + 1)));
                                                            v4_10.f[(v3_17.a.f.length - 1)] = v5_12;
                                                        }
                                                        if (v25_4 > 0) {
                                                            this.u().a(v2_49);
                                                            this.o().x().a("Updated lifetime engagement user property with value. Value", v2_49.e);
                                                        }
                                                    }
                                                    v6_55 = 0;
                                                }
                                                int v4_17;
                                                long v15_7;
                                                c.e.a.a.h.ia v1_5;
                                                v4_10.D = this.a(v4_10.r, v4_10.f, v4_10.e);
                                                if ((!((Boolean) c.e.a.a.h.oa.f.a()).booleanValue()) || (!"1".equals(this.c.l().a(v3_17.a.r, "measurement.event_sampling_enabled")))) {
                                                    v15_7 = v3_17;
                                                    v1_5 = v4_10;
                                                    v4_17 = 0;
                                                } else {
                                                    c.e.a.a.h.Aa v2_62 = new java.util.HashMap();
                                                    String v5_22 = new c.e.a.a.h.Nc[v4_10.e.length];
                                                    long v6_65 = this.s().x();
                                                    Boolean v7_43 = v4_10.e;
                                                    Boolean v8_23 = v7_43.length;
                                                    int v9_15 = 0;
                                                    boolean v10_33 = 0;
                                                    while (v9_15 < v8_23) {
                                                        String v22_2;
                                                        c.e.a.a.h.aa v23_4;
                                                        long v24_3;
                                                        String v21_4;
                                                        c.e.a.a.h.ia v1_27;
                                                        long v15_16;
                                                        int v11_21 = v7_43[v9_15];
                                                        if (!v11_21.e.equals("_ep")) {
                                                            long v12_16;
                                                            if (ark>c.e.a.a.h.Xaark>.a(v11_21, "_dbg", Long.valueOf(1))) {
                                                                v12_16 = 1;
                                                            } else {
                                                                v12_16 = this.q().d(v3_17.a.r, v11_21.e);
                                                            }
                                                            if (v12_16 > 0) {
                                                                c.e.a.a.h.ia v1_18 = ((c.e.a.a.h.ia) v2_62.get(v11_21.e));
                                                                if (v1_18 != null) {
                                                                    v21_4 = v7_43;
                                                                    v22_2 = v8_23;
                                                                } else {
                                                                    v21_4 = v7_43;
                                                                    v1_18 = this.u().a(v3_17.a.r, v11_21.e);
                                                                    if (v1_18 != null) {
                                                                    } else {
                                                                        v22_2 = v8_23;
                                                                        this.o().w().a("Event being bundled has no eventAggregate. appId, eventName", v3_17.a.r, v11_21.e);
                                                                        v1_18 = new c.e.a.a.h.ia;
                                                                        v1_18(v3_17.a.r, v11_21.e, 1, 1, v11_21.f.longValue(), 0, 0, 0, 0);
                                                                    }
                                                                }
                                                                Boolean v8_30;
                                                                this.s();
                                                                Boolean v7_54 = ((Long) c.e.a.a.h.Ac.b(v11_21, "_eid"));
                                                                if (v7_54 == null) {
                                                                    v8_30 = 0;
                                                                } else {
                                                                    v8_30 = 1;
                                                                }
                                                                c.e.a.a.h.ia v1_24;
                                                                Boolean v7_58;
                                                                Boolean v8_34;
                                                                Boolean v8_31 = Boolean.valueOf(v8_30);
                                                                if (v12_16 != 1) {
                                                                    if (v6_65.nextInt(v12_16) != 0) {
                                                                        v15_16 = v3_17;
                                                                        v23_4 = v4_10;
                                                                        v24_3 = v6_65;
                                                                        if (Math.abs((v11_21.f.longValue() - v1_18.f)) < 86400000) {
                                                                            if (!v8_31.booleanValue()) {
                                                                                v9_15++;
                                                                                v3_17 = v15_16;
                                                                                v7_43 = v21_4;
                                                                                v8_23 = v22_2;
                                                                                v4_10 = v23_4;
                                                                                v6_65 = v24_3;
                                                                            } else {
                                                                                v2_62.put(v11_21.e, v1_18.a(v7_54, 0, 0));
                                                                            }
                                                                        } else {
                                                                            this.s();
                                                                            v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_efs", Long.valueOf(1));
                                                                            this.s();
                                                                            long v6_82 = ((long) v12_16);
                                                                            v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", Long.valueOf(v6_82));
                                                                            String v3_26 = (v10_33 + 1);
                                                                            v5_22[v10_33] = v11_21;
                                                                            if (v8_31.booleanValue()) {
                                                                                v1_18 = v1_18.a(0, Long.valueOf(v6_82), Boolean.valueOf(1));
                                                                            }
                                                                            v2_62.put(v11_21.e, v1_18.b(v11_21.f.longValue()));
                                                                            v10_33 = v3_26;
                                                                        }
                                                                    } else {
                                                                        this.s();
                                                                        long v12_19 = ((long) v12_16);
                                                                        v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", Long.valueOf(v12_19));
                                                                        v7_58 = (v10_33 + 1);
                                                                        v5_22[v10_33] = v11_21;
                                                                        if (v8_31.booleanValue()) {
                                                                            v1_18 = v1_18.a(0, Long.valueOf(v12_19), 0);
                                                                        }
                                                                        v8_34 = v11_21.e;
                                                                        v1_24 = v1_18.b(v11_21.f.longValue());
                                                                        v2_62.put(v8_34, v1_24);
                                                                    }
                                                                } else {
                                                                    v7_58 = (v10_33 + 1);
                                                                    v5_22[v10_33] = v11_21;
                                                                    if ((v8_31.booleanValue()) && ((v1_18.g != null) || ((v1_18.h != null) || (v1_18.i != null)))) {
                                                                        v1_24 = v1_18.a(0, 0, 0);
                                                                        v8_34 = v11_21.e;
                                                                    }
                                                                }
                                                                v10_33 = v7_58;
                                                                v15_16 = v3_17;
                                                                v23_4 = v4_10;
                                                                v24_3 = v6_65;
                                                            } else {
                                                                this.o().w().a("Sample rate must be positive. event, rate", v11_21.e, Integer.valueOf(v12_16));
                                                                v1_27 = (v10_33 + 1);
                                                                v5_22[v10_33] = v11_21;
                                                                v10_33 = v1_27;
                                                                v15_16 = v3_17;
                                                                v23_4 = v4_10;
                                                                v24_3 = v6_65;
                                                                v21_4 = v7_43;
                                                                v22_2 = v8_23;
                                                            }
                                                        } else {
                                                            this.s();
                                                            long v12_23 = ((String) c.e.a.a.h.Ac.b(v11_21, "_en"));
                                                            long v15_19 = ((c.e.a.a.h.ia) v2_62.get(v12_23));
                                                            if (v15_19 == 0) {
                                                                v15_19 = this.u().a(v3_17.a.r, v12_23);
                                                                v2_62.put(v12_23, v15_19);
                                                            }
                                                            if (v15_19.g != null) {
                                                            } else {
                                                                if (v15_19.h.longValue() > 1) {
                                                                    this.s();
                                                                    v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", v15_19.h);
                                                                }
                                                                c.e.a.a.h.ia v1_35 = v15_19.i;
                                                                if ((v1_35 != null) && (v1_35.booleanValue())) {
                                                                    this.s();
                                                                    v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_efs", Long.valueOf(1));
                                                                }
                                                                v1_27 = (v10_33 + 1);
                                                                v5_22[v10_33] = v11_21;
                                                            }
                                                        }
                                                    }
                                                    v15_7 = v3_17;
                                                    v1_5 = v4_10;
                                                    v4_17 = 0;
                                                    if (v10_33 < v1_5.e.length) {
                                                        v1_5.e = ((c.e.a.a.h.Nc[]) java.util.Arrays.copyOf(v5_22, v10_33));
                                                    }
                                                    c.e.a.a.h.Aa v2_64 = v2_62.entrySet().iterator();
                                                    while (v2_64.hasNext()) {
                                                        this.u().a(((c.e.a.a.h.ia) ((java.util.Map$Entry) v2_64.next()).getValue()));
                                                    }
                                                }
                                                v1_5.h = Long.valueOf(nan);
                                                v1_5.i = Long.valueOf(-0.0);
                                                c.e.a.a.h.Aa v2_69 = 0;
                                                while(true) {
                                                    String v3_7 = v1_5.e;
                                                    if (v2_69 >= v3_7.length) {
                                                        break;
                                                    }
                                                    String v3_11 = v3_7[v2_69];
                                                    if (v3_11.f.longValue() < v1_5.h.longValue()) {
                                                        v1_5.h = v3_11.f;
                                                    }
                                                    if (v3_11.f.longValue() > v1_5.i.longValue()) {
                                                        v1_5.i = v3_11.f;
                                                    }
                                                    v2_69++;
                                                }
                                                c.e.a.a.h.Aa v2_70 = v15_7;
                                                String v3_9 = v2_70.a.r;
                                                String v5_25 = this.u().b(v3_9);
                                                if (v5_25 != null) {
                                                    if (v1_5.e.length > 0) {
                                                        Boolean v8_25;
                                                        long v6_68 = v5_25.h();
                                                        if (v6_68 == 0) {
                                                            v8_25 = v4_17;
                                                        } else {
                                                            v8_25 = Long.valueOf(v6_68);
                                                        }
                                                        v1_5.k = v8_25;
                                                        Boolean v8_26 = v5_25.g();
                                                        if (v8_26 != 0) {
                                                            v6_68 = v8_26;
                                                        } else {
                                                        }
                                                        if (v6_68 != 0) {
                                                            v4_17 = Long.valueOf(v6_68);
                                                        }
                                                        v1_5.j = v4_17;
                                                        v5_25.r();
                                                        v1_5.z = Integer.valueOf(((int) v5_25.o()));
                                                        v5_25.a(v1_5.h.longValue());
                                                        v5_25.b(v1_5.i.longValue());
                                                        v1_5.A = v5_25.s();
                                                        this.u().a(v5_25);
                                                    }
                                                } else {
                                                    this.o().B().a("Bundling raw events w/o app info. appId", c.e.a.a.h.ya.a(v2_70.a.r));
                                                }
                                                if (v1_5.e.length > 0) {
                                                    int v4_31;
                                                    int v4_30 = this.q().a(v2_70.a.r);
                                                    if (v4_30 == 0) {
                                                        if (!android.text.TextUtils.isEmpty(v2_70.a.B)) {
                                                            this.o().w().a("Did not find measurement config or missing version info. appId", c.e.a.a.h.ya.a(v2_70.a.r));
                                                        } else {
                                                            v4_31 = Long.valueOf(-1);
                                                            v1_5.J = v4_31;
                                                        }
                                                    } else {
                                                        v4_31 = v4_30.c;
                                                        if (v4_31 != 0) {
                                                        }
                                                    }
                                                    this.u().a(v1_5, v20_4);
                                                }
                                                this.u().a(v2_70.b);
                                                c.e.a.a.h.ia v1_7 = this.u();
                                                c.e.a.a.h.Aa v2_72 = v1_7.w();
                                                try {
                                                    String v5_31 = new String[2];
                                                    v5_31[0] = v3_9;
                                                    v5_31[1] = v3_9;
                                                    v2_72.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_31);
                                                } catch (android.database.sqlite.SQLiteException v0_12) {
                                                    v1_7.o().B().a("Failed to remove unused event metadata. appId", c.e.a.a.h.ya.a(v3_9), v0_12);
                                                }
                                                this.u().B();
                                                this.u().C();
                                                return 1;
                                            }
                                        }
                                        if (v8_11.moveToNext()) {
                                            v5_38.o().w().a("Get multiple raw event metadata records, expected one. appId", c.e.a.a.h.ya.a(v4_0));
                                        }
                                        String[] v17_1;
                                        String v16_2;
                                        v8_11.close();
                                        v3_17.a(v13_11);
                                        if (v6_0 == -1) {
                                            boolean v13_13 = new String[2];
                                            v13_13[0] = v4_0;
                                            v13_13[1] = v10_18;
                                            v16_2 = "app_id = ? and metadata_fingerprint = ?";
                                            v17_1 = v13_13;
                                        } else {
                                            boolean v14_4 = new String[3];
                                            v14_4[0] = v4_0;
                                            v14_4[1] = v10_18;
                                            v14_4[2] = String.valueOf(v6_0);
                                            v16_2 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v17_1 = v14_4;
                                        }
                                        long v15_4 = new String[4];
                                        v15_4[0] = "rowid";
                                        v15_4[1] = "name";
                                        v15_4[2] = "timestamp";
                                        v15_4[3] = "data";
                                        long v6_50 = v23_2.query("raw_events", v15_4, v16_2, v17_1, 0, 0, "rowid", 0);
                                        try {
                                            if (v6_50.moveToFirst()) {
                                                do {
                                                    Boolean v7_14 = v6_50.getLong(0);
                                                    boolean v10_25 = v6_50.getBlob(3);
                                                    boolean v10_26 = c.e.a.a.h.md.a(v10_25, v10_25.length);
                                                    boolean v13_19 = new c.e.a.a.h.Nc();
                                                    v13_19.a(v10_26);
                                                    v13_19.e = v6_50.getString(1);
                                                    v13_19.f = Long.valueOf(v6_50.getLong(2));
                                                    if (v3_17.a(v7_14, v13_19)) {
                                                    } else {
                                                        break;
                                                    }
                                                } while(v6_50.moveToNext());
                                            } else {
                                                v5_38.o().w().a("Raw event data disappeared while in transaction. appId", c.e.a.a.h.ya.a(v4_0));
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_7) {
                                            c.e.a.a.h.Aa v2_1 = v0_7;
                                            v4_0 = v6_50;
                                            if (v4_0 != 0) {
                                                v4_0.close();
                                            }
                                            throw v2_1;
                                        } catch (android.database.sqlite.SQLiteException v0_6) {
                                            v22_0 = v6_50;
                                            long v6_20 = v0_6;
                                            v8_11 = v22_0;
                                            v5_38.o().B().a("Data loss. Error selecting raw event. appId", c.e.a.a.h.ya.a(v4_0), v6_20);
                                            if (v8_11 == null) {
                                            }
                                        }
                                        v6_50.close();
                                    } else {
                                        v5_38.o().B().a("Raw event metadata record is missing. appId", c.e.a.a.h.ya.a(v4_0));
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_8) {
                                    v6_20 = v0_8;
                                    v22_0 = v8_11;
                                }
                            } catch (android.database.sqlite.SQLiteException v0_3) {
                                v2_1 = v0_3;
                                v4_0 = v22_0;
                            } catch (android.database.sqlite.SQLiteException v0_2) {
                                v6_20 = v0_2;
                            }
                        }
                    } else {
                        try {
                            boolean v13_28;
                            if (v6_0 == -1) {
                                v13_28 = new String[1];
                                v13_28[0] = String.valueOf(p39);
                            } else {
                                v13_28 = new String[2];
                                v13_28[0] = String.valueOf(v6_0);
                                v13_28[1] = String.valueOf(p39);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_13) {
                            v6_20 = v0_13;
                            v22_0 = 0;
                        }
                        if (v6_0 != -1) {
                            v14_6 = "rowid <= ? and ";
                        }
                        boolean v10_42 = new StringBuilder((v14_6.length() + 148));
                        v10_42.append("select app_id, metadata_fingerprint from raw_events where ");
                        v10_42.append(v14_6);
                        v10_42.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v4_0 = v15_3.rawQuery(v10_42.toString(), v13_28);
                        if (v4_0.moveToFirst()) {
                            boolean v10_9 = v4_0.getString(0);
                            try {
                                boolean v13_0 = v4_0.getString(1);
                                v4_0.close();
                                v22_0 = v4_0;
                                v4_0 = v10_9;
                                v10_18 = v13_0;
                            } catch (android.database.sqlite.SQLiteException v0_0) {
                                v6_20 = v0_0;
                                v22_0 = v4_0;
                                v4_0 = v10_18;
                            }
                        } else {
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_11) {
                    v2_1 = v0_11;
                } catch (android.database.sqlite.SQLiteException v0_9) {
                    v6_20 = v0_9;
                    v22_0 = v4_0;
                    v4_0 = 0;
                }
                v4_0.close();
            } catch (android.database.sqlite.SQLiteException v0_15) {
                v2_1 = v0_15;
                v4_0 = 0;
            } catch (android.database.sqlite.SQLiteException v0_14) {
                v6_20 = v0_14;
                v4_0 = 0;
                v8_11 = 0;
            } catch (android.database.sqlite.SQLiteException v0_10) {
                v2_1 = v0_10;
                v4_0 = v8_11;
            }
        } catch (android.database.sqlite.SQLiteException v0_1) {
            c.e.a.a.h.ia v1_1 = v0_1;
            this.u().C();
            throw v1_1;
        }
    }

Method c.e.a.a.h.ua.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final boolean a(int p18, byte[] p19)
    {
        this.b();
        Long v3_9 = 0;
        if (!this.d) {
            android.content.ContentValues v4_1 = new android.content.ContentValues();
            v4_1.put("type", Integer.valueOf(p18));
            v4_1.put("entry", p19);
            c.e.a.a.h.Aa v5_2 = 5;
            int v6 = 0;
            int v7 = 5;
            while (v6 < v5_2) {
                String v8_0 = 0;
                try {
                    String[] v10 = this.w();
                    try {
                        if (v10 != null) {
                            try {
                                v10.beginTransaction();
                                Long v11_1 = 0;
                                int v13 = v10.rawQuery("select count(1) from messages", 0);
                                try {
                                    if ((v13 != 0) && (v13.moveToFirst())) {
                                        v11_1 = v13.getLong(v3_9);
                                    }
                                    if (v11_1 >= 100000) {
                                        this.o().f.a("Data loss, local db full");
                                        long v14_2 = ((100000 - v11_1) + 1);
                                        String v8_2 = new String[1];
                                        v8_2[v3_9] = Long.toString(v14_2);
                                        Long v11_4 = ((long) v10.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v8_2));
                                        if (v11_4 != v14_2) {
                                            this.o().f.a("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v14_2), Long.valueOf(v11_4), Long.valueOf((v14_2 - v11_4)));
                                        }
                                    }
                                    v10.insertOrThrow("messages", 0, v4_1);
                                    v10.setTransactionSuccessful();
                                    v10.endTransaction();
                                    if (v13 != 0) {
                                        v13.close();
                                    }
                                    v10.close();
                                    return 1;
                                } catch (Throwable v0_0) {
                                    if (v13 != 0) {
                                        v13.close();
                                    }
                                    if (v10 != null) {
                                        v10.close();
                                    }
                                    throw v0_0;
                                } catch (Throwable v0_3) {
                                    v8_0 = v13;
                                    this.o().f.a("Error writing entry to local database", v0_3);
                                    this.d = 1;
                                    if (v8_0 != null) {
                                        v8_0.close();
                                    }
                                    if (v10 == null) {
                                        v6++;
                                        v3_9 = 0;
                                        v5_2 = 5;
                                    } else {
                                        v10.close();
                                    }
                                } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                                    v8_0 = v13;
                                    android.os.SystemClock.sleep(((long) v7));
                                    v7 += 20;
                                    if (v8_0 != null) {
                                        v8_0.close();
                                    }
                                    if (v10 == null) {
                                    }
                                } catch (Throwable v0_1) {
                                }
                            } catch (Throwable v0_0) {
                                v13 = 0;
                            } catch (Throwable v0_3) {
                            } catch (Throwable v0_1) {
                                v13 = 0;
                            }
                        } else {
                            try {
                                this.d = 1;
                            } catch (Throwable v0_3) {
                            } catch (Throwable v0_1) {
                                v13 = 0;
                            }
                            if (v10 != null) {
                                v10.close();
                            }
                            return v3_9;
                        }
                        v8_0 = v10;
                        if (v8_0 != null) {
                            try {
                                if (v8_0.inTransaction()) {
                                    v8_0.endTransaction();
                                }
                            } catch (Throwable v0_0) {
                                v10 = v8_0;
                            }
                        }
                        this.o().f.a("Error writing entry to local database", v0_1);
                        this.d = 1;
                        if (v13 != 0) {
                            v13.close();
                        }
                        if (v8_0 == null) {
                        } else {
                            v8_0.close();
                        }
                    } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                        v8_0 = 0;
                    }
                } catch (Throwable v0_0) {
                    v10 = 0;
                    v13 = 0;
                } catch (Throwable v0_3) {
                    v10 = 0;
                } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                    v10 = 0;
                } catch (Throwable v0_1) {
                    v13 = 0;
                } catch (Throwable v0_0) {
                    v13 = v8_0;
                }
            }
            this.o().h.a("Failed to write entry to local database");
            return 0;
        } else {
            return 0;
        }
    }

Method c.e.a.a.h.aa.y() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void y()
    {
        this.b();
        this.s();
        if (this.a.b.getDatabasePath("google_app_measurement.db").exists()) {
            String v2_0 = this.p().i.a();
            long v4 = ((c.e.a.a.c.d.b) this.a.n).b();
            if (Math.abs((v4 - v2_0)) > ((Long) c.e.a.a.h.oa.E.a).longValue()) {
                this.p().i.a(v4);
                this.b();
                this.s();
                if (this.a.b.getDatabasePath("google_app_measurement.db").exists()) {
                    Integer v0_17 = this.w();
                    c.e.a.a.h.Aa v1_2 = new String[2];
                    v1_2[0] = String.valueOf(((c.e.a.a.c.d.b) this.a.n).a());
                    v1_2[1] = String.valueOf(c.e.a.a.h.Z.u());
                    Integer v0_19 = v0_17.delete("queue", "abs(bundle_end_timestamp - ?) > cast(? as integer)", v1_2);
                    if (v0_19 > null) {
                        this.o().l.a("Deleted stale rows. rowsDeleted", Integer.valueOf(v0_19));
                    }
                }
            }
            return;
        } else {
            return;
        }
    }

Method c.e.a.a.h.aa.e() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final int e(String p7, String p8)
    {
        a.b.f.a.H.c(p7);
        a.b.f.a.H.c(p8);
        this.b();
        this.s();
        try {
            android.database.sqlite.SQLiteException v1_1 = this.w();
            String[] v4_0 = new String[2];
            v4_0[0] = p7;
            v4_0[1] = p8;
            Object v7_1 = v1_1.delete("conditional_properties", "app_id=? and name=?", v4_0);
            return v7_1;
        } catch (android.database.sqlite.SQLiteException v1_0) {
            this.o().f.a("Error deleting conditional property", c.e.a.a.h.ya.a(v7_1), this.j().c(p8), v1_0);
            return 0;
        }
    }

Method c.e.a.a.h.aa.c() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final long c(String p7)
    {
        a.b.f.a.H.c(p7);
        this.b();
        this.s();
        try {
            long v0_3 = this.w();
            c.e.a.a.h.Aa v1_2 = String.valueOf(Math.max(0, Math.min(1000000, this.a.c.b(p7, c.e.a.a.h.oa.v))));
            String[] v5_1 = new String[2];
            v5_1[0] = p7;
            v5_1[1] = v1_2;
            Object v7_1 = v0_3.delete("raw_events", "rowid in (select rowid from raw_events where app_id=? order by rowid desc limit -1 offset ?)", v5_1);
            return ((long) v7_1);
        } catch (long v0_1) {
            this.o().f.a("Error deleting over the limit events. appId", c.e.a.a.h.ya.a(v7_1), v0_1);
            return 0;
        }
    }

Method c.e.a.a.h.aa.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void b(String p6, String p7)
    {
        a.b.f.a.H.c(p6);
        a.b.f.a.H.c(p7);
        this.b();
        this.s();
        try {
            android.database.sqlite.SQLiteException v0_3 = this.w();
            String[] v3_1 = new String[2];
            v3_1[0] = p6;
            v3_1[1] = p7;
            this.o().l.a("Deleted user attribute rows", Integer.valueOf(v0_3.delete("user_attributes", "app_id=? and name=?", v3_1)));
            return;
        } catch (android.database.sqlite.SQLiteException v0_2) {
            this.o().f.a("Error deleting user attribute. appId", c.e.a.a.h.ya.a(p6), this.j().c(p7), v0_2);
            return;
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final boolean a(String p10, java.util.List p11)
    {
        a.b.f.a.H.c(p10);
        this.s();
        this.b();
        c.e.a.a.h.Aa v0_2 = this.w();
        try {
            String[] v4_5 = new String[1];
            v4_5[0] = p10;
            String[] v4_0 = this.b("select count(1) from audience_filter_values where app_id=?", v4_5);
            String v2_4 = Math.max(0, Math.min(2000, this.a.c.b(p10, c.e.a.a.h.oa.L)));
        } catch (String v11_1) {
            this.o().f.a("Database error querying filters. appId", c.e.a.a.h.ya.a(p10), v11_1);
            return 0;
        }
        if (v4_0 > ((long) v2_4)) {
            String[] v4_2 = new java.util.ArrayList();
            int v5_0 = 0;
            while (v5_0 < p11.size()) {
                String v6_9 = ((Integer) p11.get(v5_0));
                if (v6_9 == null) {
                    return 0;
                } else {
                    v4_2.add(Integer.toString(v6_9.intValue()));
                    v5_0++;
                }
            }
            String v11_3 = android.text.TextUtils.join(",", v4_2);
            String v6_5 = new StringBuilder(c.a.a.a.a.a(v11_3, 2));
            v6_5.append("(");
            v6_5.append(v11_3);
            v6_5.append(")");
            String v11_5 = v6_5.toString();
            String v6_7 = new StringBuilder(c.a.a.a.a.a(v11_5, 140));
            v6_7.append("audience_id in (select audience_id from audience_filter_values where app_id=? and audience_id not in ");
            v6_7.append(v11_5);
            v6_7.append(" order by rowid desc limit -1 offset ?)");
            String v11_7 = v6_7.toString();
            String[] v4_4 = new String[2];
            v4_4[0] = p10;
            v4_4[1] = Integer.toString(v2_4);
            if (v0_2.delete("audience_filter_values", v11_7, v4_4) <= 0) {
                return 0;
            } else {
                return 1;
            }
        } else {
            return 0;
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(java.util.List p5)
    {
        a.b.f.a.H.d(p5);
        this.b();
        this.s();
        Integer v0_4 = new StringBuilder("rowid in (");
        c.e.a.a.h.Aa v1_6 = 0;
        while (v1_6 < p5.size()) {
            if (v1_6 != null) {
                v0_4.append(",");
            }
            v0_4.append(((Long) p5.get(v1_6)).longValue());
            v1_6++;
        }
        v0_4.append(")");
        Integer v0_1 = this.w().delete("raw_events", v0_4.toString(), 0);
        if (v0_1 != p5.size()) {
            this.o().f.a("Deleted fewer rows from raw events table than expected", Integer.valueOf(v0_1), Integer.valueOf(p5.size()));
        }
        return;
    }

Method c.e.a.a.h.Sa.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final boolean a(String p18, byte[] p19, String p20)
    {
        this.s();
        this.b();
        a.b.f.a.H.c(p18);
        c.e.a.a.h.Aa v0_5 = this.a(p18, p19);
        this.a(p18, v0_5);
        this.h.put(p18, v0_5);
        this.j.put(p18, p20);
        this.e.put(p18, ark>c.e.a.a.h.Saark>.a(v0_5));
        String v3_3 = this.a;
        c.e.a.a.h.Xa.a(v3_3.y);
        String v3_4 = v3_3.y;
        Object v4_5 = v0_5.h;
        a.b.f.a.H.d(v4_5);
        String v5_1 = v4_5.length;
        String[] v7_2 = 0;
        while (v7_2 < v5_1) {
            c.e.a.a.h.Hc v8_0 = v4_5[v7_2];
            int v9_1 = v8_0.f;
            int v10_9 = v9_1.length;
            String[] v11_7 = 0;
            while (v11_7 < v10_9) {
                String v12_7 = v9_1[v11_7];
                String[] v13_8 = c.e.a.a.h.Ac.a(v12_7.e, com.google.android.gms.measurement.AppMeasurement$a.a, com.google.android.gms.measurement.AppMeasurement$a.b);
                if (v13_8 != null) {
                    v12_7.e = v13_8;
                }
                String v12_8 = v12_7.f;
                String[] v13_9 = v12_8.length;
                int v14_6 = 0;
                while (v14_6 < v13_9) {
                    boolean v15_9 = v12_8[v14_6];
                    int v16_2 = v5_1;
                    int v1_7 = c.e.a.a.h.Ac.a(v15_9.g, com.google.android.gms.measurement.AppMeasurement$d.a, com.google.android.gms.measurement.AppMeasurement$d.b);
                    if (v1_7 != 0) {
                        v15_9.g = v1_7;
                    }
                    v14_6++;
                    v5_1 = v16_2;
                }
                v11_7++;
            }
            int v16_1 = v5_1;
            int v1_5 = v8_0.e;
            String v5_0 = v1_5.length;
            long v6_2 = 0;
            while (v6_2 < v5_0) {
                c.e.a.a.h.Hc v8_1 = v1_5[v6_2];
                int v9_3 = c.e.a.a.h.Ac.a(v8_1.e, com.google.android.gms.measurement.AppMeasurement$e.a, com.google.android.gms.measurement.AppMeasurement$e.b);
                if (v9_3 != 0) {
                    v8_1.e = v9_3;
                }
                v6_2++;
            }
            v7_2++;
            v5_1 = v16_1;
        }
        int v1_8 = v3_4.i();
        v1_8.s();
        v1_8.b();
        a.b.f.a.H.c(p18);
        a.b.f.a.H.d(v4_5);
        c.e.a.a.h.Hc v8_2 = v1_8.w();
        v8_2.beginTransaction();
        try {
            v1_8.s();
            v1_8.b();
            a.b.f.a.H.c(p18);
            int v9_4 = v1_8.w();
            String[] v11_9 = new String[1];
            v11_9[0] = p18;
            v9_4.delete("property_filters", "app_id=?", v11_9);
            String[] v11_10 = new String[1];
            v11_10[0] = p18;
            v9_4.delete("event_filters", "app_id=?", v11_10);
            long v6_5 = v4_5.length;
            int v9_0 = 0;
        } catch (c.e.a.a.h.Aa v0_4) {
            v8_2.endTransaction();
            throw v0_4;
        }
        while (v9_0 < v6_5) {
            String[] v11_0 = v4_5[v9_0];
            v1_8.s();
            v1_8.b();
            a.b.f.a.H.c(p18);
            a.b.f.a.H.d(v11_0);
            a.b.f.a.H.d(v11_0.f);
            a.b.f.a.H.d(v11_0.e);
            String v12_2 = v11_0.d;
            if (v12_2 != null) {
                String v12_3 = v12_2.intValue();
                String[] v13_0 = v11_0.f;
                boolean v15_0 = 0;
                while (v15_0 < v13_0.length) {
                    if (v13_0[v15_0].d != null) {
                        v15_0++;
                    } else {
                        int v10_5 = v1_8.o().h;
                        String v12_5 = "Event filter with no ID. Audience definition ignored. appId, audienceId";
                    }
                    v10_5.a(v12_5, c.e.a.a.h.ya.a(p18), v11_0.d);
                }
                int v10_0 = v11_0.e;
                int v14_1 = 0;
                while (v14_1 < v10_0.length) {
                    if (v10_0[v14_1].d != null) {
                        v14_1++;
                    } else {
                        v10_5 = v1_8.o().h;
                        v12_5 = "Property filter with no ID. Audience definition ignored. appId, audienceId";
                    }
                }
                int v10_1 = v11_0.f;
                int v14_2 = 0;
                while (v14_2 < v10_1.length) {
                    if (v1_8.a(p18, v12_3, v10_1[v14_2])) {
                        v14_2++;
                    } else {
                        int v10_2 = 0;
                    }
                    if (v10_2 != 0) {
                        String[] v11_1 = v11_0.e;
                        int v14_3 = 0;
                        while (v14_3 < v11_1.length) {
                            if (v1_8.a(p18, v12_3, v11_1[v14_3])) {
                                v14_3++;
                            } else {
                                v10_2 = 0;
                                break;
                            }
                        }
                    }
                    if (v10_2 != 0) {
                        v9_0++;
                    } else {
                        v1_8.s();
                        v1_8.b();
                        a.b.f.a.H.c(p18);
                        int v10_3 = v1_8.w();
                        String[] v13_4 = new String[2];
                        v13_4[0] = p18;
                        v13_4[1] = String.valueOf(v12_3);
                        v10_3.delete("property_filters", "app_id=? and audience_id=?", v13_4);
                        String[] v11_3 = new String[2];
                        v11_3[0] = p18;
                        v11_3[1] = String.valueOf(v12_3);
                        v10_3.delete("event_filters", "app_id=? and audience_id=?", v11_3);
                    }
                }
                v10_2 = 1;
            } else {
                v1_8.o().h.a("Audience with no ID. appId", c.e.a.a.h.ya.a(p18));
            }
        }
        String v3_7 = new java.util.ArrayList();
        String v5_4 = v4_5.length;
        long v6_1 = 0;
        while (v6_1 < v5_4) {
            v3_7.add(v4_5[v6_1].d);
            v6_1++;
        }
        v1_8.a(p18, v3_7);
        v8_2.setTransactionSuccessful();
        v8_2.endTransaction();
        try {
            v0_5.h = 0;
            int v1_11 = new byte[v0_5.c()];
            v0_5.a(c.e.a.a.h.nd.a(v1_11, v1_11.length));
        } catch (c.e.a.a.h.Aa v0_6) {
            this.o().h.a("Unable to serialize reduced-size config. Storing full config instead. appId", c.e.a.a.h.ya.a(p18), v0_6);
            v1_11 = p19;
        }
        String v3_12 = this.i();
        a.b.f.a.H.c(p18);
        v3_12.b();
        v3_12.s();
        c.e.a.a.h.Aa v0_8 = new android.content.ContentValues();
        v0_8.put("remote_config", v1_11);
        try {
            int v1_14 = v3_12.w();
            String[] v7_4 = new String[1];
            v7_4[0] = p18;
        } catch (c.e.a.a.h.Aa v0_1) {
            v3_12.o().f.a("Error storing remote config. appId", c.e.a.a.h.ya.a(p18), v0_1);
            return 1;
        }
        if (((long) v1_14.update("apps", v0_8, "app_id = ?", v7_4)) != 0) {
            return 1;
        } else {
            v3_12.o().f.a("Failed to update remote config (got 0). appId", c.e.a.a.h.ya.a(p18));
            return 1;
        }
    }

Method c.e.a.a.h.Rb.a() calling method android.database.sqlite.SQLiteDatabase.delete()

Couldn't retrieve source code

Method c.e.a.a.h._a.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(String p7, int p8, Throwable p9, byte[] p10, java.util.Map p11)
    {
        p7 = this.a;
        p7.p().b();
        p7.a();
        try {
            if (p10 == null) {
                p10 = new byte[0];
            }
        } catch (long v8_11) {
            p7.M = 0;
            p7.l();
            throw v8_11;
        }
        String v0_6 = p7.F;
        p7.F = 0;
        int v2 = 1;
        if (((p8 != 200) && (p8 != 204)) || (p9 != null)) {
            p7.o().l.a("Network upload failed. Will retry later. code, error", Integer.valueOf(p8), p9);
            p7.n().g.a(((c.e.a.a.c.d.b) p7.n).a());
            if (p8 != 503) {
                if (p8 != 429) {
                    v2 = 0;
                } else {
                }
            }
            if (v2 != 0) {
                p7.n().h.a(((c.e.a.a.c.d.b) p7.n).a());
            }
            p7.k();
        } else {
            try {
            } catch (long v8_5) {
                p7.o().f.a("Database error while trying to delete uploaded bundles", v8_5);
                p7.K = ((c.e.a.a.c.d.b) p7.n).b();
                p7.o().l.a("Disable upload, time", Long.valueOf(p7.K));
            }
            p7.n().f.a(((c.e.a.a.c.d.b) p7.n).a());
            p7.n().g.a(0);
            p7.k();
            p7.o().l.a("Successful upload. Got network response. code, size", Integer.valueOf(p8), Integer.valueOf(p10.length));
            p7.u().A();
            long v8_16 = v0_6.iterator();
            while (v8_16.hasNext()) {
                c.e.a.a.h.Aa v9_1 = ((Long) v8_16.next());
                String v10_1 = p7.u();
                String v0_0 = v9_1.longValue();
                v10_1.b();
                v10_1.s();
                c.e.a.a.h.Aa v9_2 = v10_1.w();
                String[] v5 = new String[1];
                v5[0] = String.valueOf(v0_0);
                try {
                    if (v9_2.delete("queue", "rowid=?", v5) != 1) {
                        throw new android.database.sqlite.SQLiteException("Deleted fewer rows from queue than expected");
                    } else {
                    }
                } catch (long v8_3) {
                    v10_1.o().f.a("Failed to delete a bundle in a queue table", v8_3);
                    throw v8_3;
                }
            }
            p7.u().B();
            p7.u().C();
            if ((!p7.v().w()) || (!p7.j())) {
                p7.J = -1;
                p7.k();
            } else {
                p7.e();
            }
            p7.K = 0;
        }
        p7.M = 0;
        p7.l();
        return;
    }

Method c.e.a.a.h.lb.run() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void run()
    {
        c.e.a.a.h.bb.a(this.b).f();
        c.e.a.a.h.Xa v2 = c.e.a.a.h.bb.a(this.b);
        Object v3_2 = this.a;
        v2.u().b(v3_2.a);
        String v4_2 = v2.u();
        c.e.a.a.h.Ac v5_4 = v3_2.a;
        a.b.f.a.H.c(v5_4);
        v4_2.b();
        v4_2.s();
        try {
            c.e.a.a.h.U v7_8 = v4_2.w();
            String v8_1 = new String[1];
            v8_1[0] = v5_4;
            String v9_10 = (((((((((v7_8.delete("apps", "app_id=?", v8_1) + 0) + v7_8.delete("events", "app_id=?", v8_1)) + v7_8.delete("user_attributes", "app_id=?", v8_1)) + v7_8.delete("conditional_properties", "app_id=?", v8_1)) + v7_8.delete("raw_events", "app_id=?", v8_1)) + v7_8.delete("raw_events_metadata", "app_id=?", v8_1)) + v7_8.delete("queue", "app_id=?", v8_1)) + v7_8.delete("audience_filter_values", "app_id=?", v8_1)) + v7_8.delete("main_event_params", "app_id=?", v8_1));
        } catch (c.e.a.a.h.Aa v0_8) {
            v4_2.o().f.a("Error resetting analytics data. appId, error", c.e.a.a.h.ya.a(v5_4), v0_8);
            c.e.a.a.h.U v6_1;
            c.e.a.a.h.Aa v0_11 = v2.b;
            String v8_3 = v3_2.a;
            String v9_11 = v3_2.b;
            String v4_5 = v3_2.h;
            Object v3_3 = v3_2.o;
            c.e.a.a.h.Ac v5_2 = "Unknown";
            c.e.a.a.h.U v7_11 = v0_11.getPackageManager();
            if (v7_11 != null) {
                try {
                    c.e.a.a.h.U v7_0 = v7_11.getInstallerPackageName(v8_3);
                } catch (IllegalArgumentException) {
                    v2.o().f.a("Error retrieving installer package name. appId", c.e.a.a.h.ya.a(v8_3));
                    v7_0 = "Unknown";
                }
                if (v7_0 != null) {
                    if ("com.android.vending".equals(v7_0)) {
                        v7_0 = "";
                    }
                } else {
                    v7_0 = "manual_install";
                }
                String v13 = v7_0;
                try {
                    String v10_0;
                    c.e.a.a.h.Ac v5_0;
                    c.e.a.a.h.U v6_0 = c.e.a.a.h.e.a(v0_11).a.getPackageManager().getPackageInfo(v8_3, 0);
                } catch (android.content.pm.PackageManager$NameNotFoundException) {
                    v2.o().f.a("Error retrieving newly installed package info. appId, appName", c.e.a.a.h.ya.a(v8_3), v5_2);
                    v6_1 = 0;
                }
                if (v6_0 == null) {
                    v10_0 = "Unknown";
                    v5_0 = -2147483648;
                } else {
                    c.e.a.a.h.U v7_5 = c.e.a.a.h.e.a(v0_11).a(v8_3);
                    if (!android.text.TextUtils.isEmpty(v7_5)) {
                        v5_2 = v7_5.toString();
                    }
                    v5_0 = v6_0.versionCode;
                    v10_0 = v6_0.versionName;
                }
                v6_1 = new c.e.a.a.h.U;
                v6_1(v8_3, v9_11, v10_0, ((long) v5_0), v13, 12210, v2.s().b(v0_11, v8_3), 0, v4_5, 0, "", 0, 0, 0, v3_3);
            } else {
                v2.o().f.a("PackageManager is null, can not log app install information");
            }
            v2.a(v6_1);
            return;
        }
        if (v9_10 <= null) {
        } else {
            v4_2.o().l.a("Reset analytics data. app, records", v5_4, Integer.valueOf(v9_10));
        }
    }

Method c.e.a.a.h.lb.run() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void run()
    {
        c.e.a.a.h.bb.a(this.b).f();
        c.e.a.a.h.Xa v2 = c.e.a.a.h.bb.a(this.b);
        Object v3_2 = this.a;
        v2.u().b(v3_2.a);
        String v4_2 = v2.u();
        c.e.a.a.h.Ac v5_4 = v3_2.a;
        a.b.f.a.H.c(v5_4);
        v4_2.b();
        v4_2.s();
        try {
            c.e.a.a.h.U v7_8 = v4_2.w();
            String v8_1 = new String[1];
            v8_1[0] = v5_4;
            String v9_10 = (((((((((v7_8.delete("apps", "app_id=?", v8_1) + 0) + v7_8.delete("events", "app_id=?", v8_1)) + v7_8.delete("user_attributes", "app_id=?", v8_1)) + v7_8.delete("conditional_properties", "app_id=?", v8_1)) + v7_8.delete("raw_events", "app_id=?", v8_1)) + v7_8.delete("raw_events_metadata", "app_id=?", v8_1)) + v7_8.delete("queue", "app_id=?", v8_1)) + v7_8.delete("audience_filter_values", "app_id=?", v8_1)) + v7_8.delete("main_event_params", "app_id=?", v8_1));
        } catch (c.e.a.a.h.Aa v0_8) {
            v4_2.o().f.a("Error resetting analytics data. appId, error", c.e.a.a.h.ya.a(v5_4), v0_8);
            c.e.a.a.h.U v6_1;
            c.e.a.a.h.Aa v0_11 = v2.b;
            String v8_3 = v3_2.a;
            String v9_11 = v3_2.b;
            String v4_5 = v3_2.h;
            Object v3_3 = v3_2.o;
            c.e.a.a.h.Ac v5_2 = "Unknown";
            c.e.a.a.h.U v7_11 = v0_11.getPackageManager();
            if (v7_11 != null) {
                try {
                    c.e.a.a.h.U v7_0 = v7_11.getInstallerPackageName(v8_3);
                } catch (IllegalArgumentException) {
                    v2.o().f.a("Error retrieving installer package name. appId", c.e.a.a.h.ya.a(v8_3));
                    v7_0 = "Unknown";
                }
                if (v7_0 != null) {
                    if ("com.android.vending".equals(v7_0)) {
                        v7_0 = "";
                    }
                } else {
                    v7_0 = "manual_install";
                }
                String v13 = v7_0;
                try {
                    c.e.a.a.h.Ac v5_0;
                    String v10_0;
                    c.e.a.a.h.U v6_0 = c.e.a.a.h.e.a(v0_11).a.getPackageManager().getPackageInfo(v8_3, 0);
                } catch (android.content.pm.PackageManager$NameNotFoundException) {
                    v2.o().f.a("Error retrieving newly installed package info. appId, appName", c.e.a.a.h.ya.a(v8_3), v5_2);
                    v6_1 = 0;
                }
                if (v6_0 == null) {
                    v10_0 = "Unknown";
                    v5_0 = -2147483648;
                } else {
                    c.e.a.a.h.U v7_5 = c.e.a.a.h.e.a(v0_11).a(v8_3);
                    if (!android.text.TextUtils.isEmpty(v7_5)) {
                        v5_2 = v7_5.toString();
                    }
                    v5_0 = v6_0.versionCode;
                    v10_0 = v6_0.versionName;
                }
                v6_1 = new c.e.a.a.h.U;
                v6_1(v8_3, v9_11, v10_0, ((long) v5_0), v13, 12210, v2.s().b(v0_11, v8_3), 0, v4_5, 0, "", 0, 0, 0, v3_3);
            } else {
                v2.o().f.a("PackageManager is null, can not log app install information");
            }
            v2.a(v6_1);
            return;
        }
        if (v9_10 <= null) {
        } else {
            v4_2.o().l.a("Reset analytics data. app, records", v5_4, Integer.valueOf(v9_10));
        }
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(c.e.a.a.h.U p21)
    {
        this.p().b();
        this.a();
        a.b.f.a.H.d(p21);
        a.b.f.a.H.c(p21.a);
        if (!android.text.TextUtils.isEmpty(p21.b)) {
            android.os.Bundle v7_4 = this.u().b(p21.a);
            if ((v7_4 != null) && ((android.text.TextUtils.isEmpty(v7_4.e())) && (!android.text.TextUtils.isEmpty(p21.b)))) {
                v7_4.g(0);
                this.u().a(v7_4);
                android.os.Bundle v7_9 = this.q();
                long v10_5 = p21.a;
                v7_9.b();
                v7_9.h.remove(v10_5);
            }
            if (p21.h) {
                long v10_6 = p21.m;
                if (v10_6 == 0) {
                    v10_6 = ((c.e.a.a.c.d.b) this.n).a();
                }
                android.os.Bundle v7_15 = p21.n;
                if ((v7_15 != null) && (v7_15 != 1)) {
                    this.o().h.a("Incorrect app type, assuming installed app. appId, appType", c.e.a.a.h.ya.a(p21.a), Integer.valueOf(v7_15));
                    v7_15 = 0;
                }
                this.u().A();
                try {
                    int v8_1 = this.u().b(p21.a);
                } catch (String v0_34) {
                    this.u().C();
                    throw v0_34;
                }
                if ((v8_1 != 0) && ((v8_1.e() != null) && (!v8_1.e().equals(p21.b)))) {
                    this.o().h.a("New GMP App Id passed in. Removing cached database data. appId", c.e.a.a.h.ya.a(v8_1.c()));
                    long v9_10 = this.u();
                    int v8_12 = v8_1.c();
                    v9_10.s();
                    v9_10.b();
                    a.b.f.a.H.c(v8_12);
                    try {
                        int v12_0 = v9_10.w();
                        String v13_0 = new String[1];
                        v13_0[0] = v8_12;
                        long v14_10 = (((((((((v12_0.delete("events", "app_id=?", v13_0) + 0) + v12_0.delete("user_attributes", "app_id=?", v13_0)) + v12_0.delete("conditional_properties", "app_id=?", v13_0)) + v12_0.delete("apps", "app_id=?", v13_0)) + v12_0.delete("raw_events", "app_id=?", v13_0)) + v12_0.delete("raw_events_metadata", "app_id=?", v13_0)) + v12_0.delete("event_filters", "app_id=?", v13_0)) + v12_0.delete("property_filters", "app_id=?", v13_0)) + v12_0.delete("audience_filter_values", "app_id=?", v13_0));
                    } catch (String v0_1) {
                        v9_10.o().f.a("Error deleting application data. appId, error", c.e.a.a.h.ya.a(v8_12), v0_1);
                        v8_1 = 0;
                    }
                    if (v14_10 <= 0) {
                    } else {
                        v9_10.o().l.a("Deleted application data. app, records", v8_12, Integer.valueOf(v14_10));
                    }
                }
                long v9_3;
                if (v8_1 == 0) {
                    v9_3 = 1;
                } else {
                    String v0_5;
                    if (v8_1.j() == -2147483648) {
                        v9_3 = 1;
                        if ((v8_1.i() == null) || (v8_1.i().equals(p21.c))) {
                            String v0_6;
                            String v0_7;
                            int v8_6;
                            int v12_12;
                            this.b(p21);
                            if (v7_15 != null) {
                                if (v7_15 != v9_3) {
                                    v0_6 = 0;
                                } else {
                                    v0_7 = this.u();
                                    v8_6 = p21.a;
                                    v12_12 = "_v";
                                    v0_6 = v0_7.a(v8_6, v12_12);
                                }
                            } else {
                                v0_7 = this.u();
                                v8_6 = p21.a;
                                v12_12 = "_f";
                            }
                            long v3_1;
                            if (v0_6 != null) {
                                if (p21.i) {
                                    v3_1 = new c.e.a.a.h.ma;
                                    v3_1("_cd", new c.e.a.a.h.ja(new android.os.Bundle()), "auto", v10_6);
                                    this.a(v3_1, p21);
                                }
                            } else {
                                String v0_12;
                                long v18_1 = v10_6;
                                long v14_21 = (((v10_6 / 3600000) + 1) * 3600000);
                                if (v7_15 != null) {
                                    if (v7_15 == 1) {
                                        long v3_3 = new c.e.a.a.h.xc;
                                        v3_3("_fvt", v18_1, Long.valueOf(v14_21), "auto");
                                        this.a(v3_3, p21);
                                        this.p().b();
                                        this.a();
                                        long v3_6 = new android.os.Bundle();
                                        v3_6.putLong("_c", 1);
                                        v3_6.putLong("_r", 1);
                                        v0_12 = new c.e.a.a.h.ma;
                                        v0_12("_v", new c.e.a.a.h.ja(v3_6), "auto", v18_1);
                                        this.a(v0_12, p21);
                                    }
                                } else {
                                    android.os.Bundle v7_5 = new c.e.a.a.h.xc;
                                    v7_5("_fot", v18_1, Long.valueOf(v14_21), "auto");
                                    this.a(v7_5, p21);
                                    this.p().b();
                                    this.a();
                                    android.os.Bundle v7_8 = new android.os.Bundle();
                                    v7_8.putLong("_c", 1);
                                    v7_8.putLong("_r", 1);
                                    v7_8.putLong("_uwa", 0);
                                    v7_8.putLong("_pfo", 0);
                                    v7_8.putLong("_sys", 0);
                                    v7_8.putLong("_sysu", 0);
                                    if (this.b.getPackageManager() != null) {
                                        try {
                                            try {
                                                String v0_18 = c.e.a.a.h.e.a(this.b).b(p21.a, 0);
                                            } catch (String v0_17) {
                                                this.o().f.a("Package info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_17);
                                                v0_18 = 0;
                                            }
                                            int v11_6;
                                            if (v0_18 == null) {
                                                v11_6 = 0;
                                            } else {
                                                int v11_5 = v0_18.firstInstallTime;
                                                if (v11_5 == 0) {
                                                } else {
                                                    String v0_20;
                                                    if (v11_5 == v0_18.lastUpdateTime) {
                                                        v0_20 = 1;
                                                    } else {
                                                        v7_8.putLong("_uwa", 1);
                                                        v0_20 = 0;
                                                    }
                                                    int v11_7;
                                                    int v6_0 = new c.e.a.a.h.xc;
                                                    if (v0_20 == null) {
                                                        v11_7 = 0;
                                                    } else {
                                                        v11_7 = 1;
                                                    }
                                                    v11_6 = 0;
                                                    v6_0("_fi", v18_1, Long.valueOf(v11_7), "auto");
                                                    this.a(v6_0, p21);
                                                }
                                            }
                                            try {
                                                String v0_24 = c.e.a.a.h.e.a(this.b).a(p21.a, v11_6);
                                            } catch (String v0_25) {
                                                this.o().f.a("Application info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_25);
                                                v0_24 = 0;
                                            }
                                            if (v0_24 != null) {
                                                if ((v0_24.flags & 1) != 0) {
                                                    v7_8.putLong("_sys", 1);
                                                }
                                                if ((v0_24.flags & 128) != 0) {
                                                    v7_8.putLong("_sysu", 1);
                                                }
                                            }
                                        } catch (String v0_17) {
                                        }
                                    } else {
                                        this.o().f.a("PackageManager is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a));
                                    }
                                    String v0_30 = this.u();
                                    long v3_8 = p21.a;
                                    a.b.f.a.H.c(v3_8);
                                    v0_30.b();
                                    v0_30.s();
                                    long v3_9 = v0_30.f(v3_8, "first_open_count");
                                    if (v3_9 >= 0) {
                                        v7_8.putLong("_pfo", v3_9);
                                    }
                                    v0_12 = new c.e.a.a.h.ma;
                                    v0_12("_f", new c.e.a.a.h.ja(v7_8), "auto", v18_1);
                                }
                                String v0_33 = new android.os.Bundle();
                                v0_33.putLong("_et", 1);
                                v3_1 = new c.e.a.a.h.ma;
                                v3_1("_e", new c.e.a.a.h.ja(v0_33), "auto", v18_1);
                            }
                            this.u().B();
                            this.u().C();
                            return;
                        } else {
                            int v12_8 = new android.os.Bundle();
                            v12_8.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v0_5("_au", new c.e.a.a.h.ja(v12_8), "auto", v10_6);
                        }
                    } else {
                        if (v8_1.j() == p21.j) {
                        } else {
                            long v9_6 = new android.os.Bundle();
                            v9_6.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v9_3 = 1;
                            v0_5("_au", new c.e.a.a.h.ja(v9_6), "auto", v10_6);
                        }
                    }
                    this.a(v0_5, p21);
                }
            } else {
                this.b(p21);
                return;
            }
        } else {
            return;
        }
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(c.e.a.a.h.U p21)
    {
        this.p().b();
        this.a();
        a.b.f.a.H.d(p21);
        a.b.f.a.H.c(p21.a);
        if (!android.text.TextUtils.isEmpty(p21.b)) {
            android.os.Bundle v7_4 = this.u().b(p21.a);
            if ((v7_4 != null) && ((android.text.TextUtils.isEmpty(v7_4.e())) && (!android.text.TextUtils.isEmpty(p21.b)))) {
                v7_4.g(0);
                this.u().a(v7_4);
                android.os.Bundle v7_9 = this.q();
                long v10_5 = p21.a;
                v7_9.b();
                v7_9.h.remove(v10_5);
            }
            if (p21.h) {
                long v10_6 = p21.m;
                if (v10_6 == 0) {
                    v10_6 = ((c.e.a.a.c.d.b) this.n).a();
                }
                android.os.Bundle v7_15 = p21.n;
                if ((v7_15 != null) && (v7_15 != 1)) {
                    this.o().h.a("Incorrect app type, assuming installed app. appId, appType", c.e.a.a.h.ya.a(p21.a), Integer.valueOf(v7_15));
                    v7_15 = 0;
                }
                this.u().A();
                try {
                    int v8_1 = this.u().b(p21.a);
                } catch (String v0_34) {
                    this.u().C();
                    throw v0_34;
                }
                if ((v8_1 != 0) && ((v8_1.e() != null) && (!v8_1.e().equals(p21.b)))) {
                    this.o().h.a("New GMP App Id passed in. Removing cached database data. appId", c.e.a.a.h.ya.a(v8_1.c()));
                    long v9_10 = this.u();
                    int v8_12 = v8_1.c();
                    v9_10.s();
                    v9_10.b();
                    a.b.f.a.H.c(v8_12);
                    try {
                        int v12_0 = v9_10.w();
                        String v13_0 = new String[1];
                        v13_0[0] = v8_12;
                        long v14_10 = (((((((((v12_0.delete("events", "app_id=?", v13_0) + 0) + v12_0.delete("user_attributes", "app_id=?", v13_0)) + v12_0.delete("conditional_properties", "app_id=?", v13_0)) + v12_0.delete("apps", "app_id=?", v13_0)) + v12_0.delete("raw_events", "app_id=?", v13_0)) + v12_0.delete("raw_events_metadata", "app_id=?", v13_0)) + v12_0.delete("event_filters", "app_id=?", v13_0)) + v12_0.delete("property_filters", "app_id=?", v13_0)) + v12_0.delete("audience_filter_values", "app_id=?", v13_0));
                    } catch (String v0_1) {
                        v9_10.o().f.a("Error deleting application data. appId, error", c.e.a.a.h.ya.a(v8_12), v0_1);
                        v8_1 = 0;
                    }
                    if (v14_10 <= 0) {
                    } else {
                        v9_10.o().l.a("Deleted application data. app, records", v8_12, Integer.valueOf(v14_10));
                    }
                }
                long v9_3;
                if (v8_1 == 0) {
                    v9_3 = 1;
                } else {
                    String v0_5;
                    if (v8_1.j() == -2147483648) {
                        v9_3 = 1;
                        if ((v8_1.i() == null) || (v8_1.i().equals(p21.c))) {
                            String v0_6;
                            int v12_12;
                            int v8_6;
                            String v0_7;
                            this.b(p21);
                            if (v7_15 != null) {
                                if (v7_15 != v9_3) {
                                    v0_6 = 0;
                                } else {
                                    v0_7 = this.u();
                                    v8_6 = p21.a;
                                    v12_12 = "_v";
                                    v0_6 = v0_7.a(v8_6, v12_12);
                                }
                            } else {
                                v0_7 = this.u();
                                v8_6 = p21.a;
                                v12_12 = "_f";
                            }
                            long v3_1;
                            if (v0_6 != null) {
                                if (p21.i) {
                                    v3_1 = new c.e.a.a.h.ma;
                                    v3_1("_cd", new c.e.a.a.h.ja(new android.os.Bundle()), "auto", v10_6);
                                    this.a(v3_1, p21);
                                }
                            } else {
                                String v0_12;
                                long v18_1 = v10_6;
                                long v14_21 = (((v10_6 / 3600000) + 1) * 3600000);
                                if (v7_15 != null) {
                                    if (v7_15 == 1) {
                                        long v3_3 = new c.e.a.a.h.xc;
                                        v3_3("_fvt", v18_1, Long.valueOf(v14_21), "auto");
                                        this.a(v3_3, p21);
                                        this.p().b();
                                        this.a();
                                        long v3_6 = new android.os.Bundle();
                                        v3_6.putLong("_c", 1);
                                        v3_6.putLong("_r", 1);
                                        v0_12 = new c.e.a.a.h.ma;
                                        v0_12("_v", new c.e.a.a.h.ja(v3_6), "auto", v18_1);
                                        this.a(v0_12, p21);
                                    }
                                } else {
                                    android.os.Bundle v7_5 = new c.e.a.a.h.xc;
                                    v7_5("_fot", v18_1, Long.valueOf(v14_21), "auto");
                                    this.a(v7_5, p21);
                                    this.p().b();
                                    this.a();
                                    android.os.Bundle v7_8 = new android.os.Bundle();
                                    v7_8.putLong("_c", 1);
                                    v7_8.putLong("_r", 1);
                                    v7_8.putLong("_uwa", 0);
                                    v7_8.putLong("_pfo", 0);
                                    v7_8.putLong("_sys", 0);
                                    v7_8.putLong("_sysu", 0);
                                    if (this.b.getPackageManager() != null) {
                                        try {
                                            try {
                                                String v0_18 = c.e.a.a.h.e.a(this.b).b(p21.a, 0);
                                            } catch (String v0_17) {
                                                this.o().f.a("Package info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_17);
                                                v0_18 = 0;
                                            }
                                            int v11_6;
                                            if (v0_18 == null) {
                                                v11_6 = 0;
                                            } else {
                                                int v11_5 = v0_18.firstInstallTime;
                                                if (v11_5 == 0) {
                                                } else {
                                                    String v0_20;
                                                    if (v11_5 == v0_18.lastUpdateTime) {
                                                        v0_20 = 1;
                                                    } else {
                                                        v7_8.putLong("_uwa", 1);
                                                        v0_20 = 0;
                                                    }
                                                    int v11_7;
                                                    int v6_0 = new c.e.a.a.h.xc;
                                                    if (v0_20 == null) {
                                                        v11_7 = 0;
                                                    } else {
                                                        v11_7 = 1;
                                                    }
                                                    v11_6 = 0;
                                                    v6_0("_fi", v18_1, Long.valueOf(v11_7), "auto");
                                                    this.a(v6_0, p21);
                                                }
                                            }
                                            try {
                                                String v0_24 = c.e.a.a.h.e.a(this.b).a(p21.a, v11_6);
                                            } catch (String v0_25) {
                                                this.o().f.a("Application info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_25);
                                                v0_24 = 0;
                                            }
                                            if (v0_24 != null) {
                                                if ((v0_24.flags & 1) != 0) {
                                                    v7_8.putLong("_sys", 1);
                                                }
                                                if ((v0_24.flags & 128) != 0) {
                                                    v7_8.putLong("_sysu", 1);
                                                }
                                            }
                                        } catch (String v0_17) {
                                        }
                                    } else {
                                        this.o().f.a("PackageManager is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a));
                                    }
                                    String v0_30 = this.u();
                                    long v3_8 = p21.a;
                                    a.b.f.a.H.c(v3_8);
                                    v0_30.b();
                                    v0_30.s();
                                    long v3_9 = v0_30.f(v3_8, "first_open_count");
                                    if (v3_9 >= 0) {
                                        v7_8.putLong("_pfo", v3_9);
                                    }
                                    v0_12 = new c.e.a.a.h.ma;
                                    v0_12("_f", new c.e.a.a.h.ja(v7_8), "auto", v18_1);
                                }
                                String v0_33 = new android.os.Bundle();
                                v0_33.putLong("_et", 1);
                                v3_1 = new c.e.a.a.h.ma;
                                v3_1("_e", new c.e.a.a.h.ja(v0_33), "auto", v18_1);
                            }
                            this.u().B();
                            this.u().C();
                            return;
                        } else {
                            int v12_8 = new android.os.Bundle();
                            v12_8.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v0_5("_au", new c.e.a.a.h.ja(v12_8), "auto", v10_6);
                        }
                    } else {
                        if (v8_1.j() == p21.j) {
                        } else {
                            long v9_6 = new android.os.Bundle();
                            v9_6.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v9_3 = 1;
                            v0_5("_au", new c.e.a.a.h.ja(v9_6), "auto", v10_6);
                        }
                    }
                    this.a(v0_5, p21);
                }
            } else {
                this.b(p21);
                return;
            }
        } else {
            return;
        }
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(c.e.a.a.h.U p21)
    {
        this.p().b();
        this.a();
        a.b.f.a.H.d(p21);
        a.b.f.a.H.c(p21.a);
        if (!android.text.TextUtils.isEmpty(p21.b)) {
            android.os.Bundle v7_4 = this.u().b(p21.a);
            if ((v7_4 != null) && ((android.text.TextUtils.isEmpty(v7_4.e())) && (!android.text.TextUtils.isEmpty(p21.b)))) {
                v7_4.g(0);
                this.u().a(v7_4);
                android.os.Bundle v7_9 = this.q();
                long v10_5 = p21.a;
                v7_9.b();
                v7_9.h.remove(v10_5);
            }
            if (p21.h) {
                long v10_6 = p21.m;
                if (v10_6 == 0) {
                    v10_6 = ((c.e.a.a.c.d.b) this.n).a();
                }
                android.os.Bundle v7_15 = p21.n;
                if ((v7_15 != null) && (v7_15 != 1)) {
                    this.o().h.a("Incorrect app type, assuming installed app. appId, appType", c.e.a.a.h.ya.a(p21.a), Integer.valueOf(v7_15));
                    v7_15 = 0;
                }
                this.u().A();
                try {
                    int v8_1 = this.u().b(p21.a);
                } catch (String v0_34) {
                    this.u().C();
                    throw v0_34;
                }
                if ((v8_1 != 0) && ((v8_1.e() != null) && (!v8_1.e().equals(p21.b)))) {
                    this.o().h.a("New GMP App Id passed in. Removing cached database data. appId", c.e.a.a.h.ya.a(v8_1.c()));
                    long v9_10 = this.u();
                    int v8_12 = v8_1.c();
                    v9_10.s();
                    v9_10.b();
                    a.b.f.a.H.c(v8_12);
                    try {
                        int v12_0 = v9_10.w();
                        String v13_0 = new String[1];
                        v13_0[0] = v8_12;
                        long v14_10 = (((((((((v12_0.delete("events", "app_id=?", v13_0) + 0) + v12_0.delete("user_attributes", "app_id=?", v13_0)) + v12_0.delete("conditional_properties", "app_id=?", v13_0)) + v12_0.delete("apps", "app_id=?", v13_0)) + v12_0.delete("raw_events", "app_id=?", v13_0)) + v12_0.delete("raw_events_metadata", "app_id=?", v13_0)) + v12_0.delete("event_filters", "app_id=?", v13_0)) + v12_0.delete("property_filters", "app_id=?", v13_0)) + v12_0.delete("audience_filter_values", "app_id=?", v13_0));
                    } catch (String v0_1) {
                        v9_10.o().f.a("Error deleting application data. appId, error", c.e.a.a.h.ya.a(v8_12), v0_1);
                        v8_1 = 0;
                    }
                    if (v14_10 <= 0) {
                    } else {
                        v9_10.o().l.a("Deleted application data. app, records", v8_12, Integer.valueOf(v14_10));
                    }
                }
                long v9_3;
                if (v8_1 == 0) {
                    v9_3 = 1;
                } else {
                    String v0_5;
                    if (v8_1.j() == -2147483648) {
                        v9_3 = 1;
                        if ((v8_1.i() == null) || (v8_1.i().equals(p21.c))) {
                            String v0_7;
                            String v0_6;
                            int v8_6;
                            int v12_12;
                            this.b(p21);
                            if (v7_15 != null) {
                                if (v7_15 != v9_3) {
                                    v0_6 = 0;
                                } else {
                                    v0_7 = this.u();
                                    v8_6 = p21.a;
                                    v12_12 = "_v";
                                    v0_6 = v0_7.a(v8_6, v12_12);
                                }
                            } else {
                                v0_7 = this.u();
                                v8_6 = p21.a;
                                v12_12 = "_f";
                            }
                            long v3_1;
                            if (v0_6 != null) {
                                if (p21.i) {
                                    v3_1 = new c.e.a.a.h.ma;
                                    v3_1("_cd", new c.e.a.a.h.ja(new android.os.Bundle()), "auto", v10_6);
                                    this.a(v3_1, p21);
                                }
                            } else {
                                String v0_12;
                                long v18_1 = v10_6;
                                long v14_21 = (((v10_6 / 3600000) + 1) * 3600000);
                                if (v7_15 != null) {
                                    if (v7_15 == 1) {
                                        long v3_3 = new c.e.a.a.h.xc;
                                        v3_3("_fvt", v18_1, Long.valueOf(v14_21), "auto");
                                        this.a(v3_3, p21);
                                        this.p().b();
                                        this.a();
                                        long v3_6 = new android.os.Bundle();
                                        v3_6.putLong("_c", 1);
                                        v3_6.putLong("_r", 1);
                                        v0_12 = new c.e.a.a.h.ma;
                                        v0_12("_v", new c.e.a.a.h.ja(v3_6), "auto", v18_1);
                                        this.a(v0_12, p21);
                                    }
                                } else {
                                    android.os.Bundle v7_5 = new c.e.a.a.h.xc;
                                    v7_5("_fot", v18_1, Long.valueOf(v14_21), "auto");
                                    this.a(v7_5, p21);
                                    this.p().b();
                                    this.a();
                                    android.os.Bundle v7_8 = new android.os.Bundle();
                                    v7_8.putLong("_c", 1);
                                    v7_8.putLong("_r", 1);
                                    v7_8.putLong("_uwa", 0);
                                    v7_8.putLong("_pfo", 0);
                                    v7_8.putLong("_sys", 0);
                                    v7_8.putLong("_sysu", 0);
                                    if (this.b.getPackageManager() != null) {
                                        try {
                                            try {
                                                String v0_18 = c.e.a.a.h.e.a(this.b).b(p21.a, 0);
                                            } catch (String v0_17) {
                                                this.o().f.a("Package info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_17);
                                                v0_18 = 0;
                                            }
                                            int v11_6;
                                            if (v0_18 == null) {
                                                v11_6 = 0;
                                            } else {
                                                int v11_5 = v0_18.firstInstallTime;
                                                if (v11_5 == 0) {
                                                } else {
                                                    String v0_20;
                                                    if (v11_5 == v0_18.lastUpdateTime) {
                                                        v0_20 = 1;
                                                    } else {
                                                        v7_8.putLong("_uwa", 1);
                                                        v0_20 = 0;
                                                    }
                                                    int v11_7;
                                                    int v6_0 = new c.e.a.a.h.xc;
                                                    if (v0_20 == null) {
                                                        v11_7 = 0;
                                                    } else {
                                                        v11_7 = 1;
                                                    }
                                                    v11_6 = 0;
                                                    v6_0("_fi", v18_1, Long.valueOf(v11_7), "auto");
                                                    this.a(v6_0, p21);
                                                }
                                            }
                                            try {
                                                String v0_24 = c.e.a.a.h.e.a(this.b).a(p21.a, v11_6);
                                            } catch (String v0_25) {
                                                this.o().f.a("Application info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_25);
                                                v0_24 = 0;
                                            }
                                            if (v0_24 != null) {
                                                if ((v0_24.flags & 1) != 0) {
                                                    v7_8.putLong("_sys", 1);
                                                }
                                                if ((v0_24.flags & 128) != 0) {
                                                    v7_8.putLong("_sysu", 1);
                                                }
                                            }
                                        } catch (String v0_17) {
                                        }
                                    } else {
                                        this.o().f.a("PackageManager is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a));
                                    }
                                    String v0_30 = this.u();
                                    long v3_8 = p21.a;
                                    a.b.f.a.H.c(v3_8);
                                    v0_30.b();
                                    v0_30.s();
                                    long v3_9 = v0_30.f(v3_8, "first_open_count");
                                    if (v3_9 >= 0) {
                                        v7_8.putLong("_pfo", v3_9);
                                    }
                                    v0_12 = new c.e.a.a.h.ma;
                                    v0_12("_f", new c.e.a.a.h.ja(v7_8), "auto", v18_1);
                                }
                                String v0_33 = new android.os.Bundle();
                                v0_33.putLong("_et", 1);
                                v3_1 = new c.e.a.a.h.ma;
                                v3_1("_e", new c.e.a.a.h.ja(v0_33), "auto", v18_1);
                            }
                            this.u().B();
                            this.u().C();
                            return;
                        } else {
                            int v12_8 = new android.os.Bundle();
                            v12_8.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v0_5("_au", new c.e.a.a.h.ja(v12_8), "auto", v10_6);
                        }
                    } else {
                        if (v8_1.j() == p21.j) {
                        } else {
                            long v9_6 = new android.os.Bundle();
                            v9_6.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v9_3 = 1;
                            v0_5("_au", new c.e.a.a.h.ja(v9_6), "auto", v10_6);
                        }
                    }
                    this.a(v0_5, p21);
                }
            } else {
                this.b(p21);
                return;
            }
        } else {
            return;
        }
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(c.e.a.a.h.U p21)
    {
        this.p().b();
        this.a();
        a.b.f.a.H.d(p21);
        a.b.f.a.H.c(p21.a);
        if (!android.text.TextUtils.isEmpty(p21.b)) {
            android.os.Bundle v7_4 = this.u().b(p21.a);
            if ((v7_4 != null) && ((android.text.TextUtils.isEmpty(v7_4.e())) && (!android.text.TextUtils.isEmpty(p21.b)))) {
                v7_4.g(0);
                this.u().a(v7_4);
                android.os.Bundle v7_9 = this.q();
                long v10_5 = p21.a;
                v7_9.b();
                v7_9.h.remove(v10_5);
            }
            if (p21.h) {
                long v10_6 = p21.m;
                if (v10_6 == 0) {
                    v10_6 = ((c.e.a.a.c.d.b) this.n).a();
                }
                android.os.Bundle v7_15 = p21.n;
                if ((v7_15 != null) && (v7_15 != 1)) {
                    this.o().h.a("Incorrect app type, assuming installed app. appId, appType", c.e.a.a.h.ya.a(p21.a), Integer.valueOf(v7_15));
                    v7_15 = 0;
                }
                this.u().A();
                try {
                    int v8_1 = this.u().b(p21.a);
                } catch (String v0_34) {
                    this.u().C();
                    throw v0_34;
                }
                if ((v8_1 != 0) && ((v8_1.e() != null) && (!v8_1.e().equals(p21.b)))) {
                    this.o().h.a("New GMP App Id passed in. Removing cached database data. appId", c.e.a.a.h.ya.a(v8_1.c()));
                    long v9_10 = this.u();
                    int v8_12 = v8_1.c();
                    v9_10.s();
                    v9_10.b();
                    a.b.f.a.H.c(v8_12);
                    try {
                        int v12_0 = v9_10.w();
                        String v13_0 = new String[1];
                        v13_0[0] = v8_12;
                        long v14_10 = (((((((((v12_0.delete("events", "app_id=?", v13_0) + 0) + v12_0.delete("user_attributes", "app_id=?", v13_0)) + v12_0.delete("conditional_properties", "app_id=?", v13_0)) + v12_0.delete("apps", "app_id=?", v13_0)) + v12_0.delete("raw_events", "app_id=?", v13_0)) + v12_0.delete("raw_events_metadata", "app_id=?", v13_0)) + v12_0.delete("event_filters", "app_id=?", v13_0)) + v12_0.delete("property_filters", "app_id=?", v13_0)) + v12_0.delete("audience_filter_values", "app_id=?", v13_0));
                    } catch (String v0_1) {
                        v9_10.o().f.a("Error deleting application data. appId, error", c.e.a.a.h.ya.a(v8_12), v0_1);
                        v8_1 = 0;
                    }
                    if (v14_10 <= 0) {
                    } else {
                        v9_10.o().l.a("Deleted application data. app, records", v8_12, Integer.valueOf(v14_10));
                    }
                }
                long v9_3;
                if (v8_1 == 0) {
                    v9_3 = 1;
                } else {
                    String v0_5;
                    if (v8_1.j() == -2147483648) {
                        v9_3 = 1;
                        if ((v8_1.i() == null) || (v8_1.i().equals(p21.c))) {
                            int v8_6;
                            int v12_12;
                            String v0_7;
                            String v0_6;
                            this.b(p21);
                            if (v7_15 != null) {
                                if (v7_15 != v9_3) {
                                    v0_6 = 0;
                                } else {
                                    v0_7 = this.u();
                                    v8_6 = p21.a;
                                    v12_12 = "_v";
                                    v0_6 = v0_7.a(v8_6, v12_12);
                                }
                            } else {
                                v0_7 = this.u();
                                v8_6 = p21.a;
                                v12_12 = "_f";
                            }
                            long v3_1;
                            if (v0_6 != null) {
                                if (p21.i) {
                                    v3_1 = new c.e.a.a.h.ma;
                                    v3_1("_cd", new c.e.a.a.h.ja(new android.os.Bundle()), "auto", v10_6);
                                    this.a(v3_1, p21);
                                }
                            } else {
                                String v0_12;
                                long v18_1 = v10_6;
                                long v14_21 = (((v10_6 / 3600000) + 1) * 3600000);
                                if (v7_15 != null) {
                                    if (v7_15 == 1) {
                                        long v3_3 = new c.e.a.a.h.xc;
                                        v3_3("_fvt", v18_1, Long.valueOf(v14_21), "auto");
                                        this.a(v3_3, p21);
                                        this.p().b();
                                        this.a();
                                        long v3_6 = new android.os.Bundle();
                                        v3_6.putLong("_c", 1);
                                        v3_6.putLong("_r", 1);
                                        v0_12 = new c.e.a.a.h.ma;
                                        v0_12("_v", new c.e.a.a.h.ja(v3_6), "auto", v18_1);
                                        this.a(v0_12, p21);
                                    }
                                } else {
                                    android.os.Bundle v7_5 = new c.e.a.a.h.xc;
                                    v7_5("_fot", v18_1, Long.valueOf(v14_21), "auto");
                                    this.a(v7_5, p21);
                                    this.p().b();
                                    this.a();
                                    android.os.Bundle v7_8 = new android.os.Bundle();
                                    v7_8.putLong("_c", 1);
                                    v7_8.putLong("_r", 1);
                                    v7_8.putLong("_uwa", 0);
                                    v7_8.putLong("_pfo", 0);
                                    v7_8.putLong("_sys", 0);
                                    v7_8.putLong("_sysu", 0);
                                    if (this.b.getPackageManager() != null) {
                                        try {
                                            try {
                                                String v0_18 = c.e.a.a.h.e.a(this.b).b(p21.a, 0);
                                            } catch (String v0_17) {
                                                this.o().f.a("Package info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_17);
                                                v0_18 = 0;
                                            }
                                            int v11_6;
                                            if (v0_18 == null) {
                                                v11_6 = 0;
                                            } else {
                                                int v11_5 = v0_18.firstInstallTime;
                                                if (v11_5 == 0) {
                                                } else {
                                                    String v0_20;
                                                    if (v11_5 == v0_18.lastUpdateTime) {
                                                        v0_20 = 1;
                                                    } else {
                                                        v7_8.putLong("_uwa", 1);
                                                        v0_20 = 0;
                                                    }
                                                    int v11_7;
                                                    int v6_0 = new c.e.a.a.h.xc;
                                                    if (v0_20 == null) {
                                                        v11_7 = 0;
                                                    } else {
                                                        v11_7 = 1;
                                                    }
                                                    v11_6 = 0;
                                                    v6_0("_fi", v18_1, Long.valueOf(v11_7), "auto");
                                                    this.a(v6_0, p21);
                                                }
                                            }
                                            try {
                                                String v0_24 = c.e.a.a.h.e.a(this.b).a(p21.a, v11_6);
                                            } catch (String v0_25) {
                                                this.o().f.a("Application info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_25);
                                                v0_24 = 0;
                                            }
                                            if (v0_24 != null) {
                                                if ((v0_24.flags & 1) != 0) {
                                                    v7_8.putLong("_sys", 1);
                                                }
                                                if ((v0_24.flags & 128) != 0) {
                                                    v7_8.putLong("_sysu", 1);
                                                }
                                            }
                                        } catch (String v0_17) {
                                        }
                                    } else {
                                        this.o().f.a("PackageManager is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a));
                                    }
                                    String v0_30 = this.u();
                                    long v3_8 = p21.a;
                                    a.b.f.a.H.c(v3_8);
                                    v0_30.b();
                                    v0_30.s();
                                    long v3_9 = v0_30.f(v3_8, "first_open_count");
                                    if (v3_9 >= 0) {
                                        v7_8.putLong("_pfo", v3_9);
                                    }
                                    v0_12 = new c.e.a.a.h.ma;
                                    v0_12("_f", new c.e.a.a.h.ja(v7_8), "auto", v18_1);
                                }
                                String v0_33 = new android.os.Bundle();
                                v0_33.putLong("_et", 1);
                                v3_1 = new c.e.a.a.h.ma;
                                v3_1("_e", new c.e.a.a.h.ja(v0_33), "auto", v18_1);
                            }
                            this.u().B();
                            this.u().C();
                            return;
                        } else {
                            int v12_8 = new android.os.Bundle();
                            v12_8.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v0_5("_au", new c.e.a.a.h.ja(v12_8), "auto", v10_6);
                        }
                    } else {
                        if (v8_1.j() == p21.j) {
                        } else {
                            long v9_6 = new android.os.Bundle();
                            v9_6.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v9_3 = 1;
                            v0_5("_au", new c.e.a.a.h.ja(v9_6), "auto", v10_6);
                        }
                    }
                    this.a(v0_5, p21);
                }
            } else {
                this.b(p21);
                return;
            }
        } else {
            return;
        }
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(c.e.a.a.h.U p21)
    {
        this.p().b();
        this.a();
        a.b.f.a.H.d(p21);
        a.b.f.a.H.c(p21.a);
        if (!android.text.TextUtils.isEmpty(p21.b)) {
            android.os.Bundle v7_4 = this.u().b(p21.a);
            if ((v7_4 != null) && ((android.text.TextUtils.isEmpty(v7_4.e())) && (!android.text.TextUtils.isEmpty(p21.b)))) {
                v7_4.g(0);
                this.u().a(v7_4);
                android.os.Bundle v7_9 = this.q();
                long v10_5 = p21.a;
                v7_9.b();
                v7_9.h.remove(v10_5);
            }
            if (p21.h) {
                long v10_6 = p21.m;
                if (v10_6 == 0) {
                    v10_6 = ((c.e.a.a.c.d.b) this.n).a();
                }
                android.os.Bundle v7_15 = p21.n;
                if ((v7_15 != null) && (v7_15 != 1)) {
                    this.o().h.a("Incorrect app type, assuming installed app. appId, appType", c.e.a.a.h.ya.a(p21.a), Integer.valueOf(v7_15));
                    v7_15 = 0;
                }
                this.u().A();
                try {
                    int v8_1 = this.u().b(p21.a);
                } catch (String v0_34) {
                    this.u().C();
                    throw v0_34;
                }
                if ((v8_1 != 0) && ((v8_1.e() != null) && (!v8_1.e().equals(p21.b)))) {
                    this.o().h.a("New GMP App Id passed in. Removing cached database data. appId", c.e.a.a.h.ya.a(v8_1.c()));
                    long v9_10 = this.u();
                    int v8_12 = v8_1.c();
                    v9_10.s();
                    v9_10.b();
                    a.b.f.a.H.c(v8_12);
                    try {
                        int v12_0 = v9_10.w();
                        String v13_0 = new String[1];
                        v13_0[0] = v8_12;
                        long v14_10 = (((((((((v12_0.delete("events", "app_id=?", v13_0) + 0) + v12_0.delete("user_attributes", "app_id=?", v13_0)) + v12_0.delete("conditional_properties", "app_id=?", v13_0)) + v12_0.delete("apps", "app_id=?", v13_0)) + v12_0.delete("raw_events", "app_id=?", v13_0)) + v12_0.delete("raw_events_metadata", "app_id=?", v13_0)) + v12_0.delete("event_filters", "app_id=?", v13_0)) + v12_0.delete("property_filters", "app_id=?", v13_0)) + v12_0.delete("audience_filter_values", "app_id=?", v13_0));
                    } catch (String v0_1) {
                        v9_10.o().f.a("Error deleting application data. appId, error", c.e.a.a.h.ya.a(v8_12), v0_1);
                        v8_1 = 0;
                    }
                    if (v14_10 <= 0) {
                    } else {
                        v9_10.o().l.a("Deleted application data. app, records", v8_12, Integer.valueOf(v14_10));
                    }
                }
                long v9_3;
                if (v8_1 == 0) {
                    v9_3 = 1;
                } else {
                    String v0_5;
                    if (v8_1.j() == -2147483648) {
                        v9_3 = 1;
                        if ((v8_1.i() == null) || (v8_1.i().equals(p21.c))) {
                            int v8_6;
                            int v12_12;
                            String v0_6;
                            String v0_7;
                            this.b(p21);
                            if (v7_15 != null) {
                                if (v7_15 != v9_3) {
                                    v0_6 = 0;
                                } else {
                                    v0_7 = this.u();
                                    v8_6 = p21.a;
                                    v12_12 = "_v";
                                    v0_6 = v0_7.a(v8_6, v12_12);
                                }
                            } else {
                                v0_7 = this.u();
                                v8_6 = p21.a;
                                v12_12 = "_f";
                            }
                            long v3_1;
                            if (v0_6 != null) {
                                if (p21.i) {
                                    v3_1 = new c.e.a.a.h.ma;
                                    v3_1("_cd", new c.e.a.a.h.ja(new android.os.Bundle()), "auto", v10_6);
                                    this.a(v3_1, p21);
                                }
                            } else {
                                String v0_12;
                                long v18_1 = v10_6;
                                long v14_21 = (((v10_6 / 3600000) + 1) * 3600000);
                                if (v7_15 != null) {
                                    if (v7_15 == 1) {
                                        long v3_3 = new c.e.a.a.h.xc;
                                        v3_3("_fvt", v18_1, Long.valueOf(v14_21), "auto");
                                        this.a(v3_3, p21);
                                        this.p().b();
                                        this.a();
                                        long v3_6 = new android.os.Bundle();
                                        v3_6.putLong("_c", 1);
                                        v3_6.putLong("_r", 1);
                                        v0_12 = new c.e.a.a.h.ma;
                                        v0_12("_v", new c.e.a.a.h.ja(v3_6), "auto", v18_1);
                                        this.a(v0_12, p21);
                                    }
                                } else {
                                    android.os.Bundle v7_5 = new c.e.a.a.h.xc;
                                    v7_5("_fot", v18_1, Long.valueOf(v14_21), "auto");
                                    this.a(v7_5, p21);
                                    this.p().b();
                                    this.a();
                                    android.os.Bundle v7_8 = new android.os.Bundle();
                                    v7_8.putLong("_c", 1);
                                    v7_8.putLong("_r", 1);
                                    v7_8.putLong("_uwa", 0);
                                    v7_8.putLong("_pfo", 0);
                                    v7_8.putLong("_sys", 0);
                                    v7_8.putLong("_sysu", 0);
                                    if (this.b.getPackageManager() != null) {
                                        try {
                                            try {
                                                String v0_18 = c.e.a.a.h.e.a(this.b).b(p21.a, 0);
                                            } catch (String v0_17) {
                                                this.o().f.a("Package info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_17);
                                                v0_18 = 0;
                                            }
                                            int v11_6;
                                            if (v0_18 == null) {
                                                v11_6 = 0;
                                            } else {
                                                int v11_5 = v0_18.firstInstallTime;
                                                if (v11_5 == 0) {
                                                } else {
                                                    String v0_20;
                                                    if (v11_5 == v0_18.lastUpdateTime) {
                                                        v0_20 = 1;
                                                    } else {
                                                        v7_8.putLong("_uwa", 1);
                                                        v0_20 = 0;
                                                    }
                                                    int v11_7;
                                                    int v6_0 = new c.e.a.a.h.xc;
                                                    if (v0_20 == null) {
                                                        v11_7 = 0;
                                                    } else {
                                                        v11_7 = 1;
                                                    }
                                                    v11_6 = 0;
                                                    v6_0("_fi", v18_1, Long.valueOf(v11_7), "auto");
                                                    this.a(v6_0, p21);
                                                }
                                            }
                                            try {
                                                String v0_24 = c.e.a.a.h.e.a(this.b).a(p21.a, v11_6);
                                            } catch (String v0_25) {
                                                this.o().f.a("Application info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_25);
                                                v0_24 = 0;
                                            }
                                            if (v0_24 != null) {
                                                if ((v0_24.flags & 1) != 0) {
                                                    v7_8.putLong("_sys", 1);
                                                }
                                                if ((v0_24.flags & 128) != 0) {
                                                    v7_8.putLong("_sysu", 1);
                                                }
                                            }
                                        } catch (String v0_17) {
                                        }
                                    } else {
                                        this.o().f.a("PackageManager is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a));
                                    }
                                    String v0_30 = this.u();
                                    long v3_8 = p21.a;
                                    a.b.f.a.H.c(v3_8);
                                    v0_30.b();
                                    v0_30.s();
                                    long v3_9 = v0_30.f(v3_8, "first_open_count");
                                    if (v3_9 >= 0) {
                                        v7_8.putLong("_pfo", v3_9);
                                    }
                                    v0_12 = new c.e.a.a.h.ma;
                                    v0_12("_f", new c.e.a.a.h.ja(v7_8), "auto", v18_1);
                                }
                                String v0_33 = new android.os.Bundle();
                                v0_33.putLong("_et", 1);
                                v3_1 = new c.e.a.a.h.ma;
                                v3_1("_e", new c.e.a.a.h.ja(v0_33), "auto", v18_1);
                            }
                            this.u().B();
                            this.u().C();
                            return;
                        } else {
                            int v12_8 = new android.os.Bundle();
                            v12_8.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v0_5("_au", new c.e.a.a.h.ja(v12_8), "auto", v10_6);
                        }
                    } else {
                        if (v8_1.j() == p21.j) {
                        } else {
                            long v9_6 = new android.os.Bundle();
                            v9_6.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v9_3 = 1;
                            v0_5("_au", new c.e.a.a.h.ja(v9_6), "auto", v10_6);
                        }
                    }
                    this.a(v0_5, p21);
                }
            } else {
                this.b(p21);
                return;
            }
        } else {
            return;
        }
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(c.e.a.a.h.U p21)
    {
        this.p().b();
        this.a();
        a.b.f.a.H.d(p21);
        a.b.f.a.H.c(p21.a);
        if (!android.text.TextUtils.isEmpty(p21.b)) {
            android.os.Bundle v7_4 = this.u().b(p21.a);
            if ((v7_4 != null) && ((android.text.TextUtils.isEmpty(v7_4.e())) && (!android.text.TextUtils.isEmpty(p21.b)))) {
                v7_4.g(0);
                this.u().a(v7_4);
                android.os.Bundle v7_9 = this.q();
                long v10_5 = p21.a;
                v7_9.b();
                v7_9.h.remove(v10_5);
            }
            if (p21.h) {
                long v10_6 = p21.m;
                if (v10_6 == 0) {
                    v10_6 = ((c.e.a.a.c.d.b) this.n).a();
                }
                android.os.Bundle v7_15 = p21.n;
                if ((v7_15 != null) && (v7_15 != 1)) {
                    this.o().h.a("Incorrect app type, assuming installed app. appId, appType", c.e.a.a.h.ya.a(p21.a), Integer.valueOf(v7_15));
                    v7_15 = 0;
                }
                this.u().A();
                try {
                    int v8_1 = this.u().b(p21.a);
                } catch (String v0_34) {
                    this.u().C();
                    throw v0_34;
                }
                if ((v8_1 != 0) && ((v8_1.e() != null) && (!v8_1.e().equals(p21.b)))) {
                    this.o().h.a("New GMP App Id passed in. Removing cached database data. appId", c.e.a.a.h.ya.a(v8_1.c()));
                    long v9_10 = this.u();
                    int v8_12 = v8_1.c();
                    v9_10.s();
                    v9_10.b();
                    a.b.f.a.H.c(v8_12);
                    try {
                        int v12_0 = v9_10.w();
                        String v13_0 = new String[1];
                        v13_0[0] = v8_12;
                        long v14_10 = (((((((((v12_0.delete("events", "app_id=?", v13_0) + 0) + v12_0.delete("user_attributes", "app_id=?", v13_0)) + v12_0.delete("conditional_properties", "app_id=?", v13_0)) + v12_0.delete("apps", "app_id=?", v13_0)) + v12_0.delete("raw_events", "app_id=?", v13_0)) + v12_0.delete("raw_events_metadata", "app_id=?", v13_0)) + v12_0.delete("event_filters", "app_id=?", v13_0)) + v12_0.delete("property_filters", "app_id=?", v13_0)) + v12_0.delete("audience_filter_values", "app_id=?", v13_0));
                    } catch (String v0_1) {
                        v9_10.o().f.a("Error deleting application data. appId, error", c.e.a.a.h.ya.a(v8_12), v0_1);
                        v8_1 = 0;
                    }
                    if (v14_10 <= 0) {
                    } else {
                        v9_10.o().l.a("Deleted application data. app, records", v8_12, Integer.valueOf(v14_10));
                    }
                }
                long v9_3;
                if (v8_1 == 0) {
                    v9_3 = 1;
                } else {
                    String v0_5;
                    if (v8_1.j() == -2147483648) {
                        v9_3 = 1;
                        if ((v8_1.i() == null) || (v8_1.i().equals(p21.c))) {
                            String v0_7;
                            int v8_6;
                            int v12_12;
                            String v0_6;
                            this.b(p21);
                            if (v7_15 != null) {
                                if (v7_15 != v9_3) {
                                    v0_6 = 0;
                                } else {
                                    v0_7 = this.u();
                                    v8_6 = p21.a;
                                    v12_12 = "_v";
                                    v0_6 = v0_7.a(v8_6, v12_12);
                                }
                            } else {
                                v0_7 = this.u();
                                v8_6 = p21.a;
                                v12_12 = "_f";
                            }
                            long v3_1;
                            if (v0_6 != null) {
                                if (p21.i) {
                                    v3_1 = new c.e.a.a.h.ma;
                                    v3_1("_cd", new c.e.a.a.h.ja(new android.os.Bundle()), "auto", v10_6);
                                    this.a(v3_1, p21);
                                }
                            } else {
                                String v0_12;
                                long v18_1 = v10_6;
                                long v14_21 = (((v10_6 / 3600000) + 1) * 3600000);
                                if (v7_15 != null) {
                                    if (v7_15 == 1) {
                                        long v3_3 = new c.e.a.a.h.xc;
                                        v3_3("_fvt", v18_1, Long.valueOf(v14_21), "auto");
                                        this.a(v3_3, p21);
                                        this.p().b();
                                        this.a();
                                        long v3_6 = new android.os.Bundle();
                                        v3_6.putLong("_c", 1);
                                        v3_6.putLong("_r", 1);
                                        v0_12 = new c.e.a.a.h.ma;
                                        v0_12("_v", new c.e.a.a.h.ja(v3_6), "auto", v18_1);
                                        this.a(v0_12, p21);
                                    }
                                } else {
                                    android.os.Bundle v7_5 = new c.e.a.a.h.xc;
                                    v7_5("_fot", v18_1, Long.valueOf(v14_21), "auto");
                                    this.a(v7_5, p21);
                                    this.p().b();
                                    this.a();
                                    android.os.Bundle v7_8 = new android.os.Bundle();
                                    v7_8.putLong("_c", 1);
                                    v7_8.putLong("_r", 1);
                                    v7_8.putLong("_uwa", 0);
                                    v7_8.putLong("_pfo", 0);
                                    v7_8.putLong("_sys", 0);
                                    v7_8.putLong("_sysu", 0);
                                    if (this.b.getPackageManager() != null) {
                                        try {
                                            try {
                                                String v0_18 = c.e.a.a.h.e.a(this.b).b(p21.a, 0);
                                            } catch (String v0_17) {
                                                this.o().f.a("Package info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_17);
                                                v0_18 = 0;
                                            }
                                            int v11_6;
                                            if (v0_18 == null) {
                                                v11_6 = 0;
                                            } else {
                                                int v11_5 = v0_18.firstInstallTime;
                                                if (v11_5 == 0) {
                                                } else {
                                                    String v0_20;
                                                    if (v11_5 == v0_18.lastUpdateTime) {
                                                        v0_20 = 1;
                                                    } else {
                                                        v7_8.putLong("_uwa", 1);
                                                        v0_20 = 0;
                                                    }
                                                    int v11_7;
                                                    int v6_0 = new c.e.a.a.h.xc;
                                                    if (v0_20 == null) {
                                                        v11_7 = 0;
                                                    } else {
                                                        v11_7 = 1;
                                                    }
                                                    v11_6 = 0;
                                                    v6_0("_fi", v18_1, Long.valueOf(v11_7), "auto");
                                                    this.a(v6_0, p21);
                                                }
                                            }
                                            try {
                                                String v0_24 = c.e.a.a.h.e.a(this.b).a(p21.a, v11_6);
                                            } catch (String v0_25) {
                                                this.o().f.a("Application info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_25);
                                                v0_24 = 0;
                                            }
                                            if (v0_24 != null) {
                                                if ((v0_24.flags & 1) != 0) {
                                                    v7_8.putLong("_sys", 1);
                                                }
                                                if ((v0_24.flags & 128) != 0) {
                                                    v7_8.putLong("_sysu", 1);
                                                }
                                            }
                                        } catch (String v0_17) {
                                        }
                                    } else {
                                        this.o().f.a("PackageManager is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a));
                                    }
                                    String v0_30 = this.u();
                                    long v3_8 = p21.a;
                                    a.b.f.a.H.c(v3_8);
                                    v0_30.b();
                                    v0_30.s();
                                    long v3_9 = v0_30.f(v3_8, "first_open_count");
                                    if (v3_9 >= 0) {
                                        v7_8.putLong("_pfo", v3_9);
                                    }
                                    v0_12 = new c.e.a.a.h.ma;
                                    v0_12("_f", new c.e.a.a.h.ja(v7_8), "auto", v18_1);
                                }
                                String v0_33 = new android.os.Bundle();
                                v0_33.putLong("_et", 1);
                                v3_1 = new c.e.a.a.h.ma;
                                v3_1("_e", new c.e.a.a.h.ja(v0_33), "auto", v18_1);
                            }
                            this.u().B();
                            this.u().C();
                            return;
                        } else {
                            int v12_8 = new android.os.Bundle();
                            v12_8.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v0_5("_au", new c.e.a.a.h.ja(v12_8), "auto", v10_6);
                        }
                    } else {
                        if (v8_1.j() == p21.j) {
                        } else {
                            long v9_6 = new android.os.Bundle();
                            v9_6.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v9_3 = 1;
                            v0_5("_au", new c.e.a.a.h.ja(v9_6), "auto", v10_6);
                        }
                    }
                    this.a(v0_5, p21);
                }
            } else {
                this.b(p21);
                return;
            }
        } else {
            return;
        }
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(c.e.a.a.h.U p21)
    {
        this.p().b();
        this.a();
        a.b.f.a.H.d(p21);
        a.b.f.a.H.c(p21.a);
        if (!android.text.TextUtils.isEmpty(p21.b)) {
            android.os.Bundle v7_4 = this.u().b(p21.a);
            if ((v7_4 != null) && ((android.text.TextUtils.isEmpty(v7_4.e())) && (!android.text.TextUtils.isEmpty(p21.b)))) {
                v7_4.g(0);
                this.u().a(v7_4);
                android.os.Bundle v7_9 = this.q();
                long v10_5 = p21.a;
                v7_9.b();
                v7_9.h.remove(v10_5);
            }
            if (p21.h) {
                long v10_6 = p21.m;
                if (v10_6 == 0) {
                    v10_6 = ((c.e.a.a.c.d.b) this.n).a();
                }
                android.os.Bundle v7_15 = p21.n;
                if ((v7_15 != null) && (v7_15 != 1)) {
                    this.o().h.a("Incorrect app type, assuming installed app. appId, appType", c.e.a.a.h.ya.a(p21.a), Integer.valueOf(v7_15));
                    v7_15 = 0;
                }
                this.u().A();
                try {
                    int v8_1 = this.u().b(p21.a);
                } catch (String v0_34) {
                    this.u().C();
                    throw v0_34;
                }
                if ((v8_1 != 0) && ((v8_1.e() != null) && (!v8_1.e().equals(p21.b)))) {
                    this.o().h.a("New GMP App Id passed in. Removing cached database data. appId", c.e.a.a.h.ya.a(v8_1.c()));
                    long v9_10 = this.u();
                    int v8_12 = v8_1.c();
                    v9_10.s();
                    v9_10.b();
                    a.b.f.a.H.c(v8_12);
                    try {
                        int v12_0 = v9_10.w();
                        String v13_0 = new String[1];
                        v13_0[0] = v8_12;
                        long v14_10 = (((((((((v12_0.delete("events", "app_id=?", v13_0) + 0) + v12_0.delete("user_attributes", "app_id=?", v13_0)) + v12_0.delete("conditional_properties", "app_id=?", v13_0)) + v12_0.delete("apps", "app_id=?", v13_0)) + v12_0.delete("raw_events", "app_id=?", v13_0)) + v12_0.delete("raw_events_metadata", "app_id=?", v13_0)) + v12_0.delete("event_filters", "app_id=?", v13_0)) + v12_0.delete("property_filters", "app_id=?", v13_0)) + v12_0.delete("audience_filter_values", "app_id=?", v13_0));
                    } catch (String v0_1) {
                        v9_10.o().f.a("Error deleting application data. appId, error", c.e.a.a.h.ya.a(v8_12), v0_1);
                        v8_1 = 0;
                    }
                    if (v14_10 <= 0) {
                    } else {
                        v9_10.o().l.a("Deleted application data. app, records", v8_12, Integer.valueOf(v14_10));
                    }
                }
                long v9_3;
                if (v8_1 == 0) {
                    v9_3 = 1;
                } else {
                    String v0_5;
                    if (v8_1.j() == -2147483648) {
                        v9_3 = 1;
                        if ((v8_1.i() == null) || (v8_1.i().equals(p21.c))) {
                            int v8_6;
                            String v0_7;
                            String v0_6;
                            int v12_12;
                            this.b(p21);
                            if (v7_15 != null) {
                                if (v7_15 != v9_3) {
                                    v0_6 = 0;
                                } else {
                                    v0_7 = this.u();
                                    v8_6 = p21.a;
                                    v12_12 = "_v";
                                    v0_6 = v0_7.a(v8_6, v12_12);
                                }
                            } else {
                                v0_7 = this.u();
                                v8_6 = p21.a;
                                v12_12 = "_f";
                            }
                            long v3_1;
                            if (v0_6 != null) {
                                if (p21.i) {
                                    v3_1 = new c.e.a.a.h.ma;
                                    v3_1("_cd", new c.e.a.a.h.ja(new android.os.Bundle()), "auto", v10_6);
                                    this.a(v3_1, p21);
                                }
                            } else {
                                String v0_12;
                                long v18_1 = v10_6;
                                long v14_21 = (((v10_6 / 3600000) + 1) * 3600000);
                                if (v7_15 != null) {
                                    if (v7_15 == 1) {
                                        long v3_3 = new c.e.a.a.h.xc;
                                        v3_3("_fvt", v18_1, Long.valueOf(v14_21), "auto");
                                        this.a(v3_3, p21);
                                        this.p().b();
                                        this.a();
                                        long v3_6 = new android.os.Bundle();
                                        v3_6.putLong("_c", 1);
                                        v3_6.putLong("_r", 1);
                                        v0_12 = new c.e.a.a.h.ma;
                                        v0_12("_v", new c.e.a.a.h.ja(v3_6), "auto", v18_1);
                                        this.a(v0_12, p21);
                                    }
                                } else {
                                    android.os.Bundle v7_5 = new c.e.a.a.h.xc;
                                    v7_5("_fot", v18_1, Long.valueOf(v14_21), "auto");
                                    this.a(v7_5, p21);
                                    this.p().b();
                                    this.a();
                                    android.os.Bundle v7_8 = new android.os.Bundle();
                                    v7_8.putLong("_c", 1);
                                    v7_8.putLong("_r", 1);
                                    v7_8.putLong("_uwa", 0);
                                    v7_8.putLong("_pfo", 0);
                                    v7_8.putLong("_sys", 0);
                                    v7_8.putLong("_sysu", 0);
                                    if (this.b.getPackageManager() != null) {
                                        try {
                                            try {
                                                String v0_18 = c.e.a.a.h.e.a(this.b).b(p21.a, 0);
                                            } catch (String v0_17) {
                                                this.o().f.a("Package info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_17);
                                                v0_18 = 0;
                                            }
                                            int v11_6;
                                            if (v0_18 == null) {
                                                v11_6 = 0;
                                            } else {
                                                int v11_5 = v0_18.firstInstallTime;
                                                if (v11_5 == 0) {
                                                } else {
                                                    String v0_20;
                                                    if (v11_5 == v0_18.lastUpdateTime) {
                                                        v0_20 = 1;
                                                    } else {
                                                        v7_8.putLong("_uwa", 1);
                                                        v0_20 = 0;
                                                    }
                                                    int v11_7;
                                                    int v6_0 = new c.e.a.a.h.xc;
                                                    if (v0_20 == null) {
                                                        v11_7 = 0;
                                                    } else {
                                                        v11_7 = 1;
                                                    }
                                                    v11_6 = 0;
                                                    v6_0("_fi", v18_1, Long.valueOf(v11_7), "auto");
                                                    this.a(v6_0, p21);
                                                }
                                            }
                                            try {
                                                String v0_24 = c.e.a.a.h.e.a(this.b).a(p21.a, v11_6);
                                            } catch (String v0_25) {
                                                this.o().f.a("Application info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_25);
                                                v0_24 = 0;
                                            }
                                            if (v0_24 != null) {
                                                if ((v0_24.flags & 1) != 0) {
                                                    v7_8.putLong("_sys", 1);
                                                }
                                                if ((v0_24.flags & 128) != 0) {
                                                    v7_8.putLong("_sysu", 1);
                                                }
                                            }
                                        } catch (String v0_17) {
                                        }
                                    } else {
                                        this.o().f.a("PackageManager is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a));
                                    }
                                    String v0_30 = this.u();
                                    long v3_8 = p21.a;
                                    a.b.f.a.H.c(v3_8);
                                    v0_30.b();
                                    v0_30.s();
                                    long v3_9 = v0_30.f(v3_8, "first_open_count");
                                    if (v3_9 >= 0) {
                                        v7_8.putLong("_pfo", v3_9);
                                    }
                                    v0_12 = new c.e.a.a.h.ma;
                                    v0_12("_f", new c.e.a.a.h.ja(v7_8), "auto", v18_1);
                                }
                                String v0_33 = new android.os.Bundle();
                                v0_33.putLong("_et", 1);
                                v3_1 = new c.e.a.a.h.ma;
                                v3_1("_e", new c.e.a.a.h.ja(v0_33), "auto", v18_1);
                            }
                            this.u().B();
                            this.u().C();
                            return;
                        } else {
                            int v12_8 = new android.os.Bundle();
                            v12_8.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v0_5("_au", new c.e.a.a.h.ja(v12_8), "auto", v10_6);
                        }
                    } else {
                        if (v8_1.j() == p21.j) {
                        } else {
                            long v9_6 = new android.os.Bundle();
                            v9_6.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v9_3 = 1;
                            v0_5("_au", new c.e.a.a.h.ja(v9_6), "auto", v10_6);
                        }
                    }
                    this.a(v0_5, p21);
                }
            } else {
                this.b(p21);
                return;
            }
        } else {
            return;
        }
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(c.e.a.a.h.U p21)
    {
        this.p().b();
        this.a();
        a.b.f.a.H.d(p21);
        a.b.f.a.H.c(p21.a);
        if (!android.text.TextUtils.isEmpty(p21.b)) {
            android.os.Bundle v7_4 = this.u().b(p21.a);
            if ((v7_4 != null) && ((android.text.TextUtils.isEmpty(v7_4.e())) && (!android.text.TextUtils.isEmpty(p21.b)))) {
                v7_4.g(0);
                this.u().a(v7_4);
                android.os.Bundle v7_9 = this.q();
                long v10_5 = p21.a;
                v7_9.b();
                v7_9.h.remove(v10_5);
            }
            if (p21.h) {
                long v10_6 = p21.m;
                if (v10_6 == 0) {
                    v10_6 = ((c.e.a.a.c.d.b) this.n).a();
                }
                android.os.Bundle v7_15 = p21.n;
                if ((v7_15 != null) && (v7_15 != 1)) {
                    this.o().h.a("Incorrect app type, assuming installed app. appId, appType", c.e.a.a.h.ya.a(p21.a), Integer.valueOf(v7_15));
                    v7_15 = 0;
                }
                this.u().A();
                try {
                    int v8_1 = this.u().b(p21.a);
                } catch (String v0_34) {
                    this.u().C();
                    throw v0_34;
                }
                if ((v8_1 != 0) && ((v8_1.e() != null) && (!v8_1.e().equals(p21.b)))) {
                    this.o().h.a("New GMP App Id passed in. Removing cached database data. appId", c.e.a.a.h.ya.a(v8_1.c()));
                    long v9_10 = this.u();
                    int v8_12 = v8_1.c();
                    v9_10.s();
                    v9_10.b();
                    a.b.f.a.H.c(v8_12);
                    try {
                        int v12_0 = v9_10.w();
                        String v13_0 = new String[1];
                        v13_0[0] = v8_12;
                        long v14_10 = (((((((((v12_0.delete("events", "app_id=?", v13_0) + 0) + v12_0.delete("user_attributes", "app_id=?", v13_0)) + v12_0.delete("conditional_properties", "app_id=?", v13_0)) + v12_0.delete("apps", "app_id=?", v13_0)) + v12_0.delete("raw_events", "app_id=?", v13_0)) + v12_0.delete("raw_events_metadata", "app_id=?", v13_0)) + v12_0.delete("event_filters", "app_id=?", v13_0)) + v12_0.delete("property_filters", "app_id=?", v13_0)) + v12_0.delete("audience_filter_values", "app_id=?", v13_0));
                    } catch (String v0_1) {
                        v9_10.o().f.a("Error deleting application data. appId, error", c.e.a.a.h.ya.a(v8_12), v0_1);
                        v8_1 = 0;
                    }
                    if (v14_10 <= 0) {
                    } else {
                        v9_10.o().l.a("Deleted application data. app, records", v8_12, Integer.valueOf(v14_10));
                    }
                }
                long v9_3;
                if (v8_1 == 0) {
                    v9_3 = 1;
                } else {
                    String v0_5;
                    if (v8_1.j() == -2147483648) {
                        v9_3 = 1;
                        if ((v8_1.i() == null) || (v8_1.i().equals(p21.c))) {
                            String v0_6;
                            int v8_6;
                            int v12_12;
                            String v0_7;
                            this.b(p21);
                            if (v7_15 != null) {
                                if (v7_15 != v9_3) {
                                    v0_6 = 0;
                                } else {
                                    v0_7 = this.u();
                                    v8_6 = p21.a;
                                    v12_12 = "_v";
                                    v0_6 = v0_7.a(v8_6, v12_12);
                                }
                            } else {
                                v0_7 = this.u();
                                v8_6 = p21.a;
                                v12_12 = "_f";
                            }
                            long v3_1;
                            if (v0_6 != null) {
                                if (p21.i) {
                                    v3_1 = new c.e.a.a.h.ma;
                                    v3_1("_cd", new c.e.a.a.h.ja(new android.os.Bundle()), "auto", v10_6);
                                    this.a(v3_1, p21);
                                }
                            } else {
                                String v0_12;
                                long v18_1 = v10_6;
                                long v14_21 = (((v10_6 / 3600000) + 1) * 3600000);
                                if (v7_15 != null) {
                                    if (v7_15 == 1) {
                                        long v3_3 = new c.e.a.a.h.xc;
                                        v3_3("_fvt", v18_1, Long.valueOf(v14_21), "auto");
                                        this.a(v3_3, p21);
                                        this.p().b();
                                        this.a();
                                        long v3_6 = new android.os.Bundle();
                                        v3_6.putLong("_c", 1);
                                        v3_6.putLong("_r", 1);
                                        v0_12 = new c.e.a.a.h.ma;
                                        v0_12("_v", new c.e.a.a.h.ja(v3_6), "auto", v18_1);
                                        this.a(v0_12, p21);
                                    }
                                } else {
                                    android.os.Bundle v7_5 = new c.e.a.a.h.xc;
                                    v7_5("_fot", v18_1, Long.valueOf(v14_21), "auto");
                                    this.a(v7_5, p21);
                                    this.p().b();
                                    this.a();
                                    android.os.Bundle v7_8 = new android.os.Bundle();
                                    v7_8.putLong("_c", 1);
                                    v7_8.putLong("_r", 1);
                                    v7_8.putLong("_uwa", 0);
                                    v7_8.putLong("_pfo", 0);
                                    v7_8.putLong("_sys", 0);
                                    v7_8.putLong("_sysu", 0);
                                    if (this.b.getPackageManager() != null) {
                                        try {
                                            try {
                                                String v0_18 = c.e.a.a.h.e.a(this.b).b(p21.a, 0);
                                            } catch (String v0_17) {
                                                this.o().f.a("Package info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_17);
                                                v0_18 = 0;
                                            }
                                            int v11_6;
                                            if (v0_18 == null) {
                                                v11_6 = 0;
                                            } else {
                                                int v11_5 = v0_18.firstInstallTime;
                                                if (v11_5 == 0) {
                                                } else {
                                                    String v0_20;
                                                    if (v11_5 == v0_18.lastUpdateTime) {
                                                        v0_20 = 1;
                                                    } else {
                                                        v7_8.putLong("_uwa", 1);
                                                        v0_20 = 0;
                                                    }
                                                    int v11_7;
                                                    int v6_0 = new c.e.a.a.h.xc;
                                                    if (v0_20 == null) {
                                                        v11_7 = 0;
                                                    } else {
                                                        v11_7 = 1;
                                                    }
                                                    v11_6 = 0;
                                                    v6_0("_fi", v18_1, Long.valueOf(v11_7), "auto");
                                                    this.a(v6_0, p21);
                                                }
                                            }
                                            try {
                                                String v0_24 = c.e.a.a.h.e.a(this.b).a(p21.a, v11_6);
                                            } catch (String v0_25) {
                                                this.o().f.a("Application info is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a), v0_25);
                                                v0_24 = 0;
                                            }
                                            if (v0_24 != null) {
                                                if ((v0_24.flags & 1) != 0) {
                                                    v7_8.putLong("_sys", 1);
                                                }
                                                if ((v0_24.flags & 128) != 0) {
                                                    v7_8.putLong("_sysu", 1);
                                                }
                                            }
                                        } catch (String v0_17) {
                                        }
                                    } else {
                                        this.o().f.a("PackageManager is null, first open report might be inaccurate. appId", c.e.a.a.h.ya.a(p21.a));
                                    }
                                    String v0_30 = this.u();
                                    long v3_8 = p21.a;
                                    a.b.f.a.H.c(v3_8);
                                    v0_30.b();
                                    v0_30.s();
                                    long v3_9 = v0_30.f(v3_8, "first_open_count");
                                    if (v3_9 >= 0) {
                                        v7_8.putLong("_pfo", v3_9);
                                    }
                                    v0_12 = new c.e.a.a.h.ma;
                                    v0_12("_f", new c.e.a.a.h.ja(v7_8), "auto", v18_1);
                                }
                                String v0_33 = new android.os.Bundle();
                                v0_33.putLong("_et", 1);
                                v3_1 = new c.e.a.a.h.ma;
                                v3_1("_e", new c.e.a.a.h.ja(v0_33), "auto", v18_1);
                            }
                            this.u().B();
                            this.u().C();
                            return;
                        } else {
                            int v12_8 = new android.os.Bundle();
                            v12_8.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v0_5("_au", new c.e.a.a.h.ja(v12_8), "auto", v10_6);
                        }
                    } else {
                        if (v8_1.j() == p21.j) {
                        } else {
                            long v9_6 = new android.os.Bundle();
                            v9_6.putString("_pv", v8_1.i());
                            v0_5 = new c.e.a.a.h.ma;
                            v9_3 = 1;
                            v0_5("_au", new c.e.a.a.h.ja(v9_6), "auto", v10_6);
                        }
                    }
                    this.a(v0_5, p21);
                }
            } else {
                this.b(p21);
                return;
            }
        } else {
            return;
        }
    }

Method c.e.a.a.h.Kb.run() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void run()
    {
        c.e.a.a.h.Rb v0_0 = this.a;
        v0_0.b();
        v0_0.s();
        v0_0.o().k.a("Resetting analytics data (FE)");
        c.e.a.a.h.Rb v0_1 = v0_0.f();
        v0_1.b();
        v0_1.s();
        c.e.a.a.h.U v2_0 = v0_1.a(0);
        c.e.a.a.h.Aa v3_0 = v0_1.h();
        v3_0.b();
        try {
            Integer v4_2 = (v3_0.w().delete("messages", 0, 0) + 0);
        } catch (c.e.a.a.h.Tb v1_1) {
            v3_0.o().f.a("Error resetting local analytics data. error", v1_1);
            v0_1.a(new c.e.a.a.h.Tb(v0_1, v2_0));
            return;
        }
        if (v4_2 <= null) {
            v0_1.a(new c.e.a.a.h.Tb(v0_1, v2_0));
            return;
        } else {
            v3_0.o().l.a("Reset local analytics data. records", Integer.valueOf(v4_2));
            v0_1.a(new c.e.a.a.h.Tb(v0_1, v2_0));
            return;
        }
    }

Method c.e.a.a.h.aa.d() calling method android.database.sqlite.SQLiteDatabase.query()


    public final byte[] d(String p12)
    {
        a.b.f.a.H.c(p12);
        this.b();
        this.s();
        try {
            int v1_1 = this.w();
            String v4_3 = new String[1];
            v4_3[0] = "remote_config";
            int v6_0 = new String[1];
            v6_0[0] = p12;
            int v1_0 = v1_1.query("apps", v4_3, "app_id=?", v6_0, 0, 0, 0);
            try {
                if (v1_0.moveToFirst()) {
                    byte[] v2_2 = v1_0.getBlob(0);
                    if (v1_0.moveToNext()) {
                        this.o().f.a("Got multiple records for app config, expected one. appId", c.e.a.a.h.ya.a(p12));
                    }
                    v1_0.close();
                    return v2_2;
                } else {
                    v1_0.close();
                    return 0;
                }
            } catch (byte[] v2_0) {
                this.o().f.a("Error querying remote config. appId", c.e.a.a.h.ya.a(p12), v2_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                return 0;
            }
        } catch (Throwable v12_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v12_1;
        } catch (byte[] v2_0) {
            v1_0 = 0;
        } catch (Throwable v12_1) {
        }
    }

Method c.e.a.a.h.aa.d() calling method android.database.sqlite.SQLiteDatabase.query()


    public final c.e.a.a.h.X d(String p33, String p34)
    {
        a.b.f.a.H.c(p33);
        a.b.f.a.H.c(p34);
        this.b();
        this.s();
        try {
            int v9_1 = this.w();
            Object v11_0 = new String[11];
            v11_0[0] = "origin";
            v11_0[1] = "value";
            v11_0[2] = "active";
            v11_0[3] = "trigger_event_name";
            v11_0[4] = "trigger_timeout";
            v11_0[5] = "timed_out_event";
            v11_0[6] = "creation_timestamp";
            v11_0[7] = "triggered_event";
            v11_0[8] = "triggered_timestamp";
            v11_0[9] = "time_to_live";
            v11_0[10] = "expired_event";
            String[] v13_1 = new String[2];
            v13_1[0] = p33;
            v13_1[1] = p34;
            int v9_0 = v9_1.query("conditional_properties", v11_0, "app_id=? and name=?", v13_1, 0, 0, 0);
            try {
                if (v9_0.moveToFirst()) {
                    String v19_1 = v9_0.getString(0);
                    try {
                        int v23;
                        Object v11_1 = this.a(v9_0, 1);
                    } catch (c.e.a.a.h.X v0_9) {
                        this.o().f.a("Error querying conditional property", c.e.a.a.h.ya.a(p33), this.j().c(p34), v0_9);
                        if (v9_0 != 0) {
                            v9_0.close();
                        }
                        return 0;
                    }
                    if (v9_0.getInt(2) == 0) {
                        v23 = 0;
                    } else {
                        v23 = 1;
                    }
                    String v24 = v9_0.getString(3);
                    long v26 = v9_0.getLong(4);
                    c.e.a.a.h.ma v25_1 = ((c.e.a.a.h.ma) this.k().a(v9_0.getBlob(5), c.e.a.a.h.ma.CREATOR));
                    long v12_2 = v9_0.getLong(6);
                    c.e.a.a.h.ma v28_1 = ((c.e.a.a.h.ma) this.k().a(v9_0.getBlob(7), c.e.a.a.h.ma.CREATOR));
                    Object v3_0 = v9_0.getLong(8);
                    long v29 = v9_0.getLong(9);
                    c.e.a.a.h.ma v31_1 = ((c.e.a.a.h.ma) this.k().a(v9_0.getBlob(10), c.e.a.a.h.ma.CREATOR));
                    c.e.a.a.h.xc v20 = new c.e.a.a.h.xc;
                    v20(p34, v3_0, v11_1, v19_1);
                    c.e.a.a.h.X v0_7 = new c.e.a.a.h.X;
                    v0_7(p33, v19_1, v20, v12_2, v23, v24, v25_1, v26, v28_1, v29, v31_1);
                    if (v9_0.moveToNext()) {
                        this.o().f.a("Got multiple records for conditional property, expected one", c.e.a.a.h.ya.a(p33), this.j().c(p34));
                    }
                    v9_0.close();
                    return v0_7;
                } else {
                    v9_0.close();
                    return 0;
                }
            } catch (c.e.a.a.h.X v0_10) {
                if (v9_0 != 0) {
                    v9_0.close();
                }
                throw v0_10;
            } catch (c.e.a.a.h.X v0_9) {
            }
        } catch (c.e.a.a.h.X v0_10) {
            v9_0 = 0;
        } catch (c.e.a.a.h.X v0_9) {
            v9_0 = 0;
        } catch (c.e.a.a.h.X v0_10) {
        }
    }

Method c.e.a.a.h.aa.c() calling method android.database.sqlite.SQLiteDatabase.query()


    public final c.e.a.a.h.zc c(String p19, String p20)
    {
        a.b.f.a.H.c(p19);
        a.b.f.a.H.c(p20);
        this.b();
        this.s();
        try {
            int v10_1 = this.w();
            String[] v12 = new String[3];
            v12[0] = "set_timestamp";
            v12[1] = "value";
            v12[2] = "origin";
            String[] v14 = new String[2];
            v14[0] = p19;
            v14[1] = p20;
            int v10_0 = v10_1.query("user_attributes", v12, "app_id=? and name=?", v14, 0, 0, 0);
            try {
                if (v10_0.moveToFirst()) {
                    try {
                        android.database.sqlite.SQLiteException v0_6 = new c.e.a.a.h.zc;
                        v0_6(p19, v10_0.getString(2), p20, v10_0.getLong(0), this.a(v10_0, 1));
                    } catch (android.database.sqlite.SQLiteException v0_3) {
                        this.o().f.a("Error querying user property. appId", c.e.a.a.h.ya.a(p19), this.j().c(p20), v0_3);
                        if (v10_0 != 0) {
                            v10_0.close();
                        }
                        return 0;
                    }
                    if (v10_0.moveToNext()) {
                        this.o().f.a("Got multiple records for user property, expected one. appId", c.e.a.a.h.ya.a(p19));
                    }
                    v10_0.close();
                    return v0_6;
                } else {
                    v10_0.close();
                    return 0;
                }
            } catch (android.database.sqlite.SQLiteException v0_4) {
                if (v10_0 != 0) {
                    v10_0.close();
                }
                throw v0_4;
            } catch (android.database.sqlite.SQLiteException v0_3) {
            }
        } catch (android.database.sqlite.SQLiteException v0_4) {
            v10_0 = 0;
        } catch (android.database.sqlite.SQLiteException v0_3) {
            v10_0 = 0;
        } catch (android.database.sqlite.SQLiteException v0_4) {
        }
    }

Method c.e.a.a.h.aa.b() calling method android.database.sqlite.SQLiteDatabase.query()


    public final c.e.a.a.h.T b(String p22)
    {
        a.b.f.a.H.c(p22);
        this.b();
        this.s();
        try {
            int v3_1 = this.w();
            c.e.a.a.h.aa v5_1 = new String[24];
            v5_1[0] = "app_instance_id";
            int v12 = 1;
            v5_1[1] = "gmp_app_id";
            v5_1[2] = "resettable_device_id_hash";
            v5_1[3] = "last_bundle_index";
            v5_1[4] = "last_bundle_start_timestamp";
            v5_1[5] = "last_bundle_end_timestamp";
            v5_1[6] = "app_version";
            v5_1[7] = "app_store";
            v5_1[8] = "gmp_version";
            v5_1[9] = "dev_cert_hash";
            v5_1[10] = "measurement_enabled";
            v5_1[11] = "day";
            v5_1[12] = "daily_public_events_count";
            v5_1[13] = "daily_events_count";
            v5_1[14] = "daily_conversions_count";
            v5_1[15] = "config_fetched_time";
            v5_1[16] = "failed_config_fetch_time";
            v5_1[17] = "app_version_int";
            v5_1[18] = "firebase_instance_id";
            v5_1[19] = "daily_error_events_count";
            v5_1[20] = "daily_realtime_events_count";
            v5_1[21] = "health_monitor_sample";
            v5_1[22] = "android_id";
            v5_1[23] = "adid_reporting_enabled";
            Object v7_2 = new String[1];
            v7_2[0] = p22;
            int v15 = 7;
            int v3_0 = v3_1.query("apps", v5_1, "app_id=?", v7_2, 0, 0, 0);
            try {
                if (v3_0.moveToFirst()) {
                    try {
                        c.e.a.a.h.Aa v0_11;
                        c.e.a.a.h.T v4_2 = new c.e.a.a.h.T(this.a, p22);
                        v4_2.a(v3_0.getString(0));
                        v4_2.b(v3_0.getString(1));
                        v4_2.c(v3_0.getString(2));
                        v4_2.f(v3_0.getLong(3));
                        v4_2.a(v3_0.getLong(4));
                        v4_2.b(v3_0.getLong(5));
                        v4_2.e(v3_0.getString(6));
                        v4_2.f(v3_0.getString(7));
                        v4_2.d(v3_0.getLong(8));
                        v4_2.e(v3_0.getLong(9));
                    } catch (c.e.a.a.h.Aa v0_2) {
                        this.o().f.a("Error querying app. appId", c.e.a.a.h.ya.a(p22), v0_2);
                        if (v3_0 != 0) {
                            v3_0.close();
                        }
                        return 0;
                    }
                    if (v3_0.isNull(10)) {
                        v0_11 = 1;
                    } else {
                        if (v3_0.getInt(10) == 0) {
                            v0_11 = 0;
                        } else {
                        }
                    }
                    int v8_1;
                    v4_2.a(v0_11);
                    String v6_11 = v3_0.getLong(11);
                    v4_2.a.p().b();
                    if (v4_2.r == v6_11) {
                        v8_1 = 0;
                    } else {
                        v8_1 = 1;
                    }
                    int v8_3;
                    v4_2.y = (v4_2.y | v8_1);
                    v4_2.r = v6_11;
                    String v6_12 = v3_0.getLong(12);
                    v4_2.a.p().b();
                    if (v4_2.s == v6_12) {
                        v8_3 = 0;
                    } else {
                        v8_3 = 1;
                    }
                    int v8_5;
                    v4_2.y = (v4_2.y | v8_3);
                    v4_2.s = v6_12;
                    String v6_13 = v3_0.getLong(13);
                    v4_2.a.p().b();
                    if (v4_2.t == v6_13) {
                        v8_5 = 0;
                    } else {
                        v8_5 = 1;
                    }
                    int v8_7;
                    v4_2.y = (v4_2.y | v8_5);
                    v4_2.t = v6_13;
                    String v6_14 = v3_0.getLong(14);
                    v4_2.a.p().b();
                    if (v4_2.u == v6_14) {
                        v8_7 = 0;
                    } else {
                        v8_7 = 1;
                    }
                    String v6_18;
                    v4_2.y = (v4_2.y | v8_7);
                    v4_2.u = v6_14;
                    v4_2.g(v3_0.getLong(15));
                    v4_2.h(v3_0.getLong(16));
                    if (!v3_0.isNull(17)) {
                        v6_18 = ((long) v3_0.getInt(17));
                    } else {
                        v6_18 = -2147483648;
                    }
                    int v8_9;
                    v4_2.c(v6_18);
                    v4_2.d(v3_0.getString(18));
                    String v6_19 = v3_0.getLong(19);
                    v4_2.a.p().b();
                    if (v4_2.v == v6_19) {
                        v8_9 = 0;
                    } else {
                        v8_9 = 1;
                    }
                    int v8_11;
                    v4_2.y = (v4_2.y | v8_9);
                    v4_2.v = v6_19;
                    String v6_20 = v3_0.getLong(20);
                    v4_2.a.p().b();
                    if (v4_2.w == v6_20) {
                        v8_11 = 0;
                    } else {
                        v8_11 = 1;
                    }
                    String v6_22;
                    v4_2.y = (v4_2.y | v8_11);
                    v4_2.w = v6_20;
                    v4_2.g(v3_0.getString(21));
                    if (!v3_0.isNull(22)) {
                        v6_22 = v3_0.getLong(22);
                    } else {
                        v6_22 = 0;
                    }
                    v4_2.i(v6_22);
                    if (!v3_0.isNull(23)) {
                        if (v3_0.getInt(23) == 0) {
                            v12 = 0;
                        } else {
                        }
                    }
                    v4_2.b(v12);
                    v4_2.a.p().b();
                    v4_2.y = 0;
                    if (v3_0.moveToNext()) {
                        this.o().f.a("Got multiple records for app, expected one. appId", c.e.a.a.h.ya.a(p22));
                    }
                    v3_0.close();
                    return v4_2;
                } else {
                    v3_0.close();
                    return 0;
                }
            } catch (c.e.a.a.h.Aa v0_1) {
                if (v3_0 != 0) {
                    v3_0.close();
                }
                throw v0_1;
            } catch (c.e.a.a.h.Aa v0_2) {
            }
        } catch (c.e.a.a.h.Aa v0_1) {
            v3_0 = 0;
        } catch (c.e.a.a.h.Aa v0_2) {
            v3_0 = 0;
        } catch (c.e.a.a.h.Aa v0_1) {
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p40, String[] p41)
    {
        this.b();
        this.s();
        Throwable v0_4 = new java.util.ArrayList();
        try {
            c.e.a.a.h.Aa v2_3 = this.w();
            c.e.a.a.h.X v4_9 = new String[13];
            int v11_0 = 0;
            v4_9[0] = "app_id";
            v4_9[1] = "origin";
            v4_9[2] = "name";
            v4_9[3] = "value";
            v4_9[4] = "active";
            v4_9[5] = "trigger_event_name";
            v4_9[6] = "trigger_timeout";
            v4_9[7] = "timed_out_event";
            v4_9[8] = "creation_timestamp";
            v4_9[9] = "triggered_event";
            v4_9[10] = "triggered_timestamp";
            v4_9[11] = "time_to_live";
            v4_9[12] = "expired_event";
            int v1_3 = 5;
            c.e.a.a.h.Aa v2_2 = v2_3.query("conditional_properties", v4_9, p40, p41, 0, 0, "rowid", "1001");
            try {
                if (!v2_2.moveToFirst()) {
                    v2_2.close();
                    return v0_4;
                }
            } catch (Throwable v0_2) {
                if (v2_2 != null) {
                    v2_2.close();
                }
                throw v0_2;
            } catch (Throwable v0_0) {
                int v1_6 = v2_2;
                try {
                    this.o().f.a("Error querying conditional user property value", v0_0);
                    Throwable v0_1 = java.util.Collections.emptyList();
                } catch (Throwable v0_2) {
                    v2_2 = v1_6;
                }
                if (v1_6 != 0) {
                    v1_6.close();
                }
                return v0_1;
            }
            while (v0_4.size() < 1000) {
                int v22_1;
                String v3_5 = v2_2.getString(v11_0);
                String v10_2 = v2_2.getString(1);
                String v5_13 = v2_2.getString(2);
                Object v8_2 = this.a(v2_2, 3);
                if (v2_2.getInt(4) == 0) {
                    v22_1 = 0;
                } else {
                    v22_1 = 1;
                }
                c.e.a.a.h.ma v24_1 = v2_2.getString(v1_3);
                long v25 = v2_2.getLong(6);
                int v1_1 = ((c.e.a.a.h.ma) this.k().a(v2_2.getBlob(7), c.e.a.a.h.ma.CREATOR));
                c.e.a.a.h.ma v27_0 = v2_2.getLong(8);
                c.e.a.a.h.ma v29_1 = ((c.e.a.a.h.ma) this.k().a(v2_2.getBlob(9), c.e.a.a.h.ma.CREATOR));
                c.e.a.a.h.X v16_0 = v2_2.getLong(10);
                long v31 = v2_2.getLong(11);
                c.e.a.a.h.ma v30_1 = ((c.e.a.a.h.ma) this.k().a(v2_2.getBlob(12), c.e.a.a.h.ma.CREATOR));
                c.e.a.a.h.xc v33 = new c.e.a.a.h.xc;
                int v35 = 10;
                int v37 = 7;
                v33(v5_13, v16_0, v8_2, v10_2);
                c.e.a.a.h.X v4_5 = new c.e.a.a.h.X;
                v4_5(v3_5, v10_2, v33, v27_0, v22_1, v24_1, v1_1, v25, v29_1, v31, v30_1);
                v0_4.add(v4_5);
                if (v2_2.moveToNext()) {
                    v1_3 = 5;
                    v11_0 = 0;
                }
                v2_2.close();
                return v0_4;
            }
            this.o().f.a("Read more than the max allowed conditional properties, ignoring extra", Integer.valueOf(1000));
            v2_2.close();
            return v0_4;
        } catch (Throwable v0_2) {
            v2_2 = 0;
        } catch (Throwable v0_0) {
            v1_6 = 0;
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p22, String p23, String p24)
    {
        a.b.f.a.H.c(p22);
        this.b();
        this.s();
        android.database.sqlite.SQLiteException v0_3 = new java.util.ArrayList();
        android.database.Cursor v1 = 0;
        try {
            int v3_1 = 3;
            android.database.Cursor v2_8 = new java.util.ArrayList(3);
            try {
                String v5_0;
                v2_8.add(p22);
                c.e.a.a.h.zc v4_5 = new StringBuilder("app_id=?");
                try {
                    if (android.text.TextUtils.isEmpty(p23)) {
                        v5_0 = p23;
                    } else {
                        v5_0 = p23;
                        v2_8.add(p23);
                        v4_5.append(" and origin=?");
                    }
                } catch (android.database.sqlite.SQLiteException v0_0) {
                    android.database.Cursor v2_7 = 0;
                    this.o().f.a("(2)Error querying user properties", c.e.a.a.h.ya.a(p22), v5_0, v0_0);
                    if (v2_7 != null) {
                        v2_7.close();
                    }
                    return 0;
                }
                if (!android.text.TextUtils.isEmpty(p24)) {
                    v2_8.add(String.valueOf(p24).concat("*"));
                    v4_5.append(" and name glob ?");
                }
                String v6_8 = new String[v2_8.size()];
                String[] v16_1 = ((String[]) v2_8.toArray(v6_8));
                int v12_1 = this.w();
                ark>c.e.a.a.h.aaark> v14_0 = new String[4];
                int v10_1 = 0;
                v14_0[0] = "name";
                int v8_1 = 1;
                v14_0[1] = "set_timestamp";
                int v9 = 2;
                v14_0[2] = "value";
                v14_0[3] = "origin";
                v2_7 = v12_1.query("user_attributes", v14_0, v4_5.toString(), v16_1, 0, 0, "rowid", "1001");
                try {
                    if (!v2_7.moveToFirst()) {
                        v2_7.close();
                        return v0_3;
                    }
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    v1 = v2_7;
                    if (v1 != null) {
                        v1.close();
                    }
                    throw v0_1;
                } catch (android.database.sqlite.SQLiteException v0_0) {
                }
                while (v0_3.size() < 1000) {
                    Object v7_2 = v2_7.getString(v10_1);
                    int v12_2 = v2_7.getLong(v8_1);
                    try {
                        String v17_0;
                        Object v15_1 = this.a(v2_7, v9);
                        String v6_10 = v2_7.getString(v3_1);
                    } catch (android.database.sqlite.SQLiteException v0_0) {
                    }
                    if (v15_1 != null) {
                        try {
                            String v5_4 = new c.e.a.a.h.zc;
                            int v3_6 = v5_4;
                            v17_0 = v6_10;
                            int v19 = 1;
                            try {
                                v5_4(p22, v6_10, v7_2, v12_2, v15_1);
                                v0_3.add(v3_6);
                            } catch (android.database.sqlite.SQLiteException v0_0) {
                                v5_0 = v17_0;
                            }
                        } catch (android.database.sqlite.SQLiteException v0_0) {
                            v17_0 = v6_10;
                        }
                    } else {
                        try {
                            this.o().f.a("(2)Read invalid user property value, ignoring it", c.e.a.a.h.ya.a(p22), v6_10, p24);
                            v17_0 = v6_10;
                            int v18 = 2;
                        } catch (android.database.sqlite.SQLiteException v0_0) {
                            v5_0 = v6_10;
                        }
                    }
                    if (v2_7.moveToNext()) {
                        v5_0 = v17_0;
                        v3_1 = 3;
                        v8_1 = 1;
                        v9 = 2;
                        v10_1 = 0;
                    }
                    v2_7.close();
                    return v0_3;
                }
                this.o().f.a("Read more than the max allowed user properties, ignoring excess", Integer.valueOf(1000));
                v2_7.close();
                return v0_3;
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v5_0 = p23;
            }
        } catch (android.database.sqlite.SQLiteException v0_1) {
        } catch (android.database.sqlite.SQLiteException v0_0) {
            String v11 = p22;
        } catch (android.database.sqlite.SQLiteException v0_1) {
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p13, int p14, int p15)
    {
        android.database.Cursor v2_2;
        this.b();
        this.s();
        if (p14 <= null) {
            v2_2 = 0;
        } else {
            v2_2 = 1;
        }
        android.database.Cursor v2_0;
        a.b.f.a.H.c(v2_2);
        if (p15 <= null) {
            v2_0 = 0;
        } else {
            v2_0 = 1;
        }
        a.b.f.a.H.c(v2_0);
        a.b.f.a.H.c(p13);
        try {
            int v3_0 = this.w();
            c.e.a.a.h.Aa v5_1 = new String[2];
            v5_1[0] = "rowid";
            v5_1[1] = "data";
            Object v7_0 = new String[1];
            v7_0[0] = p13;
            android.database.Cursor v2_1 = v3_0.query("queue", v5_1, "app_id=?", v7_0, 0, 0, "rowid", String.valueOf(p14));
        } catch (java.util.List v13_4) {
            if (v2_1 != null) {
                v2_1.close();
            }
            throw v13_4;
        } catch (java.util.ArrayList v14_4) {
            this.o().f.a("Error querying bundles. appId", c.e.a.a.h.ya.a(p13), v14_4);
            java.util.List v13_3 = java.util.Collections.emptyList();
            if (v2_1 != null) {
                v2_1.close();
            }
            return v13_3;
        }
        if (v2_1.moveToFirst()) {
            java.util.ArrayList v14_3 = new java.util.ArrayList();
            int v3_1 = 0;
            do {
                android.util.Pair v4_1 = v2_1.getLong(0);
                int v6_4 = this.k().b(v2_1.getBlob(1));
                if ((!v14_3.isEmpty()) && ((v6_4.length + v3_1) > p15)) {
                    break;
                }
                Object v7_7 = c.e.a.a.h.md.a(v6_4, v6_4.length);
                c.e.a.a.h.Qc v8_2 = new c.e.a.a.h.Qc();
                v8_2.a(v7_7);
                v3_1 += v6_4.length;
                v14_3.add(android.util.Pair.create(v8_2, Long.valueOf(v4_1)));
            } while((v2_1.moveToNext()) && (v3_1 <= p15));
            v2_1.close();
            return v14_3;
        } else {
            java.util.List v13_1 = java.util.Collections.emptyList();
            v2_1.close();
            return v13_1;
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p23)
    {
        a.b.f.a.H.c(p23);
        this.b();
        this.s();
        android.database.sqlite.SQLiteException v0_3 = new java.util.ArrayList();
        try {
            int v2_1 = this.w();
            boolean v4_0 = new String[4];
            v4_0[0] = "name";
            v4_0[1] = "origin";
            v4_0[2] = "set_timestamp";
            v4_0[3] = "value";
            Object v6_0 = new String[1];
            v6_0[0] = p23;
            int v2_0 = v2_1.query("user_attributes", v4_0, "app_id=?", v6_0, 0, 0, "rowid", "1000");
            try {
                if (!v2_0.moveToFirst()) {
                    v2_0.close();
                    return v0_3;
                }
            } catch (android.database.sqlite.SQLiteException v0_2) {
                if (v2_0 != 0) {
                    v2_0.close();
                }
                throw v0_2;
            } catch (android.database.sqlite.SQLiteException v0_1) {
                this.o().f.a("Error querying user properties. appId", c.e.a.a.h.ya.a(p23), v0_1);
                if (v2_0 != 0) {
                    v2_0.close();
                }
                return 0;
            }
            do {
                String v18 = v2_0.getString(0);
                ark>c.e.a.a.h.aaark> v3_1 = v2_0.getString(1);
                if (v3_1 == null) {
                    v3_1 = "";
                }
                String v17 = v3_1;
                long v19 = v2_0.getLong(2);
                try {
                    Object v21 = this.a(v2_0, 3);
                } catch (android.database.sqlite.SQLiteException v0_1) {
                }
                if (v21 != null) {
                    boolean v4_1 = new c.e.a.a.h.zc;
                    v4_1(p23, v17, v18, v19, v21);
                    v0_3.add(v4_1);
                } else {
                    this.o().f.a("Read invalid user property value, ignoring it. appId", c.e.a.a.h.ya.a(p23));
                }
            } while(v2_0.moveToNext());
            v2_0.close();
            return v0_3;
        } catch (android.database.sqlite.SQLiteException v0_2) {
            v2_0 = 0;
        } catch (android.database.sqlite.SQLiteException v0_1) {
            v2_0 = 0;
        } catch (android.database.sqlite.SQLiteException v0_2) {
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final c.e.a.a.h.ia a(String p23, String p24)
    {
        a.b.f.a.H.c(p23);
        a.b.f.a.H.c(p24);
        this.b();
        this.s();
        try {
            String v1_3 = this.w();
            String v3_0 = new String[7];
            int v9 = 0;
            v3_0[0] = "lifetime_count";
            v3_0[1] = "current_bundle_count";
            v3_0[2] = "last_fire_timestamp";
            v3_0[3] = "last_bundled_timestamp";
            v3_0[4] = "last_sampled_complex_event_id";
            v3_0[5] = "last_sampling_rate";
            v3_0[6] = "last_exempt_from_sampling";
            String[] v5 = new String[2];
            v5[0] = p23;
            v5[1] = p24;
            long v8_3 = v1_3.query("events", v3_0, "app_id=? and name=?", v5, 0, 0, 0);
            try {
                if (v8_3.moveToFirst()) {
                    c.e.a.a.h.Aa v0_15;
                    long v4_3 = v8_3.getLong(0);
                    long v6_1 = v8_3.getLong(1);
                    long v18 = v8_3.getLong(2);
                    if (!v8_3.isNull(3)) {
                        v0_15 = v8_3.getLong(3);
                    } else {
                        v0_15 = 0;
                    }
                    c.e.a.a.h.Aa v0_18;
                    long v11_1 = v0_15;
                    if (!v8_3.isNull(4)) {
                        v0_18 = Long.valueOf(v8_3.getLong(4));
                    } else {
                        v0_18 = 0;
                    }
                    Long v13_1;
                    if (!v8_3.isNull(5)) {
                        v13_1 = Long.valueOf(v8_3.getLong(5));
                    } else {
                        v13_1 = 0;
                    }
                    Boolean v14_1;
                    if (v8_3.isNull(6)) {
                        v14_1 = 0;
                    } else {
                        if (v8_3.getLong(6) == 1) {
                            v9 = 1;
                        }
                        v14_1 = Boolean.valueOf(v9);
                    }
                    c.e.a.a.h.ia v17 = new c.e.a.a.h.ia;
                    android.database.Cursor v20_0 = v8_3;
                    try {
                        v17(p23, p24, v4_3, v6_1, v18, v11_1, v0_18, v13_1, v14_1);
                    } catch (c.e.a.a.h.Aa v0_4) {
                        this.o().f.a("Error querying events. appId", c.e.a.a.h.ya.a(p23), this.j().a(p24), v0_4);
                        if (v20_0 != null) {
                            v20_0.close();
                        }
                        return 0;
                    }
                    if (v20_0.moveToNext()) {
                        this.o().f.a("Got multiple records for event aggregates, expected one. appId", c.e.a.a.h.ya.a(p23));
                    }
                    v20_0.close();
                    return v17;
                } else {
                    v8_3.close();
                    return 0;
                }
            } catch (c.e.a.a.h.Aa v0_5) {
                v20_0 = v8_3;
                if (v20_0 != null) {
                    v20_0.close();
                }
                throw v0_5;
            } catch (c.e.a.a.h.Aa v0_4) {
                v20_0 = v8_3;
            }
        } catch (c.e.a.a.h.Aa v0_5) {
            v20_0 = 0;
        } catch (c.e.a.a.h.Aa v0_4) {
            v20_0 = 0;
        } catch (c.e.a.a.h.Aa v0_5) {
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final c.e.a.a.h.ba a(long p22, String p24, boolean p25, boolean p26, boolean p27, boolean p28, boolean p29)
    {
        a.b.f.a.H.c(p24);
        this.b();
        this.s();
        String[] v7 = new String[1];
        v7[0] = p24;
        c.e.a.a.h.ba v9_1 = new c.e.a.a.h.ba();
        try {
            String[] v15_0 = this.w();
            long v13_0 = new String[6];
            v13_0[0] = "day";
            v13_0[1] = "daily_events_count";
            v13_0[2] = "daily_public_events_count";
            v13_0[3] = "daily_conversions_count";
            v13_0[4] = "daily_error_events_count";
            v13_0[5] = "daily_realtime_events_count";
            int v10_2 = new String[1];
            v10_2[0] = p24;
            android.database.sqlite.SQLiteDatabase v20 = v15_0;
            int v10_3 = v15_0.query("apps", v13_0, "app_id=?", v10_2, 0, 0, 0);
            try {
                if (v10_3.moveToFirst()) {
                    if (v10_3.getLong(0) == p22) {
                        v9_1.b = v10_3.getLong(1);
                        v9_1.a = v10_3.getLong(2);
                        v9_1.c = v10_3.getLong(3);
                        v9_1.d = v10_3.getLong(4);
                        v9_1.e = v10_3.getLong(5);
                    }
                    if (p25) {
                        v9_1.b = (v9_1.b + 1);
                    }
                    if (p26) {
                        v9_1.a = (v9_1.a + 1);
                    }
                    if (p27) {
                        v9_1.c = (v9_1.c + 1);
                    }
                    if (p28) {
                        v9_1.d = (v9_1.d + 1);
                    }
                    if (p29) {
                        v9_1.e = (v9_1.e + 1);
                    }
                    android.content.ContentValues v6_1 = new android.content.ContentValues();
                    v6_1.put("day", Long.valueOf(p22));
                    v6_1.put("daily_public_events_count", Long.valueOf(v9_1.a));
                    v6_1.put("daily_events_count", Long.valueOf(v9_1.b));
                    v6_1.put("daily_conversions_count", Long.valueOf(v9_1.c));
                    v6_1.put("daily_error_events_count", Long.valueOf(v9_1.d));
                    v6_1.put("daily_realtime_events_count", Long.valueOf(v9_1.e));
                    v20.update("apps", v6_1, "app_id=?", v7);
                    v10_3.close();
                    return v9_1;
                } else {
                    this.o().h.a("Not updating daily counts, app is not known. appId", c.e.a.a.h.ya.a(p24));
                    v10_3.close();
                    return v9_1;
                }
            } catch (String v0_5) {
                this.o().f.a("Error updating daily counts. appId", c.e.a.a.h.ya.a(p24), v0_5);
                if (v10_3 != 0) {
                    v10_3.close();
                }
                return v9_1;
            }
        } catch (String v0_1) {
            v10_3 = 0;
            if (v10_3 != 0) {
                v10_3.close();
            }
            throw v0_1;
        } catch (String v0_5) {
            v10_3 = 0;
        } catch (String v0_1) {
        }
    }

Method c.e.a.a.h.aa.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public static void a(c.e.a.a.h.ya p10, android.database.sqlite.SQLiteDatabase p11, String p12, String p13, String p14, String[] p15)
    {
        if (p10 == null) {
            throw new IllegalArgumentException("Monitor must not be null");
        } else {
            try {
                String v4_1 = new String[1];
                v4_1[0] = "name";
                String[] v6 = new String[1];
                v6[0] = p12;
                android.database.Cursor v0 = p11.query("SQLITE_MASTER", v4_1, "name=?", v6, 0, 0, 0);
                boolean v1_0 = v0.moveToFirst();
            } catch (c.e.a.a.h.Aa v10_2) {
                if (v0 != null) {
                    v0.close();
                }
                throw v10_2;
            } catch (android.database.sqlite.SQLiteException v2_1) {
                p10.h.a("Error querying for table", p12, v2_1);
                if (v0 == null) {
                    if (!v1_0) {
                        p11.execSQL(p13);
                    }
                    try {
                        ark>c.e.a.a.h.aaark>.a(p10, p11, p12, p14, p15);
                        return;
                    } catch (android.database.sqlite.SQLiteException v11_2) {
                        p10.f.a("Failed to verify columns on table that was just created", p12);
                        throw v11_2;
                    }
                } else {
                }
            }
            v0.close();
        }
    }

Method c.e.a.a.h.W.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final c.e.a.a.h.Mc[] a(String p53, c.e.a.a.h.Nc[] p54, c.e.a.a.h.Sc[] p55)
    {
        int v7_0 = this;
        String v13_5 = p54;
        c.e.a.a.h.Oc[] v14_4 = "current_results";
        android.database.sqlite.SQLiteException v11_8 = "audience_id";
        a.b.f.a.H.c(p53);
        String v12_14 = new java.util.HashSet();
        String v10_3 = new a.b.e.i.b();
        int v9_1 = new a.b.e.i.b();
        int v8_3 = new a.b.e.i.b();
        boolean v1_31 = this.i();
        v1_31.s();
        v1_31.b();
        a.b.f.a.H.c(p53);
        android.database.sqlite.SQLiteException v16_4 = v1_31.w();
        int v5_16 = 0;
        String v3_29 = 1;
        try {
            int v0_2;
            int v0_63 = new String[2];
            v0_63[0] = "audience_id";
            v0_63[1] = "current_results";
            c.e.a.a.h.Oc[] v2_36 = new String[1];
            v2_36[0] = p53;
            c.e.a.a.h.Oc[] v2_37 = v16_4.query("audience_filter_values", v0_63, "app_id=?", v2_36, 0, 0, 0);
            try {
                if (v2_37.moveToFirst()) {
                    int v4_20 = new a.b.e.i.b();
                    while(true) {
                        c.e.a.a.h.Oc[] v17_9 = v2_37.getInt(v5_16);
                        int v0_89 = v2_37.getBlob(v3_29);
                        int v0_90 = c.e.a.a.h.md.a(v0_89, v0_89.length);
                        int v6_35 = new c.e.a.a.h.Rc();
                        v6_35.a(v0_90);
                        v4_20.put(Integer.valueOf(v17_9), v6_35);
                        int v21_4 = v4_20;
                        if (!v2_37.moveToNext()) {
                            break;
                        }
                        v4_20 = v21_4;
                        v3_29 = 1;
                        v5_16 = 0;
                    }
                    v2_37.close();
                    v0_2 = v21_4;
                    if (v0_2 != 0) {
                        boolean v1_2 = v0_2.keySet().iterator();
                        while (v1_2.hasNext()) {
                            c.e.a.a.h.Oc[] v2_29 = ((Integer) v1_2.next()).intValue();
                            String v3_20 = ((c.e.a.a.h.Rc) v0_2.get(Integer.valueOf(v2_29)));
                            int v4_10 = ((java.util.BitSet) v9_1.get(Integer.valueOf(v2_29)));
                            int v5_7 = ((java.util.BitSet) v8_3.get(Integer.valueOf(v2_29)));
                            if (v4_10 == 0) {
                                v4_10 = new java.util.BitSet();
                                v9_1.put(Integer.valueOf(v2_29), v4_10);
                                v5_7 = new java.util.BitSet();
                                v8_3.put(Integer.valueOf(v2_29), v5_7);
                            }
                            c.e.a.a.h.Oc[] v17_5 = v0_2;
                            int v6_11 = 0;
                            while(true) {
                                int v0_44 = v3_20.c;
                                int v21_2 = v1_2;
                                if (v6_11 >= (v0_44.length << 6)) {
                                    break;
                                }
                                String v22_2;
                                String v23_1;
                                if (!c.e.a.a.h.Ac.a(v0_44, v6_11)) {
                                    v22_2 = v8_3;
                                    v23_1 = v9_1;
                                } else {
                                    v22_2 = v8_3;
                                    v23_1 = v9_1;
                                    this.o().l.a("Filter already evaluated. audience ID, filter ID", Integer.valueOf(v2_29), Integer.valueOf(v6_11));
                                    v5_7.set(v6_11);
                                    if (c.e.a.a.h.Ac.a(v3_20.d, v6_11)) {
                                        v4_10.set(v6_11);
                                    }
                                }
                                v6_11++;
                                v1_2 = v21_2;
                                v8_3 = v22_2;
                                v9_1 = v23_1;
                            }
                            String v23 = v9_1;
                            int v0_46 = new c.e.a.a.h.Mc();
                            v10_3.put(Integer.valueOf(v2_29), v0_46);
                            v0_46.g = Boolean.valueOf(0);
                            v0_46.f = v3_20;
                            v0_46.e = new c.e.a.a.h.Rc();
                            v0_46.e.d = c.e.a.a.h.Ac.a(v4_10);
                            v0_46.e.c = c.e.a.a.h.Ac.a(v5_7);
                            v0_2 = v17_5;
                            v1_2 = v21_2;
                        }
                    }
                    boolean v1_0;
                    android.database.sqlite.SQLiteException v11_7;
                    c.e.a.a.h.Oc[] v14_3;
                    String v12_12;
                    int v0_29;
                    int v45_2;
                    c.e.a.a.h.Oc[] v49_1;
                    c.e.a.a.h.Oc[] v15_9;
                    int v47_0;
                    int v51_1;
                    String v22_0 = v8_3;
                    String v23_0 = v9_1;
                    int v9_2 = "Filter definition";
                    int v8_1 = "Skipping failed audience ID";
                    int v6_3 = "Database error querying filters. appId";
                    if (p54 == null) {
                        v15_9 = "Skipping failed audience ID";
                        v47_0 = "Filter definition";
                        v49_1 = "audience_id";
                        v51_1 = "current_results";
                        v45_2 = v23_0;
                        v11_7 = "Database error querying filters. appId";
                        v14_3 = v12_14;
                        v12_12 = v10_3;
                        v1_0 = p53;
                        v0_29 = p55;
                    } else {
                        int v5_2 = new a.b.e.i.b();
                        String v3_12 = p54.length;
                        c.e.a.a.h.Sc[] v28_0 = p55;
                        v1_0 = p53;
                        c.e.a.a.h.Oc[] v29_0 = 0;
                        int v0_16 = 0;
                        c.e.a.a.h.Oc[] v2_24 = 0;
                        c.e.a.a.h.Oc[] v17_3 = 0;
                        while (v2_24 < v3_12) {
                            c.e.a.a.h.Aa v33_1;
                            c.e.a.a.h.Oc[] v49_0;
                            int v41_0;
                            c.e.a.a.h.Oc[] v29_2;
                            android.database.sqlite.SQLiteException v11_1;
                            int v41_2;
                            long v37_1;
                            int v5_3;
                            long v37_2;
                            int v51_0;
                            boolean v36;
                            android.database.sqlite.SQLiteException v43_3;
                            c.e.a.a.h.Oc[] v15_7;
                            int v45_0;
                            String v12_8;
                            int v4_39;
                            Boolean v30_1;
                            boolean v1_35;
                            c.e.a.a.h.Oc[] v14_1;
                            String v13_14;
                            int v47_1;
                            int v21_5 = v8_1;
                            int v8_18 = v13_5[v2_24];
                            int v31_1 = v9_2;
                            int v9_8 = v8_18.e;
                            int v32_1 = v10_3;
                            String v10_12 = v8_18.d;
                            int v34 = v2_24;
                            if (!v7_0.a.c.c(v1_0, c.e.a.a.h.oa.O)) {
                                v37_1 = v0_16;
                                v13_14 = v1_0;
                                v36 = v3_12;
                                v41_2 = v5_2;
                                v43_3 = v6_3;
                                v4_39 = v17_3;
                                v1_35 = v37_1;
                                v5_3 = v9_8;
                                v33_1 = v10_12;
                                v37_2 = v29_0;
                                v30_1 = v1_35;
                                v29_2 = v4_39;
                                c.e.a.a.h.Oc[] v50;
                                Integer v46;
                                c.e.a.a.h.Oc[] v44_0;
                                int v0_124;
                                c.e.a.a.h.Oc[] v2_0;
                                String v48_0;
                                int v0_123 = this.i().a(v13_14, v8_18.e);
                                if (v0_123 != 0) {
                                    v49_0 = v11_8;
                                    v50 = v12_14;
                                    v1_0 = v13_14;
                                    v2_0 = v14_4;
                                    v44_0 = v21_5;
                                    v46 = v22_0;
                                    v45_0 = v23_0;
                                    v47_1 = v31_1;
                                    v48_0 = v32_1;
                                    v0_124 = v0_123.a();
                                } else {
                                    this.o().h.a("Event aggregate wasn\'t created during raw event logging. appId, event", c.e.a.a.h.ya.a(p53), this.j().a(v5_3));
                                    v0_124 = new c.e.a.a.h.ia;
                                    v44_0 = v21_5;
                                    v46 = v22_0;
                                    v45_0 = v23_0;
                                    v47_1 = v31_1;
                                    v48_0 = v32_1;
                                    v49_0 = v11_8;
                                    v50 = v12_14;
                                    v1_0 = v13_14;
                                    v2_0 = v14_4;
                                    v0_124(p53, v8_18.e, 1, 1, v8_18.f.longValue(), 0, 0, 0, 0);
                                }
                                int v19_1;
                                this.i().a(v0_124);
                                int v8_0 = v0_124.c;
                                String v10_0 = v41_2;
                                int v0_1 = ((java.util.Map) v10_0.get(v5_3));
                                if (v0_1 != 0) {
                                    v19_1 = v2_0;
                                    v11_1 = v43_3;
                                } else {
                                    String v3_1 = this.i();
                                    v3_1.s();
                                    v3_1.b();
                                    a.b.f.a.H.c(p53);
                                    a.b.f.a.H.c(v5_3);
                                    int v6_1 = new a.b.e.i.b();
                                    android.database.sqlite.SQLiteException v11_2 = v3_1.w();
                                    try {
                                        String v13_1 = new String[2];
                                        c.e.a.a.h.Oc[] v14_0 = v49_0;
                                        try {
                                            v13_1[0] = v14_0;
                                            v13_1[1] = "data";
                                            v19_1 = v2_0;
                                            try {
                                                c.e.a.a.h.Oc[] v2_1 = new String[2];
                                                v2_1[0] = v1_0;
                                                v2_1[1] = v5_3;
                                                int v7_1 = v14_0;
                                                v14_0 = "app_id=? AND event_name=?";
                                                v49_0 = v7_1;
                                                try {
                                                    c.e.a.a.h.Oc[] v2_2 = v11_2.query("event_filters", v13_1, "app_id=? AND event_name=?", v2_1, 0, 0, 0);
                                                    try {
                                                        if (v2_2.moveToFirst()) {
                                                            do {
                                                                int v0_7 = v2_2.getBlob(1);
                                                                int v0_8 = c.e.a.a.h.md.a(v0_7, v0_7.length);
                                                                android.database.sqlite.SQLiteException v11_5 = new c.e.a.a.h.Ec();
                                                                v11_5.a(v0_8);
                                                                int v0_12 = v2_2.getInt(0);
                                                                String v12_5 = ((java.util.List) v6_1.get(Integer.valueOf(v0_12)));
                                                                if (v12_5 == null) {
                                                                    v12_5 = new java.util.ArrayList();
                                                                    v6_1.put(Integer.valueOf(v0_12), v12_5);
                                                                }
                                                                v12_5.add(v11_5);
                                                            } while(v2_2.moveToNext());
                                                            v2_2.close();
                                                            v0_1 = v6_1;
                                                        } else {
                                                            v0_1 = java.util.Collections.emptyMap();
                                                            v2_2.close();
                                                        }
                                                        v11_1 = v43_3;
                                                        if (v0_1 == 0) {
                                                            v0_1 = new a.b.e.i.b();
                                                        }
                                                        v10_0.put(v5_3, v0_1);
                                                    } catch (int v0_3) {
                                                        v11_1 = v43_3;
                                                        v3_1.o().f.a(v11_1, c.e.a.a.h.ya.a(p53), v0_3);
                                                        if (v2_2 != null) {
                                                            v2_2.close();
                                                        }
                                                        v0_1 = 0;
                                                    }
                                                } catch (int v0_3) {
                                                    v2_2 = 0;
                                                }
                                            } catch (int v0_3) {
                                                v49_0 = v14_0;
                                            }
                                        } catch (int v0_3) {
                                            v19_1 = v2_0;
                                        }
                                    } catch (int v0_5) {
                                        String v42_0 = 0;
                                        if (v42_0 != null) {
                                            v42_0.close();
                                        }
                                        throw v0_5;
                                    } catch (int v0_3) {
                                        v19_1 = v2_0;
                                    } catch (int v0_5) {
                                        v42_0 = v2_2;
                                    }
                                }
                                String v12_7 = v0_1.keySet().iterator();
                                while (v12_7.hasNext()) {
                                    String v13_3 = ((Integer) v12_7.next()).intValue();
                                    c.e.a.a.h.Oc[] v14_2 = v50;
                                    if (!v14_2.contains(Integer.valueOf(v13_3))) {
                                        c.e.a.a.h.Oc[] v15_8 = v44_0;
                                        int v6_4 = v48_0;
                                        String v3_4 = v45_0;
                                        c.e.a.a.h.Oc[] v2_12 = ((java.util.BitSet) v3_4.get(Integer.valueOf(v13_3)));
                                        int v41_1 = v10_0;
                                        String v10_1 = v46;
                                        int v7_5 = ((java.util.BitSet) v10_1.get(Integer.valueOf(v13_3)));
                                        if (((c.e.a.a.h.Mc) v6_4.get(Integer.valueOf(v13_3))) == null) {
                                            boolean v1_7 = new c.e.a.a.h.Mc();
                                            v6_4.put(Integer.valueOf(v13_3), v1_7);
                                            v1_7.g = Boolean.valueOf(1);
                                            v2_12 = new java.util.BitSet();
                                            v3_4.put(Integer.valueOf(v13_3), v2_12);
                                            v7_5 = new java.util.BitSet();
                                            v10_1.put(Integer.valueOf(v13_3), v7_5);
                                        }
                                        android.database.sqlite.SQLiteException v16_2 = ((java.util.List) v0_1.get(Integer.valueOf(v13_3))).iterator();
                                        while (v16_2.hasNext()) {
                                            String v18_2;
                                            String v48_1;
                                            String v12_9;
                                            boolean v1_15 = ((c.e.a.a.h.Ec) v16_2.next());
                                            c.e.a.a.h.Oc[] v17_4 = v0_1;
                                            int v45_1 = v3_4;
                                            if (!this.o().a(2)) {
                                                v48_1 = v6_4;
                                                v18_2 = v12_7;
                                                v12_9 = v47_1;
                                            } else {
                                                v48_1 = v6_4;
                                                v18_2 = v12_7;
                                                this.o().y().a("Evaluating filter. audience, filter, event", Integer.valueOf(v13_3), v1_15.d, this.j().a(v1_15.e));
                                                v12_9 = v47_1;
                                                this.o().y().a(v12_9, this.j().a(v1_15));
                                            }
                                            int v51_2;
                                            String v22_1;
                                            int v19_2;
                                            String v12_13;
                                            String v10_2;
                                            int v0_23 = v1_15.d;
                                            if ((v0_23 != 0) && (v0_23.intValue() <= 256)) {
                                                if (!v2_12.get(v1_15.d.intValue())) {
                                                    String v3_11;
                                                    int v0_28 = v1_15;
                                                    v22_1 = v10_1;
                                                    v47_1 = v12_9;
                                                    v10_2 = v2_12;
                                                    v51_2 = v19_1;
                                                    v19_2 = v5_3;
                                                    v12_13 = v48_1;
                                                    boolean v1_17 = this.a(v0_28, v5_3, v33_1, v8_0);
                                                    c.e.a.a.h.Aa vtmp279 = this.o().y();
                                                    if (v1_17) {
                                                        v3_11 = v1_17;
                                                    } else {
                                                        v3_11 = "null";
                                                    }
                                                    vtmp279.a("Event filter result", v3_11);
                                                    if (v1_17) {
                                                        v7_5.set(v0_28.d.intValue());
                                                        if (v1_17.booleanValue()) {
                                                            v10_2.set(v0_28.d.intValue());
                                                        }
                                                    } else {
                                                        v14_2.add(Integer.valueOf(v13_3));
                                                    }
                                                } else {
                                                    this.o().y().a("Event filter already evaluated true. audience ID, filter ID", Integer.valueOf(v13_3), v1_15.d);
                                                    v22_1 = v10_1;
                                                    v47_1 = v12_9;
                                                    v51_2 = v19_1;
                                                    v12_13 = v48_1;
                                                    v10_2 = v2_12;
                                                    v19_2 = v5_3;
                                                }
                                            } else {
                                                v22_1 = v10_1;
                                                v47_1 = v12_9;
                                                v51_2 = v19_1;
                                                v12_13 = v48_1;
                                                v10_2 = v2_12;
                                                v19_2 = v5_3;
                                                this.o().w().a("Invalid event filter ID. appId, id", c.e.a.a.h.ya.a(p53), String.valueOf(v1_15.d));
                                            }
                                            v28_0 = p55;
                                            v2_12 = v10_2;
                                            v6_4 = v12_13;
                                            v0_1 = v17_4;
                                            v12_7 = v18_2;
                                            v5_3 = v19_2;
                                            v10_1 = v22_1;
                                            v3_4 = v45_1;
                                            v19_1 = v51_2;
                                        }
                                        v1_0 = p53;
                                        v45_0 = v3_4;
                                        v48_0 = v6_4;
                                        v46 = v10_1;
                                        v50 = v14_2;
                                        v44_0 = v15_8;
                                        v10_0 = v41_1;
                                    } else {
                                        this.o().y().a(v44_0, Integer.valueOf(v13_3));
                                        v50 = v14_2;
                                    }
                                }
                                v41_0 = v10_0;
                                v51_0 = v19_1;
                                v15_7 = v44_0;
                                v22_0 = v46;
                                v12_8 = v48_0;
                                v14_1 = v50;
                                v17_3 = v29_2;
                                v0_16 = v30_1;
                                v29_0 = v37_2;
                            } else {
                                Object v35_0;
                                this.k();
                                int v4_38 = ((Long) c.e.a.a.h.Ac.b(v8_18, "_eid"));
                                if (v4_38 == 0) {
                                    v35_0 = 0;
                                } else {
                                    v35_0 = 1;
                                }
                                String v3_61;
                                if (v35_0 == null) {
                                    v36 = v3_12;
                                    v3_61 = 0;
                                } else {
                                    v36 = v3_12;
                                    if (!v9_8.equals("_ep")) {
                                    } else {
                                        v3_61 = 1;
                                    }
                                }
                                if (v3_61 == null) {
                                    v37_1 = v0_16;
                                    v13_14 = v1_0;
                                    v41_2 = v5_2;
                                    v43_3 = v6_3;
                                    if (v35_0 == null) {
                                    } else {
                                        this.k();
                                        int v0_103 = Long.valueOf(0);
                                        boolean v1_37 = c.e.a.a.h.Ac.b(v8_18, "_epc");
                                        if (v1_37) {
                                            v0_103 = v1_37;
                                        }
                                        int v0_106;
                                        android.database.sqlite.SQLiteException v16_8 = ((Long) v0_103).longValue();
                                        if (v16_8 > 0) {
                                            v0_106 = v4_38;
                                            this.i().a(p53, v4_38, v16_8, v8_18);
                                        } else {
                                            this.o().w().a("Complex event with zero extra param count. eventName", v9_8);
                                            v0_106 = v4_38;
                                        }
                                        v29_2 = v0_106;
                                        v30_1 = v8_18;
                                        v5_3 = v9_8;
                                        v33_1 = v10_12;
                                        v37_2 = v16_8;
                                    }
                                } else {
                                    long v37_0;
                                    String v13_4;
                                    android.database.sqlite.SQLiteException v43_0;
                                    this.k();
                                    v9_8 = ((String) c.e.a.a.h.Ac.b(v8_18, "_en"));
                                    if (!android.text.TextUtils.isEmpty(v9_8)) {
                                        if ((v0_16 != 0) && ((v17_3 != null) && (v4_38.longValue() == v17_3.longValue()))) {
                                            String v3_67 = v0_16;
                                        } else {
                                            String v3_69 = this.i().a(v1_0, v4_38);
                                            if (v3_69 == null) {
                                                v37_0 = v0_16;
                                            } else {
                                                v37_0 = v0_16;
                                                int v0_109 = v3_69.first;
                                                if (v0_109 != 0) {
                                                    int v0_110 = ((c.e.a.a.h.Nc) v0_109);
                                                    v29_0 = ((Long) v3_69.second).longValue();
                                                    this.k();
                                                    v3_67 = v0_110;
                                                    v17_3 = ((Long) c.e.a.a.h.Ac.b(v0_110, "_eid"));
                                                    Object v35_1;
                                                    v29_0--;
                                                    if (v29_0 > 0) {
                                                        v35_1 = v3_67;
                                                        int v20 = 0;
                                                        v13_14 = v1_0;
                                                        v41_2 = v5_2;
                                                        v43_3 = v6_3;
                                                        this.i().a(p53, v4_38, v29_0, v35_1);
                                                    } else {
                                                        c.e.a.a.h.Oc[] v2_80 = this.i();
                                                        v2_80.b();
                                                        v2_80.o().y().a("Clearing complex main event info. appId", v1_0);
                                                        try {
                                                            int v0_115 = v2_80.w();
                                                            v35_1 = v3_67;
                                                            int v19_6 = v5_2;
                                                            try {
                                                                int v5_22 = new String[1];
                                                                try {
                                                                    v5_22[0] = v1_0;
                                                                    v0_115.execSQL("delete from main_event_params where app_id=?", v5_22);
                                                                } catch (int v0_116) {
                                                                    v2_80.o().B().a("Error clearing complex main event", v0_116);
                                                                }
                                                                v13_14 = v1_0;
                                                                v43_3 = v6_3;
                                                                v41_2 = v19_6;
                                                            } catch (int v0_116) {
                                                            }
                                                        } catch (int v0_116) {
                                                            v35_1 = 1;
                                                            v19_6 = v5_2;
                                                        }
                                                    }
                                                    v1_35 = v35_1;
                                                    int v0_41 = v1_35.d;
                                                    c.e.a.a.h.Oc[] v2_85 = new c.e.a.a.h.Oc[(v0_41.length + v10_12.length)];
                                                    String v3_76 = v0_41.length;
                                                    int v4_7 = 0;
                                                    int v5_4 = 0;
                                                    while (v4_7 < v3_76) {
                                                        int v6_9 = v0_41[v4_7];
                                                        this.k();
                                                        android.database.sqlite.SQLiteException v16_3 = v0_41;
                                                        if (c.e.a.a.h.Ac.a(v8_18, v6_9.d) == null) {
                                                            int v0_40 = (v5_4 + 1);
                                                            v2_85[v5_4] = v6_9;
                                                            v5_4 = v0_40;
                                                        }
                                                        v4_7++;
                                                        v0_41 = v16_3;
                                                    }
                                                    if (v5_4 <= 0) {
                                                        this.o().w().a("No unique parameters in main event. eventName", v9_8);
                                                        v4_39 = v17_3;
                                                    } else {
                                                        int v0_119 = v10_12.length;
                                                        String v3_16 = 0;
                                                        while (v3_16 < v0_119) {
                                                            int v6_8 = (v5_4 + 1);
                                                            v2_85[v5_4] = v10_12[v3_16];
                                                            v3_16++;
                                                            v5_4 = v6_8;
                                                        }
                                                        if (v5_4 != v2_85.length) {
                                                            v2_85 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v2_85, v5_4));
                                                        }
                                                        v33_1 = v2_85;
                                                        v5_3 = v9_8;
                                                        v37_2 = v29_0;
                                                        v30_1 = v1_35;
                                                        v29_2 = v17_3;
                                                    }
                                                }
                                            }
                                            v13_4 = v1_0;
                                            v41_0 = v5_2;
                                            v43_0 = v6_3;
                                            this.o().B().a("Extra parameter without existing main event. eventName, eventId", v9_8, v4_38);
                                            v49_0 = v11_8;
                                            v1_0 = v13_4;
                                            v51_0 = v14_4;
                                            v15_7 = v21_5;
                                            v45_0 = v23_0;
                                            v47_1 = v31_1;
                                            v0_16 = v37_0;
                                            v11_1 = v43_0;
                                            v14_1 = v12_14;
                                            v12_8 = v32_1;
                                            v2_24 = (v34 + 1);
                                            v7_0 = this;
                                            v13_5 = p54;
                                            v6_3 = v11_1;
                                            v10_3 = v12_8;
                                            v12_14 = v14_1;
                                            v8_1 = v15_7;
                                            v3_12 = v36;
                                            v5_2 = v41_0;
                                            v23_0 = v45_0;
                                            v9_2 = v47_1;
                                            v11_8 = v49_0;
                                            v14_4 = v51_0;
                                        }
                                    } else {
                                        this.o().B().a("Extra parameter without an event name. eventId", v4_38);
                                        v37_0 = v0_16;
                                        v13_4 = v1_0;
                                        v41_0 = v5_2;
                                        v43_0 = v6_3;
                                    }
                                }
                            }
                        }
                        v15_9 = v8_1;
                        v47_0 = v9_2;
                        v49_1 = v11_8;
                        v51_1 = v14_4;
                        v45_2 = v23_0;
                        v11_7 = v6_3;
                        v14_3 = v12_14;
                        v12_12 = v10_3;
                        v0_29 = v28_0;
                    }
                    if (v0_29 != 0) {
                        c.e.a.a.h.Oc[] v2_33 = new a.b.e.i.b();
                        String v3_21 = v0_29.length;
                        int v4_12 = v1_0;
                        boolean v1_33 = 0;
                        while (v1_33 < v3_21) {
                            int v5_19 = v0_29[v1_33];
                            int v0_70 = ((java.util.Map) v2_33.get(v5_19.e));
                            if (v0_70 == 0) {
                                int v6_26 = this.i();
                                int v0_71 = v5_19.e;
                                v6_26.s();
                                v6_26.b();
                                a.b.f.a.H.c(p53);
                                a.b.f.a.H.c(v0_71);
                                int v7_13 = new a.b.e.i.b();
                                android.database.sqlite.SQLiteDatabase v26_1 = v6_26.w();
                                try {
                                    int v9_5 = new String[2];
                                    v9_5[0] = v49_1;
                                    v9_5[1] = "data";
                                    String v13_8 = new String[2];
                                    v13_8[0] = v4_12;
                                    v13_8[1] = v0_71;
                                    int v4_15 = v26_1.query("property_filters", v9_5, "app_id=? AND property_name=?", v13_8, 0, 0, 0);
                                    try {
                                        if (!v4_15.moveToFirst()) {
                                            v0_70 = java.util.Collections.emptyMap();
                                            v4_15.close();
                                            if (v0_70 == 0) {
                                                v0_70 = new a.b.e.i.b();
                                            }
                                            v2_33.put(v5_19.e, v0_70);
                                            int v4_18 = v0_70.keySet().iterator();
                                            while (v4_18.hasNext()) {
                                                int v6_32 = ((Integer) v4_18.next()).intValue();
                                                if (!v14_3.contains(Integer.valueOf(v6_32))) {
                                                    String v10_11 = v45_2;
                                                    int v8_14 = ((java.util.BitSet) v10_11.get(Integer.valueOf(v6_32)));
                                                    int v9_7 = v22_0;
                                                    String v13_12 = ((java.util.BitSet) v9_7.get(Integer.valueOf(v6_32)));
                                                    if (((c.e.a.a.h.Mc) v12_12.get(Integer.valueOf(v6_32))) == null) {
                                                        int v7_21 = new c.e.a.a.h.Mc();
                                                        v12_12.put(Integer.valueOf(v6_32), v7_21);
                                                        v7_21.g = Boolean.valueOf(1);
                                                        v8_14 = new java.util.BitSet();
                                                        v10_11.put(Integer.valueOf(v6_32), v8_14);
                                                        v13_12 = new java.util.BitSet();
                                                        v9_7.put(Integer.valueOf(v6_32), v13_12);
                                                    }
                                                    int v7_27 = ((java.util.List) v0_70.get(Integer.valueOf(v6_32))).iterator();
                                                    while (v7_27.hasNext()) {
                                                        int v20_2;
                                                        int v4_21;
                                                        android.database.sqlite.SQLiteException v43_2;
                                                        int v19_4;
                                                        c.e.a.a.h.Hc v54_2 = v0_70;
                                                        int v0_88 = ((c.e.a.a.h.Hc) v7_27.next());
                                                        c.e.a.a.h.Oc[] v17_8 = v2_33;
                                                        String v18_5 = v3_21;
                                                        if (!this.o().a(2)) {
                                                            v19_4 = v4_18;
                                                            v20_2 = v7_27;
                                                            v43_2 = v11_7;
                                                            v4_21 = v47_0;
                                                        } else {
                                                            v19_4 = v4_18;
                                                            v20_2 = v7_27;
                                                            v43_2 = v11_7;
                                                            this.o().y().a("Evaluating filter. audience, filter, property", Integer.valueOf(v6_32), v0_88.d, this.j().c(v0_88.e));
                                                            v4_21 = v47_0;
                                                            this.o().y().a(v4_21, this.j().a(v0_88));
                                                        }
                                                        c.e.a.a.h.Oc[] v2_44 = v0_88.d;
                                                        if ((v2_44 != null) && (v2_44.intValue() <= 256)) {
                                                            if (!v8_14.get(v0_88.d.intValue())) {
                                                                c.e.a.a.h.Oc[] v15_13;
                                                                c.e.a.a.h.Oc[] v44_3;
                                                                int v4_32;
                                                                c.e.a.a.h.Oc[] v2_49 = v0_88.f;
                                                                if (v2_49 != null) {
                                                                    c.e.a.a.h.Oc[] v2_52;
                                                                    int v7_31 = Boolean.TRUE.equals(v2_49.f);
                                                                    android.database.sqlite.SQLiteException v11_12 = v5_19.g;
                                                                    if (v11_12 == null) {
                                                                        String v3_44;
                                                                        int v4_24;
                                                                        c.e.a.a.h.Oc[] v2_51;
                                                                        v47_0 = v4_21;
                                                                        v44_3 = v15_9;
                                                                        v15_13 = v49_1;
                                                                        String v3_41 = v5_19.i;
                                                                        if (v3_41 == null) {
                                                                            String v3_42 = v5_19.f;
                                                                            if (v3_42 == null) {
                                                                                v2_51 = this.o().w();
                                                                                v3_44 = this.j().c(v5_19.e);
                                                                                v4_24 = "User property has no value, property";
                                                                            } else {
                                                                                int v4_25 = v2_49.d;
                                                                                if (v4_25 != 0) {
                                                                                    v2_52 = this.a(v3_42, v4_25);
                                                                                    v4_32 = ark>c.e.a.a.h.Wark>.a(v2_52, v7_31);
                                                                                    String v3_57;
                                                                                    c.e.a.a.h.Oc[] v2_65 = this.o().y();
                                                                                    if (v4_32 != 0) {
                                                                                        v3_57 = v4_32;
                                                                                    } else {
                                                                                        v3_57 = "null";
                                                                                    }
                                                                                    v2_65.a("Property filter result", v3_57);
                                                                                    if (v4_32 != 0) {
                                                                                        v13_12.set(v0_88.d.intValue());
                                                                                        if (v4_32.booleanValue()) {
                                                                                            v8_14.set(v0_88.d.intValue());
                                                                                        }
                                                                                    } else {
                                                                                        v14_3.add(Integer.valueOf(v6_32));
                                                                                    }
                                                                                    v0_70 = v54_2;
                                                                                    v49_1 = v15_13;
                                                                                    v2_33 = v17_8;
                                                                                    v3_21 = v18_5;
                                                                                    v4_18 = v19_4;
                                                                                    v7_27 = v20_2;
                                                                                    v11_7 = v43_2;
                                                                                    v15_9 = v44_3;
                                                                                } else {
                                                                                    if (v2_49.e != null) {
                                                                                        if (!c.e.a.a.h.Ac.i(v3_42)) {
                                                                                            this.o().w().a("Invalid user property value for Numeric number filter. property, value", this.j().c(v5_19.e), v5_19.f);
                                                                                            v4_32 = 0;
                                                                                        } else {
                                                                                            v2_52 = this.a(v5_19.f, v2_49.e);
                                                                                        }
                                                                                    } else {
                                                                                        v2_51 = this.o().w();
                                                                                        v3_44 = this.j().c(v5_19.e);
                                                                                        v4_24 = "No string or number filter defined. property";
                                                                                    }
                                                                                }
                                                                            }
                                                                        } else {
                                                                            if (v2_49.e != null) {
                                                                                v2_52 = this.a(v3_41.doubleValue(), v2_49.e);
                                                                            } else {
                                                                                v2_51 = this.o().w();
                                                                                v3_44 = this.j().c(v5_19.e);
                                                                                v4_24 = "No number filter for double property. property";
                                                                            }
                                                                        }
                                                                        v2_51.a(v4_24, v3_44);
                                                                    } else {
                                                                        if (v2_49.e != null) {
                                                                            v47_0 = v4_21;
                                                                            v44_3 = v15_9;
                                                                            v15_13 = v49_1;
                                                                            v2_52 = this.a(v11_12.longValue(), v2_49.e);
                                                                        } else {
                                                                            this.o().w().a("No number filter for long property. property", this.j().c(v5_19.e));
                                                                            v47_0 = v4_21;
                                                                            v44_3 = v15_9;
                                                                            v15_13 = v49_1;
                                                                        }
                                                                    }
                                                                } else {
                                                                    this.o().w().a("Missing property filter. property", this.j().c(v5_19.e));
                                                                }
                                                            } else {
                                                                this.o().y().a("Property filter already evaluated true. audience ID, filter ID", Integer.valueOf(v6_32), v0_88.d);
                                                                v0_70 = v54_2;
                                                                v47_0 = v4_21;
                                                                v2_33 = v17_8;
                                                                v3_21 = v18_5;
                                                                v4_18 = v19_4;
                                                                v7_27 = v20_2;
                                                                v11_7 = v43_2;
                                                            }
                                                        } else {
                                                            v47_0 = v4_21;
                                                            c.e.a.a.h.Oc[] v44_2 = v15_9;
                                                            c.e.a.a.h.Oc[] v15_12 = v49_1;
                                                            this.o().w().a("Invalid property filter ID. appId, id", c.e.a.a.h.ya.a(p53), String.valueOf(v0_88.d));
                                                            v14_3.add(Integer.valueOf(v6_32));
                                                        }
                                                        v0_70 = v54_2;
                                                        v22_0 = v9_7;
                                                        v45_2 = v10_11;
                                                        v49_1 = v15_12;
                                                        v2_33 = v17_8;
                                                        v3_21 = v18_5;
                                                        v4_18 = v19_4;
                                                        v11_7 = v43_2;
                                                        v15_9 = v44_2;
                                                    }
                                                    v54_2 = v0_70;
                                                    v17_8 = v2_33;
                                                    v18_5 = v3_21;
                                                    v19_4 = v4_18;
                                                    v43_2 = v11_7;
                                                    v44_2 = v15_9;
                                                    v15_12 = v49_1;
                                                } else {
                                                    this.o().y().a(v15_9, Integer.valueOf(v6_32));
                                                }
                                            }
                                            c.e.a.a.h.Oc[] v17 = v2_33;
                                            String v10 = v45_2;
                                            android.database.sqlite.SQLiteException v11 = this;
                                            v1_33++;
                                            v4_12 = p53;
                                            v0_29 = p55;
                                        }
                                        do {
                                            int v0_75 = v4_15.getBlob(1);
                                            int v0_76 = c.e.a.a.h.md.a(v0_75, v0_75.length);
                                            int v8_10 = new c.e.a.a.h.Hc();
                                            v8_10.a(v0_76);
                                            int v0_80 = v4_15.getInt(0);
                                            String v10_9 = ((java.util.List) v7_13.get(Integer.valueOf(v0_80)));
                                            if (v10_9 == null) {
                                                v10_9 = new java.util.ArrayList();
                                                v7_13.put(Integer.valueOf(v0_80), v10_9);
                                            }
                                            v10_9.add(v8_10);
                                        } while(v4_15.moveToNext());
                                        v4_15.close();
                                        v0_70 = v7_13;
                                    } catch (int v0_72) {
                                        v6_26.o().f.a(v11_7, c.e.a.a.h.ya.a(p53), v0_72);
                                        if (v4_15 != 0) {
                                            v4_15.close();
                                        }
                                        v0_70 = 0;
                                    }
                                } catch (int v0_73) {
                                    String v42_1 = 0;
                                    if (v42_1 != null) {
                                        v42_1.close();
                                    }
                                    throw v0_73;
                                } catch (int v0_72) {
                                    v4_15 = 0;
                                } catch (int v0_73) {
                                    v42_1 = v4_15;
                                }
                            }
                        }
                    }
                    int v9_4 = v22_0;
                    String v10_4 = v45_2;
                    c.e.a.a.h.Oc[] v15_11 = v49_1;
                    boolean v1_34 = new c.e.a.a.h.Mc[v10_4.size()];
                    c.e.a.a.h.Oc[] v2_34 = v10_4.keySet().iterator();
                    int v5_10 = 0;
                    while (v2_34.hasNext()) {
                        int v0_60 = ((Integer) v2_34.next()).intValue();
                        if (!v14_3.contains(Integer.valueOf(v0_60))) {
                            String v3_26 = ((c.e.a.a.h.Mc) v12_12.get(Integer.valueOf(v0_60)));
                            if (v3_26 == null) {
                                v3_26 = new c.e.a.a.h.Mc();
                            }
                            int v4_13 = (v5_10 + 1);
                            v1_34[v5_10] = v3_26;
                            v3_26.d = Integer.valueOf(v0_60);
                            v3_26.e = new c.e.a.a.h.Rc();
                            v3_26.e.d = c.e.a.a.h.Ac.a(((java.util.BitSet) v10_4.get(Integer.valueOf(v0_60))));
                            v3_26.e.c = c.e.a.a.h.Ac.a(((java.util.BitSet) v9_4.get(Integer.valueOf(v0_60))));
                            int v5_17 = this.i();
                            String v3_28 = v3_26.e;
                            v5_17.s();
                            v5_17.b();
                            a.b.f.a.H.c(p53);
                            a.b.f.a.H.d(v3_28);
                            try {
                                int v6_22 = new byte[v3_28.c()];
                                int v7_9 = c.e.a.a.h.nd.a(v6_22, v6_22.length);
                                v3_28.a(v7_9);
                                v7_9.a();
                                String v3_31 = new android.content.ContentValues();
                                v3_31.put("app_id", p53);
                                v3_31.put(v15_11, Integer.valueOf(v0_60));
                                int v7_11 = v51_1;
                                v3_31.put(v7_11, v6_22);
                                try {
                                    c.e.a.a.h.Hc v54_1 = v2_34;
                                    try {
                                        if (v5_17.w().insertWithOnConflict("audience_filter_values", 0, v3_31, 5) != -1) {
                                            v2_34 = v54_1;
                                            v5_10 = v4_13;
                                            v51_1 = v7_11;
                                        } else {
                                            v5_17.o().B().a("Failed to insert filter results (got -1). appId", c.e.a.a.h.ya.a(p53));
                                        }
                                    } catch (int v0_62) {
                                        String v3_33 = v5_17.o().B();
                                        int v5_18 = c.e.a.a.h.ya.a(p53);
                                        int v6_23 = "Error storing filter results. appId";
                                        v3_33.a(v6_23, v5_18, v0_62);
                                    }
                                } catch (int v0_62) {
                                    v54_1 = 0;
                                }
                            } catch (int v0_62) {
                                v54_1 = v2_34;
                                v7_11 = v51_1;
                                v3_33 = v5_17.o().B();
                                v5_18 = c.e.a.a.h.ya.a(p53);
                                v6_23 = "Configuration loss. Failed to serialize filter results. appId";
                            }
                        }
                    }
                    return ((c.e.a.a.h.Mc[]) java.util.Arrays.copyOf(v1_34, v5_10));
                } else {
                    v2_37.close();
                    v0_2 = 0;
                }
            } catch (int v0_85) {
                int v4_46 = v2_37;
                android.database.sqlite.SQLiteException v16_6 = v4_46;
                if (v16_6 != null) {
                    v16_6.close();
                }
                throw v0_85;
            } catch (int v0_82) {
                try {
                    v1_31.o().f.a("Database error querying filter results. appId", c.e.a.a.h.ya.a(p53), v0_82);
                } catch (int v0_85) {
                    v4_46 = v2_37;
                }
                if (v2_37 == null) {
                } else {
                }
            }
        } catch (int v0_85) {
            v16_6 = 0;
        } catch (int v0_82) {
            v2_37 = 0;
        }
    }

Method c.e.a.a.h.W.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final c.e.a.a.h.Mc[] a(String p53, c.e.a.a.h.Nc[] p54, c.e.a.a.h.Sc[] p55)
    {
        int v7_0 = this;
        String v13_5 = p54;
        c.e.a.a.h.Oc[] v14_4 = "current_results";
        android.database.sqlite.SQLiteException v11_8 = "audience_id";
        a.b.f.a.H.c(p53);
        String v12_14 = new java.util.HashSet();
        String v10_3 = new a.b.e.i.b();
        int v9_1 = new a.b.e.i.b();
        int v8_3 = new a.b.e.i.b();
        boolean v1_31 = this.i();
        v1_31.s();
        v1_31.b();
        a.b.f.a.H.c(p53);
        android.database.sqlite.SQLiteException v16_4 = v1_31.w();
        int v5_16 = 0;
        String v3_29 = 1;
        try {
            int v0_2;
            int v0_63 = new String[2];
            v0_63[0] = "audience_id";
            v0_63[1] = "current_results";
            c.e.a.a.h.Oc[] v2_36 = new String[1];
            v2_36[0] = p53;
            c.e.a.a.h.Oc[] v2_37 = v16_4.query("audience_filter_values", v0_63, "app_id=?", v2_36, 0, 0, 0);
            try {
                if (v2_37.moveToFirst()) {
                    int v4_20 = new a.b.e.i.b();
                    while(true) {
                        c.e.a.a.h.Oc[] v17_9 = v2_37.getInt(v5_16);
                        int v0_89 = v2_37.getBlob(v3_29);
                        int v0_90 = c.e.a.a.h.md.a(v0_89, v0_89.length);
                        int v6_35 = new c.e.a.a.h.Rc();
                        v6_35.a(v0_90);
                        v4_20.put(Integer.valueOf(v17_9), v6_35);
                        int v21_4 = v4_20;
                        if (!v2_37.moveToNext()) {
                            break;
                        }
                        v4_20 = v21_4;
                        v3_29 = 1;
                        v5_16 = 0;
                    }
                    v2_37.close();
                    v0_2 = v21_4;
                    if (v0_2 != 0) {
                        boolean v1_2 = v0_2.keySet().iterator();
                        while (v1_2.hasNext()) {
                            c.e.a.a.h.Oc[] v2_29 = ((Integer) v1_2.next()).intValue();
                            String v3_20 = ((c.e.a.a.h.Rc) v0_2.get(Integer.valueOf(v2_29)));
                            int v4_10 = ((java.util.BitSet) v9_1.get(Integer.valueOf(v2_29)));
                            int v5_7 = ((java.util.BitSet) v8_3.get(Integer.valueOf(v2_29)));
                            if (v4_10 == 0) {
                                v4_10 = new java.util.BitSet();
                                v9_1.put(Integer.valueOf(v2_29), v4_10);
                                v5_7 = new java.util.BitSet();
                                v8_3.put(Integer.valueOf(v2_29), v5_7);
                            }
                            c.e.a.a.h.Oc[] v17_5 = v0_2;
                            int v6_11 = 0;
                            while(true) {
                                int v0_44 = v3_20.c;
                                int v21_2 = v1_2;
                                if (v6_11 >= (v0_44.length << 6)) {
                                    break;
                                }
                                String v23_1;
                                String v22_2;
                                if (!c.e.a.a.h.Ac.a(v0_44, v6_11)) {
                                    v22_2 = v8_3;
                                    v23_1 = v9_1;
                                } else {
                                    v22_2 = v8_3;
                                    v23_1 = v9_1;
                                    this.o().l.a("Filter already evaluated. audience ID, filter ID", Integer.valueOf(v2_29), Integer.valueOf(v6_11));
                                    v5_7.set(v6_11);
                                    if (c.e.a.a.h.Ac.a(v3_20.d, v6_11)) {
                                        v4_10.set(v6_11);
                                    }
                                }
                                v6_11++;
                                v1_2 = v21_2;
                                v8_3 = v22_2;
                                v9_1 = v23_1;
                            }
                            String v23 = v9_1;
                            int v0_46 = new c.e.a.a.h.Mc();
                            v10_3.put(Integer.valueOf(v2_29), v0_46);
                            v0_46.g = Boolean.valueOf(0);
                            v0_46.f = v3_20;
                            v0_46.e = new c.e.a.a.h.Rc();
                            v0_46.e.d = c.e.a.a.h.Ac.a(v4_10);
                            v0_46.e.c = c.e.a.a.h.Ac.a(v5_7);
                            v0_2 = v17_5;
                            v1_2 = v21_2;
                        }
                    }
                    boolean v1_0;
                    c.e.a.a.h.Oc[] v14_3;
                    android.database.sqlite.SQLiteException v11_7;
                    String v12_12;
                    c.e.a.a.h.Oc[] v49_1;
                    int v45_2;
                    int v0_29;
                    c.e.a.a.h.Oc[] v15_9;
                    int v47_0;
                    int v51_1;
                    String v22_0 = v8_3;
                    String v23_0 = v9_1;
                    int v9_2 = "Filter definition";
                    int v8_1 = "Skipping failed audience ID";
                    int v6_3 = "Database error querying filters. appId";
                    if (p54 == null) {
                        v15_9 = "Skipping failed audience ID";
                        v47_0 = "Filter definition";
                        v49_1 = "audience_id";
                        v51_1 = "current_results";
                        v45_2 = v23_0;
                        v11_7 = "Database error querying filters. appId";
                        v14_3 = v12_14;
                        v12_12 = v10_3;
                        v1_0 = p53;
                        v0_29 = p55;
                    } else {
                        int v5_2 = new a.b.e.i.b();
                        String v3_12 = p54.length;
                        c.e.a.a.h.Sc[] v28_0 = p55;
                        v1_0 = p53;
                        c.e.a.a.h.Oc[] v29_0 = 0;
                        int v0_16 = 0;
                        c.e.a.a.h.Oc[] v2_24 = 0;
                        c.e.a.a.h.Oc[] v17_3 = 0;
                        while (v2_24 < v3_12) {
                            long v37_1;
                            int v5_3;
                            long v37_2;
                            int v51_0;
                            boolean v36;
                            android.database.sqlite.SQLiteException v43_3;
                            c.e.a.a.h.Oc[] v15_7;
                            android.database.sqlite.SQLiteException v11_1;
                            int v45_0;
                            String v12_8;
                            int v4_39;
                            Boolean v30_1;
                            boolean v1_35;
                            String v13_14;
                            c.e.a.a.h.Oc[] v14_1;
                            int v47_1;
                            c.e.a.a.h.Aa v33_1;
                            c.e.a.a.h.Oc[] v49_0;
                            int v41_0;
                            c.e.a.a.h.Oc[] v29_2;
                            int v41_2;
                            int v21_5 = v8_1;
                            int v8_18 = v13_5[v2_24];
                            int v31_1 = v9_2;
                            int v9_8 = v8_18.e;
                            int v32_1 = v10_3;
                            String v10_12 = v8_18.d;
                            int v34 = v2_24;
                            if (!v7_0.a.c.c(v1_0, c.e.a.a.h.oa.O)) {
                                v37_1 = v0_16;
                                v13_14 = v1_0;
                                v36 = v3_12;
                                v41_2 = v5_2;
                                v43_3 = v6_3;
                                v4_39 = v17_3;
                                v1_35 = v37_1;
                                v5_3 = v9_8;
                                v33_1 = v10_12;
                                v37_2 = v29_0;
                                v30_1 = v1_35;
                                v29_2 = v4_39;
                                c.e.a.a.h.Oc[] v50;
                                Integer v46;
                                c.e.a.a.h.Oc[] v44_0;
                                int v0_124;
                                c.e.a.a.h.Oc[] v2_0;
                                String v48_0;
                                int v0_123 = this.i().a(v13_14, v8_18.e);
                                if (v0_123 != 0) {
                                    v49_0 = v11_8;
                                    v50 = v12_14;
                                    v1_0 = v13_14;
                                    v2_0 = v14_4;
                                    v44_0 = v21_5;
                                    v46 = v22_0;
                                    v45_0 = v23_0;
                                    v47_1 = v31_1;
                                    v48_0 = v32_1;
                                    v0_124 = v0_123.a();
                                } else {
                                    this.o().h.a("Event aggregate wasn\'t created during raw event logging. appId, event", c.e.a.a.h.ya.a(p53), this.j().a(v5_3));
                                    v0_124 = new c.e.a.a.h.ia;
                                    v44_0 = v21_5;
                                    v46 = v22_0;
                                    v45_0 = v23_0;
                                    v47_1 = v31_1;
                                    v48_0 = v32_1;
                                    v49_0 = v11_8;
                                    v50 = v12_14;
                                    v1_0 = v13_14;
                                    v2_0 = v14_4;
                                    v0_124(p53, v8_18.e, 1, 1, v8_18.f.longValue(), 0, 0, 0, 0);
                                }
                                int v19_1;
                                this.i().a(v0_124);
                                int v8_0 = v0_124.c;
                                String v10_0 = v41_2;
                                int v0_1 = ((java.util.Map) v10_0.get(v5_3));
                                if (v0_1 != 0) {
                                    v19_1 = v2_0;
                                    v11_1 = v43_3;
                                } else {
                                    String v3_1 = this.i();
                                    v3_1.s();
                                    v3_1.b();
                                    a.b.f.a.H.c(p53);
                                    a.b.f.a.H.c(v5_3);
                                    int v6_1 = new a.b.e.i.b();
                                    android.database.sqlite.SQLiteException v11_2 = v3_1.w();
                                    try {
                                        String v13_1 = new String[2];
                                        c.e.a.a.h.Oc[] v14_0 = v49_0;
                                        try {
                                            v13_1[0] = v14_0;
                                            v13_1[1] = "data";
                                            v19_1 = v2_0;
                                            try {
                                                c.e.a.a.h.Oc[] v2_1 = new String[2];
                                                v2_1[0] = v1_0;
                                                v2_1[1] = v5_3;
                                                int v7_1 = v14_0;
                                                v14_0 = "app_id=? AND event_name=?";
                                                v49_0 = v7_1;
                                                try {
                                                    c.e.a.a.h.Oc[] v2_2 = v11_2.query("event_filters", v13_1, "app_id=? AND event_name=?", v2_1, 0, 0, 0);
                                                    try {
                                                        if (v2_2.moveToFirst()) {
                                                            do {
                                                                int v0_7 = v2_2.getBlob(1);
                                                                int v0_8 = c.e.a.a.h.md.a(v0_7, v0_7.length);
                                                                android.database.sqlite.SQLiteException v11_5 = new c.e.a.a.h.Ec();
                                                                v11_5.a(v0_8);
                                                                int v0_12 = v2_2.getInt(0);
                                                                String v12_5 = ((java.util.List) v6_1.get(Integer.valueOf(v0_12)));
                                                                if (v12_5 == null) {
                                                                    v12_5 = new java.util.ArrayList();
                                                                    v6_1.put(Integer.valueOf(v0_12), v12_5);
                                                                }
                                                                v12_5.add(v11_5);
                                                            } while(v2_2.moveToNext());
                                                            v2_2.close();
                                                            v0_1 = v6_1;
                                                        } else {
                                                            v0_1 = java.util.Collections.emptyMap();
                                                            v2_2.close();
                                                        }
                                                        v11_1 = v43_3;
                                                        if (v0_1 == 0) {
                                                            v0_1 = new a.b.e.i.b();
                                                        }
                                                        v10_0.put(v5_3, v0_1);
                                                    } catch (int v0_3) {
                                                        v11_1 = v43_3;
                                                        v3_1.o().f.a(v11_1, c.e.a.a.h.ya.a(p53), v0_3);
                                                        if (v2_2 != null) {
                                                            v2_2.close();
                                                        }
                                                        v0_1 = 0;
                                                    }
                                                } catch (int v0_3) {
                                                    v2_2 = 0;
                                                }
                                            } catch (int v0_3) {
                                                v49_0 = v14_0;
                                            }
                                        } catch (int v0_3) {
                                            v19_1 = v2_0;
                                        }
                                    } catch (int v0_5) {
                                        String v42_0 = 0;
                                        if (v42_0 != null) {
                                            v42_0.close();
                                        }
                                        throw v0_5;
                                    } catch (int v0_3) {
                                        v19_1 = v2_0;
                                    } catch (int v0_5) {
                                        v42_0 = v2_2;
                                    }
                                }
                                String v12_7 = v0_1.keySet().iterator();
                                while (v12_7.hasNext()) {
                                    String v13_3 = ((Integer) v12_7.next()).intValue();
                                    c.e.a.a.h.Oc[] v14_2 = v50;
                                    if (!v14_2.contains(Integer.valueOf(v13_3))) {
                                        c.e.a.a.h.Oc[] v15_8 = v44_0;
                                        int v6_4 = v48_0;
                                        String v3_4 = v45_0;
                                        c.e.a.a.h.Oc[] v2_12 = ((java.util.BitSet) v3_4.get(Integer.valueOf(v13_3)));
                                        int v41_1 = v10_0;
                                        String v10_1 = v46;
                                        int v7_5 = ((java.util.BitSet) v10_1.get(Integer.valueOf(v13_3)));
                                        if (((c.e.a.a.h.Mc) v6_4.get(Integer.valueOf(v13_3))) == null) {
                                            boolean v1_7 = new c.e.a.a.h.Mc();
                                            v6_4.put(Integer.valueOf(v13_3), v1_7);
                                            v1_7.g = Boolean.valueOf(1);
                                            v2_12 = new java.util.BitSet();
                                            v3_4.put(Integer.valueOf(v13_3), v2_12);
                                            v7_5 = new java.util.BitSet();
                                            v10_1.put(Integer.valueOf(v13_3), v7_5);
                                        }
                                        android.database.sqlite.SQLiteException v16_2 = ((java.util.List) v0_1.get(Integer.valueOf(v13_3))).iterator();
                                        while (v16_2.hasNext()) {
                                            String v18_2;
                                            String v12_9;
                                            String v48_1;
                                            boolean v1_15 = ((c.e.a.a.h.Ec) v16_2.next());
                                            c.e.a.a.h.Oc[] v17_4 = v0_1;
                                            int v45_1 = v3_4;
                                            if (!this.o().a(2)) {
                                                v48_1 = v6_4;
                                                v18_2 = v12_7;
                                                v12_9 = v47_1;
                                            } else {
                                                v48_1 = v6_4;
                                                v18_2 = v12_7;
                                                this.o().y().a("Evaluating filter. audience, filter, event", Integer.valueOf(v13_3), v1_15.d, this.j().a(v1_15.e));
                                                v12_9 = v47_1;
                                                this.o().y().a(v12_9, this.j().a(v1_15));
                                            }
                                            int v51_2;
                                            String v22_1;
                                            int v19_2;
                                            String v12_13;
                                            String v10_2;
                                            int v0_23 = v1_15.d;
                                            if ((v0_23 != 0) && (v0_23.intValue() <= 256)) {
                                                if (!v2_12.get(v1_15.d.intValue())) {
                                                    String v3_11;
                                                    int v0_28 = v1_15;
                                                    v22_1 = v10_1;
                                                    v47_1 = v12_9;
                                                    v10_2 = v2_12;
                                                    v51_2 = v19_1;
                                                    v19_2 = v5_3;
                                                    v12_13 = v48_1;
                                                    boolean v1_17 = this.a(v0_28, v5_3, v33_1, v8_0);
                                                    c.e.a.a.h.Aa vtmp279 = this.o().y();
                                                    if (v1_17) {
                                                        v3_11 = v1_17;
                                                    } else {
                                                        v3_11 = "null";
                                                    }
                                                    vtmp279.a("Event filter result", v3_11);
                                                    if (v1_17) {
                                                        v7_5.set(v0_28.d.intValue());
                                                        if (v1_17.booleanValue()) {
                                                            v10_2.set(v0_28.d.intValue());
                                                        }
                                                    } else {
                                                        v14_2.add(Integer.valueOf(v13_3));
                                                    }
                                                } else {
                                                    this.o().y().a("Event filter already evaluated true. audience ID, filter ID", Integer.valueOf(v13_3), v1_15.d);
                                                    v22_1 = v10_1;
                                                    v47_1 = v12_9;
                                                    v51_2 = v19_1;
                                                    v12_13 = v48_1;
                                                    v10_2 = v2_12;
                                                    v19_2 = v5_3;
                                                }
                                            } else {
                                                v22_1 = v10_1;
                                                v47_1 = v12_9;
                                                v51_2 = v19_1;
                                                v12_13 = v48_1;
                                                v10_2 = v2_12;
                                                v19_2 = v5_3;
                                                this.o().w().a("Invalid event filter ID. appId, id", c.e.a.a.h.ya.a(p53), String.valueOf(v1_15.d));
                                            }
                                            v28_0 = p55;
                                            v2_12 = v10_2;
                                            v6_4 = v12_13;
                                            v0_1 = v17_4;
                                            v12_7 = v18_2;
                                            v5_3 = v19_2;
                                            v10_1 = v22_1;
                                            v3_4 = v45_1;
                                            v19_1 = v51_2;
                                        }
                                        v1_0 = p53;
                                        v45_0 = v3_4;
                                        v48_0 = v6_4;
                                        v46 = v10_1;
                                        v50 = v14_2;
                                        v44_0 = v15_8;
                                        v10_0 = v41_1;
                                    } else {
                                        this.o().y().a(v44_0, Integer.valueOf(v13_3));
                                        v50 = v14_2;
                                    }
                                }
                                v41_0 = v10_0;
                                v51_0 = v19_1;
                                v15_7 = v44_0;
                                v22_0 = v46;
                                v12_8 = v48_0;
                                v14_1 = v50;
                                v17_3 = v29_2;
                                v0_16 = v30_1;
                                v29_0 = v37_2;
                            } else {
                                Object v35_0;
                                this.k();
                                int v4_38 = ((Long) c.e.a.a.h.Ac.b(v8_18, "_eid"));
                                if (v4_38 == 0) {
                                    v35_0 = 0;
                                } else {
                                    v35_0 = 1;
                                }
                                String v3_61;
                                if (v35_0 == null) {
                                    v36 = v3_12;
                                    v3_61 = 0;
                                } else {
                                    v36 = v3_12;
                                    if (!v9_8.equals("_ep")) {
                                    } else {
                                        v3_61 = 1;
                                    }
                                }
                                if (v3_61 == null) {
                                    v37_1 = v0_16;
                                    v13_14 = v1_0;
                                    v41_2 = v5_2;
                                    v43_3 = v6_3;
                                    if (v35_0 == null) {
                                    } else {
                                        this.k();
                                        int v0_103 = Long.valueOf(0);
                                        boolean v1_37 = c.e.a.a.h.Ac.b(v8_18, "_epc");
                                        if (v1_37) {
                                            v0_103 = v1_37;
                                        }
                                        int v0_106;
                                        android.database.sqlite.SQLiteException v16_8 = ((Long) v0_103).longValue();
                                        if (v16_8 > 0) {
                                            v0_106 = v4_38;
                                            this.i().a(p53, v4_38, v16_8, v8_18);
                                        } else {
                                            this.o().w().a("Complex event with zero extra param count. eventName", v9_8);
                                            v0_106 = v4_38;
                                        }
                                        v29_2 = v0_106;
                                        v30_1 = v8_18;
                                        v5_3 = v9_8;
                                        v33_1 = v10_12;
                                        v37_2 = v16_8;
                                    }
                                } else {
                                    long v37_0;
                                    String v13_4;
                                    android.database.sqlite.SQLiteException v43_0;
                                    this.k();
                                    v9_8 = ((String) c.e.a.a.h.Ac.b(v8_18, "_en"));
                                    if (!android.text.TextUtils.isEmpty(v9_8)) {
                                        if ((v0_16 != 0) && ((v17_3 != null) && (v4_38.longValue() == v17_3.longValue()))) {
                                            String v3_67 = v0_16;
                                        } else {
                                            String v3_69 = this.i().a(v1_0, v4_38);
                                            if (v3_69 == null) {
                                                v37_0 = v0_16;
                                            } else {
                                                v37_0 = v0_16;
                                                int v0_109 = v3_69.first;
                                                if (v0_109 != 0) {
                                                    int v0_110 = ((c.e.a.a.h.Nc) v0_109);
                                                    v29_0 = ((Long) v3_69.second).longValue();
                                                    this.k();
                                                    v3_67 = v0_110;
                                                    v17_3 = ((Long) c.e.a.a.h.Ac.b(v0_110, "_eid"));
                                                    Object v35_1;
                                                    v29_0--;
                                                    if (v29_0 > 0) {
                                                        v35_1 = v3_67;
                                                        int v20 = 0;
                                                        v13_14 = v1_0;
                                                        v41_2 = v5_2;
                                                        v43_3 = v6_3;
                                                        this.i().a(p53, v4_38, v29_0, v35_1);
                                                    } else {
                                                        c.e.a.a.h.Oc[] v2_80 = this.i();
                                                        v2_80.b();
                                                        v2_80.o().y().a("Clearing complex main event info. appId", v1_0);
                                                        try {
                                                            int v0_115 = v2_80.w();
                                                            v35_1 = v3_67;
                                                            int v19_6 = v5_2;
                                                            try {
                                                                int v5_22 = new String[1];
                                                                try {
                                                                    v5_22[0] = v1_0;
                                                                    v0_115.execSQL("delete from main_event_params where app_id=?", v5_22);
                                                                } catch (int v0_116) {
                                                                    v2_80.o().B().a("Error clearing complex main event", v0_116);
                                                                }
                                                                v13_14 = v1_0;
                                                                v43_3 = v6_3;
                                                                v41_2 = v19_6;
                                                            } catch (int v0_116) {
                                                            }
                                                        } catch (int v0_116) {
                                                            v35_1 = 1;
                                                            v19_6 = v5_2;
                                                        }
                                                    }
                                                    v1_35 = v35_1;
                                                    int v0_41 = v1_35.d;
                                                    c.e.a.a.h.Oc[] v2_85 = new c.e.a.a.h.Oc[(v0_41.length + v10_12.length)];
                                                    String v3_76 = v0_41.length;
                                                    int v4_7 = 0;
                                                    int v5_4 = 0;
                                                    while (v4_7 < v3_76) {
                                                        int v6_9 = v0_41[v4_7];
                                                        this.k();
                                                        android.database.sqlite.SQLiteException v16_3 = v0_41;
                                                        if (c.e.a.a.h.Ac.a(v8_18, v6_9.d) == null) {
                                                            int v0_40 = (v5_4 + 1);
                                                            v2_85[v5_4] = v6_9;
                                                            v5_4 = v0_40;
                                                        }
                                                        v4_7++;
                                                        v0_41 = v16_3;
                                                    }
                                                    if (v5_4 <= 0) {
                                                        this.o().w().a("No unique parameters in main event. eventName", v9_8);
                                                        v4_39 = v17_3;
                                                    } else {
                                                        int v0_119 = v10_12.length;
                                                        String v3_16 = 0;
                                                        while (v3_16 < v0_119) {
                                                            int v6_8 = (v5_4 + 1);
                                                            v2_85[v5_4] = v10_12[v3_16];
                                                            v3_16++;
                                                            v5_4 = v6_8;
                                                        }
                                                        if (v5_4 != v2_85.length) {
                                                            v2_85 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v2_85, v5_4));
                                                        }
                                                        v33_1 = v2_85;
                                                        v5_3 = v9_8;
                                                        v37_2 = v29_0;
                                                        v30_1 = v1_35;
                                                        v29_2 = v17_3;
                                                    }
                                                    v49_0 = v11_8;
                                                    v1_0 = v13_4;
                                                    v51_0 = v14_4;
                                                    v15_7 = v21_5;
                                                    v45_0 = v23_0;
                                                    v47_1 = v31_1;
                                                    v0_16 = v37_0;
                                                    v11_1 = v43_0;
                                                    v14_1 = v12_14;
                                                    v12_8 = v32_1;
                                                    v2_24 = (v34 + 1);
                                                    v7_0 = this;
                                                    v13_5 = p54;
                                                    v6_3 = v11_1;
                                                    v10_3 = v12_8;
                                                    v12_14 = v14_1;
                                                    v8_1 = v15_7;
                                                    v3_12 = v36;
                                                    v5_2 = v41_0;
                                                    v23_0 = v45_0;
                                                    v9_2 = v47_1;
                                                    v11_8 = v49_0;
                                                    v14_4 = v51_0;
                                                }
                                            }
                                            v13_4 = v1_0;
                                            v41_0 = v5_2;
                                            v43_0 = v6_3;
                                            this.o().B().a("Extra parameter without existing main event. eventName, eventId", v9_8, v4_38);
                                        }
                                    } else {
                                        this.o().B().a("Extra parameter without an event name. eventId", v4_38);
                                        v37_0 = v0_16;
                                        v13_4 = v1_0;
                                        v41_0 = v5_2;
                                        v43_0 = v6_3;
                                    }
                                }
                            }
                        }
                        v15_9 = v8_1;
                        v47_0 = v9_2;
                        v49_1 = v11_8;
                        v51_1 = v14_4;
                        v45_2 = v23_0;
                        v11_7 = v6_3;
                        v14_3 = v12_14;
                        v12_12 = v10_3;
                        v0_29 = v28_0;
                    }
                    if (v0_29 != 0) {
                        c.e.a.a.h.Oc[] v2_33 = new a.b.e.i.b();
                        String v3_21 = v0_29.length;
                        int v4_12 = v1_0;
                        boolean v1_33 = 0;
                        while (v1_33 < v3_21) {
                            int v5_19 = v0_29[v1_33];
                            int v0_70 = ((java.util.Map) v2_33.get(v5_19.e));
                            if (v0_70 == 0) {
                                int v6_26 = this.i();
                                int v0_71 = v5_19.e;
                                v6_26.s();
                                v6_26.b();
                                a.b.f.a.H.c(p53);
                                a.b.f.a.H.c(v0_71);
                                int v7_13 = new a.b.e.i.b();
                                android.database.sqlite.SQLiteDatabase v26_1 = v6_26.w();
                                try {
                                    int v9_5 = new String[2];
                                    v9_5[0] = v49_1;
                                    v9_5[1] = "data";
                                    String v13_8 = new String[2];
                                    v13_8[0] = v4_12;
                                    v13_8[1] = v0_71;
                                    int v4_15 = v26_1.query("property_filters", v9_5, "app_id=? AND property_name=?", v13_8, 0, 0, 0);
                                    try {
                                        if (!v4_15.moveToFirst()) {
                                            v0_70 = java.util.Collections.emptyMap();
                                            v4_15.close();
                                            if (v0_70 == 0) {
                                                v0_70 = new a.b.e.i.b();
                                            }
                                            v2_33.put(v5_19.e, v0_70);
                                            int v4_18 = v0_70.keySet().iterator();
                                            while (v4_18.hasNext()) {
                                                int v6_32 = ((Integer) v4_18.next()).intValue();
                                                if (!v14_3.contains(Integer.valueOf(v6_32))) {
                                                    String v10_11 = v45_2;
                                                    int v8_14 = ((java.util.BitSet) v10_11.get(Integer.valueOf(v6_32)));
                                                    int v9_7 = v22_0;
                                                    String v13_12 = ((java.util.BitSet) v9_7.get(Integer.valueOf(v6_32)));
                                                    if (((c.e.a.a.h.Mc) v12_12.get(Integer.valueOf(v6_32))) == null) {
                                                        int v7_21 = new c.e.a.a.h.Mc();
                                                        v12_12.put(Integer.valueOf(v6_32), v7_21);
                                                        v7_21.g = Boolean.valueOf(1);
                                                        v8_14 = new java.util.BitSet();
                                                        v10_11.put(Integer.valueOf(v6_32), v8_14);
                                                        v13_12 = new java.util.BitSet();
                                                        v9_7.put(Integer.valueOf(v6_32), v13_12);
                                                    }
                                                    int v7_27 = ((java.util.List) v0_70.get(Integer.valueOf(v6_32))).iterator();
                                                    while (v7_27.hasNext()) {
                                                        int v4_21;
                                                        int v19_4;
                                                        int v20_2;
                                                        android.database.sqlite.SQLiteException v43_2;
                                                        c.e.a.a.h.Hc v54_2 = v0_70;
                                                        int v0_88 = ((c.e.a.a.h.Hc) v7_27.next());
                                                        c.e.a.a.h.Oc[] v17_8 = v2_33;
                                                        String v18_5 = v3_21;
                                                        if (!this.o().a(2)) {
                                                            v19_4 = v4_18;
                                                            v20_2 = v7_27;
                                                            v43_2 = v11_7;
                                                            v4_21 = v47_0;
                                                        } else {
                                                            v19_4 = v4_18;
                                                            v20_2 = v7_27;
                                                            v43_2 = v11_7;
                                                            this.o().y().a("Evaluating filter. audience, filter, property", Integer.valueOf(v6_32), v0_88.d, this.j().c(v0_88.e));
                                                            v4_21 = v47_0;
                                                            this.o().y().a(v4_21, this.j().a(v0_88));
                                                        }
                                                        c.e.a.a.h.Oc[] v2_44 = v0_88.d;
                                                        if ((v2_44 != null) && (v2_44.intValue() <= 256)) {
                                                            if (!v8_14.get(v0_88.d.intValue())) {
                                                                c.e.a.a.h.Oc[] v15_13;
                                                                c.e.a.a.h.Oc[] v44_3;
                                                                int v4_32;
                                                                c.e.a.a.h.Oc[] v2_49 = v0_88.f;
                                                                if (v2_49 != null) {
                                                                    c.e.a.a.h.Oc[] v2_52;
                                                                    int v7_31 = Boolean.TRUE.equals(v2_49.f);
                                                                    android.database.sqlite.SQLiteException v11_12 = v5_19.g;
                                                                    if (v11_12 == null) {
                                                                        int v4_24;
                                                                        c.e.a.a.h.Oc[] v2_51;
                                                                        String v3_44;
                                                                        v47_0 = v4_21;
                                                                        v44_3 = v15_9;
                                                                        v15_13 = v49_1;
                                                                        String v3_41 = v5_19.i;
                                                                        if (v3_41 == null) {
                                                                            String v3_42 = v5_19.f;
                                                                            if (v3_42 == null) {
                                                                                v2_51 = this.o().w();
                                                                                v3_44 = this.j().c(v5_19.e);
                                                                                v4_24 = "User property has no value, property";
                                                                            } else {
                                                                                int v4_25 = v2_49.d;
                                                                                if (v4_25 != 0) {
                                                                                    v2_52 = this.a(v3_42, v4_25);
                                                                                    v4_32 = ark>c.e.a.a.h.Wark>.a(v2_52, v7_31);
                                                                                    String v3_57;
                                                                                    c.e.a.a.h.Oc[] v2_65 = this.o().y();
                                                                                    if (v4_32 != 0) {
                                                                                        v3_57 = v4_32;
                                                                                    } else {
                                                                                        v3_57 = "null";
                                                                                    }
                                                                                    v2_65.a("Property filter result", v3_57);
                                                                                    if (v4_32 != 0) {
                                                                                        v13_12.set(v0_88.d.intValue());
                                                                                        if (v4_32.booleanValue()) {
                                                                                            v8_14.set(v0_88.d.intValue());
                                                                                        }
                                                                                    } else {
                                                                                        v14_3.add(Integer.valueOf(v6_32));
                                                                                    }
                                                                                    v0_70 = v54_2;
                                                                                    v49_1 = v15_13;
                                                                                    v2_33 = v17_8;
                                                                                    v3_21 = v18_5;
                                                                                    v4_18 = v19_4;
                                                                                    v7_27 = v20_2;
                                                                                    v11_7 = v43_2;
                                                                                    v15_9 = v44_3;
                                                                                } else {
                                                                                    if (v2_49.e != null) {
                                                                                        if (!c.e.a.a.h.Ac.i(v3_42)) {
                                                                                            this.o().w().a("Invalid user property value for Numeric number filter. property, value", this.j().c(v5_19.e), v5_19.f);
                                                                                            v4_32 = 0;
                                                                                        } else {
                                                                                            v2_52 = this.a(v5_19.f, v2_49.e);
                                                                                        }
                                                                                    } else {
                                                                                        v2_51 = this.o().w();
                                                                                        v3_44 = this.j().c(v5_19.e);
                                                                                        v4_24 = "No string or number filter defined. property";
                                                                                    }
                                                                                }
                                                                            }
                                                                        } else {
                                                                            if (v2_49.e != null) {
                                                                                v2_52 = this.a(v3_41.doubleValue(), v2_49.e);
                                                                            } else {
                                                                                v2_51 = this.o().w();
                                                                                v3_44 = this.j().c(v5_19.e);
                                                                                v4_24 = "No number filter for double property. property";
                                                                            }
                                                                        }
                                                                        v2_51.a(v4_24, v3_44);
                                                                    } else {
                                                                        if (v2_49.e != null) {
                                                                            v47_0 = v4_21;
                                                                            v44_3 = v15_9;
                                                                            v15_13 = v49_1;
                                                                            v2_52 = this.a(v11_12.longValue(), v2_49.e);
                                                                        } else {
                                                                            this.o().w().a("No number filter for long property. property", this.j().c(v5_19.e));
                                                                            v47_0 = v4_21;
                                                                            v44_3 = v15_9;
                                                                            v15_13 = v49_1;
                                                                        }
                                                                    }
                                                                } else {
                                                                    this.o().w().a("Missing property filter. property", this.j().c(v5_19.e));
                                                                }
                                                            } else {
                                                                this.o().y().a("Property filter already evaluated true. audience ID, filter ID", Integer.valueOf(v6_32), v0_88.d);
                                                                v0_70 = v54_2;
                                                                v47_0 = v4_21;
                                                                v2_33 = v17_8;
                                                                v3_21 = v18_5;
                                                                v4_18 = v19_4;
                                                                v7_27 = v20_2;
                                                                v11_7 = v43_2;
                                                            }
                                                        } else {
                                                            v47_0 = v4_21;
                                                            c.e.a.a.h.Oc[] v44_2 = v15_9;
                                                            c.e.a.a.h.Oc[] v15_12 = v49_1;
                                                            this.o().w().a("Invalid property filter ID. appId, id", c.e.a.a.h.ya.a(p53), String.valueOf(v0_88.d));
                                                            v14_3.add(Integer.valueOf(v6_32));
                                                        }
                                                        v0_70 = v54_2;
                                                        v22_0 = v9_7;
                                                        v45_2 = v10_11;
                                                        v49_1 = v15_12;
                                                        v2_33 = v17_8;
                                                        v3_21 = v18_5;
                                                        v4_18 = v19_4;
                                                        v11_7 = v43_2;
                                                        v15_9 = v44_2;
                                                    }
                                                    v54_2 = v0_70;
                                                    v17_8 = v2_33;
                                                    v18_5 = v3_21;
                                                    v19_4 = v4_18;
                                                    v43_2 = v11_7;
                                                    v44_2 = v15_9;
                                                    v15_12 = v49_1;
                                                } else {
                                                    this.o().y().a(v15_9, Integer.valueOf(v6_32));
                                                }
                                            }
                                            c.e.a.a.h.Oc[] v17 = v2_33;
                                            String v10 = v45_2;
                                            android.database.sqlite.SQLiteException v11 = this;
                                            v1_33++;
                                            v4_12 = p53;
                                            v0_29 = p55;
                                        }
                                        do {
                                            int v0_75 = v4_15.getBlob(1);
                                            int v0_76 = c.e.a.a.h.md.a(v0_75, v0_75.length);
                                            int v8_10 = new c.e.a.a.h.Hc();
                                            v8_10.a(v0_76);
                                            int v0_80 = v4_15.getInt(0);
                                            String v10_9 = ((java.util.List) v7_13.get(Integer.valueOf(v0_80)));
                                            if (v10_9 == null) {
                                                v10_9 = new java.util.ArrayList();
                                                v7_13.put(Integer.valueOf(v0_80), v10_9);
                                            }
                                            v10_9.add(v8_10);
                                        } while(v4_15.moveToNext());
                                        v4_15.close();
                                        v0_70 = v7_13;
                                    } catch (int v0_72) {
                                        v6_26.o().f.a(v11_7, c.e.a.a.h.ya.a(p53), v0_72);
                                        if (v4_15 != 0) {
                                            v4_15.close();
                                        }
                                        v0_70 = 0;
                                    }
                                } catch (int v0_73) {
                                    String v42_1 = 0;
                                    if (v42_1 != null) {
                                        v42_1.close();
                                    }
                                    throw v0_73;
                                } catch (int v0_72) {
                                    v4_15 = 0;
                                } catch (int v0_73) {
                                    v42_1 = v4_15;
                                }
                            }
                        }
                    }
                    int v9_4 = v22_0;
                    String v10_4 = v45_2;
                    c.e.a.a.h.Oc[] v15_11 = v49_1;
                    boolean v1_34 = new c.e.a.a.h.Mc[v10_4.size()];
                    c.e.a.a.h.Oc[] v2_34 = v10_4.keySet().iterator();
                    int v5_10 = 0;
                    while (v2_34.hasNext()) {
                        int v0_60 = ((Integer) v2_34.next()).intValue();
                        if (!v14_3.contains(Integer.valueOf(v0_60))) {
                            String v3_26 = ((c.e.a.a.h.Mc) v12_12.get(Integer.valueOf(v0_60)));
                            if (v3_26 == null) {
                                v3_26 = new c.e.a.a.h.Mc();
                            }
                            int v4_13 = (v5_10 + 1);
                            v1_34[v5_10] = v3_26;
                            v3_26.d = Integer.valueOf(v0_60);
                            v3_26.e = new c.e.a.a.h.Rc();
                            v3_26.e.d = c.e.a.a.h.Ac.a(((java.util.BitSet) v10_4.get(Integer.valueOf(v0_60))));
                            v3_26.e.c = c.e.a.a.h.Ac.a(((java.util.BitSet) v9_4.get(Integer.valueOf(v0_60))));
                            int v5_17 = this.i();
                            String v3_28 = v3_26.e;
                            v5_17.s();
                            v5_17.b();
                            a.b.f.a.H.c(p53);
                            a.b.f.a.H.d(v3_28);
                            try {
                                int v6_22 = new byte[v3_28.c()];
                                int v7_9 = c.e.a.a.h.nd.a(v6_22, v6_22.length);
                                v3_28.a(v7_9);
                                v7_9.a();
                                String v3_31 = new android.content.ContentValues();
                                v3_31.put("app_id", p53);
                                v3_31.put(v15_11, Integer.valueOf(v0_60));
                                int v7_11 = v51_1;
                                v3_31.put(v7_11, v6_22);
                                try {
                                    c.e.a.a.h.Hc v54_1 = v2_34;
                                    try {
                                        if (v5_17.w().insertWithOnConflict("audience_filter_values", 0, v3_31, 5) != -1) {
                                            v2_34 = v54_1;
                                            v5_10 = v4_13;
                                            v51_1 = v7_11;
                                        } else {
                                            v5_17.o().B().a("Failed to insert filter results (got -1). appId", c.e.a.a.h.ya.a(p53));
                                        }
                                    } catch (int v0_62) {
                                        String v3_33 = v5_17.o().B();
                                        int v5_18 = c.e.a.a.h.ya.a(p53);
                                        int v6_23 = "Error storing filter results. appId";
                                        v3_33.a(v6_23, v5_18, v0_62);
                                    }
                                } catch (int v0_62) {
                                    v54_1 = 0;
                                }
                            } catch (int v0_62) {
                                v54_1 = v2_34;
                                v7_11 = v51_1;
                                v3_33 = v5_17.o().B();
                                v5_18 = c.e.a.a.h.ya.a(p53);
                                v6_23 = "Configuration loss. Failed to serialize filter results. appId";
                            }
                        }
                    }
                    return ((c.e.a.a.h.Mc[]) java.util.Arrays.copyOf(v1_34, v5_10));
                } else {
                    v2_37.close();
                    v0_2 = 0;
                }
            } catch (int v0_85) {
                int v4_46 = v2_37;
                android.database.sqlite.SQLiteException v16_6 = v4_46;
                if (v16_6 != null) {
                    v16_6.close();
                }
                throw v0_85;
            } catch (int v0_82) {
                try {
                    v1_31.o().f.a("Database error querying filter results. appId", c.e.a.a.h.ya.a(p53), v0_82);
                } catch (int v0_85) {
                    v4_46 = v2_37;
                }
                if (v2_37 == null) {
                } else {
                }
            }
        } catch (int v0_85) {
            v16_6 = 0;
        } catch (int v0_82) {
            v2_37 = 0;
        }
    }

Method c.e.a.a.h.W.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final c.e.a.a.h.Mc[] a(String p53, c.e.a.a.h.Nc[] p54, c.e.a.a.h.Sc[] p55)
    {
        int v7_0 = this;
        String v13_5 = p54;
        c.e.a.a.h.Oc[] v14_4 = "current_results";
        android.database.sqlite.SQLiteException v11_8 = "audience_id";
        a.b.f.a.H.c(p53);
        String v12_14 = new java.util.HashSet();
        String v10_3 = new a.b.e.i.b();
        int v9_1 = new a.b.e.i.b();
        int v8_3 = new a.b.e.i.b();
        boolean v1_31 = this.i();
        v1_31.s();
        v1_31.b();
        a.b.f.a.H.c(p53);
        android.database.sqlite.SQLiteException v16_4 = v1_31.w();
        int v5_16 = 0;
        String v3_29 = 1;
        try {
            int v0_2;
            int v0_63 = new String[2];
            v0_63[0] = "audience_id";
            v0_63[1] = "current_results";
            c.e.a.a.h.Oc[] v2_36 = new String[1];
            v2_36[0] = p53;
            c.e.a.a.h.Oc[] v2_37 = v16_4.query("audience_filter_values", v0_63, "app_id=?", v2_36, 0, 0, 0);
            try {
                if (v2_37.moveToFirst()) {
                    int v4_20 = new a.b.e.i.b();
                    while(true) {
                        c.e.a.a.h.Oc[] v17_9 = v2_37.getInt(v5_16);
                        int v0_89 = v2_37.getBlob(v3_29);
                        int v0_90 = c.e.a.a.h.md.a(v0_89, v0_89.length);
                        int v6_35 = new c.e.a.a.h.Rc();
                        v6_35.a(v0_90);
                        v4_20.put(Integer.valueOf(v17_9), v6_35);
                        int v21_4 = v4_20;
                        if (!v2_37.moveToNext()) {
                            break;
                        }
                        v4_20 = v21_4;
                        v3_29 = 1;
                        v5_16 = 0;
                    }
                    v2_37.close();
                    v0_2 = v21_4;
                    if (v0_2 != 0) {
                        boolean v1_2 = v0_2.keySet().iterator();
                        while (v1_2.hasNext()) {
                            c.e.a.a.h.Oc[] v2_29 = ((Integer) v1_2.next()).intValue();
                            String v3_20 = ((c.e.a.a.h.Rc) v0_2.get(Integer.valueOf(v2_29)));
                            int v4_10 = ((java.util.BitSet) v9_1.get(Integer.valueOf(v2_29)));
                            int v5_7 = ((java.util.BitSet) v8_3.get(Integer.valueOf(v2_29)));
                            if (v4_10 == 0) {
                                v4_10 = new java.util.BitSet();
                                v9_1.put(Integer.valueOf(v2_29), v4_10);
                                v5_7 = new java.util.BitSet();
                                v8_3.put(Integer.valueOf(v2_29), v5_7);
                            }
                            c.e.a.a.h.Oc[] v17_5 = v0_2;
                            int v6_11 = 0;
                            while(true) {
                                int v0_44 = v3_20.c;
                                int v21_2 = v1_2;
                                if (v6_11 >= (v0_44.length << 6)) {
                                    break;
                                }
                                String v23_1;
                                String v22_2;
                                if (!c.e.a.a.h.Ac.a(v0_44, v6_11)) {
                                    v22_2 = v8_3;
                                    v23_1 = v9_1;
                                } else {
                                    v22_2 = v8_3;
                                    v23_1 = v9_1;
                                    this.o().l.a("Filter already evaluated. audience ID, filter ID", Integer.valueOf(v2_29), Integer.valueOf(v6_11));
                                    v5_7.set(v6_11);
                                    if (c.e.a.a.h.Ac.a(v3_20.d, v6_11)) {
                                        v4_10.set(v6_11);
                                    }
                                }
                                v6_11++;
                                v1_2 = v21_2;
                                v8_3 = v22_2;
                                v9_1 = v23_1;
                            }
                            String v23 = v9_1;
                            int v0_46 = new c.e.a.a.h.Mc();
                            v10_3.put(Integer.valueOf(v2_29), v0_46);
                            v0_46.g = Boolean.valueOf(0);
                            v0_46.f = v3_20;
                            v0_46.e = new c.e.a.a.h.Rc();
                            v0_46.e.d = c.e.a.a.h.Ac.a(v4_10);
                            v0_46.e.c = c.e.a.a.h.Ac.a(v5_7);
                            v0_2 = v17_5;
                            v1_2 = v21_2;
                        }
                    }
                    c.e.a.a.h.Oc[] v14_3;
                    android.database.sqlite.SQLiteException v11_7;
                    String v12_12;
                    c.e.a.a.h.Oc[] v49_1;
                    int v45_2;
                    int v47_0;
                    c.e.a.a.h.Oc[] v15_9;
                    int v51_1;
                    boolean v1_0;
                    int v0_29;
                    String v22_0 = v8_3;
                    String v23_0 = v9_1;
                    int v9_2 = "Filter definition";
                    int v8_1 = "Skipping failed audience ID";
                    int v6_3 = "Database error querying filters. appId";
                    if (p54 == null) {
                        v15_9 = "Skipping failed audience ID";
                        v47_0 = "Filter definition";
                        v49_1 = "audience_id";
                        v51_1 = "current_results";
                        v45_2 = v23_0;
                        v11_7 = "Database error querying filters. appId";
                        v14_3 = v12_14;
                        v12_12 = v10_3;
                        v1_0 = p53;
                        v0_29 = p55;
                    } else {
                        int v5_2 = new a.b.e.i.b();
                        String v3_12 = p54.length;
                        c.e.a.a.h.Sc[] v28_0 = p55;
                        v1_0 = p53;
                        c.e.a.a.h.Oc[] v29_0 = 0;
                        int v0_16 = 0;
                        c.e.a.a.h.Oc[] v2_24 = 0;
                        c.e.a.a.h.Oc[] v17_3 = 0;
                        while (v2_24 < v3_12) {
                            c.e.a.a.h.Oc[] v15_7;
                            int v45_0;
                            String v12_8;
                            int v4_39;
                            Boolean v30_1;
                            boolean v1_35;
                            String v13_14;
                            c.e.a.a.h.Oc[] v14_1;
                            int v47_1;
                            c.e.a.a.h.Aa v33_1;
                            c.e.a.a.h.Oc[] v49_0;
                            int v41_0;
                            c.e.a.a.h.Oc[] v29_2;
                            int v41_2;
                            android.database.sqlite.SQLiteException v11_1;
                            long v37_1;
                            int v5_3;
                            long v37_2;
                            int v51_0;
                            boolean v36;
                            android.database.sqlite.SQLiteException v43_3;
                            int v21_5 = v8_1;
                            int v8_18 = v13_5[v2_24];
                            int v31_1 = v9_2;
                            int v9_8 = v8_18.e;
                            int v32_1 = v10_3;
                            String v10_12 = v8_18.d;
                            int v34 = v2_24;
                            if (!v7_0.a.c.c(v1_0, c.e.a.a.h.oa.O)) {
                                v37_1 = v0_16;
                                v13_14 = v1_0;
                                v36 = v3_12;
                                v41_2 = v5_2;
                                v43_3 = v6_3;
                                v4_39 = v17_3;
                                v1_35 = v37_1;
                                v5_3 = v9_8;
                                v33_1 = v10_12;
                                v37_2 = v29_0;
                                v30_1 = v1_35;
                                v29_2 = v4_39;
                                c.e.a.a.h.Oc[] v44_0;
                                int v0_124;
                                c.e.a.a.h.Oc[] v2_0;
                                String v48_0;
                                Integer v46;
                                c.e.a.a.h.Oc[] v50;
                                int v0_123 = this.i().a(v13_14, v8_18.e);
                                if (v0_123 != 0) {
                                    v49_0 = v11_8;
                                    v50 = v12_14;
                                    v1_0 = v13_14;
                                    v2_0 = v14_4;
                                    v44_0 = v21_5;
                                    v46 = v22_0;
                                    v45_0 = v23_0;
                                    v47_1 = v31_1;
                                    v48_0 = v32_1;
                                    v0_124 = v0_123.a();
                                } else {
                                    this.o().h.a("Event aggregate wasn\'t created during raw event logging. appId, event", c.e.a.a.h.ya.a(p53), this.j().a(v5_3));
                                    v0_124 = new c.e.a.a.h.ia;
                                    v44_0 = v21_5;
                                    v46 = v22_0;
                                    v45_0 = v23_0;
                                    v47_1 = v31_1;
                                    v48_0 = v32_1;
                                    v49_0 = v11_8;
                                    v50 = v12_14;
                                    v1_0 = v13_14;
                                    v2_0 = v14_4;
                                    v0_124(p53, v8_18.e, 1, 1, v8_18.f.longValue(), 0, 0, 0, 0);
                                }
                                int v19_1;
                                this.i().a(v0_124);
                                int v8_0 = v0_124.c;
                                String v10_0 = v41_2;
                                int v0_1 = ((java.util.Map) v10_0.get(v5_3));
                                if (v0_1 != 0) {
                                    v19_1 = v2_0;
                                    v11_1 = v43_3;
                                } else {
                                    String v3_1 = this.i();
                                    v3_1.s();
                                    v3_1.b();
                                    a.b.f.a.H.c(p53);
                                    a.b.f.a.H.c(v5_3);
                                    int v6_1 = new a.b.e.i.b();
                                    android.database.sqlite.SQLiteException v11_2 = v3_1.w();
                                    try {
                                        String v13_1 = new String[2];
                                        c.e.a.a.h.Oc[] v14_0 = v49_0;
                                        try {
                                            v13_1[0] = v14_0;
                                            v13_1[1] = "data";
                                            v19_1 = v2_0;
                                            try {
                                                c.e.a.a.h.Oc[] v2_1 = new String[2];
                                                v2_1[0] = v1_0;
                                                v2_1[1] = v5_3;
                                                int v7_1 = v14_0;
                                                v14_0 = "app_id=? AND event_name=?";
                                                v49_0 = v7_1;
                                                try {
                                                    c.e.a.a.h.Oc[] v2_2 = v11_2.query("event_filters", v13_1, "app_id=? AND event_name=?", v2_1, 0, 0, 0);
                                                    try {
                                                        if (v2_2.moveToFirst()) {
                                                            do {
                                                                int v0_7 = v2_2.getBlob(1);
                                                                int v0_8 = c.e.a.a.h.md.a(v0_7, v0_7.length);
                                                                android.database.sqlite.SQLiteException v11_5 = new c.e.a.a.h.Ec();
                                                                v11_5.a(v0_8);
                                                                int v0_12 = v2_2.getInt(0);
                                                                String v12_5 = ((java.util.List) v6_1.get(Integer.valueOf(v0_12)));
                                                                if (v12_5 == null) {
                                                                    v12_5 = new java.util.ArrayList();
                                                                    v6_1.put(Integer.valueOf(v0_12), v12_5);
                                                                }
                                                                v12_5.add(v11_5);
                                                            } while(v2_2.moveToNext());
                                                            v2_2.close();
                                                            v0_1 = v6_1;
                                                        } else {
                                                            v0_1 = java.util.Collections.emptyMap();
                                                            v2_2.close();
                                                        }
                                                        v11_1 = v43_3;
                                                        if (v0_1 == 0) {
                                                            v0_1 = new a.b.e.i.b();
                                                        }
                                                        v10_0.put(v5_3, v0_1);
                                                    } catch (int v0_3) {
                                                        v11_1 = v43_3;
                                                        v3_1.o().f.a(v11_1, c.e.a.a.h.ya.a(p53), v0_3);
                                                        if (v2_2 != null) {
                                                            v2_2.close();
                                                        }
                                                        v0_1 = 0;
                                                    }
                                                } catch (int v0_3) {
                                                    v2_2 = 0;
                                                }
                                            } catch (int v0_3) {
                                                v49_0 = v14_0;
                                            }
                                        } catch (int v0_3) {
                                            v19_1 = v2_0;
                                        }
                                    } catch (int v0_5) {
                                        String v42_0 = 0;
                                        if (v42_0 != null) {
                                            v42_0.close();
                                        }
                                        throw v0_5;
                                    } catch (int v0_3) {
                                        v19_1 = v2_0;
                                    } catch (int v0_5) {
                                        v42_0 = v2_2;
                                    }
                                }
                                String v12_7 = v0_1.keySet().iterator();
                                while (v12_7.hasNext()) {
                                    String v13_3 = ((Integer) v12_7.next()).intValue();
                                    c.e.a.a.h.Oc[] v14_2 = v50;
                                    if (!v14_2.contains(Integer.valueOf(v13_3))) {
                                        c.e.a.a.h.Oc[] v15_8 = v44_0;
                                        int v6_4 = v48_0;
                                        String v3_4 = v45_0;
                                        c.e.a.a.h.Oc[] v2_12 = ((java.util.BitSet) v3_4.get(Integer.valueOf(v13_3)));
                                        int v41_1 = v10_0;
                                        String v10_1 = v46;
                                        int v7_5 = ((java.util.BitSet) v10_1.get(Integer.valueOf(v13_3)));
                                        if (((c.e.a.a.h.Mc) v6_4.get(Integer.valueOf(v13_3))) == null) {
                                            boolean v1_7 = new c.e.a.a.h.Mc();
                                            v6_4.put(Integer.valueOf(v13_3), v1_7);
                                            v1_7.g = Boolean.valueOf(1);
                                            v2_12 = new java.util.BitSet();
                                            v3_4.put(Integer.valueOf(v13_3), v2_12);
                                            v7_5 = new java.util.BitSet();
                                            v10_1.put(Integer.valueOf(v13_3), v7_5);
                                        }
                                        android.database.sqlite.SQLiteException v16_2 = ((java.util.List) v0_1.get(Integer.valueOf(v13_3))).iterator();
                                        while (v16_2.hasNext()) {
                                            String v12_9;
                                            String v18_2;
                                            String v48_1;
                                            boolean v1_15 = ((c.e.a.a.h.Ec) v16_2.next());
                                            c.e.a.a.h.Oc[] v17_4 = v0_1;
                                            int v45_1 = v3_4;
                                            if (!this.o().a(2)) {
                                                v48_1 = v6_4;
                                                v18_2 = v12_7;
                                                v12_9 = v47_1;
                                            } else {
                                                v48_1 = v6_4;
                                                v18_2 = v12_7;
                                                this.o().y().a("Evaluating filter. audience, filter, event", Integer.valueOf(v13_3), v1_15.d, this.j().a(v1_15.e));
                                                v12_9 = v47_1;
                                                this.o().y().a(v12_9, this.j().a(v1_15));
                                            }
                                            String v22_1;
                                            int v19_2;
                                            String v12_13;
                                            String v10_2;
                                            int v51_2;
                                            int v0_23 = v1_15.d;
                                            if ((v0_23 != 0) && (v0_23.intValue() <= 256)) {
                                                if (!v2_12.get(v1_15.d.intValue())) {
                                                    String v3_11;
                                                    int v0_28 = v1_15;
                                                    v22_1 = v10_1;
                                                    v47_1 = v12_9;
                                                    v10_2 = v2_12;
                                                    v51_2 = v19_1;
                                                    v19_2 = v5_3;
                                                    v12_13 = v48_1;
                                                    boolean v1_17 = this.a(v0_28, v5_3, v33_1, v8_0);
                                                    c.e.a.a.h.Aa vtmp279 = this.o().y();
                                                    if (v1_17) {
                                                        v3_11 = v1_17;
                                                    } else {
                                                        v3_11 = "null";
                                                    }
                                                    vtmp279.a("Event filter result", v3_11);
                                                    if (v1_17) {
                                                        v7_5.set(v0_28.d.intValue());
                                                        if (v1_17.booleanValue()) {
                                                            v10_2.set(v0_28.d.intValue());
                                                        }
                                                    } else {
                                                        v14_2.add(Integer.valueOf(v13_3));
                                                    }
                                                } else {
                                                    this.o().y().a("Event filter already evaluated true. audience ID, filter ID", Integer.valueOf(v13_3), v1_15.d);
                                                    v22_1 = v10_1;
                                                    v47_1 = v12_9;
                                                    v51_2 = v19_1;
                                                    v12_13 = v48_1;
                                                    v10_2 = v2_12;
                                                    v19_2 = v5_3;
                                                }
                                            } else {
                                                v22_1 = v10_1;
                                                v47_1 = v12_9;
                                                v51_2 = v19_1;
                                                v12_13 = v48_1;
                                                v10_2 = v2_12;
                                                v19_2 = v5_3;
                                                this.o().w().a("Invalid event filter ID. appId, id", c.e.a.a.h.ya.a(p53), String.valueOf(v1_15.d));
                                            }
                                            v28_0 = p55;
                                            v2_12 = v10_2;
                                            v6_4 = v12_13;
                                            v0_1 = v17_4;
                                            v12_7 = v18_2;
                                            v5_3 = v19_2;
                                            v10_1 = v22_1;
                                            v3_4 = v45_1;
                                            v19_1 = v51_2;
                                        }
                                        v1_0 = p53;
                                        v45_0 = v3_4;
                                        v48_0 = v6_4;
                                        v46 = v10_1;
                                        v50 = v14_2;
                                        v44_0 = v15_8;
                                        v10_0 = v41_1;
                                    } else {
                                        this.o().y().a(v44_0, Integer.valueOf(v13_3));
                                        v50 = v14_2;
                                    }
                                }
                                v41_0 = v10_0;
                                v51_0 = v19_1;
                                v15_7 = v44_0;
                                v22_0 = v46;
                                v12_8 = v48_0;
                                v14_1 = v50;
                                v17_3 = v29_2;
                                v0_16 = v30_1;
                                v29_0 = v37_2;
                            } else {
                                Object v35_0;
                                this.k();
                                int v4_38 = ((Long) c.e.a.a.h.Ac.b(v8_18, "_eid"));
                                if (v4_38 == 0) {
                                    v35_0 = 0;
                                } else {
                                    v35_0 = 1;
                                }
                                String v3_61;
                                if (v35_0 == null) {
                                    v36 = v3_12;
                                    v3_61 = 0;
                                } else {
                                    v36 = v3_12;
                                    if (!v9_8.equals("_ep")) {
                                    } else {
                                        v3_61 = 1;
                                    }
                                }
                                if (v3_61 == null) {
                                    v37_1 = v0_16;
                                    v13_14 = v1_0;
                                    v41_2 = v5_2;
                                    v43_3 = v6_3;
                                    if (v35_0 == null) {
                                    } else {
                                        this.k();
                                        int v0_103 = Long.valueOf(0);
                                        boolean v1_37 = c.e.a.a.h.Ac.b(v8_18, "_epc");
                                        if (v1_37) {
                                            v0_103 = v1_37;
                                        }
                                        int v0_106;
                                        android.database.sqlite.SQLiteException v16_8 = ((Long) v0_103).longValue();
                                        if (v16_8 > 0) {
                                            v0_106 = v4_38;
                                            this.i().a(p53, v4_38, v16_8, v8_18);
                                        } else {
                                            this.o().w().a("Complex event with zero extra param count. eventName", v9_8);
                                            v0_106 = v4_38;
                                        }
                                        v29_2 = v0_106;
                                        v30_1 = v8_18;
                                        v5_3 = v9_8;
                                        v33_1 = v10_12;
                                        v37_2 = v16_8;
                                    }
                                } else {
                                    android.database.sqlite.SQLiteException v43_0;
                                    long v37_0;
                                    String v13_4;
                                    this.k();
                                    v9_8 = ((String) c.e.a.a.h.Ac.b(v8_18, "_en"));
                                    if (!android.text.TextUtils.isEmpty(v9_8)) {
                                        if ((v0_16 != 0) && ((v17_3 != null) && (v4_38.longValue() == v17_3.longValue()))) {
                                            String v3_67 = v0_16;
                                        } else {
                                            String v3_69 = this.i().a(v1_0, v4_38);
                                            if (v3_69 == null) {
                                                v37_0 = v0_16;
                                            } else {
                                                v37_0 = v0_16;
                                                int v0_109 = v3_69.first;
                                                if (v0_109 != 0) {
                                                    int v0_110 = ((c.e.a.a.h.Nc) v0_109);
                                                    v29_0 = ((Long) v3_69.second).longValue();
                                                    this.k();
                                                    v3_67 = v0_110;
                                                    v17_3 = ((Long) c.e.a.a.h.Ac.b(v0_110, "_eid"));
                                                    Object v35_1;
                                                    v29_0--;
                                                    if (v29_0 > 0) {
                                                        v35_1 = v3_67;
                                                        int v20 = 0;
                                                        v13_14 = v1_0;
                                                        v41_2 = v5_2;
                                                        v43_3 = v6_3;
                                                        this.i().a(p53, v4_38, v29_0, v35_1);
                                                    } else {
                                                        c.e.a.a.h.Oc[] v2_80 = this.i();
                                                        v2_80.b();
                                                        v2_80.o().y().a("Clearing complex main event info. appId", v1_0);
                                                        try {
                                                            int v0_115 = v2_80.w();
                                                            v35_1 = v3_67;
                                                            int v19_6 = v5_2;
                                                            try {
                                                                int v5_22 = new String[1];
                                                                try {
                                                                    v5_22[0] = v1_0;
                                                                    v0_115.execSQL("delete from main_event_params where app_id=?", v5_22);
                                                                } catch (int v0_116) {
                                                                    v2_80.o().B().a("Error clearing complex main event", v0_116);
                                                                }
                                                                v13_14 = v1_0;
                                                                v43_3 = v6_3;
                                                                v41_2 = v19_6;
                                                            } catch (int v0_116) {
                                                            }
                                                        } catch (int v0_116) {
                                                            v35_1 = 1;
                                                            v19_6 = v5_2;
                                                        }
                                                    }
                                                    v1_35 = v35_1;
                                                    int v0_41 = v1_35.d;
                                                    c.e.a.a.h.Oc[] v2_85 = new c.e.a.a.h.Oc[(v0_41.length + v10_12.length)];
                                                    String v3_76 = v0_41.length;
                                                    int v4_7 = 0;
                                                    int v5_4 = 0;
                                                    while (v4_7 < v3_76) {
                                                        int v6_9 = v0_41[v4_7];
                                                        this.k();
                                                        android.database.sqlite.SQLiteException v16_3 = v0_41;
                                                        if (c.e.a.a.h.Ac.a(v8_18, v6_9.d) == null) {
                                                            int v0_40 = (v5_4 + 1);
                                                            v2_85[v5_4] = v6_9;
                                                            v5_4 = v0_40;
                                                        }
                                                        v4_7++;
                                                        v0_41 = v16_3;
                                                    }
                                                    if (v5_4 <= 0) {
                                                        this.o().w().a("No unique parameters in main event. eventName", v9_8);
                                                        v4_39 = v17_3;
                                                    } else {
                                                        int v0_119 = v10_12.length;
                                                        String v3_16 = 0;
                                                        while (v3_16 < v0_119) {
                                                            int v6_8 = (v5_4 + 1);
                                                            v2_85[v5_4] = v10_12[v3_16];
                                                            v3_16++;
                                                            v5_4 = v6_8;
                                                        }
                                                        if (v5_4 != v2_85.length) {
                                                            v2_85 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v2_85, v5_4));
                                                        }
                                                        v33_1 = v2_85;
                                                        v5_3 = v9_8;
                                                        v37_2 = v29_0;
                                                        v30_1 = v1_35;
                                                        v29_2 = v17_3;
                                                    }
                                                }
                                            }
                                            v13_4 = v1_0;
                                            v41_0 = v5_2;
                                            v43_0 = v6_3;
                                            this.o().B().a("Extra parameter without existing main event. eventName, eventId", v9_8, v4_38);
                                            v49_0 = v11_8;
                                            v1_0 = v13_4;
                                            v51_0 = v14_4;
                                            v15_7 = v21_5;
                                            v45_0 = v23_0;
                                            v47_1 = v31_1;
                                            v0_16 = v37_0;
                                            v11_1 = v43_0;
                                            v14_1 = v12_14;
                                            v12_8 = v32_1;
                                            v2_24 = (v34 + 1);
                                            v7_0 = this;
                                            v13_5 = p54;
                                            v6_3 = v11_1;
                                            v10_3 = v12_8;
                                            v12_14 = v14_1;
                                            v8_1 = v15_7;
                                            v3_12 = v36;
                                            v5_2 = v41_0;
                                            v23_0 = v45_0;
                                            v9_2 = v47_1;
                                            v11_8 = v49_0;
                                            v14_4 = v51_0;
                                        }
                                    } else {
                                        this.o().B().a("Extra parameter without an event name. eventId", v4_38);
                                        v37_0 = v0_16;
                                        v13_4 = v1_0;
                                        v41_0 = v5_2;
                                        v43_0 = v6_3;
                                    }
                                }
                            }
                        }
                        v15_9 = v8_1;
                        v47_0 = v9_2;
                        v49_1 = v11_8;
                        v51_1 = v14_4;
                        v45_2 = v23_0;
                        v11_7 = v6_3;
                        v14_3 = v12_14;
                        v12_12 = v10_3;
                        v0_29 = v28_0;
                    }
                    if (v0_29 != 0) {
                        c.e.a.a.h.Oc[] v2_33 = new a.b.e.i.b();
                        String v3_21 = v0_29.length;
                        int v4_12 = v1_0;
                        boolean v1_33 = 0;
                        while (v1_33 < v3_21) {
                            int v5_19 = v0_29[v1_33];
                            int v0_70 = ((java.util.Map) v2_33.get(v5_19.e));
                            if (v0_70 == 0) {
                                int v6_26 = this.i();
                                int v0_71 = v5_19.e;
                                v6_26.s();
                                v6_26.b();
                                a.b.f.a.H.c(p53);
                                a.b.f.a.H.c(v0_71);
                                int v7_13 = new a.b.e.i.b();
                                android.database.sqlite.SQLiteDatabase v26_1 = v6_26.w();
                                try {
                                    int v9_5 = new String[2];
                                    v9_5[0] = v49_1;
                                    v9_5[1] = "data";
                                    String v13_8 = new String[2];
                                    v13_8[0] = v4_12;
                                    v13_8[1] = v0_71;
                                    int v4_15 = v26_1.query("property_filters", v9_5, "app_id=? AND property_name=?", v13_8, 0, 0, 0);
                                    try {
                                        if (!v4_15.moveToFirst()) {
                                            v0_70 = java.util.Collections.emptyMap();
                                            v4_15.close();
                                            if (v0_70 == 0) {
                                                v0_70 = new a.b.e.i.b();
                                            }
                                            v2_33.put(v5_19.e, v0_70);
                                            int v4_18 = v0_70.keySet().iterator();
                                            while (v4_18.hasNext()) {
                                                int v6_32 = ((Integer) v4_18.next()).intValue();
                                                if (!v14_3.contains(Integer.valueOf(v6_32))) {
                                                    String v10_11 = v45_2;
                                                    int v8_14 = ((java.util.BitSet) v10_11.get(Integer.valueOf(v6_32)));
                                                    int v9_7 = v22_0;
                                                    String v13_12 = ((java.util.BitSet) v9_7.get(Integer.valueOf(v6_32)));
                                                    if (((c.e.a.a.h.Mc) v12_12.get(Integer.valueOf(v6_32))) == null) {
                                                        int v7_21 = new c.e.a.a.h.Mc();
                                                        v12_12.put(Integer.valueOf(v6_32), v7_21);
                                                        v7_21.g = Boolean.valueOf(1);
                                                        v8_14 = new java.util.BitSet();
                                                        v10_11.put(Integer.valueOf(v6_32), v8_14);
                                                        v13_12 = new java.util.BitSet();
                                                        v9_7.put(Integer.valueOf(v6_32), v13_12);
                                                    }
                                                    int v7_27 = ((java.util.List) v0_70.get(Integer.valueOf(v6_32))).iterator();
                                                    while (v7_27.hasNext()) {
                                                        int v4_21;
                                                        int v19_4;
                                                        int v20_2;
                                                        android.database.sqlite.SQLiteException v43_2;
                                                        c.e.a.a.h.Hc v54_2 = v0_70;
                                                        int v0_88 = ((c.e.a.a.h.Hc) v7_27.next());
                                                        c.e.a.a.h.Oc[] v17_8 = v2_33;
                                                        String v18_5 = v3_21;
                                                        if (!this.o().a(2)) {
                                                            v19_4 = v4_18;
                                                            v20_2 = v7_27;
                                                            v43_2 = v11_7;
                                                            v4_21 = v47_0;
                                                        } else {
                                                            v19_4 = v4_18;
                                                            v20_2 = v7_27;
                                                            v43_2 = v11_7;
                                                            this.o().y().a("Evaluating filter. audience, filter, property", Integer.valueOf(v6_32), v0_88.d, this.j().c(v0_88.e));
                                                            v4_21 = v47_0;
                                                            this.o().y().a(v4_21, this.j().a(v0_88));
                                                        }
                                                        c.e.a.a.h.Oc[] v2_44 = v0_88.d;
                                                        if ((v2_44 != null) && (v2_44.intValue() <= 256)) {
                                                            if (!v8_14.get(v0_88.d.intValue())) {
                                                                int v4_32;
                                                                c.e.a.a.h.Oc[] v15_13;
                                                                c.e.a.a.h.Oc[] v44_3;
                                                                c.e.a.a.h.Oc[] v2_49 = v0_88.f;
                                                                if (v2_49 != null) {
                                                                    c.e.a.a.h.Oc[] v2_52;
                                                                    int v7_31 = Boolean.TRUE.equals(v2_49.f);
                                                                    android.database.sqlite.SQLiteException v11_12 = v5_19.g;
                                                                    if (v11_12 == null) {
                                                                        String v3_44;
                                                                        int v4_24;
                                                                        c.e.a.a.h.Oc[] v2_51;
                                                                        v47_0 = v4_21;
                                                                        v44_3 = v15_9;
                                                                        v15_13 = v49_1;
                                                                        String v3_41 = v5_19.i;
                                                                        if (v3_41 == null) {
                                                                            String v3_42 = v5_19.f;
                                                                            if (v3_42 == null) {
                                                                                v2_51 = this.o().w();
                                                                                v3_44 = this.j().c(v5_19.e);
                                                                                v4_24 = "User property has no value, property";
                                                                            } else {
                                                                                int v4_25 = v2_49.d;
                                                                                if (v4_25 != 0) {
                                                                                    v2_52 = this.a(v3_42, v4_25);
                                                                                    v4_32 = ark>c.e.a.a.h.Wark>.a(v2_52, v7_31);
                                                                                    String v3_57;
                                                                                    c.e.a.a.h.Oc[] v2_65 = this.o().y();
                                                                                    if (v4_32 != 0) {
                                                                                        v3_57 = v4_32;
                                                                                    } else {
                                                                                        v3_57 = "null";
                                                                                    }
                                                                                    v2_65.a("Property filter result", v3_57);
                                                                                    if (v4_32 != 0) {
                                                                                        v13_12.set(v0_88.d.intValue());
                                                                                        if (v4_32.booleanValue()) {
                                                                                            v8_14.set(v0_88.d.intValue());
                                                                                        }
                                                                                    } else {
                                                                                        v14_3.add(Integer.valueOf(v6_32));
                                                                                    }
                                                                                    v0_70 = v54_2;
                                                                                    v49_1 = v15_13;
                                                                                    v2_33 = v17_8;
                                                                                    v3_21 = v18_5;
                                                                                    v4_18 = v19_4;
                                                                                    v7_27 = v20_2;
                                                                                    v11_7 = v43_2;
                                                                                    v15_9 = v44_3;
                                                                                } else {
                                                                                    if (v2_49.e != null) {
                                                                                        if (!c.e.a.a.h.Ac.i(v3_42)) {
                                                                                            this.o().w().a("Invalid user property value for Numeric number filter. property, value", this.j().c(v5_19.e), v5_19.f);
                                                                                            v4_32 = 0;
                                                                                        } else {
                                                                                            v2_52 = this.a(v5_19.f, v2_49.e);
                                                                                        }
                                                                                    } else {
                                                                                        v2_51 = this.o().w();
                                                                                        v3_44 = this.j().c(v5_19.e);
                                                                                        v4_24 = "No string or number filter defined. property";
                                                                                    }
                                                                                }
                                                                            }
                                                                        } else {
                                                                            if (v2_49.e != null) {
                                                                                v2_52 = this.a(v3_41.doubleValue(), v2_49.e);
                                                                            } else {
                                                                                v2_51 = this.o().w();
                                                                                v3_44 = this.j().c(v5_19.e);
                                                                                v4_24 = "No number filter for double property. property";
                                                                            }
                                                                        }
                                                                        v2_51.a(v4_24, v3_44);
                                                                    } else {
                                                                        if (v2_49.e != null) {
                                                                            v47_0 = v4_21;
                                                                            v44_3 = v15_9;
                                                                            v15_13 = v49_1;
                                                                            v2_52 = this.a(v11_12.longValue(), v2_49.e);
                                                                        } else {
                                                                            this.o().w().a("No number filter for long property. property", this.j().c(v5_19.e));
                                                                            v47_0 = v4_21;
                                                                            v44_3 = v15_9;
                                                                            v15_13 = v49_1;
                                                                        }
                                                                    }
                                                                } else {
                                                                    this.o().w().a("Missing property filter. property", this.j().c(v5_19.e));
                                                                }
                                                            } else {
                                                                this.o().y().a("Property filter already evaluated true. audience ID, filter ID", Integer.valueOf(v6_32), v0_88.d);
                                                                v0_70 = v54_2;
                                                                v47_0 = v4_21;
                                                                v2_33 = v17_8;
                                                                v3_21 = v18_5;
                                                                v4_18 = v19_4;
                                                                v7_27 = v20_2;
                                                                v11_7 = v43_2;
                                                            }
                                                        } else {
                                                            v47_0 = v4_21;
                                                            c.e.a.a.h.Oc[] v44_2 = v15_9;
                                                            c.e.a.a.h.Oc[] v15_12 = v49_1;
                                                            this.o().w().a("Invalid property filter ID. appId, id", c.e.a.a.h.ya.a(p53), String.valueOf(v0_88.d));
                                                            v14_3.add(Integer.valueOf(v6_32));
                                                        }
                                                        v0_70 = v54_2;
                                                        v22_0 = v9_7;
                                                        v45_2 = v10_11;
                                                        v49_1 = v15_12;
                                                        v2_33 = v17_8;
                                                        v3_21 = v18_5;
                                                        v4_18 = v19_4;
                                                        v11_7 = v43_2;
                                                        v15_9 = v44_2;
                                                    }
                                                    v54_2 = v0_70;
                                                    v17_8 = v2_33;
                                                    v18_5 = v3_21;
                                                    v19_4 = v4_18;
                                                    v43_2 = v11_7;
                                                    v44_2 = v15_9;
                                                    v15_12 = v49_1;
                                                } else {
                                                    this.o().y().a(v15_9, Integer.valueOf(v6_32));
                                                }
                                            }
                                            c.e.a.a.h.Oc[] v17 = v2_33;
                                            String v10 = v45_2;
                                            android.database.sqlite.SQLiteException v11 = this;
                                            v1_33++;
                                            v4_12 = p53;
                                            v0_29 = p55;
                                        }
                                        do {
                                            int v0_75 = v4_15.getBlob(1);
                                            int v0_76 = c.e.a.a.h.md.a(v0_75, v0_75.length);
                                            int v8_10 = new c.e.a.a.h.Hc();
                                            v8_10.a(v0_76);
                                            int v0_80 = v4_15.getInt(0);
                                            String v10_9 = ((java.util.List) v7_13.get(Integer.valueOf(v0_80)));
                                            if (v10_9 == null) {
                                                v10_9 = new java.util.ArrayList();
                                                v7_13.put(Integer.valueOf(v0_80), v10_9);
                                            }
                                            v10_9.add(v8_10);
                                        } while(v4_15.moveToNext());
                                        v4_15.close();
                                        v0_70 = v7_13;
                                    } catch (int v0_72) {
                                        v6_26.o().f.a(v11_7, c.e.a.a.h.ya.a(p53), v0_72);
                                        if (v4_15 != 0) {
                                            v4_15.close();
                                        }
                                        v0_70 = 0;
                                    }
                                } catch (int v0_73) {
                                    String v42_1 = 0;
                                    if (v42_1 != null) {
                                        v42_1.close();
                                    }
                                    throw v0_73;
                                } catch (int v0_72) {
                                    v4_15 = 0;
                                } catch (int v0_73) {
                                    v42_1 = v4_15;
                                }
                            }
                        }
                    }
                    int v9_4 = v22_0;
                    String v10_4 = v45_2;
                    c.e.a.a.h.Oc[] v15_11 = v49_1;
                    boolean v1_34 = new c.e.a.a.h.Mc[v10_4.size()];
                    c.e.a.a.h.Oc[] v2_34 = v10_4.keySet().iterator();
                    int v5_10 = 0;
                    while (v2_34.hasNext()) {
                        int v0_60 = ((Integer) v2_34.next()).intValue();
                        if (!v14_3.contains(Integer.valueOf(v0_60))) {
                            String v3_26 = ((c.e.a.a.h.Mc) v12_12.get(Integer.valueOf(v0_60)));
                            if (v3_26 == null) {
                                v3_26 = new c.e.a.a.h.Mc();
                            }
                            int v4_13 = (v5_10 + 1);
                            v1_34[v5_10] = v3_26;
                            v3_26.d = Integer.valueOf(v0_60);
                            v3_26.e = new c.e.a.a.h.Rc();
                            v3_26.e.d = c.e.a.a.h.Ac.a(((java.util.BitSet) v10_4.get(Integer.valueOf(v0_60))));
                            v3_26.e.c = c.e.a.a.h.Ac.a(((java.util.BitSet) v9_4.get(Integer.valueOf(v0_60))));
                            int v5_17 = this.i();
                            String v3_28 = v3_26.e;
                            v5_17.s();
                            v5_17.b();
                            a.b.f.a.H.c(p53);
                            a.b.f.a.H.d(v3_28);
                            try {
                                int v6_22 = new byte[v3_28.c()];
                                int v7_9 = c.e.a.a.h.nd.a(v6_22, v6_22.length);
                                v3_28.a(v7_9);
                                v7_9.a();
                                String v3_31 = new android.content.ContentValues();
                                v3_31.put("app_id", p53);
                                v3_31.put(v15_11, Integer.valueOf(v0_60));
                                int v7_11 = v51_1;
                                v3_31.put(v7_11, v6_22);
                                try {
                                    c.e.a.a.h.Hc v54_1 = v2_34;
                                    try {
                                        if (v5_17.w().insertWithOnConflict("audience_filter_values", 0, v3_31, 5) != -1) {
                                            v2_34 = v54_1;
                                            v5_10 = v4_13;
                                            v51_1 = v7_11;
                                        } else {
                                            v5_17.o().B().a("Failed to insert filter results (got -1). appId", c.e.a.a.h.ya.a(p53));
                                        }
                                    } catch (int v0_62) {
                                        String v3_33 = v5_17.o().B();
                                        int v5_18 = c.e.a.a.h.ya.a(p53);
                                        int v6_23 = "Error storing filter results. appId";
                                        v3_33.a(v6_23, v5_18, v0_62);
                                    }
                                } catch (int v0_62) {
                                    v54_1 = 0;
                                }
                            } catch (int v0_62) {
                                v54_1 = v2_34;
                                v7_11 = v51_1;
                                v3_33 = v5_17.o().B();
                                v5_18 = c.e.a.a.h.ya.a(p53);
                                v6_23 = "Configuration loss. Failed to serialize filter results. appId";
                            }
                        }
                    }
                    return ((c.e.a.a.h.Mc[]) java.util.Arrays.copyOf(v1_34, v5_10));
                } else {
                    v2_37.close();
                    v0_2 = 0;
                }
            } catch (int v0_85) {
                int v4_46 = v2_37;
                android.database.sqlite.SQLiteException v16_6 = v4_46;
                if (v16_6 != null) {
                    v16_6.close();
                }
                throw v0_85;
            } catch (int v0_82) {
                try {
                    v1_31.o().f.a("Database error querying filter results. appId", c.e.a.a.h.ya.a(p53), v0_82);
                } catch (int v0_85) {
                    v4_46 = v2_37;
                }
                if (v2_37 == null) {
                } else {
                }
            }
        } catch (int v0_85) {
            v16_6 = 0;
        } catch (int v0_82) {
            v2_37 = 0;
        }
    }

Method c.e.a.a.h.Rb.a() calling method android.database.sqlite.SQLiteDatabase.query()

Couldn't retrieve source code

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final boolean a(String p38, long p39)
    {
        c.e.a.a.h.Aa v2_0 = "_lte";
        this.u().A();
        try {
            int v4_0 = 0;
            String v3_17 = new ark>c.e.a.a.h.Xaark>$a(this, 0);
            String v5_38 = this.u();
            long v6_0 = this.J;
            a.b.f.a.H.d(v3_17);
            v5_38.b();
            v5_38.s();
            try {
                String v22_0;
                boolean v10_18;
                long v15_3 = v5_38.w();
                boolean v14_6 = "";
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        boolean v10_31;
                        if (v6_0 == -1) {
                            v10_31 = new String[1];
                            v10_31[0] = 0;
                        } else {
                            v10_31 = new String[2];
                            v10_31[0] = 0;
                            v10_31[1] = String.valueOf(v6_0);
                        }
                        if (v6_0 != -1) {
                            v14_6 = " and rowid <= ?";
                        }
                        boolean v13_25 = new StringBuilder((v14_6.length() + 84));
                        v13_25.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v13_25.append(v14_6);
                        v13_25.append(" order by rowid limit 1;");
                        v4_0 = v15_3.rawQuery(v13_25.toString(), v10_31);
                        if (v4_0.moveToFirst()) {
                            boolean v13_26 = v4_0.getString(0);
                            v4_0.close();
                            v22_0 = v4_0;
                            v10_18 = v13_26;
                            v4_0 = 0;
                            try {
                                boolean v13_2 = new String[1];
                                v13_2[0] = "metadata";
                                int v9_1 = new String[2];
                                v9_1[0] = v4_0;
                                v9_1[1] = v10_18;
                                c.e.a.a.h.aa v23_2 = v15_3;
                                Boolean v8_11 = v15_3.query("raw_events_metadata", v13_2, "app_id = ? and metadata_fingerprint = ?", v9_1, 0, 0, "rowid", "2");
                                try {
                                    if (v8_11.moveToFirst()) {
                                        int v9_3 = v8_11.getBlob(0);
                                        int v9_4 = c.e.a.a.h.md.a(v9_3, v9_3.length);
                                        boolean v13_11 = new c.e.a.a.h.Qc();
                                        try {
                                            v13_11.a(v9_4);
                                        } catch (android.database.sqlite.SQLiteException v0_4) {
                                            v5_38.o().B().a("Data loss. Failed to merge raw event metadata. appId", c.e.a.a.h.ya.a(v4_0), v0_4);
                                            v8_11.close();
                                            int v4_9;
                                            if (v3_17.c == null) {
                                                v4_9 = 1;
                                            } else {
                                                if (!v3_17.c.isEmpty()) {
                                                    v4_9 = 0;
                                                } else {
                                                }
                                            }
                                            if (v4_9 != 0) {
                                                this.u().B();
                                                this.u().C();
                                                return 0;
                                            } else {
                                                int v4_10 = v3_17.a;
                                                String v5_4 = new c.e.a.a.h.Nc[v3_17.c.size()];
                                                v4_10.e = v5_4;
                                                String v5_6 = this.c.c(v4_10.r);
                                                Boolean v8_9 = 0;
                                                int v9_0 = 0;
                                                boolean v10_19 = 0;
                                                boolean v13_4 = 0;
                                                while (v8_9 < v3_17.c.size()) {
                                                    c.e.a.a.h.aa v23_1;
                                                    String v21_0;
                                                    long v15_23 = ((c.e.a.a.h.Nc) v3_17.c.get(v8_9));
                                                    if (!this.q().b(v3_17.a.r, v15_23.e)) {
                                                        long v24_4;
                                                        long v25_1;
                                                        v21_0 = v2_0;
                                                        String v20_0 = v10_19;
                                                        c.e.a.a.h.Aa v2_75 = this.q().c(v3_17.a.r, v15_23.e);
                                                        if (v2_75 != null) {
                                                            if (v15_23.d == null) {
                                                                boolean v10_44 = new c.e.a.a.h.Oc[0];
                                                                v15_23.d = v10_44;
                                                            }
                                                            long v6_34 = v15_23.d;
                                                            boolean v10_21 = v6_34.length;
                                                            v23_1 = v8_9;
                                                            int v11_15 = 0;
                                                            long v12_9 = 0;
                                                            String v22_1 = 0;
                                                            while(true) {
                                                                v24_4 = v9_0;
                                                                if (v11_15 >= v10_21) {
                                                                    break;
                                                                }
                                                                long v25_2 = v10_21;
                                                                boolean v10_20 = v6_34[v11_15];
                                                                long v26_1 = v6_34;
                                                                if (!"_c".equals(v10_20.d)) {
                                                                    if ("_r".equals(v10_20.d)) {
                                                                        v10_20.f = Long.valueOf(1);
                                                                        v22_1 = 1;
                                                                    }
                                                                } else {
                                                                    v10_20.f = Long.valueOf(1);
                                                                    v12_9 = 1;
                                                                }
                                                                v11_15++;
                                                                v9_0 = v24_4;
                                                                v10_21 = v25_2;
                                                                v6_34 = v26_1;
                                                            }
                                                            if ((v12_9 == 0) && (v2_75 != null)) {
                                                                this.o().y().a("Marking event as conversion", this.t().a(v15_23.e));
                                                                long v6_97 = v15_23.d;
                                                                long v6_1 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v6_97, (v6_97.length + 1)));
                                                                boolean v10_1 = new c.e.a.a.h.Oc();
                                                                v10_1.d = "_c";
                                                                v10_1.f = Long.valueOf(1);
                                                                v6_1[(v6_1.length - 1)] = v10_1;
                                                                v15_23.d = v6_1;
                                                            }
                                                            if (v22_1 == null) {
                                                                this.o().y().a("Marking event as real-time", this.t().a(v15_23.e));
                                                                long v6_4 = v15_23.d;
                                                                long v6_6 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v6_4, (v6_4.length + 1)));
                                                                boolean v10_7 = new c.e.a.a.h.Oc();
                                                                v10_7.d = "_r";
                                                                v10_7.f = Long.valueOf(1);
                                                                v6_6[(v6_6.length - 1)] = v10_7;
                                                                v15_23.d = v6_6;
                                                            }
                                                            boolean v10_10;
                                                            v25_1 = v13_4;
                                                            if (this.u().a(this.i(), v3_17.a.r, 0, 0, 0, 0, 1).e <= ((long) this.c.a(v3_17.a.r))) {
                                                                v10_10 = 1;
                                                            } else {
                                                                long v6_13 = 0;
                                                                while(true) {
                                                                    boolean v10_11 = v15_23.d;
                                                                    if (v6_13 < v10_11.length) {
                                                                        if ("_r".equals(v10_11[v6_13].d)) {
                                                                            break;
                                                                        }
                                                                        v6_13++;
                                                                    }
                                                                    v10_10 = v20_0;
                                                                }
                                                                Boolean v8_0 = v15_23.d;
                                                                boolean v10_17 = new c.e.a.a.h.Oc[(v8_0.length - 1)];
                                                                if (v6_13 > 0) {
                                                                    System.arraycopy(v8_0, 0, v10_17, 0, v6_13);
                                                                }
                                                                if (v6_13 < v10_17.length) {
                                                                    System.arraycopy(v15_23.d, (v6_13 + 1), v10_17, v6_13, (v10_17.length - v6_13));
                                                                }
                                                                v15_23.d = v10_17;
                                                            }
                                                            if ((c.e.a.a.h.Ac.a(v15_23.e)) && ((v2_75 != null) && (this.u().a(this.i(), v3_17.a.r, 0, 0, 1, 0, 0).c > ((long) this.c.b(v3_17.a.r, c.e.a.a.h.oa.t))))) {
                                                                this.o().w().a("Too many conversions. Not logging as conversion. appId", c.e.a.a.h.ya.a(v3_17.a.r));
                                                                c.e.a.a.h.Aa v2_10 = v15_23.d;
                                                                Boolean v8_7 = 0;
                                                                int v11_14 = 0;
                                                                long v12_8 = 0;
                                                                while (v8_7 < v2_10.length) {
                                                                    boolean v13_5 = v2_10[v8_7];
                                                                    if (!"_c".equals(v13_5.d)) {
                                                                        if ("_err".equals(v13_5.d)) {
                                                                            v11_14 = 1;
                                                                        }
                                                                    } else {
                                                                        v12_8 = v13_5;
                                                                    }
                                                                    v8_7++;
                                                                }
                                                                if ((v11_14 == 0) || (v12_8 == 0)) {
                                                                    if (v12_8 == 0) {
                                                                        this.o().B().a("Did not find conversion parameter. appId", c.e.a.a.h.ya.a(v3_17.a.r));
                                                                    } else {
                                                                        v12_8.d = "_err";
                                                                        v12_8.f = Long.valueOf(10);
                                                                    }
                                                                } else {
                                                                    c.e.a.a.h.Aa v2_14 = v15_23.d;
                                                                    Boolean v7_3 = new c.e.a.a.h.Oc[1];
                                                                    v7_3[0] = v12_8;
                                                                    v15_23.d = ((c.e.a.a.h.Oc[]) a.b.f.a.H.b(v2_14, v7_3));
                                                                }
                                                            }
                                                            v20_0 = v10_10;
                                                        } else {
                                                            this.s();
                                                            if (!c.e.a.a.h.Ac.l(v15_23.e)) {
                                                                v23_1 = v8_9;
                                                                v24_4 = v9_0;
                                                                v25_1 = v13_4;
                                                            } else {
                                                            }
                                                        }
                                                        if ((v5_6 != null) && ("_e".equals(v15_23.e))) {
                                                            Boolean v7_5;
                                                            long v6_27;
                                                            c.e.a.a.h.Aa v2_25;
                                                            c.e.a.a.h.Aa v2_19 = v15_23.d;
                                                            if (v2_19 == null) {
                                                                v2_25 = this.o().w();
                                                                v6_27 = "Engagement event does not contain any parameters. appId";
                                                                v7_5 = v3_17.a.r;
                                                            } else {
                                                                if (v2_19.length != 0) {
                                                                    this.s();
                                                                    c.e.a.a.h.Aa v2_23 = ((Long) c.e.a.a.h.Ac.b(v15_23, "_et"));
                                                                    if (v2_23 != null) {
                                                                        v25_1 += v2_23.longValue();
                                                                        v9_0 = (v24_4 + 1);
                                                                        v4_10.e[v24_4] = v15_23;
                                                                        v10_19 = v20_0;
                                                                        v13_4 = v25_1;
                                                                        v8_9 = (v23_1 + 1);
                                                                        v2_0 = v21_0;
                                                                        long v12 = 1;
                                                                    } else {
                                                                        v2_25 = this.o().w();
                                                                        v6_27 = "Engagement event does not include duration. appId";
                                                                        v7_5 = v3_17.a.r;
                                                                    }
                                                                } else {
                                                                }
                                                            }
                                                            v2_25.a(v6_27, c.e.a.a.h.ya.a(v7_5));
                                                        }
                                                    } else {
                                                        c.e.a.a.h.Aa v2_34;
                                                        String v20_1 = v10_19;
                                                        v21_0 = v2_0;
                                                        this.o().w().a("Dropping blacklisted raw event. appId", c.e.a.a.h.ya.a(v3_17.a.r), this.t().a(v15_23.e));
                                                        if (this.s().j(v3_17.a.r)) {
                                                            v2_34 = 1;
                                                        } else {
                                                            if (!this.s().k(v3_17.a.r)) {
                                                                v2_34 = 0;
                                                            } else {
                                                            }
                                                        }
                                                        if ((v2_34 == null) && (!"_err".equals(v15_23.e))) {
                                                            this.s().a(v3_17.a.r, 11, "_ev", v15_23.e, 0);
                                                        }
                                                        v23_1 = v8_9;
                                                        v10_19 = v20_1;
                                                    }
                                                }
                                                String v21_3 = v2_0;
                                                String v20_4 = v10_19;
                                                long v25_4 = v13_4;
                                                int v9_12 = v9_0;
                                                if (v9_12 < v3_17.c.size()) {
                                                    v4_10.e = ((c.e.a.a.h.Nc[]) java.util.Arrays.copyOf(v4_10.e, v9_12));
                                                }
                                                if (v5_6 != null) {
                                                    c.e.a.a.h.Aa v2_49;
                                                    long v6_54 = v21_3;
                                                    c.e.a.a.h.Aa v2_46 = this.u().c(v4_10.r, v6_54);
                                                    if (v2_46 == null) {
                                                        v2_49 = new c.e.a.a.h.zc;
                                                        v2_49(v4_10.r, "auto", "_lte", ((c.e.a.a.c.d.b) this.n).a(), Long.valueOf(v25_4));
                                                    } else {
                                                        if (v2_46.e != null) {
                                                            String v5_9 = new c.e.a.a.h.zc;
                                                            v5_9(v4_10.r, "auto", "_lte", ((c.e.a.a.c.d.b) this.n).a(), Long.valueOf((((Long) v2_46.e).longValue() + v25_4)));
                                                            v2_49 = v5_9;
                                                        } else {
                                                        }
                                                    }
                                                    String v5_12 = new c.e.a.a.h.Sc();
                                                    v5_12.e = v6_54;
                                                    v5_12.d = Long.valueOf(((c.e.a.a.c.d.b) this.n).a());
                                                    v5_12.g = ((Long) v2_49.e);
                                                    Boolean v7_34 = 0;
                                                    while(true) {
                                                        long v6_55;
                                                        Boolean v8_17 = v4_10.f;
                                                        if (v7_34 >= v8_17.length) {
                                                            break;
                                                        }
                                                        if (!v6_54.equals(v8_17[v7_34].e)) {
                                                            v7_34++;
                                                        } else {
                                                            v4_10.f[v7_34] = v5_12;
                                                            v6_55 = 1;
                                                        }
                                                        if (v6_55 == 0) {
                                                            long v6_57 = v4_10.f;
                                                            v4_10.f = ((c.e.a.a.h.Sc[]) java.util.Arrays.copyOf(v6_57, (v6_57.length + 1)));
                                                            v4_10.f[(v3_17.a.f.length - 1)] = v5_12;
                                                        }
                                                        if (v25_4 > 0) {
                                                            this.u().a(v2_49);
                                                            this.o().x().a("Updated lifetime engagement user property with value. Value", v2_49.e);
                                                        }
                                                    }
                                                    v6_55 = 0;
                                                }
                                                int v4_17;
                                                c.e.a.a.h.ia v1_5;
                                                long v15_7;
                                                v4_10.D = this.a(v4_10.r, v4_10.f, v4_10.e);
                                                if ((!((Boolean) c.e.a.a.h.oa.f.a()).booleanValue()) || (!"1".equals(this.c.l().a(v3_17.a.r, "measurement.event_sampling_enabled")))) {
                                                    v15_7 = v3_17;
                                                    v1_5 = v4_10;
                                                    v4_17 = 0;
                                                } else {
                                                    c.e.a.a.h.Aa v2_62 = new java.util.HashMap();
                                                    String v5_22 = new c.e.a.a.h.Nc[v4_10.e.length];
                                                    long v6_65 = this.s().x();
                                                    Boolean v7_43 = v4_10.e;
                                                    Boolean v8_23 = v7_43.length;
                                                    int v9_15 = 0;
                                                    boolean v10_33 = 0;
                                                    while (v9_15 < v8_23) {
                                                        String v21_4;
                                                        c.e.a.a.h.ia v1_27;
                                                        long v15_16;
                                                        String v22_2;
                                                        c.e.a.a.h.aa v23_4;
                                                        long v24_3;
                                                        int v11_21 = v7_43[v9_15];
                                                        if (!v11_21.e.equals("_ep")) {
                                                            long v12_16;
                                                            if (ark>c.e.a.a.h.Xaark>.a(v11_21, "_dbg", Long.valueOf(1))) {
                                                                v12_16 = 1;
                                                            } else {
                                                                v12_16 = this.q().d(v3_17.a.r, v11_21.e);
                                                            }
                                                            if (v12_16 > 0) {
                                                                c.e.a.a.h.ia v1_18 = ((c.e.a.a.h.ia) v2_62.get(v11_21.e));
                                                                if (v1_18 != null) {
                                                                    v21_4 = v7_43;
                                                                    v22_2 = v8_23;
                                                                } else {
                                                                    v21_4 = v7_43;
                                                                    v1_18 = this.u().a(v3_17.a.r, v11_21.e);
                                                                    if (v1_18 != null) {
                                                                    } else {
                                                                        v22_2 = v8_23;
                                                                        this.o().w().a("Event being bundled has no eventAggregate. appId, eventName", v3_17.a.r, v11_21.e);
                                                                        v1_18 = new c.e.a.a.h.ia;
                                                                        v1_18(v3_17.a.r, v11_21.e, 1, 1, v11_21.f.longValue(), 0, 0, 0, 0);
                                                                    }
                                                                }
                                                                Boolean v8_30;
                                                                this.s();
                                                                Boolean v7_54 = ((Long) c.e.a.a.h.Ac.b(v11_21, "_eid"));
                                                                if (v7_54 == null) {
                                                                    v8_30 = 0;
                                                                } else {
                                                                    v8_30 = 1;
                                                                }
                                                                c.e.a.a.h.ia v1_24;
                                                                Boolean v7_58;
                                                                Boolean v8_34;
                                                                Boolean v8_31 = Boolean.valueOf(v8_30);
                                                                if (v12_16 != 1) {
                                                                    if (v6_65.nextInt(v12_16) != 0) {
                                                                        v15_16 = v3_17;
                                                                        v23_4 = v4_10;
                                                                        v24_3 = v6_65;
                                                                        if (Math.abs((v11_21.f.longValue() - v1_18.f)) < 86400000) {
                                                                            if (!v8_31.booleanValue()) {
                                                                                v9_15++;
                                                                                v3_17 = v15_16;
                                                                                v7_43 = v21_4;
                                                                                v8_23 = v22_2;
                                                                                v4_10 = v23_4;
                                                                                v6_65 = v24_3;
                                                                            } else {
                                                                                v2_62.put(v11_21.e, v1_18.a(v7_54, 0, 0));
                                                                            }
                                                                        } else {
                                                                            this.s();
                                                                            v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_efs", Long.valueOf(1));
                                                                            this.s();
                                                                            long v6_82 = ((long) v12_16);
                                                                            v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", Long.valueOf(v6_82));
                                                                            String v3_26 = (v10_33 + 1);
                                                                            v5_22[v10_33] = v11_21;
                                                                            if (v8_31.booleanValue()) {
                                                                                v1_18 = v1_18.a(0, Long.valueOf(v6_82), Boolean.valueOf(1));
                                                                            }
                                                                            v2_62.put(v11_21.e, v1_18.b(v11_21.f.longValue()));
                                                                            v10_33 = v3_26;
                                                                        }
                                                                    } else {
                                                                        this.s();
                                                                        long v12_19 = ((long) v12_16);
                                                                        v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", Long.valueOf(v12_19));
                                                                        v7_58 = (v10_33 + 1);
                                                                        v5_22[v10_33] = v11_21;
                                                                        if (v8_31.booleanValue()) {
                                                                            v1_18 = v1_18.a(0, Long.valueOf(v12_19), 0);
                                                                        }
                                                                        v8_34 = v11_21.e;
                                                                        v1_24 = v1_18.b(v11_21.f.longValue());
                                                                        v2_62.put(v8_34, v1_24);
                                                                    }
                                                                } else {
                                                                    v7_58 = (v10_33 + 1);
                                                                    v5_22[v10_33] = v11_21;
                                                                    if ((v8_31.booleanValue()) && ((v1_18.g != null) || ((v1_18.h != null) || (v1_18.i != null)))) {
                                                                        v1_24 = v1_18.a(0, 0, 0);
                                                                        v8_34 = v11_21.e;
                                                                    }
                                                                }
                                                                v10_33 = v7_58;
                                                                v15_16 = v3_17;
                                                                v23_4 = v4_10;
                                                                v24_3 = v6_65;
                                                            } else {
                                                                this.o().w().a("Sample rate must be positive. event, rate", v11_21.e, Integer.valueOf(v12_16));
                                                                v1_27 = (v10_33 + 1);
                                                                v5_22[v10_33] = v11_21;
                                                                v10_33 = v1_27;
                                                                v15_16 = v3_17;
                                                                v23_4 = v4_10;
                                                                v24_3 = v6_65;
                                                                v21_4 = v7_43;
                                                                v22_2 = v8_23;
                                                            }
                                                        } else {
                                                            this.s();
                                                            long v12_23 = ((String) c.e.a.a.h.Ac.b(v11_21, "_en"));
                                                            long v15_19 = ((c.e.a.a.h.ia) v2_62.get(v12_23));
                                                            if (v15_19 == 0) {
                                                                v15_19 = this.u().a(v3_17.a.r, v12_23);
                                                                v2_62.put(v12_23, v15_19);
                                                            }
                                                            if (v15_19.g != null) {
                                                            } else {
                                                                if (v15_19.h.longValue() > 1) {
                                                                    this.s();
                                                                    v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", v15_19.h);
                                                                }
                                                                c.e.a.a.h.ia v1_35 = v15_19.i;
                                                                if ((v1_35 != null) && (v1_35.booleanValue())) {
                                                                    this.s();
                                                                    v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_efs", Long.valueOf(1));
                                                                }
                                                                v1_27 = (v10_33 + 1);
                                                                v5_22[v10_33] = v11_21;
                                                            }
                                                        }
                                                    }
                                                    v15_7 = v3_17;
                                                    v1_5 = v4_10;
                                                    v4_17 = 0;
                                                    if (v10_33 < v1_5.e.length) {
                                                        v1_5.e = ((c.e.a.a.h.Nc[]) java.util.Arrays.copyOf(v5_22, v10_33));
                                                    }
                                                    c.e.a.a.h.Aa v2_64 = v2_62.entrySet().iterator();
                                                    while (v2_64.hasNext()) {
                                                        this.u().a(((c.e.a.a.h.ia) ((java.util.Map$Entry) v2_64.next()).getValue()));
                                                    }
                                                }
                                                v1_5.h = Long.valueOf(nan);
                                                v1_5.i = Long.valueOf(-0.0);
                                                c.e.a.a.h.Aa v2_69 = 0;
                                                while(true) {
                                                    String v3_7 = v1_5.e;
                                                    if (v2_69 >= v3_7.length) {
                                                        break;
                                                    }
                                                    String v3_11 = v3_7[v2_69];
                                                    if (v3_11.f.longValue() < v1_5.h.longValue()) {
                                                        v1_5.h = v3_11.f;
                                                    }
                                                    if (v3_11.f.longValue() > v1_5.i.longValue()) {
                                                        v1_5.i = v3_11.f;
                                                    }
                                                    v2_69++;
                                                }
                                                c.e.a.a.h.Aa v2_70 = v15_7;
                                                String v3_9 = v2_70.a.r;
                                                String v5_25 = this.u().b(v3_9);
                                                if (v5_25 != null) {
                                                    if (v1_5.e.length > 0) {
                                                        Boolean v8_25;
                                                        long v6_68 = v5_25.h();
                                                        if (v6_68 == 0) {
                                                            v8_25 = v4_17;
                                                        } else {
                                                            v8_25 = Long.valueOf(v6_68);
                                                        }
                                                        v1_5.k = v8_25;
                                                        Boolean v8_26 = v5_25.g();
                                                        if (v8_26 != 0) {
                                                            v6_68 = v8_26;
                                                        } else {
                                                        }
                                                        if (v6_68 != 0) {
                                                            v4_17 = Long.valueOf(v6_68);
                                                        }
                                                        v1_5.j = v4_17;
                                                        v5_25.r();
                                                        v1_5.z = Integer.valueOf(((int) v5_25.o()));
                                                        v5_25.a(v1_5.h.longValue());
                                                        v5_25.b(v1_5.i.longValue());
                                                        v1_5.A = v5_25.s();
                                                        this.u().a(v5_25);
                                                    }
                                                } else {
                                                    this.o().B().a("Bundling raw events w/o app info. appId", c.e.a.a.h.ya.a(v2_70.a.r));
                                                }
                                                if (v1_5.e.length > 0) {
                                                    int v4_31;
                                                    int v4_30 = this.q().a(v2_70.a.r);
                                                    if (v4_30 == 0) {
                                                        if (!android.text.TextUtils.isEmpty(v2_70.a.B)) {
                                                            this.o().w().a("Did not find measurement config or missing version info. appId", c.e.a.a.h.ya.a(v2_70.a.r));
                                                        } else {
                                                            v4_31 = Long.valueOf(-1);
                                                            v1_5.J = v4_31;
                                                        }
                                                    } else {
                                                        v4_31 = v4_30.c;
                                                        if (v4_31 != 0) {
                                                        }
                                                    }
                                                    this.u().a(v1_5, v20_4);
                                                }
                                                this.u().a(v2_70.b);
                                                c.e.a.a.h.ia v1_7 = this.u();
                                                c.e.a.a.h.Aa v2_72 = v1_7.w();
                                                try {
                                                    String v5_31 = new String[2];
                                                    v5_31[0] = v3_9;
                                                    v5_31[1] = v3_9;
                                                    v2_72.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_31);
                                                } catch (android.database.sqlite.SQLiteException v0_12) {
                                                    v1_7.o().B().a("Failed to remove unused event metadata. appId", c.e.a.a.h.ya.a(v3_9), v0_12);
                                                }
                                                this.u().B();
                                                this.u().C();
                                                return 1;
                                            }
                                        }
                                        if (v8_11.moveToNext()) {
                                            v5_38.o().w().a("Get multiple raw event metadata records, expected one. appId", c.e.a.a.h.ya.a(v4_0));
                                        }
                                        String v16_2;
                                        String[] v17_1;
                                        v8_11.close();
                                        v3_17.a(v13_11);
                                        if (v6_0 == -1) {
                                            boolean v13_13 = new String[2];
                                            v13_13[0] = v4_0;
                                            v13_13[1] = v10_18;
                                            v16_2 = "app_id = ? and metadata_fingerprint = ?";
                                            v17_1 = v13_13;
                                        } else {
                                            boolean v14_4 = new String[3];
                                            v14_4[0] = v4_0;
                                            v14_4[1] = v10_18;
                                            v14_4[2] = String.valueOf(v6_0);
                                            v16_2 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v17_1 = v14_4;
                                        }
                                        long v15_4 = new String[4];
                                        v15_4[0] = "rowid";
                                        v15_4[1] = "name";
                                        v15_4[2] = "timestamp";
                                        v15_4[3] = "data";
                                        long v6_50 = v23_2.query("raw_events", v15_4, v16_2, v17_1, 0, 0, "rowid", 0);
                                        try {
                                            if (v6_50.moveToFirst()) {
                                                do {
                                                    Boolean v7_14 = v6_50.getLong(0);
                                                    boolean v10_25 = v6_50.getBlob(3);
                                                    boolean v10_26 = c.e.a.a.h.md.a(v10_25, v10_25.length);
                                                    boolean v13_19 = new c.e.a.a.h.Nc();
                                                    v13_19.a(v10_26);
                                                    v13_19.e = v6_50.getString(1);
                                                    v13_19.f = Long.valueOf(v6_50.getLong(2));
                                                    if (v3_17.a(v7_14, v13_19)) {
                                                    } else {
                                                        break;
                                                    }
                                                } while(v6_50.moveToNext());
                                            } else {
                                                v5_38.o().w().a("Raw event data disappeared while in transaction. appId", c.e.a.a.h.ya.a(v4_0));
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_7) {
                                            c.e.a.a.h.Aa v2_1 = v0_7;
                                            v4_0 = v6_50;
                                            if (v4_0 != 0) {
                                                v4_0.close();
                                            }
                                            throw v2_1;
                                        } catch (android.database.sqlite.SQLiteException v0_6) {
                                            v22_0 = v6_50;
                                            long v6_20 = v0_6;
                                            v8_11 = v22_0;
                                            v5_38.o().B().a("Data loss. Error selecting raw event. appId", c.e.a.a.h.ya.a(v4_0), v6_20);
                                            if (v8_11 == null) {
                                            }
                                        }
                                        v6_50.close();
                                    } else {
                                        v5_38.o().B().a("Raw event metadata record is missing. appId", c.e.a.a.h.ya.a(v4_0));
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_8) {
                                    v6_20 = v0_8;
                                    v22_0 = v8_11;
                                }
                            } catch (android.database.sqlite.SQLiteException v0_3) {
                                v2_1 = v0_3;
                                v4_0 = v22_0;
                            } catch (android.database.sqlite.SQLiteException v0_2) {
                                v6_20 = v0_2;
                            }
                        }
                    } else {
                        try {
                            boolean v13_28;
                            if (v6_0 == -1) {
                                v13_28 = new String[1];
                                v13_28[0] = String.valueOf(p39);
                            } else {
                                v13_28 = new String[2];
                                v13_28[0] = String.valueOf(v6_0);
                                v13_28[1] = String.valueOf(p39);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_13) {
                            v6_20 = v0_13;
                            v22_0 = 0;
                        }
                        if (v6_0 != -1) {
                            v14_6 = "rowid <= ? and ";
                        }
                        boolean v10_42 = new StringBuilder((v14_6.length() + 148));
                        v10_42.append("select app_id, metadata_fingerprint from raw_events where ");
                        v10_42.append(v14_6);
                        v10_42.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v4_0 = v15_3.rawQuery(v10_42.toString(), v13_28);
                        if (v4_0.moveToFirst()) {
                            boolean v10_9 = v4_0.getString(0);
                            try {
                                boolean v13_0 = v4_0.getString(1);
                                v4_0.close();
                                v22_0 = v4_0;
                                v4_0 = v10_9;
                                v10_18 = v13_0;
                            } catch (android.database.sqlite.SQLiteException v0_0) {
                                v6_20 = v0_0;
                                v22_0 = v4_0;
                                v4_0 = v10_18;
                            }
                        } else {
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_11) {
                    v2_1 = v0_11;
                } catch (android.database.sqlite.SQLiteException v0_9) {
                    v6_20 = v0_9;
                    v22_0 = v4_0;
                    v4_0 = 0;
                }
                v4_0.close();
            } catch (android.database.sqlite.SQLiteException v0_15) {
                v2_1 = v0_15;
                v4_0 = 0;
            } catch (android.database.sqlite.SQLiteException v0_14) {
                v6_20 = v0_14;
                v4_0 = 0;
                v8_11 = 0;
            } catch (android.database.sqlite.SQLiteException v0_10) {
                v2_1 = v0_10;
                v4_0 = v8_11;
            }
        } catch (android.database.sqlite.SQLiteException v0_1) {
            c.e.a.a.h.ia v1_1 = v0_1;
            this.u().C();
            throw v1_1;
        }
    }

Method c.e.a.a.h.Xa.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final boolean a(String p38, long p39)
    {
        c.e.a.a.h.Aa v2_0 = "_lte";
        this.u().A();
        try {
            int v4_0 = 0;
            String v3_17 = new ark>c.e.a.a.h.Xaark>$a(this, 0);
            String v5_38 = this.u();
            long v6_0 = this.J;
            a.b.f.a.H.d(v3_17);
            v5_38.b();
            v5_38.s();
            try {
                String v22_0;
                boolean v10_18;
                long v15_3 = v5_38.w();
                boolean v14_6 = "";
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        boolean v10_31;
                        if (v6_0 == -1) {
                            v10_31 = new String[1];
                            v10_31[0] = 0;
                        } else {
                            v10_31 = new String[2];
                            v10_31[0] = 0;
                            v10_31[1] = String.valueOf(v6_0);
                        }
                        if (v6_0 != -1) {
                            v14_6 = " and rowid <= ?";
                        }
                        boolean v13_25 = new StringBuilder((v14_6.length() + 84));
                        v13_25.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v13_25.append(v14_6);
                        v13_25.append(" order by rowid limit 1;");
                        v4_0 = v15_3.rawQuery(v13_25.toString(), v10_31);
                        if (v4_0.moveToFirst()) {
                            boolean v13_26 = v4_0.getString(0);
                            v4_0.close();
                            v22_0 = v4_0;
                            v10_18 = v13_26;
                            v4_0 = 0;
                            try {
                                boolean v13_2 = new String[1];
                                v13_2[0] = "metadata";
                                int v9_1 = new String[2];
                                v9_1[0] = v4_0;
                                v9_1[1] = v10_18;
                                c.e.a.a.h.aa v23_2 = v15_3;
                                Boolean v8_11 = v15_3.query("raw_events_metadata", v13_2, "app_id = ? and metadata_fingerprint = ?", v9_1, 0, 0, "rowid", "2");
                                try {
                                    if (v8_11.moveToFirst()) {
                                        int v9_3 = v8_11.getBlob(0);
                                        int v9_4 = c.e.a.a.h.md.a(v9_3, v9_3.length);
                                        boolean v13_11 = new c.e.a.a.h.Qc();
                                        try {
                                            v13_11.a(v9_4);
                                        } catch (android.database.sqlite.SQLiteException v0_4) {
                                            v5_38.o().B().a("Data loss. Failed to merge raw event metadata. appId", c.e.a.a.h.ya.a(v4_0), v0_4);
                                            v8_11.close();
                                            int v4_9;
                                            if (v3_17.c == null) {
                                                v4_9 = 1;
                                            } else {
                                                if (!v3_17.c.isEmpty()) {
                                                    v4_9 = 0;
                                                } else {
                                                }
                                            }
                                            if (v4_9 != 0) {
                                                this.u().B();
                                                this.u().C();
                                                return 0;
                                            } else {
                                                int v4_10 = v3_17.a;
                                                String v5_4 = new c.e.a.a.h.Nc[v3_17.c.size()];
                                                v4_10.e = v5_4;
                                                String v5_6 = this.c.c(v4_10.r);
                                                Boolean v8_9 = 0;
                                                int v9_0 = 0;
                                                boolean v10_19 = 0;
                                                boolean v13_4 = 0;
                                                while (v8_9 < v3_17.c.size()) {
                                                    c.e.a.a.h.aa v23_1;
                                                    String v21_0;
                                                    long v15_23 = ((c.e.a.a.h.Nc) v3_17.c.get(v8_9));
                                                    if (!this.q().b(v3_17.a.r, v15_23.e)) {
                                                        long v24_4;
                                                        long v25_1;
                                                        v21_0 = v2_0;
                                                        String v20_0 = v10_19;
                                                        c.e.a.a.h.Aa v2_75 = this.q().c(v3_17.a.r, v15_23.e);
                                                        if (v2_75 != null) {
                                                            if (v15_23.d == null) {
                                                                boolean v10_44 = new c.e.a.a.h.Oc[0];
                                                                v15_23.d = v10_44;
                                                            }
                                                            long v6_34 = v15_23.d;
                                                            boolean v10_21 = v6_34.length;
                                                            v23_1 = v8_9;
                                                            int v11_15 = 0;
                                                            long v12_9 = 0;
                                                            String v22_1 = 0;
                                                            while(true) {
                                                                v24_4 = v9_0;
                                                                if (v11_15 >= v10_21) {
                                                                    break;
                                                                }
                                                                long v25_2 = v10_21;
                                                                boolean v10_20 = v6_34[v11_15];
                                                                long v26_1 = v6_34;
                                                                if (!"_c".equals(v10_20.d)) {
                                                                    if ("_r".equals(v10_20.d)) {
                                                                        v10_20.f = Long.valueOf(1);
                                                                        v22_1 = 1;
                                                                    }
                                                                } else {
                                                                    v10_20.f = Long.valueOf(1);
                                                                    v12_9 = 1;
                                                                }
                                                                v11_15++;
                                                                v9_0 = v24_4;
                                                                v10_21 = v25_2;
                                                                v6_34 = v26_1;
                                                            }
                                                            if ((v12_9 == 0) && (v2_75 != null)) {
                                                                this.o().y().a("Marking event as conversion", this.t().a(v15_23.e));
                                                                long v6_97 = v15_23.d;
                                                                long v6_1 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v6_97, (v6_97.length + 1)));
                                                                boolean v10_1 = new c.e.a.a.h.Oc();
                                                                v10_1.d = "_c";
                                                                v10_1.f = Long.valueOf(1);
                                                                v6_1[(v6_1.length - 1)] = v10_1;
                                                                v15_23.d = v6_1;
                                                            }
                                                            if (v22_1 == null) {
                                                                this.o().y().a("Marking event as real-time", this.t().a(v15_23.e));
                                                                long v6_4 = v15_23.d;
                                                                long v6_6 = ((c.e.a.a.h.Oc[]) java.util.Arrays.copyOf(v6_4, (v6_4.length + 1)));
                                                                boolean v10_7 = new c.e.a.a.h.Oc();
                                                                v10_7.d = "_r";
                                                                v10_7.f = Long.valueOf(1);
                                                                v6_6[(v6_6.length - 1)] = v10_7;
                                                                v15_23.d = v6_6;
                                                            }
                                                            boolean v10_10;
                                                            v25_1 = v13_4;
                                                            if (this.u().a(this.i(), v3_17.a.r, 0, 0, 0, 0, 1).e <= ((long) this.c.a(v3_17.a.r))) {
                                                                v10_10 = 1;
                                                            } else {
                                                                long v6_13 = 0;
                                                                while(true) {
                                                                    boolean v10_11 = v15_23.d;
                                                                    if (v6_13 < v10_11.length) {
                                                                        if ("_r".equals(v10_11[v6_13].d)) {
                                                                            break;
                                                                        }
                                                                        v6_13++;
                                                                    }
                                                                    v10_10 = v20_0;
                                                                }
                                                                Boolean v8_0 = v15_23.d;
                                                                boolean v10_17 = new c.e.a.a.h.Oc[(v8_0.length - 1)];
                                                                if (v6_13 > 0) {
                                                                    System.arraycopy(v8_0, 0, v10_17, 0, v6_13);
                                                                }
                                                                if (v6_13 < v10_17.length) {
                                                                    System.arraycopy(v15_23.d, (v6_13 + 1), v10_17, v6_13, (v10_17.length - v6_13));
                                                                }
                                                                v15_23.d = v10_17;
                                                            }
                                                            if ((c.e.a.a.h.Ac.a(v15_23.e)) && ((v2_75 != null) && (this.u().a(this.i(), v3_17.a.r, 0, 0, 1, 0, 0).c > ((long) this.c.b(v3_17.a.r, c.e.a.a.h.oa.t))))) {
                                                                this.o().w().a("Too many conversions. Not logging as conversion. appId", c.e.a.a.h.ya.a(v3_17.a.r));
                                                                c.e.a.a.h.Aa v2_10 = v15_23.d;
                                                                Boolean v8_7 = 0;
                                                                int v11_14 = 0;
                                                                long v12_8 = 0;
                                                                while (v8_7 < v2_10.length) {
                                                                    boolean v13_5 = v2_10[v8_7];
                                                                    if (!"_c".equals(v13_5.d)) {
                                                                        if ("_err".equals(v13_5.d)) {
                                                                            v11_14 = 1;
                                                                        }
                                                                    } else {
                                                                        v12_8 = v13_5;
                                                                    }
                                                                    v8_7++;
                                                                }
                                                                if ((v11_14 == 0) || (v12_8 == 0)) {
                                                                    if (v12_8 == 0) {
                                                                        this.o().B().a("Did not find conversion parameter. appId", c.e.a.a.h.ya.a(v3_17.a.r));
                                                                    } else {
                                                                        v12_8.d = "_err";
                                                                        v12_8.f = Long.valueOf(10);
                                                                    }
                                                                } else {
                                                                    c.e.a.a.h.Aa v2_14 = v15_23.d;
                                                                    Boolean v7_3 = new c.e.a.a.h.Oc[1];
                                                                    v7_3[0] = v12_8;
                                                                    v15_23.d = ((c.e.a.a.h.Oc[]) a.b.f.a.H.b(v2_14, v7_3));
                                                                }
                                                            }
                                                            v20_0 = v10_10;
                                                        } else {
                                                            this.s();
                                                            if (!c.e.a.a.h.Ac.l(v15_23.e)) {
                                                                v23_1 = v8_9;
                                                                v24_4 = v9_0;
                                                                v25_1 = v13_4;
                                                            } else {
                                                            }
                                                        }
                                                        if ((v5_6 != null) && ("_e".equals(v15_23.e))) {
                                                            c.e.a.a.h.Aa v2_25;
                                                            long v6_27;
                                                            Boolean v7_5;
                                                            c.e.a.a.h.Aa v2_19 = v15_23.d;
                                                            if (v2_19 == null) {
                                                                v2_25 = this.o().w();
                                                                v6_27 = "Engagement event does not contain any parameters. appId";
                                                                v7_5 = v3_17.a.r;
                                                            } else {
                                                                if (v2_19.length != 0) {
                                                                    this.s();
                                                                    c.e.a.a.h.Aa v2_23 = ((Long) c.e.a.a.h.Ac.b(v15_23, "_et"));
                                                                    if (v2_23 != null) {
                                                                        v25_1 += v2_23.longValue();
                                                                        v9_0 = (v24_4 + 1);
                                                                        v4_10.e[v24_4] = v15_23;
                                                                        v10_19 = v20_0;
                                                                        v13_4 = v25_1;
                                                                        v8_9 = (v23_1 + 1);
                                                                        v2_0 = v21_0;
                                                                        long v12 = 1;
                                                                    } else {
                                                                        v2_25 = this.o().w();
                                                                        v6_27 = "Engagement event does not include duration. appId";
                                                                        v7_5 = v3_17.a.r;
                                                                    }
                                                                } else {
                                                                }
                                                            }
                                                            v2_25.a(v6_27, c.e.a.a.h.ya.a(v7_5));
                                                        }
                                                    } else {
                                                        c.e.a.a.h.Aa v2_34;
                                                        String v20_1 = v10_19;
                                                        v21_0 = v2_0;
                                                        this.o().w().a("Dropping blacklisted raw event. appId", c.e.a.a.h.ya.a(v3_17.a.r), this.t().a(v15_23.e));
                                                        if (this.s().j(v3_17.a.r)) {
                                                            v2_34 = 1;
                                                        } else {
                                                            if (!this.s().k(v3_17.a.r)) {
                                                                v2_34 = 0;
                                                            } else {
                                                            }
                                                        }
                                                        if ((v2_34 == null) && (!"_err".equals(v15_23.e))) {
                                                            this.s().a(v3_17.a.r, 11, "_ev", v15_23.e, 0);
                                                        }
                                                        v23_1 = v8_9;
                                                        v10_19 = v20_1;
                                                    }
                                                }
                                                String v21_3 = v2_0;
                                                String v20_4 = v10_19;
                                                long v25_4 = v13_4;
                                                int v9_12 = v9_0;
                                                if (v9_12 < v3_17.c.size()) {
                                                    v4_10.e = ((c.e.a.a.h.Nc[]) java.util.Arrays.copyOf(v4_10.e, v9_12));
                                                }
                                                if (v5_6 != null) {
                                                    c.e.a.a.h.Aa v2_49;
                                                    long v6_54 = v21_3;
                                                    c.e.a.a.h.Aa v2_46 = this.u().c(v4_10.r, v6_54);
                                                    if (v2_46 == null) {
                                                        v2_49 = new c.e.a.a.h.zc;
                                                        v2_49(v4_10.r, "auto", "_lte", ((c.e.a.a.c.d.b) this.n).a(), Long.valueOf(v25_4));
                                                    } else {
                                                        if (v2_46.e != null) {
                                                            String v5_9 = new c.e.a.a.h.zc;
                                                            v5_9(v4_10.r, "auto", "_lte", ((c.e.a.a.c.d.b) this.n).a(), Long.valueOf((((Long) v2_46.e).longValue() + v25_4)));
                                                            v2_49 = v5_9;
                                                        } else {
                                                        }
                                                    }
                                                    String v5_12 = new c.e.a.a.h.Sc();
                                                    v5_12.e = v6_54;
                                                    v5_12.d = Long.valueOf(((c.e.a.a.c.d.b) this.n).a());
                                                    v5_12.g = ((Long) v2_49.e);
                                                    Boolean v7_34 = 0;
                                                    while(true) {
                                                        long v6_55;
                                                        Boolean v8_17 = v4_10.f;
                                                        if (v7_34 >= v8_17.length) {
                                                            break;
                                                        }
                                                        if (!v6_54.equals(v8_17[v7_34].e)) {
                                                            v7_34++;
                                                        } else {
                                                            v4_10.f[v7_34] = v5_12;
                                                            v6_55 = 1;
                                                        }
                                                        if (v6_55 == 0) {
                                                            long v6_57 = v4_10.f;
                                                            v4_10.f = ((c.e.a.a.h.Sc[]) java.util.Arrays.copyOf(v6_57, (v6_57.length + 1)));
                                                            v4_10.f[(v3_17.a.f.length - 1)] = v5_12;
                                                        }
                                                        if (v25_4 > 0) {
                                                            this.u().a(v2_49);
                                                            this.o().x().a("Updated lifetime engagement user property with value. Value", v2_49.e);
                                                        }
                                                    }
                                                    v6_55 = 0;
                                                }
                                                long v15_7;
                                                int v4_17;
                                                c.e.a.a.h.ia v1_5;
                                                v4_10.D = this.a(v4_10.r, v4_10.f, v4_10.e);
                                                if ((!((Boolean) c.e.a.a.h.oa.f.a()).booleanValue()) || (!"1".equals(this.c.l().a(v3_17.a.r, "measurement.event_sampling_enabled")))) {
                                                    v15_7 = v3_17;
                                                    v1_5 = v4_10;
                                                    v4_17 = 0;
                                                } else {
                                                    c.e.a.a.h.Aa v2_62 = new java.util.HashMap();
                                                    String v5_22 = new c.e.a.a.h.Nc[v4_10.e.length];
                                                    long v6_65 = this.s().x();
                                                    Boolean v7_43 = v4_10.e;
                                                    Boolean v8_23 = v7_43.length;
                                                    int v9_15 = 0;
                                                    boolean v10_33 = 0;
                                                    while (v9_15 < v8_23) {
                                                        long v15_16;
                                                        c.e.a.a.h.ia v1_27;
                                                        String v22_2;
                                                        c.e.a.a.h.aa v23_4;
                                                        long v24_3;
                                                        String v21_4;
                                                        int v11_21 = v7_43[v9_15];
                                                        if (!v11_21.e.equals("_ep")) {
                                                            long v12_16;
                                                            if (ark>c.e.a.a.h.Xaark>.a(v11_21, "_dbg", Long.valueOf(1))) {
                                                                v12_16 = 1;
                                                            } else {
                                                                v12_16 = this.q().d(v3_17.a.r, v11_21.e);
                                                            }
                                                            if (v12_16 > 0) {
                                                                c.e.a.a.h.ia v1_18 = ((c.e.a.a.h.ia) v2_62.get(v11_21.e));
                                                                if (v1_18 != null) {
                                                                    v21_4 = v7_43;
                                                                    v22_2 = v8_23;
                                                                } else {
                                                                    v21_4 = v7_43;
                                                                    v1_18 = this.u().a(v3_17.a.r, v11_21.e);
                                                                    if (v1_18 != null) {
                                                                    } else {
                                                                        v22_2 = v8_23;
                                                                        this.o().w().a("Event being bundled has no eventAggregate. appId, eventName", v3_17.a.r, v11_21.e);
                                                                        v1_18 = new c.e.a.a.h.ia;
                                                                        v1_18(v3_17.a.r, v11_21.e, 1, 1, v11_21.f.longValue(), 0, 0, 0, 0);
                                                                    }
                                                                }
                                                                Boolean v8_30;
                                                                this.s();
                                                                Boolean v7_54 = ((Long) c.e.a.a.h.Ac.b(v11_21, "_eid"));
                                                                if (v7_54 == null) {
                                                                    v8_30 = 0;
                                                                } else {
                                                                    v8_30 = 1;
                                                                }
                                                                c.e.a.a.h.ia v1_24;
                                                                Boolean v7_58;
                                                                Boolean v8_34;
                                                                Boolean v8_31 = Boolean.valueOf(v8_30);
                                                                if (v12_16 != 1) {
                                                                    if (v6_65.nextInt(v12_16) != 0) {
                                                                        v15_16 = v3_17;
                                                                        v23_4 = v4_10;
                                                                        v24_3 = v6_65;
                                                                        if (Math.abs((v11_21.f.longValue() - v1_18.f)) < 86400000) {
                                                                            if (!v8_31.booleanValue()) {
                                                                                v9_15++;
                                                                                v3_17 = v15_16;
                                                                                v7_43 = v21_4;
                                                                                v8_23 = v22_2;
                                                                                v4_10 = v23_4;
                                                                                v6_65 = v24_3;
                                                                            } else {
                                                                                v2_62.put(v11_21.e, v1_18.a(v7_54, 0, 0));
                                                                            }
                                                                        } else {
                                                                            this.s();
                                                                            v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_efs", Long.valueOf(1));
                                                                            this.s();
                                                                            long v6_82 = ((long) v12_16);
                                                                            v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", Long.valueOf(v6_82));
                                                                            String v3_26 = (v10_33 + 1);
                                                                            v5_22[v10_33] = v11_21;
                                                                            if (v8_31.booleanValue()) {
                                                                                v1_18 = v1_18.a(0, Long.valueOf(v6_82), Boolean.valueOf(1));
                                                                            }
                                                                            v2_62.put(v11_21.e, v1_18.b(v11_21.f.longValue()));
                                                                            v10_33 = v3_26;
                                                                        }
                                                                    } else {
                                                                        this.s();
                                                                        long v12_19 = ((long) v12_16);
                                                                        v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", Long.valueOf(v12_19));
                                                                        v7_58 = (v10_33 + 1);
                                                                        v5_22[v10_33] = v11_21;
                                                                        if (v8_31.booleanValue()) {
                                                                            v1_18 = v1_18.a(0, Long.valueOf(v12_19), 0);
                                                                        }
                                                                        v8_34 = v11_21.e;
                                                                        v1_24 = v1_18.b(v11_21.f.longValue());
                                                                        v2_62.put(v8_34, v1_24);
                                                                    }
                                                                } else {
                                                                    v7_58 = (v10_33 + 1);
                                                                    v5_22[v10_33] = v11_21;
                                                                    if ((v8_31.booleanValue()) && ((v1_18.g != null) || ((v1_18.h != null) || (v1_18.i != null)))) {
                                                                        v1_24 = v1_18.a(0, 0, 0);
                                                                        v8_34 = v11_21.e;
                                                                    }
                                                                }
                                                                v10_33 = v7_58;
                                                                v15_16 = v3_17;
                                                                v23_4 = v4_10;
                                                                v24_3 = v6_65;
                                                            } else {
                                                                this.o().w().a("Sample rate must be positive. event, rate", v11_21.e, Integer.valueOf(v12_16));
                                                                v1_27 = (v10_33 + 1);
                                                                v5_22[v10_33] = v11_21;
                                                                v10_33 = v1_27;
                                                                v15_16 = v3_17;
                                                                v23_4 = v4_10;
                                                                v24_3 = v6_65;
                                                                v21_4 = v7_43;
                                                                v22_2 = v8_23;
                                                            }
                                                        } else {
                                                            this.s();
                                                            long v12_23 = ((String) c.e.a.a.h.Ac.b(v11_21, "_en"));
                                                            long v15_19 = ((c.e.a.a.h.ia) v2_62.get(v12_23));
                                                            if (v15_19 == 0) {
                                                                v15_19 = this.u().a(v3_17.a.r, v12_23);
                                                                v2_62.put(v12_23, v15_19);
                                                            }
                                                            if (v15_19.g != null) {
                                                            } else {
                                                                if (v15_19.h.longValue() > 1) {
                                                                    this.s();
                                                                    v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_sr", v15_19.h);
                                                                }
                                                                c.e.a.a.h.ia v1_35 = v15_19.i;
                                                                if ((v1_35 != null) && (v1_35.booleanValue())) {
                                                                    this.s();
                                                                    v11_21.d = c.e.a.a.h.Ac.a(v11_21.d, "_efs", Long.valueOf(1));
                                                                }
                                                                v1_27 = (v10_33 + 1);
                                                                v5_22[v10_33] = v11_21;
                                                            }
                                                        }
                                                    }
                                                    v15_7 = v3_17;
                                                    v1_5 = v4_10;
                                                    v4_17 = 0;
                                                    if (v10_33 < v1_5.e.length) {
                                                        v1_5.e = ((c.e.a.a.h.Nc[]) java.util.Arrays.copyOf(v5_22, v10_33));
                                                    }
                                                    c.e.a.a.h.Aa v2_64 = v2_62.entrySet().iterator();
                                                    while (v2_64.hasNext()) {
                                                        this.u().a(((c.e.a.a.h.ia) ((java.util.Map$Entry) v2_64.next()).getValue()));
                                                    }
                                                }
                                                v1_5.h = Long.valueOf(nan);
                                                v1_5.i = Long.valueOf(-0.0);
                                                c.e.a.a.h.Aa v2_69 = 0;
                                                while(true) {
                                                    String v3_7 = v1_5.e;
                                                    if (v2_69 >= v3_7.length) {
                                                        break;
                                                    }
                                                    String v3_11 = v3_7[v2_69];
                                                    if (v3_11.f.longValue() < v1_5.h.longValue()) {
                                                        v1_5.h = v3_11.f;
                                                    }
                                                    if (v3_11.f.longValue() > v1_5.i.longValue()) {
                                                        v1_5.i = v3_11.f;
                                                    }
                                                    v2_69++;
                                                }
                                                c.e.a.a.h.Aa v2_70 = v15_7;
                                                String v3_9 = v2_70.a.r;
                                                String v5_25 = this.u().b(v3_9);
                                                if (v5_25 != null) {
                                                    if (v1_5.e.length > 0) {
                                                        Boolean v8_25;
                                                        long v6_68 = v5_25.h();
                                                        if (v6_68 == 0) {
                                                            v8_25 = v4_17;
                                                        } else {
                                                            v8_25 = Long.valueOf(v6_68);
                                                        }
                                                        v1_5.k = v8_25;
                                                        Boolean v8_26 = v5_25.g();
                                                        if (v8_26 != 0) {
                                                            v6_68 = v8_26;
                                                        } else {
                                                        }
                                                        if (v6_68 != 0) {
                                                            v4_17 = Long.valueOf(v6_68);
                                                        }
                                                        v1_5.j = v4_17;
                                                        v5_25.r();
                                                        v1_5.z = Integer.valueOf(((int) v5_25.o()));
                                                        v5_25.a(v1_5.h.longValue());
                                                        v5_25.b(v1_5.i.longValue());
                                                        v1_5.A = v5_25.s();
                                                        this.u().a(v5_25);
                                                    }
                                                } else {
                                                    this.o().B().a("Bundling raw events w/o app info. appId", c.e.a.a.h.ya.a(v2_70.a.r));
                                                }
                                                if (v1_5.e.length > 0) {
                                                    int v4_31;
                                                    int v4_30 = this.q().a(v2_70.a.r);
                                                    if (v4_30 == 0) {
                                                        if (!android.text.TextUtils.isEmpty(v2_70.a.B)) {
                                                            this.o().w().a("Did not find measurement config or missing version info. appId", c.e.a.a.h.ya.a(v2_70.a.r));
                                                        } else {
                                                            v4_31 = Long.valueOf(-1);
                                                            v1_5.J = v4_31;
                                                        }
                                                    } else {
                                                        v4_31 = v4_30.c;
                                                        if (v4_31 != 0) {
                                                        }
                                                    }
                                                    this.u().a(v1_5, v20_4);
                                                }
                                                this.u().a(v2_70.b);
                                                c.e.a.a.h.ia v1_7 = this.u();
                                                c.e.a.a.h.Aa v2_72 = v1_7.w();
                                                try {
                                                    String v5_31 = new String[2];
                                                    v5_31[0] = v3_9;
                                                    v5_31[1] = v3_9;
                                                    v2_72.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_31);
                                                } catch (android.database.sqlite.SQLiteException v0_12) {
                                                    v1_7.o().B().a("Failed to remove unused event metadata. appId", c.e.a.a.h.ya.a(v3_9), v0_12);
                                                }
                                                this.u().B();
                                                this.u().C();
                                                return 1;
                                            }
                                        }
                                        if (v8_11.moveToNext()) {
                                            v5_38.o().w().a("Get multiple raw event metadata records, expected one. appId", c.e.a.a.h.ya.a(v4_0));
                                        }
                                        String v16_2;
                                        String[] v17_1;
                                        v8_11.close();
                                        v3_17.a(v13_11);
                                        if (v6_0 == -1) {
                                            boolean v13_13 = new String[2];
                                            v13_13[0] = v4_0;
                                            v13_13[1] = v10_18;
                                            v16_2 = "app_id = ? and metadata_fingerprint = ?";
                                            v17_1 = v13_13;
                                        } else {
                                            boolean v14_4 = new String[3];
                                            v14_4[0] = v4_0;
                                            v14_4[1] = v10_18;
                                            v14_4[2] = String.valueOf(v6_0);
                                            v16_2 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v17_1 = v14_4;
                                        }
                                        long v15_4 = new String[4];
                                        v15_4[0] = "rowid";
                                        v15_4[1] = "name";
                                        v15_4[2] = "timestamp";
                                        v15_4[3] = "data";
                                        long v6_50 = v23_2.query("raw_events", v15_4, v16_2, v17_1, 0, 0, "rowid", 0);
                                        try {
                                            if (v6_50.moveToFirst()) {
                                                do {
                                                    Boolean v7_14 = v6_50.getLong(0);
                                                    boolean v10_25 = v6_50.getBlob(3);
                                                    boolean v10_26 = c.e.a.a.h.md.a(v10_25, v10_25.length);
                                                    boolean v13_19 = new c.e.a.a.h.Nc();
                                                    v13_19.a(v10_26);
                                                    v13_19.e = v6_50.getString(1);
                                                    v13_19.f = Long.valueOf(v6_50.getLong(2));
                                                    if (v3_17.a(v7_14, v13_19)) {
                                                    } else {
                                                        break;
                                                    }
                                                } while(v6_50.moveToNext());
                                            } else {
                                                v5_38.o().w().a("Raw event data disappeared while in transaction. appId", c.e.a.a.h.ya.a(v4_0));
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_7) {
                                            c.e.a.a.h.Aa v2_1 = v0_7;
                                            v4_0 = v6_50;
                                            if (v4_0 != 0) {
                                                v4_0.close();
                                            }
                                            throw v2_1;
                                        } catch (android.database.sqlite.SQLiteException v0_6) {
                                            v22_0 = v6_50;
                                            long v6_20 = v0_6;
                                            v8_11 = v22_0;
                                            v5_38.o().B().a("Data loss. Error selecting raw event. appId", c.e.a.a.h.ya.a(v4_0), v6_20);
                                            if (v8_11 == null) {
                                            }
                                        }
                                        v6_50.close();
                                    } else {
                                        v5_38.o().B().a("Raw event metadata record is missing. appId", c.e.a.a.h.ya.a(v4_0));
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_8) {
                                    v6_20 = v0_8;
                                    v22_0 = v8_11;
                                }
                            } catch (android.database.sqlite.SQLiteException v0_3) {
                                v2_1 = v0_3;
                                v4_0 = v22_0;
                            } catch (android.database.sqlite.SQLiteException v0_2) {
                                v6_20 = v0_2;
                            }
                        }
                    } else {
                        try {
                            boolean v13_28;
                            if (v6_0 == -1) {
                                v13_28 = new String[1];
                                v13_28[0] = String.valueOf(p39);
                            } else {
                                v13_28 = new String[2];
                                v13_28[0] = String.valueOf(v6_0);
                                v13_28[1] = String.valueOf(p39);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_13) {
                            v6_20 = v0_13;
                            v22_0 = 0;
                        }
                        if (v6_0 != -1) {
                            v14_6 = "rowid <= ? and ";
                        }
                        boolean v10_42 = new StringBuilder((v14_6.length() + 148));
                        v10_42.append("select app_id, metadata_fingerprint from raw_events where ");
                        v10_42.append(v14_6);
                        v10_42.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v4_0 = v15_3.rawQuery(v10_42.toString(), v13_28);
                        if (v4_0.moveToFirst()) {
                            boolean v10_9 = v4_0.getString(0);
                            try {
                                boolean v13_0 = v4_0.getString(1);
                                v4_0.close();
                                v22_0 = v4_0;
                                v4_0 = v10_9;
                                v10_18 = v13_0;
                            } catch (android.database.sqlite.SQLiteException v0_0) {
                                v6_20 = v0_0;
                                v22_0 = v4_0;
                                v4_0 = v10_18;
                            }
                        } else {
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_11) {
                    v2_1 = v0_11;
                } catch (android.database.sqlite.SQLiteException v0_9) {
                    v6_20 = v0_9;
                    v22_0 = v4_0;
                    v4_0 = 0;
                }
                v4_0.close();
            } catch (android.database.sqlite.SQLiteException v0_15) {
                v2_1 = v0_15;
                v4_0 = 0;
            } catch (android.database.sqlite.SQLiteException v0_14) {
                v6_20 = v0_14;
                v4_0 = 0;
                v8_11 = 0;
            } catch (android.database.sqlite.SQLiteException v0_10) {
                v2_1 = v0_10;
                v4_0 = v8_11;
            }
        } catch (android.database.sqlite.SQLiteException v0_1) {
            c.e.a.a.h.ia v1_1 = v0_1;
            this.u().C();
            throw v1_1;
        }
    }