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.internal.zzcig.zzb() calling method android.database.sqlite.SQLiteDatabase.update()


    protected final boolean zzb(String p17, byte[] p18, String p19)
    {
        int v2_7;
        this.zzxf();
        this.zzve();
        com.google.android.gms.common.internal.zzbq.zzgm(p17);
        Object v5_0 = this.zzc(p17, p18);
        if (v5_0 != null) {
            this.zza(p17, v5_0);
            this.zzjec.put(p17, v5_0);
            this.zzjee.put(p17, p19);
            this.zzjdz.put(p17, com.google.android.gms.internal.zzcig.zza(v5_0));
            long v6_0 = this.zzawl();
            String[] v7_0 = v5_0.zzjla;
            com.google.android.gms.common.internal.zzbq.checkNotNull(v7_0);
            int v8_0 = v7_0.length;
            String v4_0 = 0;
            while (v4_0 < v8_0) {
                int v9_1 = v7_0[v4_0];
                com.google.android.gms.internal.zzcgo v10_1 = v9_1.zzjju;
                String v11_0 = v10_1.length;
                int v3_0 = 0;
                while (v3_0 < v11_0) {
                    int v2_4 = v10_1[v3_0];
                    com.google.android.gms.internal.zzclt[] v12_1 = com.google.android.gms.measurement.AppMeasurement$Event.zziq(v2_4.zzjjx);
                    if (v12_1 != null) {
                        v2_4.zzjjx = v12_1;
                    }
                    com.google.android.gms.internal.zzclt[] v12_2 = v2_4.zzjjy;
                    int v13 = v12_2.length;
                    int v2_5 = 0;
                    while (v2_5 < v13) {
                        com.google.android.gms.internal.zzclt v14 = v12_2[v2_5];
                        String v15_1 = com.google.android.gms.measurement.AppMeasurement$Param.zziq(v14.zzjkf);
                        if (v15_1 != null) {
                            v14.zzjkf = v15_1;
                        }
                        v2_5++;
                    }
                    v3_0++;
                }
                int v3_1 = v9_1.zzjjt;
                int v9_0 = v3_1.length;
                int v2_2 = 0;
                while (v2_2 < v9_0) {
                    com.google.android.gms.internal.zzcgo v10_0 = v3_1[v2_2];
                    String v11_2 = com.google.android.gms.measurement.AppMeasurement$UserProperty.zziq(v10_0.zzjkm);
                    if (v11_2 != null) {
                        v10_0.zzjkm = v11_2;
                    }
                    v2_2++;
                }
                v4_0++;
            }
            v6_0.zzaws().zza(p17, v7_0);
            try {
                v5_0.zzjla = 0;
                int v2_14 = new byte[v5_0.zzho()];
                v5_0.zza(com.google.android.gms.internal.zzfjk.zzo(v2_14, 0, v2_14.length));
                byte[] v18_1 = v2_14;
            } catch (int v2_15) {
                this.zzawy().zzazf().zze("Unable to serialize reduced-size config. Storing full config instead. appId", com.google.android.gms.internal.zzchm.zzjk(p17), v2_15);
            }
            int v3_7 = this.zzaws();
            com.google.android.gms.common.internal.zzbq.zzgm(p17);
            v3_7.zzve();
            v3_7.zzxf();
            int v2_17 = new android.content.ContentValues();
            v2_17.put("remote_config", v18_1);
            try {
                String v4_4 = v3_7.getWritableDatabase();
                String[] v7_2 = new String[1];
                v7_2[0] = p17;
            } catch (int v2_22) {
                v3_7.zzawy().zzazd().zze("Error storing remote config. appId", com.google.android.gms.internal.zzchm.zzjk(p17), v2_22);
                v2_7 = 1;
            }
            if (((long) v4_4.update("apps", v2_17, "app_id = ?", v7_2)) != 0) {
            } else {
                v3_7.zzawy().zzazd().zzj("Failed to update remote config (got 0). appId", com.google.android.gms.internal.zzchm.zzjk(p17));
            }
        } else {
            v2_7 = 0;
        }
        return v2_7;
    }

Method com.google.android.gms.internal.zzcgo.zzal() calling method android.database.sqlite.SQLiteDatabase.update()


    protected final long zzal(String p13, String p14)
    {
        com.google.android.gms.common.internal.zzbq.zzgm(p13);
        com.google.android.gms.common.internal.zzbq.zzgm(p14);
        this.zzve();
        this.zzxf();
        android.database.sqlite.SQLiteDatabase v6 = this.getWritableDatabase();
        v6.beginTransaction();
        try {
            android.database.sqlite.SQLiteException v0_10 = new StringBuilder((String.valueOf(p14).length() + 32)).append("select ").append(p14).append(" from app2 where app_id=?").toString();
            String v1_5 = new String[1];
            v1_5[0] = p13;
            android.database.sqlite.SQLiteException v0_1 = this.zza(v0_10, v1_5, -1);
        } catch (android.database.sqlite.SQLiteException v0_16) {
            v6.endTransaction();
            throw v0_16;
        } catch (android.database.sqlite.SQLiteException v0_15) {
            android.database.sqlite.SQLiteException v2_1 = v0_15;
            v0_1 = 0;
            this.zzawy().zzazd().zzd("Error inserting column. appId", com.google.android.gms.internal.zzchm.zzjk(p13), p14, v2_1);
            v6.endTransaction();
            return v0_1;
        }
        if (v0_1 == -1) {
            android.database.sqlite.SQLiteException v0_12 = new android.content.ContentValues();
            v0_12.put("app_id", p13);
            v0_12.put("first_open_count", Integer.valueOf(0));
            v0_12.put("previous_install_count", Integer.valueOf(0));
            if (v6.insertWithOnConflict("app2", 0, v0_12, 5) != -1) {
                v0_1 = 0;
            } else {
                this.zzawy().zzazd().zze("Failed to insert column (got -1). appId", com.google.android.gms.internal.zzchm.zzjk(p13), p14);
                v6.endTransaction();
                v0_1 = -1;
                return v0_1;
            }
        }
        try {
            Object v7_10 = new android.content.ContentValues();
            v7_10.put("app_id", p13);
            v7_10.put(p14, Long.valueOf((1 + v0_1)));
            String[] v10_1 = new String[1];
            v10_1[0] = p13;
        } catch (android.database.sqlite.SQLiteException v2_1) {
        }
        if (((long) v6.update("app2", v7_10, "app_id = ?", v10_1)) != 0) {
            v6.setTransactionSuccessful();
            v6.endTransaction();
            return v0_1;
        } else {
            this.zzawy().zzazd().zze("Failed to update column (got 0). appId", com.google.android.gms.internal.zzchm.zzjk(p13), p14);
            v6.endTransaction();
            v0_1 = -1;
            return v0_1;
        }
    }

Method com.google.android.gms.internal.zzcgo.zza() calling method android.database.sqlite.SQLiteDatabase.update()


    public final void zza(com.google.android.gms.internal.zzcgh p8)
    {
        com.google.android.gms.common.internal.zzbq.checkNotNull(p8);
        this.zzve();
        this.zzxf();
        com.google.android.gms.internal.zzcho v0_6 = new android.content.ContentValues();
        v0_6.put("app_id", p8.getAppId());
        v0_6.put("app_instance_id", p8.getAppInstanceId());
        v0_6.put("gmp_app_id", p8.getGmpAppId());
        v0_6.put("resettable_device_id_hash", p8.zzaxc());
        v0_6.put("last_bundle_index", Long.valueOf(p8.zzaxl()));
        v0_6.put("last_bundle_start_timestamp", Long.valueOf(p8.zzaxe()));
        v0_6.put("last_bundle_end_timestamp", Long.valueOf(p8.zzaxf()));
        v0_6.put("app_version", p8.zzvj());
        v0_6.put("app_store", p8.zzaxh());
        v0_6.put("gmp_version", Long.valueOf(p8.zzaxi()));
        v0_6.put("dev_cert_hash", Long.valueOf(p8.zzaxj()));
        v0_6.put("measurement_enabled", Boolean.valueOf(p8.zzaxk()));
        v0_6.put("day", Long.valueOf(p8.zzaxp()));
        v0_6.put("daily_public_events_count", Long.valueOf(p8.zzaxq()));
        v0_6.put("daily_events_count", Long.valueOf(p8.zzaxr()));
        v0_6.put("daily_conversions_count", Long.valueOf(p8.zzaxs()));
        v0_6.put("config_fetched_time", Long.valueOf(p8.zzaxm()));
        v0_6.put("failed_config_fetch_time", Long.valueOf(p8.zzaxn()));
        v0_6.put("app_version_int", Long.valueOf(p8.zzaxg()));
        v0_6.put("firebase_instance_id", p8.zzaxd());
        v0_6.put("daily_error_events_count", Long.valueOf(p8.zzaxu()));
        v0_6.put("daily_realtime_events_count", Long.valueOf(p8.zzaxt()));
        v0_6.put("health_monitor_sample", p8.zzaxv());
        v0_6.put("android_id", Long.valueOf(p8.zzaxx()));
        v0_6.put("adid_reporting_enabled", Boolean.valueOf(p8.zzaxy()));
        try {
            String v1_8 = this.getWritableDatabase();
            int v4_1 = new String[1];
            v4_1[0] = p8.getAppId();
        } catch (com.google.android.gms.internal.zzcho v0_4) {
            this.zzawy().zzazd().zze("Error storing app. appId", com.google.android.gms.internal.zzchm.zzjk(p8.getAppId()), v0_4);
            return;
        }
        if ((((long) v1_8.update("apps", v0_6, "app_id = ?", v4_1)) != 0) || (v1_8.insertWithOnConflict("apps", 0, v0_6, 5) != -1)) {
            return;
        } else {
            this.zzawy().zzazd().zzj("Failed to insert/update app (got -1). appId", com.google.android.gms.internal.zzchm.zzjk(p8.getAppId()));
            return;
        }
    }

Method com.google.android.gms.internal.zzcgo.zza() calling method android.database.sqlite.SQLiteDatabase.update()


    public final com.google.android.gms.internal.zzcgp zza(long p12, String p14, boolean p15, boolean p16, boolean p17, boolean p18, boolean p19)
    {
        com.google.android.gms.common.internal.zzbq.zzgm(p14);
        this.zzve();
        this.zzxf();
        String[] v10 = new String[1];
        v10[0] = p14;
        com.google.android.gms.internal.zzcgp v8_1 = new com.google.android.gms.internal.zzcgp();
        try {
            com.google.android.gms.internal.zzcgp v0_1 = this.getWritableDatabase();
            android.content.ContentValues v2_5 = new String[6];
            v2_5[0] = "day";
            v2_5[1] = "daily_events_count";
            v2_5[2] = "daily_public_events_count";
            v2_5[3] = "daily_conversions_count";
            v2_5[4] = "daily_error_events_count";
            v2_5[5] = "daily_realtime_events_count";
            String v4_20 = new String[1];
            v4_20[0] = p14;
            int v1_1 = v0_1.query("apps", v2_5, "app_id=?", v4_20, 0, 0, 0);
            try {
                com.google.android.gms.internal.zzcgp v0_2;
                if (v1_1.moveToFirst()) {
                    if (v1_1.getLong(0) == p12) {
                        v8_1.zziyy = v1_1.getLong(1);
                        v8_1.zziyx = v1_1.getLong(2);
                        v8_1.zziyz = v1_1.getLong(3);
                        v8_1.zziza = v1_1.getLong(4);
                        v8_1.zzizb = v1_1.getLong(5);
                    }
                    if (p15) {
                        v8_1.zziyy = (v8_1.zziyy + 1);
                    }
                    if (p16) {
                        v8_1.zziyx = (v8_1.zziyx + 1);
                    }
                    if (p17) {
                        v8_1.zziyz = (v8_1.zziyz + 1);
                    }
                    if (p18) {
                        v8_1.zziza = (v8_1.zziza + 1);
                    }
                    if (p19) {
                        v8_1.zzizb = (v8_1.zzizb + 1);
                    }
                    android.content.ContentValues v2_3 = new android.content.ContentValues();
                    v2_3.put("day", Long.valueOf(p12));
                    v2_3.put("daily_public_events_count", Long.valueOf(v8_1.zziyx));
                    v2_3.put("daily_events_count", Long.valueOf(v8_1.zziyy));
                    v2_3.put("daily_conversions_count", Long.valueOf(v8_1.zziyz));
                    v2_3.put("daily_error_events_count", Long.valueOf(v8_1.zziza));
                    v2_3.put("daily_realtime_events_count", Long.valueOf(v8_1.zzizb));
                    v0_1.update("apps", v2_3, "app_id=?", v10);
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_2 = v8_1;
                    return v0_2;
                } else {
                    this.zzawy().zzazf().zzj("Not updating daily counts, app is not known. appId", com.google.android.gms.internal.zzchm.zzjk(p14));
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_2 = v8_1;
                    return v0_2;
                }
            } catch (com.google.android.gms.internal.zzcgp v0_0) {
                this.zzawy().zzazd().zze("Error updating daily counts. appId", com.google.android.gms.internal.zzchm.zzjk(p14), v0_0);
                if (v1_1 != 0) {
                    v1_1.close();
                }
                v0_2 = v8_1;
                return v0_2;
            }
        } catch (com.google.android.gms.internal.zzcgp v0_3) {
            v1_1 = 0;
            if (v1_1 != 0) {
                v1_1.close();
            }
            throw v0_3;
        } catch (com.google.android.gms.internal.zzcgp v0_0) {
            v1_1 = 0;
        } catch (com.google.android.gms.internal.zzcgp v0_3) {
        }
    }

Method com.google.android.gms.internal.zzczh.zzh() calling method android.database.sqlite.SQLiteDatabase.update()


    private final void zzh(long p8, long p10)
    {
        String v0_2 = this.zzlk("Error opening database for getNumStoredHits.");
        if (v0_2 != null) {
            StringBuilder v1_8 = new android.content.ContentValues();
            v1_8.put("hit_first_send_time", Long.valueOf(p10));
            try {
                String[] v4_1 = new String[1];
                v4_1[0] = String.valueOf(p8);
                v0_2.update("gtm_hits", v1_8, "hit_id=?", v4_1);
            } catch (String v0_1) {
                String v0_3 = v0_1.getMessage();
                com.google.android.gms.internal.zzcze.zzcu(new StringBuilder((String.valueOf(v0_3).length() + 70)).append("Error setting HIT_FIRST_DISPATCH_TIME for hitId ").append(p8).append(": ").append(v0_3).toString());
                this.zzp(p8);
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzchi.zzb() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final boolean zzb(int p14, byte[] p15)
    {
        int v0_4;
        this.zzve();
        if (!this.zzjbo) {
            android.content.ContentValues v7_1 = new android.content.ContentValues();
            v7_1.put("type", Integer.valueOf(p14));
            v7_1.put("entry", p15);
            int v6 = 0;
            int v0_1 = 5;
            while (v6 < 5) {
                android.database.Cursor v2 = 0;
                try {
                    android.database.sqlite.SQLiteDatabase v3 = this.getWritableDatabase();
                } catch (com.google.android.gms.internal.zzcho v1_0) {
                    this.zzawy().zzazd().zzj("Error writing entry to local database", v1_0);
                    this.zzjbo = 1;
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 == null) {
                        v6++;
                    } else {
                        v3.close();
                    }
                    v3.insertOrThrow("messages", 0, v7_1);
                    v3.setTransactionSuccessful();
                    v3.endTransaction();
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_4 = 1;
                } catch (com.google.android.gms.internal.zzcho v1_20) {
                    if (android.os.Build$VERSION.SDK_INT < 11) {
                        if (v3 != null) {
                            if (v3.inTransaction()) {
                                v3.endTransaction();
                            }
                        }
                        this.zzawy().zzazd().zzj("Error writing entry to local database", v1_20);
                        this.zzjbo = 1;
                    } else {
                        if (!(v1_20 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                        } else {
                            android.os.SystemClock.sleep(((long) v0_1));
                            v0_1 += 20;
                        }
                    }
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 == null) {
                    } else {
                        v3.close();
                    }
                } catch (int v0_3) {
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    throw v0_3;
                }
                if (v3 != null) {
                    v3.beginTransaction();
                    Long v4_4 = 0;
                    v2 = v3.rawQuery("select count(1) from messages", 0);
                    if ((v2 != null) && (v2.moveToFirst())) {
                        v4_4 = v2.getLong(0);
                    }
                    if (v4_4 >= 100000) {
                        this.zzawy().zzazd().log("Data loss, local db full");
                        Long v4_6 = ((100000 - v4_4) + 1);
                        String[] v9_1 = new String[1];
                        v9_1[0] = Long.toString(v4_6);
                        long v8_6 = ((long) v3.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v9_1));
                        if (v8_6 != v4_6) {
                            this.zzawy().zzazd().zzd("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v4_6), Long.valueOf(v8_6), Long.valueOf((v4_6 - v8_6)));
                        }
                    }
                } else {
                    this.zzjbo = 1;
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_4 = 0;
                }
            }
            this.zzawy().zzazf().log("Failed to write entry to local database");
            v0_4 = 0;
        } else {
            v0_4 = 0;
        }
        return v0_4;
    }

Method com.google.android.gms.internal.zzcgo.zzba() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final String zzba(long p8)
    {
        String v0_0 = 0;
        this.zzve();
        this.zzxf();
        try {
            int v1_4 = this.getWritableDatabase();
            String v3_4 = new String[1];
            v3_4[0] = String.valueOf(p8);
            Throwable v2_0 = v1_4.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_4);
            try {
                if (v2_0.moveToFirst()) {
                    v0_0 = v2_0.getString(0);
                    if (v2_0 == null) {
                        return v0_0;
                    } else {
                        v2_0.close();
                        return v0_0;
                    }
                } else {
                    this.zzawy().zzazj().log("No expired configs for apps with pending events");
                    if (v2_0 == null) {
                        return v0_0;
                    } else {
                        v2_0.close();
                        return v0_0;
                    }
                }
            } catch (int v1_0) {
                this.zzawy().zzazd().zzj("Error selecting expired configs", v1_0);
                if (v2_0 == null) {
                    return v0_0;
                } else {
                    v2_0.close();
                    return v0_0;
                }
            }
        } catch (int v1_1) {
            v2_0 = 0;
            String v0_1 = v1_1;
            if (v2_0 != null) {
                v2_0.close();
            }
            throw v0_1;
        } catch (int v1_0) {
            v2_0 = 0;
        } catch (String v0_1) {
        }
    }

Method com.google.android.gms.internal.zzcgo.zzaym() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final long zzaym()
    {
        long v0_0 = -1;
        try {
            android.database.Cursor v3 = this.getWritableDatabase().rawQuery("select rowid from raw_events order by rowid desc limit 1;", 0);
        } catch (int v2_1) {
            this.zzawy().zzazd().zzj("Error querying raw events", v2_1);
            if (v3 == null) {
                return v0_0;
            } else {
                v3.close();
                return v0_0;
            }
        } catch (long v0_1) {
            if (v3 != null) {
                v3.close();
            }
            throw v0_1;
        }
        if (v3.moveToFirst()) {
            v0_0 = v3.getLong(0);
            if (v3 == null) {
                return v0_0;
            } else {
                v3.close();
                return v0_0;
            }
        } else {
            if (v3 == null) {
                return v0_0;
            } else {
                v3.close();
                return v0_0;
            }
        }
    }

Method com.google.android.gms.internal.zzcgo.zzayf() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final String zzayf()
    {
        String v0_0 = 0;
        try {
            Throwable v2_0 = this.getWritableDatabase().rawQuery("select app_id from queue order by has_realtime desc, rowid asc limit 1;", 0);
            try {
                if (!v2_0.moveToFirst()) {
                    if (v2_0 == null) {
                        return v0_0;
                    } else {
                        v2_0.close();
                        return v0_0;
                    }
                } else {
                    v0_0 = v2_0.getString(0);
                    if (v2_0 == null) {
                        return v0_0;
                    } else {
                        v2_0.close();
                        return v0_0;
                    }
                }
            } catch (int v1_1) {
                this.zzawy().zzazd().zzj("Database error getting next bundle app id", v1_1);
                if (v2_0 == null) {
                    return v0_0;
                } else {
                    v2_0.close();
                    return v0_0;
                }
            }
        } catch (int v1_4) {
            v2_0 = 0;
            String v0_1 = v1_4;
            if (v2_0 != null) {
                v2_0.close();
            }
            throw v0_1;
        } catch (int v1_1) {
            v2_0 = 0;
        } catch (String v0_1) {
        }
    }

Method com.google.android.gms.internal.zzcgo.zzb() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


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

Method com.google.android.gms.internal.zzcgo.zzb() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long zzb(String p5, String[] p6)
    {
        try {
            android.database.Cursor v1 = this.getWritableDatabase().rawQuery(p5, p6);
        } catch (android.database.sqlite.SQLiteException v0_2) {
            this.zzawy().zzazd().zze("Database error", p5, v0_2);
            throw v0_2;
        } catch (android.database.sqlite.SQLiteException v0_3) {
            if (v1 != null) {
                v1.close();
            }
            throw v0_3;
        }
        if (!v1.moveToFirst()) {
            throw new android.database.sqlite.SQLiteException("Database returned empty set");
        } else {
            com.google.android.gms.internal.zzcho v2_2 = v1.getLong(0);
            if (v1 != null) {
                v1.close();
            }
            return v2_2;
        }
    }

Method com.google.android.gms.internal.zzcgo.zza() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long zza(String p6, String[] p7, long p8)
    {
        try {
            android.database.Cursor v1 = this.getWritableDatabase().rawQuery(p6, p7);
        } catch (int v0_4) {
            this.zzawy().zzazd().zze("Database error", p6, v0_4);
            throw v0_4;
        } catch (int v0_1) {
            if (v1 != null) {
                v1.close();
            }
            throw v0_1;
        }
        if (!v1.moveToFirst()) {
            if (v1 != null) {
                v1.close();
            }
        } else {
            p8 = v1.getLong(0);
            if (v1 != null) {
                v1.close();
            }
        }
        return p8;
    }

Method com.google.android.gms.internal.zzaql.zzb() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long zzb(String p5, String[] p6)
    {
        try {
            android.database.Cursor v1 = this.getWritableDatabase().rawQuery(p5, 0);
        } catch (android.database.sqlite.SQLiteException v0_1) {
            this.zzd("Database error", p5, v0_1);
            throw v0_1;
        } catch (android.database.sqlite.SQLiteException v0_2) {
            if (v1 != null) {
                v1.close();
            }
            throw v0_2;
        }
        if (!v1.moveToFirst()) {
            throw new android.database.sqlite.SQLiteException("Database returned empty set");
        } else {
            String v2_2 = v1.getLong(0);
            if (v1 != null) {
                v1.close();
            }
            return v2_2;
        }
    }

Method com.google.android.gms.internal.zzaql.zza() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long zza(String p4, String[] p5, long p6)
    {
        String v1 = 0;
        try {
            String v2_1 = this.getWritableDatabase().rawQuery(p4, p5);
            try {
                long v0_2;
                if (!v2_1.moveToFirst()) {
                    if (v2_1 != null) {
                        v2_1.close();
                    }
                    v0_2 = 0;
                } else {
                    v0_2 = v2_1.getLong(0);
                    if (v2_1 != null) {
                        v2_1.close();
                    }
                }
            } catch (long v0_1) {
                v1 = v2_1;
                if (v1 != null) {
                    v1.close();
                }
                throw v0_1;
            } catch (long v0_4) {
                v1 = v2_1;
                this.zzd("Database error", p4, v0_4);
                throw v0_4;
            }
            return v0_2;
        } catch (long v0_1) {
        } catch (long v0_4) {
        }
    }

Method com.google.android.gms.internal.zzczh.zzmj() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final int zzmj(String p7)
    {
        android.database.Cursor v2 = 0;
        int v0_0 = 0;
        String v3_1 = this.zzlk("Error opening database for getNumRecords.");
        if (v3_1 != null) {
            try {
                int v1_1;
                int v1_10 = String.valueOf(p7);
            } catch (int v1_4) {
                int v1_6 = String.valueOf(v1_4.getMessage());
                if (v1_6.length() == 0) {
                    int v1_8 = new String("Error getting numStoredRecords: ");
                } else {
                    v1_8 = "Error getting numStoredRecords: ".concat(v1_6);
                }
                com.google.android.gms.internal.zzcze.zzcu(v1_8);
                if (v2 != null) {
                    v2.close();
                }
            } catch (int v0_1) {
                if (v2 != null) {
                    v2.close();
                }
                throw v0_1;
            }
            if (v1_10.length() == 0) {
                v1_1 = new String("SELECT COUNT(*) from ");
            } else {
                v1_1 = "SELECT COUNT(*) from ".concat(v1_10);
            }
            v2 = v3_1.rawQuery(v1_1, 0);
            if (v2.moveToFirst()) {
                v0_0 = ((int) v2.getLong(0));
            }
            if (v2 != null) {
                v2.close();
            }
        }
        return v0_0;
    }

Method com.google.android.gms.internal.zzczj.onOpen() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final void onOpen(android.database.sqlite.SQLiteDatabase p5)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            String v0_15 = p5.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_15.moveToFirst();
                v0_15.close();
            } catch (String v1_0) {
                v0_15.close();
                throw v1_0;
            }
        }
        if (com.google.android.gms.internal.zzczj.zza("gtm_hit_unique_ids", p5)) {
            String v0_2 = new String[1];
            v0_2[0] = "hit_unique_id";
            com.google.android.gms.internal.zzczj.zza(p5, "gtm_hit_unique_ids", java.util.Arrays.asList(v0_2));
        } else {
            p5.execSQL(com.google.android.gms.internal.zzczh.zzbfn());
        }
        if (com.google.android.gms.internal.zzczj.zza("gtm_hits", p5)) {
            String v0_9 = new String[8];
            v0_9[0] = "hit_id";
            v0_9[1] = "hit_url";
            v0_9[2] = "hit_time";
            v0_9[3] = "hit_first_send_time";
            v0_9[4] = "hit_method";
            v0_9[5] = "hit_unique_id";
            v0_9[6] = "hit_headers";
            v0_9[7] = "hit_body";
            com.google.android.gms.internal.zzczj.zza(p5, "gtm_hits", java.util.Arrays.asList(v0_9));
        } else {
            p5.execSQL(com.google.android.gms.internal.zzczh.zzbhd());
        }
        p5.execSQL(com.google.android.gms.internal.zzczh.zzbhe());
        p5.execSQL(com.google.android.gms.internal.zzczh.zzbhf());
        return;
    }

Method com.google.android.gms.internal.zzczj.zza() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private static void zza(android.database.sqlite.SQLiteDatabase p7, String p8, java.util.List p9)
    {
        String v2_2 = p7.rawQuery(new StringBuilder((String.valueOf(p8).length() + 22)).append("SELECT * FROM ").append(p8).append(" WHERE 0").toString(), 0);
        Object[] v3_1 = new java.util.HashSet();
        try {
            Object[] v4_0 = v2_2.getColumnNames();
            android.database.sqlite.SQLiteException v0_4 = 0;
        } catch (android.database.sqlite.SQLiteException v0_5) {
            v2_2.close();
            throw v0_5;
        }
        while (v0_4 < v4_0.length) {
            v3_1.add(v4_0[v0_4]);
            v0_4++;
        }
        v2_2.close();
        String v2_3 = p9.iterator();
        while (v2_3.hasNext()) {
            android.database.sqlite.SQLiteException v0_13 = ((String) v2_3.next());
            if (!v3_1.remove(v0_13)) {
                Object[] v4_3 = new Object[2];
                v4_3[0] = v0_13;
                v4_3[1] = p8;
                throw new android.database.sqlite.SQLiteException(String.format("Database column %s missing in table %s.", v4_3));
            }
        }
        if (v3_1.isEmpty()) {
            return;
        } else {
            Object[] v3_2 = new Object[1];
            v3_2[0] = p8;
            throw new android.database.sqlite.SQLiteException(String.format("Database has extra columns in table %s.", v3_2));
        }
    }

