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 com.google.android.gms.c.c.ca.a() calling method android.database.sqlite.SQLiteDatabase.update()


    protected final boolean a(String p7, byte[] p8, String p9)
    {
        this.I();
        this.d();
        com.google.android.gms.common.internal.z.a(p7);
        com.google.android.gms.c.c.bd v0_2 = this.a(p7, p8);
        if (v0_2 != null) {
            this.a(p7, v0_2);
            this.g.put(p7, v0_2);
            this.i.put(p7, p9);
            this.d.put(p7, ark>com.google.android.gms.c.c.caark>.a(v0_2));
            this.h_().a(p7, v0_2.g);
            try {
                v0_2.g = 0;
                com.google.android.gms.c.c.bd v9_5 = new byte[v0_2.d()];
                v0_2.a(com.google.android.gms.c.c.b.a(v9_5, 0, v9_5.length));
                int v8_1 = v9_5;
            } catch (com.google.android.gms.c.c.bd v9_6) {
                this.r().i().a("Unable to serialize reduced-size config. Storing full config instead. appId", com.google.android.gms.c.c.bb.a(p7), v9_6);
            }
            com.google.android.gms.c.c.bd v9_7 = this.g_();
            com.google.android.gms.common.internal.z.a(p7);
            v9_7.d();
            v9_7.I();
            com.google.android.gms.c.c.bd v0_4 = new android.content.ContentValues();
            v0_4.put("remote_config", v8_1);
            try {
                Object v2_7 = v9_7.i();
                String[] v5 = new String[1];
                v5[0] = p7;
            } catch (com.google.android.gms.c.c.bd v0_8) {
                v9_7.r().k_().a("Error storing remote config. appId", com.google.android.gms.c.c.bb.a(p7), v0_8);
                return 1;
            }
            if (((long) v2_7.update("apps", v0_4, "app_id = ?", v5)) != 0) {
                return 1;
            } else {
                v9_7.r().k_().a("Failed to update remote config (got 0). appId", com.google.android.gms.c.c.bb.a(p7));
                return 1;
            }
        } else {
            return 0;
        }
    }

Method com.google.android.gms.c.c.ad.h() calling method android.database.sqlite.SQLiteDatabase.update()


    protected final long h(String p14, String p15)
    {
        com.google.android.gms.common.internal.z.a(p14);
        com.google.android.gms.common.internal.z.a(p15);
        this.d();
        this.I();
        android.database.sqlite.SQLiteDatabase v0 = this.i();
        v0.beginTransaction();
        try {
            String v4_2 = new StringBuilder((String.valueOf(p15).length() + 32));
            v4_2.append("select ");
            v4_2.append(p15);
            v4_2.append(" from app2 where app_id=?");
            Object v3_4 = v4_2.toString();
            Object v5_1 = new String[1];
            v5_1[0] = p14;
            com.google.android.gms.c.c.bd v9_0 = this.a(v3_4, v5_1, -1);
        } catch (Object v14_2) {
            v0.endTransaction();
            throw v14_2;
        } catch (Object v3_9) {
            v9_0 = 0;
            this.r().k_().a("Error inserting column. appId", com.google.android.gms.c.c.bb.a(p14), p15, v3_9);
            v0.endTransaction();
            return v9_0;
        }
        if (v9_0 == -1) {
            Object v3_7 = new android.content.ContentValues();
            v3_7.put("app_id", p14);
            v3_7.put("first_open_count", Integer.valueOf(0));
            v3_7.put("previous_install_count", Integer.valueOf(0));
            if (v0.insertWithOnConflict("app2", 0, v3_7, 5) != -1) {
                v9_0 = 0;
            } else {
                this.r().k_().a("Failed to insert column (got -1). appId", com.google.android.gms.c.c.bb.a(p14), p15);
                v0.endTransaction();
                return -1;
            }
        }
        try {
            Object v3_11 = new android.content.ContentValues();
            v3_11.put("app_id", p14);
            v3_11.put(p15, Long.valueOf((1 + v9_0)));
            String v4_4 = new String[1];
            v4_4[0] = p14;
        } catch (Object v3_9) {
        }
        if (((long) v0.update("app2", v3_11, "app_id = ?", v4_4)) != 0) {
            v0.setTransactionSuccessful();
            v0.endTransaction();
            return v9_0;
        } else {
            this.r().k_().a("Failed to update column (got 0). appId", com.google.android.gms.c.c.bb.a(p14), p15);
            v0.endTransaction();
            return -1;
        }
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public final void a(com.google.android.gms.c.c.t p8)
    {
        com.google.android.gms.common.internal.z.a(p8);
        this.d();
        this.I();
        com.google.android.gms.c.c.bd v0_6 = new android.content.ContentValues();
        v0_6.put("app_id", p8.b());
        v0_6.put("app_instance_id", p8.c());
        v0_6.put("gmp_app_id", p8.d());
        v0_6.put("resettable_device_id_hash", p8.e());
        v0_6.put("last_bundle_index", Long.valueOf(p8.o()));
        v0_6.put("last_bundle_start_timestamp", Long.valueOf(p8.g()));
        v0_6.put("last_bundle_end_timestamp", Long.valueOf(p8.h()));
        v0_6.put("app_version", p8.i());
        v0_6.put("app_store", p8.k());
        v0_6.put("gmp_version", Long.valueOf(p8.l()));
        v0_6.put("dev_cert_hash", Long.valueOf(p8.m()));
        v0_6.put("measurement_enabled", Boolean.valueOf(p8.n()));
        v0_6.put("day", Long.valueOf(p8.s()));
        v0_6.put("daily_public_events_count", Long.valueOf(p8.t()));
        v0_6.put("daily_events_count", Long.valueOf(p8.u()));
        v0_6.put("daily_conversions_count", Long.valueOf(p8.v()));
        v0_6.put("config_fetched_time", Long.valueOf(p8.p()));
        v0_6.put("failed_config_fetch_time", Long.valueOf(p8.q()));
        v0_6.put("app_version_int", Long.valueOf(p8.j()));
        v0_6.put("firebase_instance_id", p8.f());
        v0_6.put("daily_error_events_count", Long.valueOf(p8.x()));
        v0_6.put("daily_realtime_events_count", Long.valueOf(p8.w()));
        v0_6.put("health_monitor_sample", p8.y());
        v0_6.put("android_id", Long.valueOf(p8.A()));
        v0_6.put("adid_reporting_enabled", Boolean.valueOf(p8.B()));
        v0_6.put("ssaid_reporting_enabled", Boolean.valueOf(p8.C()));
        try {
            String v1_9 = this.i();
            int v4_1 = new String[1];
            v4_1[0] = p8.b();
        } catch (com.google.android.gms.c.c.bd v0_4) {
            this.r().k_().a("Error storing app. appId", com.google.android.gms.c.c.bb.a(p8.b()), v0_4);
            return;
        }
        if ((((long) v1_9.update("apps", v0_6, "app_id = ?", v4_1)) == 0) && (v1_9.insertWithOnConflict("apps", 0, v0_6, 5) == -1)) {
            this.r().k_().a("Failed to insert/update app (got -1). appId", com.google.android.gms.c.c.bb.a(p8.b()));
        }
        return;
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public final com.google.android.gms.c.c.ae a(long p16, String p18, boolean p19, boolean p20, boolean p21, boolean p22, boolean p23)
    {
        com.google.android.gms.common.internal.z.a(p18);
        this.d();
        this.I();
        String v2_1 = new String[1];
        v2_1[0] = p18;
        com.google.android.gms.c.c.ae v4_1 = new com.google.android.gms.c.c.ae();
        String v5_8 = 0;
        try {
            android.database.sqlite.SQLiteDatabase v14 = this.i();
            String[] v10 = "daily_public_events_count";
            int v12 = "daily_error_events_count";
            v10 = new String[1];
            v10[0] = p18;
            int v6_1 = v14.query("apps", new String[] {"day", "daily_realtime_events_count"}), "app_id=?", v10, 0, 0, 0);
            try {
                if (v6_1.moveToFirst()) {
                    if (v6_1.getLong(0) == p16) {
                        v4_1.b = v6_1.getLong(1);
                        v4_1.a = v6_1.getLong(2);
                        v4_1.c = v6_1.getLong(3);
                        v4_1.d = v6_1.getLong(4);
                        v4_1.e = v6_1.getLong(5);
                    }
                    if (p19) {
                        v4_1.b = (v4_1.b + 1);
                    }
                    if (p20) {
                        v4_1.a = (v4_1.a + 1);
                    }
                    if (p21) {
                        v4_1.c = (v4_1.c + 1);
                    }
                    if (p22) {
                        v4_1.d = (v4_1.d + 1);
                    }
                    if (p23) {
                        v4_1.e = (v4_1.e + 1);
                    }
                    android.content.ContentValues v0_1 = new android.content.ContentValues();
                    v0_1.put("day", Long.valueOf(p16));
                    v0_1.put("daily_public_events_count", Long.valueOf(v4_1.a));
                    v0_1.put("daily_events_count", Long.valueOf(v4_1.b));
                    v0_1.put("daily_conversions_count", Long.valueOf(v4_1.c));
                    v0_1.put("daily_error_events_count", Long.valueOf(v4_1.d));
                    v0_1.put("daily_realtime_events_count", Long.valueOf(v4_1.e));
                    v14.update("apps", v0_1, "app_id=?", v2_1);
                    if (v6_1 != 0) {
                        v6_1.close();
                    }
                    return v4_1;
                } else {
                    this.r().i().a("Not updating daily counts, app is not known. appId", com.google.android.gms.c.c.bb.a(p18));
                    if (v6_1 != 0) {
                        v6_1.close();
                    }
                    return v4_1;
                }
            } catch (android.content.ContentValues v0_10) {
                if (v6_1 != 0) {
                    v6_1.close();
                }
                throw v0_10;
            } catch (android.content.ContentValues v0_5) {
                v5_8 = v6_1;
                this.r().k_().a("Error updating daily counts. appId", com.google.android.gms.c.c.bb.a(p18), v0_5);
                if (v5_8 != null) {
                    v5_8.close();
                }
                return v4_1;
            }
        } catch (android.content.ContentValues v0_10) {
            v6_1 = v5_8;
        } catch (android.content.ContentValues v0_5) {
        }
    }

Method com.google.android.gms.c.c.ax.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final boolean a(int p18, byte[] p19)
    {
        this.b();
        this.d();
        Long v2_5 = 0;
        if (!this.b) {
            android.content.ContentValues v3_1 = new android.content.ContentValues();
            v3_1.put("type", Integer.valueOf(p18));
            v3_1.put("entry", p19);
            Long v4_4 = 5;
            int v5 = 0;
            int v6 = 5;
            while (v5 < v4_4) {
                int v7 = 0;
                try {
                    int v9 = this.C();
                    try {
                        if (v9 != 0) {
                            v9.beginTransaction();
                            Long v10_1 = 0;
                            int v12 = v9.rawQuery("select count(1) from messages", 0);
                            try {
                                if ((v12 != 0) && (v12.moveToFirst())) {
                                    v10_1 = v12.getLong(v2_5);
                                }
                                if (v10_1 >= 100000) {
                                    this.r().k_().a("Data loss, local db full");
                                    long v13_2 = ((100000 - v10_1) + 1);
                                    String[] v11 = new String[1];
                                    v11[v2_5] = Long.toString(v13_2);
                                    Long v10_4 = ((long) v9.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v11));
                                    if (v10_4 != v13_2) {
                                        this.r().k_().a("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v13_2), Long.valueOf(v10_4), Long.valueOf((v13_2 - v10_4)));
                                    }
                                }
                                v9.insertOrThrow("messages", 0, v3_1);
                                v9.setTransactionSuccessful();
                                v9.endTransaction();
                                if (v12 != 0) {
                                    v12.close();
                                }
                                if (v9 != 0) {
                                    v9.close();
                                }
                                return 1;
                            } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                                v7 = v12;
                                android.os.SystemClock.sleep(((long) v6));
                                v6 += 20;
                                if (v7 != 0) {
                                    v7.close();
                                }
                                if (v9 == 0) {
                                    v5++;
                                    v2_5 = 0;
                                    v4_4 = 5;
                                } else {
                                    v9.close();
                                }
                            }
                        } else {
                            this.b = 1;
                            if (v9 != 0) {
                                v9.close();
                            }
                            return v2_5;
                        }
                        v7 = v9;
                        if (v7 != 0) {
                            if (v7.inTransaction()) {
                                v7.endTransaction();
                            }
                        }
                        this.r().k_().a("Error writing entry to local database", com.google.android.gms.c.c.bd v0_0);
                        this.b = 1;
                        if (v12 != 0) {
                            v12.close();
                        }
                        if (v7 == 0) {
                        } else {
                            v7.close();
                        }
                    } catch (com.google.android.gms.c.c.bd v0_3) {
                        this.r().k_().a("Error writing entry to local database", v0_3);
                        this.b = 1;
                        if (v7 != 0) {
                            v7.close();
                        }
                        if (v9 == 0) {
                        }
                    } catch (com.google.android.gms.c.c.bd v0_0) {
                        v12 = 0;
                    }
                } catch (com.google.android.gms.c.c.bd v0_1) {
                    v9 = 0;
                    v12 = 0;
                    if (v12 != 0) {
                        v12.close();
                    }
                    if (v9 != 0) {
                        v9.close();
                    }
                    throw v0_1;
                } catch (com.google.android.gms.c.c.bd v0_3) {
                    v9 = 0;
                } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                    v9 = 0;
                } catch (com.google.android.gms.c.c.bd v0_0) {
                    v12 = 0;
                } catch (com.google.android.gms.c.c.bd v0_1) {
                    v12 = v7;
                }
            }
            this.r().i().a("Failed to write entry to local database");
            return 0;
        } else {
            return 0;
        }
    }

Method com.google.android.gms.c.c.ad.j() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


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

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final String a(long p5)
    {
        this.d();
        this.I();
        try {
            String v1_3 = this.i();
            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);
                    if (v5_1 != 0) {
                        v5_1.close();
                    }
                    return v6_3;
                } else {
                    this.r().w().a("No expired configs for apps with pending events");
                    if (v5_1 != 0) {
                        v5_1.close();
                    }
                    return 0;
                }
            } catch (String v6_1) {
                this.r().k_().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 com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final android.util.Pair a(String p8, Long p9)
    {
        this.d();
        this.I();
        try {
            int v1_1 = this.i();
            com.google.android.gms.c.c.bd v3_4 = new String[2];
            v3_4[0] = p8;
            v3_4[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_4);
            try {
                if (v1_0.moveToFirst()) {
                    java.io.IOException v2_1 = v1_0.getBlob(0);
                    com.google.android.gms.c.c.bd v3_0 = Long.valueOf(v1_0.getLong(1));
                    java.io.IOException v2_2 = com.google.android.gms.c.c.a.a(v2_1, 0, v2_1.length);
                    String v4_1 = new com.google.android.gms.c.c.gk();
                    try {
                        v4_1.a(v2_2);
                    } catch (java.io.IOException v2_3) {
                        this.r().k_().a("Failed to merge main event. appId, eventId", com.google.android.gms.c.c.bb.a(p8), p9, v2_3);
                        if (v1_0 != 0) {
                            v1_0.close();
                        }
                        return 0;
                    }
                    Object v8_4 = android.util.Pair.create(v4_1, v3_0);
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    return v8_4;
                } else {
                    this.r().w().a("Main event not found");
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    return 0;
                }
            } catch (Object v8_1) {
                this.r().k_().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 com.google.android.gms.c.c.ad.A() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final long A()
    {
        int v2_0 = 0;
        try {
            android.database.sqlite.SQLiteException v3_2 = this.i().rawQuery("select rowid from raw_events order by rowid desc limit 1;", 0);
            try {
                if (v3_2.moveToFirst()) {
                    long v4_0 = v3_2.getLong(0);
                    if (v3_2 != null) {
                        v3_2.close();
                    }
                    return v4_0;
                } else {
                    if (v3_2 != null) {
                        v3_2.close();
                    }
                    return -1;
                }
            } catch (Throwable v0_1) {
                v2_0 = v3_2;
                if (v2_0 != 0) {
                    v2_0.close();
                }
                throw v0_1;
            } catch (int v2_2) {
                android.database.sqlite.SQLiteException v3_0 = v2_2;
                v2_0 = v3_2;
                this.r().k_().a("Error querying raw events", v3_0);
                if (v2_0 != 0) {
                    v2_0.close();
                }
                return -1;
            }
        } catch (Throwable v0_1) {
        } catch (android.database.sqlite.SQLiteException v3_0) {
        }
    }

Method com.google.android.gms.c.c.ad.b() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long b(String p4, String[] p5)
    {
        String v1_1 = 0;
        try {
            com.google.android.gms.c.c.bd v5_3 = this.i().rawQuery(p4, p5);
            try {
                if (!v5_3.moveToFirst()) {
                    throw new android.database.sqlite.SQLiteException("Database returned empty set");
                } else {
                    android.database.sqlite.SQLiteException v0_4 = v5_3.getLong(0);
                    if (v5_3 != null) {
                        v5_3.close();
                    }
                    return v0_4;
                }
            } catch (Throwable v4_1) {
                if (v5_3 != null) {
                    v5_3.close();
                }
                throw v4_1;
            } catch (android.database.sqlite.SQLiteException v0_2) {
                v1_1 = v5_3;
                this.r().k_().a("Database error", p4, v0_2);
                throw v0_2;
            }
        } catch (Throwable v4_1) {
            v5_3 = v1_1;
        } catch (android.database.sqlite.SQLiteException v0_2) {
        }
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long a(String p3, String[] p4, long p5)
    {
        com.google.android.gms.c.c.bd v1 = 0;
        try {
            com.google.android.gms.c.c.bd v4_3 = this.i().rawQuery(p3, p4);
            try {
                if (!v4_3.moveToFirst()) {
                    if (v4_3 != null) {
                        v4_3.close();
                    }
                    return p5;
                } else {
                    long v5_2 = v4_3.getLong(0);
                    if (v4_3 != null) {
                        v4_3.close();
                    }
                    return v5_2;
                }
            } catch (Throwable v3_1) {
                v1 = v4_3;
                if (v1 != null) {
                    v1.close();
                }
                throw v3_1;
            } catch (long v5_3) {
                v1 = v4_3;
                this.r().k_().a("Database error", p3, v5_3);
                throw v5_3;
            }
        } catch (Throwable v3_1) {
        } catch (long v5_3) {
        }
    }

Method com.google.android.gms.c.c.fm.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final boolean a(String p65, long p66)
    {
        this.d().f();
        try {
            android.database.sqlite.SQLiteException v3_0 = 0;
            com.google.android.gms.c.c.bd v2_7 = new ark>com.google.android.gms.c.c.fmark>$a(this, 0);
            Object v4_31 = this.d();
            com.google.android.gms.c.c.bd v5_123 = this.w;
            com.google.android.gms.common.internal.z.a(v2_7);
            v4_31.d();
            v4_31.I();
            try {
                String v22;
                int v23;
                Long v15_2 = v4_31.i();
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        Boolean v12_30;
                        android.database.sqlite.SQLiteException v3_2 = v5_123 cmp -1;
                        if (v3_2 == null) {
                            v12_30 = new String[] {0});
                        } else {
                            v12_30 = new String[2];
                            v12_30[0] = 0;
                            v12_30[1] = String.valueOf(v5_123);
                        }
                        android.database.sqlite.SQLiteException v3_9;
                        if (v3_2 == null) {
                            v3_9 = "";
                        } else {
                            v3_9 = " and rowid <= ?";
                        }
                        long v14_12 = new StringBuilder((String.valueOf(v3_9).length() + 84));
                        v14_12.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v14_12.append(v3_9);
                        v14_12.append(" order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v14_12.toString(), v12_30);
                        if (v3_0.moveToFirst()) {
                            Boolean v13_17 = v3_0.getString(0);
                            v3_0.close();
                            v23 = v3_0;
                            v22 = v13_17;
                            v3_0 = 0;
                            try {
                                Boolean v12_11 = new String[2];
                                v12_11[0] = v3_0;
                                v12_11[1] = v22;
                                android.database.sqlite.SQLiteDatabase v25 = v15_2;
                                Long v15_1 = v15_2.query("raw_events_metadata", new String[] {"metadata"}), "app_id = ? and metadata_fingerprint = ?", v12_11, 0, 0, "rowid", "2");
                                try {
                                    if (v15_1.moveToFirst()) {
                                        Boolean v12_16 = v15_1.getBlob(0);
                                        Boolean v12_17 = com.google.android.gms.c.c.a.a(v12_16, 0, v12_16.length);
                                        Boolean v13_6 = new com.google.android.gms.c.c.gn();
                                        try {
                                            v13_6.a(v12_17);
                                        } catch (android.database.sqlite.SQLiteException v0_5) {
                                            int v9_0 = v15_1;
                                            v4_31.r().k_().a("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.c.c.bb.a(v3_0), v0_5);
                                            if (v9_0 == 0) {
                                                android.database.sqlite.SQLiteException v3_7;
                                                if (v2_7.c == null) {
                                                    v3_7 = 1;
                                                } else {
                                                    if (!v2_7.c.isEmpty()) {
                                                        v3_7 = 0;
                                                    } else {
                                                    }
                                                }
                                                if (v3_7 != null) {
                                                    this.d().g();
                                                    this.d().h();
                                                    return 0;
                                                } else {
                                                    android.database.sqlite.SQLiteException v3_8 = v2_7.a;
                                                    Object v4_4 = new com.google.android.gms.c.c.gk[v2_7.c.size()];
                                                    v3_8.d = v4_4;
                                                    Object v4_7 = this.i.b().e(v3_8.q);
                                                    int v9_13 = 0;
                                                    Boolean v12_9 = 0;
                                                    Boolean v13_3 = 0;
                                                    long v14_2 = 0;
                                                    while (v9_13 < v2_7.c.size()) {
                                                        String[] v44;
                                                        int v7_3 = ((com.google.android.gms.c.c.gk) v2_7.c.get(v9_13));
                                                        if (!this.p().b(v2_7.a.q, v7_3.d)) {
                                                            com.google.android.gms.c.c.bd v5_4 = this.p().c(v2_7.a.q, v7_3.d);
                                                            if (v5_4 != null) {
                                                                if (v7_3.c == null) {
                                                                    com.google.android.gms.c.c.am v8_4 = new com.google.android.gms.c.c.gl[0];
                                                                    v7_3.c = v8_4;
                                                                }
                                                                String v6_11 = v7_3.c;
                                                                com.google.android.gms.c.c.am v8_5 = v6_11.length;
                                                                boolean v10_5 = 0;
                                                                long v11_3 = 0;
                                                                long v18_0 = 0;
                                                                while (v10_5 < v8_5) {
                                                                    int v32_1 = v8_5;
                                                                    com.google.android.gms.c.c.am v8_46 = v6_11[v10_5];
                                                                    int v33_1 = v6_11;
                                                                    int v34_2 = v12_9;
                                                                    if (!"_c".equals(v8_46.c)) {
                                                                        if ("_r".equals(v8_46.c)) {
                                                                            v8_46.e = Long.valueOf(1);
                                                                            v18_0 = 1;
                                                                        }
                                                                    } else {
                                                                        v8_46.e = Long.valueOf(1);
                                                                        v11_3 = 1;
                                                                    }
                                                                    v10_5++;
                                                                    v8_5 = v32_1;
                                                                    v6_11 = v33_1;
                                                                    v12_9 = v34_2;
                                                                }
                                                                int v34_0 = v12_9;
                                                                if ((v11_3 == 0) && (v5_4 != null)) {
                                                                    this.i.r().w().a("Marking event as conversion", this.i.l().a(v7_3.d));
                                                                    String v6_17 = ((com.google.android.gms.c.c.gl[]) java.util.Arrays.copyOf(v7_3.c, (v7_3.c.length + 1)));
                                                                    com.google.android.gms.c.c.am v8_11 = new com.google.android.gms.c.c.gl();
                                                                    v8_11.c = "_c";
                                                                    v8_11.e = Long.valueOf(1);
                                                                    v6_17[(v6_17.length - 1)] = v8_11;
                                                                    v7_3.c = v6_17;
                                                                }
                                                                if (v18_0 == 0) {
                                                                    this.i.r().w().a("Marking event as real-time", this.i.l().a(v7_3.d));
                                                                    String v6_23 = ((com.google.android.gms.c.c.gl[]) java.util.Arrays.copyOf(v7_3.c, (v7_3.c.length + 1)));
                                                                    com.google.android.gms.c.c.am v8_17 = new com.google.android.gms.c.c.gl();
                                                                    v8_17.c = "_r";
                                                                    v8_17.e = Long.valueOf(1);
                                                                    v6_23[(v6_23.length - 1)] = v8_17;
                                                                    v7_3.c = v6_23;
                                                                }
                                                                v44 = v9_13;
                                                                if (this.d().a(this.w(), v2_7.a.q, 0, 0, 0, 0, 1).e <= ((long) this.i.b().a(v2_7.a.q))) {
                                                                    v12_9 = 1;
                                                                } else {
                                                                    String v6_31 = 0;
                                                                    while (v6_31 < v7_3.c.length) {
                                                                        if (!"_r".equals(v7_3.c[v6_31].c)) {
                                                                            v6_31++;
                                                                        } else {
                                                                            com.google.android.gms.c.c.am v8_28 = new com.google.android.gms.c.c.gl[(v7_3.c.length - 1)];
                                                                            if (v6_31 > null) {
                                                                                System.arraycopy(v7_3.c, 0, v8_28, 0, v6_31);
                                                                            }
                                                                            if (v6_31 < v8_28.length) {
                                                                                System.arraycopy(v7_3.c, (v6_31 + 1), v8_28, v6_31, (v8_28.length - v6_31));
                                                                            }
                                                                            v7_3.c = v8_28;
                                                                            break;
                                                                        }
                                                                    }
                                                                    v12_9 = v34_0;
                                                                }
                                                                if ((com.google.android.gms.c.c.fw.a(v7_3.d)) && ((v5_4 != null) && (this.d().a(this.w(), v2_7.a.q, 0, 0, 1, 0, 0).c > ((long) this.i.b().b(v2_7.a.q, com.google.android.gms.c.c.as.v))))) {
                                                                    this.i.r().i().a("Too many conversions. Not logging as conversion. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                                    com.google.android.gms.c.c.bd v5_13 = v7_3.c;
                                                                    String v6_35 = v5_13.length;
                                                                    com.google.android.gms.c.c.am v8_36 = 0;
                                                                    int v9_11 = 0;
                                                                    boolean v10_26 = 0;
                                                                    while (v8_36 < v6_35) {
                                                                        long v11_10 = v5_13[v8_36];
                                                                        if (!"_c".equals(v11_10.c)) {
                                                                            if ("_err".equals(v11_10.c)) {
                                                                                v9_11 = 1;
                                                                            }
                                                                        } else {
                                                                            v10_26 = v11_10;
                                                                        }
                                                                        v8_36++;
                                                                    }
                                                                    if ((v9_11 == 0) || (!v10_26)) {
                                                                        if (!v10_26) {
                                                                            this.i.r().k_().a("Did not find conversion parameter. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                                        } else {
                                                                            v10_26.c = "_err";
                                                                            v10_26.e = Long.valueOf(10);
                                                                        }
                                                                    } else {
                                                                        com.google.android.gms.c.c.bd v5_20 = v7_3.c;
                                                                        com.google.android.gms.c.c.am v8_40 = new com.google.android.gms.c.c.gl[1];
                                                                        v8_40[0] = v10_26;
                                                                        v7_3.c = ((com.google.android.gms.c.c.gl[]) com.google.android.gms.common.util.b.a(v5_20, v8_40));
                                                                    }
                                                                }
                                                            } else {
                                                                this.f();
                                                                String v6_4 = v7_3.d;
                                                                com.google.android.gms.common.internal.z.a(v6_4);
                                                                com.google.android.gms.c.c.am v8_3 = -1;
                                                                boolean v10_1 = v6_4.hashCode();
                                                                if (v10_1 == 94660) {
                                                                    if (v6_4.equals("_in")) {
                                                                        v8_3 = 0;
                                                                    }
                                                                } else {
                                                                    if (v10_1 == 95025) {
                                                                        if (v6_4.equals("_ug")) {
                                                                            v8_3 = 2;
                                                                        }
                                                                    } else {
                                                                        if (v10_1 == 95027) {
                                                                            if (v6_4.equals("_ui")) {
                                                                                v8_3 = 1;
                                                                            }
                                                                        } else {
                                                                        }
                                                                    }
                                                                }
                                                                String v6_8;
                                                                switch (v8_3) {
                                                                    case 0:
                                                                    case 1:
                                                                    case 2:
                                                                        v6_8 = 1;
                                                                    default:
                                                                        v6_8 = 0;
                                                                }
                                                                if (v6_8 == null) {
                                                                    v44 = v9_13;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v4_7 != null) && ("_e".equals(v7_3.d))) {
                                                                com.google.android.gms.c.c.am v8_43;
                                                                com.google.android.gms.c.c.bd v5_34;
                                                                String v6_40;
                                                                if (v7_3.c == null) {
                                                                    v5_34 = this.i.r().i();
                                                                    v6_40 = "Engagement event does not contain any parameters. appId";
                                                                    v8_43 = com.google.android.gms.c.c.bb.a(v2_7.a.q);
                                                                } else {
                                                                    if (v7_3.c.length != 0) {
                                                                        this.f();
                                                                        com.google.android.gms.c.c.bd v5_30 = ((Long) com.google.android.gms.c.c.fs.b(v7_3, "_et"));
                                                                        if (v5_30 != null) {
                                                                            v14_2 += v5_30.longValue();
                                                                            String v6_41 = (v13_3 + 1);
                                                                            v3_8.d[v13_3] = v7_3;
                                                                            v13_3 = v6_41;
                                                                            v9_13 = (v44 + 1);
                                                                            long v11 = 1;
                                                                        } else {
                                                                            v5_34 = this.i.r().i();
                                                                            v6_40 = "Engagement event does not include duration. appId";
                                                                            v8_43 = com.google.android.gms.c.c.bb.a(v2_7.a.q);
                                                                        }
                                                                    } else {
                                                                    }
                                                                }
                                                                v5_34.a(v6_40, v8_43);
                                                            }
                                                        } else {
                                                            com.google.android.gms.c.c.bd v5_49;
                                                            this.i.r().i().a("Dropping blacklisted raw event. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q), this.i.l().a(v7_3.d));
                                                            if (this.p().e(v2_7.a.q)) {
                                                                v5_49 = 1;
                                                            } else {
                                                                if (!this.p().f(v2_7.a.q)) {
                                                                    v5_49 = 0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v5_49 == null) && (!"_err".equals(v7_3.d))) {
                                                                this.i.k().a(v2_7.a.q, 11, "_ev", v7_3.d, 0);
                                                            }
                                                            v44 = v9_13;
                                                        }
                                                    }
                                                    int v34_3 = v12_9;
                                                    if (v13_3 < v2_7.c.size()) {
                                                        v3_8.d = ((com.google.android.gms.c.c.gk[]) java.util.Arrays.copyOf(v3_8.d, v13_3));
                                                    }
                                                    if (v4_7 != null) {
                                                        Object v4_12;
                                                        Object v4_9 = this.d().c(v3_8.q, "_lte");
                                                        if (v4_9 == null) {
                                                            v4_12 = new com.google.android.gms.c.c.fv;
                                                            v4_12(v3_8.q, "auto", "_lte", this.i.m().a(), Long.valueOf(v14_2));
                                                        } else {
                                                            if (v4_9.e != null) {
                                                                com.google.android.gms.c.c.bd v5_70 = new com.google.android.gms.c.c.fv;
                                                                v5_70(v3_8.q, "auto", "_lte", this.i.m().a(), Long.valueOf((((Long) v4_9.e).longValue() + v14_2)));
                                                                v4_12 = v5_70;
                                                            } else {
                                                            }
                                                        }
                                                        com.google.android.gms.c.c.bd v5_73 = new com.google.android.gms.c.c.gq();
                                                        v5_73.d = "_lte";
                                                        v5_73.c = Long.valueOf(this.i.m().a());
                                                        v5_73.f = ((Long) v4_12.e);
                                                        String v6_80 = 0;
                                                        while (v6_80 < v3_8.e.length) {
                                                            if (!"_lte".equals(v3_8.e[v6_80].d)) {
                                                                v6_80++;
                                                            } else {
                                                                v3_8.e[v6_80] = v5_73;
                                                                String v6_81 = 1;
                                                            }
                                                            if (v6_81 == null) {
                                                                v3_8.e = ((com.google.android.gms.c.c.gq[]) java.util.Arrays.copyOf(v3_8.e, (v3_8.e.length + 1)));
                                                                v3_8.e[(v2_7.a.e.length - 1)] = v5_73;
                                                            }
                                                            if (v14_2 > 0) {
                                                                this.d().a(v4_12);
                                                                this.i.r().v().a("Updated lifetime engagement user property with value. Value", v4_12.e);
                                                            }
                                                        }
                                                        v6_81 = 0;
                                                    }
                                                    v3_8.C = this.a(v3_8.q, v3_8.e, v3_8.d);
                                                    if (this.i.b().d(v2_7.a.q)) {
                                                        Object v4_20 = new java.util.HashMap();
                                                        com.google.android.gms.c.c.bd v5_84 = new com.google.android.gms.c.c.gk[v3_8.d.length];
                                                        String v6_0 = this.i.k().h();
                                                        int v7_0 = v3_8.d;
                                                        com.google.android.gms.c.c.am v8_0 = v7_0.length;
                                                        int v9_1 = 0;
                                                        boolean v10_0 = 0;
                                                        while (v9_1 < v8_0) {
                                                            boolean v48;
                                                            int v47;
                                                            Boolean v12_7;
                                                            long v63;
                                                            long v11_14 = v7_0[v9_1];
                                                            if (!v11_14.d.equals("_ep")) {
                                                                int v7_45;
                                                                Boolean v13_20 = Long.valueOf(1);
                                                                if (android.text.TextUtils.isEmpty("_dbg")) {
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                    v7_45 = 0;
                                                                } else {
                                                                    if (v13_20 != null) {
                                                                        long v14_17 = v11_14.c;
                                                                        Long v15_5 = v14_17.length;
                                                                        v47 = v7_0;
                                                                        int v7_35 = 0;
                                                                        while (v7_35 < v15_5) {
                                                                            v48 = v8_0;
                                                                            com.google.android.gms.c.c.am v8_65 = v14_17[v7_35];
                                                                            if (!"_dbg".equals(v8_65.c)) {
                                                                                v7_35++;
                                                                                v8_0 = v48;
                                                                            } else {
                                                                                if (((!(v13_20 instanceof Long)) || (!v13_20.equals(v8_65.e))) && (((!(v13_20 instanceof String)) || (!v13_20.equals(v8_65.d))) && ((!(v13_20 instanceof Double)) || (!v13_20.equals(v8_65.f))))) {
                                                                                } else {
                                                                                    v7_45 = 1;
                                                                                }
                                                                            }
                                                                        }
                                                                    } else {
                                                                    }
                                                                }
                                                                int v7_46;
                                                                if (v7_45 != 0) {
                                                                    v7_46 = 1;
                                                                } else {
                                                                    v7_46 = this.p().d(v2_7.a.q, v11_14.d);
                                                                }
                                                                int v7_56;
                                                                if (v7_46 > 0) {
                                                                    com.google.android.gms.c.c.am v8_70 = ((com.google.android.gms.c.c.am) v4_20.get(v11_14.d));
                                                                    if (v8_70 == null) {
                                                                        v8_70 = this.d().a(v2_7.a.q, v11_14.d);
                                                                        if (v8_70 == null) {
                                                                            this.i.r().i().a("Event being bundled has no eventAggregate. appId, eventName", v2_7.a.q, v11_14.d);
                                                                            v8_70 = new com.google.android.gms.c.c.am;
                                                                            v8_70(v2_7.a.q, v11_14.d, 1, 1, v11_14.e.longValue(), 0, 0, 0, 0);
                                                                        }
                                                                    }
                                                                    Boolean v13_25;
                                                                    this.f();
                                                                    Boolean v12_52 = ((Long) com.google.android.gms.c.c.fs.b(v11_14, "_eid"));
                                                                    if (v12_52 == null) {
                                                                        v13_25 = 0;
                                                                    } else {
                                                                        v13_25 = 1;
                                                                    }
                                                                    Boolean v13_26 = Boolean.valueOf(v13_25);
                                                                    if (v7_46 != 1) {
                                                                        if (v6_0.nextInt(v7_46) != 0) {
                                                                            v63 = v6_0;
                                                                            if (Math.abs((v11_14.e.longValue() - v8_70.f)) < 86400000) {
                                                                                if (!v13_26.booleanValue()) {
                                                                                    v9_1++;
                                                                                    v7_0 = v47;
                                                                                    v8_0 = v48;
                                                                                    v6_0 = v63;
                                                                                } else {
                                                                                    v4_20.put(v11_14.d, v8_70.a(v12_52, 0, 0));
                                                                                }
                                                                            } else {
                                                                                this.f();
                                                                                v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_efs", Long.valueOf(1));
                                                                                this.f();
                                                                                long v14_30 = ((long) v7_46);
                                                                                v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", Long.valueOf(v14_30));
                                                                                String v6_134 = (v10_0 + 1);
                                                                                v5_84[v10_0] = v11_14;
                                                                                if (v13_26.booleanValue()) {
                                                                                    v8_70 = v8_70.a(0, Long.valueOf(v14_30), Boolean.valueOf(1));
                                                                                }
                                                                                v4_20.put(v11_14.d, v8_70.b(v11_14.e.longValue()));
                                                                                v10_0 = v6_134;
                                                                            }
                                                                        } else {
                                                                            this.f();
                                                                            v63 = v6_0;
                                                                            String v6_135 = ((long) v7_46);
                                                                            v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", Long.valueOf(v6_135));
                                                                            v12_7 = (v10_0 + 1);
                                                                            v5_84[v10_0] = v11_14;
                                                                            if (v13_26.booleanValue()) {
                                                                                v8_70 = v8_70.a(0, Long.valueOf(v6_135), 0);
                                                                            }
                                                                            v4_20.put(v11_14.d, v8_70.b(v11_14.e.longValue()));
                                                                            v10_0 = v12_7;
                                                                        }
                                                                    } else {
                                                                        v7_56 = (v10_0 + 1);
                                                                        v5_84[v10_0] = v11_14;
                                                                        if ((v13_26.booleanValue()) && ((v8_70.g != null) || ((v8_70.h != null) || (v8_70.i != null)))) {
                                                                            v4_20.put(v11_14.d, v8_70.a(0, 0, 0));
                                                                        }
                                                                    }
                                                                } else {
                                                                    this.i.r().i().a("Sample rate must be positive. event, rate", v11_14.d, Integer.valueOf(v7_46));
                                                                    v7_56 = (v10_0 + 1);
                                                                    v5_84[v10_0] = v11_14;
                                                                }
                                                                v63 = v6_0;
                                                                v10_0 = v7_56;
                                                            } else {
                                                                this.f();
                                                                Boolean v12_62 = ((String) com.google.android.gms.c.c.fs.b(v11_14, "_en"));
                                                                Boolean v13_29 = ((com.google.android.gms.c.c.am) v4_20.get(v12_62));
                                                                if (v13_29 == null) {
                                                                    v13_29 = this.d().a(v2_7.a.q, v12_62);
                                                                    v4_20.put(v12_62, v13_29);
                                                                }
                                                                if (v13_29.g != null) {
                                                                    v63 = v6_0;
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                } else {
                                                                    if (v13_29.h.longValue() > 1) {
                                                                        this.f();
                                                                        v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", v13_29.h);
                                                                    }
                                                                    if ((v13_29.i != null) && (v13_29.i.booleanValue())) {
                                                                        this.f();
                                                                        v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_efs", Long.valueOf(1));
                                                                    }
                                                                    v12_7 = (v10_0 + 1);
                                                                    v5_84[v10_0] = v11_14;
                                                                    v63 = v6_0;
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                }
                                                            }
                                                        }
                                                        if (v10_0 < v3_8.d.length) {
                                                            v3_8.d = ((com.google.android.gms.c.c.gk[]) java.util.Arrays.copyOf(v5_84, v10_0));
                                                        }
                                                        Object v4_22 = v4_20.entrySet().iterator();
                                                        while (v4_22.hasNext()) {
                                                            this.d().a(((com.google.android.gms.c.c.am) ((java.util.Map$Entry) v4_22.next()).getValue()));
                                                        }
                                                    }
                                                    v3_8.g = Long.valueOf(nan);
                                                    v3_8.h = Long.valueOf(-0.0);
                                                    Object v4_27 = 0;
                                                    while (v4_27 < v3_8.d.length) {
                                                        com.google.android.gms.c.c.bd v5_117 = v3_8.d[v4_27];
                                                        if (v5_117.e.longValue() < v3_8.g.longValue()) {
                                                            v3_8.g = v5_117.e;
                                                        }
                                                        if (v5_117.e.longValue() > v3_8.h.longValue()) {
                                                            v3_8.h = v5_117.e;
                                                        }
                                                        v4_27++;
                                                    }
                                                    Object v4_29 = v2_7.a.q;
                                                    com.google.android.gms.c.c.bd v5_91 = this.d().b(v4_29);
                                                    if (v5_91 != null) {
                                                        if (v3_8.d.length > 0) {
                                                            com.google.android.gms.c.c.am v8_57;
                                                            String v6_94 = v5_91.h();
                                                            if (v6_94 == 0) {
                                                                v8_57 = 0;
                                                            } else {
                                                                v8_57 = Long.valueOf(v6_94);
                                                            }
                                                            v3_8.j = v8_57;
                                                            com.google.android.gms.c.c.am v8_58 = v5_91.g();
                                                            if (v8_58 != 0) {
                                                                v6_94 = v8_58;
                                                            } else {
                                                            }
                                                            String v6_95;
                                                            if (v6_94 == 0) {
                                                                v6_95 = 0;
                                                            } else {
                                                                v6_95 = Long.valueOf(v6_94);
                                                            }
                                                            v3_8.i = v6_95;
                                                            v5_91.r();
                                                            v3_8.y = Integer.valueOf(((int) v5_91.o()));
                                                            v5_91.a(v3_8.g.longValue());
                                                            v5_91.b(v3_8.h.longValue());
                                                            v3_8.z = v5_91.z();
                                                            this.d().a(v5_91);
                                                        }
                                                    } else {
                                                        this.i.r().k_().a("Bundling raw events w/o app info. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                    }
                                                    if (v3_8.d.length > 0) {
                                                        com.google.android.gms.c.c.bd v5_100;
                                                        this.i.u();
                                                        com.google.android.gms.c.c.bd v5_99 = this.p().a(v2_7.a.q);
                                                        if (v5_99 == null) {
                                                            if (!android.text.TextUtils.isEmpty(v2_7.a.A)) {
                                                                this.i.r().i().a("Did not find measurement config or missing version info. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                            } else {
                                                                v5_100 = Long.valueOf(-1);
                                                                v3_8.G = v5_100;
                                                            }
                                                        } else {
                                                            if (v5_99.c != null) {
                                                                v5_100 = v5_99.c;
                                                            } else {
                                                            }
                                                        }
                                                        this.d().a(v3_8, v34_3);
                                                    }
                                                    android.database.sqlite.SQLiteException v3_12 = this.d();
                                                    com.google.android.gms.c.c.bd v2_8 = v2_7.b;
                                                    com.google.android.gms.common.internal.z.a(v2_8);
                                                    v3_12.d();
                                                    v3_12.I();
                                                    com.google.android.gms.c.c.bd v5_110 = new StringBuilder("rowid in (");
                                                    String v6_111 = 0;
                                                    while (v6_111 < v2_8.size()) {
                                                        if (v6_111 != null) {
                                                            v5_110.append(",");
                                                        }
                                                        v5_110.append(((Long) v2_8.get(v6_111)).longValue());
                                                        v6_111++;
                                                    }
                                                    v5_110.append(")");
                                                    com.google.android.gms.c.c.bd v5_112 = v3_12.i().delete("raw_events", v5_110.toString(), 0);
                                                    if (v5_112 != v2_8.size()) {
                                                        v3_12.r().k_().a("Deleted fewer rows from raw events table than expected", Integer.valueOf(v5_112), Integer.valueOf(v2_8.size()));
                                                    }
                                                    com.google.android.gms.c.c.bd v2_11 = this.d();
                                                    android.database.sqlite.SQLiteException v3_15 = v2_11.i();
                                                    try {
                                                        String v6_117 = new String[2];
                                                        v6_117[0] = v4_29;
                                                        v6_117[1] = v4_29;
                                                        v3_15.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v6_117);
                                                    } catch (android.database.sqlite.SQLiteException v0_10) {
                                                        v2_11.r().k_().a("Failed to remove unused event metadata. appId", com.google.android.gms.c.c.bb.a(v4_29), v0_10);
                                                    }
                                                    this.d().g();
                                                    this.d().h();
                                                    return 1;
                                                }
                                            } else {
                                                v9_0.close();
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                        }
                                        if (v15_1.moveToNext()) {
                                            v4_31.r().i().a("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                        }
                                        String[] v16_2;
                                        com.google.android.gms.c.c.bd v5_56;
                                        v15_1.close();
                                        v2_7.a(v13_6);
                                        if (v5_123 == -1) {
                                            v5_56 = "app_id = ? and metadata_fingerprint = ?";
                                            int v9_16 = new String[2];
                                            v9_16[0] = v3_0;
                                            v9_16[1] = v22;
                                            v16_2 = v9_16;
                                        } else {
                                            Boolean v12_22 = new String[3];
                                            v12_22[0] = v3_0;
                                            v12_22[1] = v22;
                                            v12_22[2] = String.valueOf(v5_123);
                                            v5_56 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v16_2 = v12_22;
                                        }
                                        v9_0 = v15_1;
                                        com.google.android.gms.c.c.bd v5_58 = v25.query("raw_events", new String[] {"rowid", "name", "timestamp", "data"}), v5_56, v16_2, 0, 0, "rowid", 0);
                                        try {
                                            if (v5_58.moveToFirst()) {
                                                do {
                                                    Boolean v12_26 = v5_58.getLong(0);
                                                    int v9_20 = v5_58.getBlob(3);
                                                    int v9_21 = com.google.android.gms.c.c.a.a(v9_20, 0, v9_20.length);
                                                    long v14_9 = new com.google.android.gms.c.c.gk();
                                                    v14_9.a(v9_21);
                                                    v14_9.d = v5_58.getString(1);
                                                    v14_9.e = Long.valueOf(v5_58.getLong(2));
                                                    if (v2_7.a(v12_26, v14_9)) {
                                                    } else {
                                                        if (v5_58 == null) {
                                                        } else {
                                                        }
                                                    }
                                                } while(v5_58.moveToNext());
                                                if (v5_58 == null) {
                                                }
                                            } else {
                                                v4_31.r().i().a("Raw event data disappeared while in transaction. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                                if (v5_58 == null) {
                                                }
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_8) {
                                            com.google.android.gms.c.c.bd v2_0 = v0_8;
                                            int v21 = v5_58;
                                            if (v21 != 0) {
                                                v21.close();
                                            }
                                            throw v2_0;
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            Boolean v12_5 = v3_0;
                                            v9_0 = v5_58;
                                            android.database.sqlite.SQLiteException v3_3 = v0_1;
                                            v4_31.r().k_().a("Data loss. Error selecting raw event. appId", com.google.android.gms.c.c.bb.a(v12_5), v3_3);
                                            if (v9_0 == 0) {
                                            }
                                        }
                                        v5_58.close();
                                    } else {
                                        v4_31.r().k_().a("Raw event metadata record is missing. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                        if (v15_1 == null) {
                                        } else {
                                            v15_1.close();
                                        }
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_6) {
                                    v9_0 = v15_1;
                                    v2_0 = v0_6;
                                    v21 = v9_0;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v9_0 = v15_1;
                                } catch (android.database.sqlite.SQLiteException v0_9) {
                                    v2_0 = v0_9;
                                    v21 = v15_1;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v12_5 = v3_0;
                                    v9_0 = v15_1;
                                }
                                v12_5 = v3_0;
                            } catch (android.database.sqlite.SQLiteException v0_4) {
                                v2_0 = v0_4;
                                v21 = v23;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v12_5 = v3_0;
                                v9_0 = v23;
                            }
                        } else {
                            if (v3_0 == null) {
                            } else {
                            }
                        }
                    } else {
                        Boolean v13_18;
                        Boolean v12_39 = v5_123 cmp -1;
                        try {
                            if (v12_39 == null) {
                                v13_18 = new String[1];
                                v13_18[0] = String.valueOf(p66);
                            } else {
                                v13_18 = new String[2];
                                v13_18[0] = String.valueOf(v5_123);
                                v13_18[1] = String.valueOf(p66);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_1) {
                            v9_0 = 0;
                            v12_5 = 0;
                        }
                        Boolean v12_43;
                        if (v12_39 == null) {
                            v12_43 = "";
                        } else {
                            v12_43 = "rowid <= ? and ";
                        }
                        android.database.sqlite.SQLiteException v3_18 = new StringBuilder((String.valueOf(v12_43).length() + 148));
                        v3_18.append("select app_id, metadata_fingerprint from raw_events where ");
                        v3_18.append(v12_43);
                        v3_18.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v3_18.toString(), v13_18);
                        if (v3_0.moveToFirst()) {
                            v12_5 = v3_0.getString(0);
                            try {
                                Boolean v13_1 = v3_0.getString(1);
                                v3_0.close();
                                v23 = v3_0;
                                v3_0 = v12_5;
                                v22 = v13_1;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v9_0 = v3_0;
                            }
                        } else {
                            if (v3_0 == null) {
                            }
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_2) {
                    v2_0 = v0_2;
                    v21 = v3_0;
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    v9_0 = v3_0;
                    v12_5 = 0;
                }
                v3_0.close();
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v2_0 = v0_0;
                v21 = 0;
            } catch (android.database.sqlite.SQLiteException v0_11) {
                v3_3 = v0_11;
                v9_0 = 0;
                v12_5 = 0;
            } catch (android.database.sqlite.SQLiteException v0_6) {
            }
        } catch (android.database.sqlite.SQLiteException v0_3) {
            com.google.android.gms.c.c.bd v2_1 = v0_3;
            this.d().h();
            throw v2_1;
        }
    }

Method com.google.android.gms.c.c.ay.onOpen() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final void onOpen(android.database.sqlite.SQLiteDatabase p8)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            android.database.Cursor v0_1 = 0;
            try {
                android.database.Cursor v1_3 = p8.rawQuery("PRAGMA journal_mode=memory", 0);
                try {
                    v1_3.moveToFirst();
                } catch (Throwable v8_1) {
                    v0_1 = v1_3;
                    if (v0_1 != null) {
                        v0_1.close();
                    }
                    throw v8_1;
                }
                if (v1_3 != null) {
                    v1_3.close();
                }
            } catch (Throwable v8_1) {
            }
        }
        com.google.android.gms.c.c.ah.a(this.a.r(), p8, "messages", "create table if not exists messages ( type INTEGER NOT NULL, entry BLOB NOT NULL)", "type,entry", 0);
        return;
    }

Method com.google.android.gms.c.c.ah.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private static java.util.Set a(android.database.sqlite.SQLiteDatabase p3, String p4)
    {
        java.util.HashSet v0_1 = new java.util.HashSet();
        StringBuilder v2_1 = new StringBuilder((String.valueOf(p4).length() + 22));
        v2_1.append("SELECT * FROM ");
        v2_1.append(p4);
        v2_1.append(" LIMIT 0");
        android.database.Cursor v3_1 = p3.rawQuery(v2_1.toString(), 0);
        try {
            java.util.Collections.addAll(v0_1, v3_1.getColumnNames());
            v3_1.close();
            return v0_1;
        } catch (Throwable v4_4) {
            v3_1.close();
            throw v4_4;
        }
    }

Method io.a.a.a.d.openOrCreateDatabase() calling method android.database.sqlite.SQLiteDatabase.openOrCreateDatabase()


    public android.database.sqlite.SQLiteDatabase openOrCreateDatabase(String p1, int p2, android.database.sqlite.SQLiteDatabase$CursorFactory p3, android.database.DatabaseErrorHandler p4)
    {
        return android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(this.getDatabasePath(p1).getPath(), p3, p4);
    }

Method io.a.a.a.d.openOrCreateDatabase() calling method android.database.sqlite.SQLiteDatabase.openOrCreateDatabase()


    public android.database.sqlite.SQLiteDatabase openOrCreateDatabase(String p1, int p2, android.database.sqlite.SQLiteDatabase$CursorFactory p3)
    {
        return android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(this.getDatabasePath(p1), p3);
    }

Method com.google.android.gms.c.c.ax.a() calling method android.database.sqlite.SQLiteDatabase.insertOrThrow()


    private final boolean a(int p18, byte[] p19)
    {
        this.b();
        this.d();
        Long v2_5 = 0;
        if (!this.b) {
            android.content.ContentValues v3_1 = new android.content.ContentValues();
            v3_1.put("type", Integer.valueOf(p18));
            v3_1.put("entry", p19);
            Long v4_4 = 5;
            int v5 = 0;
            int v6 = 5;
            while (v5 < v4_4) {
                int v7 = 0;
                try {
                    int v9 = this.C();
                    try {
                        if (v9 != 0) {
                            v9.beginTransaction();
                            Long v10_1 = 0;
                            int v12 = v9.rawQuery("select count(1) from messages", 0);
                            try {
                                if ((v12 != 0) && (v12.moveToFirst())) {
                                    v10_1 = v12.getLong(v2_5);
                                }
                                if (v10_1 >= 100000) {
                                    this.r().k_().a("Data loss, local db full");
                                    long v13_2 = ((100000 - v10_1) + 1);
                                    String[] v11 = new String[1];
                                    v11[v2_5] = Long.toString(v13_2);
                                    Long v10_4 = ((long) v9.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v11));
                                    if (v10_4 != v13_2) {
                                        this.r().k_().a("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v13_2), Long.valueOf(v10_4), Long.valueOf((v13_2 - v10_4)));
                                    }
                                }
                                v9.insertOrThrow("messages", 0, v3_1);
                                v9.setTransactionSuccessful();
                                v9.endTransaction();
                                if (v12 != 0) {
                                    v12.close();
                                }
                                if (v9 != 0) {
                                    v9.close();
                                }
                                return 1;
                            } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                                v7 = v12;
                                android.os.SystemClock.sleep(((long) v6));
                                v6 += 20;
                                if (v7 != 0) {
                                    v7.close();
                                }
                                if (v9 == 0) {
                                    v5++;
                                    v2_5 = 0;
                                    v4_4 = 5;
                                } else {
                                    v9.close();
                                }
                            }
                        } else {
                            this.b = 1;
                            if (v9 != 0) {
                                v9.close();
                            }
                            return v2_5;
                        }
                        v7 = v9;
                        if (v7 != 0) {
                            if (v7.inTransaction()) {
                                v7.endTransaction();
                            }
                        }
                        this.r().k_().a("Error writing entry to local database", com.google.android.gms.c.c.bd v0_0);
                        this.b = 1;
                        if (v12 != 0) {
                            v12.close();
                        }
                        if (v7 == 0) {
                        } else {
                            v7.close();
                        }
                    } catch (com.google.android.gms.c.c.bd v0_3) {
                        this.r().k_().a("Error writing entry to local database", v0_3);
                        this.b = 1;
                        if (v7 != 0) {
                            v7.close();
                        }
                        if (v9 == 0) {
                        }
                    } catch (com.google.android.gms.c.c.bd v0_0) {
                        v12 = 0;
                    }
                } catch (com.google.android.gms.c.c.bd v0_1) {
                    v9 = 0;
                    v12 = 0;
                    if (v12 != 0) {
                        v12.close();
                    }
                    if (v9 != 0) {
                        v9.close();
                    }
                    throw v0_1;
                } catch (com.google.android.gms.c.c.bd v0_3) {
                    v9 = 0;
                } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                    v9 = 0;
                } catch (com.google.android.gms.c.c.bd v0_0) {
                    v12 = 0;
                } catch (com.google.android.gms.c.c.bd v0_1) {
                    v12 = v7;
                }
            }
            this.r().i().a("Failed to write entry to local database");
            return 0;
        } else {
            return 0;
        }
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final boolean a(com.google.android.gms.c.c.gn p7, boolean p8)
    {
        this.d();
        this.I();
        com.google.android.gms.common.internal.z.a(p7);
        com.google.android.gms.common.internal.z.a(p7.q);
        com.google.android.gms.common.internal.z.a(p7.h);
        this.v();
        int v0_0 = this.m().a();
        if ((p7.h.longValue() < (v0_0 - com.google.android.gms.c.c.aa.j())) || (p7.h.longValue() > (com.google.android.gms.c.c.aa.j() + v0_0))) {
            this.r().i().a("Storing bundle outside of the max uploading time span. appId, now, timestamp", com.google.android.gms.c.c.bb.a(p7.q), Long.valueOf(v0_0), p7.h);
        }
        try {
            String v1_3 = new byte[p7.d()];
            Object v2_12 = com.google.android.gms.c.c.b.a(v1_3, 0, v1_3.length);
            p7.a(v2_12);
            v2_12.a();
            String v1_4 = this.i_().b(v1_3);
            this.r().w().a("Saving bundle, size", Integer.valueOf(v1_4.length));
            Object v2_17 = new android.content.ContentValues();
            v2_17.put("app_id", p7.q);
            v2_17.put("bundle_end_timestamp", p7.h);
            v2_17.put("data", v1_4);
            v2_17.put("has_realtime", Integer.valueOf(p8));
            com.google.android.gms.c.c.bd v8_4 = p7.J;
        } catch (com.google.android.gms.c.c.bd v8_5) {
            String v1_7 = this.r().k_();
            Object v2_0 = "Data loss. Failed to serialize bundle. appId";
            v1_7.a(v2_0, com.google.android.gms.c.c.bb.a(p7.q), v8_5);
            return 0;
        }
        if (v8_4 != null) {
            v2_17.put("retry_count", v8_4);
        }
        try {
            if (this.i().insert("queue", 0, v2_17) != -1) {
                return 1;
            } else {
                this.r().k_().a("Failed to insert bundle (got -1). appId", com.google.android.gms.c.c.bb.a(p7.q));
                return 0;
            }
        } catch (com.google.android.gms.c.c.bd v8_5) {
            v1_7 = this.r().k_();
            v2_0 = "Error storing bundle. appId";
            v1_7.a(v2_0, com.google.android.gms.c.c.bb.a(p7.q), v8_5);
            return 0;
        }
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final boolean a(com.google.android.gms.c.c.al p9, long p10, boolean p12)
    {
        this.d();
        this.I();
        com.google.android.gms.common.internal.z.a(p9);
        com.google.android.gms.common.internal.z.a(p9.a);
        long v0_6 = new com.google.android.gms.c.c.gk();
        v0_6.f = Long.valueOf(p9.d);
        byte[] v1_2 = new com.google.android.gms.c.c.gl[p9.e.a()];
        v0_6.c = v1_2;
        byte[] v1_4 = p9.e.iterator();
        String v3_2 = 0;
        while (v1_4.hasNext()) {
            Long v4_1 = ((String) v1_4.next());
            Integer v5_1 = new com.google.android.gms.c.c.gl();
            int v7 = (v3_2 + 1);
            v0_6.c[v3_2] = v5_1;
            v5_1.c = v4_1;
            this.i_().a(v5_1, p9.e.a(v4_1));
            v3_2 = v7;
        }
        try {
            byte[] v1_6 = new byte[v0_6.d()];
            String v3_4 = com.google.android.gms.c.c.b.a(v1_6, 0, v1_6.length);
            v0_6.a(v3_4);
            v3_4.a();
            this.r().w().a("Saving event, name, data size", this.o().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.c));
            v0_4.put("metadata_fingerprint", Long.valueOf(p10));
            v0_4.put("data", v1_6);
            v0_4.put("realtime", Integer.valueOf(p12));
            try {
                if (this.i().insert("raw_events", 0, v0_4) != -1) {
                    return 1;
                } else {
                    this.r().k_().a("Failed to insert raw event (got -1). appId", com.google.android.gms.c.c.bb.a(p9.a));
                    return 0;
                }
            } catch (com.google.android.gms.c.c.bd v10_5) {
                String v11_3 = this.r().k_();
                Object v12_3 = "Error storing raw event. appId";
                v11_3.a(v12_3, com.google.android.gms.c.c.bb.a(p9.a), v10_5);
                return 0;
            }
        } catch (com.google.android.gms.c.c.bd v10_5) {
            v11_3 = this.r().k_();
            v12_3 = "Data loss. Failed to serialize event params/data. appId";
            v11_3.a(v12_3, com.google.android.gms.c.c.bb.a(p9.a), v10_5);
            return 0;
        }
    }

Method com.google.android.gms.c.c.w.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    final com.google.android.gms.c.c.gi[] a(String p69, com.google.android.gms.c.c.gk[] p70, com.google.android.gms.c.c.gq[] p71)
    {
        Integer v15_0 = p69;
        String v13_0 = p70;
        com.google.android.gms.common.internal.z.a(p69);
        java.util.BitSet v11_3 = new java.util.HashSet();
        android.util.Pair v12_2 = new android.support.v4.g.a();
        int v10_0 = new android.support.v4.g.a();
        long v9_2 = new android.support.v4.g.a();
        Object v8_12 = new android.support.v4.g.a();
        boolean v22 = this.t().d(p69, com.google.android.gms.c.c.as.ab);
        com.google.android.gms.c.c.bd v0_13 = this.g_().e(p69);
        if (v0_13 != null) {
            int v1_29 = v0_13.keySet().iterator();
            while (v1_29.hasNext()) {
                com.google.android.gms.c.c.gj[] v26_0;
                Integer v5_9;
                int v27;
                String v28_0;
                long v2_26 = ((Integer) v1_29.next()).intValue();
                String v3_12 = ((com.google.android.gms.c.c.go) v0_13.get(Integer.valueOf(v2_26)));
                String v6_8 = ((java.util.BitSet) v10_0.get(Integer.valueOf(v2_26)));
                Integer v4_11 = ((java.util.BitSet) v9_2.get(Integer.valueOf(v2_26)));
                if (!v22) {
                    v26_0 = v0_13;
                    v27 = v1_29;
                    v28_0 = v4_11;
                    v5_9 = 0;
                } else {
                    v5_9 = new android.support.v4.g.a();
                    if (v3_12 == null) {
                        v26_0 = v0_13;
                        v27 = v1_29;
                        v28_0 = v4_11;
                    } else {
                        v26_0 = v0_13;
                        com.google.android.gms.c.c.bd v0_4 = v3_12.e;
                        if (v0_4 != null) {
                            v27 = v1_29;
                            int v1_18 = v0_4.length;
                            v28_0 = v4_11;
                            Integer v4_12 = 0;
                            while (v4_12 < v1_18) {
                                java.util.Iterator v29_0 = v1_18;
                                int v1_19 = v0_4[v4_12];
                                boolean v30_0 = v0_4;
                                com.google.android.gms.c.c.bd v0_5 = v1_19.c;
                                if (v0_5 != null) {
                                    v5_9.put(v0_5, v1_19.d);
                                }
                                v4_12++;
                                v1_18 = v29_0;
                                v0_4 = v30_0;
                            }
                        }
                    }
                    v8_12.put(Integer.valueOf(v2_26), v5_9);
                }
                Integer v4_13;
                if (v6_8 != null) {
                    v4_13 = v28_0;
                } else {
                    v6_8 = new java.util.BitSet();
                    v10_0.put(Integer.valueOf(v2_26), v6_8);
                    v4_13 = new java.util.BitSet();
                    v9_2.put(Integer.valueOf(v2_26), v4_13);
                }
                com.google.android.gms.c.c.bd v0_9 = 0;
                while(true) {
                    int v1_21 = v3_12.c;
                    long[] v31_1 = v8_12;
                    if (v0_9 >= (v1_21.length << 6)) {
                        break;
                    }
                    Integer v32_2;
                    Integer v33_2;
                    int v1_35;
                    if (!com.google.android.gms.c.c.fs.a(v1_21, v0_9)) {
                        v32_2 = v9_2;
                        v33_2 = v10_0;
                        v1_35 = 0;
                    } else {
                        v32_2 = v9_2;
                        v33_2 = v10_0;
                        this.r().w().a("Filter already evaluated. audience ID, filter ID", Integer.valueOf(v2_26), Integer.valueOf(v0_9));
                        v4_13.set(v0_9);
                        if (!com.google.android.gms.c.c.fs.a(v3_12.d, v0_9)) {
                        } else {
                            v6_8.set(v0_9);
                            v1_35 = 1;
                        }
                    }
                    if ((v5_9 != null) && (v1_35 == 0)) {
                        v5_9.remove(Integer.valueOf(v0_9));
                    }
                    v0_9++;
                    v8_12 = v31_1;
                    v9_2 = v32_2;
                    v10_0 = v33_2;
                }
                Integer v32_1 = v9_2;
                Integer v33_1 = v10_0;
                com.google.android.gms.c.c.bd v0_11 = new com.google.android.gms.c.c.gi();
                v12_2.put(Integer.valueOf(v2_26), v0_11);
                v0_11.f = Boolean.valueOf(0);
                v0_11.e = v3_12;
                v0_11.d = new com.google.android.gms.c.c.go();
                v0_11.d.d = com.google.android.gms.c.c.fs.a(v6_8);
                v0_11.d.c = com.google.android.gms.c.c.fs.a(v4_13);
                if (v22) {
                    v0_11.d.e = ark>com.google.android.gms.c.c.wark>.a(v5_9);
                }
                v0_13 = v26_0;
                v1_29 = v27;
                v8_12 = v31_1;
                v9_2 = v32_1;
                v10_0 = v33_1;
            }
        }
        long[] v31_0 = v8_12;
        Integer v32_0 = v9_2;
        Integer v33_0 = v10_0;
        if (p70 != null) {
            Object v8_5 = new android.support.v4.g.a();
            String v6_5 = p70.length;
            long v2_23 = 0;
            com.google.android.gms.c.c.bd v0_28 = 0;
            int v1_59 = 0;
            Integer v4_8 = 0;
            while (v4_8 < v6_5) {
                String v59_1;
                java.util.Iterator v29_1;
                ark>com.google.android.gms.c.c.wark> v23;
                android.util.Pair v56_1;
                com.google.android.gms.c.c.gq[] v14_0;
                boolean v30_1;
                com.google.android.gms.c.c.bd v0_33;
                String v58_1;
                Integer v47_0;
                String v13_7;
                String v28_1;
                int v24_1;
                boolean v25;
                Integer v57_1;
                Integer v5_38 = v13_0[v4_8];
                long v9_26 = v5_38.d;
                int v10_7 = v5_38.c;
                long v34 = v2_23;
                if (!this.t().d(v15_0, com.google.android.gms.c.c.as.V)) {
                    v25 = v4_8;
                    v13_7 = v5_38;
                    v23 = v6_5;
                    v24_1 = 1;
                    v28_1 = v0_28;
                    v29_1 = v1_59;
                    v0_33 = v9_26;
                    v30_1 = v10_7;
                    com.google.android.gms.c.c.gq[] v44;
                    long v2_62;
                    long[] v42;
                    String v45;
                    android.support.v4.g.a v41;
                    Integer v5_39;
                    int v1_84;
                    int v43;
                    com.google.android.gms.c.c.am v40;
                    int v1_83 = this.g_().a(v15_0, v13_7.d);
                    if (v1_83 != 0) {
                        v40 = v8_5;
                        v44 = v11_3;
                        v45 = v12_2;
                        v2_62 = v13_7;
                        v5_39 = v15_0;
                        v42 = v31_0;
                        v41 = v32_0;
                        v43 = v33_0;
                        v1_84 = v1_83.a();
                    } else {
                        this.r().i().a("Event aggregate wasn\'t created during raw event logging. appId, event", com.google.android.gms.c.c.bb.a(p69), this.o().a(v0_33));
                        v1_84 = new com.google.android.gms.c.c.am;
                        v40 = v8_5;
                        v42 = v31_0;
                        v41 = v32_0;
                        v43 = v33_0;
                        v44 = v11_3;
                        v45 = v12_2;
                        v2_62 = v13_7;
                        v5_39 = v15_0;
                        v1_84(p69, v13_7.d, 1, 1, v13_7.e.longValue(), 0, 0, 0, 0);
                    }
                    this.g_().a(v1_84);
                    Object v8_30 = v1_84.c;
                    int v10_9 = v40;
                    int v1_88 = ((java.util.Map) v10_9.get(v0_33));
                    if (v1_88 == 0) {
                        v1_88 = this.g_().f(v5_39, v0_33);
                        if (v1_88 == 0) {
                            v1_88 = new android.support.v4.g.a();
                        }
                        v10_9.put(v0_33, v1_88);
                    }
                    java.util.BitSet v11_2 = v1_88;
                    android.util.Pair v12_6 = v11_2.keySet().iterator();
                    while (v12_6.hasNext()) {
                        String v13_9 = ((Integer) v12_6.next()).intValue();
                        com.google.android.gms.c.c.gq[] v14_3 = v44;
                        if (!v14_3.contains(Integer.valueOf(v13_9))) {
                            android.util.Pair v12_1;
                            java.util.Map v48;
                            long v2_68;
                            long[] v49;
                            Integer v15_3 = v45;
                            String v6_1 = v43;
                            Integer v4_4 = ((java.util.BitSet) v6_1.get(Integer.valueOf(v13_9)));
                            android.util.Pair v46 = v2_62;
                            Integer v47_1 = v10_9;
                            int v10_2 = v41;
                            long v2_67 = ((java.util.BitSet) v10_2.get(Integer.valueOf(v13_9)));
                            if (!v22) {
                                v48 = v2_67;
                                v49 = v12_6;
                                v12_1 = v42;
                                v2_68 = 0;
                            } else {
                                v48 = v2_67;
                                v49 = v12_6;
                                v12_1 = v42;
                                v2_68 = ((java.util.Map) v12_1.get(Integer.valueOf(v13_9)));
                            }
                            long v2_17;
                            Integer v52;
                            if (((com.google.android.gms.c.c.gi) v15_3.get(Integer.valueOf(v13_9))) != null) {
                                v2_17 = v48;
                                v52 = v2_68;
                            } else {
                                Integer v51;
                                int v1_101 = new com.google.android.gms.c.c.gi();
                                v15_3.put(Integer.valueOf(v13_9), v1_101);
                                v1_101.f = Boolean.valueOf(v24_1);
                                v4_4 = new java.util.BitSet();
                                v6_1.put(Integer.valueOf(v13_9), v4_4);
                                int v1_104 = new java.util.BitSet();
                                Integer v50_1 = v2_68;
                                v10_2.put(Integer.valueOf(v13_9), v1_104);
                                if (!v22) {
                                    v51 = v1_104;
                                    v52 = v50_1;
                                } else {
                                    long v2_73 = new android.support.v4.g.a();
                                    v51 = v1_104;
                                    v12_1.put(Integer.valueOf(v13_9), v2_73);
                                    v52 = v2_73;
                                }
                                v2_17 = v51;
                            }
                            String v16_8 = ((java.util.List) v11_2.get(Integer.valueOf(v13_9))).iterator();
                            while (v16_8.hasNext()) {
                                String v55;
                                int v1_111 = ((com.google.android.gms.c.c.ga) v16_8.next());
                                Long v53 = v2_17;
                                java.util.BitSet v54 = v11_2;
                                if (!this.r().a(2)) {
                                    v55 = v6_1;
                                } else {
                                    v55 = v6_1;
                                    this.r().w().a("Evaluating filter. audience, filter, event", Integer.valueOf(v13_9), v1_111.c, this.o().a(v1_111.d));
                                    this.r().w().a("Filter definition", this.i_().a(v1_111));
                                }
                                int v10_1;
                                String v59_0;
                                Integer v4_0;
                                Integer v57_0;
                                long v2_0;
                                android.util.Pair v56_0;
                                android.util.Pair v12_0;
                                java.util.BitSet v11_1;
                                String v3_0;
                                int v1_4;
                                String v58_0;
                                Integer v7_0;
                                long v2_80 = v1_111.c;
                                if ((v2_80 != 0) && (v2_80.intValue() <= 256)) {
                                    if (!v22) {
                                        v57_0 = v10_2;
                                        v56_0 = v12_1;
                                        v58_0 = v15_3;
                                        v12_0 = v46;
                                        v7_0 = v52;
                                        v11_1 = v53;
                                        v59_0 = v55;
                                        Integer v15_9 = v1_111;
                                        v10_1 = v4_4;
                                        if (!v10_1.get(v15_9.c.intValue())) {
                                            Integer v4_36;
                                            int v1_116 = this.a(v15_9, v0_33, v30_1, v8_30);
                                            com.google.android.gms.c.c.bd vtmp259 = this.r().w();
                                            if (v1_116 != 0) {
                                                v4_36 = v1_116;
                                            } else {
                                                v4_36 = "null";
                                            }
                                            vtmp259.a("Event filter result", v4_36);
                                            if (v1_116 != 0) {
                                                v11_1.set(v15_9.c.intValue());
                                                if (!v1_116.booleanValue()) {
                                                    v52 = v7_0;
                                                    v4_4 = v10_1;
                                                    v2_17 = v11_1;
                                                    v46 = v12_0;
                                                    v11_2 = v54;
                                                    v12_1 = v56_0;
                                                    v10_2 = v57_0;
                                                    v15_3 = v58_0;
                                                    v6_1 = v59_0;
                                                    Integer v5 = p69;
                                                } else {
                                                    v10_1.set(v15_9.c.intValue());
                                                }
                                            }
                                        } else {
                                            v1_4 = this.r().w();
                                            v2_0 = "Event filter already evaluated true. audience ID, filter ID";
                                            v3_0 = Integer.valueOf(v13_9);
                                            v4_0 = v15_9.c;
                                            v1_4.a(v2_0, v3_0, v4_0);
                                        }
                                    } else {
                                        int v17_0;
                                        if (v1_111 == 0) {
                                            v17_0 = 0;
                                        } else {
                                            long v2_1 = v1_111.e;
                                            if ((v2_1 == 0) || ((v2_1.length <= 0) || ((v2_1[0].g == null) || (!v2_1[0].g.booleanValue())))) {
                                            } else {
                                                v17_0 = 1;
                                            }
                                        }
                                        if ((!v4_4.get(v1_111.c.intValue())) || (v17_0 != 0)) {
                                            Integer v4_2;
                                            Integer v5_2 = v1_111;
                                            v11_1 = v53;
                                            v56_0 = v12_1;
                                            v12_0 = v46;
                                            v57_0 = v10_2;
                                            v10_1 = v4_4;
                                            v7_0 = v52;
                                            v58_0 = v15_3;
                                            v59_0 = v55;
                                            Integer v15_1 = v5_2;
                                            int v1_6 = this.a(v5_2, v0_33, v30_1, v8_30);
                                            com.google.android.gms.c.c.bd vtmp272 = this.r().w();
                                            if (v1_6 != 0) {
                                                v4_2 = v1_6;
                                            } else {
                                                v4_2 = "null";
                                            }
                                            vtmp272.a("Event filter result", v4_2);
                                            if (v1_6 != 0) {
                                                v11_1.set(v15_1.c.intValue());
                                                if (!v1_6.booleanValue()) {
                                                } else {
                                                    v10_1.set(v15_1.c.intValue());
                                                    if ((v17_0 == 0) || (v12_0.e == null)) {
                                                    } else {
                                                        ark>com.google.android.gms.c.c.wark>.a(v7_0, v15_1.c.intValue(), v12_0.e.longValue());
                                                    }
                                                }
                                            }
                                        } else {
                                            this.r().w().a("Event filter already evaluated true and it is not associated with a dynamic audience. audience ID, filter ID", Integer.valueOf(v13_9), v1_111.c);
                                            v2_17 = v53;
                                            v11_2 = v54;
                                            v6_1 = v55;
                                        }
                                    }
                                    v14_3.add(Integer.valueOf(v13_9));
                                } else {
                                    v57_0 = v10_2;
                                    v56_0 = v12_1;
                                    v58_0 = v15_3;
                                    v12_0 = v46;
                                    v7_0 = v52;
                                    v11_1 = v53;
                                    v59_0 = v55;
                                    Integer v15_2 = v1_111;
                                    v10_1 = v4_4;
                                    v1_4 = this.r().i();
                                    v2_0 = "Invalid event filter ID. appId, id";
                                    v3_0 = com.google.android.gms.c.c.bb.a(p69);
                                    v4_0 = String.valueOf(v15_2.c);
                                }
                            }
                            v43 = v6_1;
                            v41 = v10_2;
                            v44 = v14_3;
                            v45 = v15_3;
                            v2_62 = v46;
                            v10_9 = v47_1;
                            v12_6 = v49;
                            v42 = v12_1;
                            v5 = p69;
                        } else {
                            this.r().w().a("Skipping failed audience ID", Integer.valueOf(v13_9));
                            v44 = v14_3;
                        }
                    }
                    v47_0 = v10_9;
                    v57_1 = v41;
                    v56_1 = v42;
                    v59_1 = v43;
                    v14_0 = v44;
                    v58_1 = v45;
                    v0_28 = v28_1;
                    v1_59 = v29_1;
                } else {
                    long v2_43;
                    this.i_();
                    String v3_23 = ((Long) com.google.android.gms.c.c.fs.b(v5_38, "_eid"));
                    if (v3_23 == null) {
                        v2_43 = 0;
                    } else {
                        v2_43 = 1;
                    }
                    Integer v4_18;
                    boolean v36;
                    if (v2_43 == 0) {
                        v36 = v4_8;
                        v4_18 = 0;
                    } else {
                        v36 = v4_8;
                        if (!v9_26.equals("_ep")) {
                        } else {
                            v4_18 = 1;
                        }
                    }
                    if (v4_18 == null) {
                        v13_7 = v5_38;
                        v23 = v6_5;
                        v25 = v36;
                        v24_1 = 1;
                        if (v2_43 == 0) {
                        } else {
                            this.i_();
                            int v1_69 = Long.valueOf(0);
                            com.google.android.gms.c.c.bd v0_35 = com.google.android.gms.c.c.fs.b(v13_7, "_epc");
                            if (v0_35 == null) {
                                v0_35 = v1_69;
                            }
                            com.google.android.gms.c.c.bd v0_38;
                            String v16_4 = ((Long) v0_35).longValue();
                            if (v16_4 > 0) {
                                v0_38 = v3_23;
                                this.g_().a(p69, v3_23, v16_4, v13_7);
                            } else {
                                this.r().i().a("Complex event with zero extra param count. eventName", v9_26);
                                v0_38 = v3_23;
                            }
                            v29_1 = v0_38;
                            v0_33 = v9_26;
                            v30_1 = v10_7;
                            v28_1 = v13_7;
                            v34 = v16_4;
                        }
                    } else {
                        this.i_();
                        long v9_28 = ((String) com.google.android.gms.c.c.fs.b(v5_38, "_en"));
                        if (!android.text.TextUtils.isEmpty(v9_28)) {
                            if ((v0_28 != null) && ((v1_59 != 0) && (v3_23.longValue() == v1_59.longValue()))) {
                                Integer v4_20 = v0_28;
                                String v16_6 = v1_59;
                                com.google.android.gms.c.c.bd v0_41 = v34;
                            } else {
                                long v2_50 = this.g_().a(v15_0, v3_23);
                                if (v2_50 != 0) {
                                    Integer v4_21 = v2_50.first;
                                    if (v4_21 != null) {
                                        v4_20 = ((com.google.android.gms.c.c.gk) v4_21);
                                        v0_41 = ((Long) v2_50.second).longValue();
                                        this.i_();
                                        v16_6 = ((Long) com.google.android.gms.c.c.fs.b(v4_20, "_eid"));
                                        Integer v4_23;
                                        int v17_2 = (v0_41 - 1);
                                        if (v17_2 > 0) {
                                            int v19 = 0;
                                            v13_7 = v5_38;
                                            v25 = v36;
                                            java.util.BitSet v38 = v4_20;
                                            v24_1 = 1;
                                            v23 = v6_5;
                                            this.g_().a(p69, v3_23, v17_2, v38);
                                            v4_23 = v38;
                                        } else {
                                            int v1_74 = this.g_();
                                            v1_74.d();
                                            v1_74.r().w().a("Clearing complex main event info. appId", v15_0);
                                            try {
                                                com.google.android.gms.c.c.bd v0_49 = v1_74.i();
                                                java.util.BitSet v37_1 = v4_20;
                                                try {
                                                    Integer v4_24 = new String[1];
                                                    try {
                                                        v4_24[0] = v15_0;
                                                        v0_49.execSQL("delete from main_event_params where app_id=?", v4_24);
                                                    } catch (com.google.android.gms.c.c.bd v0_50) {
                                                        v1_74.r().k_().a("Error clearing complex main event", v0_50);
                                                    }
                                                    v13_7 = v5_38;
                                                    v23 = v6_5;
                                                    v25 = v36;
                                                    v4_23 = v37_1;
                                                    v24_1 = 1;
                                                } catch (com.google.android.gms.c.c.bd v0_50) {
                                                }
                                            } catch (com.google.android.gms.c.c.bd v0_50) {
                                                v37_1 = v4_20;
                                            }
                                        }
                                        com.google.android.gms.c.c.bd v0_3 = v4_23.c;
                                        int v1_79 = new com.google.android.gms.c.c.gl[(v0_3.length + v10_7.length)];
                                        long v2_60 = v0_3.length;
                                        String v3_9 = 0;
                                        Integer v5_7 = 0;
                                        while (v3_9 < v2_60) {
                                            String v6_4 = v0_3[v3_9];
                                            this.i_();
                                            android.database.sqlite.SQLiteException v39 = v0_3;
                                            if (com.google.android.gms.c.c.fs.a(v13_7, v6_4.c) == null) {
                                                com.google.android.gms.c.c.bd v0_2 = (v5_7 + 1);
                                                v1_79[v5_7] = v6_4;
                                                v5_7 = v0_2;
                                            }
                                            v3_9++;
                                            v0_3 = v39;
                                        }
                                        if (v5_7 <= null) {
                                            this.r().i().a("No unique parameters in main event. eventName", v9_28);
                                            v28_1 = v4_23;
                                            v0_33 = v9_28;
                                            v30_1 = v10_7;
                                        } else {
                                            com.google.android.gms.c.c.bd v0_53 = v10_7.length;
                                            long v2_18 = 0;
                                            while (v2_18 < v0_53) {
                                                String v6_3 = (v5_7 + 1);
                                                v1_79[v5_7] = v10_7[v2_18];
                                                v2_18++;
                                                v5_7 = v6_3;
                                            }
                                            if (v5_7 != v1_79.length) {
                                                v1_79 = ((com.google.android.gms.c.c.gl[]) java.util.Arrays.copyOf(v1_79, v5_7));
                                            }
                                            v30_1 = v1_79;
                                            v28_1 = v4_23;
                                            v0_33 = v9_28;
                                        }
                                        v29_1 = v16_6;
                                        v34 = v17_2;
                                    }
                                }
                                v23 = v6_5;
                                v25 = v36;
                                this.r().k_().a("Extra parameter without existing main event. eventName, eventId", v9_28, v3_23);
                                v47_0 = v8_5;
                                v14_0 = v11_3;
                                v58_1 = v12_2;
                                v56_1 = v31_0;
                                v57_1 = v32_0;
                                v59_1 = v33_0;
                                v2_23 = v34;
                                v4_8 = (v25 + 1);
                                v13_0 = p70;
                                v11_3 = v14_0;
                                v6_5 = v23;
                                v8_5 = v47_0;
                                v31_0 = v56_1;
                                v32_0 = v57_1;
                                v12_2 = v58_1;
                                v33_0 = v59_1;
                                v15_0 = p69;
                            }
                        } else {
                            this.r().k_().a("Extra parameter without an event name. eventId", v3_23);
                            v23 = v6_5;
                            v25 = v36;
                        }
                    }
                }
            }
        }
        com.google.android.gms.c.c.gq[] v14_2 = v11_3;
        String v58_2 = v12_2;
        android.util.Pair v56_2 = v31_0;
        Integer v57_2 = v32_0;
        String v59_2 = v33_0;
        int v1_38 = p71;
        if (p71 != null) {
            com.google.android.gms.c.c.bd v0_27 = new android.support.v4.g.a();
            long v2_35 = p71.length;
            String v3_20 = 0;
            while (v3_20 < v2_35) {
                Integer v4_15 = v1_38[v3_20];
                Integer v5_17 = ((java.util.Map) v0_27.get(v4_15.d));
                if (v5_17 == null) {
                    v5_17 = this.g_().g(p69, v4_15.d);
                    if (v5_17 == null) {
                        v5_17 = new android.support.v4.g.a();
                    }
                    v0_27.put(v4_15.d, v5_17);
                }
                String v6_13 = v5_17.keySet().iterator();
                while (v6_13.hasNext()) {
                    Object v8_26 = ((Integer) v6_13.next()).intValue();
                    if (!v14_2.contains(Integer.valueOf(v8_26))) {
                        java.util.Map v60;
                        com.google.android.gms.c.c.bd v0_23;
                        int v1_40;
                        int v10_5 = v58_2;
                        android.util.Pair v12_3 = v59_2;
                        java.util.BitSet v11_11 = ((java.util.BitSet) v12_3.get(Integer.valueOf(v8_26)));
                        Integer v15_5 = v57_2;
                        String v13_5 = ((java.util.BitSet) v15_5.get(Integer.valueOf(v8_26)));
                        if (!v22) {
                            v60 = v0_27;
                            v1_40 = v56_2;
                            v0_23 = 0;
                        } else {
                            v60 = v0_27;
                            v1_40 = v56_2;
                            v0_23 = ((java.util.Map) v1_40.get(Integer.valueOf(v8_26)));
                        }
                        if (((com.google.android.gms.c.c.gi) v10_5.get(Integer.valueOf(v8_26))) == null) {
                            long v9_10 = new com.google.android.gms.c.c.gi();
                            v10_5.put(Integer.valueOf(v8_26), v9_10);
                            v9_10.f = Boolean.valueOf(1);
                            v11_11 = new java.util.BitSet();
                            v12_3.put(Integer.valueOf(v8_26), v11_11);
                            v13_5 = new java.util.BitSet();
                            v15_5.put(Integer.valueOf(v8_26), v13_5);
                            if (v22) {
                                v0_23 = new android.support.v4.g.a();
                                v1_40.put(Integer.valueOf(v8_26), v0_23);
                            }
                        }
                        long v9_17 = ((java.util.List) v5_17.get(Integer.valueOf(v8_26))).iterator();
                        while (v9_17.hasNext()) {
                            String v66_1;
                            com.google.android.gms.c.c.bd v65_1;
                            Integer v64;
                            Long v61 = v2_35;
                            long v2_32 = ((com.google.android.gms.c.c.gd) v9_17.next());
                            String v62 = v5_17;
                            int v63_1 = v6_13;
                            if (!this.r().a(2)) {
                                v65_1 = v1_40;
                                v64 = v9_17;
                                v66_1 = v15_5;
                            } else {
                                v64 = v9_17;
                                v65_1 = v1_40;
                                v66_1 = v15_5;
                                this.r().w().a("Evaluating filter. audience, filter, property", Integer.valueOf(v8_26), v2_32.c, this.o().c(v2_32.d));
                                this.r().w().a("Filter definition", this.i_().a(v2_32));
                            }
                            int v1_45 = v2_32.c;
                            if ((v1_45 != 0) && (v1_45.intValue() <= 256)) {
                                int v67_1;
                                if (!v22) {
                                    v67_1 = v10_5;
                                    if (!v11_11.get(v2_32.c.intValue())) {
                                        long v9_19;
                                        int v1_50 = this.a(v2_32, v4_15);
                                        Integer v5_27 = this.r().w();
                                        if (v1_50 != 0) {
                                            v9_19 = v1_50;
                                        } else {
                                            v9_19 = "null";
                                        }
                                        v5_27.a("Property filter result", v9_19);
                                        if (v1_50 != 0) {
                                            v13_5.set(v2_32.c.intValue());
                                            if (v1_50.booleanValue()) {
                                                v11_11.set(v2_32.c.intValue());
                                            }
                                        } else {
                                            v14_2.add(Integer.valueOf(v8_26));
                                        }
                                    } else {
                                        this.r().w().a("Property filter already evaluated true. audience ID, filter ID", Integer.valueOf(v8_26), v2_32.c);
                                    }
                                } else {
                                    int v1_61;
                                    if (v2_32 == 0) {
                                        v1_61 = 0;
                                    } else {
                                        int v1_57 = v2_32.e;
                                        if (v1_57 == 0) {
                                        } else {
                                            int v1_58 = v1_57.g;
                                            if ((v1_58 == 0) || (!v1_58.booleanValue())) {
                                            } else {
                                                v1_61 = 1;
                                            }
                                        }
                                    }
                                    if ((!v11_11.get(v2_32.c.intValue())) || (v1_61 != 0)) {
                                        Integer v5_31;
                                        Integer v7_5 = this.a(v2_32, v4_15);
                                        long v9_21 = this.r().w();
                                        if (v7_5 != null) {
                                            v5_31 = v7_5;
                                        } else {
                                            v5_31 = "null";
                                        }
                                        v9_21.a("Property filter result", v5_31);
                                        if (v7_5 != null) {
                                            v13_5.set(v2_32.c.intValue());
                                            v11_11.set(v2_32.c.intValue(), v7_5.booleanValue());
                                            if ((v7_5.booleanValue()) && ((v1_61 != 0) && (v4_15.c != null))) {
                                                v67_1 = v10_5;
                                                ark>com.google.android.gms.c.c.wark>.a(v0_23, v2_32.c.intValue(), v4_15.c.longValue());
                                                v2_35 = v61;
                                                v5_17 = v62;
                                                v6_13 = v63_1;
                                                v9_17 = v64;
                                                v1_40 = v65_1;
                                                v15_5 = v66_1;
                                                v10_5 = v67_1;
                                            }
                                        } else {
                                            v14_2.add(Integer.valueOf(v8_26));
                                        }
                                    } else {
                                        this.r().w().a("Property filter already evaluated true and it is not associated with a dynamic audience. audience ID, filter ID", Integer.valueOf(v8_26), v2_32.c);
                                    }
                                    v2_35 = v61;
                                    v5_17 = v62;
                                    v6_13 = v63_1;
                                    v9_17 = v64;
                                    v1_40 = v65_1;
                                    v15_5 = v66_1;
                                }
                            } else {
                                int v67_2 = v10_5;
                                this.r().i().a("Invalid property filter ID. appId, id", com.google.android.gms.c.c.bb.a(p69), String.valueOf(v2_32.c));
                                v14_2.add(Integer.valueOf(v8_26));
                                v59_2 = v12_3;
                                v0_27 = v60;
                                v2_35 = v61;
                                v5_17 = v62;
                                v6_13 = v63_1;
                                v56_2 = v65_1;
                                v57_2 = v66_1;
                                v58_2 = v67_2;
                            }
                            Integer v7 = p69;
                        }
                        v56_2 = v1_40;
                        v58_2 = v10_5;
                        v59_2 = v12_3;
                        v57_2 = v15_5;
                        v0_27 = v60;
                    } else {
                        this.r().w().a("Skipping failed audience ID", Integer.valueOf(v8_26));
                    }
                }
                v61 = v2_35;
                String v66 = v57_2;
                android.util.Pair v12 = v59_2;
                v3_20++;
                v1_38 = p71;
            }
        }
        com.google.android.gms.c.c.bd v65_0 = v56_2;
        String v66_0 = v57_2;
        int v67_0 = v58_2;
        android.util.Pair v12_4 = v59_2;
        int v1_73 = new com.google.android.gms.c.c.gi[v12_4.size()];
        long v2_58 = v12_4.keySet().iterator();
        Integer v5_14 = 0;
        while (v2_58.hasNext()) {
            com.google.android.gms.c.c.bd v0_61 = ((Integer) v2_58.next()).intValue();
            if (!v14_2.contains(Integer.valueOf(v0_61))) {
                Integer v4_34 = v67_0;
                String v3_31 = ((com.google.android.gms.c.c.gi) v4_34.get(Integer.valueOf(v0_61)));
                if (v3_31 == null) {
                    v3_31 = new com.google.android.gms.c.c.gi();
                }
                int v10_3;
                Integer v7_9 = (v5_14 + 1);
                v1_73[v5_14] = v3_31;
                v3_31.c = Integer.valueOf(v0_61);
                v3_31.d = new com.google.android.gms.c.c.go();
                v3_31.d.d = com.google.android.gms.c.c.fs.a(((java.util.BitSet) v12_4.get(Integer.valueOf(v0_61))));
                long v9_1 = v66_0;
                v3_31.d.c = com.google.android.gms.c.c.fs.a(((java.util.BitSet) v9_1.get(Integer.valueOf(v0_61))));
                if (!v22) {
                    v10_3 = v65_0;
                } else {
                    v10_3 = v65_0;
                    v3_31.d.e = ark>com.google.android.gms.c.c.wark>.a(((java.util.Map) v10_3.get(Integer.valueOf(v0_61))));
                }
                Integer v5_12 = this.g_();
                String v3_13 = v3_31.d;
                v5_12.I();
                v5_12.d();
                com.google.android.gms.common.internal.z.a(p69);
                com.google.android.gms.common.internal.z.a(v3_13);
                try {
                    Object v8_19 = new byte[v3_13.d()];
                    java.util.BitSet v11_5 = com.google.android.gms.c.c.b.a(v8_19, 0, v8_19.length);
                    v3_13.a(v11_5);
                    v11_5.a();
                    String v3_15 = new android.content.ContentValues();
                    v3_15.put("app_id", p69);
                    v3_15.put("audience_id", Integer.valueOf(v0_61));
                    v3_15.put("current_results", v8_19);
                    try {
                        try {
                            if (v5_12.i().insertWithOnConflict("audience_filter_values", 0, v3_15, 5) != -1) {
                                v67_0 = v4_34;
                                v5_14 = v7_9;
                                v66_0 = v9_1;
                                v65_0 = v10_3;
                            } else {
                                v5_12.r().k_().a("Failed to insert filter results (got -1). appId", com.google.android.gms.c.c.bb.a(p69));
                            }
                        } catch (com.google.android.gms.c.c.bd v0_17) {
                            String v3_17 = v5_12.r().k_();
                            Integer v5_13 = "Error storing filter results. appId";
                            v3_17.a(v5_13, com.google.android.gms.c.c.bb.a(p69), v0_17);
                        }
                    } catch (com.google.android.gms.c.c.bd v0_17) {
                    }
                } catch (com.google.android.gms.c.c.bd v0_17) {
                    Integer v15 = p69;
                    v3_17 = v5_12.r().k_();
                    v5_13 = "Configuration loss. Failed to serialize filter results. appId";
                }
            }
        }
        return ((com.google.android.gms.c.c.gi[]) java.util.Arrays.copyOf(v1_73, v5_14));
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    final void a(java.util.List p5)
    {
        this.d();
        this.I();
        com.google.android.gms.common.internal.z.a(p5);
        com.google.android.gms.common.internal.z.a(p5.size());
        if (this.K()) {
            android.database.sqlite.SQLiteException v5_1 = android.text.TextUtils.join(",", p5);
            String v1_1 = new StringBuilder((String.valueOf(v5_1).length() + 2));
            v1_1.append("(");
            v1_1.append(v5_1);
            v1_1.append(")");
            android.database.sqlite.SQLiteException v5_3 = v1_1.toString();
            String v1_3 = new StringBuilder((String.valueOf(v5_3).length() + 80));
            v1_3.append("SELECT COUNT(1) FROM queue WHERE rowid IN ");
            v1_3.append(v5_3);
            v1_3.append(" AND retry_count =  2147483647 LIMIT 1");
            if (this.b(v1_3.toString(), 0) > 0) {
                this.r().i().a("The number of upload retries exceeds the limit. Will remain unchanged.");
            }
            try {
                com.google.android.gms.c.c.bd v0_15 = this.i();
                StringBuilder v2_2 = new StringBuilder((String.valueOf(v5_3).length() + 127));
                v2_2.append("UPDATE queue SET retry_count = IFNULL(retry_count, 0) + 1 WHERE rowid IN ");
                v2_2.append(v5_3);
                v2_2.append(" AND (retry_count IS NULL OR retry_count < 2147483647)");
                v0_15.execSQL(v2_2.toString());
                return;
            } catch (android.database.sqlite.SQLiteException v5_6) {
                this.r().k_().a("Error incrementing retry count. error", v5_6);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.c.c.fm.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private final boolean a(String p14, com.google.android.gms.c.c.aq p15)
    {
        String v3_1;
        Object v0_6 = p15.b.d("currency");
        if (!"ecommerce_purchase".equals(p15.a)) {
            v3_1 = p15.b.b("value").longValue();
        } else {
            String v3_7 = (p15.b.c("value").doubleValue() * 1000000.0);
            if (v3_7 == 0) {
                v3_7 = (((double) p15.b.b("value").longValue()) * 1000000.0);
            }
            if ((v3_7 > 9.223372036854776e+18) || (v3_7 < -9.223372036854776e+18)) {
                this.i.r().i().a("Data lost. Currency value is too big. appId", com.google.android.gms.c.c.bb.a(p14), Double.valueOf(v3_7));
                return 0;
            } else {
                v3_1 = Math.round(v3_7);
            }
        }
        if (!android.text.TextUtils.isEmpty(v0_6)) {
            Object v0_8 = v0_6.toUpperCase(java.util.Locale.US);
            if (v0_8.matches("[A-Z]{3}")) {
                Object v0_11;
                String v1_24 = String.valueOf("_ltv_");
                Object v0_9 = String.valueOf(v0_8);
                if (v0_9.length() == 0) {
                    v0_11 = new String(v1_24);
                } else {
                    v0_11 = v1_24.concat(v0_9);
                }
                Object v0_1;
                int v9_1 = v0_11;
                Object v0_13 = this.d().c(p14, v9_1);
                if (v0_13 == null) {
                    Object v0_2 = this.d();
                    String v1_5 = (this.i.b().b(p14, com.google.android.gms.c.c.as.M) - 1);
                    com.google.android.gms.common.internal.z.a(p14);
                    v0_2.d();
                    v0_2.I();
                    try {
                        com.google.android.gms.c.c.fw v6_2 = v0_2.i();
                        int v8_1 = new String[3];
                        v8_1[0] = p14;
                        v8_1[1] = p14;
                        v8_1[2] = String.valueOf(v1_5);
                        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 (String v1_7) {
                        v0_2.r().k_().a("Error pruning currencies. appId", com.google.android.gms.c.c.bb.a(p14), v1_7);
                    }
                    v0_1 = new com.google.android.gms.c.c.fv;
                    v0_1(p14, p15.c, v9_1, this.i.m().a(), Long.valueOf(v3_1));
                } else {
                    Object v0_14 = v0_13.e;
                    if ((v0_14 instanceof Long)) {
                        Object v2_5 = new com.google.android.gms.c.c.fv;
                        v2_5(p14, p15.c, v9_1, this.i.m().a(), Long.valueOf((((Long) v0_14).longValue() + v3_1)));
                        v0_1 = v2_5;
                    }
                }
                if (!this.d().a(v0_1)) {
                    this.i.r().k_().a("Too many unique user properties are set. Ignoring user property. appId", com.google.android.gms.c.c.bb.a(p14), this.i.l().c(v0_1.c), v0_1.e);
                    this.i.k().a(p14, 9, 0, 0, 0);
                }
            }
        }
        return 1;
    }

Method com.google.android.gms.c.c.fm.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private final boolean a(String p65, long p66)
    {
        this.d().f();
        try {
            android.database.sqlite.SQLiteException v3_0 = 0;
            com.google.android.gms.c.c.bd v2_7 = new ark>com.google.android.gms.c.c.fmark>$a(this, 0);
            Object v4_31 = this.d();
            com.google.android.gms.c.c.bd v5_123 = this.w;
            com.google.android.gms.common.internal.z.a(v2_7);
            v4_31.d();
            v4_31.I();
            try {
                String v22;
                int v23;
                Long v15_2 = v4_31.i();
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        Boolean v12_30;
                        android.database.sqlite.SQLiteException v3_2 = v5_123 cmp -1;
                        if (v3_2 == null) {
                            v12_30 = new String[] {0});
                        } else {
                            v12_30 = new String[2];
                            v12_30[0] = 0;
                            v12_30[1] = String.valueOf(v5_123);
                        }
                        android.database.sqlite.SQLiteException v3_9;
                        if (v3_2 == null) {
                            v3_9 = "";
                        } else {
                            v3_9 = " and rowid <= ?";
                        }
                        long v14_12 = new StringBuilder((String.valueOf(v3_9).length() + 84));
                        v14_12.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v14_12.append(v3_9);
                        v14_12.append(" order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v14_12.toString(), v12_30);
                        if (v3_0.moveToFirst()) {
                            Boolean v13_17 = v3_0.getString(0);
                            v3_0.close();
                            v23 = v3_0;
                            v22 = v13_17;
                            v3_0 = 0;
                            try {
                                Boolean v12_11 = new String[2];
                                v12_11[0] = v3_0;
                                v12_11[1] = v22;
                                android.database.sqlite.SQLiteDatabase v25 = v15_2;
                                Long v15_1 = v15_2.query("raw_events_metadata", new String[] {"metadata"}), "app_id = ? and metadata_fingerprint = ?", v12_11, 0, 0, "rowid", "2");
                                try {
                                    if (v15_1.moveToFirst()) {
                                        Boolean v12_16 = v15_1.getBlob(0);
                                        Boolean v12_17 = com.google.android.gms.c.c.a.a(v12_16, 0, v12_16.length);
                                        Boolean v13_6 = new com.google.android.gms.c.c.gn();
                                        try {
                                            v13_6.a(v12_17);
                                        } catch (android.database.sqlite.SQLiteException v0_5) {
                                            int v9_0 = v15_1;
                                            v4_31.r().k_().a("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.c.c.bb.a(v3_0), v0_5);
                                            if (v9_0 == 0) {
                                                android.database.sqlite.SQLiteException v3_7;
                                                if (v2_7.c == null) {
                                                    v3_7 = 1;
                                                } else {
                                                    if (!v2_7.c.isEmpty()) {
                                                        v3_7 = 0;
                                                    } else {
                                                    }
                                                }
                                                if (v3_7 != null) {
                                                    this.d().g();
                                                    this.d().h();
                                                    return 0;
                                                } else {
                                                    android.database.sqlite.SQLiteException v3_8 = v2_7.a;
                                                    Object v4_4 = new com.google.android.gms.c.c.gk[v2_7.c.size()];
                                                    v3_8.d = v4_4;
                                                    Object v4_7 = this.i.b().e(v3_8.q);
                                                    int v9_13 = 0;
                                                    Boolean v12_9 = 0;
                                                    Boolean v13_3 = 0;
                                                    long v14_2 = 0;
                                                    while (v9_13 < v2_7.c.size()) {
                                                        String[] v44;
                                                        int v7_3 = ((com.google.android.gms.c.c.gk) v2_7.c.get(v9_13));
                                                        if (!this.p().b(v2_7.a.q, v7_3.d)) {
                                                            com.google.android.gms.c.c.bd v5_4 = this.p().c(v2_7.a.q, v7_3.d);
                                                            if (v5_4 != null) {
                                                                if (v7_3.c == null) {
                                                                    com.google.android.gms.c.c.am v8_4 = new com.google.android.gms.c.c.gl[0];
                                                                    v7_3.c = v8_4;
                                                                }
                                                                String v6_11 = v7_3.c;
                                                                com.google.android.gms.c.c.am v8_5 = v6_11.length;
                                                                boolean v10_5 = 0;
                                                                long v11_3 = 0;
                                                                long v18_0 = 0;
                                                                while (v10_5 < v8_5) {
                                                                    int v32_1 = v8_5;
                                                                    com.google.android.gms.c.c.am v8_46 = v6_11[v10_5];
                                                                    int v33_1 = v6_11;
                                                                    int v34_2 = v12_9;
                                                                    if (!"_c".equals(v8_46.c)) {
                                                                        if ("_r".equals(v8_46.c)) {
                                                                            v8_46.e = Long.valueOf(1);
                                                                            v18_0 = 1;
                                                                        }
                                                                    } else {
                                                                        v8_46.e = Long.valueOf(1);
                                                                        v11_3 = 1;
                                                                    }
                                                                    v10_5++;
                                                                    v8_5 = v32_1;
                                                                    v6_11 = v33_1;
                                                                    v12_9 = v34_2;
                                                                }
                                                                int v34_0 = v12_9;
                                                                if ((v11_3 == 0) && (v5_4 != null)) {
                                                                    this.i.r().w().a("Marking event as conversion", this.i.l().a(v7_3.d));
                                                                    String v6_17 = ((com.google.android.gms.c.c.gl[]) java.util.Arrays.copyOf(v7_3.c, (v7_3.c.length + 1)));
                                                                    com.google.android.gms.c.c.am v8_11 = new com.google.android.gms.c.c.gl();
                                                                    v8_11.c = "_c";
                                                                    v8_11.e = Long.valueOf(1);
                                                                    v6_17[(v6_17.length - 1)] = v8_11;
                                                                    v7_3.c = v6_17;
                                                                }
                                                                if (v18_0 == 0) {
                                                                    this.i.r().w().a("Marking event as real-time", this.i.l().a(v7_3.d));
                                                                    String v6_23 = ((com.google.android.gms.c.c.gl[]) java.util.Arrays.copyOf(v7_3.c, (v7_3.c.length + 1)));
                                                                    com.google.android.gms.c.c.am v8_17 = new com.google.android.gms.c.c.gl();
                                                                    v8_17.c = "_r";
                                                                    v8_17.e = Long.valueOf(1);
                                                                    v6_23[(v6_23.length - 1)] = v8_17;
                                                                    v7_3.c = v6_23;
                                                                }
                                                                v44 = v9_13;
                                                                if (this.d().a(this.w(), v2_7.a.q, 0, 0, 0, 0, 1).e <= ((long) this.i.b().a(v2_7.a.q))) {
                                                                    v12_9 = 1;
                                                                } else {
                                                                    String v6_31 = 0;
                                                                    while (v6_31 < v7_3.c.length) {
                                                                        if (!"_r".equals(v7_3.c[v6_31].c)) {
                                                                            v6_31++;
                                                                        } else {
                                                                            com.google.android.gms.c.c.am v8_28 = new com.google.android.gms.c.c.gl[(v7_3.c.length - 1)];
                                                                            if (v6_31 > null) {
                                                                                System.arraycopy(v7_3.c, 0, v8_28, 0, v6_31);
                                                                            }
                                                                            if (v6_31 < v8_28.length) {
                                                                                System.arraycopy(v7_3.c, (v6_31 + 1), v8_28, v6_31, (v8_28.length - v6_31));
                                                                            }
                                                                            v7_3.c = v8_28;
                                                                            break;
                                                                        }
                                                                    }
                                                                    v12_9 = v34_0;
                                                                }
                                                                if ((com.google.android.gms.c.c.fw.a(v7_3.d)) && ((v5_4 != null) && (this.d().a(this.w(), v2_7.a.q, 0, 0, 1, 0, 0).c > ((long) this.i.b().b(v2_7.a.q, com.google.android.gms.c.c.as.v))))) {
                                                                    this.i.r().i().a("Too many conversions. Not logging as conversion. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                                    com.google.android.gms.c.c.bd v5_13 = v7_3.c;
                                                                    String v6_35 = v5_13.length;
                                                                    com.google.android.gms.c.c.am v8_36 = 0;
                                                                    int v9_11 = 0;
                                                                    boolean v10_26 = 0;
                                                                    while (v8_36 < v6_35) {
                                                                        long v11_10 = v5_13[v8_36];
                                                                        if (!"_c".equals(v11_10.c)) {
                                                                            if ("_err".equals(v11_10.c)) {
                                                                                v9_11 = 1;
                                                                            }
                                                                        } else {
                                                                            v10_26 = v11_10;
                                                                        }
                                                                        v8_36++;
                                                                    }
                                                                    if ((v9_11 == 0) || (!v10_26)) {
                                                                        if (!v10_26) {
                                                                            this.i.r().k_().a("Did not find conversion parameter. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                                        } else {
                                                                            v10_26.c = "_err";
                                                                            v10_26.e = Long.valueOf(10);
                                                                        }
                                                                    } else {
                                                                        com.google.android.gms.c.c.bd v5_20 = v7_3.c;
                                                                        com.google.android.gms.c.c.am v8_40 = new com.google.android.gms.c.c.gl[1];
                                                                        v8_40[0] = v10_26;
                                                                        v7_3.c = ((com.google.android.gms.c.c.gl[]) com.google.android.gms.common.util.b.a(v5_20, v8_40));
                                                                    }
                                                                }
                                                            } else {
                                                                this.f();
                                                                String v6_4 = v7_3.d;
                                                                com.google.android.gms.common.internal.z.a(v6_4);
                                                                com.google.android.gms.c.c.am v8_3 = -1;
                                                                boolean v10_1 = v6_4.hashCode();
                                                                if (v10_1 == 94660) {
                                                                    if (v6_4.equals("_in")) {
                                                                        v8_3 = 0;
                                                                    }
                                                                } else {
                                                                    if (v10_1 == 95025) {
                                                                        if (v6_4.equals("_ug")) {
                                                                            v8_3 = 2;
                                                                        }
                                                                    } else {
                                                                        if (v10_1 == 95027) {
                                                                            if (v6_4.equals("_ui")) {
                                                                                v8_3 = 1;
                                                                            }
                                                                        } else {
                                                                        }
                                                                    }
                                                                }
                                                                String v6_8;
                                                                switch (v8_3) {
                                                                    case 0:
                                                                    case 1:
                                                                    case 2:
                                                                        v6_8 = 1;
                                                                    default:
                                                                        v6_8 = 0;
                                                                }
                                                                if (v6_8 == null) {
                                                                    v44 = v9_13;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v4_7 != null) && ("_e".equals(v7_3.d))) {
                                                                String v6_40;
                                                                com.google.android.gms.c.c.bd v5_34;
                                                                com.google.android.gms.c.c.am v8_43;
                                                                if (v7_3.c == null) {
                                                                    v5_34 = this.i.r().i();
                                                                    v6_40 = "Engagement event does not contain any parameters. appId";
                                                                    v8_43 = com.google.android.gms.c.c.bb.a(v2_7.a.q);
                                                                } else {
                                                                    if (v7_3.c.length != 0) {
                                                                        this.f();
                                                                        com.google.android.gms.c.c.bd v5_30 = ((Long) com.google.android.gms.c.c.fs.b(v7_3, "_et"));
                                                                        if (v5_30 != null) {
                                                                            v14_2 += v5_30.longValue();
                                                                            String v6_41 = (v13_3 + 1);
                                                                            v3_8.d[v13_3] = v7_3;
                                                                            v13_3 = v6_41;
                                                                            v9_13 = (v44 + 1);
                                                                            long v11 = 1;
                                                                        } else {
                                                                            v5_34 = this.i.r().i();
                                                                            v6_40 = "Engagement event does not include duration. appId";
                                                                            v8_43 = com.google.android.gms.c.c.bb.a(v2_7.a.q);
                                                                        }
                                                                    } else {
                                                                    }
                                                                }
                                                                v5_34.a(v6_40, v8_43);
                                                            }
                                                        } else {
                                                            com.google.android.gms.c.c.bd v5_49;
                                                            this.i.r().i().a("Dropping blacklisted raw event. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q), this.i.l().a(v7_3.d));
                                                            if (this.p().e(v2_7.a.q)) {
                                                                v5_49 = 1;
                                                            } else {
                                                                if (!this.p().f(v2_7.a.q)) {
                                                                    v5_49 = 0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v5_49 == null) && (!"_err".equals(v7_3.d))) {
                                                                this.i.k().a(v2_7.a.q, 11, "_ev", v7_3.d, 0);
                                                            }
                                                            v44 = v9_13;
                                                        }
                                                    }
                                                    int v34_3 = v12_9;
                                                    if (v13_3 < v2_7.c.size()) {
                                                        v3_8.d = ((com.google.android.gms.c.c.gk[]) java.util.Arrays.copyOf(v3_8.d, v13_3));
                                                    }
                                                    if (v4_7 != null) {
                                                        Object v4_12;
                                                        Object v4_9 = this.d().c(v3_8.q, "_lte");
                                                        if (v4_9 == null) {
                                                            v4_12 = new com.google.android.gms.c.c.fv;
                                                            v4_12(v3_8.q, "auto", "_lte", this.i.m().a(), Long.valueOf(v14_2));
                                                        } else {
                                                            if (v4_9.e != null) {
                                                                com.google.android.gms.c.c.bd v5_70 = new com.google.android.gms.c.c.fv;
                                                                v5_70(v3_8.q, "auto", "_lte", this.i.m().a(), Long.valueOf((((Long) v4_9.e).longValue() + v14_2)));
                                                                v4_12 = v5_70;
                                                            } else {
                                                            }
                                                        }
                                                        com.google.android.gms.c.c.bd v5_73 = new com.google.android.gms.c.c.gq();
                                                        v5_73.d = "_lte";
                                                        v5_73.c = Long.valueOf(this.i.m().a());
                                                        v5_73.f = ((Long) v4_12.e);
                                                        String v6_80 = 0;
                                                        while (v6_80 < v3_8.e.length) {
                                                            if (!"_lte".equals(v3_8.e[v6_80].d)) {
                                                                v6_80++;
                                                            } else {
                                                                v3_8.e[v6_80] = v5_73;
                                                                String v6_81 = 1;
                                                            }
                                                            if (v6_81 == null) {
                                                                v3_8.e = ((com.google.android.gms.c.c.gq[]) java.util.Arrays.copyOf(v3_8.e, (v3_8.e.length + 1)));
                                                                v3_8.e[(v2_7.a.e.length - 1)] = v5_73;
                                                            }
                                                            if (v14_2 > 0) {
                                                                this.d().a(v4_12);
                                                                this.i.r().v().a("Updated lifetime engagement user property with value. Value", v4_12.e);
                                                            }
                                                        }
                                                        v6_81 = 0;
                                                    }
                                                    v3_8.C = this.a(v3_8.q, v3_8.e, v3_8.d);
                                                    if (this.i.b().d(v2_7.a.q)) {
                                                        Object v4_20 = new java.util.HashMap();
                                                        com.google.android.gms.c.c.bd v5_84 = new com.google.android.gms.c.c.gk[v3_8.d.length];
                                                        String v6_0 = this.i.k().h();
                                                        int v7_0 = v3_8.d;
                                                        com.google.android.gms.c.c.am v8_0 = v7_0.length;
                                                        int v9_1 = 0;
                                                        boolean v10_0 = 0;
                                                        while (v9_1 < v8_0) {
                                                            boolean v48;
                                                            int v47;
                                                            long v63;
                                                            Boolean v12_7;
                                                            long v11_14 = v7_0[v9_1];
                                                            if (!v11_14.d.equals("_ep")) {
                                                                int v7_45;
                                                                Boolean v13_20 = Long.valueOf(1);
                                                                if (android.text.TextUtils.isEmpty("_dbg")) {
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                    v7_45 = 0;
                                                                } else {
                                                                    if (v13_20 != null) {
                                                                        long v14_17 = v11_14.c;
                                                                        Long v15_5 = v14_17.length;
                                                                        v47 = v7_0;
                                                                        int v7_35 = 0;
                                                                        while (v7_35 < v15_5) {
                                                                            v48 = v8_0;
                                                                            com.google.android.gms.c.c.am v8_65 = v14_17[v7_35];
                                                                            if (!"_dbg".equals(v8_65.c)) {
                                                                                v7_35++;
                                                                                v8_0 = v48;
                                                                            } else {
                                                                                if (((!(v13_20 instanceof Long)) || (!v13_20.equals(v8_65.e))) && (((!(v13_20 instanceof String)) || (!v13_20.equals(v8_65.d))) && ((!(v13_20 instanceof Double)) || (!v13_20.equals(v8_65.f))))) {
                                                                                } else {
                                                                                    v7_45 = 1;
                                                                                }
                                                                            }
                                                                        }
                                                                    } else {
                                                                    }
                                                                }
                                                                int v7_46;
                                                                if (v7_45 != 0) {
                                                                    v7_46 = 1;
                                                                } else {
                                                                    v7_46 = this.p().d(v2_7.a.q, v11_14.d);
                                                                }
                                                                int v7_56;
                                                                if (v7_46 > 0) {
                                                                    com.google.android.gms.c.c.am v8_70 = ((com.google.android.gms.c.c.am) v4_20.get(v11_14.d));
                                                                    if (v8_70 == null) {
                                                                        v8_70 = this.d().a(v2_7.a.q, v11_14.d);
                                                                        if (v8_70 == null) {
                                                                            this.i.r().i().a("Event being bundled has no eventAggregate. appId, eventName", v2_7.a.q, v11_14.d);
                                                                            v8_70 = new com.google.android.gms.c.c.am;
                                                                            v8_70(v2_7.a.q, v11_14.d, 1, 1, v11_14.e.longValue(), 0, 0, 0, 0);
                                                                        }
                                                                    }
                                                                    Boolean v13_25;
                                                                    this.f();
                                                                    Boolean v12_52 = ((Long) com.google.android.gms.c.c.fs.b(v11_14, "_eid"));
                                                                    if (v12_52 == null) {
                                                                        v13_25 = 0;
                                                                    } else {
                                                                        v13_25 = 1;
                                                                    }
                                                                    Boolean v13_26 = Boolean.valueOf(v13_25);
                                                                    if (v7_46 != 1) {
                                                                        if (v6_0.nextInt(v7_46) != 0) {
                                                                            v63 = v6_0;
                                                                            if (Math.abs((v11_14.e.longValue() - v8_70.f)) < 86400000) {
                                                                                if (!v13_26.booleanValue()) {
                                                                                    v9_1++;
                                                                                    v7_0 = v47;
                                                                                    v8_0 = v48;
                                                                                    v6_0 = v63;
                                                                                } else {
                                                                                    v4_20.put(v11_14.d, v8_70.a(v12_52, 0, 0));
                                                                                }
                                                                            } else {
                                                                                this.f();
                                                                                v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_efs", Long.valueOf(1));
                                                                                this.f();
                                                                                long v14_30 = ((long) v7_46);
                                                                                v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", Long.valueOf(v14_30));
                                                                                String v6_134 = (v10_0 + 1);
                                                                                v5_84[v10_0] = v11_14;
                                                                                if (v13_26.booleanValue()) {
                                                                                    v8_70 = v8_70.a(0, Long.valueOf(v14_30), Boolean.valueOf(1));
                                                                                }
                                                                                v4_20.put(v11_14.d, v8_70.b(v11_14.e.longValue()));
                                                                                v10_0 = v6_134;
                                                                            }
                                                                        } else {
                                                                            this.f();
                                                                            v63 = v6_0;
                                                                            String v6_135 = ((long) v7_46);
                                                                            v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", Long.valueOf(v6_135));
                                                                            v12_7 = (v10_0 + 1);
                                                                            v5_84[v10_0] = v11_14;
                                                                            if (v13_26.booleanValue()) {
                                                                                v8_70 = v8_70.a(0, Long.valueOf(v6_135), 0);
                                                                            }
                                                                            v4_20.put(v11_14.d, v8_70.b(v11_14.e.longValue()));
                                                                            v10_0 = v12_7;
                                                                        }
                                                                    } else {
                                                                        v7_56 = (v10_0 + 1);
                                                                        v5_84[v10_0] = v11_14;
                                                                        if ((v13_26.booleanValue()) && ((v8_70.g != null) || ((v8_70.h != null) || (v8_70.i != null)))) {
                                                                            v4_20.put(v11_14.d, v8_70.a(0, 0, 0));
                                                                        }
                                                                    }
                                                                } else {
                                                                    this.i.r().i().a("Sample rate must be positive. event, rate", v11_14.d, Integer.valueOf(v7_46));
                                                                    v7_56 = (v10_0 + 1);
                                                                    v5_84[v10_0] = v11_14;
                                                                }
                                                                v63 = v6_0;
                                                                v10_0 = v7_56;
                                                            } else {
                                                                this.f();
                                                                Boolean v12_62 = ((String) com.google.android.gms.c.c.fs.b(v11_14, "_en"));
                                                                Boolean v13_29 = ((com.google.android.gms.c.c.am) v4_20.get(v12_62));
                                                                if (v13_29 == null) {
                                                                    v13_29 = this.d().a(v2_7.a.q, v12_62);
                                                                    v4_20.put(v12_62, v13_29);
                                                                }
                                                                if (v13_29.g != null) {
                                                                    v63 = v6_0;
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                } else {
                                                                    if (v13_29.h.longValue() > 1) {
                                                                        this.f();
                                                                        v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", v13_29.h);
                                                                    }
                                                                    if ((v13_29.i != null) && (v13_29.i.booleanValue())) {
                                                                        this.f();
                                                                        v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_efs", Long.valueOf(1));
                                                                    }
                                                                    v12_7 = (v10_0 + 1);
                                                                    v5_84[v10_0] = v11_14;
                                                                    v63 = v6_0;
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                }
                                                            }
                                                        }
                                                        if (v10_0 < v3_8.d.length) {
                                                            v3_8.d = ((com.google.android.gms.c.c.gk[]) java.util.Arrays.copyOf(v5_84, v10_0));
                                                        }
                                                        Object v4_22 = v4_20.entrySet().iterator();
                                                        while (v4_22.hasNext()) {
                                                            this.d().a(((com.google.android.gms.c.c.am) ((java.util.Map$Entry) v4_22.next()).getValue()));
                                                        }
                                                    }
                                                    v3_8.g = Long.valueOf(nan);
                                                    v3_8.h = Long.valueOf(-0.0);
                                                    Object v4_27 = 0;
                                                    while (v4_27 < v3_8.d.length) {
                                                        com.google.android.gms.c.c.bd v5_117 = v3_8.d[v4_27];
                                                        if (v5_117.e.longValue() < v3_8.g.longValue()) {
                                                            v3_8.g = v5_117.e;
                                                        }
                                                        if (v5_117.e.longValue() > v3_8.h.longValue()) {
                                                            v3_8.h = v5_117.e;
                                                        }
                                                        v4_27++;
                                                    }
                                                    Object v4_29 = v2_7.a.q;
                                                    com.google.android.gms.c.c.bd v5_91 = this.d().b(v4_29);
                                                    if (v5_91 != null) {
                                                        if (v3_8.d.length > 0) {
                                                            com.google.android.gms.c.c.am v8_57;
                                                            String v6_94 = v5_91.h();
                                                            if (v6_94 == 0) {
                                                                v8_57 = 0;
                                                            } else {
                                                                v8_57 = Long.valueOf(v6_94);
                                                            }
                                                            v3_8.j = v8_57;
                                                            com.google.android.gms.c.c.am v8_58 = v5_91.g();
                                                            if (v8_58 != 0) {
                                                                v6_94 = v8_58;
                                                            } else {
                                                            }
                                                            String v6_95;
                                                            if (v6_94 == 0) {
                                                                v6_95 = 0;
                                                            } else {
                                                                v6_95 = Long.valueOf(v6_94);
                                                            }
                                                            v3_8.i = v6_95;
                                                            v5_91.r();
                                                            v3_8.y = Integer.valueOf(((int) v5_91.o()));
                                                            v5_91.a(v3_8.g.longValue());
                                                            v5_91.b(v3_8.h.longValue());
                                                            v3_8.z = v5_91.z();
                                                            this.d().a(v5_91);
                                                        }
                                                    } else {
                                                        this.i.r().k_().a("Bundling raw events w/o app info. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                    }
                                                    if (v3_8.d.length > 0) {
                                                        com.google.android.gms.c.c.bd v5_100;
                                                        this.i.u();
                                                        com.google.android.gms.c.c.bd v5_99 = this.p().a(v2_7.a.q);
                                                        if (v5_99 == null) {
                                                            if (!android.text.TextUtils.isEmpty(v2_7.a.A)) {
                                                                this.i.r().i().a("Did not find measurement config or missing version info. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                            } else {
                                                                v5_100 = Long.valueOf(-1);
                                                                v3_8.G = v5_100;
                                                            }
                                                        } else {
                                                            if (v5_99.c != null) {
                                                                v5_100 = v5_99.c;
                                                            } else {
                                                            }
                                                        }
                                                        this.d().a(v3_8, v34_3);
                                                    }
                                                    android.database.sqlite.SQLiteException v3_12 = this.d();
                                                    com.google.android.gms.c.c.bd v2_8 = v2_7.b;
                                                    com.google.android.gms.common.internal.z.a(v2_8);
                                                    v3_12.d();
                                                    v3_12.I();
                                                    com.google.android.gms.c.c.bd v5_110 = new StringBuilder("rowid in (");
                                                    String v6_111 = 0;
                                                    while (v6_111 < v2_8.size()) {
                                                        if (v6_111 != null) {
                                                            v5_110.append(",");
                                                        }
                                                        v5_110.append(((Long) v2_8.get(v6_111)).longValue());
                                                        v6_111++;
                                                    }
                                                    v5_110.append(")");
                                                    com.google.android.gms.c.c.bd v5_112 = v3_12.i().delete("raw_events", v5_110.toString(), 0);
                                                    if (v5_112 != v2_8.size()) {
                                                        v3_12.r().k_().a("Deleted fewer rows from raw events table than expected", Integer.valueOf(v5_112), Integer.valueOf(v2_8.size()));
                                                    }
                                                    com.google.android.gms.c.c.bd v2_11 = this.d();
                                                    android.database.sqlite.SQLiteException v3_15 = v2_11.i();
                                                    try {
                                                        String v6_117 = new String[2];
                                                        v6_117[0] = v4_29;
                                                        v6_117[1] = v4_29;
                                                        v3_15.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v6_117);
                                                    } catch (android.database.sqlite.SQLiteException v0_10) {
                                                        v2_11.r().k_().a("Failed to remove unused event metadata. appId", com.google.android.gms.c.c.bb.a(v4_29), v0_10);
                                                    }
                                                    this.d().g();
                                                    this.d().h();
                                                    return 1;
                                                }
                                            } else {
                                                v9_0.close();
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                        }
                                        if (v15_1.moveToNext()) {
                                            v4_31.r().i().a("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                        }
                                        com.google.android.gms.c.c.bd v5_56;
                                        String[] v16_2;
                                        v15_1.close();
                                        v2_7.a(v13_6);
                                        if (v5_123 == -1) {
                                            v5_56 = "app_id = ? and metadata_fingerprint = ?";
                                            int v9_16 = new String[2];
                                            v9_16[0] = v3_0;
                                            v9_16[1] = v22;
                                            v16_2 = v9_16;
                                        } else {
                                            Boolean v12_22 = new String[3];
                                            v12_22[0] = v3_0;
                                            v12_22[1] = v22;
                                            v12_22[2] = String.valueOf(v5_123);
                                            v5_56 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v16_2 = v12_22;
                                        }
                                        v9_0 = v15_1;
                                        com.google.android.gms.c.c.bd v5_58 = v25.query("raw_events", new String[] {"rowid", "name", "timestamp", "data"}), v5_56, v16_2, 0, 0, "rowid", 0);
                                        try {
                                            if (v5_58.moveToFirst()) {
                                                do {
                                                    Boolean v12_26 = v5_58.getLong(0);
                                                    int v9_20 = v5_58.getBlob(3);
                                                    int v9_21 = com.google.android.gms.c.c.a.a(v9_20, 0, v9_20.length);
                                                    long v14_9 = new com.google.android.gms.c.c.gk();
                                                    v14_9.a(v9_21);
                                                    v14_9.d = v5_58.getString(1);
                                                    v14_9.e = Long.valueOf(v5_58.getLong(2));
                                                    if (v2_7.a(v12_26, v14_9)) {
                                                    } else {
                                                        if (v5_58 == null) {
                                                        } else {
                                                        }
                                                    }
                                                } while(v5_58.moveToNext());
                                                if (v5_58 == null) {
                                                }
                                            } else {
                                                v4_31.r().i().a("Raw event data disappeared while in transaction. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                                if (v5_58 == null) {
                                                }
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_8) {
                                            com.google.android.gms.c.c.bd v2_0 = v0_8;
                                            int v21 = v5_58;
                                            if (v21 != 0) {
                                                v21.close();
                                            }
                                            throw v2_0;
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            Boolean v12_5 = v3_0;
                                            v9_0 = v5_58;
                                            android.database.sqlite.SQLiteException v3_3 = v0_1;
                                            v4_31.r().k_().a("Data loss. Error selecting raw event. appId", com.google.android.gms.c.c.bb.a(v12_5), v3_3);
                                            if (v9_0 == 0) {
                                            }
                                        }
                                        v5_58.close();
                                    } else {
                                        v4_31.r().k_().a("Raw event metadata record is missing. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                        if (v15_1 == null) {
                                        } else {
                                            v15_1.close();
                                        }
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_6) {
                                    v9_0 = v15_1;
                                    v2_0 = v0_6;
                                    v21 = v9_0;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v9_0 = v15_1;
                                } catch (android.database.sqlite.SQLiteException v0_9) {
                                    v2_0 = v0_9;
                                    v21 = v15_1;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v12_5 = v3_0;
                                    v9_0 = v15_1;
                                }
                                v12_5 = v3_0;
                            } catch (android.database.sqlite.SQLiteException v0_4) {
                                v2_0 = v0_4;
                                v21 = v23;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v12_5 = v3_0;
                                v9_0 = v23;
                            }
                        } else {
                            if (v3_0 == null) {
                            } else {
                            }
                        }
                    } else {
                        Boolean v13_18;
                        Boolean v12_39 = v5_123 cmp -1;
                        try {
                            if (v12_39 == null) {
                                v13_18 = new String[1];
                                v13_18[0] = String.valueOf(p66);
                            } else {
                                v13_18 = new String[2];
                                v13_18[0] = String.valueOf(v5_123);
                                v13_18[1] = String.valueOf(p66);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_1) {
                            v9_0 = 0;
                            v12_5 = 0;
                        }
                        Boolean v12_43;
                        if (v12_39 == null) {
                            v12_43 = "";
                        } else {
                            v12_43 = "rowid <= ? and ";
                        }
                        android.database.sqlite.SQLiteException v3_18 = new StringBuilder((String.valueOf(v12_43).length() + 148));
                        v3_18.append("select app_id, metadata_fingerprint from raw_events where ");
                        v3_18.append(v12_43);
                        v3_18.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v3_18.toString(), v13_18);
                        if (v3_0.moveToFirst()) {
                            v12_5 = v3_0.getString(0);
                            try {
                                Boolean v13_1 = v3_0.getString(1);
                                v3_0.close();
                                v23 = v3_0;
                                v3_0 = v12_5;
                                v22 = v13_1;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v9_0 = v3_0;
                            }
                        } else {
                            if (v3_0 == null) {
                            }
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_2) {
                    v2_0 = v0_2;
                    v21 = v3_0;
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    v9_0 = v3_0;
                    v12_5 = 0;
                }
                v3_0.close();
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v2_0 = v0_0;
                v21 = 0;
            } catch (android.database.sqlite.SQLiteException v0_11) {
                v3_3 = v0_11;
                v9_0 = 0;
                v12_5 = 0;
            } catch (android.database.sqlite.SQLiteException v0_6) {
            }
        } catch (android.database.sqlite.SQLiteException v0_3) {
            com.google.android.gms.c.c.bd v2_1 = v0_3;
            this.d().h();
            throw v2_1;
        }
    }

Method com.google.android.gms.c.c.ah.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    static void a(com.google.android.gms.c.c.bb p5, android.database.sqlite.SQLiteDatabase p6, String p7, String p8, String p9, String[] p10)
    {
        if (p5 == null) {
            throw new IllegalArgumentException("Monitor must not be null");
        } else {
            if (!ark>com.google.android.gms.c.c.ahark>.a(p5, p6, p7)) {
                p6.execSQL(p8);
            }
            try {
                if (p5 == null) {
                    throw new IllegalArgumentException("Monitor must not be null");
                } else {
                    String v8_2 = ark>com.google.android.gms.c.c.ahark>.a(p6, p7);
                    String v9_1 = p9.split(",");
                    int v1 = 0;
                    int v2 = 0;
                    while (v2 < v9_1.length) {
                        String v3 = v9_1[v2];
                        if (!v8_2.remove(v3)) {
                            String v9_11 = new StringBuilder(((String.valueOf(p7).length() + 35) + String.valueOf(v3).length()));
                            v9_11.append("Table ");
                            v9_11.append(p7);
                            v9_11.append(" is missing required column: ");
                            v9_11.append(v3);
                            throw new android.database.sqlite.SQLiteException(v9_11.toString());
                        } else {
                            v2++;
                        }
                    }
                    if (p10 != null) {
                        while (v1 < p10.length) {
                            if (!v8_2.remove(p10[v1])) {
                                p6.execSQL(p10[(v1 + 1)]);
                            }
                            v1 += 2;
                        }
                    }
                    if (!v8_2.isEmpty()) {
                        p5.i().a("Table has extra columns. table, columns", p7, android.text.TextUtils.join(", ", v8_2));
                    }
                    return;
                }
            } catch (com.google.android.gms.c.c.bd v6_8) {
                p5.k_().a("Failed to verify columns on table that was just created", p7);
                throw v6_8;
            }
        }
    }

Method com.google.android.gms.c.c.ax.a() calling method android.database.sqlite.SQLiteDatabase.delete()

Couldn't retrieve source code

Method com.google.android.gms.c.c.ax.B() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void B()
    {
        this.b();
        this.d();
        try {
            Integer v0_4 = (this.C().delete("messages", 0, 0) + 0);
        } catch (Integer v0_1) {
            this.r().k_().a("Error resetting local analytics data. error", v0_1);
            return;
        }
        if (v0_4 > null) {
            this.r().w().a("Reset local analytics data. records", Integer.valueOf(v0_4));
        }
        return;
    }

Method com.google.android.gms.c.c.ax.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final boolean a(int p18, byte[] p19)
    {
        this.b();
        this.d();
        Long v2_5 = 0;
        if (!this.b) {
            android.content.ContentValues v3_1 = new android.content.ContentValues();
            v3_1.put("type", Integer.valueOf(p18));
            v3_1.put("entry", p19);
            Long v4_4 = 5;
            int v5 = 0;
            int v6 = 5;
            while (v5 < v4_4) {
                int v7 = 0;
                try {
                    int v9 = this.C();
                    try {
                        if (v9 != 0) {
                            v9.beginTransaction();
                            Long v10_1 = 0;
                            int v12 = v9.rawQuery("select count(1) from messages", 0);
                            try {
                                if ((v12 != 0) && (v12.moveToFirst())) {
                                    v10_1 = v12.getLong(v2_5);
                                }
                                if (v10_1 >= 100000) {
                                    this.r().k_().a("Data loss, local db full");
                                    long v13_2 = ((100000 - v10_1) + 1);
                                    String[] v11 = new String[1];
                                    v11[v2_5] = Long.toString(v13_2);
                                    Long v10_4 = ((long) v9.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v11));
                                    if (v10_4 != v13_2) {
                                        this.r().k_().a("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v13_2), Long.valueOf(v10_4), Long.valueOf((v13_2 - v10_4)));
                                    }
                                }
                                v9.insertOrThrow("messages", 0, v3_1);
                                v9.setTransactionSuccessful();
                                v9.endTransaction();
                                if (v12 != 0) {
                                    v12.close();
                                }
                                if (v9 != 0) {
                                    v9.close();
                                }
                                return 1;
                            } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                                v7 = v12;
                                android.os.SystemClock.sleep(((long) v6));
                                v6 += 20;
                                if (v7 != 0) {
                                    v7.close();
                                }
                                if (v9 == 0) {
                                    v5++;
                                    v2_5 = 0;
                                    v4_4 = 5;
                                } else {
                                    v9.close();
                                }
                            }
                        } else {
                            this.b = 1;
                            if (v9 != 0) {
                                v9.close();
                            }
                            return v2_5;
                        }
                        v7 = v9;
                        if (v7 != 0) {
                            if (v7.inTransaction()) {
                                v7.endTransaction();
                            }
                        }
                        this.r().k_().a("Error writing entry to local database", com.google.android.gms.c.c.bd v0_0);
                        this.b = 1;
                        if (v12 != 0) {
                            v12.close();
                        }
                        if (v7 == 0) {
                        } else {
                            v7.close();
                        }
                    } catch (com.google.android.gms.c.c.bd v0_3) {
                        this.r().k_().a("Error writing entry to local database", v0_3);
                        this.b = 1;
                        if (v7 != 0) {
                            v7.close();
                        }
                        if (v9 == 0) {
                        }
                    } catch (com.google.android.gms.c.c.bd v0_0) {
                        v12 = 0;
                    }
                } catch (com.google.android.gms.c.c.bd v0_1) {
                    v9 = 0;
                    v12 = 0;
                    if (v12 != 0) {
                        v12.close();
                    }
                    if (v9 != 0) {
                        v9.close();
                    }
                    throw v0_1;
                } catch (com.google.android.gms.c.c.bd v0_3) {
                    v9 = 0;
                } catch (android.database.sqlite.SQLiteDatabaseLockedException) {
                    v9 = 0;
                } catch (com.google.android.gms.c.c.bd v0_0) {
                    v12 = 0;
                } catch (com.google.android.gms.c.c.bd v0_1) {
                    v12 = v7;
                }
            }
            this.r().i().a("Failed to write entry to local database");
            return 0;
        } else {
            return 0;
        }
    }

Method com.google.android.gms.c.c.ad.v() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void v()
    {
        this.d();
        this.I();
        if (this.K()) {
            Integer v0_12 = this.s().f.a();
            String v2_1 = this.m().b();
            if (Math.abs((v2_1 - v0_12)) > ((Long) com.google.android.gms.c.c.as.G.b()).longValue()) {
                this.s().f.a(v2_1);
                this.d();
                this.I();
                if (this.K()) {
                    Integer v0_7 = this.i();
                    com.google.android.gms.c.c.bd v1_1 = new String[2];
                    v1_1[0] = String.valueOf(this.m().a());
                    v1_1[1] = String.valueOf(com.google.android.gms.c.c.aa.j());
                    Integer v0_8 = v0_7.delete("queue", "abs(bundle_end_timestamp - ?) > cast(? as integer)", v1_1);
                    if (v0_8 > null) {
                        this.r().w().a("Deleted stale rows. rowsDeleted", Integer.valueOf(v0_8));
                    }
                }
            }
            return;
        } else {
            return;
        }
    }

Method com.google.android.gms.c.c.ad.e() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final int e(String p7, String p8)
    {
        com.google.android.gms.common.internal.z.a(p7);
        com.google.android.gms.common.internal.z.a(p8);
        this.d();
        this.I();
        try {
            android.database.sqlite.SQLiteException v1_2 = this.i();
            com.google.android.gms.c.c.az v4_0 = new String[2];
            v4_0[0] = p7;
            v4_0[1] = p8;
            return v1_2.delete("conditional_properties", "app_id=? and name=?", v4_0);
        } catch (android.database.sqlite.SQLiteException v1_1) {
            this.r().k_().a("Error deleting conditional property", com.google.android.gms.c.c.bb.a(p7), this.o().c(p8), v1_1);
            return 0;
        }
    }

Method com.google.android.gms.c.c.ad.c() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final long c(String p7)
    {
        com.google.android.gms.common.internal.z.a(p7);
        this.d();
        this.I();
        try {
            long v0_4 = this.i();
            com.google.android.gms.c.c.bd v1_2 = String.valueOf(Math.max(0, Math.min(1000000, this.t().b(p7, com.google.android.gms.c.c.as.x))));
            String[] v5_1 = new String[2];
            v5_1[0] = p7;
            v5_1[1] = v1_2;
            return ((long) v0_4.delete("raw_events", "rowid in (select rowid from raw_events where app_id=? order by rowid desc limit -1 offset ?)", v5_1));
        } catch (long v0_2) {
            this.r().k_().a("Error deleting over the limit events. appId", com.google.android.gms.c.c.bb.a(p7), v0_2);
            return 0;
        }
    }

Method com.google.android.gms.c.c.ad.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void b(String p6, String p7)
    {
        com.google.android.gms.common.internal.z.a(p6);
        com.google.android.gms.common.internal.z.a(p7);
        this.d();
        this.I();
        try {
            android.database.sqlite.SQLiteException v0_3 = this.i();
            com.google.android.gms.c.c.az v3_2 = new String[2];
            v3_2[0] = p6;
            v3_2[1] = p7;
            this.r().w().a("Deleted user attribute rows", Integer.valueOf(v0_3.delete("user_attributes", "app_id=? and name=?", v3_2)));
            return;
        } catch (android.database.sqlite.SQLiteException v0_2) {
            this.r().k_().a("Error deleting user attribute. appId", com.google.android.gms.c.c.bb.a(p6), this.o().c(p7), v0_2);
            return;
        }
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void a(String p13, com.google.android.gms.c.c.fz[] p14)
    {
        this.I();
        this.d();
        com.google.android.gms.common.internal.z.a(p13);
        com.google.android.gms.common.internal.z.a(p14);
        android.database.sqlite.SQLiteDatabase v0 = this.i();
        v0.beginTransaction();
        try {
            this.I();
            this.d();
            com.google.android.gms.common.internal.z.a(p13);
            java.util.ArrayList v1_0 = this.i();
            String v5_5 = new String[1];
            int v6 = 0;
            v5_5[0] = p13;
            v1_0.delete("property_filters", "app_id=?", v5_5);
            String v5_6 = new String[1];
            v5_6[0] = p13;
            v1_0.delete("event_filters", "app_id=?", v5_6);
            java.util.ArrayList v1_1 = p14.length;
            int v2_1 = 0;
        } catch (Throwable v13_1) {
            v0.endTransaction();
            throw v13_1;
        }
        while (v2_1 < v1_1) {
            android.database.sqlite.SQLiteDatabase v3_7 = p14[v2_1];
            this.I();
            this.d();
            com.google.android.gms.common.internal.z.a(p13);
            com.google.android.gms.common.internal.z.a(v3_7);
            com.google.android.gms.common.internal.z.a(v3_7.e);
            com.google.android.gms.common.internal.z.a(v3_7.d);
            if (v3_7.c != null) {
                String v5_11 = v3_7.c.intValue();
                int v7_2 = v3_7.e;
                int v9_2 = 0;
                while (v9_2 < v7_2.length) {
                    if (v7_2[v9_2].c != null) {
                        v9_2++;
                    } else {
                        String v5_2 = this.r().i();
                        int v7_0 = "Event filter with no ID. Audience definition ignored. appId, audienceId";
                        String v8_0 = com.google.android.gms.c.c.bb.a(p13);
                        android.database.sqlite.SQLiteDatabase v3_0 = v3_7.c;
                    }
                    v5_2.a(v7_0, v8_0, v3_0);
                }
                int v7_3 = v3_7.d;
                int v9_1 = 0;
                while (v9_1 < v7_3.length) {
                    if (v7_3[v9_1].c != null) {
                        v9_1++;
                    } else {
                        v5_2 = this.r().i();
                        v7_0 = "Property filter with no ID. Audience definition ignored. appId, audienceId";
                        v8_0 = com.google.android.gms.c.c.bb.a(p13);
                        v3_0 = v3_7.c;
                    }
                }
                int v7_4 = v3_7.e;
                int v9_3 = 0;
                while (v9_3 < v7_4.length) {
                    if (this.a(p13, v5_11, v7_4[v9_3])) {
                        v9_3++;
                    } else {
                        int v7_5 = 0;
                    }
                    if (v7_5 != 0) {
                        android.database.sqlite.SQLiteDatabase v3_8 = v3_7.d;
                        int v9_4 = 0;
                        while (v9_4 < v3_8.length) {
                            if (this.a(p13, v5_11, v3_8[v9_4])) {
                                v9_4++;
                            } else {
                                v7_5 = 0;
                                break;
                            }
                        }
                    }
                    if (v7_5 != 0) {
                        v2_1++;
                    } else {
                        this.I();
                        this.d();
                        com.google.android.gms.common.internal.z.a(p13);
                        android.database.sqlite.SQLiteDatabase v3_9 = this.i();
                        boolean v10_8 = new String[2];
                        v10_8[0] = p13;
                        v10_8[1] = String.valueOf(v5_11);
                        v3_9.delete("property_filters", "app_id=? and audience_id=?", v10_8);
                        int v9_0 = new String[2];
                        v9_0[0] = p13;
                        v9_0[1] = String.valueOf(v5_11);
                        v3_9.delete("event_filters", "app_id=? and audience_id=?", v9_0);
                    }
                }
                v7_5 = 1;
            } else {
                this.r().i().a("Audience with no ID. appId", com.google.android.gms.c.c.bb.a(p13));
            }
        }
        java.util.ArrayList v1_3 = new java.util.ArrayList();
        int v2_3 = p14.length;
        while (v6 < v2_3) {
            v1_3.add(p14[v6].c);
            v6++;
        }
        this.a(p13, v1_3);
        v0.setTransactionSuccessful();
        v0.endTransaction();
        return;
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final boolean a(String p9, java.util.List p10)
    {
        com.google.android.gms.common.internal.z.a(p9);
        this.I();
        this.d();
        com.google.android.gms.c.c.bd v0_2 = this.i();
        try {
            String v4_9 = new String[1];
            v4_9[0] = p9;
            String v4_0 = this.b("select count(1) from audience_filter_values where app_id=?", v4_9);
            String v2_3 = Math.max(0, Math.min(2000, this.t().b(p9, com.google.android.gms.c.c.as.N)));
        } catch (String v10_1) {
            this.r().k_().a("Database error querying filters. appId", com.google.android.gms.c.c.bb.a(p9), v10_1);
            return 0;
        }
        if (v4_0 > ((long) v2_3)) {
            String v4_3 = new java.util.ArrayList();
            int v5_0 = 0;
            while (v5_0 < p10.size()) {
                String v6_11 = ((Integer) p10.get(v5_0));
                if ((v6_11 != null) && ((v6_11 instanceof Integer))) {
                    v4_3.add(Integer.toString(v6_11.intValue()));
                    v5_0++;
                } else {
                    return 0;
                }
            }
            String v10_3 = android.text.TextUtils.join(",", v4_3);
            String v6_5 = new StringBuilder((String.valueOf(v10_3).length() + 2));
            v6_5.append("(");
            v6_5.append(v10_3);
            v6_5.append(")");
            String v10_5 = v6_5.toString();
            boolean v7_1 = new StringBuilder((String.valueOf(v10_5).length() + 140));
            v7_1.append("audience_id in (select audience_id from audience_filter_values where app_id=? and audience_id not in ");
            v7_1.append(v10_5);
            v7_1.append(" order by rowid desc limit -1 offset ?)");
            String v10_7 = v7_1.toString();
            int v5_2 = new String[2];
            v5_2[0] = p9;
            v5_2[1] = Integer.toString(v2_3);
            if (v0_2.delete("audience_filter_values", v10_7, v5_2) <= 0) {
                return 0;
            } else {
                return 1;
            }
        } else {
            return 0;
        }
    }

Method com.google.android.gms.c.c.fm.c() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void c(com.google.android.gms.c.c.u p19)
    {
        void v18_1 = this.v();
        v18_1.i();
        com.google.android.gms.common.internal.z.a(p19);
        com.google.android.gms.common.internal.z.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_3 = v18_1.d().b(p19.a);
            if ((v0_3 != null) && ((android.text.TextUtils.isEmpty(v0_3.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_3.g(0);
                v18_1.d().a(v0_3);
                v18_1.p().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.i.m().a();
                }
                android.os.Bundle v15_3;
                String v0_64 = p19.n;
                if ((v0_64 == null) || (v0_64 == 1)) {
                    v15_3 = v0_64;
                } else {
                    this.i.r().i().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.c.c.bb.a(p19.a), Integer.valueOf(v0_64));
                    v15_3 = 0;
                }
                v18_1.d().f();
                try {
                    String v0_7 = v18_1.d().b(p19.a);
                } catch (String v0_66) {
                    v18_1.d().h();
                    throw v0_66;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.i.r().i().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.c.c.bb.a(v0_7.b()));
                    com.google.android.gms.c.c.ft v7_46 = v18_1.d();
                    String v8_21 = v0_7.b();
                    v7_46.I();
                    v7_46.d();
                    com.google.android.gms.common.internal.z.a(v8_21);
                    try {
                        String v0_0 = v7_46.i();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_21;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_46.r().k_().a("Error deleting application data. appId, error", com.google.android.gms.c.c.bb.a(v8_21), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_46.r().w().a("Deleted application data. app, records", v8_21, Integer.valueOf(v10_10));
                    }
                }
                if (v0_7 != null) {
                    String v0_9;
                    if (v0_7.j() == -2147483648) {
                        if ((v0_7.i() == null) || (v0_7.i().equals(p19.c))) {
                            String v8_6;
                            String v0_11;
                            com.google.android.gms.c.c.ft v7_15;
                            String v0_12;
                            v18_1.e(p19);
                            if (v15_3 != null) {
                                if (v15_3 != 1) {
                                    v0_11 = 0;
                                } else {
                                    v0_12 = v18_1.d();
                                    v7_15 = p19.a;
                                    v8_6 = "_v";
                                    v0_11 = v0_12.a(v7_15, v8_6);
                                }
                            } else {
                                v0_12 = v18_1.d();
                                v7_15 = p19.a;
                                v8_6 = "_f";
                            }
                            com.google.android.gms.c.c.ft v3_2;
                            if (v0_11 != null) {
                                if (p19.i) {
                                    v3_2 = new com.google.android.gms.c.c.aq;
                                    v3_2("_cd", new com.google.android.gms.c.c.an(new android.os.Bundle()), "auto", v5_6);
                                    this.a(v3_2, p19);
                                }
                            } else {
                                Long v13_0;
                                long v9_13 = (((v5_6 / 3600000) + 1) * 3600000);
                                if (v15_3 != null) {
                                    v13_0 = 1;
                                    if (v15_3 == 1) {
                                        String v0_16 = new com.google.android.gms.c.c.ft;
                                        v0_16("_fvt", v5_6, Long.valueOf(v9_13), "auto");
                                        this.a(v0_16, p19);
                                        v18_1 = v18_1.v();
                                        v18_1.i();
                                        String v0_18 = new android.os.Bundle();
                                        v0_18.putLong("_c", 1);
                                        v0_18.putLong("_r", 1);
                                        if ((this.i.b().k(p19.a)) && (p19.q)) {
                                            v0_18.putLong("_dac", 1);
                                        }
                                        com.google.android.gms.c.c.ft v3_11 = new com.google.android.gms.c.c.aq;
                                        v3_11("_v", new com.google.android.gms.c.c.an(v0_18), "auto", v5_6);
                                        this.a(v3_11, p19);
                                    }
                                } else {
                                    String v0_19 = new com.google.android.gms.c.c.ft;
                                    v13_0 = 1;
                                    v0_19("_fot", v5_6, Long.valueOf(v9_13), "auto");
                                    this.a(v0_19, p19);
                                    v18_1 = v18_1.v();
                                    v18_1.i();
                                    android.os.Bundle v15_2 = new android.os.Bundle();
                                    v15_2.putLong("_c", 1);
                                    v15_2.putLong("_r", 1);
                                    v15_2.putLong("_uwa", 0);
                                    v15_2.putLong("_pfo", 0);
                                    v15_2.putLong("_sys", 0);
                                    v15_2.putLong("_sysu", 0);
                                    if ((this.i.b().k(p19.a)) && (p19.q)) {
                                        v15_2.putLong("_dac", 1);
                                    }
                                    if (this.i.n().getPackageManager() != null) {
                                        try {
                                            String v0_38 = com.google.android.gms.common.b.c.b(this.i.n()).b(p19.a, 0);
                                        } catch (String v0_39) {
                                            this.i.r().k_().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a), v0_39);
                                            v0_38 = 0;
                                        }
                                        if ((v0_38 != null) && (v0_38.firstInstallTime != 0)) {
                                            String v0_42;
                                            if (v0_38.firstInstallTime == v0_38.lastUpdateTime) {
                                                v0_42 = 1;
                                            } else {
                                                v15_2.putLong("_uwa", 1);
                                                v0_42 = 0;
                                            }
                                            long v9_21;
                                            String v12_10 = new com.google.android.gms.c.c.ft;
                                            if (v0_42 == null) {
                                                v9_21 = 0;
                                            } else {
                                                v9_21 = 1;
                                            }
                                            com.google.android.gms.c.c.ft v3_12 = v12_10;
                                            v12_10("_fi", v5_6, Long.valueOf(v9_21), "auto");
                                            this.a(v3_12, p19);
                                        }
                                        try {
                                            String v0_49 = com.google.android.gms.common.b.c.b(this.i.n()).a(p19.a, 0);
                                        } catch (String v0_50) {
                                            this.i.r().k_().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a), v0_50);
                                            v0_49 = 0;
                                        }
                                        if (v0_49 != null) {
                                            if ((v0_49.flags & 1) != 0) {
                                                v15_2.putLong("_sys", 1);
                                            }
                                            if ((v0_49.flags & 128) != 0) {
                                                v15_2.putLong("_sysu", 1);
                                            }
                                        }
                                    } else {
                                        this.i.r().k_().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a));
                                    }
                                    String v0_59 = v18_1.d();
                                    com.google.android.gms.c.c.ft v3_20 = p19.a;
                                    com.google.android.gms.common.internal.z.a(v3_20);
                                    v0_59.d();
                                    v0_59.I();
                                    com.google.android.gms.c.c.ft v3_21 = v0_59.h(v3_20, "first_open_count");
                                    if (v3_21 >= 0) {
                                        v15_2.putLong("_pfo", v3_21);
                                    }
                                    String v0_62 = new com.google.android.gms.c.c.aq;
                                    v0_62("_f", new com.google.android.gms.c.c.an(v15_2), "auto", v5_6);
                                    this.a(v0_62, p19);
                                }
                                String v0_65 = new android.os.Bundle();
                                v0_65.putLong("_et", v13_0);
                                v3_2 = new com.google.android.gms.c.c.aq;
                                v3_2("_e", new com.google.android.gms.c.c.an(v0_65), "auto", v5_6);
                            }
                            v18_1.d().g();
                            v18_1.d().h();
                            return;
                        } else {
                            com.google.android.gms.c.c.ft v7_8 = new android.os.Bundle();
                            v7_8.putString("_pv", v0_7.i());
                            v0_9 = new com.google.android.gms.c.c.aq;
                            v0_9("_au", new com.google.android.gms.c.c.an(v7_8), "auto", v5_6);
                        }
                    } else {
                        if (v0_7.j() == p19.j) {
                        } else {
                            com.google.android.gms.c.c.ft v7_13 = new android.os.Bundle();
                            v7_13.putString("_pv", v0_7.i());
                            v0_9 = new com.google.android.gms.c.c.aq;
                            v0_9("_au", new com.google.android.gms.c.c.an(v7_13), "auto", v5_6);
                        }
                    }
                    this.a(v0_9, p19);
                }
            } else {
                v18_1.e(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.c.c.fm.c() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void c(com.google.android.gms.c.c.u p19)
    {
        void v18_1 = this.v();
        v18_1.i();
        com.google.android.gms.common.internal.z.a(p19);
        com.google.android.gms.common.internal.z.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_3 = v18_1.d().b(p19.a);
            if ((v0_3 != null) && ((android.text.TextUtils.isEmpty(v0_3.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_3.g(0);
                v18_1.d().a(v0_3);
                v18_1.p().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.i.m().a();
                }
                android.os.Bundle v15_3;
                String v0_64 = p19.n;
                if ((v0_64 == null) || (v0_64 == 1)) {
                    v15_3 = v0_64;
                } else {
                    this.i.r().i().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.c.c.bb.a(p19.a), Integer.valueOf(v0_64));
                    v15_3 = 0;
                }
                v18_1.d().f();
                try {
                    String v0_7 = v18_1.d().b(p19.a);
                } catch (String v0_66) {
                    v18_1.d().h();
                    throw v0_66;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.i.r().i().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.c.c.bb.a(v0_7.b()));
                    com.google.android.gms.c.c.ft v7_46 = v18_1.d();
                    String v8_21 = v0_7.b();
                    v7_46.I();
                    v7_46.d();
                    com.google.android.gms.common.internal.z.a(v8_21);
                    try {
                        String v0_0 = v7_46.i();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_21;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_46.r().k_().a("Error deleting application data. appId, error", com.google.android.gms.c.c.bb.a(v8_21), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_46.r().w().a("Deleted application data. app, records", v8_21, Integer.valueOf(v10_10));
                    }
                }
                if (v0_7 != null) {
                    String v0_9;
                    if (v0_7.j() == -2147483648) {
                        if ((v0_7.i() == null) || (v0_7.i().equals(p19.c))) {
                            com.google.android.gms.c.c.ft v7_15;
                            String v0_12;
                            String v0_11;
                            String v8_6;
                            v18_1.e(p19);
                            if (v15_3 != null) {
                                if (v15_3 != 1) {
                                    v0_11 = 0;
                                } else {
                                    v0_12 = v18_1.d();
                                    v7_15 = p19.a;
                                    v8_6 = "_v";
                                    v0_11 = v0_12.a(v7_15, v8_6);
                                }
                            } else {
                                v0_12 = v18_1.d();
                                v7_15 = p19.a;
                                v8_6 = "_f";
                            }
                            com.google.android.gms.c.c.ft v3_2;
                            if (v0_11 != null) {
                                if (p19.i) {
                                    v3_2 = new com.google.android.gms.c.c.aq;
                                    v3_2("_cd", new com.google.android.gms.c.c.an(new android.os.Bundle()), "auto", v5_6);
                                    this.a(v3_2, p19);
                                }
                            } else {
                                Long v13_0;
                                long v9_13 = (((v5_6 / 3600000) + 1) * 3600000);
                                if (v15_3 != null) {
                                    v13_0 = 1;
                                    if (v15_3 == 1) {
                                        String v0_16 = new com.google.android.gms.c.c.ft;
                                        v0_16("_fvt", v5_6, Long.valueOf(v9_13), "auto");
                                        this.a(v0_16, p19);
                                        v18_1 = v18_1.v();
                                        v18_1.i();
                                        String v0_18 = new android.os.Bundle();
                                        v0_18.putLong("_c", 1);
                                        v0_18.putLong("_r", 1);
                                        if ((this.i.b().k(p19.a)) && (p19.q)) {
                                            v0_18.putLong("_dac", 1);
                                        }
                                        com.google.android.gms.c.c.ft v3_11 = new com.google.android.gms.c.c.aq;
                                        v3_11("_v", new com.google.android.gms.c.c.an(v0_18), "auto", v5_6);
                                        this.a(v3_11, p19);
                                    }
                                } else {
                                    String v0_19 = new com.google.android.gms.c.c.ft;
                                    v13_0 = 1;
                                    v0_19("_fot", v5_6, Long.valueOf(v9_13), "auto");
                                    this.a(v0_19, p19);
                                    v18_1 = v18_1.v();
                                    v18_1.i();
                                    android.os.Bundle v15_2 = new android.os.Bundle();
                                    v15_2.putLong("_c", 1);
                                    v15_2.putLong("_r", 1);
                                    v15_2.putLong("_uwa", 0);
                                    v15_2.putLong("_pfo", 0);
                                    v15_2.putLong("_sys", 0);
                                    v15_2.putLong("_sysu", 0);
                                    if ((this.i.b().k(p19.a)) && (p19.q)) {
                                        v15_2.putLong("_dac", 1);
                                    }
                                    if (this.i.n().getPackageManager() != null) {
                                        try {
                                            String v0_38 = com.google.android.gms.common.b.c.b(this.i.n()).b(p19.a, 0);
                                        } catch (String v0_39) {
                                            this.i.r().k_().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a), v0_39);
                                            v0_38 = 0;
                                        }
                                        if ((v0_38 != null) && (v0_38.firstInstallTime != 0)) {
                                            String v0_42;
                                            if (v0_38.firstInstallTime == v0_38.lastUpdateTime) {
                                                v0_42 = 1;
                                            } else {
                                                v15_2.putLong("_uwa", 1);
                                                v0_42 = 0;
                                            }
                                            long v9_21;
                                            String v12_10 = new com.google.android.gms.c.c.ft;
                                            if (v0_42 == null) {
                                                v9_21 = 0;
                                            } else {
                                                v9_21 = 1;
                                            }
                                            com.google.android.gms.c.c.ft v3_12 = v12_10;
                                            v12_10("_fi", v5_6, Long.valueOf(v9_21), "auto");
                                            this.a(v3_12, p19);
                                        }
                                        try {
                                            String v0_49 = com.google.android.gms.common.b.c.b(this.i.n()).a(p19.a, 0);
                                        } catch (String v0_50) {
                                            this.i.r().k_().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a), v0_50);
                                            v0_49 = 0;
                                        }
                                        if (v0_49 != null) {
                                            if ((v0_49.flags & 1) != 0) {
                                                v15_2.putLong("_sys", 1);
                                            }
                                            if ((v0_49.flags & 128) != 0) {
                                                v15_2.putLong("_sysu", 1);
                                            }
                                        }
                                    } else {
                                        this.i.r().k_().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a));
                                    }
                                    String v0_59 = v18_1.d();
                                    com.google.android.gms.c.c.ft v3_20 = p19.a;
                                    com.google.android.gms.common.internal.z.a(v3_20);
                                    v0_59.d();
                                    v0_59.I();
                                    com.google.android.gms.c.c.ft v3_21 = v0_59.h(v3_20, "first_open_count");
                                    if (v3_21 >= 0) {
                                        v15_2.putLong("_pfo", v3_21);
                                    }
                                    String v0_62 = new com.google.android.gms.c.c.aq;
                                    v0_62("_f", new com.google.android.gms.c.c.an(v15_2), "auto", v5_6);
                                    this.a(v0_62, p19);
                                }
                                String v0_65 = new android.os.Bundle();
                                v0_65.putLong("_et", v13_0);
                                v3_2 = new com.google.android.gms.c.c.aq;
                                v3_2("_e", new com.google.android.gms.c.c.an(v0_65), "auto", v5_6);
                            }
                            v18_1.d().g();
                            v18_1.d().h();
                            return;
                        } else {
                            com.google.android.gms.c.c.ft v7_8 = new android.os.Bundle();
                            v7_8.putString("_pv", v0_7.i());
                            v0_9 = new com.google.android.gms.c.c.aq;
                            v0_9("_au", new com.google.android.gms.c.c.an(v7_8), "auto", v5_6);
                        }
                    } else {
                        if (v0_7.j() == p19.j) {
                        } else {
                            com.google.android.gms.c.c.ft v7_13 = new android.os.Bundle();
                            v7_13.putString("_pv", v0_7.i());
                            v0_9 = new com.google.android.gms.c.c.aq;
                            v0_9("_au", new com.google.android.gms.c.c.an(v7_13), "auto", v5_6);
                        }
                    }
                    this.a(v0_9, p19);
                }
            } else {
                v18_1.e(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.c.c.fm.c() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void c(com.google.android.gms.c.c.u p19)
    {
        void v18_1 = this.v();
        v18_1.i();
        com.google.android.gms.common.internal.z.a(p19);
        com.google.android.gms.common.internal.z.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_3 = v18_1.d().b(p19.a);
            if ((v0_3 != null) && ((android.text.TextUtils.isEmpty(v0_3.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_3.g(0);
                v18_1.d().a(v0_3);
                v18_1.p().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.i.m().a();
                }
                android.os.Bundle v15_3;
                String v0_64 = p19.n;
                if ((v0_64 == null) || (v0_64 == 1)) {
                    v15_3 = v0_64;
                } else {
                    this.i.r().i().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.c.c.bb.a(p19.a), Integer.valueOf(v0_64));
                    v15_3 = 0;
                }
                v18_1.d().f();
                try {
                    String v0_7 = v18_1.d().b(p19.a);
                } catch (String v0_66) {
                    v18_1.d().h();
                    throw v0_66;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.i.r().i().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.c.c.bb.a(v0_7.b()));
                    com.google.android.gms.c.c.ft v7_46 = v18_1.d();
                    String v8_21 = v0_7.b();
                    v7_46.I();
                    v7_46.d();
                    com.google.android.gms.common.internal.z.a(v8_21);
                    try {
                        String v0_0 = v7_46.i();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_21;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_46.r().k_().a("Error deleting application data. appId, error", com.google.android.gms.c.c.bb.a(v8_21), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_46.r().w().a("Deleted application data. app, records", v8_21, Integer.valueOf(v10_10));
                    }
                }
                if (v0_7 != null) {
                    String v0_9;
                    if (v0_7.j() == -2147483648) {
                        if ((v0_7.i() == null) || (v0_7.i().equals(p19.c))) {
                            String v0_12;
                            String v0_11;
                            String v8_6;
                            com.google.android.gms.c.c.ft v7_15;
                            v18_1.e(p19);
                            if (v15_3 != null) {
                                if (v15_3 != 1) {
                                    v0_11 = 0;
                                } else {
                                    v0_12 = v18_1.d();
                                    v7_15 = p19.a;
                                    v8_6 = "_v";
                                    v0_11 = v0_12.a(v7_15, v8_6);
                                }
                            } else {
                                v0_12 = v18_1.d();
                                v7_15 = p19.a;
                                v8_6 = "_f";
                            }
                            com.google.android.gms.c.c.ft v3_2;
                            if (v0_11 != null) {
                                if (p19.i) {
                                    v3_2 = new com.google.android.gms.c.c.aq;
                                    v3_2("_cd", new com.google.android.gms.c.c.an(new android.os.Bundle()), "auto", v5_6);
                                    this.a(v3_2, p19);
                                }
                            } else {
                                Long v13_0;
                                long v9_13 = (((v5_6 / 3600000) + 1) * 3600000);
                                if (v15_3 != null) {
                                    v13_0 = 1;
                                    if (v15_3 == 1) {
                                        String v0_16 = new com.google.android.gms.c.c.ft;
                                        v0_16("_fvt", v5_6, Long.valueOf(v9_13), "auto");
                                        this.a(v0_16, p19);
                                        v18_1 = v18_1.v();
                                        v18_1.i();
                                        String v0_18 = new android.os.Bundle();
                                        v0_18.putLong("_c", 1);
                                        v0_18.putLong("_r", 1);
                                        if ((this.i.b().k(p19.a)) && (p19.q)) {
                                            v0_18.putLong("_dac", 1);
                                        }
                                        com.google.android.gms.c.c.ft v3_11 = new com.google.android.gms.c.c.aq;
                                        v3_11("_v", new com.google.android.gms.c.c.an(v0_18), "auto", v5_6);
                                        this.a(v3_11, p19);
                                    }
                                } else {
                                    String v0_19 = new com.google.android.gms.c.c.ft;
                                    v13_0 = 1;
                                    v0_19("_fot", v5_6, Long.valueOf(v9_13), "auto");
                                    this.a(v0_19, p19);
                                    v18_1 = v18_1.v();
                                    v18_1.i();
                                    android.os.Bundle v15_2 = new android.os.Bundle();
                                    v15_2.putLong("_c", 1);
                                    v15_2.putLong("_r", 1);
                                    v15_2.putLong("_uwa", 0);
                                    v15_2.putLong("_pfo", 0);
                                    v15_2.putLong("_sys", 0);
                                    v15_2.putLong("_sysu", 0);
                                    if ((this.i.b().k(p19.a)) && (p19.q)) {
                                        v15_2.putLong("_dac", 1);
                                    }
                                    if (this.i.n().getPackageManager() != null) {
                                        try {
                                            String v0_38 = com.google.android.gms.common.b.c.b(this.i.n()).b(p19.a, 0);
                                        } catch (String v0_39) {
                                            this.i.r().k_().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a), v0_39);
                                            v0_38 = 0;
                                        }
                                        if ((v0_38 != null) && (v0_38.firstInstallTime != 0)) {
                                            String v0_42;
                                            if (v0_38.firstInstallTime == v0_38.lastUpdateTime) {
                                                v0_42 = 1;
                                            } else {
                                                v15_2.putLong("_uwa", 1);
                                                v0_42 = 0;
                                            }
                                            long v9_21;
                                            String v12_10 = new com.google.android.gms.c.c.ft;
                                            if (v0_42 == null) {
                                                v9_21 = 0;
                                            } else {
                                                v9_21 = 1;
                                            }
                                            com.google.android.gms.c.c.ft v3_12 = v12_10;
                                            v12_10("_fi", v5_6, Long.valueOf(v9_21), "auto");
                                            this.a(v3_12, p19);
                                        }
                                        try {
                                            String v0_49 = com.google.android.gms.common.b.c.b(this.i.n()).a(p19.a, 0);
                                        } catch (String v0_50) {
                                            this.i.r().k_().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a), v0_50);
                                            v0_49 = 0;
                                        }
                                        if (v0_49 != null) {
                                            if ((v0_49.flags & 1) != 0) {
                                                v15_2.putLong("_sys", 1);
                                            }
                                            if ((v0_49.flags & 128) != 0) {
                                                v15_2.putLong("_sysu", 1);
                                            }
                                        }
                                    } else {
                                        this.i.r().k_().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a));
                                    }
                                    String v0_59 = v18_1.d();
                                    com.google.android.gms.c.c.ft v3_20 = p19.a;
                                    com.google.android.gms.common.internal.z.a(v3_20);
                                    v0_59.d();
                                    v0_59.I();
                                    com.google.android.gms.c.c.ft v3_21 = v0_59.h(v3_20, "first_open_count");
                                    if (v3_21 >= 0) {
                                        v15_2.putLong("_pfo", v3_21);
                                    }
                                    String v0_62 = new com.google.android.gms.c.c.aq;
                                    v0_62("_f", new com.google.android.gms.c.c.an(v15_2), "auto", v5_6);
                                    this.a(v0_62, p19);
                                }
                                String v0_65 = new android.os.Bundle();
                                v0_65.putLong("_et", v13_0);
                                v3_2 = new com.google.android.gms.c.c.aq;
                                v3_2("_e", new com.google.android.gms.c.c.an(v0_65), "auto", v5_6);
                            }
                            v18_1.d().g();
                            v18_1.d().h();
                            return;
                        } else {
                            com.google.android.gms.c.c.ft v7_8 = new android.os.Bundle();
                            v7_8.putString("_pv", v0_7.i());
                            v0_9 = new com.google.android.gms.c.c.aq;
                            v0_9("_au", new com.google.android.gms.c.c.an(v7_8), "auto", v5_6);
                        }
                    } else {
                        if (v0_7.j() == p19.j) {
                        } else {
                            com.google.android.gms.c.c.ft v7_13 = new android.os.Bundle();
                            v7_13.putString("_pv", v0_7.i());
                            v0_9 = new com.google.android.gms.c.c.aq;
                            v0_9("_au", new com.google.android.gms.c.c.an(v7_13), "auto", v5_6);
                        }
                    }
                    this.a(v0_9, p19);
                }
            } else {
                v18_1.e(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.c.c.fm.c() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void c(com.google.android.gms.c.c.u p19)
    {
        void v18_1 = this.v();
        v18_1.i();
        com.google.android.gms.common.internal.z.a(p19);
        com.google.android.gms.common.internal.z.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_3 = v18_1.d().b(p19.a);
            if ((v0_3 != null) && ((android.text.TextUtils.isEmpty(v0_3.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_3.g(0);
                v18_1.d().a(v0_3);
                v18_1.p().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.i.m().a();
                }
                android.os.Bundle v15_3;
                String v0_64 = p19.n;
                if ((v0_64 == null) || (v0_64 == 1)) {
                    v15_3 = v0_64;
                } else {
                    this.i.r().i().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.c.c.bb.a(p19.a), Integer.valueOf(v0_64));
                    v15_3 = 0;
                }
                v18_1.d().f();
                try {
                    String v0_7 = v18_1.d().b(p19.a);
                } catch (String v0_66) {
                    v18_1.d().h();
                    throw v0_66;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.i.r().i().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.c.c.bb.a(v0_7.b()));
                    com.google.android.gms.c.c.ft v7_46 = v18_1.d();
                    String v8_21 = v0_7.b();
                    v7_46.I();
                    v7_46.d();
                    com.google.android.gms.common.internal.z.a(v8_21);
                    try {
                        String v0_0 = v7_46.i();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_21;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_46.r().k_().a("Error deleting application data. appId, error", com.google.android.gms.c.c.bb.a(v8_21), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_46.r().w().a("Deleted application data. app, records", v8_21, Integer.valueOf(v10_10));
                    }
                }
                if (v0_7 != null) {
                    String v0_9;
                    if (v0_7.j() == -2147483648) {
                        if ((v0_7.i() == null) || (v0_7.i().equals(p19.c))) {
                            String v0_11;
                            String v8_6;
                            com.google.android.gms.c.c.ft v7_15;
                            String v0_12;
                            v18_1.e(p19);
                            if (v15_3 != null) {
                                if (v15_3 != 1) {
                                    v0_11 = 0;
                                } else {
                                    v0_12 = v18_1.d();
                                    v7_15 = p19.a;
                                    v8_6 = "_v";
                                    v0_11 = v0_12.a(v7_15, v8_6);
                                }
                            } else {
                                v0_12 = v18_1.d();
                                v7_15 = p19.a;
                                v8_6 = "_f";
                            }
                            com.google.android.gms.c.c.ft v3_2;
                            if (v0_11 != null) {
                                if (p19.i) {
                                    v3_2 = new com.google.android.gms.c.c.aq;
                                    v3_2("_cd", new com.google.android.gms.c.c.an(new android.os.Bundle()), "auto", v5_6);
                                    this.a(v3_2, p19);
                                }
                            } else {
                                Long v13_0;
                                long v9_13 = (((v5_6 / 3600000) + 1) * 3600000);
                                if (v15_3 != null) {
                                    v13_0 = 1;
                                    if (v15_3 == 1) {
                                        String v0_16 = new com.google.android.gms.c.c.ft;
                                        v0_16("_fvt", v5_6, Long.valueOf(v9_13), "auto");
                                        this.a(v0_16, p19);
                                        v18_1 = v18_1.v();
                                        v18_1.i();
                                        String v0_18 = new android.os.Bundle();
                                        v0_18.putLong("_c", 1);
                                        v0_18.putLong("_r", 1);
                                        if ((this.i.b().k(p19.a)) && (p19.q)) {
                                            v0_18.putLong("_dac", 1);
                                        }
                                        com.google.android.gms.c.c.ft v3_11 = new com.google.android.gms.c.c.aq;
                                        v3_11("_v", new com.google.android.gms.c.c.an(v0_18), "auto", v5_6);
                                        this.a(v3_11, p19);
                                    }
                                } else {
                                    String v0_19 = new com.google.android.gms.c.c.ft;
                                    v13_0 = 1;
                                    v0_19("_fot", v5_6, Long.valueOf(v9_13), "auto");
                                    this.a(v0_19, p19);
                                    v18_1 = v18_1.v();
                                    v18_1.i();
                                    android.os.Bundle v15_2 = new android.os.Bundle();
                                    v15_2.putLong("_c", 1);
                                    v15_2.putLong("_r", 1);
                                    v15_2.putLong("_uwa", 0);
                                    v15_2.putLong("_pfo", 0);
                                    v15_2.putLong("_sys", 0);
                                    v15_2.putLong("_sysu", 0);
                                    if ((this.i.b().k(p19.a)) && (p19.q)) {
                                        v15_2.putLong("_dac", 1);
                                    }
                                    if (this.i.n().getPackageManager() != null) {
                                        try {
                                            String v0_38 = com.google.android.gms.common.b.c.b(this.i.n()).b(p19.a, 0);
                                        } catch (String v0_39) {
                                            this.i.r().k_().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a), v0_39);
                                            v0_38 = 0;
                                        }
                                        if ((v0_38 != null) && (v0_38.firstInstallTime != 0)) {
                                            String v0_42;
                                            if (v0_38.firstInstallTime == v0_38.lastUpdateTime) {
                                                v0_42 = 1;
                                            } else {
                                                v15_2.putLong("_uwa", 1);
                                                v0_42 = 0;
                                            }
                                            long v9_21;
                                            String v12_10 = new com.google.android.gms.c.c.ft;
                                            if (v0_42 == null) {
                                                v9_21 = 0;
                                            } else {
                                                v9_21 = 1;
                                            }
                                            com.google.android.gms.c.c.ft v3_12 = v12_10;
                                            v12_10("_fi", v5_6, Long.valueOf(v9_21), "auto");
                                            this.a(v3_12, p19);
                                        }
                                        try {
                                            String v0_49 = com.google.android.gms.common.b.c.b(this.i.n()).a(p19.a, 0);
                                        } catch (String v0_50) {
                                            this.i.r().k_().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a), v0_50);
                                            v0_49 = 0;
                                        }
                                        if (v0_49 != null) {
                                            if ((v0_49.flags & 1) != 0) {
                                                v15_2.putLong("_sys", 1);
                                            }
                                            if ((v0_49.flags & 128) != 0) {
                                                v15_2.putLong("_sysu", 1);
                                            }
                                        }
                                    } else {
                                        this.i.r().k_().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a));
                                    }
                                    String v0_59 = v18_1.d();
                                    com.google.android.gms.c.c.ft v3_20 = p19.a;
                                    com.google.android.gms.common.internal.z.a(v3_20);
                                    v0_59.d();
                                    v0_59.I();
                                    com.google.android.gms.c.c.ft v3_21 = v0_59.h(v3_20, "first_open_count");
                                    if (v3_21 >= 0) {
                                        v15_2.putLong("_pfo", v3_21);
                                    }
                                    String v0_62 = new com.google.android.gms.c.c.aq;
                                    v0_62("_f", new com.google.android.gms.c.c.an(v15_2), "auto", v5_6);
                                    this.a(v0_62, p19);
                                }
                                String v0_65 = new android.os.Bundle();
                                v0_65.putLong("_et", v13_0);
                                v3_2 = new com.google.android.gms.c.c.aq;
                                v3_2("_e", new com.google.android.gms.c.c.an(v0_65), "auto", v5_6);
                            }
                            v18_1.d().g();
                            v18_1.d().h();
                            return;
                        } else {
                            com.google.android.gms.c.c.ft v7_8 = new android.os.Bundle();
                            v7_8.putString("_pv", v0_7.i());
                            v0_9 = new com.google.android.gms.c.c.aq;
                            v0_9("_au", new com.google.android.gms.c.c.an(v7_8), "auto", v5_6);
                        }
                    } else {
                        if (v0_7.j() == p19.j) {
                        } else {
                            com.google.android.gms.c.c.ft v7_13 = new android.os.Bundle();
                            v7_13.putString("_pv", v0_7.i());
                            v0_9 = new com.google.android.gms.c.c.aq;
                            v0_9("_au", new com.google.android.gms.c.c.an(v7_13), "auto", v5_6);
                        }
                    }
                    this.a(v0_9, p19);
                }
            } else {
                v18_1.e(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.c.c.fm.c() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void c(com.google.android.gms.c.c.u p19)
    {
        void v18_1 = this.v();
        v18_1.i();
        com.google.android.gms.common.internal.z.a(p19);
        com.google.android.gms.common.internal.z.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_3 = v18_1.d().b(p19.a);
            if ((v0_3 != null) && ((android.text.TextUtils.isEmpty(v0_3.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_3.g(0);
                v18_1.d().a(v0_3);
                v18_1.p().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.i.m().a();
                }
                android.os.Bundle v15_3;
                String v0_64 = p19.n;
                if ((v0_64 == null) || (v0_64 == 1)) {
                    v15_3 = v0_64;
                } else {
                    this.i.r().i().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.c.c.bb.a(p19.a), Integer.valueOf(v0_64));
                    v15_3 = 0;
                }
                v18_1.d().f();
                try {
                    String v0_7 = v18_1.d().b(p19.a);
                } catch (String v0_66) {
                    v18_1.d().h();
                    throw v0_66;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.i.r().i().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.c.c.bb.a(v0_7.b()));
                    com.google.android.gms.c.c.ft v7_46 = v18_1.d();
                    String v8_21 = v0_7.b();
                    v7_46.I();
                    v7_46.d();
                    com.google.android.gms.common.internal.z.a(v8_21);
                    try {
                        String v0_0 = v7_46.i();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_21;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_46.r().k_().a("Error deleting application data. appId, error", com.google.android.gms.c.c.bb.a(v8_21), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_46.r().w().a("Deleted application data. app, records", v8_21, Integer.valueOf(v10_10));
                    }
                }
                if (v0_7 != null) {
                    String v0_9;
                    if (v0_7.j() == -2147483648) {
                        if ((v0_7.i() == null) || (v0_7.i().equals(p19.c))) {
                            String v8_6;
                            com.google.android.gms.c.c.ft v7_15;
                            String v0_12;
                            String v0_11;
                            v18_1.e(p19);
                            if (v15_3 != null) {
                                if (v15_3 != 1) {
                                    v0_11 = 0;
                                } else {
                                    v0_12 = v18_1.d();
                                    v7_15 = p19.a;
                                    v8_6 = "_v";
                                    v0_11 = v0_12.a(v7_15, v8_6);
                                }
                            } else {
                                v0_12 = v18_1.d();
                                v7_15 = p19.a;
                                v8_6 = "_f";
                            }
                            com.google.android.gms.c.c.ft v3_2;
                            if (v0_11 != null) {
                                if (p19.i) {
                                    v3_2 = new com.google.android.gms.c.c.aq;
                                    v3_2("_cd", new com.google.android.gms.c.c.an(new android.os.Bundle()), "auto", v5_6);
                                    this.a(v3_2, p19);
                                }
                            } else {
                                Long v13_0;
                                long v9_13 = (((v5_6 / 3600000) + 1) * 3600000);
                                if (v15_3 != null) {
                                    v13_0 = 1;
                                    if (v15_3 == 1) {
                                        String v0_16 = new com.google.android.gms.c.c.ft;
                                        v0_16("_fvt", v5_6, Long.valueOf(v9_13), "auto");
                                        this.a(v0_16, p19);
                                        v18_1 = v18_1.v();
                                        v18_1.i();
                                        String v0_18 = new android.os.Bundle();
                                        v0_18.putLong("_c", 1);
                                        v0_18.putLong("_r", 1);
                                        if ((this.i.b().k(p19.a)) && (p19.q)) {
                                            v0_18.putLong("_dac", 1);
                                        }
                                        com.google.android.gms.c.c.ft v3_11 = new com.google.android.gms.c.c.aq;
                                        v3_11("_v", new com.google.android.gms.c.c.an(v0_18), "auto", v5_6);
                                        this.a(v3_11, p19);
                                    }
                                } else {
                                    String v0_19 = new com.google.android.gms.c.c.ft;
                                    v13_0 = 1;
                                    v0_19("_fot", v5_6, Long.valueOf(v9_13), "auto");
                                    this.a(v0_19, p19);
                                    v18_1 = v18_1.v();
                                    v18_1.i();
                                    android.os.Bundle v15_2 = new android.os.Bundle();
                                    v15_2.putLong("_c", 1);
                                    v15_2.putLong("_r", 1);
                                    v15_2.putLong("_uwa", 0);
                                    v15_2.putLong("_pfo", 0);
                                    v15_2.putLong("_sys", 0);
                                    v15_2.putLong("_sysu", 0);
                                    if ((this.i.b().k(p19.a)) && (p19.q)) {
                                        v15_2.putLong("_dac", 1);
                                    }
                                    if (this.i.n().getPackageManager() != null) {
                                        try {
                                            String v0_38 = com.google.android.gms.common.b.c.b(this.i.n()).b(p19.a, 0);
                                        } catch (String v0_39) {
                                            this.i.r().k_().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a), v0_39);
                                            v0_38 = 0;
                                        }
                                        if ((v0_38 != null) && (v0_38.firstInstallTime != 0)) {
                                            String v0_42;
                                            if (v0_38.firstInstallTime == v0_38.lastUpdateTime) {
                                                v0_42 = 1;
                                            } else {
                                                v15_2.putLong("_uwa", 1);
                                                v0_42 = 0;
                                            }
                                            long v9_21;
                                            String v12_10 = new com.google.android.gms.c.c.ft;
                                            if (v0_42 == null) {
                                                v9_21 = 0;
                                            } else {
                                                v9_21 = 1;
                                            }
                                            com.google.android.gms.c.c.ft v3_12 = v12_10;
                                            v12_10("_fi", v5_6, Long.valueOf(v9_21), "auto");
                                            this.a(v3_12, p19);
                                        }
                                        try {
                                            String v0_49 = com.google.android.gms.common.b.c.b(this.i.n()).a(p19.a, 0);
                                        } catch (String v0_50) {
                                            this.i.r().k_().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a), v0_50);
                                            v0_49 = 0;
                                        }
                                        if (v0_49 != null) {
                                            if ((v0_49.flags & 1) != 0) {
                                                v15_2.putLong("_sys", 1);
                                            }
                                            if ((v0_49.flags & 128) != 0) {
                                                v15_2.putLong("_sysu", 1);
                                            }
                                        }
                                    } else {
                                        this.i.r().k_().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a));
                                    }
                                    String v0_59 = v18_1.d();
                                    com.google.android.gms.c.c.ft v3_20 = p19.a;
                                    com.google.android.gms.common.internal.z.a(v3_20);
                                    v0_59.d();
                                    v0_59.I();
                                    com.google.android.gms.c.c.ft v3_21 = v0_59.h(v3_20, "first_open_count");
                                    if (v3_21 >= 0) {
                                        v15_2.putLong("_pfo", v3_21);
                                    }
                                    String v0_62 = new com.google.android.gms.c.c.aq;
                                    v0_62("_f", new com.google.android.gms.c.c.an(v15_2), "auto", v5_6);
                                    this.a(v0_62, p19);
                                }
                                String v0_65 = new android.os.Bundle();
                                v0_65.putLong("_et", v13_0);
                                v3_2 = new com.google.android.gms.c.c.aq;
                                v3_2("_e", new com.google.android.gms.c.c.an(v0_65), "auto", v5_6);
                            }
                            v18_1.d().g();
                            v18_1.d().h();
                            return;
                        } else {
                            com.google.android.gms.c.c.ft v7_8 = new android.os.Bundle();
                            v7_8.putString("_pv", v0_7.i());
                            v0_9 = new com.google.android.gms.c.c.aq;
                            v0_9("_au", new com.google.android.gms.c.c.an(v7_8), "auto", v5_6);
                        }
                    } else {
                        if (v0_7.j() == p19.j) {
                        } else {
                            com.google.android.gms.c.c.ft v7_13 = new android.os.Bundle();
                            v7_13.putString("_pv", v0_7.i());
                            v0_9 = new com.google.android.gms.c.c.aq;
                            v0_9("_au", new com.google.android.gms.c.c.an(v7_13), "auto", v5_6);
                        }
                    }
                    this.a(v0_9, p19);
                }
            } else {
                v18_1.e(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.c.c.fm.c() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void c(com.google.android.gms.c.c.u p19)
    {
        void v18_1 = this.v();
        v18_1.i();
        com.google.android.gms.common.internal.z.a(p19);
        com.google.android.gms.common.internal.z.a(p19.a);
        if (!android.text.TextUtils.isEmpty(p19.b)) {
            String v0_3 = v18_1.d().b(p19.a);
            if ((v0_3 != null) && ((android.text.TextUtils.isEmpty(v0_3.d())) && (!android.text.TextUtils.isEmpty(p19.b)))) {
                v0_3.g(0);
                v18_1.d().a(v0_3);
                v18_1.p().d(p19.a);
            }
            if (p19.h) {
                long v5_6 = p19.m;
                if (v5_6 == 0) {
                    v5_6 = this.i.m().a();
                }
                android.os.Bundle v15_3;
                String v0_64 = p19.n;
                if ((v0_64 == null) || (v0_64 == 1)) {
                    v15_3 = v0_64;
                } else {
                    this.i.r().i().a("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.c.c.bb.a(p19.a), Integer.valueOf(v0_64));
                    v15_3 = 0;
                }
                v18_1.d().f();
                try {
                    String v0_7 = v18_1.d().b(p19.a);
                } catch (String v0_66) {
                    v18_1.d().h();
                    throw v0_66;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p19.b)))) {
                    this.i.r().i().a("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.c.c.bb.a(v0_7.b()));
                    com.google.android.gms.c.c.ft v7_46 = v18_1.d();
                    String v8_21 = v0_7.b();
                    v7_46.I();
                    v7_46.d();
                    com.google.android.gms.common.internal.z.a(v8_21);
                    try {
                        String v0_0 = v7_46.i();
                        long v9_0 = new String[1];
                        v9_0[0] = v8_21;
                        String v10_10 = (((((((((v0_0.delete("events", "app_id=?", v9_0) + 0) + v0_0.delete("user_attributes", "app_id=?", v9_0)) + v0_0.delete("conditional_properties", "app_id=?", v9_0)) + v0_0.delete("apps", "app_id=?", v9_0)) + v0_0.delete("raw_events", "app_id=?", v9_0)) + v0_0.delete("raw_events_metadata", "app_id=?", v9_0)) + v0_0.delete("event_filters", "app_id=?", v9_0)) + v0_0.delete("property_filters", "app_id=?", v9_0)) + v0_0.delete("audience_filter_values", "app_id=?", v9_0));
                    } catch (String v0_4) {
                        v7_46.r().k_().a("Error deleting application data. appId, error", com.google.android.gms.c.c.bb.a(v8_21), v0_4);
                        v0_7 = 0;
                    }
                    if (v10_10 <= null) {
                    } else {
                        v7_46.r().w().a("Deleted application data. app, records", v8_21, Integer.valueOf(v10_10));
                    }
                }
                if (v0_7 != null) {
                    String v0_9;
                    if (v0_7.j() == -2147483648) {
                        if ((v0_7.i() == null) || (v0_7.i().equals(p19.c))) {
                            String v8_6;
                            String v0_12;
                            String v0_11;
                            com.google.android.gms.c.c.ft v7_15;
                            v18_1.e(p19);
                            if (v15_3 != null) {
                                if (v15_3 != 1) {
                                    v0_11 = 0;
                                } else {
                                    v0_12 = v18_1.d();
                                    v7_15 = p19.a;
                                    v8_6 = "_v";
                                    v0_11 = v0_12.a(v7_15, v8_6);
                                }
                            } else {
                                v0_12 = v18_1.d();
                                v7_15 = p19.a;
                                v8_6 = "_f";
                            }
                            com.google.android.gms.c.c.ft v3_2;
                            if (v0_11 != null) {
                                if (p19.i) {
                                    v3_2 = new com.google.android.gms.c.c.aq;
                                    v3_2("_cd", new com.google.android.gms.c.c.an(new android.os.Bundle()), "auto", v5_6);
                                    this.a(v3_2, p19);
                                }
                            } else {
                                Long v13_0;
                                long v9_13 = (((v5_6 / 3600000) + 1) * 3600000);
                                if (v15_3 != null) {
                                    v13_0 = 1;
                                    if (v15_3 == 1) {
                                        String v0_16 = new com.google.android.gms.c.c.ft;
                                        v0_16("_fvt", v5_6, Long.valueOf(v9_13), "auto");
                                        this.a(v0_16, p19);
                                        v18_1 = v18_1.v();
                                        v18_1.i();
                                        String v0_18 = new android.os.Bundle();
                                        v0_18.putLong("_c", 1);
                                        v0_18.putLong("_r", 1);
                                        if ((this.i.b().k(p19.a)) && (p19.q)) {
                                            v0_18.putLong("_dac", 1);
                                        }
                                        com.google.android.gms.c.c.ft v3_11 = new com.google.android.gms.c.c.aq;
                                        v3_11("_v", new com.google.android.gms.c.c.an(v0_18), "auto", v5_6);
                                        this.a(v3_11, p19);
                                    }
                                } else {
                                    String v0_19 = new com.google.android.gms.c.c.ft;
                                    v13_0 = 1;
                                    v0_19("_fot", v5_6, Long.valueOf(v9_13), "auto");
                                    this.a(v0_19, p19);
                                    v18_1 = v18_1.v();
                                    v18_1.i();
                                    android.os.Bundle v15_2 = new android.os.Bundle();
                                    v15_2.putLong("_c", 1);
                                    v15_2.putLong("_r", 1);
                                    v15_2.putLong("_uwa", 0);
                                    v15_2.putLong("_pfo", 0);
                                    v15_2.putLong("_sys", 0);
                                    v15_2.putLong("_sysu", 0);
                                    if ((this.i.b().k(p19.a)) && (p19.q)) {
                                        v15_2.putLong("_dac", 1);
                                    }
                                    if (this.i.n().getPackageManager() != null) {
                                        try {
                                            String v0_38 = com.google.android.gms.common.b.c.b(this.i.n()).b(p19.a, 0);
                                        } catch (String v0_39) {
                                            this.i.r().k_().a("Package info is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a), v0_39);
                                            v0_38 = 0;
                                        }
                                        if ((v0_38 != null) && (v0_38.firstInstallTime != 0)) {
                                            String v0_42;
                                            if (v0_38.firstInstallTime == v0_38.lastUpdateTime) {
                                                v0_42 = 1;
                                            } else {
                                                v15_2.putLong("_uwa", 1);
                                                v0_42 = 0;
                                            }
                                            long v9_21;
                                            String v12_10 = new com.google.android.gms.c.c.ft;
                                            if (v0_42 == null) {
                                                v9_21 = 0;
                                            } else {
                                                v9_21 = 1;
                                            }
                                            com.google.android.gms.c.c.ft v3_12 = v12_10;
                                            v12_10("_fi", v5_6, Long.valueOf(v9_21), "auto");
                                            this.a(v3_12, p19);
                                        }
                                        try {
                                            String v0_49 = com.google.android.gms.common.b.c.b(this.i.n()).a(p19.a, 0);
                                        } catch (String v0_50) {
                                            this.i.r().k_().a("Application info is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a), v0_50);
                                            v0_49 = 0;
                                        }
                                        if (v0_49 != null) {
                                            if ((v0_49.flags & 1) != 0) {
                                                v15_2.putLong("_sys", 1);
                                            }
                                            if ((v0_49.flags & 128) != 0) {
                                                v15_2.putLong("_sysu", 1);
                                            }
                                        }
                                    } else {
                                        this.i.r().k_().a("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.c.c.bb.a(p19.a));
                                    }
                                    String v0_59 = v18_1.d();
                                    com.google.android.gms.c.c.ft v3_20 = p19.a;
                                    com.google.android.gms.common.internal.z.a(v3_20);
                                    v0_59.d();
                                    v0_59.I();
                                    com.google.android.gms.c.c.ft v3_21 = v0_59.h(v3_20, "first_open_count");
                                    if (v3_21 >= 0) {
                                        v15_2.putLong("_pfo", v3_21);
                                    }
                                    String v0_62 = new com.google.android.gms.c.c.aq;
                                    v0_62("_f", new com.google.android.gms.c.c.an(v15_2), "auto", v5_6);
                                    this.a(v0_62, p19);
                                }
                                String v0_65 = new android.os.Bundle();
                                v0_65.putLong("_et", v13_0);
                                v3_2 = new com.google.android.gms.c.c.aq;
                                v3_2("_e", new com.google.android.gms.c.c.an(v0_65), "auto", v5_6);
                            }
                            v18_1.d().g();
                            v18_1.d().h();
                            return;
                        } else {
                            com.google.android.gms.c.c.ft v7_8 = new android.os.Bundle();
                            v7_8.putString("_pv", v0_7.i());
                            v0_9 = new com.google.android.gms.c.c.aq;
                            v0_9("_au", new com.google.android.gms.c.c.an(v7_8), "auto", v5_6);
                        }
                    } else {
                        if (v0_7.j() == p19.j) {
                        } else {
                            com.google.android.gms.c.c.ft v7_13 = new android.os.Bundle();
                            v7_13.putString("_pv", v0_7.i());
                            v0_9 = new com.google.android.gms.c.c.aq;
                            v0_9("_au", new com.google.android.gms.c.c.an(v7_13), "auto", v5_6);
                        }
                    }
                    this.a(v0_9, p19);
                }
            } else {
                v18_1.e(p19);
                return;
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.c.c.fm.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void b(com.google.android.gms.c.c.u p11)
    {
        if (this.u != null) {
            this.v = new java.util.ArrayList();
            this.v.addAll(this.u);
        }
        com.google.android.gms.c.c.u v0_7 = this.d();
        boolean v1_0 = p11.a;
        com.google.android.gms.common.internal.z.a(v1_0);
        v0_7.d();
        v0_7.I();
        try {
            String v2_0 = v0_7.i();
            String v3_1 = new String[1];
            v3_1[0] = v1_0;
            boolean v5_10 = (((((((((v2_0.delete("apps", "app_id=?", v3_1) + 0) + v2_0.delete("events", "app_id=?", v3_1)) + v2_0.delete("user_attributes", "app_id=?", v3_1)) + v2_0.delete("conditional_properties", "app_id=?", v3_1)) + v2_0.delete("raw_events", "app_id=?", v3_1)) + v2_0.delete("raw_events_metadata", "app_id=?", v3_1)) + v2_0.delete("queue", "app_id=?", v3_1)) + v2_0.delete("audience_filter_values", "app_id=?", v3_1)) + v2_0.delete("main_event_params", "app_id=?", v3_1));
        } catch (String v2_2) {
            v0_7.r().k_().a("Error resetting analytics data. appId, error", com.google.android.gms.c.c.bb.a(v1_0), v2_2);
            com.google.android.gms.c.c.u v0_8 = this.a(this.i.n(), p11.a, p11.b, p11.h, p11.o, p11.p, p11.m);
            if ((!this.i.b().k(p11.a)) || (p11.h)) {
                this.c(v0_8);
            }
            return;
        }
        if (v5_10) {
        } else {
            v0_7.r().w().a("Reset analytics data. app, records", v1_0, Integer.valueOf(v5_10));
        }
    }

Method com.google.android.gms.c.c.fm.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void a(int p10, Throwable p11, byte[] p12, String p13)
    {
        this.v();
        this.i();
        if (p12 == null) {
            p12 = new byte[0];
        }
        String v1_3 = this.u;
        this.u = 0;
        int v4 = 1;
        if (((p10 != 200) && (p10 != 204)) || (p11)) {
            this.i.r().w().a("Network upload failed. Will retry later. code, error", Integer.valueOf(p10), p11);
            this.i.c().d.a(this.i.m().a());
            if (p10 != 503) {
                if (p10 != 429) {
                    v4 = 0;
                } else {
                }
            }
            if (v4 != 0) {
                this.i.c().e.a(this.i.m().a());
            }
            if (this.i.b().g(p13)) {
                this.d().a(v1_3);
            }
            this.y();
        } else {
            try {
                this.i.c().c.a(this.i.m().a());
                this.i.c().d.a(0);
                this.y();
                this.i.r().w().a("Successful upload. Got network response. code, size", Integer.valueOf(p10), Integer.valueOf(p12.length));
                this.d().f();
            } catch (long v10_7) {
                this.i.r().k_().a("Database error while trying to delete uploaded bundles", v10_7);
                this.l = this.i.m().b();
                this.i.r().w().a("Disable upload, time", Long.valueOf(this.l));
            }
            long v10_24 = v1_3.iterator();
            while (v10_24.hasNext()) {
                boolean v11_2 = ((Long) v10_24.next());
                try {
                    com.google.android.gms.c.c.bd v12_1 = this.d();
                    String v7_0 = v11_2.longValue();
                    v12_1.d();
                    v12_1.I();
                    java.util.List v13_1 = v12_1.i();
                    String v1_0 = new String[1];
                    v1_0[0] = String.valueOf(v7_0);
                    try {
                        if (v13_1.delete("queue", "rowid=?", v1_0) != 1) {
                            throw new android.database.sqlite.SQLiteException("Deleted fewer rows from queue than expected");
                        } else {
                        }
                    } catch (java.util.List v13_5) {
                        v12_1.r().k_().a("Failed to delete a bundle in a queue table", v13_5);
                        throw v13_5;
                    }
                } catch (com.google.android.gms.c.c.bd v12_5) {
                    if (this.v != null) {
                        if (this.v.contains(v11_2)) {
                        }
                    }
                    throw v12_5;
                }
            }
            this.d().g();
            this.d().h();
            this.v = 0;
            if ((!this.c().f()) || (!this.x())) {
                this.w = -1;
                this.y();
            } else {
                this.j();
            }
            this.l = 0;
        }
        this.q = 0;
        this.z();
        return;
    }

Method com.google.android.gms.c.c.fm.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final boolean a(String p65, long p66)
    {
        this.d().f();
        try {
            android.database.sqlite.SQLiteException v3_0 = 0;
            com.google.android.gms.c.c.bd v2_7 = new ark>com.google.android.gms.c.c.fmark>$a(this, 0);
            Object v4_31 = this.d();
            com.google.android.gms.c.c.bd v5_123 = this.w;
            com.google.android.gms.common.internal.z.a(v2_7);
            v4_31.d();
            v4_31.I();
            try {
                String v22;
                int v23;
                Long v15_2 = v4_31.i();
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        Boolean v12_30;
                        android.database.sqlite.SQLiteException v3_2 = v5_123 cmp -1;
                        if (v3_2 == null) {
                            v12_30 = new String[] {0});
                        } else {
                            v12_30 = new String[2];
                            v12_30[0] = 0;
                            v12_30[1] = String.valueOf(v5_123);
                        }
                        android.database.sqlite.SQLiteException v3_9;
                        if (v3_2 == null) {
                            v3_9 = "";
                        } else {
                            v3_9 = " and rowid <= ?";
                        }
                        long v14_12 = new StringBuilder((String.valueOf(v3_9).length() + 84));
                        v14_12.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v14_12.append(v3_9);
                        v14_12.append(" order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v14_12.toString(), v12_30);
                        if (v3_0.moveToFirst()) {
                            Boolean v13_17 = v3_0.getString(0);
                            v3_0.close();
                            v23 = v3_0;
                            v22 = v13_17;
                            v3_0 = 0;
                            try {
                                Boolean v12_11 = new String[2];
                                v12_11[0] = v3_0;
                                v12_11[1] = v22;
                                android.database.sqlite.SQLiteDatabase v25 = v15_2;
                                Long v15_1 = v15_2.query("raw_events_metadata", new String[] {"metadata"}), "app_id = ? and metadata_fingerprint = ?", v12_11, 0, 0, "rowid", "2");
                                try {
                                    if (v15_1.moveToFirst()) {
                                        Boolean v12_16 = v15_1.getBlob(0);
                                        Boolean v12_17 = com.google.android.gms.c.c.a.a(v12_16, 0, v12_16.length);
                                        Boolean v13_6 = new com.google.android.gms.c.c.gn();
                                        try {
                                            v13_6.a(v12_17);
                                        } catch (android.database.sqlite.SQLiteException v0_5) {
                                            int v9_0 = v15_1;
                                            v4_31.r().k_().a("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.c.c.bb.a(v3_0), v0_5);
                                            if (v9_0 == 0) {
                                                android.database.sqlite.SQLiteException v3_7;
                                                if (v2_7.c == null) {
                                                    v3_7 = 1;
                                                } else {
                                                    if (!v2_7.c.isEmpty()) {
                                                        v3_7 = 0;
                                                    } else {
                                                    }
                                                }
                                                if (v3_7 != null) {
                                                    this.d().g();
                                                    this.d().h();
                                                    return 0;
                                                } else {
                                                    android.database.sqlite.SQLiteException v3_8 = v2_7.a;
                                                    Object v4_4 = new com.google.android.gms.c.c.gk[v2_7.c.size()];
                                                    v3_8.d = v4_4;
                                                    Object v4_7 = this.i.b().e(v3_8.q);
                                                    int v9_13 = 0;
                                                    Boolean v12_9 = 0;
                                                    Boolean v13_3 = 0;
                                                    long v14_2 = 0;
                                                    while (v9_13 < v2_7.c.size()) {
                                                        String[] v44;
                                                        int v7_3 = ((com.google.android.gms.c.c.gk) v2_7.c.get(v9_13));
                                                        if (!this.p().b(v2_7.a.q, v7_3.d)) {
                                                            com.google.android.gms.c.c.bd v5_4 = this.p().c(v2_7.a.q, v7_3.d);
                                                            if (v5_4 != null) {
                                                                if (v7_3.c == null) {
                                                                    com.google.android.gms.c.c.am v8_4 = new com.google.android.gms.c.c.gl[0];
                                                                    v7_3.c = v8_4;
                                                                }
                                                                String v6_11 = v7_3.c;
                                                                com.google.android.gms.c.c.am v8_5 = v6_11.length;
                                                                boolean v10_5 = 0;
                                                                long v11_3 = 0;
                                                                long v18_0 = 0;
                                                                while (v10_5 < v8_5) {
                                                                    int v32_1 = v8_5;
                                                                    com.google.android.gms.c.c.am v8_46 = v6_11[v10_5];
                                                                    int v33_1 = v6_11;
                                                                    int v34_2 = v12_9;
                                                                    if (!"_c".equals(v8_46.c)) {
                                                                        if ("_r".equals(v8_46.c)) {
                                                                            v8_46.e = Long.valueOf(1);
                                                                            v18_0 = 1;
                                                                        }
                                                                    } else {
                                                                        v8_46.e = Long.valueOf(1);
                                                                        v11_3 = 1;
                                                                    }
                                                                    v10_5++;
                                                                    v8_5 = v32_1;
                                                                    v6_11 = v33_1;
                                                                    v12_9 = v34_2;
                                                                }
                                                                int v34_0 = v12_9;
                                                                if ((v11_3 == 0) && (v5_4 != null)) {
                                                                    this.i.r().w().a("Marking event as conversion", this.i.l().a(v7_3.d));
                                                                    String v6_17 = ((com.google.android.gms.c.c.gl[]) java.util.Arrays.copyOf(v7_3.c, (v7_3.c.length + 1)));
                                                                    com.google.android.gms.c.c.am v8_11 = new com.google.android.gms.c.c.gl();
                                                                    v8_11.c = "_c";
                                                                    v8_11.e = Long.valueOf(1);
                                                                    v6_17[(v6_17.length - 1)] = v8_11;
                                                                    v7_3.c = v6_17;
                                                                }
                                                                if (v18_0 == 0) {
                                                                    this.i.r().w().a("Marking event as real-time", this.i.l().a(v7_3.d));
                                                                    String v6_23 = ((com.google.android.gms.c.c.gl[]) java.util.Arrays.copyOf(v7_3.c, (v7_3.c.length + 1)));
                                                                    com.google.android.gms.c.c.am v8_17 = new com.google.android.gms.c.c.gl();
                                                                    v8_17.c = "_r";
                                                                    v8_17.e = Long.valueOf(1);
                                                                    v6_23[(v6_23.length - 1)] = v8_17;
                                                                    v7_3.c = v6_23;
                                                                }
                                                                v44 = v9_13;
                                                                if (this.d().a(this.w(), v2_7.a.q, 0, 0, 0, 0, 1).e <= ((long) this.i.b().a(v2_7.a.q))) {
                                                                    v12_9 = 1;
                                                                } else {
                                                                    String v6_31 = 0;
                                                                    while (v6_31 < v7_3.c.length) {
                                                                        if (!"_r".equals(v7_3.c[v6_31].c)) {
                                                                            v6_31++;
                                                                        } else {
                                                                            com.google.android.gms.c.c.am v8_28 = new com.google.android.gms.c.c.gl[(v7_3.c.length - 1)];
                                                                            if (v6_31 > null) {
                                                                                System.arraycopy(v7_3.c, 0, v8_28, 0, v6_31);
                                                                            }
                                                                            if (v6_31 < v8_28.length) {
                                                                                System.arraycopy(v7_3.c, (v6_31 + 1), v8_28, v6_31, (v8_28.length - v6_31));
                                                                            }
                                                                            v7_3.c = v8_28;
                                                                            break;
                                                                        }
                                                                    }
                                                                    v12_9 = v34_0;
                                                                }
                                                                if ((com.google.android.gms.c.c.fw.a(v7_3.d)) && ((v5_4 != null) && (this.d().a(this.w(), v2_7.a.q, 0, 0, 1, 0, 0).c > ((long) this.i.b().b(v2_7.a.q, com.google.android.gms.c.c.as.v))))) {
                                                                    this.i.r().i().a("Too many conversions. Not logging as conversion. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                                    com.google.android.gms.c.c.bd v5_13 = v7_3.c;
                                                                    String v6_35 = v5_13.length;
                                                                    com.google.android.gms.c.c.am v8_36 = 0;
                                                                    int v9_11 = 0;
                                                                    boolean v10_26 = 0;
                                                                    while (v8_36 < v6_35) {
                                                                        long v11_10 = v5_13[v8_36];
                                                                        if (!"_c".equals(v11_10.c)) {
                                                                            if ("_err".equals(v11_10.c)) {
                                                                                v9_11 = 1;
                                                                            }
                                                                        } else {
                                                                            v10_26 = v11_10;
                                                                        }
                                                                        v8_36++;
                                                                    }
                                                                    if ((v9_11 == 0) || (!v10_26)) {
                                                                        if (!v10_26) {
                                                                            this.i.r().k_().a("Did not find conversion parameter. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                                        } else {
                                                                            v10_26.c = "_err";
                                                                            v10_26.e = Long.valueOf(10);
                                                                        }
                                                                    } else {
                                                                        com.google.android.gms.c.c.bd v5_20 = v7_3.c;
                                                                        com.google.android.gms.c.c.am v8_40 = new com.google.android.gms.c.c.gl[1];
                                                                        v8_40[0] = v10_26;
                                                                        v7_3.c = ((com.google.android.gms.c.c.gl[]) com.google.android.gms.common.util.b.a(v5_20, v8_40));
                                                                    }
                                                                }
                                                            } else {
                                                                this.f();
                                                                String v6_4 = v7_3.d;
                                                                com.google.android.gms.common.internal.z.a(v6_4);
                                                                com.google.android.gms.c.c.am v8_3 = -1;
                                                                boolean v10_1 = v6_4.hashCode();
                                                                if (v10_1 == 94660) {
                                                                    if (v6_4.equals("_in")) {
                                                                        v8_3 = 0;
                                                                    }
                                                                } else {
                                                                    if (v10_1 == 95025) {
                                                                        if (v6_4.equals("_ug")) {
                                                                            v8_3 = 2;
                                                                        }
                                                                    } else {
                                                                        if (v10_1 == 95027) {
                                                                            if (v6_4.equals("_ui")) {
                                                                                v8_3 = 1;
                                                                            }
                                                                        } else {
                                                                        }
                                                                    }
                                                                }
                                                                String v6_8;
                                                                switch (v8_3) {
                                                                    case 0:
                                                                    case 1:
                                                                    case 2:
                                                                        v6_8 = 1;
                                                                    default:
                                                                        v6_8 = 0;
                                                                }
                                                                if (v6_8 == null) {
                                                                    v44 = v9_13;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v4_7 != null) && ("_e".equals(v7_3.d))) {
                                                                com.google.android.gms.c.c.bd v5_34;
                                                                String v6_40;
                                                                com.google.android.gms.c.c.am v8_43;
                                                                if (v7_3.c == null) {
                                                                    v5_34 = this.i.r().i();
                                                                    v6_40 = "Engagement event does not contain any parameters. appId";
                                                                    v8_43 = com.google.android.gms.c.c.bb.a(v2_7.a.q);
                                                                } else {
                                                                    if (v7_3.c.length != 0) {
                                                                        this.f();
                                                                        com.google.android.gms.c.c.bd v5_30 = ((Long) com.google.android.gms.c.c.fs.b(v7_3, "_et"));
                                                                        if (v5_30 != null) {
                                                                            v14_2 += v5_30.longValue();
                                                                            String v6_41 = (v13_3 + 1);
                                                                            v3_8.d[v13_3] = v7_3;
                                                                            v13_3 = v6_41;
                                                                            v9_13 = (v44 + 1);
                                                                            long v11 = 1;
                                                                        } else {
                                                                            v5_34 = this.i.r().i();
                                                                            v6_40 = "Engagement event does not include duration. appId";
                                                                            v8_43 = com.google.android.gms.c.c.bb.a(v2_7.a.q);
                                                                        }
                                                                    } else {
                                                                    }
                                                                }
                                                                v5_34.a(v6_40, v8_43);
                                                            }
                                                        } else {
                                                            com.google.android.gms.c.c.bd v5_49;
                                                            this.i.r().i().a("Dropping blacklisted raw event. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q), this.i.l().a(v7_3.d));
                                                            if (this.p().e(v2_7.a.q)) {
                                                                v5_49 = 1;
                                                            } else {
                                                                if (!this.p().f(v2_7.a.q)) {
                                                                    v5_49 = 0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v5_49 == null) && (!"_err".equals(v7_3.d))) {
                                                                this.i.k().a(v2_7.a.q, 11, "_ev", v7_3.d, 0);
                                                            }
                                                            v44 = v9_13;
                                                        }
                                                    }
                                                    int v34_3 = v12_9;
                                                    if (v13_3 < v2_7.c.size()) {
                                                        v3_8.d = ((com.google.android.gms.c.c.gk[]) java.util.Arrays.copyOf(v3_8.d, v13_3));
                                                    }
                                                    if (v4_7 != null) {
                                                        Object v4_12;
                                                        Object v4_9 = this.d().c(v3_8.q, "_lte");
                                                        if (v4_9 == null) {
                                                            v4_12 = new com.google.android.gms.c.c.fv;
                                                            v4_12(v3_8.q, "auto", "_lte", this.i.m().a(), Long.valueOf(v14_2));
                                                        } else {
                                                            if (v4_9.e != null) {
                                                                com.google.android.gms.c.c.bd v5_70 = new com.google.android.gms.c.c.fv;
                                                                v5_70(v3_8.q, "auto", "_lte", this.i.m().a(), Long.valueOf((((Long) v4_9.e).longValue() + v14_2)));
                                                                v4_12 = v5_70;
                                                            } else {
                                                            }
                                                        }
                                                        com.google.android.gms.c.c.bd v5_73 = new com.google.android.gms.c.c.gq();
                                                        v5_73.d = "_lte";
                                                        v5_73.c = Long.valueOf(this.i.m().a());
                                                        v5_73.f = ((Long) v4_12.e);
                                                        String v6_80 = 0;
                                                        while (v6_80 < v3_8.e.length) {
                                                            if (!"_lte".equals(v3_8.e[v6_80].d)) {
                                                                v6_80++;
                                                            } else {
                                                                v3_8.e[v6_80] = v5_73;
                                                                String v6_81 = 1;
                                                            }
                                                            if (v6_81 == null) {
                                                                v3_8.e = ((com.google.android.gms.c.c.gq[]) java.util.Arrays.copyOf(v3_8.e, (v3_8.e.length + 1)));
                                                                v3_8.e[(v2_7.a.e.length - 1)] = v5_73;
                                                            }
                                                            if (v14_2 > 0) {
                                                                this.d().a(v4_12);
                                                                this.i.r().v().a("Updated lifetime engagement user property with value. Value", v4_12.e);
                                                            }
                                                        }
                                                        v6_81 = 0;
                                                    }
                                                    v3_8.C = this.a(v3_8.q, v3_8.e, v3_8.d);
                                                    if (this.i.b().d(v2_7.a.q)) {
                                                        Object v4_20 = new java.util.HashMap();
                                                        com.google.android.gms.c.c.bd v5_84 = new com.google.android.gms.c.c.gk[v3_8.d.length];
                                                        String v6_0 = this.i.k().h();
                                                        int v7_0 = v3_8.d;
                                                        com.google.android.gms.c.c.am v8_0 = v7_0.length;
                                                        int v9_1 = 0;
                                                        boolean v10_0 = 0;
                                                        while (v9_1 < v8_0) {
                                                            Boolean v12_7;
                                                            boolean v48;
                                                            int v47;
                                                            long v63;
                                                            long v11_14 = v7_0[v9_1];
                                                            if (!v11_14.d.equals("_ep")) {
                                                                int v7_45;
                                                                Boolean v13_20 = Long.valueOf(1);
                                                                if (android.text.TextUtils.isEmpty("_dbg")) {
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                    v7_45 = 0;
                                                                } else {
                                                                    if (v13_20 != null) {
                                                                        long v14_17 = v11_14.c;
                                                                        Long v15_5 = v14_17.length;
                                                                        v47 = v7_0;
                                                                        int v7_35 = 0;
                                                                        while (v7_35 < v15_5) {
                                                                            v48 = v8_0;
                                                                            com.google.android.gms.c.c.am v8_65 = v14_17[v7_35];
                                                                            if (!"_dbg".equals(v8_65.c)) {
                                                                                v7_35++;
                                                                                v8_0 = v48;
                                                                            } else {
                                                                                if (((!(v13_20 instanceof Long)) || (!v13_20.equals(v8_65.e))) && (((!(v13_20 instanceof String)) || (!v13_20.equals(v8_65.d))) && ((!(v13_20 instanceof Double)) || (!v13_20.equals(v8_65.f))))) {
                                                                                } else {
                                                                                    v7_45 = 1;
                                                                                }
                                                                            }
                                                                        }
                                                                    } else {
                                                                    }
                                                                }
                                                                int v7_46;
                                                                if (v7_45 != 0) {
                                                                    v7_46 = 1;
                                                                } else {
                                                                    v7_46 = this.p().d(v2_7.a.q, v11_14.d);
                                                                }
                                                                int v7_56;
                                                                if (v7_46 > 0) {
                                                                    com.google.android.gms.c.c.am v8_70 = ((com.google.android.gms.c.c.am) v4_20.get(v11_14.d));
                                                                    if (v8_70 == null) {
                                                                        v8_70 = this.d().a(v2_7.a.q, v11_14.d);
                                                                        if (v8_70 == null) {
                                                                            this.i.r().i().a("Event being bundled has no eventAggregate. appId, eventName", v2_7.a.q, v11_14.d);
                                                                            v8_70 = new com.google.android.gms.c.c.am;
                                                                            v8_70(v2_7.a.q, v11_14.d, 1, 1, v11_14.e.longValue(), 0, 0, 0, 0);
                                                                        }
                                                                    }
                                                                    Boolean v13_25;
                                                                    this.f();
                                                                    Boolean v12_52 = ((Long) com.google.android.gms.c.c.fs.b(v11_14, "_eid"));
                                                                    if (v12_52 == null) {
                                                                        v13_25 = 0;
                                                                    } else {
                                                                        v13_25 = 1;
                                                                    }
                                                                    Boolean v13_26 = Boolean.valueOf(v13_25);
                                                                    if (v7_46 != 1) {
                                                                        if (v6_0.nextInt(v7_46) != 0) {
                                                                            v63 = v6_0;
                                                                            if (Math.abs((v11_14.e.longValue() - v8_70.f)) < 86400000) {
                                                                                if (!v13_26.booleanValue()) {
                                                                                    v9_1++;
                                                                                    v7_0 = v47;
                                                                                    v8_0 = v48;
                                                                                    v6_0 = v63;
                                                                                } else {
                                                                                    v4_20.put(v11_14.d, v8_70.a(v12_52, 0, 0));
                                                                                }
                                                                            } else {
                                                                                this.f();
                                                                                v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_efs", Long.valueOf(1));
                                                                                this.f();
                                                                                long v14_30 = ((long) v7_46);
                                                                                v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", Long.valueOf(v14_30));
                                                                                String v6_134 = (v10_0 + 1);
                                                                                v5_84[v10_0] = v11_14;
                                                                                if (v13_26.booleanValue()) {
                                                                                    v8_70 = v8_70.a(0, Long.valueOf(v14_30), Boolean.valueOf(1));
                                                                                }
                                                                                v4_20.put(v11_14.d, v8_70.b(v11_14.e.longValue()));
                                                                                v10_0 = v6_134;
                                                                            }
                                                                        } else {
                                                                            this.f();
                                                                            v63 = v6_0;
                                                                            String v6_135 = ((long) v7_46);
                                                                            v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", Long.valueOf(v6_135));
                                                                            v12_7 = (v10_0 + 1);
                                                                            v5_84[v10_0] = v11_14;
                                                                            if (v13_26.booleanValue()) {
                                                                                v8_70 = v8_70.a(0, Long.valueOf(v6_135), 0);
                                                                            }
                                                                            v4_20.put(v11_14.d, v8_70.b(v11_14.e.longValue()));
                                                                            v10_0 = v12_7;
                                                                        }
                                                                    } else {
                                                                        v7_56 = (v10_0 + 1);
                                                                        v5_84[v10_0] = v11_14;
                                                                        if ((v13_26.booleanValue()) && ((v8_70.g != null) || ((v8_70.h != null) || (v8_70.i != null)))) {
                                                                            v4_20.put(v11_14.d, v8_70.a(0, 0, 0));
                                                                        }
                                                                    }
                                                                } else {
                                                                    this.i.r().i().a("Sample rate must be positive. event, rate", v11_14.d, Integer.valueOf(v7_46));
                                                                    v7_56 = (v10_0 + 1);
                                                                    v5_84[v10_0] = v11_14;
                                                                }
                                                                v63 = v6_0;
                                                                v10_0 = v7_56;
                                                            } else {
                                                                this.f();
                                                                Boolean v12_62 = ((String) com.google.android.gms.c.c.fs.b(v11_14, "_en"));
                                                                Boolean v13_29 = ((com.google.android.gms.c.c.am) v4_20.get(v12_62));
                                                                if (v13_29 == null) {
                                                                    v13_29 = this.d().a(v2_7.a.q, v12_62);
                                                                    v4_20.put(v12_62, v13_29);
                                                                }
                                                                if (v13_29.g != null) {
                                                                    v63 = v6_0;
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                } else {
                                                                    if (v13_29.h.longValue() > 1) {
                                                                        this.f();
                                                                        v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", v13_29.h);
                                                                    }
                                                                    if ((v13_29.i != null) && (v13_29.i.booleanValue())) {
                                                                        this.f();
                                                                        v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_efs", Long.valueOf(1));
                                                                    }
                                                                    v12_7 = (v10_0 + 1);
                                                                    v5_84[v10_0] = v11_14;
                                                                    v63 = v6_0;
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                }
                                                            }
                                                        }
                                                        if (v10_0 < v3_8.d.length) {
                                                            v3_8.d = ((com.google.android.gms.c.c.gk[]) java.util.Arrays.copyOf(v5_84, v10_0));
                                                        }
                                                        Object v4_22 = v4_20.entrySet().iterator();
                                                        while (v4_22.hasNext()) {
                                                            this.d().a(((com.google.android.gms.c.c.am) ((java.util.Map$Entry) v4_22.next()).getValue()));
                                                        }
                                                    }
                                                    v3_8.g = Long.valueOf(nan);
                                                    v3_8.h = Long.valueOf(-0.0);
                                                    Object v4_27 = 0;
                                                    while (v4_27 < v3_8.d.length) {
                                                        com.google.android.gms.c.c.bd v5_117 = v3_8.d[v4_27];
                                                        if (v5_117.e.longValue() < v3_8.g.longValue()) {
                                                            v3_8.g = v5_117.e;
                                                        }
                                                        if (v5_117.e.longValue() > v3_8.h.longValue()) {
                                                            v3_8.h = v5_117.e;
                                                        }
                                                        v4_27++;
                                                    }
                                                    Object v4_29 = v2_7.a.q;
                                                    com.google.android.gms.c.c.bd v5_91 = this.d().b(v4_29);
                                                    if (v5_91 != null) {
                                                        if (v3_8.d.length > 0) {
                                                            com.google.android.gms.c.c.am v8_57;
                                                            String v6_94 = v5_91.h();
                                                            if (v6_94 == 0) {
                                                                v8_57 = 0;
                                                            } else {
                                                                v8_57 = Long.valueOf(v6_94);
                                                            }
                                                            v3_8.j = v8_57;
                                                            com.google.android.gms.c.c.am v8_58 = v5_91.g();
                                                            if (v8_58 != 0) {
                                                                v6_94 = v8_58;
                                                            } else {
                                                            }
                                                            String v6_95;
                                                            if (v6_94 == 0) {
                                                                v6_95 = 0;
                                                            } else {
                                                                v6_95 = Long.valueOf(v6_94);
                                                            }
                                                            v3_8.i = v6_95;
                                                            v5_91.r();
                                                            v3_8.y = Integer.valueOf(((int) v5_91.o()));
                                                            v5_91.a(v3_8.g.longValue());
                                                            v5_91.b(v3_8.h.longValue());
                                                            v3_8.z = v5_91.z();
                                                            this.d().a(v5_91);
                                                        }
                                                    } else {
                                                        this.i.r().k_().a("Bundling raw events w/o app info. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                    }
                                                    if (v3_8.d.length > 0) {
                                                        com.google.android.gms.c.c.bd v5_100;
                                                        this.i.u();
                                                        com.google.android.gms.c.c.bd v5_99 = this.p().a(v2_7.a.q);
                                                        if (v5_99 == null) {
                                                            if (!android.text.TextUtils.isEmpty(v2_7.a.A)) {
                                                                this.i.r().i().a("Did not find measurement config or missing version info. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                            } else {
                                                                v5_100 = Long.valueOf(-1);
                                                                v3_8.G = v5_100;
                                                            }
                                                        } else {
                                                            if (v5_99.c != null) {
                                                                v5_100 = v5_99.c;
                                                            } else {
                                                            }
                                                        }
                                                        this.d().a(v3_8, v34_3);
                                                    }
                                                    android.database.sqlite.SQLiteException v3_12 = this.d();
                                                    com.google.android.gms.c.c.bd v2_8 = v2_7.b;
                                                    com.google.android.gms.common.internal.z.a(v2_8);
                                                    v3_12.d();
                                                    v3_12.I();
                                                    com.google.android.gms.c.c.bd v5_110 = new StringBuilder("rowid in (");
                                                    String v6_111 = 0;
                                                    while (v6_111 < v2_8.size()) {
                                                        if (v6_111 != null) {
                                                            v5_110.append(",");
                                                        }
                                                        v5_110.append(((Long) v2_8.get(v6_111)).longValue());
                                                        v6_111++;
                                                    }
                                                    v5_110.append(")");
                                                    com.google.android.gms.c.c.bd v5_112 = v3_12.i().delete("raw_events", v5_110.toString(), 0);
                                                    if (v5_112 != v2_8.size()) {
                                                        v3_12.r().k_().a("Deleted fewer rows from raw events table than expected", Integer.valueOf(v5_112), Integer.valueOf(v2_8.size()));
                                                    }
                                                    com.google.android.gms.c.c.bd v2_11 = this.d();
                                                    android.database.sqlite.SQLiteException v3_15 = v2_11.i();
                                                    try {
                                                        String v6_117 = new String[2];
                                                        v6_117[0] = v4_29;
                                                        v6_117[1] = v4_29;
                                                        v3_15.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v6_117);
                                                    } catch (android.database.sqlite.SQLiteException v0_10) {
                                                        v2_11.r().k_().a("Failed to remove unused event metadata. appId", com.google.android.gms.c.c.bb.a(v4_29), v0_10);
                                                    }
                                                    this.d().g();
                                                    this.d().h();
                                                    return 1;
                                                }
                                            } else {
                                                v9_0.close();
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                        }
                                        if (v15_1.moveToNext()) {
                                            v4_31.r().i().a("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                        }
                                        com.google.android.gms.c.c.bd v5_56;
                                        String[] v16_2;
                                        v15_1.close();
                                        v2_7.a(v13_6);
                                        if (v5_123 == -1) {
                                            v5_56 = "app_id = ? and metadata_fingerprint = ?";
                                            int v9_16 = new String[2];
                                            v9_16[0] = v3_0;
                                            v9_16[1] = v22;
                                            v16_2 = v9_16;
                                        } else {
                                            Boolean v12_22 = new String[3];
                                            v12_22[0] = v3_0;
                                            v12_22[1] = v22;
                                            v12_22[2] = String.valueOf(v5_123);
                                            v5_56 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v16_2 = v12_22;
                                        }
                                        v9_0 = v15_1;
                                        com.google.android.gms.c.c.bd v5_58 = v25.query("raw_events", new String[] {"rowid", "name", "timestamp", "data"}), v5_56, v16_2, 0, 0, "rowid", 0);
                                        try {
                                            if (v5_58.moveToFirst()) {
                                                do {
                                                    Boolean v12_26 = v5_58.getLong(0);
                                                    int v9_20 = v5_58.getBlob(3);
                                                    int v9_21 = com.google.android.gms.c.c.a.a(v9_20, 0, v9_20.length);
                                                    long v14_9 = new com.google.android.gms.c.c.gk();
                                                    v14_9.a(v9_21);
                                                    v14_9.d = v5_58.getString(1);
                                                    v14_9.e = Long.valueOf(v5_58.getLong(2));
                                                    if (v2_7.a(v12_26, v14_9)) {
                                                    } else {
                                                        if (v5_58 == null) {
                                                        } else {
                                                        }
                                                    }
                                                } while(v5_58.moveToNext());
                                                if (v5_58 == null) {
                                                }
                                            } else {
                                                v4_31.r().i().a("Raw event data disappeared while in transaction. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                                if (v5_58 == null) {
                                                }
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_8) {
                                            com.google.android.gms.c.c.bd v2_0 = v0_8;
                                            int v21 = v5_58;
                                            if (v21 != 0) {
                                                v21.close();
                                            }
                                            throw v2_0;
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            Boolean v12_5 = v3_0;
                                            v9_0 = v5_58;
                                            android.database.sqlite.SQLiteException v3_3 = v0_1;
                                            v4_31.r().k_().a("Data loss. Error selecting raw event. appId", com.google.android.gms.c.c.bb.a(v12_5), v3_3);
                                            if (v9_0 == 0) {
                                            }
                                        }
                                        v5_58.close();
                                    } else {
                                        v4_31.r().k_().a("Raw event metadata record is missing. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                        if (v15_1 == null) {
                                        } else {
                                            v15_1.close();
                                        }
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_6) {
                                    v9_0 = v15_1;
                                    v2_0 = v0_6;
                                    v21 = v9_0;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v9_0 = v15_1;
                                } catch (android.database.sqlite.SQLiteException v0_9) {
                                    v2_0 = v0_9;
                                    v21 = v15_1;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v12_5 = v3_0;
                                    v9_0 = v15_1;
                                }
                                v12_5 = v3_0;
                            } catch (android.database.sqlite.SQLiteException v0_4) {
                                v2_0 = v0_4;
                                v21 = v23;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v12_5 = v3_0;
                                v9_0 = v23;
                            }
                        } else {
                            if (v3_0 == null) {
                            } else {
                            }
                        }
                    } else {
                        Boolean v13_18;
                        Boolean v12_39 = v5_123 cmp -1;
                        try {
                            if (v12_39 == null) {
                                v13_18 = new String[1];
                                v13_18[0] = String.valueOf(p66);
                            } else {
                                v13_18 = new String[2];
                                v13_18[0] = String.valueOf(v5_123);
                                v13_18[1] = String.valueOf(p66);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_1) {
                            v9_0 = 0;
                            v12_5 = 0;
                        }
                        Boolean v12_43;
                        if (v12_39 == null) {
                            v12_43 = "";
                        } else {
                            v12_43 = "rowid <= ? and ";
                        }
                        android.database.sqlite.SQLiteException v3_18 = new StringBuilder((String.valueOf(v12_43).length() + 148));
                        v3_18.append("select app_id, metadata_fingerprint from raw_events where ");
                        v3_18.append(v12_43);
                        v3_18.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v3_18.toString(), v13_18);
                        if (v3_0.moveToFirst()) {
                            v12_5 = v3_0.getString(0);
                            try {
                                Boolean v13_1 = v3_0.getString(1);
                                v3_0.close();
                                v23 = v3_0;
                                v3_0 = v12_5;
                                v22 = v13_1;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v9_0 = v3_0;
                            }
                        } else {
                            if (v3_0 == null) {
                            }
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_2) {
                    v2_0 = v0_2;
                    v21 = v3_0;
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    v9_0 = v3_0;
                    v12_5 = 0;
                }
                v3_0.close();
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v2_0 = v0_0;
                v21 = 0;
            } catch (android.database.sqlite.SQLiteException v0_11) {
                v3_3 = v0_11;
                v9_0 = 0;
                v12_5 = 0;
            } catch (android.database.sqlite.SQLiteException v0_6) {
            }
        } catch (android.database.sqlite.SQLiteException v0_3) {
            com.google.android.gms.c.c.bd v2_1 = v0_3;
            this.d().h();
            throw v2_1;
        }
    }

Method com.google.android.gms.c.c.ax.a() calling method android.database.sqlite.SQLiteDatabase.query()

Couldn't retrieve source code

Method com.google.android.gms.c.c.ad.g() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map g(String p13, String p14)
    {
        this.I();
        this.d();
        com.google.android.gms.common.internal.z.a(p13);
        com.google.android.gms.common.internal.z.a(p14);
        java.util.Map v0_2 = new android.support.v4.g.a();
        Integer v1_8 = this.i();
        try {
            String[] v5_1 = new String[2];
            v5_1[0] = p13;
            v5_1[1] = p14;
            int v14_1 = v1_8.query("property_filters", new String[] {"audience_id", "data"}), "app_id=? AND property_name=?", v5_1, 0, 0, 0);
            try {
                if (!v14_1.moveToFirst()) {
                    java.util.Map v0_3 = java.util.Collections.emptyMap();
                    if (v14_1 != 0) {
                        v14_1.close();
                    }
                    return v0_3;
                }
            } catch (java.util.Map v0_0) {
                this.r().k_().a("Database error querying filters. appId", com.google.android.gms.c.c.bb.a(p13), v0_0);
                if (v14_1 != 0) {
                    v14_1.close();
                }
                return 0;
            }
            do {
                Integer v1_1 = v14_1.getBlob(1);
                Integer v1_2 = com.google.android.gms.c.c.a.a(v1_1, 0, v1_1.length);
                com.google.android.gms.c.c.bd v2_2 = new com.google.android.gms.c.c.gd();
                v2_2.a(v1_2);
                Integer v1_4 = v14_1.getInt(0);
                java.util.ArrayList v3_5 = ((java.util.List) v0_2.get(Integer.valueOf(v1_4)));
                if (v3_5 == null) {
                    v3_5 = new java.util.ArrayList();
                    v0_2.put(Integer.valueOf(v1_4), v3_5);
                }
                v3_5.add(v2_2);
            } while(v14_1.moveToNext());
            if (v14_1 != 0) {
                v14_1.close();
            }
            return v0_2;
        } catch (Throwable v13_1) {
            v14_1 = 0;
            if (v14_1 != 0) {
                v14_1.close();
            }
            throw v13_1;
        } catch (java.util.Map v0_0) {
            v14_1 = 0;
        } catch (Throwable v13_1) {
        }
    }

Method com.google.android.gms.c.c.ad.f() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map f(String p13, String p14)
    {
        this.I();
        this.d();
        com.google.android.gms.common.internal.z.a(p13);
        com.google.android.gms.common.internal.z.a(p14);
        java.util.Map v0_2 = new android.support.v4.g.a();
        Integer v1_8 = this.i();
        try {
            String[] v5_1 = new String[2];
            v5_1[0] = p13;
            v5_1[1] = p14;
            int v14_1 = v1_8.query("event_filters", new String[] {"audience_id", "data"}), "app_id=? AND event_name=?", v5_1, 0, 0, 0);
            try {
                if (!v14_1.moveToFirst()) {
                    java.util.Map v0_3 = java.util.Collections.emptyMap();
                    if (v14_1 != 0) {
                        v14_1.close();
                    }
                    return v0_3;
                }
            } catch (java.util.Map v0_0) {
                this.r().k_().a("Database error querying filters. appId", com.google.android.gms.c.c.bb.a(p13), v0_0);
                if (v14_1 != 0) {
                    v14_1.close();
                }
                return 0;
            }
            do {
                Integer v1_1 = v14_1.getBlob(1);
                Integer v1_2 = com.google.android.gms.c.c.a.a(v1_1, 0, v1_1.length);
                com.google.android.gms.c.c.bd v2_2 = new com.google.android.gms.c.c.ga();
                v2_2.a(v1_2);
                Integer v1_4 = v14_1.getInt(0);
                java.util.ArrayList v3_5 = ((java.util.List) v0_2.get(Integer.valueOf(v1_4)));
                if (v3_5 == null) {
                    v3_5 = new java.util.ArrayList();
                    v0_2.put(Integer.valueOf(v1_4), v3_5);
                }
                v3_5.add(v2_2);
            } while(v14_1.moveToNext());
            if (v14_1 != 0) {
                v14_1.close();
            }
            return v0_2;
        } catch (Throwable v13_1) {
            v14_1 = 0;
            if (v14_1 != 0) {
                v14_1.close();
            }
            throw v13_1;
        } catch (java.util.Map v0_0) {
            v14_1 = 0;
        } catch (Throwable v13_1) {
        }
    }

Method com.google.android.gms.c.c.ad.e() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map e(String p12)
    {
        this.I();
        this.d();
        com.google.android.gms.common.internal.z.a(p12);
        int v0_1 = this.i();
        try {
            com.google.android.gms.c.c.bd v4_0 = new String[1];
            v4_0[0] = p12;
            int v0_0 = v0_1.query("audience_filter_values", new String[] {"audience_id", "current_results"}), "app_id=?", v4_0, 0, 0, 0);
            try {
                if (v0_0.moveToFirst()) {
                    android.support.v4.g.a v1_3 = new android.support.v4.g.a();
                    do {
                        boolean v2_1 = v0_0.getInt(0);
                        java.io.IOException v3_1 = v0_0.getBlob(1);
                        java.io.IOException v3_2 = com.google.android.gms.c.c.a.a(v3_1, 0, v3_1.length);
                        com.google.android.gms.c.c.bd v4_3 = new com.google.android.gms.c.c.go();
                        v4_3.a(v3_2);
                        v1_3.put(Integer.valueOf(v2_1), v4_3);
                    } while(v0_0.moveToNext());
                    if (v0_0 != 0) {
                        v0_0.close();
                    }
                    return v1_3;
                } else {
                    if (v0_0 != 0) {
                        v0_0.close();
                    }
                    return 0;
                }
            } catch (android.support.v4.g.a v1_0) {
                this.r().k_().a("Database error querying filter results. appId", com.google.android.gms.c.c.bb.a(p12), v1_0);
                if (v0_0 != 0) {
                    v0_0.close();
                }
                return 0;
            }
        } catch (Throwable v12_1) {
            v0_0 = 0;
            if (v0_0 != 0) {
                v0_0.close();
            }
            throw v12_1;
        } catch (android.support.v4.g.a v1_0) {
            v0_0 = 0;
        } catch (Throwable v12_1) {
        }
    }

Method com.google.android.gms.c.c.ad.d() calling method android.database.sqlite.SQLiteDatabase.query()


    public final byte[] d(String p11)
    {
        com.google.android.gms.common.internal.z.a(p11);
        this.d();
        this.I();
        try {
            int v1_1 = this.i();
            Object v5_1 = new String[1];
            v5_1[0] = p11;
            int v1_0 = v1_1.query("apps", new String[] {"remote_config"}), "app_id=?", v5_1, 0, 0, 0);
            try {
                if (v1_0.moveToFirst()) {
                    byte[] v2_2 = v1_0.getBlob(0);
                    if (v1_0.moveToNext()) {
                        this.r().k_().a("Got multiple records for app config, expected one. appId", com.google.android.gms.c.c.bb.a(p11));
                    }
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    return v2_2;
                } else {
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    return 0;
                }
            } catch (byte[] v2_0) {
                this.r().k_().a("Error querying remote config. appId", com.google.android.gms.c.c.bb.a(p11), v2_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                return 0;
            }
        } catch (Throwable v11_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v11_1;
        } catch (byte[] v2_0) {
            v1_0 = 0;
        } catch (Throwable v11_1) {
        }
    }

Method com.google.android.gms.c.c.ad.d() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.c.c.y d(String p30, String p31)
    {
        com.google.android.gms.common.internal.z.a(p30);
        com.google.android.gms.common.internal.z.a(p31);
        this.d();
        this.I();
        try {
            int v9_1 = this.i();
            String[] v13 = "active";
            String v15 = "trigger_timeout";
            com.google.android.gms.c.c.ft v17 = "creation_timestamp";
            String v19 = "triggered_timestamp";
            v13 = new String[2];
            v13[0] = p30;
            v13[1] = p31;
            int v9_0 = v9_1.query("conditional_properties", new String[] {"origin", "expired_event"}), "app_id=? and name=?", v13, 0, 0, 0);
            try {
                if (v9_0.moveToFirst()) {
                    String v16_1 = v9_0.getString(0);
                    try {
                        int v20;
                        Object v5 = this.a(v9_0, 1);
                    } catch (com.google.android.gms.c.c.y v0_1) {
                        this.r().k_().a("Error querying conditional property", com.google.android.gms.c.c.bb.a(p30), this.o().c(p31), v0_1);
                        if (v9_0 != 0) {
                            v9_0.close();
                        }
                        return 0;
                    }
                    if (v9_0.getInt(2) == 0) {
                        v20 = 0;
                    } else {
                        v20 = 1;
                    }
                    String v21_1 = v9_0.getString(3);
                    long v23 = v9_0.getLong(4);
                    com.google.android.gms.c.c.aq v22_1 = ((com.google.android.gms.c.c.aq) this.i_().a(v9_0.getBlob(5), com.google.android.gms.c.c.aq.CREATOR));
                    long v18 = v9_0.getLong(6);
                    com.google.android.gms.c.c.aq v25_1 = ((com.google.android.gms.c.c.aq) this.i_().a(v9_0.getBlob(7), com.google.android.gms.c.c.aq.CREATOR));
                    Object v3_3 = v9_0.getLong(8);
                    long v26 = v9_0.getLong(9);
                    com.google.android.gms.c.c.aq v28_1 = ((com.google.android.gms.c.c.aq) this.i_().a(v9_0.getBlob(10), com.google.android.gms.c.c.aq.CREATOR));
                    v17 = new com.google.android.gms.c.c.ft;
                    v17(p31, v3_3, v5, v16_1);
                    com.google.android.gms.c.c.y v0_0 = new com.google.android.gms.c.c.y;
                    v0_0(p30, v16_1, v17, v18, v20, v21_1, v22_1, v23, v25_1, v26, v28_1);
                    if (v9_0.moveToNext()) {
                        this.r().k_().a("Got multiple records for conditional property, expected one", com.google.android.gms.c.c.bb.a(p30), this.o().c(p31));
                    }
                    if (v9_0 != 0) {
                        v9_0.close();
                    }
                    return v0_0;
                } else {
                    if (v9_0 != 0) {
                        v9_0.close();
                    }
                    return 0;
                }
            } catch (com.google.android.gms.c.c.y v0_2) {
                if (v9_0 != 0) {
                    v9_0.close();
                }
                throw v0_2;
            } catch (com.google.android.gms.c.c.y v0_1) {
            }
        } catch (com.google.android.gms.c.c.y v0_2) {
            v9_0 = 0;
        } catch (com.google.android.gms.c.c.y v0_1) {
            v9_0 = 0;
        } catch (com.google.android.gms.c.c.y v0_2) {
        }
    }

Method com.google.android.gms.c.c.ad.c() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.c.c.fv c(String p19, String p20)
    {
        com.google.android.gms.common.internal.z.a(p19);
        com.google.android.gms.common.internal.z.a(p20);
        this.d();
        this.I();
        try {
            int v10_1 = this.i();
            String[] v14 = new String[2];
            v14[0] = p19;
            v14[1] = p20;
            int v10_0 = v10_1.query("user_attributes", new String[] {"set_timestamp", "value", "origin"}), "app_id=? and name=?", v14, 0, 0, 0);
            try {
                if (v10_0.moveToFirst()) {
                    try {
                        android.database.sqlite.SQLiteException v0_3 = new com.google.android.gms.c.c.fv;
                        v0_3(p19, v10_0.getString(2), p20, v10_0.getLong(0), this.a(v10_0, 1));
                    } catch (android.database.sqlite.SQLiteException v0_1) {
                        this.r().k_().a("Error querying user property. appId", com.google.android.gms.c.c.bb.a(p19), this.o().c(p20), v0_1);
                        if (v10_0 != 0) {
                            v10_0.close();
                        }
                        return 0;
                    }
                    if (v10_0.moveToNext()) {
                        this.r().k_().a("Got multiple records for user property, expected one. appId", com.google.android.gms.c.c.bb.a(p19));
                    }
                    if (v10_0 != 0) {
                        v10_0.close();
                    }
                    return v0_3;
                } else {
                    if (v10_0 != 0) {
                        v10_0.close();
                    }
                    return 0;
                }
            } catch (android.database.sqlite.SQLiteException v0_2) {
                if (v10_0 != 0) {
                    v10_0.close();
                }
                throw v0_2;
            } catch (android.database.sqlite.SQLiteException v0_1) {
            }
        } catch (android.database.sqlite.SQLiteException v0_2) {
            v10_0 = 0;
        } catch (android.database.sqlite.SQLiteException v0_1) {
            v10_0 = 0;
        } catch (android.database.sqlite.SQLiteException v0_2) {
        }
    }

Method com.google.android.gms.c.c.ad.b() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.c.c.t b(String p31)
    {
        com.google.android.gms.common.internal.z.a(p31);
        this.d();
        this.I();
        try {
            int v3_1 = this.i();
            Object v7 = "resettable_device_id_hash";
            int v9 = "last_bundle_start_timestamp";
            int v11 = "app_version";
            String v13 = "gmp_version";
            String v15 = "measurement_enabled";
            String v17 = "daily_public_events_count";
            String v19 = "daily_conversions_count";
            String v21 = "failed_config_fetch_time";
            String v23 = "firebase_instance_id";
            String v25 = "daily_realtime_events_count";
            String v27 = "android_id";
            com.google.android.gms.c.c.bd v0_0 = 1;
            Object v7_6 = new String[1];
            v7_6[0] = p31;
            int v3_0 = v3_1.query("apps", new String[] {"app_instance_id", "ssaid_reporting_enabled"}), "app_id=?", v7_6, 0, 0, 0);
            try {
                if (v3_0.moveToFirst()) {
                    try {
                        String v6_3;
                        com.google.android.gms.c.c.t v4_4 = new com.google.android.gms.c.c.t(this.a.o(), p31);
                        v4_4.a(v3_0.getString(0));
                        v4_4.b(v3_0.getString(1));
                        v4_4.c(v3_0.getString(2));
                        v4_4.f(v3_0.getLong(3));
                        v4_4.a(v3_0.getLong(4));
                        v4_4.b(v3_0.getLong(5));
                        v4_4.e(v3_0.getString(6));
                        v4_4.f(v3_0.getString(7));
                        v4_4.d(v3_0.getLong(8));
                        v4_4.e(v3_0.getLong(9));
                    } catch (com.google.android.gms.c.c.bd v0_4) {
                        this.r().k_().a("Error querying app. appId", com.google.android.gms.c.c.bb.a(p31), v0_4);
                        if (v3_0 != 0) {
                            v3_0.close();
                        }
                        return 0;
                    }
                    if (v3_0.isNull(10)) {
                        v6_3 = 1;
                    } else {
                        if (v3_0.getInt(10) == 0) {
                            v6_3 = 0;
                        } else {
                        }
                    }
                    String v6_18;
                    v4_4.a(v6_3);
                    v4_4.i(v3_0.getLong(11));
                    v4_4.j(v3_0.getLong(12));
                    v4_4.k(v3_0.getLong(13));
                    v4_4.l(v3_0.getLong(14));
                    v4_4.g(v3_0.getLong(15));
                    v4_4.h(v3_0.getLong(16));
                    if (!v3_0.isNull(17)) {
                        v6_18 = ((long) v3_0.getInt(17));
                    } else {
                        v6_18 = -2147483648;
                    }
                    String v6_28;
                    v4_4.c(v6_18);
                    v4_4.d(v3_0.getString(18));
                    v4_4.n(v3_0.getLong(19));
                    v4_4.m(v3_0.getLong(20));
                    v4_4.g(v3_0.getString(21));
                    if (!v3_0.isNull(22)) {
                        v6_28 = v3_0.getLong(22);
                    } else {
                        v6_28 = 0;
                    }
                    String v6_31;
                    v4_4.o(v6_28);
                    if (v3_0.isNull(23)) {
                        v6_31 = 1;
                    } else {
                        if (v3_0.getInt(23) == 0) {
                            v6_31 = 0;
                        } else {
                        }
                    }
                    v4_4.b(v6_31);
                    if (!v3_0.isNull(24)) {
                        if (v3_0.getInt(24) == 0) {
                            v0_0 = 0;
                        } else {
                        }
                    }
                    v4_4.c(v0_0);
                    v4_4.a();
                    if (v3_0.moveToNext()) {
                        this.r().k_().a("Got multiple records for app, expected one. appId", com.google.android.gms.c.c.bb.a(p31));
                    }
                    if (v3_0 != 0) {
                        v3_0.close();
                    }
                    return v4_4;
                } else {
                    if (v3_0 != 0) {
                        v3_0.close();
                    }
                    return 0;
                }
            } catch (com.google.android.gms.c.c.bd v0_5) {
                if (v3_0 != 0) {
                    v3_0.close();
                }
                throw v0_5;
            } catch (com.google.android.gms.c.c.bd v0_4) {
            }
        } catch (com.google.android.gms.c.c.bd v0_5) {
            v3_0 = 0;
        } catch (com.google.android.gms.c.c.bd v0_4) {
            v3_0 = 0;
        } catch (com.google.android.gms.c.c.bd v0_5) {
        }
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p25, String[] p26)
    {
        this.d();
        this.I();
        android.database.sqlite.SQLiteException v0_4 = new java.util.ArrayList();
        boolean v1_4 = 0;
        try {
            com.google.android.gms.c.c.ft v6 = "name";
            int v8 = "active";
            String v10 = "trigger_timeout";
            long v12 = "creation_timestamp";
            com.google.android.gms.c.c.aq v14 = "triggered_timestamp";
            com.google.android.gms.c.c.bd v2_2 = this.i().query("conditional_properties", new String[] {"app_id", "expired_event"}), p25, p26, 0, 0, "rowid", "1001");
            try {
                if (!v2_2.moveToFirst()) {
                    if (v2_2 != null) {
                        v2_2.close();
                    }
                    return v0_4;
                }
            } catch (android.database.sqlite.SQLiteException v0_2) {
                if (v2_2 != null) {
                    v2_2.close();
                }
                throw v0_2;
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v1_4 = v2_2;
                this.r().k_().a("Error querying conditional user property value", v0_0);
                android.database.sqlite.SQLiteException v0_1 = java.util.Collections.emptyList();
                if (v1_4) {
                    v1_4.close();
                }
                return v0_1;
            }
            while (v0_4.size() < 1000) {
                boolean v1_7 = 0;
                String v4_2 = v2_2.getString(0);
                com.google.android.gms.c.c.aq v11_1 = v2_2.getString(1);
                com.google.android.gms.c.c.ft v6_2 = v2_2.getString(2);
                int v9_2 = this.a(v2_2, 3);
                if (v2_2.getInt(4) != 0) {
                    v1_7 = 1;
                }
                long v12_1 = v2_2.getString(5);
                long v13 = v2_2.getLong(6);
                com.google.android.gms.c.c.aq v16_2 = ((com.google.android.gms.c.c.aq) this.i_().a(v2_2.getBlob(7), com.google.android.gms.c.c.aq.CREATOR));
                com.google.android.gms.c.c.aq v17_1 = v2_2.getLong(8);
                com.google.android.gms.c.c.aq v19_1 = ((com.google.android.gms.c.c.aq) this.i_().a(v2_2.getBlob(9), com.google.android.gms.c.c.aq.CREATOR));
                long v7_4 = v2_2.getLong(10);
                long v20 = v2_2.getLong(11);
                com.google.android.gms.c.c.aq v22_1 = ((com.google.android.gms.c.c.aq) this.i_().a(v2_2.getBlob(12), com.google.android.gms.c.c.aq.CREATOR));
                com.google.android.gms.c.c.ft v23 = new com.google.android.gms.c.c.ft;
                v23(v6_2, v7_4, v9_2, v11_1);
                String v10_1 = new com.google.android.gms.c.c.y;
                boolean v1_0 = v10_1;
                v10_1(v4_2, v11_1, v23, v17_1, v1_7, v12_1, v16_2, v13, v19_1, v20, v22_1);
                v0_4.add(v1_0);
                if (!v2_2.moveToNext()) {
                }
                if (v2_2 != null) {
                    v2_2.close();
                }
                return v0_4;
            }
            this.r().k_().a("Read more than the max allowed conditional properties, ignoring extra", Integer.valueOf(1000));
        } catch (android.database.sqlite.SQLiteException v0_2) {
            v2_2 = v1_4;
        } catch (android.database.sqlite.SQLiteException v0_0) {
        }
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p22, String p23, String p24)
    {
        com.google.android.gms.common.internal.z.a(p22);
        this.d();
        this.I();
        android.database.sqlite.SQLiteException v0_3 = new java.util.ArrayList();
        android.database.Cursor v1 = 0;
        try {
            android.database.Cursor v2_4 = new java.util.ArrayList(3);
            try {
                String v5_1;
                v2_4.add(p22);
                boolean v4_4 = new StringBuilder("app_id=?");
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v5_1 = p23;
                android.database.Cursor v2_3 = 0;
                this.r().k_().a("(2)Error querying user properties", com.google.android.gms.c.c.bb.a(p22), v5_1, v0_0);
                if (v2_3 != null) {
                    v2_3.close();
                }
                return 0;
            }
            if (android.text.TextUtils.isEmpty(p23)) {
                v5_1 = p23;
            } else {
                v5_1 = p23;
                v2_4.add(p23);
                v4_4.append(" and origin=?");
            }
            if (!android.text.TextUtils.isEmpty(p24)) {
                v2_4.add(String.valueOf(p24).concat("*"));
                v4_4.append(" and name glob ?");
            }
            String v6_9 = new String[v2_4.size()];
            v2_3 = this.i().query("user_attributes", new String[] {"name", "set_timestamp", "value", "origin"}), v4_4.toString(), ((String[]) v2_4.toArray(v6_9)), 0, 0, "rowid", "1001");
            try {
                if (!v2_3.moveToFirst()) {
                    if (v2_3 != null) {
                        v2_3.close();
                    }
                    return v0_3;
                }
            } catch (android.database.sqlite.SQLiteException v0_1) {
                v1 = v2_3;
                if (v1 != null) {
                    v1.close();
                }
                throw v0_1;
            } catch (android.database.sqlite.SQLiteException v0_0) {
            }
            while (v0_3.size() < 1000) {
                String v7_2 = v2_3.getString(0);
                long v8_1 = v2_3.getLong(1);
                try {
                    Object v10 = this.a(v2_3, 2);
                    String v13_1 = v2_3.getString(3);
                } catch (android.database.sqlite.SQLiteException v0_0) {
                }
                if (v10 != null) {
                    com.google.android.gms.c.c.fv v15_1 = new com.google.android.gms.c.c.fv;
                    v15_1(p22, v13_1, v7_2, v8_1, v10);
                    v0_3.add(v15_1);
                } else {
                    this.r().k_().a("(2)Read invalid user property value, ignoring it", com.google.android.gms.c.c.bb.a(p22), v13_1, p24);
                }
                if (v2_3.moveToNext()) {
                    v5_1 = v13_1;
                }
                if (v2_3 != null) {
                    v2_3.close();
                }
                return v0_3;
            }
            this.r().k_().a("Read more than the max allowed user properties, ignoring excess", Integer.valueOf(1000));
        } 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 com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p13, int p14, int p15)
    {
        java.util.ArrayList v2_5;
        this.d();
        this.I();
        if (p14 <= null) {
            v2_5 = 0;
        } else {
            v2_5 = 1;
        }
        java.util.ArrayList v2_0;
        com.google.android.gms.common.internal.z.b(v2_5);
        if (p15 <= null) {
            v2_0 = 0;
        } else {
            v2_0 = 1;
        }
        com.google.android.gms.common.internal.z.b(v2_0);
        com.google.android.gms.common.internal.z.a(p13);
        java.util.ArrayList v2_1 = 0;
        try {
            int v3_0 = this.i();
            Integer v7_1 = new String[1];
            v7_1[0] = p13;
            com.google.android.gms.c.c.bd v14_1 = v3_0.query("queue", new String[] {"rowid", "data", "retry_count"}), "app_id=?", v7_1, 0, 0, "rowid", String.valueOf(p14));
            try {
                if (v14_1.moveToFirst()) {
                    java.util.ArrayList v2_4 = new java.util.ArrayList();
                    int v3_1 = 0;
                    do {
                        android.util.Pair v4_2 = v14_1.getLong(0);
                        int v6_3 = this.i_().a(v14_1.getBlob(1));
                        if ((!v2_4.isEmpty()) && ((v6_3.length + v3_1) > p15)) {
                            break;
                        }
                        Integer v7_8 = com.google.android.gms.c.c.a.a(v6_3, 0, v6_3.length);
                        com.google.android.gms.c.c.gn v8_2 = new com.google.android.gms.c.c.gn();
                        v8_2.a(v7_8);
                        if (!v14_1.isNull(2)) {
                            v8_2.J = Integer.valueOf(v14_1.getInt(2));
                        }
                        v3_1 += v6_3.length;
                        v2_4.add(android.util.Pair.create(v8_2, Long.valueOf(v4_2)));
                    } while((v14_1.moveToNext()) && (v3_1 <= p15));
                    if (v14_1 != null) {
                        v14_1.close();
                    }
                    return v2_4;
                } else {
                    java.util.List v15_1 = java.util.Collections.emptyList();
                    if (v14_1 != null) {
                        v14_1.close();
                    }
                    return v15_1;
                }
            } catch (Throwable v13_3) {
                if (v14_1 != null) {
                    v14_1.close();
                }
                throw v13_3;
            } catch (java.util.List v15_2) {
                v2_1 = v14_1;
                this.r().k_().a("Error querying bundles. appId", com.google.android.gms.c.c.bb.a(p13), v15_2);
                Throwable v13_2 = java.util.Collections.emptyList();
                if (v2_1 != null) {
                    v2_1.close();
                }
                return v13_2;
            }
        } catch (Throwable v13_3) {
            v14_1 = v2_1;
        } catch (java.util.List v15_2) {
        }
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p14)
    {
        com.google.android.gms.common.internal.z.a(p14);
        this.d();
        this.I();
        android.database.sqlite.SQLiteException v0_2 = new java.util.ArrayList();
        try {
            int v2_1 = this.i();
            String v6_1 = new String[1];
            v6_1[0] = p14;
            int v2_0 = v2_1.query("user_attributes", new String[] {"name", "origin", "set_timestamp", "value"}), "app_id=?", v6_1, 0, 0, "rowid", "1000");
            try {
                if (!v2_0.moveToFirst()) {
                    if (v2_0 != 0) {
                        v2_0.close();
                    }
                    return v0_2;
                }
            } catch (android.database.sqlite.SQLiteException v0_0) {
                this.r().k_().a("Error querying user properties. appId", com.google.android.gms.c.c.bb.a(p14), v0_0);
                if (v2_0 != 0) {
                    v2_0.close();
                }
                return 0;
            }
            do {
                String v7_2 = v2_0.getString(0);
                boolean v3_1 = v2_0.getString(1);
                if (!v3_1) {
                    v3_1 = "";
                }
                String v6_2 = v3_1;
                long v8_1 = v2_0.getLong(2);
                Object v10_1 = this.a(v2_0, 3);
                if (v10_1 != null) {
                    boolean v3_4 = new com.google.android.gms.c.c.fv;
                    v3_4(p14, v6_2, v7_2, v8_1, v10_1);
                    v0_2.add(v3_4);
                } else {
                    this.r().k_().a("Read invalid user property value, ignoring it. appId", com.google.android.gms.c.c.bb.a(p14));
                }
            } while(v2_0.moveToNext());
            if (v2_0 != 0) {
                v2_0.close();
            }
            return v0_2;
        } catch (Throwable v14_1) {
            v2_0 = 0;
            if (v2_0 != 0) {
                v2_0.close();
            }
            throw v14_1;
        } catch (android.database.sqlite.SQLiteException v0_0) {
            v2_0 = 0;
        } catch (Throwable v14_1) {
        }
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.c.c.am a(String p22, String p23)
    {
        com.google.android.gms.common.internal.z.a(p22);
        com.google.android.gms.common.internal.z.a(p23);
        this.d();
        this.I();
        try {
            String v1_9 = this.i();
            String[] v5 = "last_fire_timestamp";
            int v7 = "last_sampled_complex_event_id";
            v5 = new String[2];
            int v9_1 = 0;
            v5[0] = p22;
            v5[1] = p23;
            Boolean v14_0 = v1_9.query("events", new String[] {"lifetime_count", "last_exempt_from_sampling"}), "app_id=? and name=?", v5, 0, 0, 0);
            try {
                if (v14_0.moveToFirst()) {
                    com.google.android.gms.c.c.bd v0_6;
                    long v4_3 = v14_0.getLong(0);
                    long v6_1 = v14_0.getLong(1);
                    long v11 = v14_0.getLong(2);
                    if (!v14_0.isNull(3)) {
                        v0_6 = v14_0.getLong(3);
                    } else {
                        v0_6 = 0;
                    }
                    android.database.Cursor v17_1 = v0_6;
                    com.google.android.gms.c.c.bd v0_9;
                    if (!v14_0.isNull(4)) {
                        v0_9 = Long.valueOf(v14_0.getLong(4));
                    } else {
                        v0_9 = 0;
                    }
                    Long v13;
                    if (!v14_0.isNull(5)) {
                        v13 = Long.valueOf(v14_0.getLong(5));
                    } else {
                        v13 = 0;
                    }
                    Boolean v19_0;
                    if (v14_0.isNull(6)) {
                        v19_0 = 0;
                    } else {
                        if (v14_0.getLong(6) == 1) {
                            v9_1 = 1;
                        }
                        v19_0 = Boolean.valueOf(v9_1);
                    }
                    com.google.android.gms.c.c.am v20 = new com.google.android.gms.c.c.am;
                    android.database.Cursor v17_0 = v14_0;
                    try {
                        v20(p22, p23, v4_3, v6_1, v11, v17_1, v0_9, v13, v19_0);
                    } catch (com.google.android.gms.c.c.bd v0_2) {
                        this.r().k_().a("Error querying events. appId", com.google.android.gms.c.c.bb.a(p22), this.o().a(p23), v0_2);
                        if (v17_0 != null) {
                            v17_0.close();
                        }
                        return 0;
                    }
                    if (v17_0.moveToNext()) {
                        this.r().k_().a("Got multiple records for event aggregates, expected one. appId", com.google.android.gms.c.c.bb.a(p22));
                    }
                    if (v17_0 != null) {
                        v17_0.close();
                    }
                    return v20;
                } else {
                    if (v14_0 != null) {
                        v14_0.close();
                    }
                    return 0;
                }
            } catch (com.google.android.gms.c.c.bd v0_3) {
                v17_0 = v14_0;
                if (v17_0 != null) {
                    v17_0.close();
                }
                throw v0_3;
            } catch (com.google.android.gms.c.c.bd v0_2) {
                v17_0 = v14_0;
            }
        } catch (com.google.android.gms.c.c.bd v0_3) {
            v17_0 = 0;
        } catch (com.google.android.gms.c.c.bd v0_2) {
            v17_0 = 0;
        } catch (com.google.android.gms.c.c.bd v0_3) {
        }
    }

Method com.google.android.gms.c.c.ad.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.c.c.ae a(long p16, String p18, boolean p19, boolean p20, boolean p21, boolean p22, boolean p23)
    {
        com.google.android.gms.common.internal.z.a(p18);
        this.d();
        this.I();
        String v2_1 = new String[1];
        v2_1[0] = p18;
        com.google.android.gms.c.c.ae v4_1 = new com.google.android.gms.c.c.ae();
        String v5_8 = 0;
        try {
            android.database.sqlite.SQLiteDatabase v14 = this.i();
            String[] v10 = "daily_public_events_count";
            int v12 = "daily_error_events_count";
            v10 = new String[1];
            v10[0] = p18;
            int v6_1 = v14.query("apps", new String[] {"day", "daily_realtime_events_count"}), "app_id=?", v10, 0, 0, 0);
            try {
                if (v6_1.moveToFirst()) {
                    if (v6_1.getLong(0) == p16) {
                        v4_1.b = v6_1.getLong(1);
                        v4_1.a = v6_1.getLong(2);
                        v4_1.c = v6_1.getLong(3);
                        v4_1.d = v6_1.getLong(4);
                        v4_1.e = v6_1.getLong(5);
                    }
                    if (p19) {
                        v4_1.b = (v4_1.b + 1);
                    }
                    if (p20) {
                        v4_1.a = (v4_1.a + 1);
                    }
                    if (p21) {
                        v4_1.c = (v4_1.c + 1);
                    }
                    if (p22) {
                        v4_1.d = (v4_1.d + 1);
                    }
                    if (p23) {
                        v4_1.e = (v4_1.e + 1);
                    }
                    android.content.ContentValues v0_1 = new android.content.ContentValues();
                    v0_1.put("day", Long.valueOf(p16));
                    v0_1.put("daily_public_events_count", Long.valueOf(v4_1.a));
                    v0_1.put("daily_events_count", Long.valueOf(v4_1.b));
                    v0_1.put("daily_conversions_count", Long.valueOf(v4_1.c));
                    v0_1.put("daily_error_events_count", Long.valueOf(v4_1.d));
                    v0_1.put("daily_realtime_events_count", Long.valueOf(v4_1.e));
                    v14.update("apps", v0_1, "app_id=?", v2_1);
                    if (v6_1 != 0) {
                        v6_1.close();
                    }
                    return v4_1;
                } else {
                    this.r().i().a("Not updating daily counts, app is not known. appId", com.google.android.gms.c.c.bb.a(p18));
                    if (v6_1 != 0) {
                        v6_1.close();
                    }
                    return v4_1;
                }
            } catch (android.content.ContentValues v0_10) {
                if (v6_1 != 0) {
                    v6_1.close();
                }
                throw v0_10;
            } catch (android.content.ContentValues v0_5) {
                v5_8 = v6_1;
                this.r().k_().a("Error updating daily counts. appId", com.google.android.gms.c.c.bb.a(p18), v0_5);
                if (v5_8 != null) {
                    v5_8.close();
                }
                return v4_1;
            }
        } catch (android.content.ContentValues v0_10) {
            v6_1 = v5_8;
        } catch (android.content.ContentValues v0_5) {
        }
    }

Method com.google.android.gms.c.c.fm.a() calling method android.database.sqlite.SQLiteDatabase.query()


    private final boolean a(String p65, long p66)
    {
        this.d().f();
        try {
            android.database.sqlite.SQLiteException v3_0 = 0;
            com.google.android.gms.c.c.bd v2_7 = new ark>com.google.android.gms.c.c.fmark>$a(this, 0);
            Object v4_31 = this.d();
            com.google.android.gms.c.c.bd v5_123 = this.w;
            com.google.android.gms.common.internal.z.a(v2_7);
            v4_31.d();
            v4_31.I();
            try {
                String v22;
                int v23;
                Long v15_2 = v4_31.i();
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        Boolean v12_30;
                        android.database.sqlite.SQLiteException v3_2 = v5_123 cmp -1;
                        if (v3_2 == null) {
                            v12_30 = new String[] {0});
                        } else {
                            v12_30 = new String[2];
                            v12_30[0] = 0;
                            v12_30[1] = String.valueOf(v5_123);
                        }
                        android.database.sqlite.SQLiteException v3_9;
                        if (v3_2 == null) {
                            v3_9 = "";
                        } else {
                            v3_9 = " and rowid <= ?";
                        }
                        long v14_12 = new StringBuilder((String.valueOf(v3_9).length() + 84));
                        v14_12.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v14_12.append(v3_9);
                        v14_12.append(" order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v14_12.toString(), v12_30);
                        if (v3_0.moveToFirst()) {
                            Boolean v13_17 = v3_0.getString(0);
                            v3_0.close();
                            v23 = v3_0;
                            v22 = v13_17;
                            v3_0 = 0;
                            try {
                                Boolean v12_11 = new String[2];
                                v12_11[0] = v3_0;
                                v12_11[1] = v22;
                                android.database.sqlite.SQLiteDatabase v25 = v15_2;
                                Long v15_1 = v15_2.query("raw_events_metadata", new String[] {"metadata"}), "app_id = ? and metadata_fingerprint = ?", v12_11, 0, 0, "rowid", "2");
                                try {
                                    if (v15_1.moveToFirst()) {
                                        Boolean v12_16 = v15_1.getBlob(0);
                                        Boolean v12_17 = com.google.android.gms.c.c.a.a(v12_16, 0, v12_16.length);
                                        Boolean v13_6 = new com.google.android.gms.c.c.gn();
                                        try {
                                            v13_6.a(v12_17);
                                        } catch (android.database.sqlite.SQLiteException v0_5) {
                                            int v9_0 = v15_1;
                                            v4_31.r().k_().a("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.c.c.bb.a(v3_0), v0_5);
                                            if (v9_0 == 0) {
                                                android.database.sqlite.SQLiteException v3_7;
                                                if (v2_7.c == null) {
                                                    v3_7 = 1;
                                                } else {
                                                    if (!v2_7.c.isEmpty()) {
                                                        v3_7 = 0;
                                                    } else {
                                                    }
                                                }
                                                if (v3_7 != null) {
                                                    this.d().g();
                                                    this.d().h();
                                                    return 0;
                                                } else {
                                                    android.database.sqlite.SQLiteException v3_8 = v2_7.a;
                                                    Object v4_4 = new com.google.android.gms.c.c.gk[v2_7.c.size()];
                                                    v3_8.d = v4_4;
                                                    Object v4_7 = this.i.b().e(v3_8.q);
                                                    int v9_13 = 0;
                                                    Boolean v12_9 = 0;
                                                    Boolean v13_3 = 0;
                                                    long v14_2 = 0;
                                                    while (v9_13 < v2_7.c.size()) {
                                                        String[] v44;
                                                        int v7_3 = ((com.google.android.gms.c.c.gk) v2_7.c.get(v9_13));
                                                        if (!this.p().b(v2_7.a.q, v7_3.d)) {
                                                            com.google.android.gms.c.c.bd v5_4 = this.p().c(v2_7.a.q, v7_3.d);
                                                            if (v5_4 != null) {
                                                                if (v7_3.c == null) {
                                                                    com.google.android.gms.c.c.am v8_4 = new com.google.android.gms.c.c.gl[0];
                                                                    v7_3.c = v8_4;
                                                                }
                                                                String v6_11 = v7_3.c;
                                                                com.google.android.gms.c.c.am v8_5 = v6_11.length;
                                                                boolean v10_5 = 0;
                                                                long v11_3 = 0;
                                                                long v18_0 = 0;
                                                                while (v10_5 < v8_5) {
                                                                    int v32_1 = v8_5;
                                                                    com.google.android.gms.c.c.am v8_46 = v6_11[v10_5];
                                                                    int v33_1 = v6_11;
                                                                    int v34_2 = v12_9;
                                                                    if (!"_c".equals(v8_46.c)) {
                                                                        if ("_r".equals(v8_46.c)) {
                                                                            v8_46.e = Long.valueOf(1);
                                                                            v18_0 = 1;
                                                                        }
                                                                    } else {
                                                                        v8_46.e = Long.valueOf(1);
                                                                        v11_3 = 1;
                                                                    }
                                                                    v10_5++;
                                                                    v8_5 = v32_1;
                                                                    v6_11 = v33_1;
                                                                    v12_9 = v34_2;
                                                                }
                                                                int v34_0 = v12_9;
                                                                if ((v11_3 == 0) && (v5_4 != null)) {
                                                                    this.i.r().w().a("Marking event as conversion", this.i.l().a(v7_3.d));
                                                                    String v6_17 = ((com.google.android.gms.c.c.gl[]) java.util.Arrays.copyOf(v7_3.c, (v7_3.c.length + 1)));
                                                                    com.google.android.gms.c.c.am v8_11 = new com.google.android.gms.c.c.gl();
                                                                    v8_11.c = "_c";
                                                                    v8_11.e = Long.valueOf(1);
                                                                    v6_17[(v6_17.length - 1)] = v8_11;
                                                                    v7_3.c = v6_17;
                                                                }
                                                                if (v18_0 == 0) {
                                                                    this.i.r().w().a("Marking event as real-time", this.i.l().a(v7_3.d));
                                                                    String v6_23 = ((com.google.android.gms.c.c.gl[]) java.util.Arrays.copyOf(v7_3.c, (v7_3.c.length + 1)));
                                                                    com.google.android.gms.c.c.am v8_17 = new com.google.android.gms.c.c.gl();
                                                                    v8_17.c = "_r";
                                                                    v8_17.e = Long.valueOf(1);
                                                                    v6_23[(v6_23.length - 1)] = v8_17;
                                                                    v7_3.c = v6_23;
                                                                }
                                                                v44 = v9_13;
                                                                if (this.d().a(this.w(), v2_7.a.q, 0, 0, 0, 0, 1).e <= ((long) this.i.b().a(v2_7.a.q))) {
                                                                    v12_9 = 1;
                                                                } else {
                                                                    String v6_31 = 0;
                                                                    while (v6_31 < v7_3.c.length) {
                                                                        if (!"_r".equals(v7_3.c[v6_31].c)) {
                                                                            v6_31++;
                                                                        } else {
                                                                            com.google.android.gms.c.c.am v8_28 = new com.google.android.gms.c.c.gl[(v7_3.c.length - 1)];
                                                                            if (v6_31 > null) {
                                                                                System.arraycopy(v7_3.c, 0, v8_28, 0, v6_31);
                                                                            }
                                                                            if (v6_31 < v8_28.length) {
                                                                                System.arraycopy(v7_3.c, (v6_31 + 1), v8_28, v6_31, (v8_28.length - v6_31));
                                                                            }
                                                                            v7_3.c = v8_28;
                                                                            break;
                                                                        }
                                                                    }
                                                                    v12_9 = v34_0;
                                                                }
                                                                if ((com.google.android.gms.c.c.fw.a(v7_3.d)) && ((v5_4 != null) && (this.d().a(this.w(), v2_7.a.q, 0, 0, 1, 0, 0).c > ((long) this.i.b().b(v2_7.a.q, com.google.android.gms.c.c.as.v))))) {
                                                                    this.i.r().i().a("Too many conversions. Not logging as conversion. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                                    com.google.android.gms.c.c.bd v5_13 = v7_3.c;
                                                                    String v6_35 = v5_13.length;
                                                                    com.google.android.gms.c.c.am v8_36 = 0;
                                                                    int v9_11 = 0;
                                                                    boolean v10_26 = 0;
                                                                    while (v8_36 < v6_35) {
                                                                        long v11_10 = v5_13[v8_36];
                                                                        if (!"_c".equals(v11_10.c)) {
                                                                            if ("_err".equals(v11_10.c)) {
                                                                                v9_11 = 1;
                                                                            }
                                                                        } else {
                                                                            v10_26 = v11_10;
                                                                        }
                                                                        v8_36++;
                                                                    }
                                                                    if ((v9_11 == 0) || (!v10_26)) {
                                                                        if (!v10_26) {
                                                                            this.i.r().k_().a("Did not find conversion parameter. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                                        } else {
                                                                            v10_26.c = "_err";
                                                                            v10_26.e = Long.valueOf(10);
                                                                        }
                                                                    } else {
                                                                        com.google.android.gms.c.c.bd v5_20 = v7_3.c;
                                                                        com.google.android.gms.c.c.am v8_40 = new com.google.android.gms.c.c.gl[1];
                                                                        v8_40[0] = v10_26;
                                                                        v7_3.c = ((com.google.android.gms.c.c.gl[]) com.google.android.gms.common.util.b.a(v5_20, v8_40));
                                                                    }
                                                                }
                                                            } else {
                                                                this.f();
                                                                String v6_4 = v7_3.d;
                                                                com.google.android.gms.common.internal.z.a(v6_4);
                                                                com.google.android.gms.c.c.am v8_3 = -1;
                                                                boolean v10_1 = v6_4.hashCode();
                                                                if (v10_1 == 94660) {
                                                                    if (v6_4.equals("_in")) {
                                                                        v8_3 = 0;
                                                                    }
                                                                } else {
                                                                    if (v10_1 == 95025) {
                                                                        if (v6_4.equals("_ug")) {
                                                                            v8_3 = 2;
                                                                        }
                                                                    } else {
                                                                        if (v10_1 == 95027) {
                                                                            if (v6_4.equals("_ui")) {
                                                                                v8_3 = 1;
                                                                            }
                                                                        } else {
                                                                        }
                                                                    }
                                                                }
                                                                String v6_8;
                                                                switch (v8_3) {
                                                                    case 0:
                                                                    case 1:
                                                                    case 2:
                                                                        v6_8 = 1;
                                                                    default:
                                                                        v6_8 = 0;
                                                                }
                                                                if (v6_8 == null) {
                                                                    v44 = v9_13;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v4_7 != null) && ("_e".equals(v7_3.d))) {
                                                                com.google.android.gms.c.c.am v8_43;
                                                                com.google.android.gms.c.c.bd v5_34;
                                                                String v6_40;
                                                                if (v7_3.c == null) {
                                                                    v5_34 = this.i.r().i();
                                                                    v6_40 = "Engagement event does not contain any parameters. appId";
                                                                    v8_43 = com.google.android.gms.c.c.bb.a(v2_7.a.q);
                                                                } else {
                                                                    if (v7_3.c.length != 0) {
                                                                        this.f();
                                                                        com.google.android.gms.c.c.bd v5_30 = ((Long) com.google.android.gms.c.c.fs.b(v7_3, "_et"));
                                                                        if (v5_30 != null) {
                                                                            v14_2 += v5_30.longValue();
                                                                            String v6_41 = (v13_3 + 1);
                                                                            v3_8.d[v13_3] = v7_3;
                                                                            v13_3 = v6_41;
                                                                            v9_13 = (v44 + 1);
                                                                            long v11 = 1;
                                                                        } else {
                                                                            v5_34 = this.i.r().i();
                                                                            v6_40 = "Engagement event does not include duration. appId";
                                                                            v8_43 = com.google.android.gms.c.c.bb.a(v2_7.a.q);
                                                                        }
                                                                    } else {
                                                                    }
                                                                }
                                                                v5_34.a(v6_40, v8_43);
                                                            }
                                                        } else {
                                                            com.google.android.gms.c.c.bd v5_49;
                                                            this.i.r().i().a("Dropping blacklisted raw event. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q), this.i.l().a(v7_3.d));
                                                            if (this.p().e(v2_7.a.q)) {
                                                                v5_49 = 1;
                                                            } else {
                                                                if (!this.p().f(v2_7.a.q)) {
                                                                    v5_49 = 0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v5_49 == null) && (!"_err".equals(v7_3.d))) {
                                                                this.i.k().a(v2_7.a.q, 11, "_ev", v7_3.d, 0);
                                                            }
                                                            v44 = v9_13;
                                                        }
                                                    }
                                                    int v34_3 = v12_9;
                                                    if (v13_3 < v2_7.c.size()) {
                                                        v3_8.d = ((com.google.android.gms.c.c.gk[]) java.util.Arrays.copyOf(v3_8.d, v13_3));
                                                    }
                                                    if (v4_7 != null) {
                                                        Object v4_12;
                                                        Object v4_9 = this.d().c(v3_8.q, "_lte");
                                                        if (v4_9 == null) {
                                                            v4_12 = new com.google.android.gms.c.c.fv;
                                                            v4_12(v3_8.q, "auto", "_lte", this.i.m().a(), Long.valueOf(v14_2));
                                                        } else {
                                                            if (v4_9.e != null) {
                                                                com.google.android.gms.c.c.bd v5_70 = new com.google.android.gms.c.c.fv;
                                                                v5_70(v3_8.q, "auto", "_lte", this.i.m().a(), Long.valueOf((((Long) v4_9.e).longValue() + v14_2)));
                                                                v4_12 = v5_70;
                                                            } else {
                                                            }
                                                        }
                                                        com.google.android.gms.c.c.bd v5_73 = new com.google.android.gms.c.c.gq();
                                                        v5_73.d = "_lte";
                                                        v5_73.c = Long.valueOf(this.i.m().a());
                                                        v5_73.f = ((Long) v4_12.e);
                                                        String v6_80 = 0;
                                                        while (v6_80 < v3_8.e.length) {
                                                            if (!"_lte".equals(v3_8.e[v6_80].d)) {
                                                                v6_80++;
                                                            } else {
                                                                v3_8.e[v6_80] = v5_73;
                                                                String v6_81 = 1;
                                                            }
                                                            if (v6_81 == null) {
                                                                v3_8.e = ((com.google.android.gms.c.c.gq[]) java.util.Arrays.copyOf(v3_8.e, (v3_8.e.length + 1)));
                                                                v3_8.e[(v2_7.a.e.length - 1)] = v5_73;
                                                            }
                                                            if (v14_2 > 0) {
                                                                this.d().a(v4_12);
                                                                this.i.r().v().a("Updated lifetime engagement user property with value. Value", v4_12.e);
                                                            }
                                                        }
                                                        v6_81 = 0;
                                                    }
                                                    v3_8.C = this.a(v3_8.q, v3_8.e, v3_8.d);
                                                    if (this.i.b().d(v2_7.a.q)) {
                                                        Object v4_20 = new java.util.HashMap();
                                                        com.google.android.gms.c.c.bd v5_84 = new com.google.android.gms.c.c.gk[v3_8.d.length];
                                                        String v6_0 = this.i.k().h();
                                                        int v7_0 = v3_8.d;
                                                        com.google.android.gms.c.c.am v8_0 = v7_0.length;
                                                        int v9_1 = 0;
                                                        boolean v10_0 = 0;
                                                        while (v9_1 < v8_0) {
                                                            boolean v48;
                                                            int v47;
                                                            Boolean v12_7;
                                                            long v63;
                                                            long v11_14 = v7_0[v9_1];
                                                            if (!v11_14.d.equals("_ep")) {
                                                                int v7_45;
                                                                Boolean v13_20 = Long.valueOf(1);
                                                                if (android.text.TextUtils.isEmpty("_dbg")) {
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                    v7_45 = 0;
                                                                } else {
                                                                    if (v13_20 != null) {
                                                                        long v14_17 = v11_14.c;
                                                                        Long v15_5 = v14_17.length;
                                                                        v47 = v7_0;
                                                                        int v7_35 = 0;
                                                                        while (v7_35 < v15_5) {
                                                                            v48 = v8_0;
                                                                            com.google.android.gms.c.c.am v8_65 = v14_17[v7_35];
                                                                            if (!"_dbg".equals(v8_65.c)) {
                                                                                v7_35++;
                                                                                v8_0 = v48;
                                                                            } else {
                                                                                if (((!(v13_20 instanceof Long)) || (!v13_20.equals(v8_65.e))) && (((!(v13_20 instanceof String)) || (!v13_20.equals(v8_65.d))) && ((!(v13_20 instanceof Double)) || (!v13_20.equals(v8_65.f))))) {
                                                                                } else {
                                                                                    v7_45 = 1;
                                                                                }
                                                                            }
                                                                        }
                                                                    } else {
                                                                    }
                                                                }
                                                                int v7_46;
                                                                if (v7_45 != 0) {
                                                                    v7_46 = 1;
                                                                } else {
                                                                    v7_46 = this.p().d(v2_7.a.q, v11_14.d);
                                                                }
                                                                int v7_56;
                                                                if (v7_46 > 0) {
                                                                    com.google.android.gms.c.c.am v8_70 = ((com.google.android.gms.c.c.am) v4_20.get(v11_14.d));
                                                                    if (v8_70 == null) {
                                                                        v8_70 = this.d().a(v2_7.a.q, v11_14.d);
                                                                        if (v8_70 == null) {
                                                                            this.i.r().i().a("Event being bundled has no eventAggregate. appId, eventName", v2_7.a.q, v11_14.d);
                                                                            v8_70 = new com.google.android.gms.c.c.am;
                                                                            v8_70(v2_7.a.q, v11_14.d, 1, 1, v11_14.e.longValue(), 0, 0, 0, 0);
                                                                        }
                                                                    }
                                                                    Boolean v13_25;
                                                                    this.f();
                                                                    Boolean v12_52 = ((Long) com.google.android.gms.c.c.fs.b(v11_14, "_eid"));
                                                                    if (v12_52 == null) {
                                                                        v13_25 = 0;
                                                                    } else {
                                                                        v13_25 = 1;
                                                                    }
                                                                    Boolean v13_26 = Boolean.valueOf(v13_25);
                                                                    if (v7_46 != 1) {
                                                                        if (v6_0.nextInt(v7_46) != 0) {
                                                                            v63 = v6_0;
                                                                            if (Math.abs((v11_14.e.longValue() - v8_70.f)) < 86400000) {
                                                                                if (!v13_26.booleanValue()) {
                                                                                    v9_1++;
                                                                                    v7_0 = v47;
                                                                                    v8_0 = v48;
                                                                                    v6_0 = v63;
                                                                                } else {
                                                                                    v4_20.put(v11_14.d, v8_70.a(v12_52, 0, 0));
                                                                                }
                                                                            } else {
                                                                                this.f();
                                                                                v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_efs", Long.valueOf(1));
                                                                                this.f();
                                                                                long v14_30 = ((long) v7_46);
                                                                                v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", Long.valueOf(v14_30));
                                                                                String v6_134 = (v10_0 + 1);
                                                                                v5_84[v10_0] = v11_14;
                                                                                if (v13_26.booleanValue()) {
                                                                                    v8_70 = v8_70.a(0, Long.valueOf(v14_30), Boolean.valueOf(1));
                                                                                }
                                                                                v4_20.put(v11_14.d, v8_70.b(v11_14.e.longValue()));
                                                                                v10_0 = v6_134;
                                                                            }
                                                                        } else {
                                                                            this.f();
                                                                            v63 = v6_0;
                                                                            String v6_135 = ((long) v7_46);
                                                                            v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", Long.valueOf(v6_135));
                                                                            v12_7 = (v10_0 + 1);
                                                                            v5_84[v10_0] = v11_14;
                                                                            if (v13_26.booleanValue()) {
                                                                                v8_70 = v8_70.a(0, Long.valueOf(v6_135), 0);
                                                                            }
                                                                            v4_20.put(v11_14.d, v8_70.b(v11_14.e.longValue()));
                                                                            v10_0 = v12_7;
                                                                        }
                                                                    } else {
                                                                        v7_56 = (v10_0 + 1);
                                                                        v5_84[v10_0] = v11_14;
                                                                        if ((v13_26.booleanValue()) && ((v8_70.g != null) || ((v8_70.h != null) || (v8_70.i != null)))) {
                                                                            v4_20.put(v11_14.d, v8_70.a(0, 0, 0));
                                                                        }
                                                                    }
                                                                } else {
                                                                    this.i.r().i().a("Sample rate must be positive. event, rate", v11_14.d, Integer.valueOf(v7_46));
                                                                    v7_56 = (v10_0 + 1);
                                                                    v5_84[v10_0] = v11_14;
                                                                }
                                                                v63 = v6_0;
                                                                v10_0 = v7_56;
                                                            } else {
                                                                this.f();
                                                                Boolean v12_62 = ((String) com.google.android.gms.c.c.fs.b(v11_14, "_en"));
                                                                Boolean v13_29 = ((com.google.android.gms.c.c.am) v4_20.get(v12_62));
                                                                if (v13_29 == null) {
                                                                    v13_29 = this.d().a(v2_7.a.q, v12_62);
                                                                    v4_20.put(v12_62, v13_29);
                                                                }
                                                                if (v13_29.g != null) {
                                                                    v63 = v6_0;
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                } else {
                                                                    if (v13_29.h.longValue() > 1) {
                                                                        this.f();
                                                                        v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", v13_29.h);
                                                                    }
                                                                    if ((v13_29.i != null) && (v13_29.i.booleanValue())) {
                                                                        this.f();
                                                                        v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_efs", Long.valueOf(1));
                                                                    }
                                                                    v12_7 = (v10_0 + 1);
                                                                    v5_84[v10_0] = v11_14;
                                                                    v63 = v6_0;
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                }
                                                            }
                                                        }
                                                        if (v10_0 < v3_8.d.length) {
                                                            v3_8.d = ((com.google.android.gms.c.c.gk[]) java.util.Arrays.copyOf(v5_84, v10_0));
                                                        }
                                                        Object v4_22 = v4_20.entrySet().iterator();
                                                        while (v4_22.hasNext()) {
                                                            this.d().a(((com.google.android.gms.c.c.am) ((java.util.Map$Entry) v4_22.next()).getValue()));
                                                        }
                                                    }
                                                    v3_8.g = Long.valueOf(nan);
                                                    v3_8.h = Long.valueOf(-0.0);
                                                    Object v4_27 = 0;
                                                    while (v4_27 < v3_8.d.length) {
                                                        com.google.android.gms.c.c.bd v5_117 = v3_8.d[v4_27];
                                                        if (v5_117.e.longValue() < v3_8.g.longValue()) {
                                                            v3_8.g = v5_117.e;
                                                        }
                                                        if (v5_117.e.longValue() > v3_8.h.longValue()) {
                                                            v3_8.h = v5_117.e;
                                                        }
                                                        v4_27++;
                                                    }
                                                    Object v4_29 = v2_7.a.q;
                                                    com.google.android.gms.c.c.bd v5_91 = this.d().b(v4_29);
                                                    if (v5_91 != null) {
                                                        if (v3_8.d.length > 0) {
                                                            com.google.android.gms.c.c.am v8_57;
                                                            String v6_94 = v5_91.h();
                                                            if (v6_94 == 0) {
                                                                v8_57 = 0;
                                                            } else {
                                                                v8_57 = Long.valueOf(v6_94);
                                                            }
                                                            v3_8.j = v8_57;
                                                            com.google.android.gms.c.c.am v8_58 = v5_91.g();
                                                            if (v8_58 != 0) {
                                                                v6_94 = v8_58;
                                                            } else {
                                                            }
                                                            String v6_95;
                                                            if (v6_94 == 0) {
                                                                v6_95 = 0;
                                                            } else {
                                                                v6_95 = Long.valueOf(v6_94);
                                                            }
                                                            v3_8.i = v6_95;
                                                            v5_91.r();
                                                            v3_8.y = Integer.valueOf(((int) v5_91.o()));
                                                            v5_91.a(v3_8.g.longValue());
                                                            v5_91.b(v3_8.h.longValue());
                                                            v3_8.z = v5_91.z();
                                                            this.d().a(v5_91);
                                                        }
                                                    } else {
                                                        this.i.r().k_().a("Bundling raw events w/o app info. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                    }
                                                    if (v3_8.d.length > 0) {
                                                        com.google.android.gms.c.c.bd v5_100;
                                                        this.i.u();
                                                        com.google.android.gms.c.c.bd v5_99 = this.p().a(v2_7.a.q);
                                                        if (v5_99 == null) {
                                                            if (!android.text.TextUtils.isEmpty(v2_7.a.A)) {
                                                                this.i.r().i().a("Did not find measurement config or missing version info. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                            } else {
                                                                v5_100 = Long.valueOf(-1);
                                                                v3_8.G = v5_100;
                                                            }
                                                        } else {
                                                            if (v5_99.c != null) {
                                                                v5_100 = v5_99.c;
                                                            } else {
                                                            }
                                                        }
                                                        this.d().a(v3_8, v34_3);
                                                    }
                                                    android.database.sqlite.SQLiteException v3_12 = this.d();
                                                    com.google.android.gms.c.c.bd v2_8 = v2_7.b;
                                                    com.google.android.gms.common.internal.z.a(v2_8);
                                                    v3_12.d();
                                                    v3_12.I();
                                                    com.google.android.gms.c.c.bd v5_110 = new StringBuilder("rowid in (");
                                                    String v6_111 = 0;
                                                    while (v6_111 < v2_8.size()) {
                                                        if (v6_111 != null) {
                                                            v5_110.append(",");
                                                        }
                                                        v5_110.append(((Long) v2_8.get(v6_111)).longValue());
                                                        v6_111++;
                                                    }
                                                    v5_110.append(")");
                                                    com.google.android.gms.c.c.bd v5_112 = v3_12.i().delete("raw_events", v5_110.toString(), 0);
                                                    if (v5_112 != v2_8.size()) {
                                                        v3_12.r().k_().a("Deleted fewer rows from raw events table than expected", Integer.valueOf(v5_112), Integer.valueOf(v2_8.size()));
                                                    }
                                                    com.google.android.gms.c.c.bd v2_11 = this.d();
                                                    android.database.sqlite.SQLiteException v3_15 = v2_11.i();
                                                    try {
                                                        String v6_117 = new String[2];
                                                        v6_117[0] = v4_29;
                                                        v6_117[1] = v4_29;
                                                        v3_15.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v6_117);
                                                    } catch (android.database.sqlite.SQLiteException v0_10) {
                                                        v2_11.r().k_().a("Failed to remove unused event metadata. appId", com.google.android.gms.c.c.bb.a(v4_29), v0_10);
                                                    }
                                                    this.d().g();
                                                    this.d().h();
                                                    return 1;
                                                }
                                            } else {
                                                v9_0.close();
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                        }
                                        if (v15_1.moveToNext()) {
                                            v4_31.r().i().a("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                        }
                                        String[] v16_2;
                                        com.google.android.gms.c.c.bd v5_56;
                                        v15_1.close();
                                        v2_7.a(v13_6);
                                        if (v5_123 == -1) {
                                            v5_56 = "app_id = ? and metadata_fingerprint = ?";
                                            int v9_16 = new String[2];
                                            v9_16[0] = v3_0;
                                            v9_16[1] = v22;
                                            v16_2 = v9_16;
                                        } else {
                                            Boolean v12_22 = new String[3];
                                            v12_22[0] = v3_0;
                                            v12_22[1] = v22;
                                            v12_22[2] = String.valueOf(v5_123);
                                            v5_56 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v16_2 = v12_22;
                                        }
                                        v9_0 = v15_1;
                                        com.google.android.gms.c.c.bd v5_58 = v25.query("raw_events", new String[] {"rowid", "name", "timestamp", "data"}), v5_56, v16_2, 0, 0, "rowid", 0);
                                        try {
                                            if (v5_58.moveToFirst()) {
                                                do {
                                                    Boolean v12_26 = v5_58.getLong(0);
                                                    int v9_20 = v5_58.getBlob(3);
                                                    int v9_21 = com.google.android.gms.c.c.a.a(v9_20, 0, v9_20.length);
                                                    long v14_9 = new com.google.android.gms.c.c.gk();
                                                    v14_9.a(v9_21);
                                                    v14_9.d = v5_58.getString(1);
                                                    v14_9.e = Long.valueOf(v5_58.getLong(2));
                                                    if (v2_7.a(v12_26, v14_9)) {
                                                    } else {
                                                        if (v5_58 == null) {
                                                        } else {
                                                        }
                                                    }
                                                } while(v5_58.moveToNext());
                                                if (v5_58 == null) {
                                                }
                                            } else {
                                                v4_31.r().i().a("Raw event data disappeared while in transaction. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                                if (v5_58 == null) {
                                                }
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_8) {
                                            com.google.android.gms.c.c.bd v2_0 = v0_8;
                                            int v21 = v5_58;
                                            if (v21 != 0) {
                                                v21.close();
                                            }
                                            throw v2_0;
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            Boolean v12_5 = v3_0;
                                            v9_0 = v5_58;
                                            android.database.sqlite.SQLiteException v3_3 = v0_1;
                                            v4_31.r().k_().a("Data loss. Error selecting raw event. appId", com.google.android.gms.c.c.bb.a(v12_5), v3_3);
                                            if (v9_0 == 0) {
                                            }
                                        }
                                        v5_58.close();
                                    } else {
                                        v4_31.r().k_().a("Raw event metadata record is missing. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                        if (v15_1 == null) {
                                        } else {
                                            v15_1.close();
                                        }
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_6) {
                                    v9_0 = v15_1;
                                    v2_0 = v0_6;
                                    v21 = v9_0;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v9_0 = v15_1;
                                } catch (android.database.sqlite.SQLiteException v0_9) {
                                    v2_0 = v0_9;
                                    v21 = v15_1;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v12_5 = v3_0;
                                    v9_0 = v15_1;
                                }
                                v12_5 = v3_0;
                            } catch (android.database.sqlite.SQLiteException v0_4) {
                                v2_0 = v0_4;
                                v21 = v23;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v12_5 = v3_0;
                                v9_0 = v23;
                            }
                        } else {
                            if (v3_0 == null) {
                            } else {
                            }
                        }
                    } else {
                        Boolean v13_18;
                        Boolean v12_39 = v5_123 cmp -1;
                        try {
                            if (v12_39 == null) {
                                v13_18 = new String[1];
                                v13_18[0] = String.valueOf(p66);
                            } else {
                                v13_18 = new String[2];
                                v13_18[0] = String.valueOf(v5_123);
                                v13_18[1] = String.valueOf(p66);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_1) {
                            v9_0 = 0;
                            v12_5 = 0;
                        }
                        Boolean v12_43;
                        if (v12_39 == null) {
                            v12_43 = "";
                        } else {
                            v12_43 = "rowid <= ? and ";
                        }
                        android.database.sqlite.SQLiteException v3_18 = new StringBuilder((String.valueOf(v12_43).length() + 148));
                        v3_18.append("select app_id, metadata_fingerprint from raw_events where ");
                        v3_18.append(v12_43);
                        v3_18.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v3_18.toString(), v13_18);
                        if (v3_0.moveToFirst()) {
                            v12_5 = v3_0.getString(0);
                            try {
                                Boolean v13_1 = v3_0.getString(1);
                                v3_0.close();
                                v23 = v3_0;
                                v3_0 = v12_5;
                                v22 = v13_1;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v9_0 = v3_0;
                            }
                        } else {
                            if (v3_0 == null) {
                            }
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_2) {
                    v2_0 = v0_2;
                    v21 = v3_0;
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    v9_0 = v3_0;
                    v12_5 = 0;
                }
                v3_0.close();
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v2_0 = v0_0;
                v21 = 0;
            } catch (android.database.sqlite.SQLiteException v0_11) {
                v3_3 = v0_11;
                v9_0 = 0;
                v12_5 = 0;
            } catch (android.database.sqlite.SQLiteException v0_6) {
            }
        } catch (android.database.sqlite.SQLiteException v0_3) {
            com.google.android.gms.c.c.bd v2_1 = v0_3;
            this.d().h();
            throw v2_1;
        }
    }

Method com.google.android.gms.c.c.fm.a() calling method android.database.sqlite.SQLiteDatabase.query()


    private final boolean a(String p65, long p66)
    {
        this.d().f();
        try {
            android.database.sqlite.SQLiteException v3_0 = 0;
            com.google.android.gms.c.c.bd v2_7 = new ark>com.google.android.gms.c.c.fmark>$a(this, 0);
            Object v4_31 = this.d();
            com.google.android.gms.c.c.bd v5_123 = this.w;
            com.google.android.gms.common.internal.z.a(v2_7);
            v4_31.d();
            v4_31.I();
            try {
                String v22;
                int v23;
                Long v15_2 = v4_31.i();
                try {
                    if (!android.text.TextUtils.isEmpty(0)) {
                        Boolean v12_30;
                        android.database.sqlite.SQLiteException v3_2 = v5_123 cmp -1;
                        if (v3_2 == null) {
                            v12_30 = new String[] {0});
                        } else {
                            v12_30 = new String[2];
                            v12_30[0] = 0;
                            v12_30[1] = String.valueOf(v5_123);
                        }
                        android.database.sqlite.SQLiteException v3_9;
                        if (v3_2 == null) {
                            v3_9 = "";
                        } else {
                            v3_9 = " and rowid <= ?";
                        }
                        long v14_12 = new StringBuilder((String.valueOf(v3_9).length() + 84));
                        v14_12.append("select metadata_fingerprint from raw_events where app_id = ?");
                        v14_12.append(v3_9);
                        v14_12.append(" order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v14_12.toString(), v12_30);
                        if (v3_0.moveToFirst()) {
                            Boolean v13_17 = v3_0.getString(0);
                            v3_0.close();
                            v23 = v3_0;
                            v22 = v13_17;
                            v3_0 = 0;
                            try {
                                Boolean v12_11 = new String[2];
                                v12_11[0] = v3_0;
                                v12_11[1] = v22;
                                android.database.sqlite.SQLiteDatabase v25 = v15_2;
                                Long v15_1 = v15_2.query("raw_events_metadata", new String[] {"metadata"}), "app_id = ? and metadata_fingerprint = ?", v12_11, 0, 0, "rowid", "2");
                                try {
                                    if (v15_1.moveToFirst()) {
                                        Boolean v12_16 = v15_1.getBlob(0);
                                        Boolean v12_17 = com.google.android.gms.c.c.a.a(v12_16, 0, v12_16.length);
                                        Boolean v13_6 = new com.google.android.gms.c.c.gn();
                                        try {
                                            v13_6.a(v12_17);
                                        } catch (android.database.sqlite.SQLiteException v0_5) {
                                            int v9_0 = v15_1;
                                            v4_31.r().k_().a("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.c.c.bb.a(v3_0), v0_5);
                                            if (v9_0 == 0) {
                                                android.database.sqlite.SQLiteException v3_7;
                                                if (v2_7.c == null) {
                                                    v3_7 = 1;
                                                } else {
                                                    if (!v2_7.c.isEmpty()) {
                                                        v3_7 = 0;
                                                    } else {
                                                    }
                                                }
                                                if (v3_7 != null) {
                                                    this.d().g();
                                                    this.d().h();
                                                    return 0;
                                                } else {
                                                    android.database.sqlite.SQLiteException v3_8 = v2_7.a;
                                                    Object v4_4 = new com.google.android.gms.c.c.gk[v2_7.c.size()];
                                                    v3_8.d = v4_4;
                                                    Object v4_7 = this.i.b().e(v3_8.q);
                                                    int v9_13 = 0;
                                                    Boolean v12_9 = 0;
                                                    Boolean v13_3 = 0;
                                                    long v14_2 = 0;
                                                    while (v9_13 < v2_7.c.size()) {
                                                        String[] v44;
                                                        int v7_3 = ((com.google.android.gms.c.c.gk) v2_7.c.get(v9_13));
                                                        if (!this.p().b(v2_7.a.q, v7_3.d)) {
                                                            com.google.android.gms.c.c.bd v5_4 = this.p().c(v2_7.a.q, v7_3.d);
                                                            if (v5_4 != null) {
                                                                if (v7_3.c == null) {
                                                                    com.google.android.gms.c.c.am v8_4 = new com.google.android.gms.c.c.gl[0];
                                                                    v7_3.c = v8_4;
                                                                }
                                                                String v6_11 = v7_3.c;
                                                                com.google.android.gms.c.c.am v8_5 = v6_11.length;
                                                                boolean v10_5 = 0;
                                                                long v11_3 = 0;
                                                                long v18_0 = 0;
                                                                while (v10_5 < v8_5) {
                                                                    int v32_1 = v8_5;
                                                                    com.google.android.gms.c.c.am v8_46 = v6_11[v10_5];
                                                                    int v33_1 = v6_11;
                                                                    int v34_2 = v12_9;
                                                                    if (!"_c".equals(v8_46.c)) {
                                                                        if ("_r".equals(v8_46.c)) {
                                                                            v8_46.e = Long.valueOf(1);
                                                                            v18_0 = 1;
                                                                        }
                                                                    } else {
                                                                        v8_46.e = Long.valueOf(1);
                                                                        v11_3 = 1;
                                                                    }
                                                                    v10_5++;
                                                                    v8_5 = v32_1;
                                                                    v6_11 = v33_1;
                                                                    v12_9 = v34_2;
                                                                }
                                                                int v34_0 = v12_9;
                                                                if ((v11_3 == 0) && (v5_4 != null)) {
                                                                    this.i.r().w().a("Marking event as conversion", this.i.l().a(v7_3.d));
                                                                    String v6_17 = ((com.google.android.gms.c.c.gl[]) java.util.Arrays.copyOf(v7_3.c, (v7_3.c.length + 1)));
                                                                    com.google.android.gms.c.c.am v8_11 = new com.google.android.gms.c.c.gl();
                                                                    v8_11.c = "_c";
                                                                    v8_11.e = Long.valueOf(1);
                                                                    v6_17[(v6_17.length - 1)] = v8_11;
                                                                    v7_3.c = v6_17;
                                                                }
                                                                if (v18_0 == 0) {
                                                                    this.i.r().w().a("Marking event as real-time", this.i.l().a(v7_3.d));
                                                                    String v6_23 = ((com.google.android.gms.c.c.gl[]) java.util.Arrays.copyOf(v7_3.c, (v7_3.c.length + 1)));
                                                                    com.google.android.gms.c.c.am v8_17 = new com.google.android.gms.c.c.gl();
                                                                    v8_17.c = "_r";
                                                                    v8_17.e = Long.valueOf(1);
                                                                    v6_23[(v6_23.length - 1)] = v8_17;
                                                                    v7_3.c = v6_23;
                                                                }
                                                                v44 = v9_13;
                                                                if (this.d().a(this.w(), v2_7.a.q, 0, 0, 0, 0, 1).e <= ((long) this.i.b().a(v2_7.a.q))) {
                                                                    v12_9 = 1;
                                                                } else {
                                                                    String v6_31 = 0;
                                                                    while (v6_31 < v7_3.c.length) {
                                                                        if (!"_r".equals(v7_3.c[v6_31].c)) {
                                                                            v6_31++;
                                                                        } else {
                                                                            com.google.android.gms.c.c.am v8_28 = new com.google.android.gms.c.c.gl[(v7_3.c.length - 1)];
                                                                            if (v6_31 > null) {
                                                                                System.arraycopy(v7_3.c, 0, v8_28, 0, v6_31);
                                                                            }
                                                                            if (v6_31 < v8_28.length) {
                                                                                System.arraycopy(v7_3.c, (v6_31 + 1), v8_28, v6_31, (v8_28.length - v6_31));
                                                                            }
                                                                            v7_3.c = v8_28;
                                                                            break;
                                                                        }
                                                                    }
                                                                    v12_9 = v34_0;
                                                                }
                                                                if ((com.google.android.gms.c.c.fw.a(v7_3.d)) && ((v5_4 != null) && (this.d().a(this.w(), v2_7.a.q, 0, 0, 1, 0, 0).c > ((long) this.i.b().b(v2_7.a.q, com.google.android.gms.c.c.as.v))))) {
                                                                    this.i.r().i().a("Too many conversions. Not logging as conversion. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                                    com.google.android.gms.c.c.bd v5_13 = v7_3.c;
                                                                    String v6_35 = v5_13.length;
                                                                    com.google.android.gms.c.c.am v8_36 = 0;
                                                                    int v9_11 = 0;
                                                                    boolean v10_26 = 0;
                                                                    while (v8_36 < v6_35) {
                                                                        long v11_10 = v5_13[v8_36];
                                                                        if (!"_c".equals(v11_10.c)) {
                                                                            if ("_err".equals(v11_10.c)) {
                                                                                v9_11 = 1;
                                                                            }
                                                                        } else {
                                                                            v10_26 = v11_10;
                                                                        }
                                                                        v8_36++;
                                                                    }
                                                                    if ((v9_11 == 0) || (!v10_26)) {
                                                                        if (!v10_26) {
                                                                            this.i.r().k_().a("Did not find conversion parameter. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                                        } else {
                                                                            v10_26.c = "_err";
                                                                            v10_26.e = Long.valueOf(10);
                                                                        }
                                                                    } else {
                                                                        com.google.android.gms.c.c.bd v5_20 = v7_3.c;
                                                                        com.google.android.gms.c.c.am v8_40 = new com.google.android.gms.c.c.gl[1];
                                                                        v8_40[0] = v10_26;
                                                                        v7_3.c = ((com.google.android.gms.c.c.gl[]) com.google.android.gms.common.util.b.a(v5_20, v8_40));
                                                                    }
                                                                }
                                                            } else {
                                                                this.f();
                                                                String v6_4 = v7_3.d;
                                                                com.google.android.gms.common.internal.z.a(v6_4);
                                                                com.google.android.gms.c.c.am v8_3 = -1;
                                                                boolean v10_1 = v6_4.hashCode();
                                                                if (v10_1 == 94660) {
                                                                    if (v6_4.equals("_in")) {
                                                                        v8_3 = 0;
                                                                    }
                                                                } else {
                                                                    if (v10_1 == 95025) {
                                                                        if (v6_4.equals("_ug")) {
                                                                            v8_3 = 2;
                                                                        }
                                                                    } else {
                                                                        if (v10_1 == 95027) {
                                                                            if (v6_4.equals("_ui")) {
                                                                                v8_3 = 1;
                                                                            }
                                                                        } else {
                                                                        }
                                                                    }
                                                                }
                                                                String v6_8;
                                                                switch (v8_3) {
                                                                    case 0:
                                                                    case 1:
                                                                    case 2:
                                                                        v6_8 = 1;
                                                                    default:
                                                                        v6_8 = 0;
                                                                }
                                                                if (v6_8 == null) {
                                                                    v44 = v9_13;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v4_7 != null) && ("_e".equals(v7_3.d))) {
                                                                com.google.android.gms.c.c.am v8_43;
                                                                com.google.android.gms.c.c.bd v5_34;
                                                                String v6_40;
                                                                if (v7_3.c == null) {
                                                                    v5_34 = this.i.r().i();
                                                                    v6_40 = "Engagement event does not contain any parameters. appId";
                                                                    v8_43 = com.google.android.gms.c.c.bb.a(v2_7.a.q);
                                                                } else {
                                                                    if (v7_3.c.length != 0) {
                                                                        this.f();
                                                                        com.google.android.gms.c.c.bd v5_30 = ((Long) com.google.android.gms.c.c.fs.b(v7_3, "_et"));
                                                                        if (v5_30 != null) {
                                                                            v14_2 += v5_30.longValue();
                                                                            String v6_41 = (v13_3 + 1);
                                                                            v3_8.d[v13_3] = v7_3;
                                                                            v13_3 = v6_41;
                                                                            v9_13 = (v44 + 1);
                                                                            long v11 = 1;
                                                                        } else {
                                                                            v5_34 = this.i.r().i();
                                                                            v6_40 = "Engagement event does not include duration. appId";
                                                                            v8_43 = com.google.android.gms.c.c.bb.a(v2_7.a.q);
                                                                        }
                                                                    } else {
                                                                    }
                                                                }
                                                                v5_34.a(v6_40, v8_43);
                                                            }
                                                        } else {
                                                            com.google.android.gms.c.c.bd v5_49;
                                                            this.i.r().i().a("Dropping blacklisted raw event. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q), this.i.l().a(v7_3.d));
                                                            if (this.p().e(v2_7.a.q)) {
                                                                v5_49 = 1;
                                                            } else {
                                                                if (!this.p().f(v2_7.a.q)) {
                                                                    v5_49 = 0;
                                                                } else {
                                                                }
                                                            }
                                                            if ((v5_49 == null) && (!"_err".equals(v7_3.d))) {
                                                                this.i.k().a(v2_7.a.q, 11, "_ev", v7_3.d, 0);
                                                            }
                                                            v44 = v9_13;
                                                        }
                                                    }
                                                    int v34_3 = v12_9;
                                                    if (v13_3 < v2_7.c.size()) {
                                                        v3_8.d = ((com.google.android.gms.c.c.gk[]) java.util.Arrays.copyOf(v3_8.d, v13_3));
                                                    }
                                                    if (v4_7 != null) {
                                                        Object v4_12;
                                                        Object v4_9 = this.d().c(v3_8.q, "_lte");
                                                        if (v4_9 == null) {
                                                            v4_12 = new com.google.android.gms.c.c.fv;
                                                            v4_12(v3_8.q, "auto", "_lte", this.i.m().a(), Long.valueOf(v14_2));
                                                        } else {
                                                            if (v4_9.e != null) {
                                                                com.google.android.gms.c.c.bd v5_70 = new com.google.android.gms.c.c.fv;
                                                                v5_70(v3_8.q, "auto", "_lte", this.i.m().a(), Long.valueOf((((Long) v4_9.e).longValue() + v14_2)));
                                                                v4_12 = v5_70;
                                                            } else {
                                                            }
                                                        }
                                                        com.google.android.gms.c.c.bd v5_73 = new com.google.android.gms.c.c.gq();
                                                        v5_73.d = "_lte";
                                                        v5_73.c = Long.valueOf(this.i.m().a());
                                                        v5_73.f = ((Long) v4_12.e);
                                                        String v6_80 = 0;
                                                        while (v6_80 < v3_8.e.length) {
                                                            if (!"_lte".equals(v3_8.e[v6_80].d)) {
                                                                v6_80++;
                                                            } else {
                                                                v3_8.e[v6_80] = v5_73;
                                                                String v6_81 = 1;
                                                            }
                                                            if (v6_81 == null) {
                                                                v3_8.e = ((com.google.android.gms.c.c.gq[]) java.util.Arrays.copyOf(v3_8.e, (v3_8.e.length + 1)));
                                                                v3_8.e[(v2_7.a.e.length - 1)] = v5_73;
                                                            }
                                                            if (v14_2 > 0) {
                                                                this.d().a(v4_12);
                                                                this.i.r().v().a("Updated lifetime engagement user property with value. Value", v4_12.e);
                                                            }
                                                        }
                                                        v6_81 = 0;
                                                    }
                                                    v3_8.C = this.a(v3_8.q, v3_8.e, v3_8.d);
                                                    if (this.i.b().d(v2_7.a.q)) {
                                                        Object v4_20 = new java.util.HashMap();
                                                        com.google.android.gms.c.c.bd v5_84 = new com.google.android.gms.c.c.gk[v3_8.d.length];
                                                        String v6_0 = this.i.k().h();
                                                        int v7_0 = v3_8.d;
                                                        com.google.android.gms.c.c.am v8_0 = v7_0.length;
                                                        int v9_1 = 0;
                                                        boolean v10_0 = 0;
                                                        while (v9_1 < v8_0) {
                                                            boolean v48;
                                                            Boolean v12_7;
                                                            long v63;
                                                            int v47;
                                                            long v11_14 = v7_0[v9_1];
                                                            if (!v11_14.d.equals("_ep")) {
                                                                int v7_45;
                                                                Boolean v13_20 = Long.valueOf(1);
                                                                if (android.text.TextUtils.isEmpty("_dbg")) {
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                    v7_45 = 0;
                                                                } else {
                                                                    if (v13_20 != null) {
                                                                        long v14_17 = v11_14.c;
                                                                        Long v15_5 = v14_17.length;
                                                                        v47 = v7_0;
                                                                        int v7_35 = 0;
                                                                        while (v7_35 < v15_5) {
                                                                            v48 = v8_0;
                                                                            com.google.android.gms.c.c.am v8_65 = v14_17[v7_35];
                                                                            if (!"_dbg".equals(v8_65.c)) {
                                                                                v7_35++;
                                                                                v8_0 = v48;
                                                                            } else {
                                                                                if (((!(v13_20 instanceof Long)) || (!v13_20.equals(v8_65.e))) && (((!(v13_20 instanceof String)) || (!v13_20.equals(v8_65.d))) && ((!(v13_20 instanceof Double)) || (!v13_20.equals(v8_65.f))))) {
                                                                                } else {
                                                                                    v7_45 = 1;
                                                                                }
                                                                            }
                                                                        }
                                                                    } else {
                                                                    }
                                                                }
                                                                int v7_46;
                                                                if (v7_45 != 0) {
                                                                    v7_46 = 1;
                                                                } else {
                                                                    v7_46 = this.p().d(v2_7.a.q, v11_14.d);
                                                                }
                                                                int v7_56;
                                                                if (v7_46 > 0) {
                                                                    com.google.android.gms.c.c.am v8_70 = ((com.google.android.gms.c.c.am) v4_20.get(v11_14.d));
                                                                    if (v8_70 == null) {
                                                                        v8_70 = this.d().a(v2_7.a.q, v11_14.d);
                                                                        if (v8_70 == null) {
                                                                            this.i.r().i().a("Event being bundled has no eventAggregate. appId, eventName", v2_7.a.q, v11_14.d);
                                                                            v8_70 = new com.google.android.gms.c.c.am;
                                                                            v8_70(v2_7.a.q, v11_14.d, 1, 1, v11_14.e.longValue(), 0, 0, 0, 0);
                                                                        }
                                                                    }
                                                                    Boolean v13_25;
                                                                    this.f();
                                                                    Boolean v12_52 = ((Long) com.google.android.gms.c.c.fs.b(v11_14, "_eid"));
                                                                    if (v12_52 == null) {
                                                                        v13_25 = 0;
                                                                    } else {
                                                                        v13_25 = 1;
                                                                    }
                                                                    Boolean v13_26 = Boolean.valueOf(v13_25);
                                                                    if (v7_46 != 1) {
                                                                        if (v6_0.nextInt(v7_46) != 0) {
                                                                            v63 = v6_0;
                                                                            if (Math.abs((v11_14.e.longValue() - v8_70.f)) < 86400000) {
                                                                                if (!v13_26.booleanValue()) {
                                                                                    v9_1++;
                                                                                    v7_0 = v47;
                                                                                    v8_0 = v48;
                                                                                    v6_0 = v63;
                                                                                } else {
                                                                                    v4_20.put(v11_14.d, v8_70.a(v12_52, 0, 0));
                                                                                }
                                                                            } else {
                                                                                this.f();
                                                                                v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_efs", Long.valueOf(1));
                                                                                this.f();
                                                                                long v14_30 = ((long) v7_46);
                                                                                v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", Long.valueOf(v14_30));
                                                                                String v6_134 = (v10_0 + 1);
                                                                                v5_84[v10_0] = v11_14;
                                                                                if (v13_26.booleanValue()) {
                                                                                    v8_70 = v8_70.a(0, Long.valueOf(v14_30), Boolean.valueOf(1));
                                                                                }
                                                                                v4_20.put(v11_14.d, v8_70.b(v11_14.e.longValue()));
                                                                                v10_0 = v6_134;
                                                                            }
                                                                        } else {
                                                                            this.f();
                                                                            v63 = v6_0;
                                                                            String v6_135 = ((long) v7_46);
                                                                            v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", Long.valueOf(v6_135));
                                                                            v12_7 = (v10_0 + 1);
                                                                            v5_84[v10_0] = v11_14;
                                                                            if (v13_26.booleanValue()) {
                                                                                v8_70 = v8_70.a(0, Long.valueOf(v6_135), 0);
                                                                            }
                                                                            v4_20.put(v11_14.d, v8_70.b(v11_14.e.longValue()));
                                                                            v10_0 = v12_7;
                                                                        }
                                                                    } else {
                                                                        v7_56 = (v10_0 + 1);
                                                                        v5_84[v10_0] = v11_14;
                                                                        if ((v13_26.booleanValue()) && ((v8_70.g != null) || ((v8_70.h != null) || (v8_70.i != null)))) {
                                                                            v4_20.put(v11_14.d, v8_70.a(0, 0, 0));
                                                                        }
                                                                    }
                                                                } else {
                                                                    this.i.r().i().a("Sample rate must be positive. event, rate", v11_14.d, Integer.valueOf(v7_46));
                                                                    v7_56 = (v10_0 + 1);
                                                                    v5_84[v10_0] = v11_14;
                                                                }
                                                                v63 = v6_0;
                                                                v10_0 = v7_56;
                                                            } else {
                                                                this.f();
                                                                Boolean v12_62 = ((String) com.google.android.gms.c.c.fs.b(v11_14, "_en"));
                                                                Boolean v13_29 = ((com.google.android.gms.c.c.am) v4_20.get(v12_62));
                                                                if (v13_29 == null) {
                                                                    v13_29 = this.d().a(v2_7.a.q, v12_62);
                                                                    v4_20.put(v12_62, v13_29);
                                                                }
                                                                if (v13_29.g != null) {
                                                                    v63 = v6_0;
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                } else {
                                                                    if (v13_29.h.longValue() > 1) {
                                                                        this.f();
                                                                        v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_sr", v13_29.h);
                                                                    }
                                                                    if ((v13_29.i != null) && (v13_29.i.booleanValue())) {
                                                                        this.f();
                                                                        v11_14.c = com.google.android.gms.c.c.fs.a(v11_14.c, "_efs", Long.valueOf(1));
                                                                    }
                                                                    v12_7 = (v10_0 + 1);
                                                                    v5_84[v10_0] = v11_14;
                                                                    v63 = v6_0;
                                                                    v47 = v7_0;
                                                                    v48 = v8_0;
                                                                }
                                                            }
                                                        }
                                                        if (v10_0 < v3_8.d.length) {
                                                            v3_8.d = ((com.google.android.gms.c.c.gk[]) java.util.Arrays.copyOf(v5_84, v10_0));
                                                        }
                                                        Object v4_22 = v4_20.entrySet().iterator();
                                                        while (v4_22.hasNext()) {
                                                            this.d().a(((com.google.android.gms.c.c.am) ((java.util.Map$Entry) v4_22.next()).getValue()));
                                                        }
                                                    }
                                                    v3_8.g = Long.valueOf(nan);
                                                    v3_8.h = Long.valueOf(-0.0);
                                                    Object v4_27 = 0;
                                                    while (v4_27 < v3_8.d.length) {
                                                        com.google.android.gms.c.c.bd v5_117 = v3_8.d[v4_27];
                                                        if (v5_117.e.longValue() < v3_8.g.longValue()) {
                                                            v3_8.g = v5_117.e;
                                                        }
                                                        if (v5_117.e.longValue() > v3_8.h.longValue()) {
                                                            v3_8.h = v5_117.e;
                                                        }
                                                        v4_27++;
                                                    }
                                                    Object v4_29 = v2_7.a.q;
                                                    com.google.android.gms.c.c.bd v5_91 = this.d().b(v4_29);
                                                    if (v5_91 != null) {
                                                        if (v3_8.d.length > 0) {
                                                            com.google.android.gms.c.c.am v8_57;
                                                            String v6_94 = v5_91.h();
                                                            if (v6_94 == 0) {
                                                                v8_57 = 0;
                                                            } else {
                                                                v8_57 = Long.valueOf(v6_94);
                                                            }
                                                            v3_8.j = v8_57;
                                                            com.google.android.gms.c.c.am v8_58 = v5_91.g();
                                                            if (v8_58 != 0) {
                                                                v6_94 = v8_58;
                                                            } else {
                                                            }
                                                            String v6_95;
                                                            if (v6_94 == 0) {
                                                                v6_95 = 0;
                                                            } else {
                                                                v6_95 = Long.valueOf(v6_94);
                                                            }
                                                            v3_8.i = v6_95;
                                                            v5_91.r();
                                                            v3_8.y = Integer.valueOf(((int) v5_91.o()));
                                                            v5_91.a(v3_8.g.longValue());
                                                            v5_91.b(v3_8.h.longValue());
                                                            v3_8.z = v5_91.z();
                                                            this.d().a(v5_91);
                                                        }
                                                    } else {
                                                        this.i.r().k_().a("Bundling raw events w/o app info. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                    }
                                                    if (v3_8.d.length > 0) {
                                                        com.google.android.gms.c.c.bd v5_100;
                                                        this.i.u();
                                                        com.google.android.gms.c.c.bd v5_99 = this.p().a(v2_7.a.q);
                                                        if (v5_99 == null) {
                                                            if (!android.text.TextUtils.isEmpty(v2_7.a.A)) {
                                                                this.i.r().i().a("Did not find measurement config or missing version info. appId", com.google.android.gms.c.c.bb.a(v2_7.a.q));
                                                            } else {
                                                                v5_100 = Long.valueOf(-1);
                                                                v3_8.G = v5_100;
                                                            }
                                                        } else {
                                                            if (v5_99.c != null) {
                                                                v5_100 = v5_99.c;
                                                            } else {
                                                            }
                                                        }
                                                        this.d().a(v3_8, v34_3);
                                                    }
                                                    android.database.sqlite.SQLiteException v3_12 = this.d();
                                                    com.google.android.gms.c.c.bd v2_8 = v2_7.b;
                                                    com.google.android.gms.common.internal.z.a(v2_8);
                                                    v3_12.d();
                                                    v3_12.I();
                                                    com.google.android.gms.c.c.bd v5_110 = new StringBuilder("rowid in (");
                                                    String v6_111 = 0;
                                                    while (v6_111 < v2_8.size()) {
                                                        if (v6_111 != null) {
                                                            v5_110.append(",");
                                                        }
                                                        v5_110.append(((Long) v2_8.get(v6_111)).longValue());
                                                        v6_111++;
                                                    }
                                                    v5_110.append(")");
                                                    com.google.android.gms.c.c.bd v5_112 = v3_12.i().delete("raw_events", v5_110.toString(), 0);
                                                    if (v5_112 != v2_8.size()) {
                                                        v3_12.r().k_().a("Deleted fewer rows from raw events table than expected", Integer.valueOf(v5_112), Integer.valueOf(v2_8.size()));
                                                    }
                                                    com.google.android.gms.c.c.bd v2_11 = this.d();
                                                    android.database.sqlite.SQLiteException v3_15 = v2_11.i();
                                                    try {
                                                        String v6_117 = new String[2];
                                                        v6_117[0] = v4_29;
                                                        v6_117[1] = v4_29;
                                                        v3_15.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v6_117);
                                                    } catch (android.database.sqlite.SQLiteException v0_10) {
                                                        v2_11.r().k_().a("Failed to remove unused event metadata. appId", com.google.android.gms.c.c.bb.a(v4_29), v0_10);
                                                    }
                                                    this.d().g();
                                                    this.d().h();
                                                    return 1;
                                                }
                                            } else {
                                                v9_0.close();
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                        }
                                        if (v15_1.moveToNext()) {
                                            v4_31.r().i().a("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                        }
                                        String[] v16_2;
                                        com.google.android.gms.c.c.bd v5_56;
                                        v15_1.close();
                                        v2_7.a(v13_6);
                                        if (v5_123 == -1) {
                                            v5_56 = "app_id = ? and metadata_fingerprint = ?";
                                            int v9_16 = new String[2];
                                            v9_16[0] = v3_0;
                                            v9_16[1] = v22;
                                            v16_2 = v9_16;
                                        } else {
                                            Boolean v12_22 = new String[3];
                                            v12_22[0] = v3_0;
                                            v12_22[1] = v22;
                                            v12_22[2] = String.valueOf(v5_123);
                                            v5_56 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                                            v16_2 = v12_22;
                                        }
                                        v9_0 = v15_1;
                                        com.google.android.gms.c.c.bd v5_58 = v25.query("raw_events", new String[] {"rowid", "name", "timestamp", "data"}), v5_56, v16_2, 0, 0, "rowid", 0);
                                        try {
                                            if (v5_58.moveToFirst()) {
                                                do {
                                                    Boolean v12_26 = v5_58.getLong(0);
                                                    int v9_20 = v5_58.getBlob(3);
                                                    int v9_21 = com.google.android.gms.c.c.a.a(v9_20, 0, v9_20.length);
                                                    long v14_9 = new com.google.android.gms.c.c.gk();
                                                    v14_9.a(v9_21);
                                                    v14_9.d = v5_58.getString(1);
                                                    v14_9.e = Long.valueOf(v5_58.getLong(2));
                                                    if (v2_7.a(v12_26, v14_9)) {
                                                    } else {
                                                        if (v5_58 == null) {
                                                        } else {
                                                        }
                                                    }
                                                } while(v5_58.moveToNext());
                                                if (v5_58 == null) {
                                                }
                                            } else {
                                                v4_31.r().i().a("Raw event data disappeared while in transaction. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                                if (v5_58 == null) {
                                                }
                                            }
                                        } catch (android.database.sqlite.SQLiteException v0_8) {
                                            com.google.android.gms.c.c.bd v2_0 = v0_8;
                                            int v21 = v5_58;
                                            if (v21 != 0) {
                                                v21.close();
                                            }
                                            throw v2_0;
                                        } catch (android.database.sqlite.SQLiteException v0_1) {
                                            Boolean v12_5 = v3_0;
                                            v9_0 = v5_58;
                                            android.database.sqlite.SQLiteException v3_3 = v0_1;
                                            v4_31.r().k_().a("Data loss. Error selecting raw event. appId", com.google.android.gms.c.c.bb.a(v12_5), v3_3);
                                            if (v9_0 == 0) {
                                            }
                                        }
                                        v5_58.close();
                                    } else {
                                        v4_31.r().k_().a("Raw event metadata record is missing. appId", com.google.android.gms.c.c.bb.a(v3_0));
                                        if (v15_1 == null) {
                                        } else {
                                            v15_1.close();
                                        }
                                    }
                                } catch (android.database.sqlite.SQLiteException v0_6) {
                                    v9_0 = v15_1;
                                    v2_0 = v0_6;
                                    v21 = v9_0;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v9_0 = v15_1;
                                } catch (android.database.sqlite.SQLiteException v0_9) {
                                    v2_0 = v0_9;
                                    v21 = v15_1;
                                } catch (android.database.sqlite.SQLiteException v0_1) {
                                    v12_5 = v3_0;
                                    v9_0 = v15_1;
                                }
                                v12_5 = v3_0;
                            } catch (android.database.sqlite.SQLiteException v0_4) {
                                v2_0 = v0_4;
                                v21 = v23;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v12_5 = v3_0;
                                v9_0 = v23;
                            }
                        } else {
                            if (v3_0 == null) {
                            } else {
                            }
                        }
                    } else {
                        Boolean v13_18;
                        Boolean v12_39 = v5_123 cmp -1;
                        try {
                            if (v12_39 == null) {
                                v13_18 = new String[1];
                                v13_18[0] = String.valueOf(p66);
                            } else {
                                v13_18 = new String[2];
                                v13_18[0] = String.valueOf(v5_123);
                                v13_18[1] = String.valueOf(p66);
                            }
                        } catch (android.database.sqlite.SQLiteException v0_1) {
                            v9_0 = 0;
                            v12_5 = 0;
                        }
                        Boolean v12_43;
                        if (v12_39 == null) {
                            v12_43 = "";
                        } else {
                            v12_43 = "rowid <= ? and ";
                        }
                        android.database.sqlite.SQLiteException v3_18 = new StringBuilder((String.valueOf(v12_43).length() + 148));
                        v3_18.append("select app_id, metadata_fingerprint from raw_events where ");
                        v3_18.append(v12_43);
                        v3_18.append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;");
                        v3_0 = v15_2.rawQuery(v3_18.toString(), v13_18);
                        if (v3_0.moveToFirst()) {
                            v12_5 = v3_0.getString(0);
                            try {
                                Boolean v13_1 = v3_0.getString(1);
                                v3_0.close();
                                v23 = v3_0;
                                v3_0 = v12_5;
                                v22 = v13_1;
                            } catch (android.database.sqlite.SQLiteException v0_1) {
                                v9_0 = v3_0;
                            }
                        } else {
                            if (v3_0 == null) {
                            }
                        }
                    }
                } catch (android.database.sqlite.SQLiteException v0_2) {
                    v2_0 = v0_2;
                    v21 = v3_0;
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    v9_0 = v3_0;
                    v12_5 = 0;
                }
                v3_0.close();
            } catch (android.database.sqlite.SQLiteException v0_0) {
                v2_0 = v0_0;
                v21 = 0;
            } catch (android.database.sqlite.SQLiteException v0_11) {
                v3_3 = v0_11;
                v9_0 = 0;
                v12_5 = 0;
            } catch (android.database.sqlite.SQLiteException v0_6) {
            }
        } catch (android.database.sqlite.SQLiteException v0_3) {
            com.google.android.gms.c.c.bd v2_1 = v0_3;
            this.d().h();
            throw v2_1;
        }
    }

Method com.google.android.gms.c.c.ah.a() calling method android.database.sqlite.SQLiteDatabase.query()


    private static boolean a(com.google.android.gms.c.c.bb p11, android.database.sqlite.SQLiteDatabase p12, String p13)
    {
        if (p11 == null) {
            throw new IllegalArgumentException("Monitor must not be null");
        } else {
            android.database.sqlite.SQLiteException v0_2 = 0;
            try {
                String[] v6 = new String[1];
                v6[0] = p13;
                android.database.sqlite.SQLiteException v12_2 = p12.query("SQLITE_MASTER", new String[] {"name"}), "name=?", v6, 0, 0, 0);
                try {
                    android.database.sqlite.SQLiteException v0_0 = v12_2.moveToFirst();
                } catch (Throwable v11_4) {
                    v0_2 = v12_2;
                    if (v0_2 != null) {
                        v0_2.close();
                    }
                    throw v11_4;
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    v0_2 = v12_2;
                    android.database.sqlite.SQLiteException v12_3 = v0_1;
                    p11.i().a("Error querying for table", p13, v12_3);
                    if (v0_2 != null) {
                        v0_2.close();
                    }
                    return 0;
                }
                if (v12_2 != null) {
                    v12_2.close();
                }
                return v0_0;
            } catch (Throwable v11_4) {
            } catch (android.database.sqlite.SQLiteException v12_3) {
            }
        }
    }