Method com.google.android.gms.internal.zzcim.zzg() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final boolean zzg(String p31, long p32)
    {
        this.zzaws().beginTransaction();
        try {
            com.google.android.gms.internal.zzcim$zza v21 = new com.google.android.gms.internal.zzcim$zza;
            v21(this, 0);
            int v14_1 = this.zzaws();
            String v4_0 = 0;
            int v16_0 = this.zzjgb;
            com.google.android.gms.common.internal.zzbq.checkNotNull(v21);
            v14_1.zzve();
            v14_1.zzxf();
            com.google.android.gms.internal.zzcgw v3_50 = 0;
            try {
                long v12_0;
                int v13_0;
                com.google.android.gms.internal.zzcgw v2_90 = v14_1.getWritableDatabase();
            } catch (com.google.android.gms.internal.zzcgw v2_21) {
                v14_1.zzawy().zzazd().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzchm.zzjk(v4_0), v2_21);
                if (v3_50 == null) {
                    if ((v21.zzapa != null) && (!v21.zzapa.isEmpty())) {
                        com.google.android.gms.internal.zzcgw v2_111 = 0;
                    } else {
                        v2_111 = 1;
                    }
                    com.google.android.gms.internal.zzcgw v2_114;
                    if (v2_111 != null) {
                        this.zzaws().setTransactionSuccessful();
                        this.zzaws().endTransaction();
                        v2_114 = 0;
                    } else {
                        com.google.android.gms.internal.zzcmb v17 = 0;
                        com.google.android.gms.internal.zzcme v22 = v21.zzjgi;
                        com.google.android.gms.internal.zzcgw v2_117 = new com.google.android.gms.internal.zzcmb[v21.zzapa.size()];
                        v22.zzjlp = v2_117;
                        long v12_1 = 0;
                        int v13_1 = 0;
                        while (v13_1 < v21.zzapa.size()) {
                            com.google.android.gms.internal.zzcgw v2_65;
                            com.google.android.gms.internal.zzcgw v3_29;
                            if (!this.zzawv().zzan(v21.zzjgi.zzcn, ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name)) {
                                String v4_28;
                                int v14_2 = this.zzawv().zzao(v21.zzjgi.zzcn, ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name);
                                if (v14_2 != 0) {
                                    com.google.android.gms.internal.zzcgw v3_35 = 0;
                                    String v4_33 = 0;
                                    if (((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh == null) {
                                        int v5_83 = new com.google.android.gms.internal.zzcmc[0];
                                        ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh = v5_83;
                                    }
                                    int v6_0 = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh;
                                    int v7_0 = v6_0.length;
                                    int v5_0 = 0;
                                    while (v5_0 < v7_0) {
                                        com.google.android.gms.internal.zzcgw v2_67;
                                        com.google.android.gms.internal.zzcgw v2_66 = v6_0[v5_0];
                                        if (!"_c".equals(v2_66.name)) {
                                            if (!"_r".equals(v2_66.name)) {
                                                v2_67 = v4_33;
                                            } else {
                                                v2_66.zzjll = Long.valueOf(1);
                                                v2_67 = 1;
                                            }
                                        } else {
                                            v2_66.zzjll = Long.valueOf(1);
                                            v3_35 = 1;
                                            v2_67 = v4_33;
                                        }
                                        v5_0++;
                                        v4_33 = v2_67;
                                    }
                                    if ((v3_35 == null) && (v14_2 != 0)) {
                                        this.zzawy().zzazj().zzj("Marking event as conversion", this.zzawt().zzjh(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name));
                                        com.google.android.gms.internal.zzcgw v2_20 = ((com.google.android.gms.internal.zzcmc[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh, (((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh.length + 1)));
                                        com.google.android.gms.internal.zzcgw v3_3 = new com.google.android.gms.internal.zzcmc();
                                        v3_3.name = "_c";
                                        v3_3.zzjll = Long.valueOf(1);
                                        v2_20[(v2_20.length - 1)] = v3_3;
                                        ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh = v2_20;
                                    }
                                    if (v4_33 == null) {
                                        this.zzawy().zzazj().zzj("Marking event as real-time", this.zzawt().zzjh(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name));
                                        com.google.android.gms.internal.zzcgw v2_38 = ((com.google.android.gms.internal.zzcmc[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh, (((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh.length + 1)));
                                        com.google.android.gms.internal.zzcgw v3_10 = new com.google.android.gms.internal.zzcmc();
                                        v3_10.name = "_r";
                                        v3_10.zzjll = Long.valueOf(1);
                                        v2_38[(v2_38.length - 1)] = v3_10;
                                        ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh = v2_38;
                                    }
                                    if (this.zzaws().zza(this.zzbag(), v21.zzjgi.zzcn, 0, 0, 0, 0, 1).zzizb <= ((long) this.zzjew.zzix(v21.zzjgi.zzcn))) {
                                        v17 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcgw v2_42 = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1));
                                        com.google.android.gms.internal.zzcgw v3_19 = 0;
                                        while (v3_19 < v2_42.zzjlh.length) {
                                            if (!"_r".equals(v2_42.zzjlh[v3_19].name)) {
                                                v3_19++;
                                            } else {
                                                String v4_16 = new com.google.android.gms.internal.zzcmc[(v2_42.zzjlh.length - 1)];
                                                if (v3_19 > null) {
                                                    System.arraycopy(v2_42.zzjlh, 0, v4_16, 0, v3_19);
                                                }
                                                if (v3_19 < v4_16.length) {
                                                    System.arraycopy(v2_42.zzjlh, (v3_19 + 1), v4_16, v3_19, (v4_16.length - v3_19));
                                                }
                                                v2_42.zzjlh = v4_16;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzclq.zzjz(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name)) || ((v14_2 == 0) || (this.zzaws().zza(this.zzbag(), v21.zzjgi.zzcn, 0, 0, 1, 0, 0).zziyz <= ((long) this.zzjew.zzb(v21.zzjgi.zzcn, com.google.android.gms.internal.zzchc.zzjaq))))) {
                                        v4_28 = v17;
                                    } else {
                                        this.zzawy().zzazf().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                                        com.google.android.gms.internal.zzcgw v2_56 = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1));
                                        int v5_20 = 0;
                                        String v4_24 = 0;
                                        int v7_12 = v2_56.zzjlh;
                                        int v6_12 = 0;
                                        while (v6_12 < v7_12.length) {
                                            String v4_29;
                                            com.google.android.gms.internal.zzcgw v3_30 = v7_12[v6_12];
                                            if (!"_c".equals(v3_30.name)) {
                                                if (!"_err".equals(v3_30.name)) {
                                                    v3_30 = v4_24;
                                                    v4_29 = v5_20;
                                                } else {
                                                    v4_29 = 1;
                                                    v3_30 = v4_24;
                                                }
                                            } else {
                                                v4_29 = v5_20;
                                            }
                                            v6_12++;
                                            v5_20 = v4_29;
                                            v4_24 = v3_30;
                                        }
                                        if ((v5_20 == 0) || (v4_24 == null)) {
                                            if (v4_24 == null) {
                                                this.zzawy().zzazd().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                                            } else {
                                                v4_24.name = "_err";
                                                v4_24.zzjll = Long.valueOf(10);
                                                v4_28 = v17;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcgw v3_25 = v2_56.zzjlh;
                                            int v5_22 = new com.google.android.gms.internal.zzcmc[1];
                                            v5_22[0] = v4_24;
                                            v2_56.zzjlh = ((com.google.android.gms.internal.zzcmc[]) com.google.android.gms.common.util.zza.zza(v3_25, v5_22));
                                            v4_28 = v17;
                                        }
                                    }
                                } else {
                                    this.zzawu();
                                    if (!com.google.android.gms.internal.zzclq.zzkn(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name)) {
                                    }
                                }
                                com.google.android.gms.internal.zzcgw v3_28 = (v12_1 + 1);
                                v22.zzjlp[v12_1] = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1));
                                v2_65 = v3_28;
                                v3_29 = v4_28;
                            } else {
                                com.google.android.gms.internal.zzcgw v2_81;
                                this.zzawy().zzazf().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn), this.zzawt().zzjh(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name));
                                if ((!this.zzawu().zzkl(v21.zzjgi.zzcn)) && (!this.zzawu().zzkm(v21.zzjgi.zzcn))) {
                                    v2_81 = 0;
                                } else {
                                    v2_81 = 1;
                                }
                                if ((v2_81 != null) || ("_err".equals(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name))) {
                                    v2_65 = v12_1;
                                    v3_29 = v17;
                                } else {
                                    this.zzawu().zza(v21.zzjgi.zzcn, 11, "_ev", ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name, 0);
                                    v2_65 = v12_1;
                                    v3_29 = v17;
                                }
                            }
                            v13_1++;
                            v12_1 = v2_65;
                            v17 = v3_29;
                        }
                        if (v12_1 < v21.zzapa.size()) {
                            v22.zzjlp = ((com.google.android.gms.internal.zzcmb[]) java.util.Arrays.copyOf(v22.zzjlp, v12_1));
                        }
                        v22.zzjmi = this.zza(v21.zzjgi.zzcn, v21.zzjgi.zzjlq, v22.zzjlp);
                        if ((((Boolean) com.google.android.gms.internal.zzchc.zzjac.get()).booleanValue()) && ("1".equals(this.zzjew.zzawv().zzam(v21.zzjgi.zzcn, "measurement.event_sampling_enabled")))) {
                            java.util.HashMap v23_1 = new java.util.HashMap();
                            java.util.HashMap v0_50 = new com.google.android.gms.internal.zzcmb[v22.zzjlp.length];
                            com.google.android.gms.internal.zzcmb[] v24 = v0_50;
                            Boolean v18 = 0;
                            java.security.SecureRandom v25 = this.zzawu().zzbaz();
                            com.google.android.gms.internal.zzcmb[] v26 = v22.zzjlp;
                            int v27 = v26.length;
                            int v20 = 0;
                            while (v20 < v27) {
                                com.google.android.gms.internal.zzcgw v2_213;
                                com.google.android.gms.internal.zzcmb v28 = v26[v20];
                                if (!v28.name.equals("_ep")) {
                                    int v19;
                                    if (com.google.android.gms.internal.zzcim.zza(v28, "_dbg", Long.valueOf(1))) {
                                        v19 = 1;
                                    } else {
                                        v19 = this.zzawv().zzap(v21.zzjgi.zzcn, v28.name);
                                    }
                                    if (v19 > 0) {
                                        com.google.android.gms.internal.zzcgw v3_91;
                                        com.google.android.gms.internal.zzcgw v2_199 = ((com.google.android.gms.internal.zzcgw) v23_1.get(v28.name));
                                        if (v2_199 != null) {
                                            v3_91 = v2_199;
                                        } else {
                                            v3_91 = this.zzaws().zzae(v21.zzjgi.zzcn, v28.name);
                                            if (v3_91 == null) {
                                                this.zzawy().zzazf().zze("Event being bundled has no eventAggregate. appId, eventName", v21.zzjgi.zzcn, v28.name);
                                                v3_91 = new com.google.android.gms.internal.zzcgw(v21.zzjgi.zzcn, v28.name, 1, 1, v28.zzjli.longValue(), 0, 0, 0, 0);
                                            }
                                        }
                                        String v4_84;
                                        this.zzawu();
                                        com.google.android.gms.internal.zzcgw v2_207 = ((Long) com.google.android.gms.internal.zzclq.zza(v28, "_eid"));
                                        if (v2_207 == null) {
                                            v4_84 = 0;
                                        } else {
                                            v4_84 = 1;
                                        }
                                        String v4_85 = Boolean.valueOf(v4_84);
                                        if (v19 != 1) {
                                            if (v25.nextInt(v19) != 0) {
                                                if (Math.abs((v28.zzjli.longValue() - v3_91.zzizn)) < 86400000) {
                                                    if (!v4_85.booleanValue()) {
                                                        v2_213 = v18;
                                                    } else {
                                                        v23_1.put(v28.name, v3_91.zza(v2_207, 0, 0));
                                                    }
                                                } else {
                                                    this.zzawu();
                                                    v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_efs", Long.valueOf(1));
                                                    this.zzawu();
                                                    v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_sr", Long.valueOf(((long) v19)));
                                                    v2_213 = (v18 + 1);
                                                    v24[v18] = v28;
                                                    if (v4_85.booleanValue()) {
                                                        v3_91 = v3_91.zza(0, Long.valueOf(((long) v19)), Boolean.valueOf(1));
                                                    }
                                                    v23_1.put(v28.name, v3_91.zzbc(v28.zzjli.longValue()));
                                                }
                                            } else {
                                                this.zzawu();
                                                v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_sr", Long.valueOf(((long) v19)));
                                                v2_213 = (v18 + 1);
                                                v24[v18] = v28;
                                                if (v4_85.booleanValue()) {
                                                    v3_91 = v3_91.zza(0, Long.valueOf(((long) v19)), 0);
                                                }
                                                v23_1.put(v28.name, v3_91.zzbc(v28.zzjli.longValue()));
                                            }
                                        } else {
                                            v2_213 = (v18 + 1);
                                            v24[v18] = v28;
                                            if ((v4_85.booleanValue()) && ((v3_91.zzizo != null) || ((v3_91.zzizp != null) || (v3_91.zzizq != null)))) {
                                                v23_1.put(v28.name, v3_91.zza(0, 0, 0));
                                            }
                                        }
                                    } else {
                                        this.zzawy().zzazf().zze("Sample rate must be positive. event, rate", v28.name, Integer.valueOf(v19));
                                        v2_213 = (v18 + 1);
                                        v24[v18] = v28;
                                    }
                                } else {
                                    this.zzawu();
                                    com.google.android.gms.internal.zzcgw v2_220 = ((String) com.google.android.gms.internal.zzclq.zza(v28, "_en"));
                                    com.google.android.gms.internal.zzcgw v3_101 = ((com.google.android.gms.internal.zzcgw) v23_1.get(v2_220));
                                    if (v3_101 == null) {
                                        v3_101 = this.zzaws().zzae(v21.zzjgi.zzcn, v2_220);
                                        v23_1.put(v2_220, v3_101);
                                    }
                                    if (v3_101.zzizo != null) {
                                    } else {
                                        if (v3_101.zzizp.longValue() > 1) {
                                            this.zzawu();
                                            v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_sr", v3_101.zzizp);
                                        }
                                        if ((v3_101.zzizq != null) && (v3_101.zzizq.booleanValue())) {
                                            this.zzawu();
                                            v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_efs", Long.valueOf(1));
                                        }
                                        v2_213 = (v18 + 1);
                                        v24[v18] = v28;
                                    }
                                }
                                v20++;
                                v18 = v2_213;
                            }
                            if (v18 < v22.zzjlp.length) {
                                v22.zzjlp = ((com.google.android.gms.internal.zzcmb[]) java.util.Arrays.copyOf(v24, v18));
                            }
                            com.google.android.gms.internal.zzcgw v3_70 = v23_1.entrySet().iterator();
                            while (v3_70.hasNext()) {
                                this.zzaws().zza(((com.google.android.gms.internal.zzcgw) ((java.util.Map$Entry) v3_70.next()).getValue()));
                            }
                        }
                        v22.zzjls = Long.valueOf(nan);
                        v22.zzjlt = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcgw v2_152 = 0;
                        while (v2_152 < v22.zzjlp.length) {
                            com.google.android.gms.internal.zzcgw v3_83 = v22.zzjlp[v2_152];
                            if (v3_83.zzjli.longValue() < v22.zzjls.longValue()) {
                                v22.zzjls = v3_83.zzjli;
                            }
                            if (v3_83.zzjli.longValue() > v22.zzjlt.longValue()) {
                                v22.zzjlt = v3_83.zzjli;
                            }
                            v2_152++;
                        }
                        int v6_34 = v21.zzjgi.zzcn;
                        int v7_26 = this.zzaws().zzjb(v6_34);
                        if (v7_26 != 0) {
                            if (v22.zzjlp.length > 0) {
                                String v4_57;
                                com.google.android.gms.internal.zzcgw v2_157 = v7_26.zzaxf();
                                if (v2_157 == 0) {
                                    v4_57 = 0;
                                } else {
                                    v4_57 = Long.valueOf(v2_157);
                                }
                                v22.zzjlv = v4_57;
                                String v4_58 = v7_26.zzaxe();
                                if (v4_58 != 0) {
                                    v2_157 = v4_58;
                                }
                                com.google.android.gms.internal.zzcgw v2_158;
                                if (v2_157 == 0) {
                                    v2_158 = 0;
                                } else {
                                    v2_158 = Long.valueOf(v2_157);
                                }
                                v22.zzjlu = v2_158;
                                v7_26.zzaxo();
                                v22.zzjmg = Integer.valueOf(((int) v7_26.zzaxl()));
                                v7_26.zzal(v22.zzjls.longValue());
                                v7_26.zzam(v22.zzjlt.longValue());
                                v22.zzixw = v7_26.zzaxw();
                                this.zzaws().zza(v7_26);
                            }
                        } else {
                            this.zzawy().zzazd().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                        }
                        if (v22.zzjlp.length > 0) {
                            com.google.android.gms.internal.zzcgw v2_173 = this.zzawv().zzjs(v21.zzjgi.zzcn);
                            if ((v2_173 != null) && (v2_173.zzjkw != null)) {
                                v22.zzjmn = v2_173.zzjkw;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v21.zzjgi.zzixs)) {
                                    this.zzawy().zzazf().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                                } else {
                                    v22.zzjmn = Long.valueOf(-1);
                                }
                            }
                            this.zzaws().zza(v22, v17);
                        }
                        this.zzaws().zzah(v21.zzjgj);
                        com.google.android.gms.internal.zzcgw v3_79 = this.zzaws();
                        com.google.android.gms.internal.zzcgw v2_184 = v3_79.getWritableDatabase();
                        int v5_53 = new String[2];
                        v5_53[0] = v6_34;
                        v5_53[1] = v6_34;
                        v2_184.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_53);
                        this.zzaws().setTransactionSuccessful();
                        this.zzaws().endTransaction();
                        v2_114 = 1;
                    }
                    return v2_114;
                } else {
                    v3_50.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_31;
                if (v16_0 == -1) {
                    int v5_42 = new String[1];
                    v5_42[0] = 0;
                    v6_31 = v5_42;
                } else {
                    int v5_47 = new String[2];
                    v5_47[0] = 0;
                    v5_47[1] = String.valueOf(v16_0);
                    v6_31 = v5_47;
                }
                int v5_50;
                if (v16_0 == -1) {
                    v5_50 = "";
                } else {
                    v5_50 = " and rowid <= ?";
                }
                com.google.android.gms.internal.zzcgw v3_86 = v2_90.rawQuery(new StringBuilder((String.valueOf(v5_50).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_50).append(" order by rowid limit 1;").toString(), v6_31);
                if (v3_86.moveToFirst()) {
                    int v5_61 = v3_86.getString(0);
                    v3_86.close();
                    v13_0 = v5_61;
                    v12_0 = 0;
                } else {
                    if (v3_86 == null) {
                    } else {
                        v3_86.close();
                    }
                }
            } else {
                int v6_60;
                if (v16_0 == -1) {
                    int v5_74 = new String[1];
                    v5_74[0] = String.valueOf(p32);
                    v6_60 = v5_74;
                } else {
                    int v5_80 = new String[2];
                    v5_80[0] = String.valueOf(v16_0);
                    v5_80[1] = String.valueOf(p32);
                    v6_60 = v5_80;
                }
                int v5_3;
                if (v16_0 == -1) {
                    v5_3 = "";
                } else {
                    v5_3 = "rowid <= ? and ";
                }
                com.google.android.gms.internal.zzcgw v3_24 = v2_90.rawQuery(new StringBuilder((String.valueOf(v5_3).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_3).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_60);
                if (v3_24.moveToFirst()) {
                    String v4_30 = v3_24.getString(0);
                    int v5_28 = v3_24.getString(1);
                    v3_24.close();
                    v13_0 = v5_28;
                    v12_0 = v4_30;
                } else {
                    if (v3_24 == null) {
                    } else {
                        v3_24.close();
                    }
                }
            }
            try {
                String v4_38 = new String[1];
                v4_38[0] = "metadata";
                int v6_21 = new String[2];
                v6_21[0] = v12_0;
                v6_21[1] = v13_0;
                int v11_2 = v2_90.query("raw_events_metadata", v4_38, "app_id = ? and metadata_fingerprint = ?", v6_21, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcgw v2_91) {
                v3_50 = v11_2;
                if (v3_50 != null) {
                    v3_50.close();
                }
                throw v2_91;
            } catch (com.google.android.gms.internal.zzcgw v2_21) {
                v3_50 = v11_2;
                v4_0 = v12_0;
            }
            if (v11_2.moveToFirst()) {
                com.google.android.gms.internal.zzcgw v3_48 = v11_2.getBlob(0);
                com.google.android.gms.internal.zzcgw v3_49 = com.google.android.gms.internal.zzfjj.zzn(v3_48, 0, v3_48.length);
                String v4_41 = new com.google.android.gms.internal.zzcme();
                try {
                    v4_41.zza(v3_49);
                } catch (com.google.android.gms.internal.zzcgw v2_89) {
                    v14_1.zzawy().zzazd().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0), v2_89);
                    if (v11_2 == 0) {
                    } else {
                        v11_2.close();
                    }
                }
                if (v11_2.moveToNext()) {
                    v14_1.zzawy().zzazf().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0));
                }
                int v5_36;
                int v6_23;
                v11_2.close();
                v21.zzb(v4_41);
                if (v16_0 == -1) {
                    v5_36 = "app_id = ? and metadata_fingerprint = ?";
                    v6_23 = new String[2];
                    v6_23[0] = v12_0;
                    v6_23[1] = v13_0;
                } else {
                    v5_36 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_23 = new String[3];
                    v6_23[0] = v12_0;
                    v6_23[1] = v13_0;
                    v6_23[2] = String.valueOf(v16_0);
                }
                String v4_46 = new String[4];
                v4_46[0] = "rowid";
                v4_46[1] = "name";
                v4_46[2] = "timestamp";
                v4_46[3] = "data";
                v3_50 = v2_90.query("raw_events", v4_46, v5_36, v6_23, 0, 0, "rowid", 0);
                try {
                    if (!v3_50.moveToFirst()) {
                        v14_1.zzawy().zzazf().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0));
                        if (v3_50 == null) {
                        } else {
                            v3_50.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcgw v2_21) {
                    v4_0 = v12_0;
                }
                do {
                    String v4_47 = v3_50.getLong(0);
                    com.google.android.gms.internal.zzcgw v2_95 = v3_50.getBlob(3);
                    com.google.android.gms.internal.zzcgw v2_96 = com.google.android.gms.internal.zzfjj.zzn(v2_95, 0, v2_95.length);
                    int v6_27 = new com.google.android.gms.internal.zzcmb();
                    v6_27.zza(v2_96);
                    v6_27.name = v3_50.getString(1);
                    v6_27.zzjli = Long.valueOf(v3_50.getLong(2));
                    if (v21.zza(v4_47, v6_27)) {
                    } else {
                        if (v3_50 == null) {
                        } else {
                            v3_50.close();
                        }
                    }
                } while(v3_50.moveToNext());
                if (v3_50 == null) {
                } else {
                    v3_50.close();
                }
            } else {
                v14_1.zzawy().zzazd().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0));
                if (v11_2 == 0) {
                } else {
                    v11_2.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcgw v2_87) {
            this.zzaws().endTransaction();
            throw v2_87;
        }
    }

Method com.google.android.gms.internal.zzchj.onOpen() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


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

Method com.google.android.gms.internal.zzcgr.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) {
            com.google.android.gms.internal.zzchm v0_15 = p8.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_15.moveToFirst();
                v0_15.close();
            } catch (Throwable v1_11) {
                v0_15.close();
                throw v1_11;
            }
        }
        com.google.android.gms.internal.zzcgo.zza(this.zzizc.zzawy(), p8, "events", "CREATE TABLE IF NOT EXISTS events ( app_id TEXT NOT NULL, name TEXT NOT NULL, lifetime_count INTEGER NOT NULL, current_bundle_count INTEGER NOT NULL, last_fire_timestamp INTEGER NOT NULL, PRIMARY KEY (app_id, name)) ;", "app_id,name,lifetime_count,current_bundle_count,last_fire_timestamp", com.google.android.gms.internal.zzcgo.zzayo());
        com.google.android.gms.internal.zzcgo.zza(this.zzizc.zzawy(), p8, "conditional_properties", "CREATE TABLE IF NOT EXISTS conditional_properties ( app_id TEXT NOT NULL, origin TEXT NOT NULL, name TEXT NOT NULL, value BLOB NOT NULL, creation_timestamp INTEGER NOT NULL, active INTEGER NOT NULL, trigger_event_name TEXT, trigger_timeout INTEGER NOT NULL, timed_out_event BLOB,triggered_event BLOB, triggered_timestamp INTEGER NOT NULL, time_to_live INTEGER NOT NULL, expired_event BLOB, PRIMARY KEY (app_id, name)) ;", "app_id,origin,name,value,active,trigger_event_name,trigger_timeout,creation_timestamp,timed_out_event,triggered_event,triggered_timestamp,time_to_live,expired_event", 0);
        com.google.android.gms.internal.zzcgo.zza(this.zzizc.zzawy(), p8, "user_attributes", "CREATE TABLE IF NOT EXISTS user_attributes ( app_id TEXT NOT NULL, name TEXT NOT NULL, set_timestamp INTEGER NOT NULL, value BLOB NOT NULL, PRIMARY KEY (app_id, name)) ;", "app_id,name,set_timestamp,value", com.google.android.gms.internal.zzcgo.zzayp());
        com.google.android.gms.internal.zzcgo.zza(this.zzizc.zzawy(), p8, "apps", "CREATE TABLE IF NOT EXISTS apps ( app_id TEXT NOT NULL, app_instance_id TEXT, gmp_app_id TEXT, resettable_device_id_hash TEXT, last_bundle_index INTEGER NOT NULL, last_bundle_end_timestamp INTEGER NOT NULL, PRIMARY KEY (app_id)) ;", "app_id,app_instance_id,gmp_app_id,resettable_device_id_hash,last_bundle_index,last_bundle_end_timestamp", com.google.android.gms.internal.zzcgo.zzayq());
        com.google.android.gms.internal.zzcgo.zza(this.zzizc.zzawy(), p8, "queue", "CREATE TABLE IF NOT EXISTS queue ( app_id TEXT NOT NULL, bundle_end_timestamp INTEGER NOT NULL, data BLOB NOT NULL);", "app_id,bundle_end_timestamp,data", com.google.android.gms.internal.zzcgo.zzayr());
        com.google.android.gms.internal.zzcgo.zza(this.zzizc.zzawy(), p8, "raw_events_metadata", "CREATE TABLE IF NOT EXISTS raw_events_metadata ( app_id TEXT NOT NULL, metadata_fingerprint INTEGER NOT NULL, metadata BLOB NOT NULL, PRIMARY KEY (app_id, metadata_fingerprint));", "app_id,metadata_fingerprint,metadata", 0);
        com.google.android.gms.internal.zzcgo.zza(this.zzizc.zzawy(), p8, "raw_events", "CREATE TABLE IF NOT EXISTS raw_events ( app_id TEXT NOT NULL, name TEXT NOT NULL, timestamp INTEGER NOT NULL, metadata_fingerprint INTEGER NOT NULL, data BLOB NOT NULL);", "app_id,name,timestamp,metadata_fingerprint,data", com.google.android.gms.internal.zzcgo.zzays());
        com.google.android.gms.internal.zzcgo.zza(this.zzizc.zzawy(), p8, "event_filters", "CREATE TABLE IF NOT EXISTS event_filters ( app_id TEXT NOT NULL, audience_id INTEGER NOT NULL, filter_id INTEGER NOT NULL, event_name TEXT NOT NULL, data BLOB NOT NULL, PRIMARY KEY (app_id, event_name, audience_id, filter_id));", "app_id,audience_id,filter_id,event_name,data", 0);
        com.google.android.gms.internal.zzcgo.zza(this.zzizc.zzawy(), p8, "property_filters", "CREATE TABLE IF NOT EXISTS property_filters ( app_id TEXT NOT NULL, audience_id INTEGER NOT NULL, filter_id INTEGER NOT NULL, property_name TEXT NOT NULL, data BLOB NOT NULL, PRIMARY KEY (app_id, property_name, audience_id, filter_id));", "app_id,audience_id,filter_id,property_name,data", 0);
        com.google.android.gms.internal.zzcgo.zza(this.zzizc.zzawy(), p8, "audience_filter_values", "CREATE TABLE IF NOT EXISTS audience_filter_values ( app_id TEXT NOT NULL, audience_id INTEGER NOT NULL, current_results BLOB, PRIMARY KEY (app_id, audience_id));", "app_id,audience_id,current_results", 0);
        com.google.android.gms.internal.zzcgo.zza(this.zzizc.zzawy(), p8, "app2", "CREATE TABLE IF NOT EXISTS app2 ( app_id TEXT NOT NULL, first_open_count INTEGER NOT NULL, PRIMARY KEY (app_id));", "app_id,first_open_count", com.google.android.gms.internal.zzcgo.zzayt());
        return;
    }

Method com.google.android.gms.internal.zzaqm.onOpen() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final void onOpen(android.database.sqlite.SQLiteDatabase p9)
    {
        String v0_0 = 1;
        if (android.os.Build$VERSION.SDK_INT < 15) {
            int v2_13 = p9.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v2_13.moveToFirst();
                v2_13.close();
            } catch (String v0_1) {
                v2_13.close();
                throw v0_1;
            }
        }
        if (this.zza(p9, "hits2")) {
            int v3_0 = com.google.android.gms.internal.zzaqm.zzb(p9, "hits2");
            String[] v4 = new String[4];
            v4[0] = "hit_id";
            v4[1] = "hit_string";
            v4[2] = "hit_time";
            v4[3] = "hit_url";
            int v2_8 = 0;
            while (v2_8 < 4) {
                String v5_2 = v4[v2_8];
                if (v3_0.remove(v5_2)) {
                    v2_8++;
                } else {
                    String v0_7;
                    String v0_5 = String.valueOf(v5_2);
                    if (v0_5.length() == 0) {
                        v0_7 = new String("Database hits2 is missing required column: ");
                    } else {
                        v0_7 = "Database hits2 is missing required column: ".concat(v0_5);
                    }
                    throw new android.database.sqlite.SQLiteException(v0_7);
                }
            }
            if (v3_0.remove("hit_app_id")) {
                v0_0 = 0;
            }
            if (v3_0.isEmpty()) {
                if (v0_0 != null) {
                    p9.execSQL("ALTER TABLE hits2 ADD COLUMN hit_app_id INTEGER");
                }
            } else {
                throw new android.database.sqlite.SQLiteException("Database hits2 has extra columns");
            }
        } else {
            p9.execSQL(com.google.android.gms.internal.zzaql.zzxx());
        }
        if (this.zza(p9, "properties")) {
            com.google.android.gms.internal.zzaqm.zza(p9);
        } else {
            p9.execSQL("CREATE TABLE IF NOT EXISTS properties ( app_uid INTEGER NOT NULL, cid TEXT NOT NULL, tid TEXT NOT NULL, params TEXT NOT NULL, adid INTEGER NOT NULL, hits_count INTEGER NOT NULL, PRIMARY KEY (app_uid, cid, tid)) ;");
        }
        return;
    }

Method com.google.android.gms.internal.zzaqm.zzb() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private static java.util.Set zzb(android.database.sqlite.SQLiteDatabase p5, String p6)
    {
        java.util.HashSet v1_1 = new java.util.HashSet();
        android.database.Cursor v2_2 = p5.rawQuery(new StringBuilder((String.valueOf(p6).length() + 22)).append("SELECT * FROM ").append(p6).append(" LIMIT 0").toString(), 0);
        try {
            String[] v3 = v2_2.getColumnNames();
            int v0_4 = 0;
        } catch (int v0_5) {
            v2_2.close();
            throw v0_5;
        }
        while (v0_4 < v3.length) {
            v1_1.add(v3[v0_4]);
            v0_4++;
        }
        v2_2.close();
        return v1_1;
    }

Method com.google.android.gms.internal.zzchi.zzb() calling method android.database.sqlite.SQLiteDatabase.insertOrThrow()


    private final boolean zzb(int p14, byte[] p15)
    {
        int v0_4;
        this.zzve();
        if (!this.zzjbo) {
            android.content.ContentValues v7_1 = new android.content.ContentValues();
            v7_1.put("type", Integer.valueOf(p14));
            v7_1.put("entry", p15);
            int v6 = 0;
            int v0_1 = 5;
            while (v6 < 5) {
                android.database.Cursor v2 = 0;
                try {
                    android.database.sqlite.SQLiteDatabase v3 = this.getWritableDatabase();
                } catch (com.google.android.gms.internal.zzcho v1_0) {
                    this.zzawy().zzazd().zzj("Error writing entry to local database", v1_0);
                    this.zzjbo = 1;
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 == null) {
                        v6++;
                    } else {
                        v3.close();
                    }
                    v3.insertOrThrow("messages", 0, v7_1);
                    v3.setTransactionSuccessful();
                    v3.endTransaction();
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_4 = 1;
                } catch (com.google.android.gms.internal.zzcho v1_20) {
                    if (android.os.Build$VERSION.SDK_INT < 11) {
                        if (v3 != null) {
                            if (v3.inTransaction()) {
                                v3.endTransaction();
                            }
                        }
                        this.zzawy().zzazd().zzj("Error writing entry to local database", v1_20);
                        this.zzjbo = 1;
                    } else {
                        if (!(v1_20 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                        } else {
                            android.os.SystemClock.sleep(((long) v0_1));
                            v0_1 += 20;
                        }
                    }
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 == null) {
                    } else {
                        v3.close();
                    }
                } catch (int v0_3) {
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    throw v0_3;
                }
                if (v3 != null) {
                    v3.beginTransaction();
                    Long v4_4 = 0;
                    v2 = v3.rawQuery("select count(1) from messages", 0);
                    if ((v2 != null) && (v2.moveToFirst())) {
                        v4_4 = v2.getLong(0);
                    }
                    if (v4_4 >= 100000) {
                        this.zzawy().zzazd().log("Data loss, local db full");
                        Long v4_6 = ((100000 - v4_4) + 1);
                        String[] v9_1 = new String[1];
                        v9_1[0] = Long.toString(v4_6);
                        long v8_6 = ((long) v3.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v9_1));
                        if (v8_6 != v4_6) {
                            this.zzawy().zzazd().zzd("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v4_6), Long.valueOf(v8_6), Long.valueOf((v4_6 - v8_6)));
                        }
                    }
                } else {
                    this.zzjbo = 1;
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_4 = 0;
                }
            }
            this.zzawy().zzazf().log("Failed to write entry to local database");
            v0_4 = 0;
        } else {
            v0_4 = 0;
        }
        return v0_4;
    }

Method com.google.android.gms.internal.zzczh.zza() calling method android.database.sqlite.SQLiteDatabase.insertOrThrow()


    public final void zza(long p8, String p10, String p11, String p12, java.util.Map p13, String p14)
    {
        String v0_28 = this.zzata.currentTimeMillis();
        if (v0_28 > (this.zzkhf + 86400000)) {
            this.zzkhf = v0_28;
            String v0_5 = this.zzlk("Error opening database for deleteStaleHits.");
            if (v0_5 != null) {
                String v0_35;
                String[] v5_1 = new String[1];
                v5_1[0] = Long.toString((this.zzata.currentTimeMillis() - 1.280618154e-314));
                com.google.android.gms.internal.zzcze.v(new StringBuilder(31).append("Removed ").append(v0_5.delete("gtm_hits", "HIT_TIME < ?", v5_1)).append(" stale hits.").toString());
                if (this.zzmj("gtm_hits") != 0) {
                    v0_35 = 0;
                } else {
                    v0_35 = 1;
                }
                this.zzknh.zzbu(v0_35);
            }
        }
        String v0_39 = ((this.zzmj("gtm_hits") - this.zzkhg) + 1);
        if (v0_39 > null) {
            String v0_40 = this.zzep(v0_39);
            com.google.android.gms.internal.zzcze.v(new StringBuilder(51).append("Store full, deleting ").append(v0_40.size()).append(" hits to make room.").toString());
            String v1_19 = new String[0];
            this.zze(((String[]) v0_40.toArray(v1_19)));
        }
        String v1_20 = this.zzlk("Error opening database for putHit");
        if (v1_20 != null) {
            int v2_15 = new android.content.ContentValues();
            v2_15.put("hit_time", Long.valueOf(p8));
            v2_15.put("hit_url", p10);
            v2_15.put("hit_first_send_time", Integer.valueOf(0));
            if (p11 == null) {
                p11 = "GET";
            }
            String v0_4;
            v2_15.put("hit_method", p11);
            v2_15.put("hit_unique_id", p12);
            if (p13 != null) {
                v0_4 = new org.json.JSONObject(p13).toString();
            } else {
                v0_4 = 0;
            }
            v2_15.put("hit_headers", v0_4);
            v2_15.put("hit_body", p14);
            try {
                v1_20.insertOrThrow("gtm_hits", 0, v2_15);
                com.google.android.gms.internal.zzcze.v(new StringBuilder((String.valueOf(p10).length() + 19)).append("Hit stored (url = ").append(p10).append(")").toString());
                this.zzknh.zzbu(0);
            } catch (String v0) {
                String v0_22 = String.valueOf(p10);
                if (v0_22.length() == 0) {
                    String v0_24 = new String("Hit has already been sent: ");
                } else {
                    v0_24 = "Hit has already been sent: ".concat(v0_22);
                }
                com.google.android.gms.internal.zzcze.v(v0_24);
            } catch (String v0_17) {
                String v0_19 = String.valueOf(v0_17.getMessage());
                if (v0_19.length() == 0) {
                    String v0_21 = new String("Error storing hit: ");
                } else {
                    v0_21 = "Error storing hit: ".concat(v0_19);
                }
                com.google.android.gms.internal.zzcze.zzcu(v0_21);
            }
        }
        if (com.google.android.gms.internal.zzczm.zzbhh().isPreview()) {
            com.google.android.gms.internal.zzcze.v("Sending hits immediately under preview.");
            this.dispatch();
        }
        return;
    }

Method com.google.android.gms.internal.zzcgo.zza() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final boolean zza(com.google.android.gms.internal.zzcme p11, boolean p12)
    {
        String v2 = 0;
        this.zzve();
        this.zzxf();
        com.google.android.gms.common.internal.zzbq.checkNotNull(p11);
        com.google.android.gms.common.internal.zzbq.zzgm(p11.zzcn);
        com.google.android.gms.common.internal.zzbq.checkNotNull(p11.zzjlt);
        this.zzayh();
        Object v4_2 = this.zzws().currentTimeMillis();
        if ((p11.zzjlt.longValue() < (v4_2 - com.google.android.gms.internal.zzcgn.zzayb())) || (p11.zzjlt.longValue() > (com.google.android.gms.internal.zzcgn.zzayb() + v4_2))) {
            this.zzawy().zzazf().zzd("Storing bundle outside of the max uploading time span. appId, now, timestamp", com.google.android.gms.internal.zzchm.zzjk(p11.zzcn), Long.valueOf(v4_2), p11.zzjlt);
        }
        try {
            com.google.android.gms.internal.zzcho v0_16;
            com.google.android.gms.internal.zzcho v0_11 = new byte[p11.zzho()];
            Object v3_5 = com.google.android.gms.internal.zzfjk.zzo(v0_11, 0, v0_11.length);
            p11.zza(v3_5);
            v3_5.zzcwt();
            com.google.android.gms.internal.zzcho v0_13 = this.zzawu().zzq(v0_11);
            this.zzawy().zzazj().zzj("Saving bundle, size", Integer.valueOf(v0_13.length));
            Object v3_10 = new android.content.ContentValues();
            v3_10.put("app_id", p11.zzcn);
            v3_10.put("bundle_end_timestamp", p11.zzjlt);
            v3_10.put("data", v0_13);
        } catch (com.google.android.gms.internal.zzcho v0_15) {
            this.zzawy().zzazd().zze("Data loss. Failed to serialize bundle. appId", com.google.android.gms.internal.zzchm.zzjk(p11.zzcn), v0_15);
            return v2;
        }
        if (!p12) {
            v0_16 = 0;
        } else {
            v0_16 = 1;
        }
        v3_10.put("has_realtime", Integer.valueOf(v0_16));
        try {
            if (this.getWritableDatabase().insert("queue", 0, v3_10) != -1) {
                v2 = 1;
                return v2;
            } else {
                this.zzawy().zzazd().zzj("Failed to insert bundle (got -1). appId", com.google.android.gms.internal.zzchm.zzjk(p11.zzcn));
                return v2;
            }
        } catch (com.google.android.gms.internal.zzcho v0_3) {
            this.zzawy().zzazd().zze("Error storing bundle. appId", com.google.android.gms.internal.zzchm.zzjk(p11.zzcn), v0_3);
            return v2;
        }
    }

Method com.google.android.gms.internal.zzcgo.zza() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final boolean zza(com.google.android.gms.internal.zzcgv p11, long p12, boolean p14)
    {
        Object v2 = 0;
        this.zzve();
        this.zzxf();
        com.google.android.gms.common.internal.zzbq.checkNotNull(p11);
        com.google.android.gms.common.internal.zzbq.zzgm(p11.mAppId);
        int v5_7 = new com.google.android.gms.internal.zzcmb();
        v5_7.zzjlj = Long.valueOf(p11.zzizi);
        com.google.android.gms.internal.zzcho v0_7 = new com.google.android.gms.internal.zzcmc[p11.zzizj.size()];
        v5_7.zzjlh = v0_7;
        long v6_0 = p11.zzizj.iterator();
        String v1_4 = 0;
        while (v6_0.hasNext()) {
            com.google.android.gms.internal.zzcho v0_3 = ((String) v6_0.next());
            com.google.android.gms.internal.zzcmc v7_1 = new com.google.android.gms.internal.zzcmc();
            Object v3_2 = (v1_4 + 1);
            v5_7.zzjlh[v1_4] = v7_1;
            v7_1.name = v0_3;
            this.zzawu().zza(v7_1, p11.zzizj.get(v0_3));
            v1_4 = v3_2;
        }
        try {
            com.google.android.gms.internal.zzcho v0_14;
            com.google.android.gms.internal.zzcho v0_11 = new byte[v5_7.zzho()];
            String v1_6 = com.google.android.gms.internal.zzfjk.zzo(v0_11, 0, v0_11.length);
            v5_7.zza(v1_6);
            v1_6.zzcwt();
            this.zzawy().zzazj().zze("Saving event, name, data size", this.zzawt().zzjh(p11.mName), Integer.valueOf(v0_11.length));
            String v1_10 = new android.content.ContentValues();
            v1_10.put("app_id", p11.mAppId);
            v1_10.put("name", p11.mName);
            v1_10.put("timestamp", Long.valueOf(p11.zzfij));
            v1_10.put("metadata_fingerprint", Long.valueOf(p12));
            v1_10.put("data", v0_11);
        } catch (com.google.android.gms.internal.zzcho v0_13) {
            this.zzawy().zzazd().zze("Data loss. Failed to serialize event params/data. appId", com.google.android.gms.internal.zzchm.zzjk(p11.mAppId), v0_13);
            return v2;
        }
        if (!p14) {
            v0_14 = 0;
        } else {
            v0_14 = 1;
        }
        v1_10.put("realtime", Integer.valueOf(v0_14));
        try {
            if (this.getWritableDatabase().insert("raw_events", 0, v1_10) != -1) {
                v2 = 1;
                return v2;
            } else {
                this.zzawy().zzazd().zzj("Failed to insert raw event (got -1). appId", com.google.android.gms.internal.zzchm.zzjk(p11.mAppId));
                return v2;
            }
        } catch (com.google.android.gms.internal.zzcho v0_0) {
            this.zzawy().zzazd().zze("Error storing raw event. appId", com.google.android.gms.internal.zzchm.zzjk(p11.mAppId), v0_0);
            return v2;
        }
    }

Method com.google.android.gms.internal.zzaql.zzc() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final void zzc(com.google.android.gms.internal.zzarq p7)
    {
        com.google.android.gms.common.internal.zzbq.checkNotNull(p7);
        com.google.android.gms.analytics.zzj.zzve();
        this.zzxf();
        com.google.android.gms.common.internal.zzbq.checkNotNull(p7);
        String v2_6 = new android.net.Uri$Builder();
        android.content.ContentValues v3_0 = p7.zzjh().entrySet().iterator();
        while (v3_0.hasNext()) {
            Long v0_1 = ((java.util.Map$Entry) v3_0.next());
            String v1_1 = ((String) v0_1.getKey());
            if ((!"ht".equals(v1_1)) && ((!"qt".equals(v1_1)) && (!"AppUID".equals(v1_1)))) {
                v2_6.appendQueryParameter(v1_1, ((String) v0_1.getValue()));
            }
        }
        String v1_2;
        Long v0_6 = v2_6.build().getEncodedQuery();
        if (v0_6 != null) {
            v1_2 = v0_6;
        } else {
            v1_2 = "";
        }
        if (v1_2.length() <= 8192) {
            Long v0_12 = ((Integer) com.google.android.gms.internal.zzarl.zzdwb.get()).intValue();
            String v2_1 = this.zzxp();
            if (v2_1 > ((long) (v0_12 - 1))) {
                Long v0_13 = this.zzn(((v2_1 - ((long) v0_12)) + 1));
                this.zzd("Store full, deleting hits to make room, count", Integer.valueOf(v0_13.size()));
                this.zzs(v0_13);
            }
            Long v0_19;
            String v2_7 = this.getWritableDatabase();
            android.content.ContentValues v3_4 = new android.content.ContentValues();
            v3_4.put("hit_string", v1_2);
            v3_4.put("hit_time", Long.valueOf(p7.zzzi()));
            v3_4.put("hit_app_id", Integer.valueOf(p7.zzzg()));
            if (!p7.zzzk()) {
                v0_19 = com.google.android.gms.internal.zzard.zzyx();
            } else {
                v0_19 = com.google.android.gms.internal.zzard.zzyw();
            }
            v3_4.put("hit_url", v0_19);
            try {
                Long v0_21 = v2_7.insert("hits2", 0, v3_4);
            } catch (Long v0_24) {
                this.zze("Error storing a hit", v0_24);
            }
            if (v0_21 != -1) {
                this.zzb("Hit saved to database. db-id, hit", Long.valueOf(v0_21), p7);
            } else {
                this.zzdy("Failed to insert a hit (got -1)");
            }
        } else {
            this.zzwt().zza(p7, "Hit length exceeds the maximum allowed size");
        }
        return;
    }

Method com.google.android.gms.internal.zzcgo.zza() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private static void zza(com.google.android.gms.internal.zzchm p7, android.database.sqlite.SQLiteDatabase p8, String p9, String p10, String[] p11)
    {
        int v0_0 = 0;
        if (p7 != null) {
            String v2_1 = com.google.android.gms.internal.zzcgo.zzb(p8, p9);
            String v3_1 = p10.split(",");
            String v1_6 = 0;
            while (v1_6 < v3_1.length) {
                String v5 = v3_1[v1_6];
                if (v2_1.remove(v5)) {
                    v1_6++;
                } else {
                    throw new android.database.sqlite.SQLiteException(new StringBuilder(((String.valueOf(p9).length() + 35) + String.valueOf(v5).length())).append("Table ").append(p9).append(" is missing required column: ").append(v5).toString());
                }
            }
            if (p11 != null) {
                while (v0_0 < p11.length) {
                    if (!v2_1.remove(p11[v0_0])) {
                        p8.execSQL(p11[(v0_0 + 1)]);
                    }
                    v0_0 += 2;
                }
            }
            if (!v2_1.isEmpty()) {
                p7.zzazf().zze("Table has extra columns. table, columns", p9, android.text.TextUtils.join(", ", v2_1));
            }
            return;
        } else {
            throw new IllegalArgumentException("Monitor must not be null");
        }
    }

Method com.google.android.gms.internal.zzcgo.zza() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    static void zza(com.google.android.gms.internal.zzchm p3, android.database.sqlite.SQLiteDatabase p4, String p5, String p6, String p7, String[] p8)
    {
        if (p3 != null) {
            if (!com.google.android.gms.internal.zzcgo.zza(p3, p4, p5)) {
                p4.execSQL(p6);
            }
            try {
                com.google.android.gms.internal.zzcgo.zza(p3, p4, p5, p7, p8);
                return;
            } catch (android.database.sqlite.SQLiteException v0_3) {
                p3.zzazd().zzj("Failed to verify columns on table that was just created", p5);
                throw v0_3;
            }
        } else {
            throw new IllegalArgumentException("Monitor must not be null");
        }
    }

Method com.google.android.gms.internal.zzczj.onOpen() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public final void onOpen(android.database.sqlite.SQLiteDatabase p5)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            String v0_15 = p5.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_15.moveToFirst();
                v0_15.close();
            } catch (String v1_0) {
                v0_15.close();
                throw v1_0;
            }
        }
        if (com.google.android.gms.internal.zzczj.zza("gtm_hit_unique_ids", p5)) {
            String v0_2 = new String[1];
            v0_2[0] = "hit_unique_id";
            com.google.android.gms.internal.zzczj.zza(p5, "gtm_hit_unique_ids", java.util.Arrays.asList(v0_2));
        } else {
            p5.execSQL(com.google.android.gms.internal.zzczh.zzbfn());
        }
        if (com.google.android.gms.internal.zzczj.zza("gtm_hits", p5)) {
            String v0_9 = new String[8];
            v0_9[0] = "hit_id";
            v0_9[1] = "hit_url";
            v0_9[2] = "hit_time";
            v0_9[3] = "hit_first_send_time";
            v0_9[4] = "hit_method";
            v0_9[5] = "hit_unique_id";
            v0_9[6] = "hit_headers";
            v0_9[7] = "hit_body";
            com.google.android.gms.internal.zzczj.zza(p5, "gtm_hits", java.util.Arrays.asList(v0_9));
        } else {
            p5.execSQL(com.google.android.gms.internal.zzczh.zzbhd());
        }
        p5.execSQL(com.google.android.gms.internal.zzczh.zzbhe());
        p5.execSQL(com.google.android.gms.internal.zzczh.zzbhf());
        return;
    }

Method com.google.android.gms.internal.zzcim.zzg() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private final boolean zzg(String p31, long p32)
    {
        this.zzaws().beginTransaction();
        try {
            com.google.android.gms.internal.zzcim$zza v21 = new com.google.android.gms.internal.zzcim$zza;
            v21(this, 0);
            int v14_1 = this.zzaws();
            String v4_0 = 0;
            int v16_0 = this.zzjgb;
            com.google.android.gms.common.internal.zzbq.checkNotNull(v21);
            v14_1.zzve();
            v14_1.zzxf();
            com.google.android.gms.internal.zzcgw v3_50 = 0;
            try {
                int v13_0;
                long v12_0;
                com.google.android.gms.internal.zzcgw v2_90 = v14_1.getWritableDatabase();
            } catch (com.google.android.gms.internal.zzcgw v2_21) {
                v14_1.zzawy().zzazd().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzchm.zzjk(v4_0), v2_21);
                if (v3_50 == null) {
                    if ((v21.zzapa != null) && (!v21.zzapa.isEmpty())) {
                        com.google.android.gms.internal.zzcgw v2_111 = 0;
                    } else {
                        v2_111 = 1;
                    }
                    com.google.android.gms.internal.zzcgw v2_114;
                    if (v2_111 != null) {
                        this.zzaws().setTransactionSuccessful();
                        this.zzaws().endTransaction();
                        v2_114 = 0;
                    } else {
                        com.google.android.gms.internal.zzcmb v17 = 0;
                        com.google.android.gms.internal.zzcme v22 = v21.zzjgi;
                        com.google.android.gms.internal.zzcgw v2_117 = new com.google.android.gms.internal.zzcmb[v21.zzapa.size()];
                        v22.zzjlp = v2_117;
                        long v12_1 = 0;
                        int v13_1 = 0;
                        while (v13_1 < v21.zzapa.size()) {
                            com.google.android.gms.internal.zzcgw v3_29;
                            com.google.android.gms.internal.zzcgw v2_65;
                            if (!this.zzawv().zzan(v21.zzjgi.zzcn, ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name)) {
                                String v4_28;
                                int v14_2 = this.zzawv().zzao(v21.zzjgi.zzcn, ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name);
                                if (v14_2 != 0) {
                                    com.google.android.gms.internal.zzcgw v3_35 = 0;
                                    String v4_33 = 0;
                                    if (((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh == null) {
                                        int v5_83 = new com.google.android.gms.internal.zzcmc[0];
                                        ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh = v5_83;
                                    }
                                    int v6_0 = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh;
                                    int v7_0 = v6_0.length;
                                    int v5_0 = 0;
                                    while (v5_0 < v7_0) {
                                        com.google.android.gms.internal.zzcgw v2_67;
                                        com.google.android.gms.internal.zzcgw v2_66 = v6_0[v5_0];
                                        if (!"_c".equals(v2_66.name)) {
                                            if (!"_r".equals(v2_66.name)) {
                                                v2_67 = v4_33;
                                            } else {
                                                v2_66.zzjll = Long.valueOf(1);
                                                v2_67 = 1;
                                            }
                                        } else {
                                            v2_66.zzjll = Long.valueOf(1);
                                            v3_35 = 1;
                                            v2_67 = v4_33;
                                        }
                                        v5_0++;
                                        v4_33 = v2_67;
                                    }
                                    if ((v3_35 == null) && (v14_2 != 0)) {
                                        this.zzawy().zzazj().zzj("Marking event as conversion", this.zzawt().zzjh(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name));
                                        com.google.android.gms.internal.zzcgw v2_20 = ((com.google.android.gms.internal.zzcmc[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh, (((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh.length + 1)));
                                        com.google.android.gms.internal.zzcgw v3_3 = new com.google.android.gms.internal.zzcmc();
                                        v3_3.name = "_c";
                                        v3_3.zzjll = Long.valueOf(1);
                                        v2_20[(v2_20.length - 1)] = v3_3;
                                        ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh = v2_20;
                                    }
                                    if (v4_33 == null) {
                                        this.zzawy().zzazj().zzj("Marking event as real-time", this.zzawt().zzjh(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name));
                                        com.google.android.gms.internal.zzcgw v2_38 = ((com.google.android.gms.internal.zzcmc[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh, (((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh.length + 1)));
                                        com.google.android.gms.internal.zzcgw v3_10 = new com.google.android.gms.internal.zzcmc();
                                        v3_10.name = "_r";
                                        v3_10.zzjll = Long.valueOf(1);
                                        v2_38[(v2_38.length - 1)] = v3_10;
                                        ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh = v2_38;
                                    }
                                    if (this.zzaws().zza(this.zzbag(), v21.zzjgi.zzcn, 0, 0, 0, 0, 1).zzizb <= ((long) this.zzjew.zzix(v21.zzjgi.zzcn))) {
                                        v17 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcgw v2_42 = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1));
                                        com.google.android.gms.internal.zzcgw v3_19 = 0;
                                        while (v3_19 < v2_42.zzjlh.length) {
                                            if (!"_r".equals(v2_42.zzjlh[v3_19].name)) {
                                                v3_19++;
                                            } else {
                                                String v4_16 = new com.google.android.gms.internal.zzcmc[(v2_42.zzjlh.length - 1)];
                                                if (v3_19 > null) {
                                                    System.arraycopy(v2_42.zzjlh, 0, v4_16, 0, v3_19);
                                                }
                                                if (v3_19 < v4_16.length) {
                                                    System.arraycopy(v2_42.zzjlh, (v3_19 + 1), v4_16, v3_19, (v4_16.length - v3_19));
                                                }
                                                v2_42.zzjlh = v4_16;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzclq.zzjz(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name)) || ((v14_2 == 0) || (this.zzaws().zza(this.zzbag(), v21.zzjgi.zzcn, 0, 0, 1, 0, 0).zziyz <= ((long) this.zzjew.zzb(v21.zzjgi.zzcn, com.google.android.gms.internal.zzchc.zzjaq))))) {
                                        v4_28 = v17;
                                    } else {
                                        this.zzawy().zzazf().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                                        com.google.android.gms.internal.zzcgw v2_56 = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1));
                                        int v5_20 = 0;
                                        String v4_24 = 0;
                                        int v7_12 = v2_56.zzjlh;
                                        int v6_12 = 0;
                                        while (v6_12 < v7_12.length) {
                                            String v4_29;
                                            com.google.android.gms.internal.zzcgw v3_30 = v7_12[v6_12];
                                            if (!"_c".equals(v3_30.name)) {
                                                if (!"_err".equals(v3_30.name)) {
                                                    v3_30 = v4_24;
                                                    v4_29 = v5_20;
                                                } else {
                                                    v4_29 = 1;
                                                    v3_30 = v4_24;
                                                }
                                            } else {
                                                v4_29 = v5_20;
                                            }
                                            v6_12++;
                                            v5_20 = v4_29;
                                            v4_24 = v3_30;
                                        }
                                        if ((v5_20 == 0) || (v4_24 == null)) {
                                            if (v4_24 == null) {
                                                this.zzawy().zzazd().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                                            } else {
                                                v4_24.name = "_err";
                                                v4_24.zzjll = Long.valueOf(10);
                                                v4_28 = v17;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcgw v3_25 = v2_56.zzjlh;
                                            int v5_22 = new com.google.android.gms.internal.zzcmc[1];
                                            v5_22[0] = v4_24;
                                            v2_56.zzjlh = ((com.google.android.gms.internal.zzcmc[]) com.google.android.gms.common.util.zza.zza(v3_25, v5_22));
                                            v4_28 = v17;
                                        }
                                    }
                                } else {
                                    this.zzawu();
                                    if (!com.google.android.gms.internal.zzclq.zzkn(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name)) {
                                    }
                                }
                                com.google.android.gms.internal.zzcgw v3_28 = (v12_1 + 1);
                                v22.zzjlp[v12_1] = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1));
                                v2_65 = v3_28;
                                v3_29 = v4_28;
                            } else {
                                com.google.android.gms.internal.zzcgw v2_81;
                                this.zzawy().zzazf().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn), this.zzawt().zzjh(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name));
                                if ((!this.zzawu().zzkl(v21.zzjgi.zzcn)) && (!this.zzawu().zzkm(v21.zzjgi.zzcn))) {
                                    v2_81 = 0;
                                } else {
                                    v2_81 = 1;
                                }
                                if ((v2_81 != null) || ("_err".equals(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name))) {
                                    v2_65 = v12_1;
                                    v3_29 = v17;
                                } else {
                                    this.zzawu().zza(v21.zzjgi.zzcn, 11, "_ev", ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name, 0);
                                    v2_65 = v12_1;
                                    v3_29 = v17;
                                }
                            }
                            v13_1++;
                            v12_1 = v2_65;
                            v17 = v3_29;
                        }
                        if (v12_1 < v21.zzapa.size()) {
                            v22.zzjlp = ((com.google.android.gms.internal.zzcmb[]) java.util.Arrays.copyOf(v22.zzjlp, v12_1));
                        }
                        v22.zzjmi = this.zza(v21.zzjgi.zzcn, v21.zzjgi.zzjlq, v22.zzjlp);
                        if ((((Boolean) com.google.android.gms.internal.zzchc.zzjac.get()).booleanValue()) && ("1".equals(this.zzjew.zzawv().zzam(v21.zzjgi.zzcn, "measurement.event_sampling_enabled")))) {
                            java.util.HashMap v23_1 = new java.util.HashMap();
                            java.util.HashMap v0_50 = new com.google.android.gms.internal.zzcmb[v22.zzjlp.length];
                            com.google.android.gms.internal.zzcmb[] v24 = v0_50;
                            Boolean v18 = 0;
                            java.security.SecureRandom v25 = this.zzawu().zzbaz();
                            com.google.android.gms.internal.zzcmb[] v26 = v22.zzjlp;
                            int v27 = v26.length;
                            int v20 = 0;
                            while (v20 < v27) {
                                com.google.android.gms.internal.zzcgw v2_213;
                                com.google.android.gms.internal.zzcmb v28 = v26[v20];
                                if (!v28.name.equals("_ep")) {
                                    int v19;
                                    if (com.google.android.gms.internal.zzcim.zza(v28, "_dbg", Long.valueOf(1))) {
                                        v19 = 1;
                                    } else {
                                        v19 = this.zzawv().zzap(v21.zzjgi.zzcn, v28.name);
                                    }
                                    if (v19 > 0) {
                                        com.google.android.gms.internal.zzcgw v3_91;
                                        com.google.android.gms.internal.zzcgw v2_199 = ((com.google.android.gms.internal.zzcgw) v23_1.get(v28.name));
                                        if (v2_199 != null) {
                                            v3_91 = v2_199;
                                        } else {
                                            v3_91 = this.zzaws().zzae(v21.zzjgi.zzcn, v28.name);
                                            if (v3_91 == null) {
                                                this.zzawy().zzazf().zze("Event being bundled has no eventAggregate. appId, eventName", v21.zzjgi.zzcn, v28.name);
                                                v3_91 = new com.google.android.gms.internal.zzcgw(v21.zzjgi.zzcn, v28.name, 1, 1, v28.zzjli.longValue(), 0, 0, 0, 0);
                                            }
                                        }
                                        String v4_84;
                                        this.zzawu();
                                        com.google.android.gms.internal.zzcgw v2_207 = ((Long) com.google.android.gms.internal.zzclq.zza(v28, "_eid"));
                                        if (v2_207 == null) {
                                            v4_84 = 0;
                                        } else {
                                            v4_84 = 1;
                                        }
                                        String v4_85 = Boolean.valueOf(v4_84);
                                        if (v19 != 1) {
                                            if (v25.nextInt(v19) != 0) {
                                                if (Math.abs((v28.zzjli.longValue() - v3_91.zzizn)) < 86400000) {
                                                    if (!v4_85.booleanValue()) {
                                                        v2_213 = v18;
                                                    } else {
                                                        v23_1.put(v28.name, v3_91.zza(v2_207, 0, 0));
                                                    }
                                                } else {
                                                    this.zzawu();
                                                    v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_efs", Long.valueOf(1));
                                                    this.zzawu();
                                                    v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_sr", Long.valueOf(((long) v19)));
                                                    v2_213 = (v18 + 1);
                                                    v24[v18] = v28;
                                                    if (v4_85.booleanValue()) {
                                                        v3_91 = v3_91.zza(0, Long.valueOf(((long) v19)), Boolean.valueOf(1));
                                                    }
                                                    v23_1.put(v28.name, v3_91.zzbc(v28.zzjli.longValue()));
                                                }
                                            } else {
                                                this.zzawu();
                                                v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_sr", Long.valueOf(((long) v19)));
                                                v2_213 = (v18 + 1);
                                                v24[v18] = v28;
                                                if (v4_85.booleanValue()) {
                                                    v3_91 = v3_91.zza(0, Long.valueOf(((long) v19)), 0);
                                                }
                                                v23_1.put(v28.name, v3_91.zzbc(v28.zzjli.longValue()));
                                            }
                                        } else {
                                            v2_213 = (v18 + 1);
                                            v24[v18] = v28;
                                            if ((v4_85.booleanValue()) && ((v3_91.zzizo != null) || ((v3_91.zzizp != null) || (v3_91.zzizq != null)))) {
                                                v23_1.put(v28.name, v3_91.zza(0, 0, 0));
                                            }
                                        }
                                    } else {
                                        this.zzawy().zzazf().zze("Sample rate must be positive. event, rate", v28.name, Integer.valueOf(v19));
                                        v2_213 = (v18 + 1);
                                        v24[v18] = v28;
                                    }
                                } else {
                                    this.zzawu();
                                    com.google.android.gms.internal.zzcgw v2_220 = ((String) com.google.android.gms.internal.zzclq.zza(v28, "_en"));
                                    com.google.android.gms.internal.zzcgw v3_101 = ((com.google.android.gms.internal.zzcgw) v23_1.get(v2_220));
                                    if (v3_101 == null) {
                                        v3_101 = this.zzaws().zzae(v21.zzjgi.zzcn, v2_220);
                                        v23_1.put(v2_220, v3_101);
                                    }
                                    if (v3_101.zzizo != null) {
                                    } else {
                                        if (v3_101.zzizp.longValue() > 1) {
                                            this.zzawu();
                                            v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_sr", v3_101.zzizp);
                                        }
                                        if ((v3_101.zzizq != null) && (v3_101.zzizq.booleanValue())) {
                                            this.zzawu();
                                            v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_efs", Long.valueOf(1));
                                        }
                                        v2_213 = (v18 + 1);
                                        v24[v18] = v28;
                                    }
                                }
                                v20++;
                                v18 = v2_213;
                            }
                            if (v18 < v22.zzjlp.length) {
                                v22.zzjlp = ((com.google.android.gms.internal.zzcmb[]) java.util.Arrays.copyOf(v24, v18));
                            }
                            com.google.android.gms.internal.zzcgw v3_70 = v23_1.entrySet().iterator();
                            while (v3_70.hasNext()) {
                                this.zzaws().zza(((com.google.android.gms.internal.zzcgw) ((java.util.Map$Entry) v3_70.next()).getValue()));
                            }
                        }
                        v22.zzjls = Long.valueOf(nan);
                        v22.zzjlt = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcgw v2_152 = 0;
                        while (v2_152 < v22.zzjlp.length) {
                            com.google.android.gms.internal.zzcgw v3_83 = v22.zzjlp[v2_152];
                            if (v3_83.zzjli.longValue() < v22.zzjls.longValue()) {
                                v22.zzjls = v3_83.zzjli;
                            }
                            if (v3_83.zzjli.longValue() > v22.zzjlt.longValue()) {
                                v22.zzjlt = v3_83.zzjli;
                            }
                            v2_152++;
                        }
                        int v6_34 = v21.zzjgi.zzcn;
                        int v7_26 = this.zzaws().zzjb(v6_34);
                        if (v7_26 != 0) {
                            if (v22.zzjlp.length > 0) {
                                String v4_57;
                                com.google.android.gms.internal.zzcgw v2_157 = v7_26.zzaxf();
                                if (v2_157 == 0) {
                                    v4_57 = 0;
                                } else {
                                    v4_57 = Long.valueOf(v2_157);
                                }
                                v22.zzjlv = v4_57;
                                String v4_58 = v7_26.zzaxe();
                                if (v4_58 != 0) {
                                    v2_157 = v4_58;
                                }
                                com.google.android.gms.internal.zzcgw v2_158;
                                if (v2_157 == 0) {
                                    v2_158 = 0;
                                } else {
                                    v2_158 = Long.valueOf(v2_157);
                                }
                                v22.zzjlu = v2_158;
                                v7_26.zzaxo();
                                v22.zzjmg = Integer.valueOf(((int) v7_26.zzaxl()));
                                v7_26.zzal(v22.zzjls.longValue());
                                v7_26.zzam(v22.zzjlt.longValue());
                                v22.zzixw = v7_26.zzaxw();
                                this.zzaws().zza(v7_26);
                            }
                        } else {
                            this.zzawy().zzazd().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                        }
                        if (v22.zzjlp.length > 0) {
                            com.google.android.gms.internal.zzcgw v2_173 = this.zzawv().zzjs(v21.zzjgi.zzcn);
                            if ((v2_173 != null) && (v2_173.zzjkw != null)) {
                                v22.zzjmn = v2_173.zzjkw;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v21.zzjgi.zzixs)) {
                                    this.zzawy().zzazf().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                                } else {
                                    v22.zzjmn = Long.valueOf(-1);
                                }
                            }
                            this.zzaws().zza(v22, v17);
                        }
                        this.zzaws().zzah(v21.zzjgj);
                        com.google.android.gms.internal.zzcgw v3_79 = this.zzaws();
                        com.google.android.gms.internal.zzcgw v2_184 = v3_79.getWritableDatabase();
                        int v5_53 = new String[2];
                        v5_53[0] = v6_34;
                        v5_53[1] = v6_34;
                        v2_184.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_53);
                        this.zzaws().setTransactionSuccessful();
                        this.zzaws().endTransaction();
                        v2_114 = 1;
                    }
                    return v2_114;
                } else {
                    v3_50.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_31;
                if (v16_0 == -1) {
                    int v5_42 = new String[1];
                    v5_42[0] = 0;
                    v6_31 = v5_42;
                } else {
                    int v5_47 = new String[2];
                    v5_47[0] = 0;
                    v5_47[1] = String.valueOf(v16_0);
                    v6_31 = v5_47;
                }
                int v5_50;
                if (v16_0 == -1) {
                    v5_50 = "";
                } else {
                    v5_50 = " and rowid <= ?";
                }
                com.google.android.gms.internal.zzcgw v3_86 = v2_90.rawQuery(new StringBuilder((String.valueOf(v5_50).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_50).append(" order by rowid limit 1;").toString(), v6_31);
                if (v3_86.moveToFirst()) {
                    int v5_61 = v3_86.getString(0);
                    v3_86.close();
                    v13_0 = v5_61;
                    v12_0 = 0;
                } else {
                    if (v3_86 == null) {
                    } else {
                        v3_86.close();
                    }
                }
            } else {
                int v6_60;
                if (v16_0 == -1) {
                    int v5_74 = new String[1];
                    v5_74[0] = String.valueOf(p32);
                    v6_60 = v5_74;
                } else {
                    int v5_80 = new String[2];
                    v5_80[0] = String.valueOf(v16_0);
                    v5_80[1] = String.valueOf(p32);
                    v6_60 = v5_80;
                }
                int v5_3;
                if (v16_0 == -1) {
                    v5_3 = "";
                } else {
                    v5_3 = "rowid <= ? and ";
                }
                com.google.android.gms.internal.zzcgw v3_24 = v2_90.rawQuery(new StringBuilder((String.valueOf(v5_3).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_3).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_60);
                if (v3_24.moveToFirst()) {
                    String v4_30 = v3_24.getString(0);
                    int v5_28 = v3_24.getString(1);
                    v3_24.close();
                    v13_0 = v5_28;
                    v12_0 = v4_30;
                } else {
                    if (v3_24 == null) {
                    } else {
                        v3_24.close();
                    }
                }
            }
            try {
                String v4_38 = new String[1];
                v4_38[0] = "metadata";
                int v6_21 = new String[2];
                v6_21[0] = v12_0;
                v6_21[1] = v13_0;
                int v11_2 = v2_90.query("raw_events_metadata", v4_38, "app_id = ? and metadata_fingerprint = ?", v6_21, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcgw v2_91) {
                v3_50 = v11_2;
                if (v3_50 != null) {
                    v3_50.close();
                }
                throw v2_91;
            } catch (com.google.android.gms.internal.zzcgw v2_21) {
                v3_50 = v11_2;
                v4_0 = v12_0;
            }
            if (v11_2.moveToFirst()) {
                com.google.android.gms.internal.zzcgw v3_48 = v11_2.getBlob(0);
                com.google.android.gms.internal.zzcgw v3_49 = com.google.android.gms.internal.zzfjj.zzn(v3_48, 0, v3_48.length);
                String v4_41 = new com.google.android.gms.internal.zzcme();
                try {
                    v4_41.zza(v3_49);
                } catch (com.google.android.gms.internal.zzcgw v2_89) {
                    v14_1.zzawy().zzazd().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0), v2_89);
                    if (v11_2 == 0) {
                    } else {
                        v11_2.close();
                    }
                }
                if (v11_2.moveToNext()) {
                    v14_1.zzawy().zzazf().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0));
                }
                int v5_36;
                int v6_23;
                v11_2.close();
                v21.zzb(v4_41);
                if (v16_0 == -1) {
                    v5_36 = "app_id = ? and metadata_fingerprint = ?";
                    v6_23 = new String[2];
                    v6_23[0] = v12_0;
                    v6_23[1] = v13_0;
                } else {
                    v5_36 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_23 = new String[3];
                    v6_23[0] = v12_0;
                    v6_23[1] = v13_0;
                    v6_23[2] = String.valueOf(v16_0);
                }
                String v4_46 = new String[4];
                v4_46[0] = "rowid";
                v4_46[1] = "name";
                v4_46[2] = "timestamp";
                v4_46[3] = "data";
                v3_50 = v2_90.query("raw_events", v4_46, v5_36, v6_23, 0, 0, "rowid", 0);
                try {
                    if (!v3_50.moveToFirst()) {
                        v14_1.zzawy().zzazf().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0));
                        if (v3_50 == null) {
                        } else {
                            v3_50.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcgw v2_21) {
                    v4_0 = v12_0;
                }
                do {
                    String v4_47 = v3_50.getLong(0);
                    com.google.android.gms.internal.zzcgw v2_95 = v3_50.getBlob(3);
                    com.google.android.gms.internal.zzcgw v2_96 = com.google.android.gms.internal.zzfjj.zzn(v2_95, 0, v2_95.length);
                    int v6_27 = new com.google.android.gms.internal.zzcmb();
                    v6_27.zza(v2_96);
                    v6_27.name = v3_50.getString(1);
                    v6_27.zzjli = Long.valueOf(v3_50.getLong(2));
                    if (v21.zza(v4_47, v6_27)) {
                    } else {
                        if (v3_50 == null) {
                        } else {
                            v3_50.close();
                        }
                    }
                } while(v3_50.moveToNext());
                if (v3_50 == null) {
                } else {
                    v3_50.close();
                }
            } else {
                v14_1.zzawy().zzazd().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0));
                if (v11_2 == 0) {
                } else {
                    v11_2.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcgw v2_87) {
            this.zzaws().endTransaction();
            throw v2_87;
        }
    }

Method com.google.android.gms.internal.zzcim.zza() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private final boolean zza(String p14, com.google.android.gms.internal.zzcha p15)
    {
        Long v6_1;
        com.google.android.gms.internal.zzclq v0_12;
        int v2_8 = p15.zzizt.getString("currency");
        if (!"ecommerce_purchase".equals(p15.name)) {
            v6_1 = p15.zzizt.getLong("value").longValue();
            if (!android.text.TextUtils.isEmpty(v2_8)) {
                com.google.android.gms.internal.zzclq v0_27 = v2_8.toUpperCase(java.util.Locale.US);
                if (v0_27.matches("[A-Z]{3}")) {
                    int v3_7;
                    String v1_18 = String.valueOf("_ltv_");
                    com.google.android.gms.internal.zzclq v0_28 = String.valueOf(v0_27);
                    if (v0_28.length() == 0) {
                        v3_7 = new String(v1_18);
                    } else {
                        v3_7 = v1_18.concat(v0_28);
                    }
                    com.google.android.gms.internal.zzclq v0_0;
                    com.google.android.gms.internal.zzclq v0_31 = this.zzaws().zzag(p14, v3_7);
                    if ((v0_31 != null) && ((v0_31.mValue instanceof Long))) {
                        v0_0 = new com.google.android.gms.internal.zzclp(p14, p15.zziyf, v3_7, this.zzata.currentTimeMillis(), Long.valueOf((v6_1 + ((Long) v0_31.mValue).longValue())));
                    } else {
                        String v1_1 = this.zzaws();
                        com.google.android.gms.internal.zzclq v0_3 = (this.zzjew.zzb(p14, com.google.android.gms.internal.zzchc.zzjbh) - 1);
                        com.google.android.gms.common.internal.zzbq.zzgm(p14);
                        v1_1.zzve();
                        v1_1.zzxf();
                        try {
                            int v2_1 = v1_1.getWritableDatabase();
                            int v5_1 = new String[3];
                            v5_1[0] = p14;
                            v5_1[1] = p14;
                            v5_1[2] = String.valueOf(v0_3);
                            v2_1.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);", v5_1);
                        } catch (com.google.android.gms.internal.zzclq v0_6) {
                            v1_1.zzawy().zzazd().zze("Error pruning currencies. appId", com.google.android.gms.internal.zzchm.zzjk(p14), v0_6);
                        }
                        v0_0 = new com.google.android.gms.internal.zzclp(p14, p15.zziyf, v3_7, this.zzata.currentTimeMillis(), Long.valueOf(v6_1));
                    }
                    if (!this.zzaws().zza(v0_0)) {
                        this.zzawy().zzazd().zzd("Too many unique user properties are set. Ignoring user property. appId", com.google.android.gms.internal.zzchm.zzjk(p14), this.zzawt().zzjj(v0_0.mName), v0_0.mValue);
                        this.zzawu().zza(p14, 9, 0, 0, 0);
                    }
                }
            }
            v0_12 = 1;
        } else {
            com.google.android.gms.internal.zzclq v0_17 = (p15.zzizt.getDouble("value").doubleValue() * 1000000.0);
            if (v0_17 == 0) {
                v0_17 = (((double) p15.zzizt.getLong("value").longValue()) * 1000000.0);
            }
            if ((v0_17 > 9.223372036854776e+18) || (v0_17 < -9.223372036854776e+18)) {
                this.zzawy().zzazf().zze("Data lost. Currency value is too big. appId", com.google.android.gms.internal.zzchm.zzjk(p14), Double.valueOf(v0_17));
                v0_12 = 0;
            } else {
                v6_1 = Math.round(v0_17);
            }
        }
        return v0_12;
    }

Method com.google.android.gms.internal.zzaqm.onOpen() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public final void onOpen(android.database.sqlite.SQLiteDatabase p9)
    {
        String v0_0 = 1;
        if (android.os.Build$VERSION.SDK_INT < 15) {
            int v2_13 = p9.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v2_13.moveToFirst();
                v2_13.close();
            } catch (String v0_1) {
                v2_13.close();
                throw v0_1;
            }
        }
        if (this.zza(p9, "hits2")) {
            int v3_0 = com.google.android.gms.internal.zzaqm.zzb(p9, "hits2");
            String[] v4 = new String[4];
            v4[0] = "hit_id";
            v4[1] = "hit_string";
            v4[2] = "hit_time";
            v4[3] = "hit_url";
            int v2_8 = 0;
            while (v2_8 < 4) {
                String v5_2 = v4[v2_8];
                if (v3_0.remove(v5_2)) {
                    v2_8++;
                } else {
                    String v0_7;
                    String v0_5 = String.valueOf(v5_2);
                    if (v0_5.length() == 0) {
                        v0_7 = new String("Database hits2 is missing required column: ");
                    } else {
                        v0_7 = "Database hits2 is missing required column: ".concat(v0_5);
                    }
                    throw new android.database.sqlite.SQLiteException(v0_7);
                }
            }
            if (v3_0.remove("hit_app_id")) {
                v0_0 = 0;
            }
            if (v3_0.isEmpty()) {
                if (v0_0 != null) {
                    p9.execSQL("ALTER TABLE hits2 ADD COLUMN hit_app_id INTEGER");
                }
            } else {
                throw new android.database.sqlite.SQLiteException("Database hits2 has extra columns");
            }
        } else {
            p9.execSQL(com.google.android.gms.internal.zzaql.zzxx());
        }
        if (this.zza(p9, "properties")) {
            com.google.android.gms.internal.zzaqm.zza(p9);
        } else {
            p9.execSQL("CREATE TABLE IF NOT EXISTS properties ( app_uid INTEGER NOT NULL, cid TEXT NOT NULL, tid TEXT NOT NULL, params TEXT NOT NULL, adid INTEGER NOT NULL, hits_count INTEGER NOT NULL, PRIMARY KEY (app_uid, cid, tid)) ;");
        }
        return;
    }

Method com.google.android.gms.internal.zzchi.zzeb() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final java.util.List zzeb(int p15)
    {
        java.util.ArrayList v0_11;
        this.zzve();
        if (!this.zzjbo) {
            java.util.ArrayList v10_1 = new java.util.ArrayList();
            if (this.getContext().getDatabasePath("google_app_measurement_local.db").exists()) {
                int v9 = 5;
                int v12 = 0;
                while (v12 < 5) {
                    String v1_27 = 0;
                    try {
                        java.util.ArrayList v0_13 = this.getWritableDatabase();
                        try {
                            if (v0_13 != null) {
                                v0_13.beginTransaction();
                                Throwable v2_3 = new String[3];
                                v2_3[0] = "rowid";
                                v2_3[1] = "type";
                                v2_3[2] = "entry";
                                Throwable v2_1 = v0_13.query("messages", v2_3, 0, 0, 0, 0, "rowid asc", Integer.toString(100));
                                String v4_8 = -1;
                                try {
                                    while (v2_1.moveToNext()) {
                                        v4_8 = v2_1.getLong(0);
                                        String v1_46 = v2_1.getInt(1);
                                        String v6_6 = v2_1.getBlob(2);
                                        if (v1_46 != null) {
                                            if (v1_46 != 1) {
                                                if (v1_46 != 2) {
                                                    this.zzawy().zzazd().log("Unknown record type in local database");
                                                } else {
                                                    android.os.Parcel v7_0 = android.os.Parcel.obtain();
                                                    try {
                                                        v7_0.unmarshall(v6_6, 0, v6_6.length);
                                                        v7_0.setDataPosition(0);
                                                        String v1_6 = ((com.google.android.gms.internal.zzcgl) com.google.android.gms.internal.zzcgl.CREATOR.createFromParcel(v7_0));
                                                    } catch (String v1) {
                                                        this.zzawy().zzazd().log("Failed to load user property from local database");
                                                        v7_0.recycle();
                                                        v1_6 = 0;
                                                        if (v1_6 != null) {
                                                            v10_1.add(v1_6);
                                                        }
                                                    }
                                                    v7_0.recycle();
                                                }
                                            } else {
                                                android.os.Parcel v7_1 = android.os.Parcel.obtain();
                                                try {
                                                    v7_1.unmarshall(v6_6, 0, v6_6.length);
                                                    v7_1.setDataPosition(0);
                                                    String v1_14 = ((com.google.android.gms.internal.zzcln) com.google.android.gms.internal.zzcln.CREATOR.createFromParcel(v7_1));
                                                } catch (String v1) {
                                                    this.zzawy().zzazd().log("Failed to load user property from local database");
                                                    v7_1.recycle();
                                                    v1_14 = 0;
                                                    if (v1_14 != null) {
                                                        v10_1.add(v1_14);
                                                    }
                                                }
                                                v7_1.recycle();
                                            }
                                        } else {
                                            String v3_5 = android.os.Parcel.obtain();
                                            try {
                                                v3_5.unmarshall(v6_6, 0, v6_6.length);
                                                v3_5.setDataPosition(0);
                                                String v1_22 = ((com.google.android.gms.internal.zzcha) com.google.android.gms.internal.zzcha.CREATOR.createFromParcel(v3_5));
                                            } catch (String v1_25) {
                                                v3_5.recycle();
                                                throw v1_25;
                                            } catch (String v1) {
                                                this.zzawy().zzazd().log("Failed to load event from local database");
                                                v3_5.recycle();
                                            }
                                            v3_5.recycle();
                                            if (v1_22 != null) {
                                                v10_1.add(v1_22);
                                            }
                                        }
                                    }
                                } catch (String v1_30) {
                                    v1_27 = v0_13;
                                    java.util.ArrayList v0_7 = v1_30;
                                    if (v2_1 != null) {
                                        v2_1.close();
                                    }
                                    if (v1_27 != null) {
                                        v1_27.close();
                                    }
                                    throw v0_7;
                                } catch (String v1_28) {
                                    String v1_29 = v2_1;
                                    Throwable v2_0 = v0_13;
                                    java.util.ArrayList v0_6 = v1_28;
                                    try {
                                        this.zzawy().zzazd().zzj("Error reading entries from local database", v0_6);
                                        this.zzjbo = 1;
                                    } catch (java.util.ArrayList v0_7) {
                                        v1_27 = v2_0;
                                        v2_1 = v1_29;
                                    }
                                    if (v1_29 != null) {
                                        v1_29.close();
                                    }
                                    if (v2_0 == null) {
                                        java.util.ArrayList v0_10 = v9;
                                        v12++;
                                        v9 = v0_10;
                                    } else {
                                        v2_0.close();
                                        v0_10 = v9;
                                    }
                                } catch (String v1_26) {
                                    v1_27 = v0_13;
                                    java.util.ArrayList v0_5 = v1_26;
                                    try {
                                        if (android.os.Build$VERSION.SDK_INT < 11) {
                                            if (v1_27 != null) {
                                                if (v1_27.inTransaction()) {
                                                    v1_27.endTransaction();
                                                }
                                            }
                                            this.zzawy().zzazd().zzj("Error reading entries from local database", v0_5);
                                            this.zzjbo = 1;
                                            v0_10 = v9;
                                        } else {
                                            if (!(v0_5 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                            } else {
                                                android.os.SystemClock.sleep(((long) v9));
                                                v0_10 = (v9 + 20);
                                            }
                                        }
                                        if (v2_1 != null) {
                                            v2_1.close();
                                        }
                                        if (v1_27 == null) {
                                        } else {
                                            v1_27.close();
                                        }
                                    } catch (java.util.ArrayList v0_7) {
                                    }
                                }
                                String v6_5 = new String[1];
                                v6_5[0] = Long.toString(v4_8);
                                if (v0_13.delete("messages", "rowid <= ?", v6_5) < v10_1.size()) {
                                    this.zzawy().zzazd().log("Fewer entries removed from local database than expected");
                                }
                                v0_13.setTransactionSuccessful();
                                v0_13.endTransaction();
                                if (v2_1 != null) {
                                    v2_1.close();
                                }
                                if (v0_13 != null) {
                                    v0_13.close();
                                }
                                v0_11 = v10_1;
                            } else {
                                this.zzjbo = 1;
                                if (v0_13 != null) {
                                    v0_13.close();
                                }
                                v0_11 = 0;
                            }
                        } catch (String v1_36) {
                            v2_1 = 0;
                            v1_27 = v0_13;
                            v0_7 = v1_36;
                        } catch (String v1_34) {
                            v2_0 = v0_13;
                            v0_6 = v1_34;
                            v1_29 = 0;
                        } catch (String v1_32) {
                            v2_1 = 0;
                            v1_27 = v0_13;
                            v0_5 = v1_32;
                        }
                    } catch (java.util.ArrayList v0_7) {
                        v2_1 = 0;
                    } catch (java.util.ArrayList v0_6) {
                        v2_0 = 0;
                        v1_29 = 0;
                    } catch (java.util.ArrayList v0_5) {
                        v2_1 = 0;
                    }
                }
                this.zzawy().zzazf().log("Failed to read events from database in reasonable time");
                v0_11 = 0;
            } else {
                v0_11 = v10_1;
            }
        } else {
            v0_11 = 0;
        }
        return v0_11;
    }

Method com.google.android.gms.internal.zzchi.resetAnalyticsData() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void resetAnalyticsData()
    {
        this.zzve();
        try {
            Integer v0_4 = (this.getWritableDatabase().delete("messages", 0, 0) + 0);
        } catch (Integer v0_1) {
            this.zzawy().zzazd().zzj("Error resetting local analytics data. error", v0_1);
            return;
        }
        if (v0_4 <= null) {
            return;
        } else {
            this.zzawy().zzazj().zzj("Reset local analytics data. records", Integer.valueOf(v0_4));
            return;
        }
    }

Method com.google.android.gms.internal.zzchi.zzb() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final boolean zzb(int p14, byte[] p15)
    {
        int v0_4;
        this.zzve();
        if (!this.zzjbo) {
            android.content.ContentValues v7_1 = new android.content.ContentValues();
            v7_1.put("type", Integer.valueOf(p14));
            v7_1.put("entry", p15);
            int v6 = 0;
            int v0_1 = 5;
            while (v6 < 5) {
                android.database.Cursor v2 = 0;
                try {
                    android.database.sqlite.SQLiteDatabase v3 = this.getWritableDatabase();
                } catch (com.google.android.gms.internal.zzcho v1_0) {
                    this.zzawy().zzazd().zzj("Error writing entry to local database", v1_0);
                    this.zzjbo = 1;
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 == null) {
                        v6++;
                    } else {
                        v3.close();
                    }
                    v3.insertOrThrow("messages", 0, v7_1);
                    v3.setTransactionSuccessful();
                    v3.endTransaction();
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_4 = 1;
                } catch (com.google.android.gms.internal.zzcho v1_20) {
                    if (android.os.Build$VERSION.SDK_INT < 11) {
                        if (v3 != null) {
                            if (v3.inTransaction()) {
                                v3.endTransaction();
                            }
                        }
                        this.zzawy().zzazd().zzj("Error writing entry to local database", v1_20);
                        this.zzjbo = 1;
                    } else {
                        if (!(v1_20 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                        } else {
                            android.os.SystemClock.sleep(((long) v0_1));
                            v0_1 += 20;
                        }
                    }
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 == null) {
                    } else {
                        v3.close();
                    }
                } catch (int v0_3) {
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    throw v0_3;
                }
                if (v3 != null) {
                    v3.beginTransaction();
                    Long v4_4 = 0;
                    v2 = v3.rawQuery("select count(1) from messages", 0);
                    if ((v2 != null) && (v2.moveToFirst())) {
                        v4_4 = v2.getLong(0);
                    }
                    if (v4_4 >= 100000) {
                        this.zzawy().zzazd().log("Data loss, local db full");
                        Long v4_6 = ((100000 - v4_4) + 1);
                        String[] v9_1 = new String[1];
                        v9_1[0] = Long.toString(v4_6);
                        long v8_6 = ((long) v3.delete("messages", "rowid in (select rowid from messages order by rowid asc limit ?)", v9_1));
                        if (v8_6 != v4_6) {
                            this.zzawy().zzazd().zzd("Different delete count than expected in local db. expected, received, difference", Long.valueOf(v4_6), Long.valueOf(v8_6), Long.valueOf((v4_6 - v8_6)));
                        }
                    }
                } else {
                    this.zzjbo = 1;
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_4 = 0;
                }
            }
            this.zzawy().zzazf().log("Failed to write entry to local database");
            v0_4 = 0;
        } else {
            v0_4 = 0;
        }
        return v0_4;
    }

Method com.google.android.gms.internal.zzcgo.zzjc() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final long zzjc(String p7)
    {
        com.google.android.gms.common.internal.zzbq.zzgm(p7);
        this.zzve();
        this.zzxf();
        try {
            long v0_3 = this.getWritableDatabase();
            com.google.android.gms.internal.zzcho v1_2 = String.valueOf(Math.max(0, Math.min(1000000, this.zzaxa().zzb(p7, com.google.android.gms.internal.zzchc.zzjas))));
            String[] v4_1 = new String[2];
            v4_1[0] = p7;
            v4_1[1] = v1_2;
            long v0_1 = ((long) v0_3.delete("raw_events", "rowid in (select rowid from raw_events where app_id=? order by rowid desc limit -1 offset ?)", v4_1));
        } catch (long v0_2) {
            this.zzawy().zzazd().zze("Error deleting over the limit events. appId", com.google.android.gms.internal.zzchm.zzjk(p7), v0_2);
            v0_1 = 0;
        }
        return v0_1;
    }

Method com.google.android.gms.internal.zzcgo.zzayh() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void zzayh()
    {
        this.zzve();
        this.zzxf();
        if (this.zzayn()) {
            Integer v0_15 = this.zzawz().zzjcu.get();
            String v2_1 = this.zzws().elapsedRealtime();
            if (Math.abs((v2_1 - v0_15)) > ((Long) com.google.android.gms.internal.zzchc.zzjbb.get()).longValue()) {
                this.zzawz().zzjcu.set(v2_1);
                this.zzve();
                this.zzxf();
                if (this.zzayn()) {
                    Integer v0_10 = this.getWritableDatabase();
                    com.google.android.gms.internal.zzcho v1_1 = new String[2];
                    v1_1[0] = String.valueOf(this.zzws().currentTimeMillis());
                    v1_1[1] = String.valueOf(com.google.android.gms.internal.zzcgn.zzayb());
                    Integer v0_11 = v0_10.delete("queue", "abs(bundle_end_timestamp - ?) > cast(? as integer)", v1_1);
                    if (v0_11 > null) {
                        this.zzawy().zzazj().zzj("Deleted stale rows. rowsDeleted", Integer.valueOf(v0_11));
                    }
                }
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzcgo.zzai() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final int zzai(String p7, String p8)
    {
        String vtmp1 = com.google.android.gms.common.internal.zzbq.zzgm(p7);
        com.google.android.gms.common.internal.zzbq.zzgm(p8);
        this.zzve();
        this.zzxf();
        try {
            android.database.sqlite.SQLiteException v1_1 = this.getWritableDatabase();
            Object v4_0 = new String[2];
            v4_0[0] = p7;
            v4_0[1] = p8;
            int v0 = v1_1.delete("conditional_properties", "app_id=? and name=?", v4_0);
        } catch (android.database.sqlite.SQLiteException v1_0) {
            this.zzawy().zzazd().zzd("Error deleting conditional property", com.google.android.gms.internal.zzchm.zzjk(p7), this.zzawt().zzjj(p8), v1_0);
        }
        return v0;
    }

Method com.google.android.gms.internal.zzcgo.zzah() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void zzah(java.util.List p7)
    {
        com.google.android.gms.common.internal.zzbq.checkNotNull(p7);
        this.zzve();
        this.zzxf();
        String v2_3 = new StringBuilder("rowid in (");
        com.google.android.gms.internal.zzcho v1_4 = 0;
        while (v1_4 < p7.size()) {
            if (v1_4 != null) {
                v2_3.append(",");
            }
            v2_3.append(((Long) p7.get(v1_4)).longValue());
            v1_4++;
        }
        v2_3.append(")");
        Integer v0_2 = this.getWritableDatabase().delete("raw_events", v2_3.toString(), 0);
        if (v0_2 != p7.size()) {
            this.zzawy().zzazd().zze("Deleted fewer rows from raw events table than expected", Integer.valueOf(v0_2), Integer.valueOf(p7.size()));
        }
        return;
    }

Method com.google.android.gms.internal.zzcgo.zzaf() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void zzaf(String p6, String p7)
    {
        com.google.android.gms.common.internal.zzbq.zzgm(p6);
        com.google.android.gms.common.internal.zzbq.zzgm(p7);
        this.zzve();
        this.zzxf();
        try {
            android.database.sqlite.SQLiteException v0_3 = this.getWritableDatabase();
            Object v3_2 = new String[2];
            v3_2[0] = p6;
            v3_2[1] = p7;
            this.zzawy().zzazj().zzj("Deleted user attribute rows", Integer.valueOf(v0_3.delete("user_attributes", "app_id=? and name=?", v3_2)));
        } catch (android.database.sqlite.SQLiteException v0_2) {
            this.zzawy().zzazd().zzd("Error deleting user attribute. appId", com.google.android.gms.internal.zzchm.zzjk(p6), this.zzawt().zzjj(p7), v0_2);
        }
        return;
    }

Method com.google.android.gms.internal.zzcgo.zza() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void zza(String p13, com.google.android.gms.internal.zzclr[] p14)
    {
        int v0_0 = 0;
        this.zzxf();
        this.zzve();
        com.google.android.gms.common.internal.zzbq.zzgm(p13);
        com.google.android.gms.common.internal.zzbq.checkNotNull(p14);
        android.database.sqlite.SQLiteDatabase v5 = this.getWritableDatabase();
        v5.beginTransaction();
        try {
            this.zzxf();
            this.zzve();
            com.google.android.gms.common.internal.zzbq.zzgm(p13);
            int v1_0 = this.getWritableDatabase();
            int v6_1 = new String[1];
            v6_1[0] = p13;
            v1_0.delete("property_filters", "app_id=?", v6_1);
            int v6_3 = new String[1];
            v6_3[0] = p13;
            v1_0.delete("event_filters", "app_id=?", v6_3);
            int v6_4 = p14.length;
            int v1_1 = 0;
        } catch (int v0_1) {
            v5.endTransaction();
            throw v0_1;
        }
        while (v1_1 < v6_4) {
            int v3_8 = p14[v1_1];
            this.zzxf();
            this.zzve();
            com.google.android.gms.common.internal.zzbq.zzgm(p13);
            com.google.android.gms.common.internal.zzbq.checkNotNull(v3_8);
            com.google.android.gms.common.internal.zzbq.checkNotNull(v3_8.zzjju);
            com.google.android.gms.common.internal.zzbq.checkNotNull(v3_8.zzjjt);
            if (v3_8.zzjjs != null) {
                String v7_6 = v3_8.zzjjs.intValue();
                String v8_3 = v3_8.zzjju;
                int v2_3 = 0;
                while (v2_3 < v8_3.length) {
                    if (v8_3[v2_3].zzjjw != null) {
                        v2_3++;
                    } else {
                        this.zzawy().zzazf().zze("Event filter with no ID. Audience definition ignored. appId, audienceId", com.google.android.gms.internal.zzchm.zzjk(p13), v3_8.zzjjs);
                    }
                }
                String v8_4 = v3_8.zzjjt;
                int v2_0 = 0;
                while (v2_0 < v8_4.length) {
                    if (v8_4[v2_0].zzjjw != null) {
                        v2_0++;
                    } else {
                        this.zzawy().zzazf().zze("Property filter with no ID. Audience definition ignored. appId, audienceId", com.google.android.gms.internal.zzchm.zzjk(p13), v3_8.zzjjs);
                    }
                }
                String v8_5 = v3_8.zzjju;
                int v2_15 = 0;
                while (v2_15 < v8_5.length) {
                    if (this.zza(p13, v7_6, v8_5[v2_15])) {
                        v2_15++;
                    } else {
                        int v2_16 = 0;
                    }
                    if (v2_16 != 0) {
                        String v8_6 = v3_8.zzjjt;
                        int v3_9 = 0;
                        while (v3_9 < v8_6.length) {
                            if (this.zza(p13, v7_6, v8_6[v3_9])) {
                                v3_9++;
                            } else {
                                v2_16 = 0;
                                break;
                            }
                        }
                    }
                    if (v2_16 == 0) {
                        this.zzxf();
                        this.zzve();
                        com.google.android.gms.common.internal.zzbq.zzgm(p13);
                        int v2_17 = this.getWritableDatabase();
                        String[] v9_7 = new String[2];
                        v9_7[0] = p13;
                        v9_7[1] = String.valueOf(v7_6);
                        v2_17.delete("property_filters", "app_id=? and audience_id=?", v9_7);
                        String[] v9_1 = new String[2];
                        v9_1[0] = p13;
                        v9_1[1] = String.valueOf(v7_6);
                        v2_17.delete("event_filters", "app_id=? and audience_id=?", v9_1);
                    }
                }
                v2_16 = 1;
            } else {
                this.zzawy().zzazf().zzj("Audience with no ID. appId", com.google.android.gms.internal.zzchm.zzjk(p13));
            }
            v1_1++;
        }
        int v1_3 = new java.util.ArrayList();
        int v2_10 = p14.length;
        while (v0_0 < v2_10) {
            v1_3.add(p14[v0_0].zzjjs);
            v0_0++;
        }
        this.zze(p13, v1_3);
        v5.setTransactionSuccessful();
        v5.endTransaction();
        return;
    }

Method com.google.android.gms.internal.zzcgo.zze() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final boolean zze(String p9, java.util.List p10)
    {
        String v2 = 0;
        com.google.android.gms.common.internal.zzbq.zzgm(p9);
        this.zzxf();
        this.zzve();
        Object v4_1 = this.getWritableDatabase();
        try {
            int v1_11 = new String[1];
            v1_11[0] = p9;
            int v0_1 = this.zzb("select count(1) from audience_filter_values where app_id=?", v1_11);
            String v5_4 = Math.max(0, Math.min(2000, this.zzaxa().zzb(p9, com.google.android.gms.internal.zzchc.zzjbi)));
        } catch (int v0_3) {
            this.zzawy().zzazd().zze("Database error querying filters. appId", com.google.android.gms.internal.zzchm.zzjk(p9), v0_3);
            return v2;
        }
        if (v0_1 > ((long) v5_4)) {
            String[] v6_4 = new java.util.ArrayList();
            int v1_0 = 0;
            while (v1_0 < p10.size()) {
                int v0_16 = ((Integer) p10.get(v1_0));
                if ((v0_16 == 0) || (!(v0_16 instanceof Integer))) {
                    return v2;
                } else {
                    v6_4.add(Integer.toString(v0_16.intValue()));
                    v1_0++;
                }
            }
            int v0_6 = android.text.TextUtils.join(",", v6_4);
            int v0_9 = new StringBuilder((String.valueOf(v0_6).length() + 2)).append("(").append(v0_6).append(")").toString();
            int v0_13 = new StringBuilder((String.valueOf(v0_9).length() + 140)).append("audience_id in (select audience_id from audience_filter_values where app_id=? and audience_id not in ").append(v0_9).append(" order by rowid desc limit -1 offset ?)").toString();
            String[] v6_14 = new String[2];
            v6_14[0] = p9;
            v6_14[1] = Integer.toString(v5_4);
            if (v4_1.delete("audience_filter_values", v0_13, v6_14) <= 0) {
                return v2;
            } else {
                v2 = 1;
                return v2;
            }
        } else {
            return v2;
        }
    }

Method com.google.android.gms.internal.zzaqo.zzwm() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void zzwm()
    {
        com.google.android.gms.analytics.zzj.zzve();
        this.zzxf();
        this.zzdu("Delete all hits from local store");
        try {
            String v0_7 = this.zzdum;
            com.google.android.gms.analytics.zzj.zzve();
            v0_7.zzxf();
            v0_7.getWritableDatabase().delete("hits2", 0, 0);
            String v0_0 = this.zzdum;
            com.google.android.gms.analytics.zzj.zzve();
            v0_0.zzxf();
            v0_0.getWritableDatabase().delete("properties", 0, 0);
            this.zzyf();
        } catch (String v0_3) {
            this.zzd("Failed to delete hits from store", v0_3);
        }
        this.zzyc();
        if (this.zzdup.zzxq()) {
            this.zzdu("Device service unavailable. Can\'t clear hits stored on the device service.");
        }
        return;
    }

Method com.google.android.gms.internal.zzaqo.zza() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final long zza(com.google.android.gms.internal.zzaqf p11, boolean p12)
    {
        com.google.android.gms.common.internal.zzbq.checkNotNull(p11);
        this.zzxf();
        com.google.android.gms.analytics.zzj.zzve();
        try {
            this.zzdum.beginTransaction();
            String v0_22 = this.zzdum;
            String v2_6 = p11.zzxm();
            String v1_13 = p11.zzvz();
            com.google.android.gms.common.internal.zzbq.zzgm(v1_13);
            v0_22.zzxf();
            com.google.android.gms.analytics.zzj.zzve();
            com.google.android.gms.internal.zzaql v4_0 = v0_22.getWritableDatabase();
            int v7_2 = new String[2];
            v7_2[0] = String.valueOf(v2_6);
            v7_2[1] = v1_13;
            String v1_9 = v4_0.delete("properties", "app_uid=? AND cid<>?", v7_2);
        } catch (String v0_11) {
            try {
                this.zzdum.endTransaction();
            } catch (String v1_5) {
                this.zze("Failed to end transaction", v1_5);
            }
            throw v0_11;
        } catch (String v0_7) {
            this.zze("Failed to update Analytics property", v0_7);
            try {
                this.zzdum.endTransaction();
            } catch (String v0_9) {
                this.zze("Failed to end transaction", v0_9);
            }
            String v0_10 = -1;
            return v0_10;
        }
        if (v1_9 > null) {
            v0_22.zza("Deleted property records", Integer.valueOf(v1_9));
        }
        String v2_5 = this.zzdum.zza(p11.zzxm(), p11.zzvz(), p11.zzxn());
        p11.zzm((1 + v2_5));
        com.google.android.gms.internal.zzaql v4_2 = this.zzdum;
        com.google.android.gms.common.internal.zzbq.checkNotNull(p11);
        v4_2.zzxf();
        com.google.android.gms.analytics.zzj.zzve();
        android.database.sqlite.SQLiteDatabase v5_1 = v4_2.getWritableDatabase();
        String v0_23 = p11.zzjh();
        com.google.android.gms.common.internal.zzbq.checkNotNull(v0_23);
        long v6_3 = new android.net.Uri$Builder();
        int v7_3 = v0_23.entrySet().iterator();
        while (v7_3.hasNext()) {
            String v0_15 = ((java.util.Map$Entry) v7_3.next());
            v6_3.appendQueryParameter(((String) v0_15.getKey()), ((String) v0_15.getValue()));
        }
        String v1_12;
        String v0_27 = v6_3.build().getEncodedQuery();
        if (v0_27 != null) {
            v1_12 = v0_27;
        } else {
            v1_12 = "";
        }
        String v0_33;
        long v6_5 = new android.content.ContentValues();
        v6_5.put("app_uid", Long.valueOf(p11.zzxm()));
        v6_5.put("cid", p11.zzvz());
        v6_5.put("tid", p11.zzxn());
        if (!p11.zzxo()) {
            v0_33 = 0;
        } else {
            v0_33 = 1;
        }
        v6_5.put("adid", Integer.valueOf(v0_33));
        v6_5.put("hits_count", Long.valueOf(p11.zzxp()));
        v6_5.put("params", v1_12);
        try {
            if (v5_1.insertWithOnConflict("properties", 0, v6_5, 5) == -1) {
                v4_2.zzdy("Failed to insert/update a property (got -1)");
            }
        } catch (String v0_5) {
            v4_2.zze("Error storing a property", v0_5);
        }
        this.zzdum.setTransactionSuccessful();
        try {
            this.zzdum.endTransaction();
        } catch (String v0_13) {
            this.zze("Failed to end transaction", v0_13);
        }
        v0_10 = v2_5;
        return v0_10;
    }

Method com.google.android.gms.internal.zzaql.zzxu() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final int zzxu()
    {
        int v0 = 0;
        com.google.android.gms.analytics.zzj.zzve();
        this.zzxf();
        if (this.zzduj.zzu(86400000)) {
            this.zzduj.start();
            this.zzdu("Deleting stale hits (if any)");
            String v1_1 = this.getWritableDatabase();
            String[] v6_1 = new String[1];
            v6_1[0] = Long.toString((this.zzws().currentTimeMillis() - 1.280618154e-314));
            v0 = v1_1.delete("hits2", "hit_time < ?", v6_1);
            this.zza("Deleted stale hits, count", Integer.valueOf(v0));
        }
        return v0;
    }

Method com.google.android.gms.internal.zzaql.zzs() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void zzs(java.util.List p9)
    {
        com.google.android.gms.common.internal.zzbq.checkNotNull(p9);
        com.google.android.gms.analytics.zzj.zzve();
        this.zzxf();
        if (!p9.isEmpty()) {
            String v2_5 = new StringBuilder("hit_id");
            v2_5.append(" in (");
            int v1_0 = 0;
            while (v1_0 < p9.size()) {
                int v0_7 = ((Long) p9.get(v1_0));
                if ((v0_7 != 0) && (v0_7.longValue() != 0)) {
                    if (v1_0 > 0) {
                        v2_5.append(",");
                    }
                    v2_5.append(v0_7);
                    v1_0++;
                } else {
                    throw new android.database.sqlite.SQLiteException("Invalid hit id");
                }
            }
            v2_5.append(")");
            int v0_3 = v2_5.toString();
            try {
                int v1_1 = this.getWritableDatabase();
                this.zza("Deleting dispatched hits. count", Integer.valueOf(p9.size()));
                int v1_2 = v1_1.delete("hits2", v0_3, 0);
            } catch (int v0_4) {
                this.zze("Error deleting hits", v0_4);
                throw v0_4;
            }
            if (v1_2 != p9.size()) {
                this.zzb("Deleted fewer hits then expected", Integer.valueOf(p9.size()), Integer.valueOf(v1_2), v0_3);
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzczh.zza() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void zza(long p8, String p10, String p11, String p12, java.util.Map p13, String p14)
    {
        String v0_28 = this.zzata.currentTimeMillis();
        if (v0_28 > (this.zzkhf + 86400000)) {
            this.zzkhf = v0_28;
            String v0_5 = this.zzlk("Error opening database for deleteStaleHits.");
            if (v0_5 != null) {
                String v0_35;
                String[] v5_1 = new String[1];
                v5_1[0] = Long.toString((this.zzata.currentTimeMillis() - 1.280618154e-314));
                com.google.android.gms.internal.zzcze.v(new StringBuilder(31).append("Removed ").append(v0_5.delete("gtm_hits", "HIT_TIME < ?", v5_1)).append(" stale hits.").toString());
                if (this.zzmj("gtm_hits") != 0) {
                    v0_35 = 0;
                } else {
                    v0_35 = 1;
                }
                this.zzknh.zzbu(v0_35);
            }
        }
        String v0_39 = ((this.zzmj("gtm_hits") - this.zzkhg) + 1);
        if (v0_39 > null) {
            String v0_40 = this.zzep(v0_39);
            com.google.android.gms.internal.zzcze.v(new StringBuilder(51).append("Store full, deleting ").append(v0_40.size()).append(" hits to make room.").toString());
            String v1_19 = new String[0];
            this.zze(((String[]) v0_40.toArray(v1_19)));
        }
        String v1_20 = this.zzlk("Error opening database for putHit");
        if (v1_20 != null) {
            int v2_15 = new android.content.ContentValues();
            v2_15.put("hit_time", Long.valueOf(p8));
            v2_15.put("hit_url", p10);
            v2_15.put("hit_first_send_time", Integer.valueOf(0));
            if (p11 == null) {
                p11 = "GET";
            }
            String v0_4;
            v2_15.put("hit_method", p11);
            v2_15.put("hit_unique_id", p12);
            if (p13 != null) {
                v0_4 = new org.json.JSONObject(p13).toString();
            } else {
                v0_4 = 0;
            }
            v2_15.put("hit_headers", v0_4);
            v2_15.put("hit_body", p14);
            try {
                v1_20.insertOrThrow("gtm_hits", 0, v2_15);
                com.google.android.gms.internal.zzcze.v(new StringBuilder((String.valueOf(p10).length() + 19)).append("Hit stored (url = ").append(p10).append(")").toString());
                this.zzknh.zzbu(0);
            } catch (String v0) {
                String v0_22 = String.valueOf(p10);
                if (v0_22.length() == 0) {
                    String v0_24 = new String("Hit has already been sent: ");
                } else {
                    v0_24 = "Hit has already been sent: ".concat(v0_22);
                }
                com.google.android.gms.internal.zzcze.v(v0_24);
            } catch (String v0_17) {
                String v0_19 = String.valueOf(v0_17.getMessage());
                if (v0_19.length() == 0) {
                    String v0_21 = new String("Error storing hit: ");
                } else {
                    v0_21 = "Error storing hit: ".concat(v0_19);
                }
                com.google.android.gms.internal.zzcze.zzcu(v0_21);
            }
        }
        if (com.google.android.gms.internal.zzczm.zzbhh().isPreview()) {
            com.google.android.gms.internal.zzcze.v("Sending hits immediately under preview.");
            this.dispatch();
        }
        return;
    }

Method com.google.android.gms.internal.zzczh.zze() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final void zze(String[] p9)
    {
        String v0_0 = 1;
        if ((p9 != null) && (p9.length != 0)) {
            int v2_4 = this.zzlk("Error opening database for deleteHits.");
            if (v2_4 != 0) {
                String v4_0 = new Object[1];
                v4_0[0] = android.text.TextUtils.join(",", java.util.Collections.nCopies(p9.length, "?"));
                try {
                    v2_4.delete("gtm_hits", String.format("HIT_ID in (%s)", v4_0), p9);
                } catch (String v0_1) {
                    String v0_3 = String.valueOf(v0_1.getMessage());
                    if (v0_3.length() == 0) {
                        String v0_5 = new String("Error deleting hits: ");
                    } else {
                        v0_5 = "Error deleting hits: ".concat(v0_3);
                    }
                    com.google.android.gms.internal.zzcze.zzcu(v0_5);
                }
                if (this.zzmj("gtm_hits") != 0) {
                    v0_0 = 0;
                }
                this.zzknh.zzbu(v0_0);
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzcim.zzf() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void zzf(com.google.android.gms.internal.zzcgi p11)
    {
        this.zzawx().zzve();
        this.zzxf();
        com.google.android.gms.common.internal.zzbq.checkNotNull(p11);
        com.google.android.gms.common.internal.zzbq.zzgm(p11.packageName);
        if (!android.text.TextUtils.isEmpty(p11.zzixs)) {
            String v0_4 = this.zzaws().zzjb(p11.packageName);
            if ((v0_4 != null) && ((android.text.TextUtils.isEmpty(v0_4.getGmpAppId())) && (!android.text.TextUtils.isEmpty(p11.zzixs)))) {
                v0_4.zzar(0);
                this.zzaws().zza(v0_4);
                this.zzawv().zzjv(p11.packageName);
            }
            if (p11.zzixx) {
                long v4 = p11.zziyc;
                if (v4 == 0) {
                    v4 = this.zzata.currentTimeMillis();
                }
                Long v6_12;
                String v0_65 = p11.zziyd;
                if ((v0_65 == null) || (v0_65 == 1)) {
                    v6_12 = v0_65;
                } else {
                    this.zzawy().zzazf().zze("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.internal.zzchm.zzjk(p11.packageName), Integer.valueOf(v0_65));
                    v6_12 = 0;
                }
                this.zzaws().beginTransaction();
                try {
                    String v0_7 = this.zzaws().zzjb(p11.packageName);
                } catch (String v0_61) {
                    this.zzaws().endTransaction();
                    throw v0_61;
                }
                if ((v0_7 != null) && ((v0_7.getGmpAppId() != null) && (!v0_7.getGmpAppId().equals(p11.zzixs)))) {
                    this.zzawy().zzazf().zzj("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.internal.zzchm.zzjk(v0_7.getAppId()));
                    String v1_40 = this.zzaws();
                    long v2_51 = v0_7.getAppId();
                    v1_40.zzxf();
                    v1_40.zzve();
                    com.google.android.gms.common.internal.zzbq.zzgm(v2_51);
                    try {
                        String v0_73 = v1_40.getWritableDatabase();
                        String v3_0 = new String[1];
                        v3_0[0] = v2_51;
                        String v0_3 = (v0_73.delete("audience_filter_values", "app_id=?", v3_0) + ((((((((v0_73.delete("events", "app_id=?", v3_0) + 0) + v0_73.delete("user_attributes", "app_id=?", v3_0)) + v0_73.delete("conditional_properties", "app_id=?", v3_0)) + v0_73.delete("apps", "app_id=?", v3_0)) + v0_73.delete("raw_events", "app_id=?", v3_0)) + v0_73.delete("raw_events_metadata", "app_id=?", v3_0)) + v0_73.delete("event_filters", "app_id=?", v3_0)) + v0_73.delete("property_filters", "app_id=?", v3_0)));
                    } catch (String v0_6) {
                        v1_40.zzawy().zzazd().zze("Error deleting application data. appId, error", com.google.android.gms.internal.zzchm.zzjk(v2_51), v0_6);
                        v0_7 = 0;
                    }
                    if (v0_3 <= null) {
                    } else {
                        v1_40.zzawy().zzazj().zze("Deleted application data. app, records", v2_51, Integer.valueOf(v0_3));
                    }
                }
                if ((v0_7 != null) && ((v0_7.zzvj() != null) && (!v0_7.zzvj().equals(p11.zzifm)))) {
                    String v3_5 = new android.os.Bundle();
                    v3_5.putString("_pv", v0_7.zzvj());
                    this.zzb(new com.google.android.gms.internal.zzcha("_au", new com.google.android.gms.internal.zzcgx(v3_5), "auto", v4), p11);
                }
                this.zzg(p11);
                String v0_11 = 0;
                if (v6_12 != null) {
                    if (v6_12 == 1) {
                        v0_11 = this.zzaws().zzae(p11.packageName, "_v");
                    }
                } else {
                    v0_11 = this.zzaws().zzae(p11.packageName, "_f");
                }
                if (v0_11 != null) {
                    if (p11.zzixy) {
                        this.zzb(new com.google.android.gms.internal.zzcha("_cd", new com.google.android.gms.internal.zzcgx(new android.os.Bundle()), "auto", v4), p11);
                    }
                } else {
                    String v0_19 = ((1 + (v4 / 3600000)) * 3600000);
                    if (v6_12 != null) {
                        if (v6_12 == 1) {
                            this.zzb(new com.google.android.gms.internal.zzcln("_fvt", v4, Long.valueOf(v0_19), "auto"), p11);
                            this.zzawx().zzve();
                            this.zzxf();
                            String v3_12 = new android.os.Bundle();
                            v3_12.putLong("_c", 1);
                            v3_12.putLong("_r", 1);
                            this.zzb(new com.google.android.gms.internal.zzcha("_v", new com.google.android.gms.internal.zzcgx(v3_12), "auto", v4), p11);
                        }
                    } else {
                        this.zzb(new com.google.android.gms.internal.zzcln("_fot", v4, Long.valueOf(v0_19), "auto"), p11);
                        this.zzawx().zzve();
                        this.zzxf();
                        android.os.Bundle v8_17 = new android.os.Bundle();
                        v8_17.putLong("_c", 1);
                        v8_17.putLong("_r", 1);
                        v8_17.putLong("_uwa", 0);
                        v8_17.putLong("_pfo", 0);
                        v8_17.putLong("_sys", 0);
                        v8_17.putLong("_sysu", 0);
                        if (this.mContext.getPackageManager() != null) {
                            String v1_18 = com.google.android.gms.internal.zzbhf.zzdb(this.mContext).getPackageInfo(p11.packageName, 0);
                            if ((v1_18 != null) && (v1_18.firstInstallTime != 0)) {
                                String v0_39 = 0;
                                if (v1_18.firstInstallTime == v1_18.lastUpdateTime) {
                                    v0_39 = 1;
                                } else {
                                    v8_17.putLong("_uwa", 1);
                                }
                                String v0_41;
                                if (v0_39 == null) {
                                    v0_41 = 0;
                                } else {
                                    v0_41 = 1;
                                }
                                this.zzb(new com.google.android.gms.internal.zzcln("_fi", v4, Long.valueOf(v0_41), "auto"), p11);
                            }
                            String v0_44 = com.google.android.gms.internal.zzbhf.zzdb(this.mContext).getApplicationInfo(p11.packageName, 0);
                            if (v0_44 != null) {
                                if ((v0_44.flags & 1) != 0) {
                                    v8_17.putLong("_sys", 1);
                                }
                                if ((v0_44.flags & 128) != 0) {
                                    v8_17.putLong("_sysu", 1);
                                }
                            }
                        } else {
                            this.zzawy().zzazd().zzj("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.internal.zzchm.zzjk(p11.packageName));
                        }
                        String v0_52 = this.zzaws();
                        String v1_27 = p11.packageName;
                        com.google.android.gms.common.internal.zzbq.zzgm(v1_27);
                        v0_52.zzve();
                        v0_52.zzxf();
                        String v0_54 = v0_52.zzal(v1_27, "first_open_count");
                        if (v0_54 >= 0) {
                            v8_17.putLong("_pfo", v0_54);
                        }
                        this.zzb(new com.google.android.gms.internal.zzcha("_f", new com.google.android.gms.internal.zzcgx(v8_17), "auto", v4), p11);
                    }
                    String v3_22 = new android.os.Bundle();
                    v3_22.putLong("_et", 1);
                    this.zzb(new com.google.android.gms.internal.zzcha("_e", new com.google.android.gms.internal.zzcgx(v3_22), "auto", v4), p11);
                }
                this.zzaws().setTransactionSuccessful();
                this.zzaws().endTransaction();
            } else {
                this.zzg(p11);
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzcim.zzd() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void zzd(com.google.android.gms.internal.zzcgi p8)
    {
        this.zzaws().zzjb(p8.packageName);
        android.content.Context v1_1 = this.zzaws();
        String v2_0 = p8.packageName;
        com.google.android.gms.common.internal.zzbq.zzgm(v2_0);
        v1_1.zzve();
        v1_1.zzxf();
        try {
            com.google.android.gms.internal.zzcgi v0_1 = v1_1.getWritableDatabase();
            String v3_1 = new String[1];
            v3_1[0] = v2_0;
            com.google.android.gms.internal.zzcgi v0_3 = (v0_1.delete("audience_filter_values", "app_id=?", v3_1) + (((((((v0_1.delete("apps", "app_id=?", v3_1) + 0) + v0_1.delete("events", "app_id=?", v3_1)) + v0_1.delete("user_attributes", "app_id=?", v3_1)) + v0_1.delete("conditional_properties", "app_id=?", v3_1)) + v0_1.delete("raw_events", "app_id=?", v3_1)) + v0_1.delete("raw_events_metadata", "app_id=?", v3_1)) + v0_1.delete("queue", "app_id=?", v3_1)));
        } catch (com.google.android.gms.internal.zzcgi v0_5) {
            v1_1.zzawy().zzazd().zze("Error resetting analytics data. appId, error", com.google.android.gms.internal.zzchm.zzjk(v2_0), v0_5);
            this.zzf(this.zza(this.mContext, p8.packageName, p8.zzixs, p8.zzixx, p8.zziye));
            return;
        }
        if (v0_3 <= null) {
            this.zzf(this.zza(this.mContext, p8.packageName, p8.zzixs, p8.zzixx, p8.zziye));
            return;
        } else {
            v1_1.zzawy().zzazj().zze("Reset analytics data. app, records", v2_0, Integer.valueOf(v0_3));
            this.zzf(this.zza(this.mContext, p8.packageName, p8.zzixs, p8.zzixx, p8.zziye));
            return;
        }
    }

Method com.google.android.gms.internal.zzcim.zza() calling method android.database.sqlite.SQLiteDatabase.delete()


    protected final void zza(int p10, Throwable p11, byte[] p12)
    {
        this.zzawx().zzve();
        this.zzxf();
        try {
            if (p12 == null) {
                p12 = new byte[0];
            }
        } catch (boolean v0_12) {
            this.zzjge = 0;
            this.zzban();
            throw v0_12;
        }
        boolean v0_29 = this.zzjfx;
        this.zzjfx = 0;
        if (((p10 != 200) && (p10 != 204)) || (p11 != null)) {
            boolean v0_20;
            this.zzawy().zzazj().zze("Network upload failed. Will retry later. code, error", Integer.valueOf(p10), p11);
            this.zzawz().zzjcs.set(this.zzata.currentTimeMillis());
            if ((p10 != 503) && (p10 != 429)) {
                v0_20 = 0;
            } else {
                v0_20 = 1;
            }
            if (v0_20) {
                this.zzawz().zzjct.set(this.zzata.currentTimeMillis());
            }
            this.zzbaj();
        } else {
            try {
                this.zzawz().zzjcr.set(this.zzata.currentTimeMillis());
                this.zzawz().zzjcs.set(0);
                this.zzbaj();
                this.zzawy().zzazj().zze("Successful upload. Got network response. code, size", Integer.valueOf(p10), Integer.valueOf(p12.length));
                this.zzaws().beginTransaction();
                try {
                    String v3_15 = v0_29.iterator();
                } catch (boolean v0_7) {
                    this.zzaws().endTransaction();
                    throw v0_7;
                }
                while (v3_15.hasNext()) {
                    boolean v0_1 = ((Long) v3_15.next());
                    com.google.android.gms.internal.zzcgo v4_0 = this.zzaws();
                    String v6_0 = v0_1.longValue();
                    v4_0.zzve();
                    v4_0.zzxf();
                    boolean v0_2 = v4_0.getWritableDatabase();
                    String[] v5_1 = new String[1];
                    v5_1[0] = String.valueOf(v6_0);
                    try {
                        if (v0_2.delete("queue", "rowid=?", v5_1) != 1) {
                            throw new android.database.sqlite.SQLiteException("Deleted fewer rows from queue than expected");
                        }
                    } catch (boolean v0_6) {
                        v4_0.zzawy().zzazd().zzj("Failed to delete a bundle in a queue table", v0_6);
                        throw v0_6;
                    }
                }
                this.zzaws().setTransactionSuccessful();
                this.zzaws().endTransaction();
                if ((!this.zzbab().zzzs()) || (!this.zzbai())) {
                    this.zzjgb = -1;
                    this.zzbaj();
                } else {
                    this.zzbah();
                }
                this.zzjgc = 0;
            } catch (boolean v0_8) {
                this.zzawy().zzazd().zzj("Database error while trying to delete uploaded bundles", v0_8);
                this.zzjgc = this.zzata.elapsedRealtime();
                this.zzawy().zzazj().zzj("Disable upload, time", Long.valueOf(this.zzjgc));
            }
        }
        this.zzjge = 0;
        this.zzban();
        return;
    }

Method com.google.android.gms.internal.zzchi.zzeb() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzeb(int p15)
    {
        java.util.ArrayList v0_11;
        this.zzve();
        if (!this.zzjbo) {
            java.util.ArrayList v10_1 = new java.util.ArrayList();
            if (this.getContext().getDatabasePath("google_app_measurement_local.db").exists()) {
                int v9 = 5;
                int v12 = 0;
                while (v12 < 5) {
                    String v1_27 = 0;
                    try {
                        java.util.ArrayList v0_13 = this.getWritableDatabase();
                        try {
                            if (v0_13 != null) {
                                v0_13.beginTransaction();
                                Throwable v2_3 = new String[3];
                                v2_3[0] = "rowid";
                                v2_3[1] = "type";
                                v2_3[2] = "entry";
                                Throwable v2_1 = v0_13.query("messages", v2_3, 0, 0, 0, 0, "rowid asc", Integer.toString(100));
                                String v4_8 = -1;
                                try {
                                    while (v2_1.moveToNext()) {
                                        v4_8 = v2_1.getLong(0);
                                        String v1_46 = v2_1.getInt(1);
                                        String v6_6 = v2_1.getBlob(2);
                                        if (v1_46 != null) {
                                            if (v1_46 != 1) {
                                                if (v1_46 != 2) {
                                                    this.zzawy().zzazd().log("Unknown record type in local database");
                                                } else {
                                                    android.os.Parcel v7_0 = android.os.Parcel.obtain();
                                                    try {
                                                        v7_0.unmarshall(v6_6, 0, v6_6.length);
                                                        v7_0.setDataPosition(0);
                                                        String v1_6 = ((com.google.android.gms.internal.zzcgl) com.google.android.gms.internal.zzcgl.CREATOR.createFromParcel(v7_0));
                                                    } catch (String v1) {
                                                        this.zzawy().zzazd().log("Failed to load user property from local database");
                                                        v7_0.recycle();
                                                        v1_6 = 0;
                                                        if (v1_6 != null) {
                                                            v10_1.add(v1_6);
                                                        }
                                                    }
                                                    v7_0.recycle();
                                                }
                                            } else {
                                                android.os.Parcel v7_1 = android.os.Parcel.obtain();
                                                try {
                                                    v7_1.unmarshall(v6_6, 0, v6_6.length);
                                                    v7_1.setDataPosition(0);
                                                    String v1_14 = ((com.google.android.gms.internal.zzcln) com.google.android.gms.internal.zzcln.CREATOR.createFromParcel(v7_1));
                                                } catch (String v1) {
                                                    this.zzawy().zzazd().log("Failed to load user property from local database");
                                                    v7_1.recycle();
                                                    v1_14 = 0;
                                                    if (v1_14 != null) {
                                                        v10_1.add(v1_14);
                                                    }
                                                }
                                                v7_1.recycle();
                                            }
                                        } else {
                                            String v3_5 = android.os.Parcel.obtain();
                                            try {
                                                v3_5.unmarshall(v6_6, 0, v6_6.length);
                                                v3_5.setDataPosition(0);
                                                String v1_22 = ((com.google.android.gms.internal.zzcha) com.google.android.gms.internal.zzcha.CREATOR.createFromParcel(v3_5));
                                            } catch (String v1_25) {
                                                v3_5.recycle();
                                                throw v1_25;
                                            } catch (String v1) {
                                                this.zzawy().zzazd().log("Failed to load event from local database");
                                                v3_5.recycle();
                                            }
                                            v3_5.recycle();
                                            if (v1_22 != null) {
                                                v10_1.add(v1_22);
                                            }
                                        }
                                    }
                                } catch (String v1_30) {
                                    v1_27 = v0_13;
                                    java.util.ArrayList v0_7 = v1_30;
                                    if (v2_1 != null) {
                                        v2_1.close();
                                    }
                                    if (v1_27 != null) {
                                        v1_27.close();
                                    }
                                    throw v0_7;
                                } catch (String v1_28) {
                                    String v1_29 = v2_1;
                                    Throwable v2_0 = v0_13;
                                    java.util.ArrayList v0_6 = v1_28;
                                    try {
                                        this.zzawy().zzazd().zzj("Error reading entries from local database", v0_6);
                                        this.zzjbo = 1;
                                    } catch (java.util.ArrayList v0_7) {
                                        v1_27 = v2_0;
                                        v2_1 = v1_29;
                                    }
                                    if (v1_29 != null) {
                                        v1_29.close();
                                    }
                                    if (v2_0 == null) {
                                        java.util.ArrayList v0_10 = v9;
                                        v12++;
                                        v9 = v0_10;
                                    } else {
                                        v2_0.close();
                                        v0_10 = v9;
                                    }
                                } catch (String v1_26) {
                                    v1_27 = v0_13;
                                    java.util.ArrayList v0_5 = v1_26;
                                    try {
                                        if (android.os.Build$VERSION.SDK_INT < 11) {
                                            if (v1_27 != null) {
                                                if (v1_27.inTransaction()) {
                                                    v1_27.endTransaction();
                                                }
                                            }
                                            this.zzawy().zzazd().zzj("Error reading entries from local database", v0_5);
                                            this.zzjbo = 1;
                                            v0_10 = v9;
                                        } else {
                                            if (!(v0_5 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                            } else {
                                                android.os.SystemClock.sleep(((long) v9));
                                                v0_10 = (v9 + 20);
                                            }
                                        }
                                        if (v2_1 != null) {
                                            v2_1.close();
                                        }
                                        if (v1_27 == null) {
                                        } else {
                                            v1_27.close();
                                        }
                                    } catch (java.util.ArrayList v0_7) {
                                    }
                                }
                                String v6_5 = new String[1];
                                v6_5[0] = Long.toString(v4_8);
                                if (v0_13.delete("messages", "rowid <= ?", v6_5) < v10_1.size()) {
                                    this.zzawy().zzazd().log("Fewer entries removed from local database than expected");
                                }
                                v0_13.setTransactionSuccessful();
                                v0_13.endTransaction();
                                if (v2_1 != null) {
                                    v2_1.close();
                                }
                                if (v0_13 != null) {
                                    v0_13.close();
                                }
                                v0_11 = v10_1;
                            } else {
                                this.zzjbo = 1;
                                if (v0_13 != null) {
                                    v0_13.close();
                                }
                                v0_11 = 0;
                            }
                        } catch (String v1_36) {
                            v2_1 = 0;
                            v1_27 = v0_13;
                            v0_7 = v1_36;
                        } catch (String v1_34) {
                            v2_0 = v0_13;
                            v0_6 = v1_34;
                            v1_29 = 0;
                        } catch (String v1_32) {
                            v2_1 = 0;
                            v1_27 = v0_13;
                            v0_5 = v1_32;
                        }
                    } catch (java.util.ArrayList v0_7) {
                        v2_1 = 0;
                    } catch (java.util.ArrayList v0_6) {
                        v2_0 = 0;
                        v1_29 = 0;
                    } catch (java.util.ArrayList v0_5) {
                        v2_1 = 0;
                    }
                }
                this.zzawy().zzazf().log("Failed to read events from database in reasonable time");
                v0_11 = 0;
            } else {
                v0_11 = v10_1;
            }
        } else {
            v0_11 = 0;
        }
        return v0_11;
    }

Method com.google.android.gms.internal.zzcgo.zzl() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzl(String p12, int p13, int p14)
    {
        Throwable v0_6;
        int v1_0 = 1;
        this.zzve();
        this.zzxf();
        if (p13 <= 0) {
            v0_6 = 0;
        } else {
            v0_6 = 1;
        }
        com.google.android.gms.common.internal.zzbq.checkArgument(v0_6);
        if (p14 <= 0) {
            v1_0 = 0;
        }
        com.google.android.gms.common.internal.zzbq.checkArgument(v1_0);
        com.google.android.gms.common.internal.zzbq.zzgm(p12);
        try {
            Throwable v0_2 = this.getWritableDatabase();
            com.google.android.gms.internal.zzcho v2_3 = new String[2];
            v2_3[0] = "rowid";
            v2_3[1] = "data";
            com.google.android.gms.internal.zzcho v4_4 = new String[1];
            v4_4[0] = p12;
            com.google.android.gms.internal.zzcho v2_1 = v0_2.query("queue", v2_3, "app_id=?", v4_4, 0, 0, "rowid", String.valueOf(p13));
            try {
                Throwable v0_0;
                if (v2_1.moveToFirst()) {
                    v0_0 = new java.util.ArrayList();
                    int v3_2 = 0;
                    while(true) {
                        com.google.android.gms.internal.zzcho v4_5 = v2_1.getLong(0);
                        int v1_6 = this.zzawu().zzr(v2_1.getBlob(1));
                        if ((!v0_0.isEmpty()) && ((v1_6.length + v3_2) > p14)) {
                            break;
                        }
                        Object v6_7 = com.google.android.gms.internal.zzfjj.zzn(v1_6, 0, v1_6.length);
                        com.google.android.gms.internal.zzcme v7_3 = new com.google.android.gms.internal.zzcme();
                        try {
                            v7_3.zza(v6_7);
                        } catch (int v1_9) {
                            this.zzawy().zzazd().zze("Failed to merge queued bundle. appId", com.google.android.gms.internal.zzchm.zzjk(p12), v1_9);
                            int v1_8 = v3_2;
                        }
                        v1_8 = (v1_6.length + v3_2);
                        v0_0.add(android.util.Pair.create(v7_3, Long.valueOf(v4_5)));
                        if ((!v2_1.moveToNext()) || (v1_8 > p14)) {
                            break;
                        }
                        v3_2 = v1_8;
                    }
                    if (v2_1 == null) {
                        return v0_0;
                    } else {
                        v2_1.close();
                        return v0_0;
                    }
                } else {
                    v0_0 = java.util.Collections.emptyList();
                    if (v2_1 == null) {
                        return v0_0;
                    } else {
                        v2_1.close();
                        return v0_0;
                    }
                }
            } catch (Throwable v0_1) {
                if (v2_1 != null) {
                    v2_1.close();
                }
                throw v0_1;
            } catch (Throwable v0_3) {
                int v1_2 = v2_1;
                try {
                    this.zzawy().zzazd().zze("Error querying bundles. appId", com.google.android.gms.internal.zzchm.zzjk(p12), v0_3);
                    v0_0 = java.util.Collections.emptyList();
                } catch (Throwable v0_1) {
                    v2_1 = v1_2;
                }
                if (v1_2 == 0) {
                    return v0_0;
                } else {
                    v1_2.close();
                    return v0_0;
                }
            }
        } catch (Throwable v0_1) {
            v2_1 = 0;
        } catch (Throwable v0_3) {
            v1_2 = 0;
        }
    }

Method com.google.android.gms.internal.zzcgo.zzje() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map zzje(String p10)
    {
        this.zzxf();
        this.zzve();
        com.google.android.gms.common.internal.zzbq.zzgm(p10);
        int v0_5 = this.getWritableDatabase();
        try {
            boolean v2_8 = new String[2];
            v2_8[0] = "audience_id";
            v2_8[1] = "current_results";
            com.google.android.gms.internal.zzcho v4_3 = new String[1];
            v4_3[0] = p10;
            int v1_0 = v0_5.query("audience_filter_values", v2_8, "app_id=?", v4_3, 0, 0, 0);
            try {
                int v0_4;
                if (v1_0.moveToFirst()) {
                    v0_4 = new android.support.v4.util.ArrayMap();
                    do {
                        boolean v2_1 = v1_0.getInt(0);
                        java.io.IOException v3_3 = v1_0.getBlob(1);
                        java.io.IOException v3_4 = com.google.android.gms.internal.zzfjj.zzn(v3_3, 0, v3_3.length);
                        com.google.android.gms.internal.zzcho v4_6 = new com.google.android.gms.internal.zzcmf();
                        v4_6.zza(v3_4);
                        v0_4.put(Integer.valueOf(v2_1), v4_6);
                    } while(v1_0.moveToNext());
                    if (v1_0 == 0) {
                        return v0_4;
                    } else {
                        v1_0.close();
                        return v0_4;
                    }
                } else {
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    v0_4 = 0;
                    return v0_4;
                }
            } catch (int v0_0) {
                this.zzawy().zzazd().zze("Database error querying filter results. appId", com.google.android.gms.internal.zzchm.zzjk(p10), v0_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                v0_4 = 0;
                return v0_4;
            }
        } catch (int v0_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v0_1;
        } catch (int v0_0) {
            v1_0 = 0;
        } catch (int v0_1) {
        }
    }

Method com.google.android.gms.internal.zzcgo.zzjd() calling method android.database.sqlite.SQLiteDatabase.query()


    public final byte[] zzjd(String p10)
    {
        com.google.android.gms.common.internal.zzbq.zzgm(p10);
        this.zzve();
        this.zzxf();
        try {
            byte[] v0_5 = this.getWritableDatabase();
            com.google.android.gms.internal.zzcho v2_6 = new String[1];
            v2_6[0] = "remote_config";
            Object v4_2 = new String[1];
            v4_2[0] = p10;
            int v1_0 = v0_5.query("apps", v2_6, "app_id=?", v4_2, 0, 0, 0);
            try {
                byte[] v0_4;
                if (v1_0.moveToFirst()) {
                    v0_4 = v1_0.getBlob(0);
                    if (v1_0.moveToNext()) {
                        this.zzawy().zzazd().zzj("Got multiple records for app config, expected one. appId", com.google.android.gms.internal.zzchm.zzjk(p10));
                    }
                    if (v1_0 == 0) {
                        return v0_4;
                    } else {
                        v1_0.close();
                        return v0_4;
                    }
                } else {
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    v0_4 = 0;
                    return v0_4;
                }
            } catch (byte[] v0_0) {
                this.zzawy().zzazd().zze("Error querying remote config. appId", com.google.android.gms.internal.zzchm.zzjk(p10), v0_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                v0_4 = 0;
                return v0_4;
            }
        } catch (byte[] v0_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v0_1;
        } catch (byte[] v0_0) {
            v1_0 = 0;
        } catch (byte[] v0_1) {
        }
    }

Method com.google.android.gms.internal.zzcgo.zzjb() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.zzcgh zzjb(String p12)
    {
        com.google.android.gms.common.internal.zzbq.zzgm(p12);
        this.zzve();
        this.zzxf();
        try {
            int v0_4 = this.getWritableDatabase();
            com.google.android.gms.internal.zzcho v2_0 = new String[24];
            v2_0[0] = "app_instance_id";
            v2_0[1] = "gmp_app_id";
            v2_0[2] = "resettable_device_id_hash";
            v2_0[3] = "last_bundle_index";
            v2_0[4] = "last_bundle_start_timestamp";
            v2_0[5] = "last_bundle_end_timestamp";
            v2_0[6] = "app_version";
            v2_0[7] = "app_store";
            v2_0[8] = "gmp_version";
            v2_0[9] = "dev_cert_hash";
            v2_0[10] = "measurement_enabled";
            v2_0[11] = "day";
            v2_0[12] = "daily_public_events_count";
            v2_0[13] = "daily_events_count";
            v2_0[14] = "daily_conversions_count";
            v2_0[15] = "config_fetched_time";
            v2_0[16] = "failed_config_fetch_time";
            v2_0[17] = "app_version_int";
            v2_0[18] = "firebase_instance_id";
            v2_0[19] = "daily_error_events_count";
            v2_0[20] = "daily_realtime_events_count";
            v2_0[21] = "health_monitor_sample";
            v2_0[22] = "android_id";
            v2_0[23] = "adid_reporting_enabled";
            Object v4_27 = new String[1];
            v4_27[0] = p12;
            int v1_1 = v0_4.query("apps", v2_0, "app_id=?", v4_27, 0, 0, 0);
            try {
                int v0_1;
                if (v1_1.moveToFirst()) {
                    com.google.android.gms.internal.zzcho v2_26;
                    v0_1 = new com.google.android.gms.internal.zzcgh(this.zziwf, p12);
                    v0_1.zzir(v1_1.getString(0));
                    v0_1.zzis(v1_1.getString(1));
                    v0_1.zzit(v1_1.getString(2));
                    v0_1.zzaq(v1_1.getLong(3));
                    v0_1.zzal(v1_1.getLong(4));
                    v0_1.zzam(v1_1.getLong(5));
                    v0_1.setAppVersion(v1_1.getString(6));
                    v0_1.zziv(v1_1.getString(7));
                    v0_1.zzao(v1_1.getLong(8));
                    v0_1.zzap(v1_1.getLong(9));
                    if ((!v1_1.isNull(10)) && (v1_1.getInt(10) == 0)) {
                        v2_26 = 0;
                    } else {
                        v2_26 = 1;
                    }
                    com.google.android.gms.internal.zzcho v2_43;
                    v0_1.setMeasurementEnabled(v2_26);
                    v0_1.zzat(v1_1.getLong(11));
                    v0_1.zzau(v1_1.getLong(12));
                    v0_1.zzav(v1_1.getLong(13));
                    v0_1.zzaw(v1_1.getLong(14));
                    v0_1.zzar(v1_1.getLong(15));
                    v0_1.zzas(v1_1.getLong(16));
                    if (!v1_1.isNull(17)) {
                        v2_43 = ((long) v1_1.getInt(17));
                    } else {
                        v2_43 = -2147483648;
                    }
                    com.google.android.gms.internal.zzcho v2_55;
                    v0_1.zzan(v2_43);
                    v0_1.zziu(v1_1.getString(18));
                    v0_1.zzay(v1_1.getLong(19));
                    v0_1.zzax(v1_1.getLong(20));
                    v0_1.zziw(v1_1.getString(21));
                    if (!v1_1.isNull(22)) {
                        v2_55 = v1_1.getLong(22);
                    } else {
                        v2_55 = 0;
                    }
                    com.google.android.gms.internal.zzcho v2_60;
                    v0_1.zzaz(v2_55);
                    if ((!v1_1.isNull(23)) && (v1_1.getInt(23) == 0)) {
                        v2_60 = 0;
                    } else {
                        v2_60 = 1;
                    }
                    v0_1.zzbl(v2_60);
                    v0_1.zzaxb();
                    if (v1_1.moveToNext()) {
                        this.zzawy().zzazd().zzj("Got multiple records for app, expected one. appId", com.google.android.gms.internal.zzchm.zzjk(p12));
                    }
                    if (v1_1 == 0) {
                        return v0_1;
                    } else {
                        v1_1.close();
                        return v0_1;
                    }
                } else {
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_1 = 0;
                    return v0_1;
                }
            } catch (int v0_2) {
                this.zzawy().zzazd().zze("Error querying app. appId", com.google.android.gms.internal.zzchm.zzjk(p12), v0_2);
                if (v1_1 != 0) {
                    v1_1.close();
                }
                v0_1 = 0;
                return v0_1;
            }
        } catch (int v0_3) {
            v1_1 = 0;
            if (v1_1 != 0) {
                v1_1.close();
            }
            throw v0_3;
        } catch (int v0_2) {
            v1_1 = 0;
        } catch (int v0_3) {
        }
    }

Method com.google.android.gms.internal.zzcgo.zzja() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzja(String p12)
    {
        android.database.Cursor v10 = 0;
        com.google.android.gms.common.internal.zzbq.zzgm(p12);
        this.zzve();
        this.zzxf();
        java.util.ArrayList v9_1 = new java.util.ArrayList();
        try {
            java.util.ArrayList v0_11 = this.getWritableDatabase();
            Object v2_0 = new String[4];
            v2_0[0] = "name";
            v2_0[1] = "origin";
            v2_0[2] = "set_timestamp";
            v2_0[3] = "value";
            long v4_5 = new String[1];
            v4_5[0] = p12;
            android.database.Cursor v7_1 = v0_11.query("user_attributes", v2_0, "app_id=?", v4_5, 0, 0, "rowid", "1000");
            try {
                java.util.ArrayList v0_12;
                if (!v7_1.moveToFirst()) {
                    if (v7_1 != null) {
                        v7_1.close();
                    }
                    v0_12 = v9_1;
                    return v0_12;
                }
            } catch (java.util.ArrayList v0_1) {
                v10 = v7_1;
                if (v10 != null) {
                    v10.close();
                }
                throw v0_1;
            } catch (java.util.ArrayList v0_0) {
                String v1_0 = v7_1;
                try {
                    this.zzawy().zzazd().zze("Error querying user properties. appId", com.google.android.gms.internal.zzchm.zzjk(p12), v0_0);
                } catch (java.util.ArrayList v0_1) {
                    v10 = v1_0;
                }
                if (v1_0 != null) {
                    v1_0.close();
                }
                v0_12 = 0;
                return v0_12;
            }
            do {
                String v3_5 = v7_1.getString(0);
                Object v2_1 = v7_1.getString(1);
                if (v2_1 == null) {
                    v2_1 = "";
                }
                long v4_6 = v7_1.getLong(2);
                Object v6_1 = this.zza(v7_1, 3);
                if (v6_1 != null) {
                    v9_1.add(new com.google.android.gms.internal.zzclp(p12, v2_1, v3_5, v4_6, v6_1));
                } else {
                    this.zzawy().zzazd().zzj("Read invalid user property value, ignoring it. appId", com.google.android.gms.internal.zzchm.zzjk(p12));
                }
            } while(v7_1.moveToNext());
            if (v7_1 != null) {
                v7_1.close();
            }
            v0_12 = v9_1;
            return v0_12;
        } catch (java.util.ArrayList v0_1) {
        } catch (java.util.ArrayList v0_0) {
            v1_0 = 0;
        }
    }

Method com.google.android.gms.internal.zzcgo.zzg() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzg(String p12, String p13, String p14)
    {
        android.database.Cursor v10 = 0;
        com.google.android.gms.common.internal.zzbq.zzgm(p12);
        this.zzve();
        this.zzxf();
        java.util.ArrayList v9_1 = new java.util.ArrayList();
        try {
            boolean v0_12 = new java.util.ArrayList(3);
            v0_12.add(p12);
            Object v3_2 = new StringBuilder("app_id=?");
        } catch (boolean v0_3) {
            if (v10 != null) {
                v10.close();
            }
            throw v0_3;
        } catch (boolean v0_0) {
            android.database.Cursor v1_0 = 0;
            try {
                this.zzawy().zzazd().zzd("(2)Error querying user properties", com.google.android.gms.internal.zzchm.zzjk(p12), p13, v0_0);
            } catch (boolean v0_3) {
                v10 = v1_0;
            }
            if (v1_0 != null) {
                v1_0.close();
            }
            boolean v0_4 = 0;
            return v0_4;
        }
        if (!android.text.TextUtils.isEmpty(p13)) {
            v0_12.add(p13);
            v3_2.append(" and origin=?");
        }
        if (!android.text.TextUtils.isEmpty(p14)) {
            v0_12.add(String.valueOf(p14).concat("*"));
            v3_2.append(" and name glob ?");
        }
        android.database.Cursor v1_10 = new String[v0_12.size()];
        long v4_2 = ((String[]) v0_12.toArray(v1_10));
        boolean v0_5 = this.getWritableDatabase();
        String v2_6 = new String[4];
        v2_6[0] = "name";
        v2_6[1] = "set_timestamp";
        v2_6[2] = "value";
        v2_6[3] = "origin";
        android.database.Cursor v7_1 = v0_5.query("user_attributes", v2_6, v3_2.toString(), v4_2, 0, 0, "rowid", "1001");
        try {
            if (!v7_1.moveToFirst()) {
                if (v7_1 != null) {
                    v7_1.close();
                }
                v0_4 = v9_1;
                return v0_4;
            }
        } catch (boolean v0_3) {
            v10 = v7_1;
        } catch (boolean v0_0) {
            v1_0 = v7_1;
        }
        while (v9_1.size() < 1000) {
            Object v3_4 = v7_1.getString(0);
            long v4_3 = v7_1.getLong(1);
            Object v6_5 = this.zza(v7_1, 2);
            String v2_7 = v7_1.getString(3);
            try {
                if (v6_5 != null) {
                    v9_1.add(new com.google.android.gms.internal.zzclp(p12, v2_7, v3_4, v4_3, v6_5));
                } else {
                    this.zzawy().zzazd().zzd("(2)Read invalid user property value, ignoring it", com.google.android.gms.internal.zzchm.zzjk(p12), v2_7, p14);
                }
                if (v7_1.moveToNext()) {
                    p13 = v2_7;
                } else {
                }
                if (v7_1 != null) {
                    v7_1.close();
                }
                v0_4 = v9_1;
                return v0_4;
            } catch (boolean v0_0) {
                v1_0 = v7_1;
                p13 = v2_7;
            }
        }
        this.zzawy().zzazd().zzj("Read more than the max allowed user properties, ignoring excess", Integer.valueOf(1000));
    }

Method com.google.android.gms.internal.zzcgo.zzc() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzc(String p24, String[] p25)
    {
        this.zzve();
        this.zzxf();
        java.util.ArrayList v20_1 = new java.util.ArrayList();
        try {
            boolean v2_14 = this.getWritableDatabase();
            long v4_10 = new String[13];
            v4_10[0] = "app_id";
            v4_10[1] = "origin";
            v4_10[2] = "name";
            v4_10[3] = "value";
            v4_10[4] = "active";
            v4_10[5] = "trigger_event_name";
            v4_10[6] = "trigger_timeout";
            v4_10[7] = "timed_out_event";
            v4_10[8] = "creation_timestamp";
            v4_10[9] = "triggered_event";
            v4_10[10] = "triggered_timestamp";
            v4_10[11] = "time_to_live";
            v4_10[12] = "expired_event";
            int v21 = v2_14.query("conditional_properties", v4_10, p24, p25, 0, 0, "rowid", "1001");
            try {
                boolean v2_12;
                if (!v21.moveToFirst()) {
                    if (v21 != 0) {
                        v21.close();
                    }
                    v2_12 = v20_1;
                    return v2_12;
                }
            } catch (boolean v2_13) {
                if (v21 != 0) {
                    v21.close();
                }
                throw v2_13;
            } catch (boolean v2_11) {
                String v3_1 = v21;
                try {
                    this.zzawy().zzazd().zzj("Error querying conditional user property value", v2_11);
                    v2_12 = java.util.Collections.emptyList();
                } catch (boolean v2_13) {
                    v21 = v3_1;
                }
                if (v3_1 == null) {
                    return v2_12;
                } else {
                    v3_1.close();
                    return v2_12;
                }
                if (v21 != 0) {
                    v21.close();
                }
                v2_12 = v20_1;
                return v2_12;
            }
            while (v20_1.size() < 1000) {
                int v11_1;
                com.google.android.gms.internal.zzcln v8_2 = v21.getString(0);
                String v7_1 = v21.getString(1);
                String v3_4 = v21.getString(2);
                String v6_15 = this.zza(v21, 3);
                if (v21.getInt(4) == 0) {
                    v11_1 = 0;
                } else {
                    v11_1 = 1;
                }
                v20_1.add(new com.google.android.gms.internal.zzcgl(v8_2, v7_1, new com.google.android.gms.internal.zzcln(v3_4, v21.getLong(10), v6_15, v7_1), v21.getLong(8), v11_1, v21.getString(5), ((com.google.android.gms.internal.zzcha) this.zzawu().zzb(v21.getBlob(7), com.google.android.gms.internal.zzcha.CREATOR)), v21.getLong(6), ((com.google.android.gms.internal.zzcha) this.zzawu().zzb(v21.getBlob(9), com.google.android.gms.internal.zzcha.CREATOR)), v21.getLong(11), ((com.google.android.gms.internal.zzcha) this.zzawu().zzb(v21.getBlob(12), com.google.android.gms.internal.zzcha.CREATOR))));
                if (!v21.moveToNext()) {
                }
            }
            this.zzawy().zzazd().zzj("Read more than the max allowed conditional properties, ignoring extra", Integer.valueOf(1000));
        } catch (boolean v2_13) {
            v21 = 0;
        } catch (boolean v2_11) {
            v3_1 = 0;
        }
    }

Method com.google.android.gms.internal.zzcgo.zzak() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map zzak(String p11, String p12)
    {
        this.zzxf();
        this.zzve();
        com.google.android.gms.common.internal.zzbq.zzgm(p11);
        com.google.android.gms.common.internal.zzbq.zzgm(p12);
        android.support.v4.util.ArrayMap v8_1 = new android.support.v4.util.ArrayMap();
        android.support.v4.util.ArrayMap v0_12 = this.getWritableDatabase();
        try {
            com.google.android.gms.internal.zzcho v2_1 = new String[2];
            v2_1[0] = "audience_id";
            v2_1[1] = "data";
            Object v4_3 = new String[2];
            v4_3[0] = p11;
            v4_3[1] = p12;
            int v1_0 = v0_12.query("property_filters", v2_1, "app_id=? AND property_name=?", v4_3, 0, 0, 0);
            try {
                android.support.v4.util.ArrayMap v0_13;
                if (!v1_0.moveToFirst()) {
                    v0_13 = java.util.Collections.emptyMap();
                    if (v1_0 == 0) {
                        return v0_13;
                    } else {
                        v1_0.close();
                        return v0_13;
                    }
                }
            } catch (android.support.v4.util.ArrayMap v0_0) {
                this.zzawy().zzazd().zze("Database error querying filters. appId", com.google.android.gms.internal.zzchm.zzjk(p11), v0_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                v0_13 = 0;
                return v0_13;
            }
            do {
                android.support.v4.util.ArrayMap v0_4 = v1_0.getBlob(1);
                android.support.v4.util.ArrayMap v0_5 = com.google.android.gms.internal.zzfjj.zzn(v0_4, 0, v0_4.length);
                com.google.android.gms.internal.zzcho v2_4 = new com.google.android.gms.internal.zzclv();
                v2_4.zza(v0_5);
                Integer v3_5 = v1_0.getInt(0);
                android.support.v4.util.ArrayMap v0_10 = ((java.util.List) v8_1.get(Integer.valueOf(v3_5)));
                if (v0_10 == null) {
                    v0_10 = new java.util.ArrayList();
                    v8_1.put(Integer.valueOf(v3_5), v0_10);
                }
                v0_10.add(v2_4);
            } while(v1_0.moveToNext());
            if (v1_0 != 0) {
                v1_0.close();
            }
            v0_13 = v8_1;
            return v0_13;
        } catch (android.support.v4.util.ArrayMap v0_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v0_1;
        } catch (android.support.v4.util.ArrayMap v0_0) {
            v1_0 = 0;
        } catch (android.support.v4.util.ArrayMap v0_1) {
        }
    }

Method com.google.android.gms.internal.zzcgo.zzaj() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map zzaj(String p11, String p12)
    {
        this.zzxf();
        this.zzve();
        com.google.android.gms.common.internal.zzbq.zzgm(p11);
        com.google.android.gms.common.internal.zzbq.zzgm(p12);
        android.support.v4.util.ArrayMap v8_1 = new android.support.v4.util.ArrayMap();
        android.support.v4.util.ArrayMap v0_12 = this.getWritableDatabase();
        try {
            com.google.android.gms.internal.zzcho v2_1 = new String[2];
            v2_1[0] = "audience_id";
            v2_1[1] = "data";
            Object v4_3 = new String[2];
            v4_3[0] = p11;
            v4_3[1] = p12;
            int v1_0 = v0_12.query("event_filters", v2_1, "app_id=? AND event_name=?", v4_3, 0, 0, 0);
            try {
                android.support.v4.util.ArrayMap v0_13;
                if (!v1_0.moveToFirst()) {
                    v0_13 = java.util.Collections.emptyMap();
                    if (v1_0 == 0) {
                        return v0_13;
                    } else {
                        v1_0.close();
                        return v0_13;
                    }
                }
            } catch (android.support.v4.util.ArrayMap v0_0) {
                this.zzawy().zzazd().zze("Database error querying filters. appId", com.google.android.gms.internal.zzchm.zzjk(p11), v0_0);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                v0_13 = 0;
                return v0_13;
            }
            do {
                android.support.v4.util.ArrayMap v0_4 = v1_0.getBlob(1);
                android.support.v4.util.ArrayMap v0_5 = com.google.android.gms.internal.zzfjj.zzn(v0_4, 0, v0_4.length);
                com.google.android.gms.internal.zzcho v2_4 = new com.google.android.gms.internal.zzcls();
                v2_4.zza(v0_5);
                Integer v3_5 = v1_0.getInt(0);
                android.support.v4.util.ArrayMap v0_10 = ((java.util.List) v8_1.get(Integer.valueOf(v3_5)));
                if (v0_10 == null) {
                    v0_10 = new java.util.ArrayList();
                    v8_1.put(Integer.valueOf(v3_5), v0_10);
                }
                v0_10.add(v2_4);
            } while(v1_0.moveToNext());
            if (v1_0 != 0) {
                v1_0.close();
            }
            v0_13 = v8_1;
            return v0_13;
        } catch (android.support.v4.util.ArrayMap v0_1) {
            v1_0 = 0;
            if (v1_0 != 0) {
                v1_0.close();
            }
            throw v0_1;
        } catch (android.support.v4.util.ArrayMap v0_0) {
            v1_0 = 0;
        } catch (android.support.v4.util.ArrayMap v0_1) {
        }
    }

Method com.google.android.gms.internal.zzcgo.zzah() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.zzcgl zzah(String p22, String p23)
    {
        com.google.android.gms.common.internal.zzbq.zzgm(p22);
        com.google.android.gms.common.internal.zzbq.zzgm(p23);
        this.zzve();
        this.zzxf();
        try {
            com.google.android.gms.internal.zzcho v2_11 = this.getWritableDatabase();
            Object v4_6 = new String[11];
            v4_6[0] = "origin";
            v4_6[1] = "value";
            v4_6[2] = "active";
            v4_6[3] = "trigger_event_name";
            v4_6[4] = "trigger_timeout";
            v4_6[5] = "timed_out_event";
            v4_6[6] = "creation_timestamp";
            v4_6[7] = "triggered_event";
            v4_6[8] = "triggered_timestamp";
            v4_6[9] = "time_to_live";
            v4_6[10] = "expired_event";
            String v6_16 = new String[2];
            v6_16[0] = p22;
            v6_16[1] = p23;
            int v20 = v2_11.query("conditional_properties", v4_6, "app_id=? and name=?", v6_16, 0, 0, 0);
            try {
                com.google.android.gms.internal.zzcgl v5_3;
                if (v20.moveToFirst()) {
                    int v11;
                    String v7_5 = v20.getString(0);
                    String v6_17 = this.zza(v20, 1);
                    if (v20.getInt(2) == 0) {
                        v11 = 0;
                    } else {
                        v11 = 1;
                    }
                    v5_3 = new com.google.android.gms.internal.zzcgl(p22, v7_5, new com.google.android.gms.internal.zzcln(p23, v20.getLong(8), v6_17, v7_5), v20.getLong(6), v11, v20.getString(3), ((com.google.android.gms.internal.zzcha) this.zzawu().zzb(v20.getBlob(5), com.google.android.gms.internal.zzcha.CREATOR)), v20.getLong(4), ((com.google.android.gms.internal.zzcha) this.zzawu().zzb(v20.getBlob(7), com.google.android.gms.internal.zzcha.CREATOR)), v20.getLong(9), ((com.google.android.gms.internal.zzcha) this.zzawu().zzb(v20.getBlob(10), com.google.android.gms.internal.zzcha.CREATOR)));
                    if (v20.moveToNext()) {
                        this.zzawy().zzazd().zze("Got multiple records for conditional property, expected one", com.google.android.gms.internal.zzchm.zzjk(p22), this.zzawt().zzjj(p23));
                    }
                    if (v20 == 0) {
                        return v5_3;
                    } else {
                        v20.close();
                        return v5_3;
                    }
                } else {
                    if (v20 != 0) {
                        v20.close();
                    }
                    v5_3 = 0;
                    return v5_3;
                }
            } catch (com.google.android.gms.internal.zzcho v2_10) {
                if (v20 != 0) {
                    v20.close();
                }
                throw v2_10;
            } catch (com.google.android.gms.internal.zzcho v2_9) {
                String v3_6 = v20;
                try {
                    this.zzawy().zzazd().zzd("Error querying conditional property", com.google.android.gms.internal.zzchm.zzjk(p22), this.zzawt().zzjj(p23), v2_9);
                } catch (com.google.android.gms.internal.zzcho v2_10) {
                    v20 = v3_6;
                }
                if (v3_6 != null) {
                    v3_6.close();
                }
                v5_3 = 0;
                return v5_3;
            }
        } catch (com.google.android.gms.internal.zzcho v2_10) {
            v20 = 0;
        } catch (com.google.android.gms.internal.zzcho v2_9) {
            v3_6 = 0;
        }
    }

Method com.google.android.gms.internal.zzcgo.zzag() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.zzclp zzag(String p10, String p11)
    {
        android.database.Cursor v8 = 0;
        com.google.android.gms.common.internal.zzbq.zzgm(p10);
        com.google.android.gms.common.internal.zzbq.zzgm(p11);
        this.zzve();
        this.zzxf();
        try {
            com.google.android.gms.internal.zzclp v0_8 = this.getWritableDatabase();
            String v2_5 = new String[3];
            v2_5[0] = "set_timestamp";
            v2_5[1] = "value";
            v2_5[2] = "origin";
            long v4_4 = new String[2];
            v4_4[0] = p10;
            v4_4[1] = p11;
            android.database.Cursor v7_1 = v0_8.query("user_attributes", v2_5, "app_id=? and name=?", v4_4, 0, 0, 0);
            try {
                com.google.android.gms.internal.zzclp v0_7;
                if (v7_1.moveToFirst()) {
                    v0_7 = new com.google.android.gms.internal.zzclp(p10, v7_1.getString(2), p11, v7_1.getLong(0), this.zza(v7_1, 1));
                    if (v7_1.moveToNext()) {
                        this.zzawy().zzazd().zzj("Got multiple records for user property, expected one. appId", com.google.android.gms.internal.zzchm.zzjk(p10));
                    }
                    if (v7_1 == null) {
                        return v0_7;
                    } else {
                        v7_1.close();
                        return v0_7;
                    }
                } else {
                    if (v7_1 != null) {
                        v7_1.close();
                    }
                    v0_7 = 0;
                    return v0_7;
                }
            } catch (com.google.android.gms.internal.zzclp v0_1) {
                v8 = v7_1;
                if (v8 != null) {
                    v8.close();
                }
                throw v0_1;
            } catch (com.google.android.gms.internal.zzclp v0_0) {
                com.google.android.gms.internal.zzcho v1_0 = v7_1;
                try {
                    this.zzawy().zzazd().zzd("Error querying user property. appId", com.google.android.gms.internal.zzchm.zzjk(p10), this.zzawt().zzjj(p11), v0_0);
                } catch (com.google.android.gms.internal.zzclp v0_1) {
                    v8 = v1_0;
                }
                if (v1_0 != null) {
                    v1_0.close();
                }
                v0_7 = 0;
                return v0_7;
            }
        } catch (com.google.android.gms.internal.zzclp v0_1) {
        } catch (com.google.android.gms.internal.zzclp v0_0) {
            v1_0 = 0;
        }
    }

Method com.google.android.gms.internal.zzcgo.zzae() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.zzcgw zzae(String p19, String p20)
    {
        com.google.android.gms.common.internal.zzbq.zzgm(p19);
        com.google.android.gms.common.internal.zzbq.zzgm(p20);
        this.zzve();
        this.zzxf();
        try {
            com.google.android.gms.internal.zzcho v2_14 = this.getWritableDatabase();
            String v4_6 = new String[7];
            v4_6[0] = "lifetime_count";
            v4_6[1] = "current_bundle_count";
            v4_6[2] = "last_fire_timestamp";
            v4_6[3] = "last_bundled_timestamp";
            v4_6[4] = "last_sampled_complex_event_id";
            v4_6[5] = "last_sampling_rate";
            v4_6[6] = "last_exempt_from_sampling";
            long v6_9 = new String[2];
            v6_9[0] = p19;
            v6_9[1] = p20;
            int v17 = v2_14.query("events", v4_6, "app_id=? and name=?", v6_9, 0, 0, 0);
            try {
                com.google.android.gms.internal.zzcgw v3_1;
                if (v17.moveToFirst()) {
                    long v12;
                    long v6_10 = v17.getLong(0);
                    long v8_1 = v17.getLong(1);
                    long v10_1 = v17.getLong(2);
                    if (!v17.isNull(3)) {
                        v12 = v17.getLong(3);
                    } else {
                        v12 = 0;
                    }
                    Long v14;
                    if (!v17.isNull(4)) {
                        v14 = Long.valueOf(v17.getLong(4));
                    } else {
                        v14 = 0;
                    }
                    Long v15;
                    if (!v17.isNull(5)) {
                        v15 = Long.valueOf(v17.getLong(5));
                    } else {
                        v15 = 0;
                    }
                    Boolean v16 = 0;
                    if (!v17.isNull(6)) {
                        com.google.android.gms.internal.zzcho v2_4;
                        if (v17.getLong(6) != 1) {
                            v2_4 = 0;
                        } else {
                            v2_4 = 1;
                        }
                        v16 = Boolean.valueOf(v2_4);
                    }
                    v3_1 = new com.google.android.gms.internal.zzcgw(p19, p20, v6_10, v8_1, v10_1, v12, v14, v15, v16);
                    if (v17.moveToNext()) {
                        this.zzawy().zzazd().zzj("Got multiple records for event aggregates, expected one. appId", com.google.android.gms.internal.zzchm.zzjk(p19));
                    }
                    if (v17 == 0) {
                        return v3_1;
                    } else {
                        v17.close();
                        return v3_1;
                    }
                } else {
                    if (v17 != 0) {
                        v17.close();
                    }
                    v3_1 = 0;
                    return v3_1;
                }
            } catch (com.google.android.gms.internal.zzcho v2_9) {
                if (v17 != 0) {
                    v17.close();
                }
                throw v2_9;
            } catch (com.google.android.gms.internal.zzcho v2_8) {
                com.google.android.gms.internal.zzcgw v3_2 = v17;
                try {
                    this.zzawy().zzazd().zzd("Error querying events. appId", com.google.android.gms.internal.zzchm.zzjk(p19), this.zzawt().zzjh(p20), v2_8);
                } catch (com.google.android.gms.internal.zzcho v2_9) {
                    v17 = v3_2;
                }
                if (v3_2 != null) {
                    v3_2.close();
                }
                v3_1 = 0;
                return v3_1;
            }
        } catch (com.google.android.gms.internal.zzcho v2_9) {
            v17 = 0;
        } catch (com.google.android.gms.internal.zzcho v2_8) {
            v3_2 = 0;
        }
    }

Method com.google.android.gms.internal.zzcgo.zza() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.zzcgp zza(long p12, String p14, boolean p15, boolean p16, boolean p17, boolean p18, boolean p19)
    {
        com.google.android.gms.common.internal.zzbq.zzgm(p14);
        this.zzve();
        this.zzxf();
        String[] v10 = new String[1];
        v10[0] = p14;
        com.google.android.gms.internal.zzcgp v8_1 = new com.google.android.gms.internal.zzcgp();
        try {
            com.google.android.gms.internal.zzcgp v0_1 = this.getWritableDatabase();
            android.content.ContentValues v2_5 = new String[6];
            v2_5[0] = "day";
            v2_5[1] = "daily_events_count";
            v2_5[2] = "daily_public_events_count";
            v2_5[3] = "daily_conversions_count";
            v2_5[4] = "daily_error_events_count";
            v2_5[5] = "daily_realtime_events_count";
            String v4_20 = new String[1];
            v4_20[0] = p14;
            int v1_1 = v0_1.query("apps", v2_5, "app_id=?", v4_20, 0, 0, 0);
            try {
                com.google.android.gms.internal.zzcgp v0_2;
                if (v1_1.moveToFirst()) {
                    if (v1_1.getLong(0) == p12) {
                        v8_1.zziyy = v1_1.getLong(1);
                        v8_1.zziyx = v1_1.getLong(2);
                        v8_1.zziyz = v1_1.getLong(3);
                        v8_1.zziza = v1_1.getLong(4);
                        v8_1.zzizb = v1_1.getLong(5);
                    }
                    if (p15) {
                        v8_1.zziyy = (v8_1.zziyy + 1);
                    }
                    if (p16) {
                        v8_1.zziyx = (v8_1.zziyx + 1);
                    }
                    if (p17) {
                        v8_1.zziyz = (v8_1.zziyz + 1);
                    }
                    if (p18) {
                        v8_1.zziza = (v8_1.zziza + 1);
                    }
                    if (p19) {
                        v8_1.zzizb = (v8_1.zzizb + 1);
                    }
                    android.content.ContentValues v2_3 = new android.content.ContentValues();
                    v2_3.put("day", Long.valueOf(p12));
                    v2_3.put("daily_public_events_count", Long.valueOf(v8_1.zziyx));
                    v2_3.put("daily_events_count", Long.valueOf(v8_1.zziyy));
                    v2_3.put("daily_conversions_count", Long.valueOf(v8_1.zziyz));
                    v2_3.put("daily_error_events_count", Long.valueOf(v8_1.zziza));
                    v2_3.put("daily_realtime_events_count", Long.valueOf(v8_1.zzizb));
                    v0_1.update("apps", v2_3, "app_id=?", v10);
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_2 = v8_1;
                    return v0_2;
                } else {
                    this.zzawy().zzazf().zzj("Not updating daily counts, app is not known. appId", com.google.android.gms.internal.zzchm.zzjk(p14));
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_2 = v8_1;
                    return v0_2;
                }
            } catch (com.google.android.gms.internal.zzcgp v0_0) {
                this.zzawy().zzazd().zze("Error updating daily counts. appId", com.google.android.gms.internal.zzchm.zzjk(p14), v0_0);
                if (v1_1 != 0) {
                    v1_1.close();
                }
                v0_2 = v8_1;
                return v0_2;
            }
        } catch (com.google.android.gms.internal.zzcgp v0_3) {
            v1_1 = 0;
            if (v1_1 != 0) {
                v1_1.close();
            }
            throw v0_3;
        } catch (com.google.android.gms.internal.zzcgp v0_0) {
            v1_1 = 0;
        } catch (com.google.android.gms.internal.zzcgp v0_3) {
        }
    }

Method com.google.android.gms.internal.zzcgo.zza() calling method android.database.sqlite.SQLiteDatabase.query()


    private static boolean zza(com.google.android.gms.internal.zzchm p10, android.database.sqlite.SQLiteDatabase p11, String p12)
    {
        int v9 = 0;
        if (p10 != null) {
            try {
                com.google.android.gms.internal.zzcho v2_1 = new String[1];
                v2_1[0] = "name";
                String[] v4 = new String[1];
                v4[0] = p12;
                int v1_0 = p11.query("SQLITE_MASTER", v2_1, "name=?", v4, 0, 0, 0);
                try {
                    int v0_5 = v1_0.moveToFirst();
                } catch (int v0_3) {
                    p10.zzazf().zze("Error querying for table", p12, v0_3);
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    v0_5 = 0;
                    return v0_5;
                }
                if (v1_0 == 0) {
                    return v0_5;
                } else {
                    v1_0.close();
                    return v0_5;
                }
            } catch (int v0_4) {
                if (v9 != 0) {
                    v9.close();
                }
                throw v0_4;
            } catch (int v0_3) {
                v1_0 = 0;
            } catch (int v0_4) {
                v9 = v1_0;
            }
        } else {
            throw new IllegalArgumentException("Monitor must not be null");
        }
    }

Method com.google.android.gms.internal.zzaql.zzq() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzq(long p13)
    {
        this.zzxf();
        com.google.android.gms.analytics.zzj.zzve();
        boolean v0_0 = this.getWritableDatabase();
        try {
            String v2_0 = new String[5];
            v2_0[0] = "cid";
            v2_0[1] = "tid";
            v2_0[2] = "adid";
            v2_0[3] = "hits_count";
            v2_0[4] = "params";
            int v10 = ((Integer) com.google.android.gms.internal.zzarl.zzdwd.get()).intValue();
            java.util.Map v8_0 = String.valueOf(v10);
            String v4_0 = new String[1];
            v4_0[0] = "0";
            android.database.Cursor v9 = v0_0.query("properties", v2_0, "app_uid=?", v4_0, 0, 0, 0, v8_0);
            try {
                java.util.ArrayList v11_1 = new java.util.ArrayList();
            } catch (boolean v0_1) {
                long v1_10 = v9;
                try {
                    this.zze("Error loading hits from the database", v0_1);
                    throw v0_1;
                } catch (boolean v0_19) {
                    v9 = v1_10;
                    if (v9 != null) {
                        v9.close();
                    }
                    throw v0_19;
                }
            }
            if (v9.moveToFirst()) {
                do {
                    int v5_2;
                    String v3_5 = v9.getString(0);
                    String v4_1 = v9.getString(1);
                    if (v9.getInt(2) == 0) {
                        v5_2 = 0;
                    } else {
                        v5_2 = 1;
                    }
                    long v6_1 = ((long) v9.getInt(3));
                    java.util.Map vtmp13 = this.zzea(v9.getString(4));
                    if ((!android.text.TextUtils.isEmpty(v3_5)) && (!android.text.TextUtils.isEmpty(v4_1))) {
                        v11_1.add(new com.google.android.gms.internal.zzaqf(0, v3_5, v4_1, v5_2, v6_1, vtmp13));
                    } else {
                        this.zzc("Read property with empty client id or tracker id", v3_5, v4_1);
                    }
                } while(v9.moveToNext());
            }
            if (v11_1.size() >= v10) {
                this.zzdx("Sending hits to too many properties. Campaign report might be incorrect");
            }
            if (v9 != null) {
                v9.close();
            }
            return v11_1;
        } catch (boolean v0_19) {
        } catch (boolean v0_1) {
            v1_10 = v9;
        }
    }

Method com.google.android.gms.internal.zzaql.zzo() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzo(long p14)
    {
        Throwable v0_0 = 1;
        if (p14 < 0) {
            v0_0 = 0;
        }
        com.google.android.gms.common.internal.zzbq.checkArgument(v0_0);
        com.google.android.gms.analytics.zzj.zzve();
        this.zzxf();
        Throwable v0_1 = this.getWritableDatabase();
        try {
            java.util.Map v2_1 = new String[5];
            v2_1[0] = "hit_id";
            v2_1[1] = "hit_time";
            v2_1[2] = "hit_string";
            v2_1[3] = "hit_url";
            v2_1[4] = "hit_app_id";
            int v8_1 = new Object[1];
            v8_1[0] = "hit_id";
            com.google.android.gms.internal.zzaql v9 = v0_1.query("hits2", v2_1, 0, 0, 0, 0, String.format("%s ASC", v8_1), Long.toString(p14));
            try {
                java.util.ArrayList v10_2 = new java.util.ArrayList();
            } catch (Throwable v0_2) {
                com.google.android.gms.internal.zzaql v1_2 = v9;
                try {
                    this.zze("Error loading hits from the database", v0_2);
                    throw v0_2;
                } catch (Throwable v0_4) {
                    v9 = v1_2;
                    if (v9 != null) {
                        v9.close();
                    }
                    throw v0_4;
                }
            }
            if (v9.moveToFirst()) {
                do {
                    v10_2.add(new com.google.android.gms.internal.zzarq(this, this.zzdz(v9.getString(2)), v9.getLong(1), com.google.android.gms.internal.zzasl.zzel(v9.getString(3)), v9.getLong(0), v9.getInt(4)));
                } while(v9.moveToNext());
            }
            if (v9 != null) {
                v9.close();
            }
            return v10_2;
        } catch (Throwable v0_4) {
        } catch (Throwable v0_2) {
            v1_2 = v9;
        }
    }

Method com.google.android.gms.internal.zzaql.zzn() calling method android.database.sqlite.SQLiteDatabase.query()


    private final java.util.List zzn(long p14)
    {
        java.util.ArrayList v0_8;
        int v10 = 0;
        com.google.android.gms.analytics.zzj.zzve();
        this.zzxf();
        if (p14 > 0) {
            java.util.ArrayList v0_9 = this.getWritableDatabase();
            java.util.ArrayList v9_1 = new java.util.ArrayList();
            try {
                long v2_1 = new String[1];
                v2_1[0] = "hit_id";
                String v8_1 = new Object[1];
                v8_1[0] = "hit_id";
                int v1_1 = v0_9.query("hits2", v2_1, 0, 0, 0, 0, String.format("%s ASC", v8_1), Long.toString(p14));
                try {
                    if (v1_1.moveToFirst()) {
                        do {
                            v9_1.add(Long.valueOf(v1_1.getLong(0)));
                        } while(v1_1.moveToNext());
                    }
                } catch (java.util.ArrayList v0_1) {
                    this.zzd("Error selecting hit ids", v0_1);
                    if (v1_1 == 0) {
                        v0_8 = v9_1;
                        return v0_8;
                    } else {
                        v1_1.close();
                    }
                }
                if (v1_1 == 0) {
                } else {
                    v1_1.close();
                }
            } catch (java.util.ArrayList v0_2) {
                if (v10 != 0) {
                    v10.close();
                }
                throw v0_2;
            } catch (java.util.ArrayList v0_1) {
                v1_1 = 0;
            } catch (java.util.ArrayList v0_2) {
                v10 = v1_1;
            }
        } else {
            v0_8 = java.util.Collections.emptyList();
        }
        return v0_8;
    }

Method com.google.android.gms.internal.zzczh.zzeq() calling method android.database.sqlite.SQLiteDatabase.query()


    private final java.util.List zzeq(int p17)
    {
        boolean v11_0;
        long v12_1 = new java.util.ArrayList();
        int v2_41 = this.zzlk("Error opening database for peekHits");
        if (v2_41 != 0) {
            boolean v11_2 = 0;
            try {
                String v4_0 = new String[3];
                v4_0[0] = "hit_id";
                v4_0[1] = "hit_time";
                v4_0[2] = "hit_first_send_time";
                String v10_5 = new Object[1];
                v10_5[0] = "hit_id";
                String v13_0 = v2_41.query("gtm_hits", v4_0, 0, 0, 0, 0, String.format("%s ASC", v10_5), Integer.toString(40));
                try {
                    v11_0 = new java.util.ArrayList();
                    try {
                        if (v13_0.moveToFirst()) {
                            do {
                                v11_0.add(new com.google.android.gms.internal.zzcyq(v13_0.getLong(0), v13_0.getLong(1), v13_0.getLong(2)));
                            } while(v13_0.moveToNext());
                        }
                    } catch (int v2_39) {
                        com.google.android.gms.internal.zzcyq v3_5 = v13_0;
                        try {
                            int v2_43 = String.valueOf(v2_39.getMessage());
                        } catch (int v2_40) {
                            v11_2 = v3_5;
                            if (v11_2) {
                                v11_2.close();
                            }
                            throw v2_40;
                        }
                        if (v2_43.length() == 0) {
                            int v2_45 = new String("Error in peekHits fetching hitIds: ");
                        } else {
                            v2_45 = "Error in peekHits fetching hitIds: ".concat(v2_43);
                        }
                        com.google.android.gms.internal.zzcze.zzcu(v2_45);
                        if (v3_5 == null) {
                            return v11_0;
                        } else {
                            v3_5.close();
                            return v11_0;
                        }
                    }
                    if (v13_0 != null) {
                        v13_0.close();
                    }
                    try {
                        String v4_23 = new String[5];
                        v4_23[0] = "hit_id";
                        v4_23[1] = "hit_url";
                        v4_23[2] = "hit_method";
                        v4_23[3] = "hit_headers";
                        v4_23[4] = "hit_body";
                        String v10_1 = new Object[1];
                        v10_1[0] = "hit_id";
                        com.google.android.gms.internal.zzcyq v3_0 = v2_41.query("gtm_hits", v4_23, 0, 0, 0, 0, String.format("%s ASC", v10_1), Integer.toString(40));
                        try {
                            if (v3_0.moveToFirst()) {
                                int v5_5 = 0;
                                while(true) {
                                    if (((android.database.sqlite.SQLiteCursor) v3_0).getWindow().getNumRows() <= 0) {
                                        int v6_5 = new Object[1];
                                        v6_5[0] = Long.valueOf(((com.google.android.gms.internal.zzcyq) v11_0.get(v5_5)).zzbey());
                                        com.google.android.gms.internal.zzcze.zzcu(String.format("HitString for hitId %d too large. Hit will be deleted.", v6_5));
                                        int v2_27 = (v5_5 + 1);
                                    } else {
                                        ((com.google.android.gms.internal.zzcyq) v11_0.get(v5_5)).zzlp(v3_0.getString(1));
                                        ((com.google.android.gms.internal.zzcyq) v11_0.get(v5_5)).zzmh(v3_0.getString(2));
                                        ((com.google.android.gms.internal.zzcyq) v11_0.get(v5_5)).zzmi(v3_0.getString(4));
                                        try {
                                            String v4_10;
                                            String v4_9 = v3_0.getString(3);
                                        } catch (int v2_19) {
                                            String v4_12 = v2_19;
                                            Object[] v7_4 = new Object[2];
                                            v7_4[0] = Long.valueOf(((com.google.android.gms.internal.zzcyq) v11_0.get(v5_5)).zzbey());
                                            v7_4[1] = v4_12.getMessage();
                                            com.google.android.gms.internal.zzcze.zzcu(String.format("Failed to read headers for hitId %d: %s", v7_4));
                                            v2_27 = v5_5;
                                        }
                                        if (v4_9 == null) {
                                            v4_10 = 0;
                                        } else {
                                            Object[] v7_3 = new org.json.JSONObject(v4_9);
                                            int v8_2 = v7_3.names();
                                            v4_10 = new java.util.HashMap();
                                            int v6_8 = 0;
                                            while (v6_8 < v8_2.length()) {
                                                String v9_3 = v8_2.getString(v6_8);
                                                v4_10.put(v9_3, ((String) v7_3.opt(v9_3)));
                                                v6_8++;
                                            }
                                        }
                                        ((com.google.android.gms.internal.zzcyq) v11_0.get(v5_5)).zzab(v4_10);
                                    }
                                    if (!v3_0.moveToNext()) {
                                        break;
                                    }
                                    v5_5 = v2_27;
                                }
                            }
                        } catch (int v2_35) {
                            if (v3_0 != null) {
                                v3_0.close();
                            }
                            throw v2_35;
                        } catch (int v2_0) {
                            v13_0 = v3_0;
                            int v2_31 = String.valueOf(v2_0.getMessage());
                            if (v2_31.length() == 0) {
                                int v2_33 = new String("Error in peekHits fetching hit url: ");
                            } else {
                                v2_33 = "Error in peekHits fetching hit url: ".concat(v2_31);
                            }
                            com.google.android.gms.internal.zzcze.zzcu(v2_33);
                            String v4_16 = new java.util.ArrayList();
                            int v5_9 = 0;
                            int v2_34 = ((java.util.ArrayList) v11_0);
                            Object[] v7_6 = v2_34.size();
                            int v6_11 = 0;
                        }
                        if (v3_0 != null) {
                            v3_0.close();
                        }
                    } catch (int v2_35) {
                        v3_0 = v13_0;
                    } catch (int v2_0) {
                    }
                } catch (int v2_40) {
                    v11_2 = v13_0;
                } catch (int v2_39) {
                    v3_5 = v13_0;
                    v11_0 = v12_1;
                }
            } catch (int v2_40) {
            } catch (int v2_39) {
                v3_5 = 0;
                v11_0 = v12_1;
            }
        } else {
            v11_0 = v12_1;
        }
        return v11_0;
    }

Method com.google.android.gms.internal.zzczh.zzeq() calling method android.database.sqlite.SQLiteDatabase.query()


    private final java.util.List zzeq(int p17)
    {
        boolean v11_0;
        long v12_1 = new java.util.ArrayList();
        int v2_41 = this.zzlk("Error opening database for peekHits");
        if (v2_41 != 0) {
            boolean v11_2 = 0;
            try {
                String v4_0 = new String[3];
                v4_0[0] = "hit_id";
                v4_0[1] = "hit_time";
                v4_0[2] = "hit_first_send_time";
                String v10_5 = new Object[1];
                v10_5[0] = "hit_id";
                String v13_0 = v2_41.query("gtm_hits", v4_0, 0, 0, 0, 0, String.format("%s ASC", v10_5), Integer.toString(40));
                try {
                    v11_0 = new java.util.ArrayList();
                    try {
                        if (v13_0.moveToFirst()) {
                            do {
                                v11_0.add(new com.google.android.gms.internal.zzcyq(v13_0.getLong(0), v13_0.getLong(1), v13_0.getLong(2)));
                            } while(v13_0.moveToNext());
                        }
                    } catch (int v2_39) {
                        com.google.android.gms.internal.zzcyq v3_5 = v13_0;
                        try {
                            int v2_43 = String.valueOf(v2_39.getMessage());
                        } catch (int v2_40) {
                            v11_2 = v3_5;
                            if (v11_2) {
                                v11_2.close();
                            }
                            throw v2_40;
                        }
                        if (v2_43.length() == 0) {
                            int v2_45 = new String("Error in peekHits fetching hitIds: ");
                        } else {
                            v2_45 = "Error in peekHits fetching hitIds: ".concat(v2_43);
                        }
                        com.google.android.gms.internal.zzcze.zzcu(v2_45);
                        if (v3_5 == null) {
                            return v11_0;
                        } else {
                            v3_5.close();
                            return v11_0;
                        }
                    }
                    if (v13_0 != null) {
                        v13_0.close();
                    }
                    try {
                        String v4_23 = new String[5];
                        v4_23[0] = "hit_id";
                        v4_23[1] = "hit_url";
                        v4_23[2] = "hit_method";
                        v4_23[3] = "hit_headers";
                        v4_23[4] = "hit_body";
                        String v10_1 = new Object[1];
                        v10_1[0] = "hit_id";
                        com.google.android.gms.internal.zzcyq v3_0 = v2_41.query("gtm_hits", v4_23, 0, 0, 0, 0, String.format("%s ASC", v10_1), Integer.toString(40));
                        try {
                            if (v3_0.moveToFirst()) {
                                int v5_5 = 0;
                                do {
                                    if (((android.database.sqlite.SQLiteCursor) v3_0).getWindow().getNumRows() <= 0) {
                                        int v6_5 = new Object[1];
                                        v6_5[0] = Long.valueOf(((com.google.android.gms.internal.zzcyq) v11_0.get(v5_5)).zzbey());
                                        com.google.android.gms.internal.zzcze.zzcu(String.format("HitString for hitId %d too large. Hit will be deleted.", v6_5));
                                        int v2_27 = (v5_5 + 1);
                                    } else {
                                        ((com.google.android.gms.internal.zzcyq) v11_0.get(v5_5)).zzlp(v3_0.getString(1));
                                        ((com.google.android.gms.internal.zzcyq) v11_0.get(v5_5)).zzmh(v3_0.getString(2));
                                        ((com.google.android.gms.internal.zzcyq) v11_0.get(v5_5)).zzmi(v3_0.getString(4));
                                        try {
                                            String v4_10;
                                            String v4_9 = v3_0.getString(3);
                                        } catch (int v2_19) {
                                            String v4_12 = v2_19;
                                            Object[] v7_4 = new Object[2];
                                            v7_4[0] = Long.valueOf(((com.google.android.gms.internal.zzcyq) v11_0.get(v5_5)).zzbey());
                                            v7_4[1] = v4_12.getMessage();
                                            com.google.android.gms.internal.zzcze.zzcu(String.format("Failed to read headers for hitId %d: %s", v7_4));
                                            v2_27 = v5_5;
                                        }
                                        if (v4_9 == null) {
                                            v4_10 = 0;
                                        } else {
                                            Object[] v7_3 = new org.json.JSONObject(v4_9);
                                            int v8_2 = v7_3.names();
                                            v4_10 = new java.util.HashMap();
                                            int v6_8 = 0;
                                            while (v6_8 < v8_2.length()) {
                                                String v9_3 = v8_2.getString(v6_8);
                                                v4_10.put(v9_3, ((String) v7_3.opt(v9_3)));
                                                v6_8++;
                                            }
                                        }
                                        ((com.google.android.gms.internal.zzcyq) v11_0.get(v5_5)).zzab(v4_10);
                                    }
                                } while(v3_0.moveToNext());
                                v5_5 = v2_27;
                            }
                        } catch (int v2_35) {
                            if (v3_0 != null) {
                                v3_0.close();
                            }
                            throw v2_35;
                        } catch (int v2_0) {
                            v13_0 = v3_0;
                            int v2_31 = String.valueOf(v2_0.getMessage());
                            if (v2_31.length() == 0) {
                                int v2_33 = new String("Error in peekHits fetching hit url: ");
                            } else {
                                v2_33 = "Error in peekHits fetching hit url: ".concat(v2_31);
                            }
                            com.google.android.gms.internal.zzcze.zzcu(v2_33);
                            String v4_16 = new java.util.ArrayList();
                            int v5_9 = 0;
                            int v2_34 = ((java.util.ArrayList) v11_0);
                            Object[] v7_6 = v2_34.size();
                            int v6_11 = 0;
                        }
                        if (v3_0 != null) {
                            v3_0.close();
                        }
                    } catch (int v2_35) {
                        v3_0 = v13_0;
                    } catch (int v2_0) {
                    }
                } catch (int v2_40) {
                    v11_2 = v13_0;
                } catch (int v2_39) {
                    v3_5 = v13_0;
                    v11_0 = v12_1;
                }
            } catch (int v2_40) {
            } catch (int v2_39) {
                v3_5 = 0;
                v11_0 = v12_1;
            }
        } else {
            v11_0 = v12_1;
        }
        return v11_0;
    }

Method com.google.android.gms.internal.zzczh.zzep() calling method android.database.sqlite.SQLiteDatabase.query()


    private final java.util.List zzep(int p14)
    {
        java.util.ArrayList v0_12;
        java.util.ArrayList v9_1 = new java.util.ArrayList();
        if (p14 > 0) {
            java.util.ArrayList v0_9 = this.zzlk("Error opening database for peekHitIds.");
            if (v0_9 != null) {
                try {
                    long v2_0 = new String[1];
                    v2_0[0] = "hit_id";
                    String v8_1 = new Object[1];
                    v8_1[0] = "hit_id";
                    int v1_0 = v0_9.query("gtm_hits", v2_0, 0, 0, 0, 0, String.format("%s ASC", v8_1), Integer.toString(p14));
                    try {
                        if (v1_0.moveToFirst()) {
                            do {
                                v9_1.add(String.valueOf(v1_0.getLong(0)));
                            } while(v1_0.moveToNext());
                        }
                    } catch (java.util.ArrayList v0_0) {
                        java.util.ArrayList v0_5 = String.valueOf(v0_0.getMessage());
                        if (v0_5.length() == 0) {
                            java.util.ArrayList v0_7 = new String("Error in peekHits fetching hitIds: ");
                        } else {
                            v0_7 = "Error in peekHits fetching hitIds: ".concat(v0_5);
                        }
                        com.google.android.gms.internal.zzcze.zzcu(v0_7);
                        if (v1_0 == 0) {
                            v0_12 = v9_1;
                            return v0_12;
                        } else {
                            v1_0.close();
                        }
                    }
                    if (v1_0 == 0) {
                    } else {
                        v1_0.close();
                    }
                } catch (java.util.ArrayList v0_1) {
                    v1_0 = 0;
                    if (v1_0 != 0) {
                        v1_0.close();
                    }
                    throw v0_1;
                } catch (java.util.ArrayList v0_0) {
                    v1_0 = 0;
                } catch (java.util.ArrayList v0_1) {
                }
            } else {
                v0_12 = v9_1;
            }
        } else {
            com.google.android.gms.internal.zzcze.zzcu("Invalid maxHits specified. Skipping");
            v0_12 = v9_1;
        }
        return v0_12;
    }

Method com.google.android.gms.internal.zzczh.zzbfm() calling method android.database.sqlite.SQLiteDatabase.query()


    private final int zzbfm()
    {
        android.database.sqlite.SQLiteException v8 = 0;
        android.database.sqlite.SQLiteException v0_8 = this.zzlk("Error opening database for getNumStoredHits.");
        if (v0_8 != null) {
            try {
                String v2_2 = new String[2];
                v2_2[0] = "hit_id";
                v2_2[1] = "hit_first_send_time";
                int v1_0 = v0_8.query("gtm_hits", v2_2, "hit_first_send_time=0", 0, 0, 0, 0);
                try {
                    android.database.sqlite.SQLiteException v0_3 = v1_0.getCount();
                } catch (android.database.sqlite.SQLiteException v0_1) {
                    android.database.sqlite.SQLiteException v0_5 = String.valueOf(v0_1.getMessage());
                    if (v0_5.length() == 0) {
                        android.database.sqlite.SQLiteException v0_7 = new String("Error getting num untried hits: ");
                    } else {
                        v0_7 = "Error getting num untried hits: ".concat(v0_5);
                    }
                    com.google.android.gms.internal.zzcze.zzcu(v0_7);
                    if (v1_0 == 0) {
                        v0_3 = 0;
                        v8 = v0_3;
                    } else {
                        v1_0.close();
                        v0_3 = 0;
                    }
                }
                if (v1_0 == 0) {
                } else {
                    v1_0.close();
                }
            } catch (android.database.sqlite.SQLiteException v0_2) {
                v1_0 = 0;
                if (v1_0 != 0) {
                    v1_0.close();
                }
                throw v0_2;
            } catch (android.database.sqlite.SQLiteException v0_1) {
                v1_0 = 0;
            } catch (android.database.sqlite.SQLiteException v0_2) {
            }
        }
        return v8;
    }

Method com.google.android.gms.internal.zzczj.zza() calling method android.database.sqlite.SQLiteDatabase.query()


    private static boolean zza(String p10, android.database.sqlite.SQLiteDatabase p11)
    {
        android.database.Cursor v9 = 0;
        try {
            String[] v2 = new String[1];
            v2[0] = "name";
            String[] v4 = new String[1];
            v4[0] = p10;
            android.database.Cursor v1_0 = p11.query("SQLITE_MASTER", v2, "name=?", v4, 0, 0, 0);
            try {
                int v0_4 = v1_0.moveToFirst();
            } catch (int v0_3) {
                v9 = v1_0;
                if (v9 != null) {
                    v9.close();
                }
                throw v0_3;
            } catch (int v0) {
                int v0_2 = v1_0;
                if (v0_2 != 0) {
                    v0_2.close();
                }
                v0_4 = 0;
                return v0_4;
            }
            if (v1_0 == null) {
                return v0_4;
            } else {
                v1_0.close();
                return v0_4;
            }
        } catch (int v0_3) {
        } catch (int v0) {
            v0_2 = 0;
        }
    }

Method com.google.android.gms.internal.zzcim.zzg() calling method android.database.sqlite.SQLiteDatabase.query()


    private final boolean zzg(String p31, long p32)
    {
        this.zzaws().beginTransaction();
        try {
            com.google.android.gms.internal.zzcim$zza v21 = new com.google.android.gms.internal.zzcim$zza;
            v21(this, 0);
            int v14_1 = this.zzaws();
            String v4_0 = 0;
            int v16_0 = this.zzjgb;
            com.google.android.gms.common.internal.zzbq.checkNotNull(v21);
            v14_1.zzve();
            v14_1.zzxf();
            com.google.android.gms.internal.zzcgw v3_50 = 0;
            try {
                int v13_0;
                long v12_0;
                com.google.android.gms.internal.zzcgw v2_90 = v14_1.getWritableDatabase();
            } catch (com.google.android.gms.internal.zzcgw v2_21) {
                v14_1.zzawy().zzazd().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzchm.zzjk(v4_0), v2_21);
                if (v3_50 == null) {
                    if ((v21.zzapa != null) && (!v21.zzapa.isEmpty())) {
                        com.google.android.gms.internal.zzcgw v2_111 = 0;
                    } else {
                        v2_111 = 1;
                    }
                    com.google.android.gms.internal.zzcgw v2_114;
                    if (v2_111 != null) {
                        this.zzaws().setTransactionSuccessful();
                        this.zzaws().endTransaction();
                        v2_114 = 0;
                    } else {
                        com.google.android.gms.internal.zzcmb v17 = 0;
                        com.google.android.gms.internal.zzcme v22 = v21.zzjgi;
                        com.google.android.gms.internal.zzcgw v2_117 = new com.google.android.gms.internal.zzcmb[v21.zzapa.size()];
                        v22.zzjlp = v2_117;
                        long v12_1 = 0;
                        int v13_1 = 0;
                        while (v13_1 < v21.zzapa.size()) {
                            com.google.android.gms.internal.zzcgw v2_65;
                            com.google.android.gms.internal.zzcgw v3_29;
                            if (!this.zzawv().zzan(v21.zzjgi.zzcn, ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name)) {
                                String v4_28;
                                int v14_2 = this.zzawv().zzao(v21.zzjgi.zzcn, ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name);
                                if (v14_2 != 0) {
                                    com.google.android.gms.internal.zzcgw v3_35 = 0;
                                    String v4_33 = 0;
                                    if (((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh == null) {
                                        int v5_83 = new com.google.android.gms.internal.zzcmc[0];
                                        ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh = v5_83;
                                    }
                                    int v6_0 = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh;
                                    int v7_0 = v6_0.length;
                                    int v5_0 = 0;
                                    while (v5_0 < v7_0) {
                                        com.google.android.gms.internal.zzcgw v2_67;
                                        com.google.android.gms.internal.zzcgw v2_66 = v6_0[v5_0];
                                        if (!"_c".equals(v2_66.name)) {
                                            if (!"_r".equals(v2_66.name)) {
                                                v2_67 = v4_33;
                                            } else {
                                                v2_66.zzjll = Long.valueOf(1);
                                                v2_67 = 1;
                                            }
                                        } else {
                                            v2_66.zzjll = Long.valueOf(1);
                                            v3_35 = 1;
                                            v2_67 = v4_33;
                                        }
                                        v5_0++;
                                        v4_33 = v2_67;
                                    }
                                    if ((v3_35 == null) && (v14_2 != 0)) {
                                        this.zzawy().zzazj().zzj("Marking event as conversion", this.zzawt().zzjh(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name));
                                        com.google.android.gms.internal.zzcgw v2_20 = ((com.google.android.gms.internal.zzcmc[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh, (((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh.length + 1)));
                                        com.google.android.gms.internal.zzcgw v3_3 = new com.google.android.gms.internal.zzcmc();
                                        v3_3.name = "_c";
                                        v3_3.zzjll = Long.valueOf(1);
                                        v2_20[(v2_20.length - 1)] = v3_3;
                                        ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh = v2_20;
                                    }
                                    if (v4_33 == null) {
                                        this.zzawy().zzazj().zzj("Marking event as real-time", this.zzawt().zzjh(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name));
                                        com.google.android.gms.internal.zzcgw v2_38 = ((com.google.android.gms.internal.zzcmc[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh, (((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh.length + 1)));
                                        com.google.android.gms.internal.zzcgw v3_10 = new com.google.android.gms.internal.zzcmc();
                                        v3_10.name = "_r";
                                        v3_10.zzjll = Long.valueOf(1);
                                        v2_38[(v2_38.length - 1)] = v3_10;
                                        ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh = v2_38;
                                    }
                                    if (this.zzaws().zza(this.zzbag(), v21.zzjgi.zzcn, 0, 0, 0, 0, 1).zzizb <= ((long) this.zzjew.zzix(v21.zzjgi.zzcn))) {
                                        v17 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcgw v2_42 = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1));
                                        com.google.android.gms.internal.zzcgw v3_19 = 0;
                                        while (v3_19 < v2_42.zzjlh.length) {
                                            if (!"_r".equals(v2_42.zzjlh[v3_19].name)) {
                                                v3_19++;
                                            } else {
                                                String v4_16 = new com.google.android.gms.internal.zzcmc[(v2_42.zzjlh.length - 1)];
                                                if (v3_19 > null) {
                                                    System.arraycopy(v2_42.zzjlh, 0, v4_16, 0, v3_19);
                                                }
                                                if (v3_19 < v4_16.length) {
                                                    System.arraycopy(v2_42.zzjlh, (v3_19 + 1), v4_16, v3_19, (v4_16.length - v3_19));
                                                }
                                                v2_42.zzjlh = v4_16;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzclq.zzjz(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name)) || ((v14_2 == 0) || (this.zzaws().zza(this.zzbag(), v21.zzjgi.zzcn, 0, 0, 1, 0, 0).zziyz <= ((long) this.zzjew.zzb(v21.zzjgi.zzcn, com.google.android.gms.internal.zzchc.zzjaq))))) {
                                        v4_28 = v17;
                                    } else {
                                        this.zzawy().zzazf().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                                        com.google.android.gms.internal.zzcgw v2_56 = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1));
                                        int v5_20 = 0;
                                        String v4_24 = 0;
                                        int v7_12 = v2_56.zzjlh;
                                        int v6_12 = 0;
                                        while (v6_12 < v7_12.length) {
                                            String v4_29;
                                            com.google.android.gms.internal.zzcgw v3_30 = v7_12[v6_12];
                                            if (!"_c".equals(v3_30.name)) {
                                                if (!"_err".equals(v3_30.name)) {
                                                    v3_30 = v4_24;
                                                    v4_29 = v5_20;
                                                } else {
                                                    v4_29 = 1;
                                                    v3_30 = v4_24;
                                                }
                                            } else {
                                                v4_29 = v5_20;
                                            }
                                            v6_12++;
                                            v5_20 = v4_29;
                                            v4_24 = v3_30;
                                        }
                                        if ((v5_20 == 0) || (v4_24 == null)) {
                                            if (v4_24 == null) {
                                                this.zzawy().zzazd().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                                            } else {
                                                v4_24.name = "_err";
                                                v4_24.zzjll = Long.valueOf(10);
                                                v4_28 = v17;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcgw v3_25 = v2_56.zzjlh;
                                            int v5_22 = new com.google.android.gms.internal.zzcmc[1];
                                            v5_22[0] = v4_24;
                                            v2_56.zzjlh = ((com.google.android.gms.internal.zzcmc[]) com.google.android.gms.common.util.zza.zza(v3_25, v5_22));
                                            v4_28 = v17;
                                        }
                                    }
                                } else {
                                    this.zzawu();
                                    if (!com.google.android.gms.internal.zzclq.zzkn(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name)) {
                                    }
                                }
                                com.google.android.gms.internal.zzcgw v3_28 = (v12_1 + 1);
                                v22.zzjlp[v12_1] = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1));
                                v2_65 = v3_28;
                                v3_29 = v4_28;
                            } else {
                                com.google.android.gms.internal.zzcgw v2_81;
                                this.zzawy().zzazf().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn), this.zzawt().zzjh(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name));
                                if ((!this.zzawu().zzkl(v21.zzjgi.zzcn)) && (!this.zzawu().zzkm(v21.zzjgi.zzcn))) {
                                    v2_81 = 0;
                                } else {
                                    v2_81 = 1;
                                }
                                if ((v2_81 != null) || ("_err".equals(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name))) {
                                    v2_65 = v12_1;
                                    v3_29 = v17;
                                } else {
                                    this.zzawu().zza(v21.zzjgi.zzcn, 11, "_ev", ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name, 0);
                                    v2_65 = v12_1;
                                    v3_29 = v17;
                                }
                            }
                            v13_1++;
                            v12_1 = v2_65;
                            v17 = v3_29;
                        }
                        if (v12_1 < v21.zzapa.size()) {
                            v22.zzjlp = ((com.google.android.gms.internal.zzcmb[]) java.util.Arrays.copyOf(v22.zzjlp, v12_1));
                        }
                        v22.zzjmi = this.zza(v21.zzjgi.zzcn, v21.zzjgi.zzjlq, v22.zzjlp);
                        if ((((Boolean) com.google.android.gms.internal.zzchc.zzjac.get()).booleanValue()) && ("1".equals(this.zzjew.zzawv().zzam(v21.zzjgi.zzcn, "measurement.event_sampling_enabled")))) {
                            java.util.HashMap v23_1 = new java.util.HashMap();
                            java.util.HashMap v0_50 = new com.google.android.gms.internal.zzcmb[v22.zzjlp.length];
                            com.google.android.gms.internal.zzcmb[] v24 = v0_50;
                            Boolean v18 = 0;
                            java.security.SecureRandom v25 = this.zzawu().zzbaz();
                            com.google.android.gms.internal.zzcmb[] v26 = v22.zzjlp;
                            int v27 = v26.length;
                            int v20 = 0;
                            while (v20 < v27) {
                                com.google.android.gms.internal.zzcgw v2_213;
                                com.google.android.gms.internal.zzcmb v28 = v26[v20];
                                if (!v28.name.equals("_ep")) {
                                    int v19;
                                    if (com.google.android.gms.internal.zzcim.zza(v28, "_dbg", Long.valueOf(1))) {
                                        v19 = 1;
                                    } else {
                                        v19 = this.zzawv().zzap(v21.zzjgi.zzcn, v28.name);
                                    }
                                    if (v19 > 0) {
                                        com.google.android.gms.internal.zzcgw v3_91;
                                        com.google.android.gms.internal.zzcgw v2_199 = ((com.google.android.gms.internal.zzcgw) v23_1.get(v28.name));
                                        if (v2_199 != null) {
                                            v3_91 = v2_199;
                                        } else {
                                            v3_91 = this.zzaws().zzae(v21.zzjgi.zzcn, v28.name);
                                            if (v3_91 == null) {
                                                this.zzawy().zzazf().zze("Event being bundled has no eventAggregate. appId, eventName", v21.zzjgi.zzcn, v28.name);
                                                v3_91 = new com.google.android.gms.internal.zzcgw(v21.zzjgi.zzcn, v28.name, 1, 1, v28.zzjli.longValue(), 0, 0, 0, 0);
                                            }
                                        }
                                        String v4_84;
                                        this.zzawu();
                                        com.google.android.gms.internal.zzcgw v2_207 = ((Long) com.google.android.gms.internal.zzclq.zza(v28, "_eid"));
                                        if (v2_207 == null) {
                                            v4_84 = 0;
                                        } else {
                                            v4_84 = 1;
                                        }
                                        String v4_85 = Boolean.valueOf(v4_84);
                                        if (v19 != 1) {
                                            if (v25.nextInt(v19) != 0) {
                                                if (Math.abs((v28.zzjli.longValue() - v3_91.zzizn)) < 86400000) {
                                                    if (!v4_85.booleanValue()) {
                                                        v2_213 = v18;
                                                    } else {
                                                        v23_1.put(v28.name, v3_91.zza(v2_207, 0, 0));
                                                    }
                                                } else {
                                                    this.zzawu();
                                                    v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_efs", Long.valueOf(1));
                                                    this.zzawu();
                                                    v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_sr", Long.valueOf(((long) v19)));
                                                    v2_213 = (v18 + 1);
                                                    v24[v18] = v28;
                                                    if (v4_85.booleanValue()) {
                                                        v3_91 = v3_91.zza(0, Long.valueOf(((long) v19)), Boolean.valueOf(1));
                                                    }
                                                    v23_1.put(v28.name, v3_91.zzbc(v28.zzjli.longValue()));
                                                }
                                            } else {
                                                this.zzawu();
                                                v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_sr", Long.valueOf(((long) v19)));
                                                v2_213 = (v18 + 1);
                                                v24[v18] = v28;
                                                if (v4_85.booleanValue()) {
                                                    v3_91 = v3_91.zza(0, Long.valueOf(((long) v19)), 0);
                                                }
                                                v23_1.put(v28.name, v3_91.zzbc(v28.zzjli.longValue()));
                                            }
                                        } else {
                                            v2_213 = (v18 + 1);
                                            v24[v18] = v28;
                                            if ((v4_85.booleanValue()) && ((v3_91.zzizo != null) || ((v3_91.zzizp != null) || (v3_91.zzizq != null)))) {
                                                v23_1.put(v28.name, v3_91.zza(0, 0, 0));
                                            }
                                        }
                                    } else {
                                        this.zzawy().zzazf().zze("Sample rate must be positive. event, rate", v28.name, Integer.valueOf(v19));
                                        v2_213 = (v18 + 1);
                                        v24[v18] = v28;
                                    }
                                } else {
                                    this.zzawu();
                                    com.google.android.gms.internal.zzcgw v2_220 = ((String) com.google.android.gms.internal.zzclq.zza(v28, "_en"));
                                    com.google.android.gms.internal.zzcgw v3_101 = ((com.google.android.gms.internal.zzcgw) v23_1.get(v2_220));
                                    if (v3_101 == null) {
                                        v3_101 = this.zzaws().zzae(v21.zzjgi.zzcn, v2_220);
                                        v23_1.put(v2_220, v3_101);
                                    }
                                    if (v3_101.zzizo != null) {
                                    } else {
                                        if (v3_101.zzizp.longValue() > 1) {
                                            this.zzawu();
                                            v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_sr", v3_101.zzizp);
                                        }
                                        if ((v3_101.zzizq != null) && (v3_101.zzizq.booleanValue())) {
                                            this.zzawu();
                                            v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_efs", Long.valueOf(1));
                                        }
                                        v2_213 = (v18 + 1);
                                        v24[v18] = v28;
                                    }
                                }
                                v20++;
                                v18 = v2_213;
                            }
                            if (v18 < v22.zzjlp.length) {
                                v22.zzjlp = ((com.google.android.gms.internal.zzcmb[]) java.util.Arrays.copyOf(v24, v18));
                            }
                            com.google.android.gms.internal.zzcgw v3_70 = v23_1.entrySet().iterator();
                            while (v3_70.hasNext()) {
                                this.zzaws().zza(((com.google.android.gms.internal.zzcgw) ((java.util.Map$Entry) v3_70.next()).getValue()));
                            }
                        }
                        v22.zzjls = Long.valueOf(nan);
                        v22.zzjlt = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcgw v2_152 = 0;
                        while (v2_152 < v22.zzjlp.length) {
                            com.google.android.gms.internal.zzcgw v3_83 = v22.zzjlp[v2_152];
                            if (v3_83.zzjli.longValue() < v22.zzjls.longValue()) {
                                v22.zzjls = v3_83.zzjli;
                            }
                            if (v3_83.zzjli.longValue() > v22.zzjlt.longValue()) {
                                v22.zzjlt = v3_83.zzjli;
                            }
                            v2_152++;
                        }
                        int v6_34 = v21.zzjgi.zzcn;
                        int v7_26 = this.zzaws().zzjb(v6_34);
                        if (v7_26 != 0) {
                            if (v22.zzjlp.length > 0) {
                                String v4_57;
                                com.google.android.gms.internal.zzcgw v2_157 = v7_26.zzaxf();
                                if (v2_157 == 0) {
                                    v4_57 = 0;
                                } else {
                                    v4_57 = Long.valueOf(v2_157);
                                }
                                v22.zzjlv = v4_57;
                                String v4_58 = v7_26.zzaxe();
                                if (v4_58 != 0) {
                                    v2_157 = v4_58;
                                }
                                com.google.android.gms.internal.zzcgw v2_158;
                                if (v2_157 == 0) {
                                    v2_158 = 0;
                                } else {
                                    v2_158 = Long.valueOf(v2_157);
                                }
                                v22.zzjlu = v2_158;
                                v7_26.zzaxo();
                                v22.zzjmg = Integer.valueOf(((int) v7_26.zzaxl()));
                                v7_26.zzal(v22.zzjls.longValue());
                                v7_26.zzam(v22.zzjlt.longValue());
                                v22.zzixw = v7_26.zzaxw();
                                this.zzaws().zza(v7_26);
                            }
                        } else {
                            this.zzawy().zzazd().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                        }
                        if (v22.zzjlp.length > 0) {
                            com.google.android.gms.internal.zzcgw v2_173 = this.zzawv().zzjs(v21.zzjgi.zzcn);
                            if ((v2_173 != null) && (v2_173.zzjkw != null)) {
                                v22.zzjmn = v2_173.zzjkw;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v21.zzjgi.zzixs)) {
                                    this.zzawy().zzazf().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                                } else {
                                    v22.zzjmn = Long.valueOf(-1);
                                }
                            }
                            this.zzaws().zza(v22, v17);
                        }
                        this.zzaws().zzah(v21.zzjgj);
                        com.google.android.gms.internal.zzcgw v3_79 = this.zzaws();
                        com.google.android.gms.internal.zzcgw v2_184 = v3_79.getWritableDatabase();
                        int v5_53 = new String[2];
                        v5_53[0] = v6_34;
                        v5_53[1] = v6_34;
                        v2_184.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_53);
                        this.zzaws().setTransactionSuccessful();
                        this.zzaws().endTransaction();
                        v2_114 = 1;
                    }
                    return v2_114;
                } else {
                    v3_50.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_31;
                if (v16_0 == -1) {
                    int v5_42 = new String[1];
                    v5_42[0] = 0;
                    v6_31 = v5_42;
                } else {
                    int v5_47 = new String[2];
                    v5_47[0] = 0;
                    v5_47[1] = String.valueOf(v16_0);
                    v6_31 = v5_47;
                }
                int v5_50;
                if (v16_0 == -1) {
                    v5_50 = "";
                } else {
                    v5_50 = " and rowid <= ?";
                }
                com.google.android.gms.internal.zzcgw v3_86 = v2_90.rawQuery(new StringBuilder((String.valueOf(v5_50).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_50).append(" order by rowid limit 1;").toString(), v6_31);
                if (v3_86.moveToFirst()) {
                    int v5_61 = v3_86.getString(0);
                    v3_86.close();
                    v13_0 = v5_61;
                    v12_0 = 0;
                } else {
                    if (v3_86 == null) {
                    } else {
                        v3_86.close();
                    }
                }
            } else {
                int v6_60;
                if (v16_0 == -1) {
                    int v5_74 = new String[1];
                    v5_74[0] = String.valueOf(p32);
                    v6_60 = v5_74;
                } else {
                    int v5_80 = new String[2];
                    v5_80[0] = String.valueOf(v16_0);
                    v5_80[1] = String.valueOf(p32);
                    v6_60 = v5_80;
                }
                int v5_3;
                if (v16_0 == -1) {
                    v5_3 = "";
                } else {
                    v5_3 = "rowid <= ? and ";
                }
                com.google.android.gms.internal.zzcgw v3_24 = v2_90.rawQuery(new StringBuilder((String.valueOf(v5_3).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_3).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_60);
                if (v3_24.moveToFirst()) {
                    String v4_30 = v3_24.getString(0);
                    int v5_28 = v3_24.getString(1);
                    v3_24.close();
                    v13_0 = v5_28;
                    v12_0 = v4_30;
                } else {
                    if (v3_24 == null) {
                    } else {
                        v3_24.close();
                    }
                }
            }
            try {
                String v4_38 = new String[1];
                v4_38[0] = "metadata";
                int v6_21 = new String[2];
                v6_21[0] = v12_0;
                v6_21[1] = v13_0;
                int v11_2 = v2_90.query("raw_events_metadata", v4_38, "app_id = ? and metadata_fingerprint = ?", v6_21, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcgw v2_91) {
                v3_50 = v11_2;
                if (v3_50 != null) {
                    v3_50.close();
                }
                throw v2_91;
            } catch (com.google.android.gms.internal.zzcgw v2_21) {
                v3_50 = v11_2;
                v4_0 = v12_0;
            }
            if (v11_2.moveToFirst()) {
                com.google.android.gms.internal.zzcgw v3_48 = v11_2.getBlob(0);
                com.google.android.gms.internal.zzcgw v3_49 = com.google.android.gms.internal.zzfjj.zzn(v3_48, 0, v3_48.length);
                String v4_41 = new com.google.android.gms.internal.zzcme();
                try {
                    v4_41.zza(v3_49);
                } catch (com.google.android.gms.internal.zzcgw v2_89) {
                    v14_1.zzawy().zzazd().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0), v2_89);
                    if (v11_2 == 0) {
                    } else {
                        v11_2.close();
                    }
                }
                if (v11_2.moveToNext()) {
                    v14_1.zzawy().zzazf().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0));
                }
                int v5_36;
                int v6_23;
                v11_2.close();
                v21.zzb(v4_41);
                if (v16_0 == -1) {
                    v5_36 = "app_id = ? and metadata_fingerprint = ?";
                    v6_23 = new String[2];
                    v6_23[0] = v12_0;
                    v6_23[1] = v13_0;
                } else {
                    v5_36 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_23 = new String[3];
                    v6_23[0] = v12_0;
                    v6_23[1] = v13_0;
                    v6_23[2] = String.valueOf(v16_0);
                }
                String v4_46 = new String[4];
                v4_46[0] = "rowid";
                v4_46[1] = "name";
                v4_46[2] = "timestamp";
                v4_46[3] = "data";
                v3_50 = v2_90.query("raw_events", v4_46, v5_36, v6_23, 0, 0, "rowid", 0);
                try {
                    if (!v3_50.moveToFirst()) {
                        v14_1.zzawy().zzazf().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0));
                        if (v3_50 == null) {
                        } else {
                            v3_50.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcgw v2_21) {
                    v4_0 = v12_0;
                }
                do {
                    String v4_47 = v3_50.getLong(0);
                    com.google.android.gms.internal.zzcgw v2_95 = v3_50.getBlob(3);
                    com.google.android.gms.internal.zzcgw v2_96 = com.google.android.gms.internal.zzfjj.zzn(v2_95, 0, v2_95.length);
                    int v6_27 = new com.google.android.gms.internal.zzcmb();
                    v6_27.zza(v2_96);
                    v6_27.name = v3_50.getString(1);
                    v6_27.zzjli = Long.valueOf(v3_50.getLong(2));
                    if (v21.zza(v4_47, v6_27)) {
                    } else {
                        if (v3_50 == null) {
                        } else {
                            v3_50.close();
                        }
                    }
                } while(v3_50.moveToNext());
                if (v3_50 == null) {
                } else {
                    v3_50.close();
                }
            } else {
                v14_1.zzawy().zzazd().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0));
                if (v11_2 == 0) {
                } else {
                    v11_2.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcgw v2_87) {
            this.zzaws().endTransaction();
            throw v2_87;
        }
    }

Method com.google.android.gms.internal.zzcim.zzg() calling method android.database.sqlite.SQLiteDatabase.query()


    private final boolean zzg(String p31, long p32)
    {
        this.zzaws().beginTransaction();
        try {
            com.google.android.gms.internal.zzcim$zza v21 = new com.google.android.gms.internal.zzcim$zza;
            v21(this, 0);
            int v14_1 = this.zzaws();
            String v4_0 = 0;
            int v16_0 = this.zzjgb;
            com.google.android.gms.common.internal.zzbq.checkNotNull(v21);
            v14_1.zzve();
            v14_1.zzxf();
            com.google.android.gms.internal.zzcgw v3_50 = 0;
            try {
                int v13_0;
                long v12_0;
                com.google.android.gms.internal.zzcgw v2_90 = v14_1.getWritableDatabase();
            } catch (com.google.android.gms.internal.zzcgw v2_21) {
                v14_1.zzawy().zzazd().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzchm.zzjk(v4_0), v2_21);
                if (v3_50 == null) {
                    if ((v21.zzapa != null) && (!v21.zzapa.isEmpty())) {
                        com.google.android.gms.internal.zzcgw v2_111 = 0;
                    } else {
                        v2_111 = 1;
                    }
                    com.google.android.gms.internal.zzcgw v2_114;
                    if (v2_111 != null) {
                        this.zzaws().setTransactionSuccessful();
                        this.zzaws().endTransaction();
                        v2_114 = 0;
                    } else {
                        com.google.android.gms.internal.zzcmb v17 = 0;
                        com.google.android.gms.internal.zzcme v22 = v21.zzjgi;
                        com.google.android.gms.internal.zzcgw v2_117 = new com.google.android.gms.internal.zzcmb[v21.zzapa.size()];
                        v22.zzjlp = v2_117;
                        long v12_1 = 0;
                        int v13_1 = 0;
                        while (v13_1 < v21.zzapa.size()) {
                            com.google.android.gms.internal.zzcgw v3_29;
                            com.google.android.gms.internal.zzcgw v2_65;
                            if (!this.zzawv().zzan(v21.zzjgi.zzcn, ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name)) {
                                String v4_28;
                                int v14_2 = this.zzawv().zzao(v21.zzjgi.zzcn, ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name);
                                if (v14_2 != 0) {
                                    com.google.android.gms.internal.zzcgw v3_35 = 0;
                                    String v4_33 = 0;
                                    if (((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh == null) {
                                        int v5_83 = new com.google.android.gms.internal.zzcmc[0];
                                        ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh = v5_83;
                                    }
                                    int v6_0 = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh;
                                    int v7_0 = v6_0.length;
                                    int v5_0 = 0;
                                    while (v5_0 < v7_0) {
                                        com.google.android.gms.internal.zzcgw v2_67;
                                        com.google.android.gms.internal.zzcgw v2_66 = v6_0[v5_0];
                                        if (!"_c".equals(v2_66.name)) {
                                            if (!"_r".equals(v2_66.name)) {
                                                v2_67 = v4_33;
                                            } else {
                                                v2_66.zzjll = Long.valueOf(1);
                                                v2_67 = 1;
                                            }
                                        } else {
                                            v2_66.zzjll = Long.valueOf(1);
                                            v3_35 = 1;
                                            v2_67 = v4_33;
                                        }
                                        v5_0++;
                                        v4_33 = v2_67;
                                    }
                                    if ((v3_35 == null) && (v14_2 != 0)) {
                                        this.zzawy().zzazj().zzj("Marking event as conversion", this.zzawt().zzjh(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name));
                                        com.google.android.gms.internal.zzcgw v2_20 = ((com.google.android.gms.internal.zzcmc[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh, (((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh.length + 1)));
                                        com.google.android.gms.internal.zzcgw v3_3 = new com.google.android.gms.internal.zzcmc();
                                        v3_3.name = "_c";
                                        v3_3.zzjll = Long.valueOf(1);
                                        v2_20[(v2_20.length - 1)] = v3_3;
                                        ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh = v2_20;
                                    }
                                    if (v4_33 == null) {
                                        this.zzawy().zzazj().zzj("Marking event as real-time", this.zzawt().zzjh(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name));
                                        com.google.android.gms.internal.zzcgw v2_38 = ((com.google.android.gms.internal.zzcmc[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh, (((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh.length + 1)));
                                        com.google.android.gms.internal.zzcgw v3_10 = new com.google.android.gms.internal.zzcmc();
                                        v3_10.name = "_r";
                                        v3_10.zzjll = Long.valueOf(1);
                                        v2_38[(v2_38.length - 1)] = v3_10;
                                        ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).zzjlh = v2_38;
                                    }
                                    if (this.zzaws().zza(this.zzbag(), v21.zzjgi.zzcn, 0, 0, 0, 0, 1).zzizb <= ((long) this.zzjew.zzix(v21.zzjgi.zzcn))) {
                                        v17 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcgw v2_42 = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1));
                                        com.google.android.gms.internal.zzcgw v3_19 = 0;
                                        while (v3_19 < v2_42.zzjlh.length) {
                                            if (!"_r".equals(v2_42.zzjlh[v3_19].name)) {
                                                v3_19++;
                                            } else {
                                                String v4_16 = new com.google.android.gms.internal.zzcmc[(v2_42.zzjlh.length - 1)];
                                                if (v3_19 > null) {
                                                    System.arraycopy(v2_42.zzjlh, 0, v4_16, 0, v3_19);
                                                }
                                                if (v3_19 < v4_16.length) {
                                                    System.arraycopy(v2_42.zzjlh, (v3_19 + 1), v4_16, v3_19, (v4_16.length - v3_19));
                                                }
                                                v2_42.zzjlh = v4_16;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzclq.zzjz(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name)) || ((v14_2 == 0) || (this.zzaws().zza(this.zzbag(), v21.zzjgi.zzcn, 0, 0, 1, 0, 0).zziyz <= ((long) this.zzjew.zzb(v21.zzjgi.zzcn, com.google.android.gms.internal.zzchc.zzjaq))))) {
                                        v4_28 = v17;
                                    } else {
                                        this.zzawy().zzazf().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                                        com.google.android.gms.internal.zzcgw v2_56 = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1));
                                        int v5_20 = 0;
                                        String v4_24 = 0;
                                        int v7_12 = v2_56.zzjlh;
                                        int v6_12 = 0;
                                        while (v6_12 < v7_12.length) {
                                            String v4_29;
                                            com.google.android.gms.internal.zzcgw v3_30 = v7_12[v6_12];
                                            if (!"_c".equals(v3_30.name)) {
                                                if (!"_err".equals(v3_30.name)) {
                                                    v3_30 = v4_24;
                                                    v4_29 = v5_20;
                                                } else {
                                                    v4_29 = 1;
                                                    v3_30 = v4_24;
                                                }
                                            } else {
                                                v4_29 = v5_20;
                                            }
                                            v6_12++;
                                            v5_20 = v4_29;
                                            v4_24 = v3_30;
                                        }
                                        if ((v5_20 == 0) || (v4_24 == null)) {
                                            if (v4_24 == null) {
                                                this.zzawy().zzazd().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                                            } else {
                                                v4_24.name = "_err";
                                                v4_24.zzjll = Long.valueOf(10);
                                                v4_28 = v17;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcgw v3_25 = v2_56.zzjlh;
                                            int v5_22 = new com.google.android.gms.internal.zzcmc[1];
                                            v5_22[0] = v4_24;
                                            v2_56.zzjlh = ((com.google.android.gms.internal.zzcmc[]) com.google.android.gms.common.util.zza.zza(v3_25, v5_22));
                                            v4_28 = v17;
                                        }
                                    }
                                } else {
                                    this.zzawu();
                                    if (!com.google.android.gms.internal.zzclq.zzkn(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name)) {
                                    }
                                }
                                com.google.android.gms.internal.zzcgw v3_28 = (v12_1 + 1);
                                v22.zzjlp[v12_1] = ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1));
                                v2_65 = v3_28;
                                v3_29 = v4_28;
                            } else {
                                com.google.android.gms.internal.zzcgw v2_81;
                                this.zzawy().zzazf().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn), this.zzawt().zzjh(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name));
                                if ((!this.zzawu().zzkl(v21.zzjgi.zzcn)) && (!this.zzawu().zzkm(v21.zzjgi.zzcn))) {
                                    v2_81 = 0;
                                } else {
                                    v2_81 = 1;
                                }
                                if ((v2_81 != null) || ("_err".equals(((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name))) {
                                    v2_65 = v12_1;
                                    v3_29 = v17;
                                } else {
                                    this.zzawu().zza(v21.zzjgi.zzcn, 11, "_ev", ((com.google.android.gms.internal.zzcmb) v21.zzapa.get(v13_1)).name, 0);
                                    v2_65 = v12_1;
                                    v3_29 = v17;
                                }
                            }
                            v13_1++;
                            v12_1 = v2_65;
                            v17 = v3_29;
                        }
                        if (v12_1 < v21.zzapa.size()) {
                            v22.zzjlp = ((com.google.android.gms.internal.zzcmb[]) java.util.Arrays.copyOf(v22.zzjlp, v12_1));
                        }
                        v22.zzjmi = this.zza(v21.zzjgi.zzcn, v21.zzjgi.zzjlq, v22.zzjlp);
                        if ((((Boolean) com.google.android.gms.internal.zzchc.zzjac.get()).booleanValue()) && ("1".equals(this.zzjew.zzawv().zzam(v21.zzjgi.zzcn, "measurement.event_sampling_enabled")))) {
                            java.util.HashMap v23_1 = new java.util.HashMap();
                            java.util.HashMap v0_50 = new com.google.android.gms.internal.zzcmb[v22.zzjlp.length];
                            com.google.android.gms.internal.zzcmb[] v24 = v0_50;
                            Boolean v18 = 0;
                            java.security.SecureRandom v25 = this.zzawu().zzbaz();
                            com.google.android.gms.internal.zzcmb[] v26 = v22.zzjlp;
                            int v27 = v26.length;
                            int v20 = 0;
                            while (v20 < v27) {
                                com.google.android.gms.internal.zzcgw v2_213;
                                com.google.android.gms.internal.zzcmb v28 = v26[v20];
                                if (!v28.name.equals("_ep")) {
                                    int v19;
                                    if (com.google.android.gms.internal.zzcim.zza(v28, "_dbg", Long.valueOf(1))) {
                                        v19 = 1;
                                    } else {
                                        v19 = this.zzawv().zzap(v21.zzjgi.zzcn, v28.name);
                                    }
                                    if (v19 > 0) {
                                        com.google.android.gms.internal.zzcgw v3_91;
                                        com.google.android.gms.internal.zzcgw v2_199 = ((com.google.android.gms.internal.zzcgw) v23_1.get(v28.name));
                                        if (v2_199 != null) {
                                            v3_91 = v2_199;
                                        } else {
                                            v3_91 = this.zzaws().zzae(v21.zzjgi.zzcn, v28.name);
                                            if (v3_91 == null) {
                                                this.zzawy().zzazf().zze("Event being bundled has no eventAggregate. appId, eventName", v21.zzjgi.zzcn, v28.name);
                                                v3_91 = new com.google.android.gms.internal.zzcgw(v21.zzjgi.zzcn, v28.name, 1, 1, v28.zzjli.longValue(), 0, 0, 0, 0);
                                            }
                                        }
                                        String v4_84;
                                        this.zzawu();
                                        com.google.android.gms.internal.zzcgw v2_207 = ((Long) com.google.android.gms.internal.zzclq.zza(v28, "_eid"));
                                        if (v2_207 == null) {
                                            v4_84 = 0;
                                        } else {
                                            v4_84 = 1;
                                        }
                                        String v4_85 = Boolean.valueOf(v4_84);
                                        if (v19 != 1) {
                                            if (v25.nextInt(v19) != 0) {
                                                if (Math.abs((v28.zzjli.longValue() - v3_91.zzizn)) < 86400000) {
                                                    if (!v4_85.booleanValue()) {
                                                        v2_213 = v18;
                                                    } else {
                                                        v23_1.put(v28.name, v3_91.zza(v2_207, 0, 0));
                                                    }
                                                } else {
                                                    this.zzawu();
                                                    v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_efs", Long.valueOf(1));
                                                    this.zzawu();
                                                    v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_sr", Long.valueOf(((long) v19)));
                                                    v2_213 = (v18 + 1);
                                                    v24[v18] = v28;
                                                    if (v4_85.booleanValue()) {
                                                        v3_91 = v3_91.zza(0, Long.valueOf(((long) v19)), Boolean.valueOf(1));
                                                    }
                                                    v23_1.put(v28.name, v3_91.zzbc(v28.zzjli.longValue()));
                                                }
                                            } else {
                                                this.zzawu();
                                                v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_sr", Long.valueOf(((long) v19)));
                                                v2_213 = (v18 + 1);
                                                v24[v18] = v28;
                                                if (v4_85.booleanValue()) {
                                                    v3_91 = v3_91.zza(0, Long.valueOf(((long) v19)), 0);
                                                }
                                                v23_1.put(v28.name, v3_91.zzbc(v28.zzjli.longValue()));
                                            }
                                        } else {
                                            v2_213 = (v18 + 1);
                                            v24[v18] = v28;
                                            if ((v4_85.booleanValue()) && ((v3_91.zzizo != null) || ((v3_91.zzizp != null) || (v3_91.zzizq != null)))) {
                                                v23_1.put(v28.name, v3_91.zza(0, 0, 0));
                                            }
                                        }
                                    } else {
                                        this.zzawy().zzazf().zze("Sample rate must be positive. event, rate", v28.name, Integer.valueOf(v19));
                                        v2_213 = (v18 + 1);
                                        v24[v18] = v28;
                                    }
                                } else {
                                    this.zzawu();
                                    com.google.android.gms.internal.zzcgw v2_220 = ((String) com.google.android.gms.internal.zzclq.zza(v28, "_en"));
                                    com.google.android.gms.internal.zzcgw v3_101 = ((com.google.android.gms.internal.zzcgw) v23_1.get(v2_220));
                                    if (v3_101 == null) {
                                        v3_101 = this.zzaws().zzae(v21.zzjgi.zzcn, v2_220);
                                        v23_1.put(v2_220, v3_101);
                                    }
                                    if (v3_101.zzizo != null) {
                                    } else {
                                        if (v3_101.zzizp.longValue() > 1) {
                                            this.zzawu();
                                            v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_sr", v3_101.zzizp);
                                        }
                                        if ((v3_101.zzizq != null) && (v3_101.zzizq.booleanValue())) {
                                            this.zzawu();
                                            v28.zzjlh = com.google.android.gms.internal.zzclq.zza(v28.zzjlh, "_efs", Long.valueOf(1));
                                        }
                                        v2_213 = (v18 + 1);
                                        v24[v18] = v28;
                                    }
                                }
                                v20++;
                                v18 = v2_213;
                            }
                            if (v18 < v22.zzjlp.length) {
                                v22.zzjlp = ((com.google.android.gms.internal.zzcmb[]) java.util.Arrays.copyOf(v24, v18));
                            }
                            com.google.android.gms.internal.zzcgw v3_70 = v23_1.entrySet().iterator();
                            while (v3_70.hasNext()) {
                                this.zzaws().zza(((com.google.android.gms.internal.zzcgw) ((java.util.Map$Entry) v3_70.next()).getValue()));
                            }
                        }
                        v22.zzjls = Long.valueOf(nan);
                        v22.zzjlt = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcgw v2_152 = 0;
                        while (v2_152 < v22.zzjlp.length) {
                            com.google.android.gms.internal.zzcgw v3_83 = v22.zzjlp[v2_152];
                            if (v3_83.zzjli.longValue() < v22.zzjls.longValue()) {
                                v22.zzjls = v3_83.zzjli;
                            }
                            if (v3_83.zzjli.longValue() > v22.zzjlt.longValue()) {
                                v22.zzjlt = v3_83.zzjli;
                            }
                            v2_152++;
                        }
                        int v6_34 = v21.zzjgi.zzcn;
                        int v7_26 = this.zzaws().zzjb(v6_34);
                        if (v7_26 != 0) {
                            if (v22.zzjlp.length > 0) {
                                String v4_57;
                                com.google.android.gms.internal.zzcgw v2_157 = v7_26.zzaxf();
                                if (v2_157 == 0) {
                                    v4_57 = 0;
                                } else {
                                    v4_57 = Long.valueOf(v2_157);
                                }
                                v22.zzjlv = v4_57;
                                String v4_58 = v7_26.zzaxe();
                                if (v4_58 != 0) {
                                    v2_157 = v4_58;
                                }
                                com.google.android.gms.internal.zzcgw v2_158;
                                if (v2_157 == 0) {
                                    v2_158 = 0;
                                } else {
                                    v2_158 = Long.valueOf(v2_157);
                                }
                                v22.zzjlu = v2_158;
                                v7_26.zzaxo();
                                v22.zzjmg = Integer.valueOf(((int) v7_26.zzaxl()));
                                v7_26.zzal(v22.zzjls.longValue());
                                v7_26.zzam(v22.zzjlt.longValue());
                                v22.zzixw = v7_26.zzaxw();
                                this.zzaws().zza(v7_26);
                            }
                        } else {
                            this.zzawy().zzazd().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                        }
                        if (v22.zzjlp.length > 0) {
                            com.google.android.gms.internal.zzcgw v2_173 = this.zzawv().zzjs(v21.zzjgi.zzcn);
                            if ((v2_173 != null) && (v2_173.zzjkw != null)) {
                                v22.zzjmn = v2_173.zzjkw;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v21.zzjgi.zzixs)) {
                                    this.zzawy().zzazf().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzchm.zzjk(v21.zzjgi.zzcn));
                                } else {
                                    v22.zzjmn = Long.valueOf(-1);
                                }
                            }
                            this.zzaws().zza(v22, v17);
                        }
                        this.zzaws().zzah(v21.zzjgj);
                        com.google.android.gms.internal.zzcgw v3_79 = this.zzaws();
                        com.google.android.gms.internal.zzcgw v2_184 = v3_79.getWritableDatabase();
                        int v5_53 = new String[2];
                        v5_53[0] = v6_34;
                        v5_53[1] = v6_34;
                        v2_184.execSQL("delete from raw_events_metadata where app_id=? and metadata_fingerprint not in (select distinct metadata_fingerprint from raw_events where app_id=?)", v5_53);
                        this.zzaws().setTransactionSuccessful();
                        this.zzaws().endTransaction();
                        v2_114 = 1;
                    }
                    return v2_114;
                } else {
                    v3_50.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_31;
                if (v16_0 == -1) {
                    int v5_42 = new String[1];
                    v5_42[0] = 0;
                    v6_31 = v5_42;
                } else {
                    int v5_47 = new String[2];
                    v5_47[0] = 0;
                    v5_47[1] = String.valueOf(v16_0);
                    v6_31 = v5_47;
                }
                int v5_50;
                if (v16_0 == -1) {
                    v5_50 = "";
                } else {
                    v5_50 = " and rowid <= ?";
                }
                com.google.android.gms.internal.zzcgw v3_86 = v2_90.rawQuery(new StringBuilder((String.valueOf(v5_50).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_50).append(" order by rowid limit 1;").toString(), v6_31);
                if (v3_86.moveToFirst()) {
                    int v5_61 = v3_86.getString(0);
                    v3_86.close();
                    v13_0 = v5_61;
                    v12_0 = 0;
                } else {
                    if (v3_86 == null) {
                    } else {
                        v3_86.close();
                    }
                }
            } else {
                int v6_60;
                if (v16_0 == -1) {
                    int v5_74 = new String[1];
                    v5_74[0] = String.valueOf(p32);
                    v6_60 = v5_74;
                } else {
                    int v5_80 = new String[2];
                    v5_80[0] = String.valueOf(v16_0);
                    v5_80[1] = String.valueOf(p32);
                    v6_60 = v5_80;
                }
                int v5_3;
                if (v16_0 == -1) {
                    v5_3 = "";
                } else {
                    v5_3 = "rowid <= ? and ";
                }
                com.google.android.gms.internal.zzcgw v3_24 = v2_90.rawQuery(new StringBuilder((String.valueOf(v5_3).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_3).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_60);
                if (v3_24.moveToFirst()) {
                    String v4_30 = v3_24.getString(0);
                    int v5_28 = v3_24.getString(1);
                    v3_24.close();
                    v13_0 = v5_28;
                    v12_0 = v4_30;
                } else {
                    if (v3_24 == null) {
                    } else {
                        v3_24.close();
                    }
                }
            }
            try {
                String v4_38 = new String[1];
                v4_38[0] = "metadata";
                int v6_21 = new String[2];
                v6_21[0] = v12_0;
                v6_21[1] = v13_0;
                int v11_2 = v2_90.query("raw_events_metadata", v4_38, "app_id = ? and metadata_fingerprint = ?", v6_21, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcgw v2_91) {
                v3_50 = v11_2;
                if (v3_50 != null) {
                    v3_50.close();
                }
                throw v2_91;
            } catch (com.google.android.gms.internal.zzcgw v2_21) {
                v3_50 = v11_2;
                v4_0 = v12_0;
            }
            if (v11_2.moveToFirst()) {
                com.google.android.gms.internal.zzcgw v3_48 = v11_2.getBlob(0);
                com.google.android.gms.internal.zzcgw v3_49 = com.google.android.gms.internal.zzfjj.zzn(v3_48, 0, v3_48.length);
                String v4_41 = new com.google.android.gms.internal.zzcme();
                try {
                    v4_41.zza(v3_49);
                } catch (com.google.android.gms.internal.zzcgw v2_89) {
                    v14_1.zzawy().zzazd().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0), v2_89);
                    if (v11_2 == 0) {
                    } else {
                        v11_2.close();
                    }
                }
                if (v11_2.moveToNext()) {
                    v14_1.zzawy().zzazf().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0));
                }
                int v5_36;
                int v6_23;
                v11_2.close();
                v21.zzb(v4_41);
                if (v16_0 == -1) {
                    v5_36 = "app_id = ? and metadata_fingerprint = ?";
                    v6_23 = new String[2];
                    v6_23[0] = v12_0;
                    v6_23[1] = v13_0;
                } else {
                    v5_36 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_23 = new String[3];
                    v6_23[0] = v12_0;
                    v6_23[1] = v13_0;
                    v6_23[2] = String.valueOf(v16_0);
                }
                String v4_46 = new String[4];
                v4_46[0] = "rowid";
                v4_46[1] = "name";
                v4_46[2] = "timestamp";
                v4_46[3] = "data";
                v3_50 = v2_90.query("raw_events", v4_46, v5_36, v6_23, 0, 0, "rowid", 0);
                try {
                    if (!v3_50.moveToFirst()) {
                        v14_1.zzawy().zzazf().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0));
                        if (v3_50 == null) {
                        } else {
                            v3_50.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcgw v2_21) {
                    v4_0 = v12_0;
                }
                do {
                    String v4_47 = v3_50.getLong(0);
                    com.google.android.gms.internal.zzcgw v2_95 = v3_50.getBlob(3);
                    com.google.android.gms.internal.zzcgw v2_96 = com.google.android.gms.internal.zzfjj.zzn(v2_95, 0, v2_95.length);
                    int v6_27 = new com.google.android.gms.internal.zzcmb();
                    v6_27.zza(v2_96);
                    v6_27.name = v3_50.getString(1);
                    v6_27.zzjli = Long.valueOf(v3_50.getLong(2));
                    if (v21.zza(v4_47, v6_27)) {
                    } else {
                        if (v3_50 == null) {
                        } else {
                            v3_50.close();
                        }
                    }
                } while(v3_50.moveToNext());
                if (v3_50 == null) {
                } else {
                    v3_50.close();
                }
            } else {
                v14_1.zzawy().zzazd().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzchm.zzjk(v12_0));
                if (v11_2 == 0) {
                } else {
                    v11_2.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcgw v2_87) {
            this.zzaws().endTransaction();
            throw v2_87;
        }
    }

Method com.google.android.gms.internal.zzaqm.zza() calling method android.database.sqlite.SQLiteDatabase.query()


    private final boolean zza(android.database.sqlite.SQLiteDatabase p11, String p12)
    {
        int v9 = 0;
        try {
            com.google.android.gms.internal.zzaql v2_1 = new String[1];
            v2_1[0] = "name";
            String[] v4 = new String[1];
            v4[0] = p12;
            int v1_0 = p11.query("SQLITE_MASTER", v2_1, "name=?", v4, 0, 0, 0);
            try {
                int v0_4 = v1_0.moveToFirst();
            } catch (int v0_2) {
                this.zzdul.zzc("Error querying for table", p12, v0_2);
                if (v1_0 != 0) {
                    v1_0.close();
                }
                v0_4 = 0;
                return v0_4;
            }
            if (v1_0 == 0) {
                return v0_4;
            } else {
                v1_0.close();
                return v0_4;
            }
        } catch (int v0_3) {
            if (v9 != 0) {
                v9.close();
            }
            throw v0_3;
        } catch (int v0_2) {
            v1_0 = 0;
        } catch (int v0_3) {
            v9 = v1_0;
        }
    }