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.zzcci.a() calling method android.database.sqlite.SQLiteDatabase.update()


    protected final boolean a(String p17, byte[] p18, String p19)
    {
        int v2_7;
        this.t();
        this.zzug();
        com.google.android.gms.common.internal.zzbp.zzgf(p17);
        Object v5_0 = this.a(p17, p18);
        if (v5_0 != null) {
            this.a(p17, v5_0);
            this.d.put(p17, v5_0);
            this.e.put(p17, p19);
            this.a.put(p17, ark>com.google.android.gms.internal.zzcciark>.a(v5_0));
            long v6_0 = this.zzatx();
            String[] v7_0 = v5_0.zziyl;
            com.google.android.gms.common.internal.zzbp.zzu(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.fz v10_1 = v9_1.zzixg;
                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.zzcfr[] v12_1 = com.google.android.gms.measurement.AppMeasurement$Event.zzil(v2_4.zzixj);
                    if (v12_1 != null) {
                        v2_4.zzixj = v12_1;
                    }
                    com.google.android.gms.internal.zzcfr[] v12_2 = v2_4.zzixk;
                    int v13 = v12_2.length;
                    int v2_5 = 0;
                    while (v2_5 < v13) {
                        com.google.android.gms.internal.zzcfr v14 = v12_2[v2_5];
                        String v15_1 = com.google.android.gms.measurement.AppMeasurement$Param.zzil(v14.zzixr);
                        if (v15_1 != null) {
                            v14.zzixr = v15_1;
                        }
                        v2_5++;
                    }
                    v3_0++;
                }
                int v3_1 = v9_1.zzixf;
                int v9_0 = v3_1.length;
                int v2_2 = 0;
                while (v2_2 < v9_0) {
                    com.google.android.gms.internal.fz v10_0 = v3_1[v2_2];
                    String v11_2 = com.google.android.gms.measurement.AppMeasurement$UserProperty.zzil(v10_0.zzixy);
                    if (v11_2 != null) {
                        v10_0.zzixy = v11_2;
                    }
                    v2_2++;
                }
                v4_0++;
            }
            v6_0.zzaue().a(p17, v7_0);
            try {
                v5_0.zziyl = 0;
                int v2_14 = new byte[v5_0.zzbjo()];
                v5_0.zza(com.google.android.gms.internal.zzegg.zzi(v2_14, 0, v2_14.length));
                byte[] v18_1 = v2_14;
            } catch (int v2_15) {
                this.zzauk().zzaye().zze("Unable to serialize reduced-size config. Storing full config instead. appId", com.google.android.gms.internal.zzcbo.a(p17), v2_15);
            }
            int v3_7 = this.zzaue();
            com.google.android.gms.common.internal.zzbp.zzgf(p17);
            v3_7.zzug();
            v3_7.t();
            int v2_17 = new android.content.ContentValues();
            v2_17.put("remote_config", v18_1);
            try {
                String v4_4 = v3_7.e();
                String[] v7_2 = new String[1];
                v7_2[0] = p17;
            } catch (int v2_22) {
                v3_7.zzauk().zzayc().zze("Error storing remote config. appId", com.google.android.gms.internal.zzcbo.a(p17), v2_22);
                v2_7 = 1;
            }
            if (((long) v4_4.update("apps", v2_17, "app_id = ?", v7_2)) != 0) {
            } else {
                v3_7.zzauk().zzayc().zzj("Failed to update remote config (got 0). appId", com.google.android.gms.internal.zzcbo.a(p17));
            }
        } else {
            v2_7 = 0;
        }
        return v2_7;
    }

Method com.google.android.gms.internal.fz.h() calling method android.database.sqlite.SQLiteDatabase.update()


    protected final long h(String p13, String p14)
    {
        com.google.android.gms.common.internal.zzbp.zzgf(p13);
        com.google.android.gms.common.internal.zzbp.zzgf(p14);
        this.zzug();
        this.t();
        android.database.sqlite.SQLiteDatabase v6 = this.e();
        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.a(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.zzauk().zzayc().zzd("Error inserting column. appId", com.google.android.gms.internal.zzcbo.a(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.zzauk().zzayc().zze("Failed to insert column (got -1). appId", com.google.android.gms.internal.zzcbo.a(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.zzauk().zzayc().zze("Failed to update column (got 0). appId", com.google.android.gms.internal.zzcbo.a(p13), p14);
            v6.endTransaction();
            v0_1 = -1;
            return v0_1;
        }
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.update()


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

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public final com.google.android.gms.internal.zzcar a(long p12, String p14, boolean p15, boolean p16, boolean p17, boolean p18, boolean p19)
    {
        com.google.android.gms.common.internal.zzbp.zzgf(p14);
        this.zzug();
        this.t();
        String[] v10 = new String[1];
        v10[0] = p14;
        com.google.android.gms.internal.zzcar v8_1 = new com.google.android.gms.internal.zzcar();
        try {
            com.google.android.gms.internal.zzcar v0_1 = this.e();
            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.zzcar v0_2;
                if (v1_1.moveToFirst()) {
                    if (v1_1.getLong(0) == p12) {
                        v8_1.b = v1_1.getLong(1);
                        v8_1.a = v1_1.getLong(2);
                        v8_1.c = v1_1.getLong(3);
                        v8_1.d = v1_1.getLong(4);
                        v8_1.e = v1_1.getLong(5);
                    }
                    if (p15) {
                        v8_1.b = (v8_1.b + 1);
                    }
                    if (p16) {
                        v8_1.a = (v8_1.a + 1);
                    }
                    if (p17) {
                        v8_1.c = (v8_1.c + 1);
                    }
                    if (p18) {
                        v8_1.d = (v8_1.d + 1);
                    }
                    if (p19) {
                        v8_1.e = (v8_1.e + 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.a));
                    v2_3.put("daily_events_count", Long.valueOf(v8_1.b));
                    v2_3.put("daily_conversions_count", Long.valueOf(v8_1.c));
                    v2_3.put("daily_error_events_count", Long.valueOf(v8_1.d));
                    v2_3.put("daily_realtime_events_count", Long.valueOf(v8_1.e));
                    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.zzauk().zzaye().zzj("Not updating daily counts, app is not known. appId", com.google.android.gms.internal.zzcbo.a(p14));
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_2 = v8_1;
                    return v0_2;
                }
            } catch (com.google.android.gms.internal.zzcar v0_0) {
                this.zzauk().zzayc().zze("Error updating daily counts. appId", com.google.android.gms.internal.zzcbo.a(p14), v0_0);
                if (v1_1 != 0) {
                    v1_1.close();
                }
                v0_2 = v8_1;
                return v0_2;
            }
        } catch (com.google.android.gms.internal.zzcar v0_3) {
            v1_1 = 0;
            if (v1_1 != 0) {
                v1_1.close();
            }
            throw v0_3;
        } catch (com.google.android.gms.internal.zzcar v0_0) {
            v1_1 = 0;
        } catch (com.google.android.gms.internal.zzcar v0_3) {
        }
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.c() calling method android.database.sqlite.SQLiteDatabase.update()


    public void c(String p8, String p9)
    {
        android.database.sqlite.SQLiteDatabase v1 = this.a.getWritableDatabase();
        v1.beginTransaction();
        try {
            Object[] v3_8 = new String[2];
            v3_8[0] = p8;
            v3_8[1] = p9;
            int v4_2 = new Object[2];
            v4_2[0] = Integer.valueOf(v1.delete("records", "identity_id = ? AND dataset_name = ?", v3_8));
            v4_2[1] = p9;
            android.util.Log.i("SQLiteLocalStorage", String.format("%d records were deleted from dataset %s", v4_2));
            String v0_6 = new android.content.ContentValues();
            v0_6.put("last_modified_timestamp", Long.valueOf(System.currentTimeMillis()));
            v0_6.put("last_sync_count", String.valueOf(-1));
            int v4_5 = new String[2];
            v4_5[0] = p8;
            v4_5[1] = p9;
        } catch (String v0_10) {
            v1.endTransaction();
            throw v0_10;
        }
        if (v1.update("datasets", v0_6, "identity_id = ? AND dataset_name = ?", v4_5) == 1) {
            v1.setTransactionSuccessful();
        } else {
            Object[] v3_6 = new Object[1];
            v3_6[0] = p9;
            android.util.Log.e("SQLiteLocalStorage", String.format("couldn\'t mark dataset %s deleted", v3_6));
        }
        v1.endTransaction();
        return;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.a() calling method android.database.sqlite.SQLiteDatabase.update()


    boolean a(android.database.sqlite.SQLiteDatabase p9, String p10, String p11, String p12, String p13)
    {
        int v2 = 1;
        String[] v4_0 = this.b(p10, p11, p12);
        if ((v4_0 == null) || (!com.amazonaws.mobileconnectors.cognito.internal.util.StringUtils.a(v4_0.b(), p13))) {
            int v0_5;
            android.content.ContentValues v5_1 = new android.content.ContentValues();
            v5_1.put("identity_id", p10);
            v5_1.put("dataset_name", p11);
            v5_1.put("key", p12);
            v5_1.put("value", p13);
            v5_1.put("modified", Boolean.valueOf(1));
            if (v4_0 != null) {
                v0_5 = v4_0.c();
            } else {
                v0_5 = 0;
            }
            v5_1.put("sync_count", Long.valueOf(v0_5));
            v5_1.put("device_last_modified_timestamp", String.valueOf(new java.util.Date().getTime()));
            if (v4_0 != null) {
                String[] v4_2 = new String[3];
                v4_2[0] = p10;
                v4_2[1] = p11;
                v4_2[2] = p12;
                if (p9.update("records", v5_1, "identity_id = ? AND dataset_name = ? AND key = ?", v4_2) != 1) {
                    v2 = 0;
                }
            } else {
                int v0_14;
                if (p9.insert("records", 0, v5_1) == -1) {
                    v0_14 = 0;
                } else {
                    v0_14 = 1;
                }
                v2 = v0_14;
            }
        }
        return v2;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.a() calling method android.database.sqlite.SQLiteDatabase.update()


    public void a(String p10, String p11, long p12)
    {
        String v0_3 = this.a.getWritableDatabase();
        String v1_3 = new android.content.ContentValues();
        v1_3.put("last_sync_count", Long.valueOf(p12));
        v1_3.put("last_sync_timestamp", Long.valueOf(System.currentTimeMillis()));
        String[] v4_2 = new String[2];
        v4_2[0] = p10;
        v4_2[1] = p11;
        if (v0_3.update("datasets", v1_3, "identity_id = ? AND dataset_name = ?", v4_2) != 1) {
            Object[] v2_2 = new Object[1];
            v2_2[0] = p11;
            android.util.Log.e("SQLiteLocalStorage", String.format("failed to update last sync count of dataset %s", v2_2));
        }
        return;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.a() calling method android.database.sqlite.SQLiteDatabase.update()


    void a(android.database.sqlite.SQLiteDatabase p7, String p8, String p9)
    {
        String v0_3 = new android.content.ContentValues();
        v0_3.put("last_modified_timestamp", Long.valueOf(System.currentTimeMillis()));
        String[] v3_1 = new String[2];
        v3_1[0] = p8;
        v3_1[1] = p9;
        if (p7.update("datasets", v0_3, "identity_id = ? AND dataset_name = ?", v3_1) != 1) {
            Object[] v2_1 = new Object[1];
            v2_1[0] = p9;
            android.util.Log.w("SQLiteLocalStorage", String.format("failed to update last modified timestamp of dataset %s", v2_1));
        }
        return;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.a() calling method android.database.sqlite.SQLiteDatabase.replace()


    void a(android.database.sqlite.SQLiteDatabase p6, String p7, String p8, com.amazonaws.mobileconnectors.cognito.Record p9)
    {
        String v0_1 = new android.content.ContentValues();
        v0_1.put("identity_id", p7);
        v0_1.put("dataset_name", p8);
        v0_1.put("key", p9.a());
        v0_1.put("value", p9.b());
        v0_1.put("sync_count", Long.valueOf(p9.c()));
        v0_1.put("modified", Boolean.valueOf(p9.g()));
        v0_1.put("last_modified_by", p9.e());
        if (p9.d() != null) {
            v0_1.put("last_modified_timestamp", String.valueOf(p9.d().getTime()));
        }
        if (p9.f() != null) {
            v0_1.put("device_last_modified_timestamp", String.valueOf(p9.f().getTime()));
        }
        if (p6.replace("records", 0, v0_1) == -1) {
            Object[] v2_15 = new Object[3];
            v2_15[0] = p9.a();
            v2_15[1] = p9.b();
            v2_15[2] = p8;
            android.util.Log.e("SQLiteLocalStorage", String.format("failed to store record [%s: %s] into dataset %s", v2_15));
        }
        return;
    }

Method com.mixpanel.android.a.k.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public String[] a(ark>com.mixpanel.android.a.kark>$b p11, String p12, boolean p13)
    {
        String[] v1_0 = 0;
        ark>com.mixpanel.android.a.kark>$a v6_4 = p11.a();
        String v0_8 = this.f.getReadableDatabase();
        try {
            android.database.Cursor v2_1 = new StringBuffer(new StringBuilder().append("SELECT * FROM ").append(v6_4).append(" WHERE ").append("token").append(" = \'").append(p12).append("\' ").toString());
            String v3_10 = new StringBuffer(new StringBuilder().append("SELECT COUNT(*) FROM ").append(v6_4).append(" WHERE ").append("token").append(" = \'").append(p12).append("\' ").toString());
        } catch (String v0_6) {
            android.database.Cursor v4_17 = 0;
            this.f.close();
            if (v4_17 != null) {
                v4_17.close();
            }
            if (v1_0 != null) {
                v1_0.close();
            }
            throw v0_6;
        } catch (String v0_2) {
            android.database.Cursor v2_2 = 0;
            String v3_11 = 0;
            v4_17 = 0;
            com.mixpanel.android.util.e.e("MixpanelAPI.Database", new StringBuilder().append("Could not pull records for Mixpanel out of database ").append(v6_4).append(". Waiting to send.").toString(), v0_2);
            this.f.close();
            if (v4_17 != null) {
                v4_17.close();
            }
            if (v3_11 == null) {
                String v0_1 = 0;
                String v3_0 = 0;
            } else {
                v3_11.close();
                v0_1 = 0;
                v3_0 = 0;
            }
        } catch (String v0_6) {
            v1_0 = v3_11;
        }
        if (!p13) {
            v2_1.append("AND automatic_data = 0 ");
            v3_10.append(" AND automatic_data = 0");
        }
        v2_1.append("ORDER BY created_at ASC LIMIT 50");
        v4_17 = v0_8.rawQuery(v2_1.toString(), 0);
        try {
            v3_11 = v0_8.rawQuery(v3_10.toString(), 0);
            try {
                v3_11.moveToFirst();
                v2_2 = String.valueOf(v3_11.getInt(0));
                try {
                    String v0_12 = new org.json.JSONArray();
                    String v5_2 = 0;
                } catch (String v0_2) {
                }
                while (v4_17.moveToNext()) {
                    if (v4_17.isLast()) {
                        v5_2 = v4_17.getString(v4_17.getColumnIndex("_id"));
                    }
                    try {
                        v0_12.put(new org.json.JSONObject(v4_17.getString(v4_17.getColumnIndex("data"))));
                    } catch (org.json.JSONException v7) {
                    }
                }
                String v0_0;
                if (v0_12.length() <= 0) {
                    v0_0 = 0;
                } else {
                    v0_0 = v0_12.toString();
                }
                this.f.close();
                if (v4_17 != null) {
                    v4_17.close();
                }
                if (v3_11 == null) {
                    v3_0 = v0_0;
                    v0_1 = v5_2;
                    if ((v0_1 != null) && (v3_0 != null)) {
                        v1_0 = new String[3];
                        v1_0[0] = v0_1;
                        v1_0[1] = v3_0;
                        v1_0[2] = v2_2;
                    }
                    return v1_0;
                } else {
                    v3_11.close();
                    v3_0 = v0_0;
                    v0_1 = v5_2;
                }
            } catch (String v0_2) {
                v2_2 = 0;
            }
        } catch (String v0_6) {
        } catch (String v0_2) {
            v2_2 = 0;
            v3_11 = 0;
        }
    }

Method com.mixpanel.android.a.k.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public int a(org.json.JSONObject p9, String p10, ark>com.mixpanel.android.a.kark>$b p11, boolean p12)
    {
        Throwable v0_1;
        int v3 = 0;
        if (this.c()) {
            String v4_0 = p11.a();
            v0_1 = -1;
            try {
                ark>com.mixpanel.android.a.kark>$a v1_6 = this.f.getWritableDatabase();
                int v2_1 = new android.content.ContentValues();
                v2_1.put("data", p9.toString());
                v2_1.put("created_at", Long.valueOf(System.currentTimeMillis()));
                v2_1.put("automatic_data", Boolean.valueOf(p12));
                v2_1.put("token", p10);
                v1_6.insert(v4_0, 0, v2_1);
                int v2_10 = v1_6.rawQuery(new StringBuilder().append("SELECT COUNT(*) FROM ").append(v4_0).append(" WHERE token=\'").append(p10).append("\'").toString(), 0);
                try {
                    v2_10.moveToFirst();
                    v0_1 = v2_10.getInt(0);
                } catch (ark>com.mixpanel.android.a.kark>$a v1_0) {
                    com.mixpanel.android.util.e.e("MixpanelAPI.Database", new StringBuilder().append("Could not add Mixpanel data to table ").append(v4_0).append(". Re-initializing database.").toString(), v1_0);
                    if (v2_10 == 0) {
                        v3 = v2_10;
                    } else {
                        v2_10.close();
                    }
                    this.f.a();
                    if (v3 != 0) {
                        v3.close();
                    }
                    this.f.close();
                }
                if (v2_10 != 0) {
                    v2_10.close();
                }
                this.f.close();
            } catch (Throwable v0_2) {
                if (v3 != 0) {
                    v3.close();
                }
                this.f.close();
                throw v0_2;
            } catch (ark>com.mixpanel.android.a.kark>$a v1_0) {
                v2_10 = 0;
            } catch (Throwable v0_2) {
                v3 = v2_10;
            }
        } else {
            com.mixpanel.android.util.e.e("MixpanelAPI.Database", "There is not enough space left on the device to store Mixpanel data, so data was discarded");
            v0_1 = -2;
        }
        return v0_1;
    }

Method com.mixpanel.android.a.k$a.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private void a(android.database.sqlite.SQLiteDatabase p8)
    {
        p8.execSQL(new StringBuilder().append("ALTER TABLE ").append(com.mixpanel.android.a.k$b.a.a()).append(" ADD COLUMN ").append("automatic_data").append(" INTEGER DEFAULT 0").toString());
        p8.execSQL(new StringBuilder().append("ALTER TABLE ").append(com.mixpanel.android.a.k$b.b.a()).append(" ADD COLUMN ").append("automatic_data").append(" INTEGER DEFAULT 0").toString());
        p8.execSQL(new StringBuilder().append("ALTER TABLE ").append(com.mixpanel.android.a.k$b.a.a()).append(" ADD COLUMN ").append("token").append(" STRING NOT NULL DEFAULT \'\'").toString());
        p8.execSQL(new StringBuilder().append("ALTER TABLE ").append(com.mixpanel.android.a.k$b.b.a()).append(" ADD COLUMN ").append("token").append(" STRING NOT NULL DEFAULT \'\'").toString());
        android.database.Cursor v2_0 = p8.rawQuery(new StringBuilder().append("SELECT * FROM ").append(com.mixpanel.android.a.k$b.a.a()).toString(), 0);
        while (v2_0.moveToNext()) {
            try {
                org.json.JSONException v3_16 = new org.json.JSONObject(v2_0.getString(v2_0.getColumnIndex("data"))).getJSONObject("properties").getString("token");
                String v0_25 = v2_0.getInt(v2_0.getColumnIndex("_id"));
                try {
                    p8.execSQL(new StringBuilder().append("UPDATE ").append(com.mixpanel.android.a.k$b.a.a()).append(" SET ").append("token").append(" = \'").append(v3_16).append("\' WHERE _id = ").append(v0_25).toString());
                } catch (org.json.JSONException v3) {
                    p8.delete(com.mixpanel.android.a.k$b.a.a(), new StringBuilder().append("_id = ").append(v0_25).toString(), 0);
                }
            } catch (String v0) {
                v0_25 = 0;
            }
        }
        android.database.Cursor v2_5 = p8.rawQuery(new StringBuilder().append("SELECT * FROM ").append(com.mixpanel.android.a.k$b.b.a()).toString(), 0);
        while (v2_5.moveToNext()) {
            try {
                org.json.JSONException v3_4 = new org.json.JSONObject(v2_5.getString(v2_5.getColumnIndex("data"))).getString("$token");
                String v0_13 = v2_5.getInt(v2_5.getColumnIndex("_id"));
                try {
                    p8.execSQL(new StringBuilder().append("UPDATE ").append(com.mixpanel.android.a.k$b.b.a()).append(" SET ").append("token").append(" = \'").append(v3_4).append("\' WHERE _id = ").append(v0_13).toString());
                } catch (org.json.JSONException v3) {
                    p8.delete(com.mixpanel.android.a.k$b.b.a(), new StringBuilder().append("_id = ").append(v0_13).toString(), 0);
                }
            } catch (String v0) {
                v0_13 = 0;
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzcco.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final boolean a(String p21, long p22)
    {
        this.zzaue().b();
        try {
            ark>com.google.android.gms.internal.zzccoark>$a v15_1 = new ark>com.google.android.gms.internal.zzccoark>$a(this, 0);
            int v14_1 = this.zzaue();
            com.google.android.gms.internal.zzcfz v4_10 = 0;
            com.google.android.gms.internal.zzcgc v16_0 = this.J;
            com.google.android.gms.common.internal.zzbp.zzu(v15_1);
            v14_1.zzug();
            v14_1.t();
            int v3_4 = 0;
            try {
                com.google.android.gms.internal.zzcfz v13_1;
                String[] v12_1;
                com.google.android.gms.internal.zzcbq v2_3 = v14_1.e();
            } catch (com.google.android.gms.internal.zzcbq v2_1) {
                v14_1.zzauk().zzayc().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzcbo.a(v4_10), v2_1);
                if (v3_4 == 0) {
                    if ((v15_1.c != null) && (!v15_1.c.isEmpty())) {
                        com.google.android.gms.internal.zzcbq v2_24 = 0;
                    } else {
                        v2_24 = 1;
                    }
                    com.google.android.gms.internal.zzcbq v2_27;
                    if (v2_24 != null) {
                        this.zzaue().c();
                        this.zzaue().d();
                        v2_27 = 0;
                    } else {
                        com.google.android.gms.internal.zzcfz v13_0 = 0;
                        com.google.android.gms.internal.zzcgc v16_1 = v15_1.a;
                        com.google.android.gms.internal.zzcbq v2_30 = new com.google.android.gms.internal.zzcfz[v15_1.c.size()];
                        v16_1.zziza = v2_30;
                        String[] v12_0 = 0;
                        int v14_0 = 0;
                        while (v14_0 < v15_1.c.size()) {
                            int v3_72;
                            com.google.android.gms.internal.zzcbq v2_171;
                            if (!this.zzauh().b(v15_1.a.zzch, ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) {
                                com.google.android.gms.internal.zzcfz v4_71;
                                boolean v17 = this.zzauh().c(v15_1.a.zzch, ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name);
                                if (v17) {
                                    int v3_41 = 0;
                                    com.google.android.gms.internal.zzcfz v4_43 = 0;
                                    if (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys == null) {
                                        int v5_34 = new com.google.android.gms.internal.zzcga[0];
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v5_34;
                                    }
                                    int v6_20 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys;
                                    com.google.android.gms.internal.zzcga[] v7_27 = v6_20.length;
                                    int v5_35 = 0;
                                    while (v5_35 < v7_27) {
                                        com.google.android.gms.internal.zzcbq v2_173;
                                        com.google.android.gms.internal.zzcbq v2_172 = v6_20[v5_35];
                                        if (!"_c".equals(v2_172.name)) {
                                            if (!"_r".equals(v2_172.name)) {
                                                v2_173 = v4_43;
                                            } else {
                                                v2_172.zziyw = Long.valueOf(1);
                                                v2_173 = 1;
                                            }
                                        } else {
                                            v2_172.zziyw = Long.valueOf(1);
                                            v3_41 = 1;
                                            v2_173 = v4_43;
                                        }
                                        v5_35++;
                                        v4_43 = v2_173;
                                    }
                                    if ((v3_41 == 0) && (v17)) {
                                        this.zzauk().zzayi().zzj("Marking event as conversion", this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcbq v2_127 = ((com.google.android.gms.internal.zzcga[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys, (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys.length + 1)));
                                        int v3_46 = new com.google.android.gms.internal.zzcga();
                                        v3_46.name = "_c";
                                        v3_46.zziyw = Long.valueOf(1);
                                        v2_127[(v2_127.length - 1)] = v3_46;
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v2_127;
                                    }
                                    if (v4_43 == null) {
                                        this.zzauk().zzayi().zzj("Marking event as real-time", this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcbq v2_144 = ((com.google.android.gms.internal.zzcga[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys, (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys.length + 1)));
                                        int v3_53 = new com.google.android.gms.internal.zzcga();
                                        v3_53.name = "_r";
                                        v3_53.zziyw = Long.valueOf(1);
                                        v2_144[(v2_144.length - 1)] = v3_53;
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v2_144;
                                    }
                                    if (this.zzaue().a(this.l(), v15_1.a.zzch, 0, 0, 0, 0, 1).e <= ((long) this.c.zzis(v15_1.a.zzch))) {
                                        v13_0 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcbq v2_148 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                        int v3_62 = 0;
                                        while (v3_62 < v2_148.zziys.length) {
                                            if (!"_r".equals(v2_148.zziys[v3_62].name)) {
                                                v3_62++;
                                            } else {
                                                com.google.android.gms.internal.zzcfz v4_59 = new com.google.android.gms.internal.zzcga[(v2_148.zziys.length - 1)];
                                                if (v3_62 > 0) {
                                                    System.arraycopy(v2_148.zziys, 0, v4_59, 0, v3_62);
                                                }
                                                if (v3_62 < v4_59.length) {
                                                    System.arraycopy(v2_148.zziys, (v3_62 + 1), v4_59, v3_62, (v4_59.length - v3_62));
                                                }
                                                v2_148.zziys = v4_59;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzcfo.a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) || ((!v17) || (this.zzaue().a(this.l(), v15_1.a.zzch, 0, 0, 1, 0, 0).c <= ((long) this.c.zzb(v15_1.a.zzch, com.google.android.gms.internal.zzcbe.zziof))))) {
                                        v4_71 = v13_0;
                                    } else {
                                        this.zzauk().zzaye().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                        com.google.android.gms.internal.zzcbq v2_162 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                        int v5_57 = 0;
                                        com.google.android.gms.internal.zzcfz v4_67 = 0;
                                        com.google.android.gms.internal.zzcga[] v7_33 = v2_162.zziys;
                                        int v6_34 = 0;
                                        while (v6_34 < v7_33.length) {
                                            com.google.android.gms.internal.zzcfz v4_72;
                                            int v3_74 = v7_33[v6_34];
                                            if (!"_c".equals(v3_74.name)) {
                                                if (!"_err".equals(v3_74.name)) {
                                                    v3_74 = v4_67;
                                                    v4_72 = v5_57;
                                                } else {
                                                    v4_72 = 1;
                                                    v3_74 = v4_67;
                                                }
                                            } else {
                                                v4_72 = v5_57;
                                            }
                                            v6_34++;
                                            v5_57 = v4_72;
                                            v4_67 = v3_74;
                                        }
                                        if ((v5_57 == 0) || (v4_67 == null)) {
                                            if (v4_67 == null) {
                                                this.zzauk().zzayc().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                            } else {
                                                v4_67.name = "_err";
                                                v4_67.zziyw = Long.valueOf(10);
                                                v4_71 = v13_0;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcga[] v7_35 = new com.google.android.gms.internal.zzcga[(v2_162.zziys.length - 1)];
                                            int v5_58 = 0;
                                            com.google.android.gms.internal.zzcga[] v8_17 = v2_162.zziys;
                                            int v9_4 = v8_17.length;
                                            int v6_35 = 0;
                                            while (v6_35 < v9_4) {
                                                int v3_73;
                                                com.google.android.gms.internal.zzcga v10_4 = v8_17[v6_35];
                                                if (v10_4 == v4_67) {
                                                    v3_73 = v5_58;
                                                } else {
                                                    v3_73 = (v5_58 + 1);
                                                    v7_35[v5_58] = v10_4;
                                                }
                                                v6_35++;
                                                v5_58 = v3_73;
                                            }
                                            v2_162.zziys = v7_35;
                                            v4_71 = v13_0;
                                        }
                                    }
                                } else {
                                    this.zzaug();
                                    if (!com.google.android.gms.internal.zzcfo.f(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) {
                                    }
                                }
                                int v3_71 = (v12_0 + 1);
                                v16_1.zziza[v12_0] = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                v2_171 = v3_71;
                                v3_72 = v4_71;
                            } else {
                                com.google.android.gms.internal.zzcbq v2_187;
                                this.zzauk().zzaye().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch), this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                if ((!this.zzaug().d(v15_1.a.zzch)) && (!this.zzaug().e(v15_1.a.zzch))) {
                                    v2_187 = 0;
                                } else {
                                    v2_187 = 1;
                                }
                                if ((v2_187 != null) || ("_err".equals(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name))) {
                                    v2_171 = v12_0;
                                    v3_72 = v13_0;
                                } else {
                                    this.zzaug().zza(v15_1.a.zzch, 11, "_ev", ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name, 0);
                                    v2_171 = v12_0;
                                    v3_72 = v13_0;
                                }
                            }
                            v14_0++;
                            v12_0 = v2_171;
                            v13_0 = v3_72;
                        }
                        if (v12_0 < v15_1.c.size()) {
                            v16_1.zziza = ((com.google.android.gms.internal.zzcfz[]) java.util.Arrays.copyOf(v16_1.zziza, v12_0));
                        }
                        v16_1.zzizt = this.a(v15_1.a.zzch, v15_1.a.zzizb, v16_1.zziza);
                        v16_1.zzizd = Long.valueOf(nan);
                        v16_1.zzize = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcbq v2_46 = 0;
                        while (v2_46 < v16_1.zziza.length) {
                            int v3_37 = v16_1.zziza[v2_46];
                            if (v3_37.zziyt.longValue() < v16_1.zzizd.longValue()) {
                                v16_1.zzizd = v3_37.zziyt;
                            }
                            if (v3_37.zziyt.longValue() > v16_1.zzize.longValue()) {
                                v16_1.zzize = v3_37.zziyt;
                            }
                            v2_46++;
                        }
                        int v6_15 = v15_1.a.zzch;
                        com.google.android.gms.internal.zzcga[] v7_18 = this.zzaue().b(v6_15);
                        if (v7_18 != null) {
                            if (v16_1.zziza.length > 0) {
                                com.google.android.gms.internal.zzcfz v4_22;
                                com.google.android.gms.internal.zzcbq v2_52 = v7_18.h();
                                if (v2_52 == 0) {
                                    v4_22 = 0;
                                } else {
                                    v4_22 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizg = v4_22;
                                com.google.android.gms.internal.zzcfz v4_23 = v7_18.g();
                                if (v4_23 != 0) {
                                    v2_52 = v4_23;
                                }
                                com.google.android.gms.internal.zzcbq v2_53;
                                if (v2_52 == 0) {
                                    v2_53 = 0;
                                } else {
                                    v2_53 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizf = v2_53;
                                v7_18.r();
                                v16_1.zzizr = Integer.valueOf(((int) v7_18.o()));
                                v7_18.a(v16_1.zzizd.longValue());
                                v7_18.b(v16_1.zzize.longValue());
                                v16_1.zzilr = v7_18.z();
                                this.zzaue().a(v7_18);
                            }
                        } else {
                            this.zzauk().zzayc().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                        }
                        if (v16_1.zziza.length > 0) {
                            com.google.android.gms.internal.zzcap.zzawj();
                            com.google.android.gms.internal.zzcbq v2_68 = this.zzauh().a(v15_1.a.zzch);
                            if ((v2_68 != null) && (v2_68.zziyh != null)) {
                                v16_1.zzizx = v2_68.zziyh;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v15_1.a.zziln)) {
                                    this.zzauk().zzaye().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                } else {
                                    v16_1.zzizx = Long.valueOf(-1);
                                }
                            }
                            this.zzaue().a(v16_1, v13_0);
                        }
                        this.zzaue().a(v15_1.b);
                        int v3_32 = this.zzaue();
                        com.google.android.gms.internal.zzcbq v2_79 = v3_32.e();
                        int v5_29 = new String[2];
                        v5_29[0] = v6_15;
                        v5_29[1] = v6_15;
                        v2_79.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_29);
                        this.zzaue().c();
                        if (v16_1.zziza.length <= 0) {
                            v2_27 = 0;
                        } else {
                            v2_27 = 1;
                        }
                        this.zzaue().d();
                    }
                    return v2_27;
                } else {
                    v3_4.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_12;
                if (v16_0 == -1) {
                    int v5_20 = new String[1];
                    v5_20[0] = 0;
                    v6_12 = v5_20;
                } else {
                    int v5_25 = new String[2];
                    v5_25[0] = 0;
                    v5_25[1] = String.valueOf(v16_0);
                    v6_12 = v5_25;
                }
                int v5_27;
                if (v16_0 == -1) {
                    v5_27 = "";
                } else {
                    v5_27 = " and rowid <= ?";
                }
                int v3_44 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_27).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_27).append(" order by rowid limit 1;").toString(), v6_12);
                if (v3_44.moveToFirst()) {
                    int v5_45 = v3_44.getString(0);
                    v3_44.close();
                    v13_1 = v5_45;
                    v12_1 = 0;
                } else {
                    if (v3_44 == 0) {
                    } else {
                        v3_44.close();
                    }
                }
            } else {
                int v6_36;
                if (v16_0 == -1) {
                    int v5_56 = new String[1];
                    v5_56[0] = String.valueOf(p22);
                    v6_36 = v5_56;
                } else {
                    int v5_62 = new String[2];
                    v5_62[0] = String.valueOf(v16_0);
                    v5_62[1] = String.valueOf(p22);
                    v6_36 = v5_62;
                }
                int v5_1;
                if (v16_0 == -1) {
                    v5_1 = "";
                } else {
                    v5_1 = "rowid <= ? and ";
                }
                int v3_0 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_1).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_1).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_36);
                if (v3_0.moveToFirst()) {
                    com.google.android.gms.internal.zzcfz v4_1 = v3_0.getString(0);
                    int v5_8 = v3_0.getString(1);
                    v3_0.close();
                    v13_1 = v5_8;
                    v12_1 = v4_1;
                } else {
                    if (v3_0 == 0) {
                    } else {
                        v3_0.close();
                    }
                }
            }
            try {
                com.google.android.gms.internal.zzcfz v4_3 = new String[1];
                v4_3[0] = "metadata";
                int v6_2 = new String[2];
                v6_2[0] = v12_1;
                v6_2[1] = v13_1;
                int v11_0 = v2_3.query("raw_events_metadata", v4_3, "app_id = ? and metadata_fingerprint = ?", v6_2, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcbq v2_4) {
                v3_4 = v11_0;
                if (v3_4 != 0) {
                    v3_4.close();
                }
                throw v2_4;
            } catch (com.google.android.gms.internal.zzcbq v2_1) {
                v3_4 = v11_0;
                v4_10 = v12_1;
            }
            if (v11_0.moveToFirst()) {
                int v3_5 = v11_0.getBlob(0);
                int v3_6 = com.google.android.gms.internal.zzegf.zzh(v3_5, 0, v3_5.length);
                com.google.android.gms.internal.zzcfz v4_6 = new com.google.android.gms.internal.zzcgc();
                try {
                    v4_6.zza(v3_6);
                } catch (com.google.android.gms.internal.zzcbq v2_2) {
                    v14_1.zzauk().zzayc().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzcbo.a(v12_1), v2_2);
                    if (v11_0 == 0) {
                    } else {
                        v11_0.close();
                    }
                }
                if (v11_0.moveToNext()) {
                    v14_1.zzauk().zzaye().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                }
                int v5_15;
                int v6_4;
                v11_0.close();
                v15_1.a(v4_6);
                if (v16_0 == -1) {
                    v5_15 = "app_id = ? and metadata_fingerprint = ?";
                    v6_4 = new String[2];
                    v6_4[0] = v12_1;
                    v6_4[1] = v13_1;
                } else {
                    v5_15 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_4 = new String[3];
                    v6_4[0] = v12_1;
                    v6_4[1] = v13_1;
                    v6_4[2] = String.valueOf(v16_0);
                }
                com.google.android.gms.internal.zzcfz v4_12 = new String[4];
                v4_12[0] = "rowid";
                v4_12[1] = "name";
                v4_12[2] = "timestamp";
                v4_12[3] = "data";
                v3_4 = v2_3.query("raw_events", v4_12, v5_15, v6_4, 0, 0, "rowid", 0);
                try {
                    if (!v3_4.moveToFirst()) {
                        v14_1.zzauk().zzaye().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcbq v2_1) {
                    v4_10 = v12_1;
                }
                do {
                    com.google.android.gms.internal.zzcfz v4_13 = v3_4.getLong(0);
                    com.google.android.gms.internal.zzcbq v2_8 = v3_4.getBlob(3);
                    com.google.android.gms.internal.zzcbq v2_9 = com.google.android.gms.internal.zzegf.zzh(v2_8, 0, v2_8.length);
                    int v6_8 = new com.google.android.gms.internal.zzcfz();
                    v6_8.zza(v2_9);
                    v6_8.name = v3_4.getString(1);
                    v6_8.zziyt = Long.valueOf(v3_4.getLong(2));
                    if (v15_1.a(v4_13, v6_8)) {
                    } else {
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } while(v3_4.moveToNext());
                if (v3_4 == 0) {
                } else {
                    v3_4.close();
                }
            } else {
                v14_1.zzauk().zzayc().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                if (v11_0 == 0) {
                } else {
                    v11_0.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcbq v2_193) {
            this.zzaue().d();
            throw v2_193;
        }
    }

Method com.google.android.gms.internal.zzcco.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final boolean a(String p21, long p22)
    {
        this.zzaue().b();
        try {
            ark>com.google.android.gms.internal.zzccoark>$a v15_1 = new ark>com.google.android.gms.internal.zzccoark>$a(this, 0);
            int v14_1 = this.zzaue();
            com.google.android.gms.internal.zzcfz v4_10 = 0;
            com.google.android.gms.internal.zzcgc v16_0 = this.J;
            com.google.android.gms.common.internal.zzbp.zzu(v15_1);
            v14_1.zzug();
            v14_1.t();
            int v3_4 = 0;
            try {
                com.google.android.gms.internal.zzcfz v13_1;
                String[] v12_1;
                com.google.android.gms.internal.zzcbq v2_3 = v14_1.e();
            } catch (com.google.android.gms.internal.zzcbq v2_1) {
                v14_1.zzauk().zzayc().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzcbo.a(v4_10), v2_1);
                if (v3_4 == 0) {
                    if ((v15_1.c != null) && (!v15_1.c.isEmpty())) {
                        com.google.android.gms.internal.zzcbq v2_24 = 0;
                    } else {
                        v2_24 = 1;
                    }
                    com.google.android.gms.internal.zzcbq v2_27;
                    if (v2_24 != null) {
                        this.zzaue().c();
                        this.zzaue().d();
                        v2_27 = 0;
                    } else {
                        com.google.android.gms.internal.zzcfz v13_0 = 0;
                        com.google.android.gms.internal.zzcgc v16_1 = v15_1.a;
                        com.google.android.gms.internal.zzcbq v2_30 = new com.google.android.gms.internal.zzcfz[v15_1.c.size()];
                        v16_1.zziza = v2_30;
                        String[] v12_0 = 0;
                        int v14_0 = 0;
                        while (v14_0 < v15_1.c.size()) {
                            com.google.android.gms.internal.zzcbq v2_171;
                            int v3_72;
                            if (!this.zzauh().b(v15_1.a.zzch, ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) {
                                com.google.android.gms.internal.zzcfz v4_71;
                                boolean v17 = this.zzauh().c(v15_1.a.zzch, ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name);
                                if (v17) {
                                    int v3_41 = 0;
                                    com.google.android.gms.internal.zzcfz v4_43 = 0;
                                    if (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys == null) {
                                        int v5_34 = new com.google.android.gms.internal.zzcga[0];
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v5_34;
                                    }
                                    int v6_20 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys;
                                    com.google.android.gms.internal.zzcga[] v7_27 = v6_20.length;
                                    int v5_35 = 0;
                                    while (v5_35 < v7_27) {
                                        com.google.android.gms.internal.zzcbq v2_173;
                                        com.google.android.gms.internal.zzcbq v2_172 = v6_20[v5_35];
                                        if (!"_c".equals(v2_172.name)) {
                                            if (!"_r".equals(v2_172.name)) {
                                                v2_173 = v4_43;
                                            } else {
                                                v2_172.zziyw = Long.valueOf(1);
                                                v2_173 = 1;
                                            }
                                        } else {
                                            v2_172.zziyw = Long.valueOf(1);
                                            v3_41 = 1;
                                            v2_173 = v4_43;
                                        }
                                        v5_35++;
                                        v4_43 = v2_173;
                                    }
                                    if ((v3_41 == 0) && (v17)) {
                                        this.zzauk().zzayi().zzj("Marking event as conversion", this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcbq v2_127 = ((com.google.android.gms.internal.zzcga[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys, (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys.length + 1)));
                                        int v3_46 = new com.google.android.gms.internal.zzcga();
                                        v3_46.name = "_c";
                                        v3_46.zziyw = Long.valueOf(1);
                                        v2_127[(v2_127.length - 1)] = v3_46;
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v2_127;
                                    }
                                    if (v4_43 == null) {
                                        this.zzauk().zzayi().zzj("Marking event as real-time", this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcbq v2_144 = ((com.google.android.gms.internal.zzcga[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys, (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys.length + 1)));
                                        int v3_53 = new com.google.android.gms.internal.zzcga();
                                        v3_53.name = "_r";
                                        v3_53.zziyw = Long.valueOf(1);
                                        v2_144[(v2_144.length - 1)] = v3_53;
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v2_144;
                                    }
                                    if (this.zzaue().a(this.l(), v15_1.a.zzch, 0, 0, 0, 0, 1).e <= ((long) this.c.zzis(v15_1.a.zzch))) {
                                        v13_0 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcbq v2_148 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                        int v3_62 = 0;
                                        while (v3_62 < v2_148.zziys.length) {
                                            if (!"_r".equals(v2_148.zziys[v3_62].name)) {
                                                v3_62++;
                                            } else {
                                                com.google.android.gms.internal.zzcfz v4_59 = new com.google.android.gms.internal.zzcga[(v2_148.zziys.length - 1)];
                                                if (v3_62 > 0) {
                                                    System.arraycopy(v2_148.zziys, 0, v4_59, 0, v3_62);
                                                }
                                                if (v3_62 < v4_59.length) {
                                                    System.arraycopy(v2_148.zziys, (v3_62 + 1), v4_59, v3_62, (v4_59.length - v3_62));
                                                }
                                                v2_148.zziys = v4_59;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzcfo.a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) || ((!v17) || (this.zzaue().a(this.l(), v15_1.a.zzch, 0, 0, 1, 0, 0).c <= ((long) this.c.zzb(v15_1.a.zzch, com.google.android.gms.internal.zzcbe.zziof))))) {
                                        v4_71 = v13_0;
                                    } else {
                                        this.zzauk().zzaye().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                        com.google.android.gms.internal.zzcbq v2_162 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                        int v5_57 = 0;
                                        com.google.android.gms.internal.zzcfz v4_67 = 0;
                                        com.google.android.gms.internal.zzcga[] v7_33 = v2_162.zziys;
                                        int v6_34 = 0;
                                        while (v6_34 < v7_33.length) {
                                            com.google.android.gms.internal.zzcfz v4_72;
                                            int v3_74 = v7_33[v6_34];
                                            if (!"_c".equals(v3_74.name)) {
                                                if (!"_err".equals(v3_74.name)) {
                                                    v3_74 = v4_67;
                                                    v4_72 = v5_57;
                                                } else {
                                                    v4_72 = 1;
                                                    v3_74 = v4_67;
                                                }
                                            } else {
                                                v4_72 = v5_57;
                                            }
                                            v6_34++;
                                            v5_57 = v4_72;
                                            v4_67 = v3_74;
                                        }
                                        if ((v5_57 == 0) || (v4_67 == null)) {
                                            if (v4_67 == null) {
                                                this.zzauk().zzayc().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                            } else {
                                                v4_67.name = "_err";
                                                v4_67.zziyw = Long.valueOf(10);
                                                v4_71 = v13_0;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcga[] v7_35 = new com.google.android.gms.internal.zzcga[(v2_162.zziys.length - 1)];
                                            int v5_58 = 0;
                                            com.google.android.gms.internal.zzcga[] v8_17 = v2_162.zziys;
                                            int v9_4 = v8_17.length;
                                            int v6_35 = 0;
                                            while (v6_35 < v9_4) {
                                                int v3_73;
                                                com.google.android.gms.internal.zzcga v10_4 = v8_17[v6_35];
                                                if (v10_4 == v4_67) {
                                                    v3_73 = v5_58;
                                                } else {
                                                    v3_73 = (v5_58 + 1);
                                                    v7_35[v5_58] = v10_4;
                                                }
                                                v6_35++;
                                                v5_58 = v3_73;
                                            }
                                            v2_162.zziys = v7_35;
                                            v4_71 = v13_0;
                                        }
                                    }
                                } else {
                                    this.zzaug();
                                    if (!com.google.android.gms.internal.zzcfo.f(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) {
                                    }
                                }
                                int v3_71 = (v12_0 + 1);
                                v16_1.zziza[v12_0] = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                v2_171 = v3_71;
                                v3_72 = v4_71;
                            } else {
                                com.google.android.gms.internal.zzcbq v2_187;
                                this.zzauk().zzaye().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch), this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                if ((!this.zzaug().d(v15_1.a.zzch)) && (!this.zzaug().e(v15_1.a.zzch))) {
                                    v2_187 = 0;
                                } else {
                                    v2_187 = 1;
                                }
                                if ((v2_187 != null) || ("_err".equals(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name))) {
                                    v2_171 = v12_0;
                                    v3_72 = v13_0;
                                } else {
                                    this.zzaug().zza(v15_1.a.zzch, 11, "_ev", ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name, 0);
                                    v2_171 = v12_0;
                                    v3_72 = v13_0;
                                }
                            }
                            v14_0++;
                            v12_0 = v2_171;
                            v13_0 = v3_72;
                        }
                        if (v12_0 < v15_1.c.size()) {
                            v16_1.zziza = ((com.google.android.gms.internal.zzcfz[]) java.util.Arrays.copyOf(v16_1.zziza, v12_0));
                        }
                        v16_1.zzizt = this.a(v15_1.a.zzch, v15_1.a.zzizb, v16_1.zziza);
                        v16_1.zzizd = Long.valueOf(nan);
                        v16_1.zzize = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcbq v2_46 = 0;
                        while (v2_46 < v16_1.zziza.length) {
                            int v3_37 = v16_1.zziza[v2_46];
                            if (v3_37.zziyt.longValue() < v16_1.zzizd.longValue()) {
                                v16_1.zzizd = v3_37.zziyt;
                            }
                            if (v3_37.zziyt.longValue() > v16_1.zzize.longValue()) {
                                v16_1.zzize = v3_37.zziyt;
                            }
                            v2_46++;
                        }
                        int v6_15 = v15_1.a.zzch;
                        com.google.android.gms.internal.zzcga[] v7_18 = this.zzaue().b(v6_15);
                        if (v7_18 != null) {
                            if (v16_1.zziza.length > 0) {
                                com.google.android.gms.internal.zzcfz v4_22;
                                com.google.android.gms.internal.zzcbq v2_52 = v7_18.h();
                                if (v2_52 == 0) {
                                    v4_22 = 0;
                                } else {
                                    v4_22 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizg = v4_22;
                                com.google.android.gms.internal.zzcfz v4_23 = v7_18.g();
                                if (v4_23 != 0) {
                                    v2_52 = v4_23;
                                }
                                com.google.android.gms.internal.zzcbq v2_53;
                                if (v2_52 == 0) {
                                    v2_53 = 0;
                                } else {
                                    v2_53 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizf = v2_53;
                                v7_18.r();
                                v16_1.zzizr = Integer.valueOf(((int) v7_18.o()));
                                v7_18.a(v16_1.zzizd.longValue());
                                v7_18.b(v16_1.zzize.longValue());
                                v16_1.zzilr = v7_18.z();
                                this.zzaue().a(v7_18);
                            }
                        } else {
                            this.zzauk().zzayc().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                        }
                        if (v16_1.zziza.length > 0) {
                            com.google.android.gms.internal.zzcap.zzawj();
                            com.google.android.gms.internal.zzcbq v2_68 = this.zzauh().a(v15_1.a.zzch);
                            if ((v2_68 != null) && (v2_68.zziyh != null)) {
                                v16_1.zzizx = v2_68.zziyh;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v15_1.a.zziln)) {
                                    this.zzauk().zzaye().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                } else {
                                    v16_1.zzizx = Long.valueOf(-1);
                                }
                            }
                            this.zzaue().a(v16_1, v13_0);
                        }
                        this.zzaue().a(v15_1.b);
                        int v3_32 = this.zzaue();
                        com.google.android.gms.internal.zzcbq v2_79 = v3_32.e();
                        int v5_29 = new String[2];
                        v5_29[0] = v6_15;
                        v5_29[1] = v6_15;
                        v2_79.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_29);
                        this.zzaue().c();
                        if (v16_1.zziza.length <= 0) {
                            v2_27 = 0;
                        } else {
                            v2_27 = 1;
                        }
                        this.zzaue().d();
                    }
                    return v2_27;
                } else {
                    v3_4.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_12;
                if (v16_0 == -1) {
                    int v5_20 = new String[1];
                    v5_20[0] = 0;
                    v6_12 = v5_20;
                } else {
                    int v5_25 = new String[2];
                    v5_25[0] = 0;
                    v5_25[1] = String.valueOf(v16_0);
                    v6_12 = v5_25;
                }
                int v5_27;
                if (v16_0 == -1) {
                    v5_27 = "";
                } else {
                    v5_27 = " and rowid <= ?";
                }
                int v3_44 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_27).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_27).append(" order by rowid limit 1;").toString(), v6_12);
                if (v3_44.moveToFirst()) {
                    int v5_45 = v3_44.getString(0);
                    v3_44.close();
                    v13_1 = v5_45;
                    v12_1 = 0;
                } else {
                    if (v3_44 == 0) {
                    } else {
                        v3_44.close();
                    }
                }
            } else {
                int v6_36;
                if (v16_0 == -1) {
                    int v5_56 = new String[1];
                    v5_56[0] = String.valueOf(p22);
                    v6_36 = v5_56;
                } else {
                    int v5_62 = new String[2];
                    v5_62[0] = String.valueOf(v16_0);
                    v5_62[1] = String.valueOf(p22);
                    v6_36 = v5_62;
                }
                int v5_1;
                if (v16_0 == -1) {
                    v5_1 = "";
                } else {
                    v5_1 = "rowid <= ? and ";
                }
                int v3_0 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_1).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_1).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_36);
                if (v3_0.moveToFirst()) {
                    com.google.android.gms.internal.zzcfz v4_1 = v3_0.getString(0);
                    int v5_8 = v3_0.getString(1);
                    v3_0.close();
                    v13_1 = v5_8;
                    v12_1 = v4_1;
                } else {
                    if (v3_0 == 0) {
                    } else {
                        v3_0.close();
                    }
                }
            }
            try {
                com.google.android.gms.internal.zzcfz v4_3 = new String[1];
                v4_3[0] = "metadata";
                int v6_2 = new String[2];
                v6_2[0] = v12_1;
                v6_2[1] = v13_1;
                int v11_0 = v2_3.query("raw_events_metadata", v4_3, "app_id = ? and metadata_fingerprint = ?", v6_2, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcbq v2_4) {
                v3_4 = v11_0;
                if (v3_4 != 0) {
                    v3_4.close();
                }
                throw v2_4;
            } catch (com.google.android.gms.internal.zzcbq v2_1) {
                v3_4 = v11_0;
                v4_10 = v12_1;
            }
            if (v11_0.moveToFirst()) {
                int v3_5 = v11_0.getBlob(0);
                int v3_6 = com.google.android.gms.internal.zzegf.zzh(v3_5, 0, v3_5.length);
                com.google.android.gms.internal.zzcfz v4_6 = new com.google.android.gms.internal.zzcgc();
                try {
                    v4_6.zza(v3_6);
                } catch (com.google.android.gms.internal.zzcbq v2_2) {
                    v14_1.zzauk().zzayc().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzcbo.a(v12_1), v2_2);
                    if (v11_0 == 0) {
                    } else {
                        v11_0.close();
                    }
                }
                if (v11_0.moveToNext()) {
                    v14_1.zzauk().zzaye().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                }
                int v5_15;
                int v6_4;
                v11_0.close();
                v15_1.a(v4_6);
                if (v16_0 == -1) {
                    v5_15 = "app_id = ? and metadata_fingerprint = ?";
                    v6_4 = new String[2];
                    v6_4[0] = v12_1;
                    v6_4[1] = v13_1;
                } else {
                    v5_15 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_4 = new String[3];
                    v6_4[0] = v12_1;
                    v6_4[1] = v13_1;
                    v6_4[2] = String.valueOf(v16_0);
                }
                com.google.android.gms.internal.zzcfz v4_12 = new String[4];
                v4_12[0] = "rowid";
                v4_12[1] = "name";
                v4_12[2] = "timestamp";
                v4_12[3] = "data";
                v3_4 = v2_3.query("raw_events", v4_12, v5_15, v6_4, 0, 0, "rowid", 0);
                try {
                    if (!v3_4.moveToFirst()) {
                        v14_1.zzauk().zzaye().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcbq v2_1) {
                    v4_10 = v12_1;
                }
                do {
                    com.google.android.gms.internal.zzcfz v4_13 = v3_4.getLong(0);
                    com.google.android.gms.internal.zzcbq v2_8 = v3_4.getBlob(3);
                    com.google.android.gms.internal.zzcbq v2_9 = com.google.android.gms.internal.zzegf.zzh(v2_8, 0, v2_8.length);
                    int v6_8 = new com.google.android.gms.internal.zzcfz();
                    v6_8.zza(v2_9);
                    v6_8.name = v3_4.getString(1);
                    v6_8.zziyt = Long.valueOf(v3_4.getLong(2));
                    if (v15_1.a(v4_13, v6_8)) {
                    } else {
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } while(v3_4.moveToNext());
                if (v3_4 == 0) {
                } else {
                    v3_4.close();
                }
            } else {
                v14_1.zzauk().zzayc().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                if (v11_0 == 0) {
                } else {
                    v11_0.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcbq v2_193) {
            this.zzaue().d();
            throw v2_193;
        }
    }

Method com.google.android.gms.internal.zzcbk.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final boolean a(int p14, byte[] p15)
    {
        int v0_3;
        this.zzatu();
        this.zzug();
        if (!this.b) {
            android.content.ContentValues v7_1 = new android.content.ContentValues();
            v7_1.put("type", Integer.valueOf(p14));
            v7_1.put("entry", p15);
            com.google.android.gms.internal.zzcap.zzaws();
            int v6 = 0;
            int v0_1 = 5;
            while (v6 < 5) {
                android.database.Cursor v2 = 0;
                try {
                    android.database.sqlite.SQLiteDatabase v3 = this.b();
                } catch (com.google.android.gms.internal.zzcbq v1_1) {
                    this.zzauk().zzayc().zzj("Error writing entry to local database", v1_1);
                    this.b = 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_3 = 1;
                } catch (com.google.android.gms.internal.zzcbq v1_21) {
                    if (android.os.Build$VERSION.SDK_INT < 11) {
                        if (v3 != null) {
                            if (v3.inTransaction()) {
                                v3.endTransaction();
                            }
                        }
                        this.zzauk().zzayc().zzj("Error writing entry to local database", v1_21);
                        this.b = 1;
                    } else {
                        if (!(v1_21 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_2) {
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    throw v0_2;
                }
                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.zzauk().zzayc().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.zzauk().zzayc().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.b = 1;
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_3 = 0;
                }
            }
            this.zzauk().zzaye().log("Failed to write entry to local database");
            v0_3 = 0;
        } else {
            v0_3 = 0;
        }
        return v0_3;
    }

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


    public final void onOpen(android.database.sqlite.SQLiteDatabase p7)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            com.google.android.gms.internal.zzcbo v0_4 = p7.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_4.moveToFirst();
                v0_4.close();
            } catch (Throwable v1_2) {
                v0_4.close();
                throw v1_2;
            }
        }
        com.google.android.gms.internal.fz.a(this.a.zzauk(), 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.gb.onOpen() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final void onOpen(android.database.sqlite.SQLiteDatabase p13)
    {
        if (android.os.Build$VERSION.SDK_INT < 15) {
            com.google.android.gms.internal.zzcbo v0_12 = p13.rawQuery("PRAGMA journal_mode=memory", 0);
            try {
                v0_12.moveToFirst();
                v0_12.close();
            } catch (Throwable v1_6) {
                v0_12.close();
                throw v1_6;
            }
        }
        com.google.android.gms.internal.fz.a(this.a.zzauk(), p13, "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", 0);
        com.google.android.gms.internal.fz.a(this.a.zzauk(), p13, "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.fz.a(this.a.zzauk(), p13, "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.fz.n());
        com.google.android.gms.internal.fz.a(this.a.zzauk(), p13, "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.fz.o());
        com.google.android.gms.internal.fz.a(this.a.zzauk(), p13, "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.fz.p());
        com.google.android.gms.internal.fz.a(this.a.zzauk(), p13, "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.fz.a(this.a.zzauk(), p13, "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.fz.q());
        com.google.android.gms.internal.fz.a(this.a.zzauk(), p13, "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.fz.a(this.a.zzauk(), p13, "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.fz.a(this.a.zzauk(), p13, "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.fz.a(this.a.zzauk(), p13, "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.fz.r());
        return;
    }

Method com.google.android.gms.internal.fz.m() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final long m()
    {
        long v0_0 = -1;
        try {
            android.database.Cursor v3 = this.e().rawQuery("select rowid from raw_events order by rowid desc limit 1;", 0);
        } catch (int v2_1) {
            this.zzauk().zzayc().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.fz.f() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final String f()
    {
        String v0_0 = 0;
        try {
            Throwable v2_0 = this.e().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.zzauk().zzayc().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.fz.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    public final String a(long p8)
    {
        String v0_0 = 0;
        this.zzug();
        this.t();
        try {
            int v1_4 = this.e();
            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.zzauk().zzayi().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.zzauk().zzayc().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.fz.b() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long b(String p5, String[] p6)
    {
        try {
            android.database.Cursor v1 = this.e().rawQuery(p5, p6);
        } catch (android.database.sqlite.SQLiteException v0_2) {
            this.zzauk().zzayc().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.zzcbq v2_2 = v1.getLong(0);
            if (v1 != null) {
                v1.close();
            }
            return v2_2;
        }
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private static java.util.Set a(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.fz.a() calling method android.database.sqlite.SQLiteDatabase.rawQuery()


    private final long a(String p6, String[] p7, long p8)
    {
        try {
            android.database.Cursor v1 = this.e().rawQuery(p6, p7);
        } catch (int v0_4) {
            this.zzauk().zzayc().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 io.fabric.sdk.android.d.openOrCreateDatabase() calling method android.database.sqlite.SQLiteDatabase.openOrCreateDatabase()


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

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


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

Method com.google.android.gms.internal.zzcbk.a() calling method android.database.sqlite.SQLiteDatabase.insertOrThrow()


    private final boolean a(int p14, byte[] p15)
    {
        int v0_3;
        this.zzatu();
        this.zzug();
        if (!this.b) {
            android.content.ContentValues v7_1 = new android.content.ContentValues();
            v7_1.put("type", Integer.valueOf(p14));
            v7_1.put("entry", p15);
            com.google.android.gms.internal.zzcap.zzaws();
            int v6 = 0;
            int v0_1 = 5;
            while (v6 < 5) {
                android.database.Cursor v2 = 0;
                try {
                    android.database.sqlite.SQLiteDatabase v3 = this.b();
                } catch (com.google.android.gms.internal.zzcbq v1_1) {
                    this.zzauk().zzayc().zzj("Error writing entry to local database", v1_1);
                    this.b = 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_3 = 1;
                } catch (com.google.android.gms.internal.zzcbq v1_21) {
                    if (android.os.Build$VERSION.SDK_INT < 11) {
                        if (v3 != null) {
                            if (v3.inTransaction()) {
                                v3.endTransaction();
                            }
                        }
                        this.zzauk().zzayc().zzj("Error writing entry to local database", v1_21);
                        this.b = 1;
                    } else {
                        if (!(v1_21 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_2) {
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    throw v0_2;
                }
                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.zzauk().zzayc().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.zzauk().zzayc().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.b = 1;
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_3 = 0;
                }
            }
            this.zzauk().zzaye().log("Failed to write entry to local database");
            v0_3 = 0;
        } else {
            v0_3 = 0;
        }
        return v0_3;
    }

Method com.mixpanel.android.a.k.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public int a(org.json.JSONObject p9, String p10, ark>com.mixpanel.android.a.kark>$b p11, boolean p12)
    {
        Throwable v0_1;
        int v3 = 0;
        if (this.c()) {
            String v4_0 = p11.a();
            v0_1 = -1;
            try {
                ark>com.mixpanel.android.a.kark>$a v1_6 = this.f.getWritableDatabase();
                int v2_1 = new android.content.ContentValues();
                v2_1.put("data", p9.toString());
                v2_1.put("created_at", Long.valueOf(System.currentTimeMillis()));
                v2_1.put("automatic_data", Boolean.valueOf(p12));
                v2_1.put("token", p10);
                v1_6.insert(v4_0, 0, v2_1);
                int v2_10 = v1_6.rawQuery(new StringBuilder().append("SELECT COUNT(*) FROM ").append(v4_0).append(" WHERE token=\'").append(p10).append("\'").toString(), 0);
                try {
                    v2_10.moveToFirst();
                    v0_1 = v2_10.getInt(0);
                } catch (ark>com.mixpanel.android.a.kark>$a v1_0) {
                    com.mixpanel.android.util.e.e("MixpanelAPI.Database", new StringBuilder().append("Could not add Mixpanel data to table ").append(v4_0).append(". Re-initializing database.").toString(), v1_0);
                    if (v2_10 == 0) {
                        v3 = v2_10;
                    } else {
                        v2_10.close();
                    }
                    this.f.a();
                    if (v3 != 0) {
                        v3.close();
                    }
                    this.f.close();
                }
                if (v2_10 != 0) {
                    v2_10.close();
                }
                this.f.close();
            } catch (Throwable v0_2) {
                if (v3 != 0) {
                    v3.close();
                }
                this.f.close();
                throw v0_2;
            } catch (ark>com.mixpanel.android.a.kark>$a v1_0) {
                v2_10 = 0;
            } catch (Throwable v0_2) {
                v3 = v2_10;
            }
        } else {
            com.mixpanel.android.util.e.e("MixpanelAPI.Database", "There is not enough space left on the device to store Mixpanel data, so data was discarded");
            v0_1 = -2;
        }
        return v0_1;
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final boolean a(com.google.android.gms.internal.zzcgc p11, boolean p12)
    {
        String v2 = 0;
        this.zzug();
        this.t();
        com.google.android.gms.common.internal.zzbp.zzu(p11);
        com.google.android.gms.common.internal.zzbp.zzgf(p11.zzch);
        com.google.android.gms.common.internal.zzbp.zzu(p11.zzize);
        this.h();
        Object v4_2 = this.zzvu().currentTimeMillis();
        if ((p11.zzize.longValue() < (v4_2 - com.google.android.gms.internal.zzcap.zzawl())) || (p11.zzize.longValue() > (com.google.android.gms.internal.zzcap.zzawl() + v4_2))) {
            this.zzauk().zzaye().zzd("Storing bundle outside of the max uploading time span. appId, now, timestamp", com.google.android.gms.internal.zzcbo.a(p11.zzch), Long.valueOf(v4_2), p11.zzize);
        }
        try {
            com.google.android.gms.internal.zzcbq v0_16;
            com.google.android.gms.internal.zzcbq v0_11 = new byte[p11.zzbjo()];
            Object v3_5 = com.google.android.gms.internal.zzegg.zzi(v0_11, 0, v0_11.length);
            p11.zza(v3_5);
            v3_5.zzccd();
            com.google.android.gms.internal.zzcbq v0_13 = this.zzaug().zzo(v0_11);
            this.zzauk().zzayi().zzj("Saving bundle, size", Integer.valueOf(v0_13.length));
            Object v3_10 = new android.content.ContentValues();
            v3_10.put("app_id", p11.zzch);
            v3_10.put("bundle_end_timestamp", p11.zzize);
            v3_10.put("data", v0_13);
        } catch (com.google.android.gms.internal.zzcbq v0_15) {
            this.zzauk().zzayc().zze("Data loss. Failed to serialize bundle. appId", com.google.android.gms.internal.zzcbo.a(p11.zzch), 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.e().insert("queue", 0, v3_10) != -1) {
                v2 = 1;
                return v2;
            } else {
                this.zzauk().zzayc().zzj("Failed to insert bundle (got -1). appId", com.google.android.gms.internal.zzcbo.a(p11.zzch));
                return v2;
            }
        } catch (com.google.android.gms.internal.zzcbq v0_3) {
            this.zzauk().zzayc().zze("Error storing bundle. appId", com.google.android.gms.internal.zzcbo.a(p11.zzch), v0_3);
            return v2;
        }
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    public final boolean a(com.google.android.gms.internal.zzcax p11, long p12, boolean p14)
    {
        Object v2 = 0;
        this.zzug();
        this.t();
        com.google.android.gms.common.internal.zzbp.zzu(p11);
        com.google.android.gms.common.internal.zzbp.zzgf(p11.a);
        int v5_7 = new com.google.android.gms.internal.zzcfz();
        v5_7.zziyu = Long.valueOf(p11.d);
        com.google.android.gms.internal.zzcbq v0_7 = new com.google.android.gms.internal.zzcga[p11.e.size()];
        v5_7.zziys = v0_7;
        long v6_0 = p11.e.iterator();
        String v1_4 = 0;
        while (v6_0.hasNext()) {
            com.google.android.gms.internal.zzcbq v0_3 = ((String) v6_0.next());
            com.google.android.gms.internal.zzcga v7_1 = new com.google.android.gms.internal.zzcga();
            Object v3_2 = (v1_4 + 1);
            v5_7.zziys[v1_4] = v7_1;
            v7_1.name = v0_3;
            this.zzaug().zza(v7_1, p11.e.a(v0_3));
            v1_4 = v3_2;
        }
        try {
            com.google.android.gms.internal.zzcbq v0_14;
            com.google.android.gms.internal.zzcbq v0_11 = new byte[v5_7.zzbjo()];
            String v1_6 = com.google.android.gms.internal.zzegg.zzi(v0_11, 0, v0_11.length);
            v5_7.zza(v1_6);
            v1_6.zzccd();
            this.zzauk().zzayi().zze("Saving event, name, data size", this.zzauf().a(p11.b), Integer.valueOf(v0_11.length));
            String v1_10 = new android.content.ContentValues();
            v1_10.put("app_id", p11.a);
            v1_10.put("name", p11.b);
            v1_10.put("timestamp", Long.valueOf(p11.c));
            v1_10.put("metadata_fingerprint", Long.valueOf(p12));
            v1_10.put("data", v0_11);
        } catch (com.google.android.gms.internal.zzcbq v0_13) {
            this.zzauk().zzayc().zze("Data loss. Failed to serialize event params/data. appId", com.google.android.gms.internal.zzcbo.a(p11.a), v0_13);
            return v2;
        }
        if (!p14) {
            v0_14 = 0;
        } else {
            v0_14 = 1;
        }
        v1_10.put("realtime", Integer.valueOf(v0_14));
        try {
            if (this.e().insert("raw_events", 0, v1_10) != -1) {
                v2 = 1;
                return v2;
            } else {
                this.zzauk().zzayc().zzj("Failed to insert raw event (got -1). appId", com.google.android.gms.internal.zzcbo.a(p11.a));
                return v2;
            }
        } catch (com.google.android.gms.internal.zzcbq v0_0) {
            this.zzauk().zzayc().zze("Error storing raw event. appId", com.google.android.gms.internal.zzcbo.a(p11.a), v0_0);
            return v2;
        }
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.g() calling method android.database.sqlite.SQLiteDatabase.insert()


    public void g(String p7, String p8)
    {
        android.database.sqlite.SQLiteDatabase v1 = this.a.getWritableDatabase();
        v1.beginTransaction();
        try {
            if (this.b(v1, p7, p8) == null) {
                String v0_6 = new android.content.ContentValues();
                v0_6.put("identity_id", p7);
                v0_6.put("dataset_name", p8);
                v0_6.put("creation_timestamp", String.valueOf(new java.util.Date().getTime()));
                v0_6.put("last_modified_timestamp", String.valueOf(new java.util.Date().getTime()));
                if (v1.insert("datasets", 0, v0_6) == -1) {
                    Object[] v3_8 = new Object[1];
                    v3_8[0] = p8;
                    android.util.Log.e("SQLiteLocalStorage", String.format("couldn\'t create dataset %s", v3_8));
                }
            }
        } catch (String v0_3) {
            v1.endTransaction();
            throw v0_3;
        }
        v1.setTransactionSuccessful();
        v1.endTransaction();
        return;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.a() calling method android.database.sqlite.SQLiteDatabase.insert()


    boolean a(android.database.sqlite.SQLiteDatabase p9, String p10, String p11, String p12, String p13)
    {
        int v2 = 1;
        String[] v4_0 = this.b(p10, p11, p12);
        if ((v4_0 == null) || (!com.amazonaws.mobileconnectors.cognito.internal.util.StringUtils.a(v4_0.b(), p13))) {
            int v0_5;
            android.content.ContentValues v5_1 = new android.content.ContentValues();
            v5_1.put("identity_id", p10);
            v5_1.put("dataset_name", p11);
            v5_1.put("key", p12);
            v5_1.put("value", p13);
            v5_1.put("modified", Boolean.valueOf(1));
            if (v4_0 != null) {
                v0_5 = v4_0.c();
            } else {
                v0_5 = 0;
            }
            v5_1.put("sync_count", Long.valueOf(v0_5));
            v5_1.put("device_last_modified_timestamp", String.valueOf(new java.util.Date().getTime()));
            if (v4_0 != null) {
                String[] v4_2 = new String[3];
                v4_2[0] = p10;
                v4_2[1] = p11;
                v4_2[2] = p12;
                if (p9.update("records", v5_1, "identity_id = ? AND dataset_name = ? AND key = ?", v4_2) != 1) {
                    v2 = 0;
                }
            } else {
                int v0_14;
                if (p9.insert("records", 0, v5_1) == -1) {
                    v0_14 = 0;
                } else {
                    v0_14 = 1;
                }
                v2 = v0_14;
            }
        }
        return v2;
    }

Method com.mixpanel.android.a.k$a.onUpgrade() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onUpgrade(android.database.sqlite.SQLiteDatabase p3, int p4, int p5)
    {
        com.mixpanel.android.util.e.a("MixpanelAPI.Database", "Upgrading app, replacing Mixpanel events DB");
        if (p5 != 5) {
            p3.execSQL(new StringBuilder().append("DROP TABLE IF EXISTS ").append(com.mixpanel.android.a.k$b.a.a()).toString());
            p3.execSQL(new StringBuilder().append("DROP TABLE IF EXISTS ").append(com.mixpanel.android.a.k$b.b.a()).toString());
            p3.execSQL(com.mixpanel.android.a.k.d());
            p3.execSQL(com.mixpanel.android.a.k.e());
            p3.execSQL(com.mixpanel.android.a.k.f());
            p3.execSQL(com.mixpanel.android.a.k.g());
        } else {
            this.a(p3);
        }
        return;
    }

Method com.mixpanel.android.a.k$a.onCreate() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onCreate(android.database.sqlite.SQLiteDatabase p3)
    {
        com.mixpanel.android.util.e.a("MixpanelAPI.Database", "Creating a new Mixpanel events DB");
        p3.execSQL(com.mixpanel.android.a.k.d());
        p3.execSQL(com.mixpanel.android.a.k.e());
        p3.execSQL(com.mixpanel.android.a.k.f());
        p3.execSQL(com.mixpanel.android.a.k.g());
        return;
    }

Method com.mixpanel.android.a.k$a.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private void a(android.database.sqlite.SQLiteDatabase p8)
    {
        p8.execSQL(new StringBuilder().append("ALTER TABLE ").append(com.mixpanel.android.a.k$b.a.a()).append(" ADD COLUMN ").append("automatic_data").append(" INTEGER DEFAULT 0").toString());
        p8.execSQL(new StringBuilder().append("ALTER TABLE ").append(com.mixpanel.android.a.k$b.b.a()).append(" ADD COLUMN ").append("automatic_data").append(" INTEGER DEFAULT 0").toString());
        p8.execSQL(new StringBuilder().append("ALTER TABLE ").append(com.mixpanel.android.a.k$b.a.a()).append(" ADD COLUMN ").append("token").append(" STRING NOT NULL DEFAULT \'\'").toString());
        p8.execSQL(new StringBuilder().append("ALTER TABLE ").append(com.mixpanel.android.a.k$b.b.a()).append(" ADD COLUMN ").append("token").append(" STRING NOT NULL DEFAULT \'\'").toString());
        android.database.Cursor v2_0 = p8.rawQuery(new StringBuilder().append("SELECT * FROM ").append(com.mixpanel.android.a.k$b.a.a()).toString(), 0);
        while (v2_0.moveToNext()) {
            try {
                org.json.JSONException v3_16 = new org.json.JSONObject(v2_0.getString(v2_0.getColumnIndex("data"))).getJSONObject("properties").getString("token");
                String v0_25 = v2_0.getInt(v2_0.getColumnIndex("_id"));
                try {
                    p8.execSQL(new StringBuilder().append("UPDATE ").append(com.mixpanel.android.a.k$b.a.a()).append(" SET ").append("token").append(" = \'").append(v3_16).append("\' WHERE _id = ").append(v0_25).toString());
                } catch (org.json.JSONException v3) {
                    p8.delete(com.mixpanel.android.a.k$b.a.a(), new StringBuilder().append("_id = ").append(v0_25).toString(), 0);
                }
            } catch (String v0) {
                v0_25 = 0;
            }
        }
        android.database.Cursor v2_5 = p8.rawQuery(new StringBuilder().append("SELECT * FROM ").append(com.mixpanel.android.a.k$b.b.a()).toString(), 0);
        while (v2_5.moveToNext()) {
            try {
                org.json.JSONException v3_4 = new org.json.JSONObject(v2_5.getString(v2_5.getColumnIndex("data"))).getString("$token");
                String v0_13 = v2_5.getInt(v2_5.getColumnIndex("_id"));
                try {
                    p8.execSQL(new StringBuilder().append("UPDATE ").append(com.mixpanel.android.a.k$b.b.a()).append(" SET ").append("token").append(" = \'").append(v3_4).append("\' WHERE _id = ").append(v0_13).toString());
                } catch (org.json.JSONException v3) {
                    p8.delete(com.mixpanel.android.a.k$b.b.a(), new StringBuilder().append("_id = ").append(v0_13).toString(), 0);
                }
            } catch (String v0) {
                v0_13 = 0;
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzcco.b() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private final void b(com.google.android.gms.internal.zzcbc p19, com.google.android.gms.internal.zzcak p20)
    {
        com.google.android.gms.common.internal.zzbp.zzu(p20);
        com.google.android.gms.common.internal.zzbp.zzgf(p20.packageName);
        long v16 = System.nanoTime();
        this.zzauj().zzug();
        this.a();
        String v3_1 = p20.packageName;
        this.zzaug();
        if (com.google.android.gms.internal.zzcfo.a(p19, p20)) {
            if (p20.zzils) {
                if (!this.zzauh().b(v3_1, p19.name)) {
                    if (this.zzauk().a(2)) {
                        this.zzauk().zzayi().zzj("Logging event", this.zzauf().a(p19));
                    }
                    this.zzaue().b();
                    try {
                        long v14_1 = p19.zzinj.zzaxy();
                        this.b(p20);
                    } catch (com.google.android.gms.internal.zzcfo v2_67) {
                        this.zzaue().d();
                        throw v2_67;
                    }
                    if (("_iap".equals(p19.name)) || ("ecommerce_purchase".equals(p19.name))) {
                        String v8_0;
                        com.google.android.gms.internal.zzcfo v2_88 = v14_1.getString("currency");
                        if (!"ecommerce_purchase".equals(p19.name)) {
                            v8_0 = v14_1.getLong("value");
                        } else {
                            com.google.android.gms.internal.zzcbq v4_73 = (v14_1.getDouble("value") * 1000000.0);
                            if (v4_73 == 0) {
                                v4_73 = (((double) v14_1.getLong("value")) * 1000000.0);
                            }
                            if ((v4_73 > 9.223372036854776e+18) || (v4_73 < -9.223372036854776e+18)) {
                                this.zzauk().zzaye().zze("Data lost. Currency value is too big. appId", com.google.android.gms.internal.zzcbo.a(v3_1), Double.valueOf(v4_73));
                                this.zzaue().c();
                                this.zzaue().d();
                                return;
                            } else {
                                v8_0 = Math.round(v4_73);
                            }
                        }
                        if (!android.text.TextUtils.isEmpty(v2_88)) {
                            com.google.android.gms.internal.zzcfo v2_3 = v2_88.toUpperCase(java.util.Locale.US);
                            if (v2_3.matches("[A-Z]{3}")) {
                                int v5_2;
                                com.google.android.gms.internal.zzcbq v4_7 = String.valueOf("_ltv_");
                                com.google.android.gms.internal.zzcfo v2_4 = String.valueOf(v2_3);
                                if (v2_4.length() == 0) {
                                    v5_2 = new String(v4_7);
                                } else {
                                    v5_2 = v4_7.concat(v2_4);
                                }
                                com.google.android.gms.internal.zzcfo v2_11;
                                com.google.android.gms.internal.zzcfo v2_7 = this.zzaue().c(v3_1, v5_2);
                                if ((v2_7 != null) && ((v2_7.e instanceof Long))) {
                                    v2_11 = new com.google.android.gms.internal.jn(v3_1, p19.zzilz, v5_2, this.p.currentTimeMillis(), Long.valueOf((v8_0 + ((Long) v2_7.e).longValue())));
                                } else {
                                    com.google.android.gms.internal.zzcbq v4_11 = this.zzaue();
                                    com.google.android.gms.internal.zzcfo v2_14 = (this.c.zzb(v3_1, com.google.android.gms.internal.zzcbe.zziow) - 1);
                                    com.google.android.gms.common.internal.zzbp.zzgf(v3_1);
                                    v4_11.zzug();
                                    v4_11.t();
                                    try {
                                        String v6_4 = v4_11.e();
                                        String[] v10_2 = new String[3];
                                        v10_2[0] = v3_1;
                                        v10_2[1] = v3_1;
                                        v10_2[2] = String.valueOf(v2_14);
                                        v6_4.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);", v10_2);
                                    } catch (com.google.android.gms.internal.zzcfo v2_17) {
                                        v4_11.zzauk().zzayc().zze("Error pruning currencies. appId", com.google.android.gms.internal.zzcbo.a(v3_1), v2_17);
                                    }
                                    v2_11 = new com.google.android.gms.internal.jn(v3_1, p19.zzilz, v5_2, this.p.currentTimeMillis(), Long.valueOf(v8_0));
                                }
                                if (!this.zzaue().a(v2_11)) {
                                    this.zzauk().zzayc().zzd("Too many unique user properties are set. Ignoring user property. appId", com.google.android.gms.internal.zzcbo.a(v3_1), this.zzauf().c(v2_11.c), v2_11.e);
                                    this.zzaug().zza(v3_1, 9, 0, 0, 0);
                                }
                            }
                        }
                    }
                    String[] v10_3 = com.google.android.gms.internal.zzcfo.a(p19.name);
                    long v12_0 = "_err".equals(p19.name);
                    com.google.android.gms.internal.zzcfo v2_26 = this.zzaue().a(this.l(), v3_1, 1, v10_3, 0, v12_0, 0);
                    com.google.android.gms.internal.zzcbq v4_23 = (v2_26.b - com.google.android.gms.internal.zzcap.zzavv());
                    if (v4_23 <= 0) {
                        if (v10_3 != null) {
                            com.google.android.gms.internal.zzcbq v4_25 = (v2_26.a - com.google.android.gms.internal.zzcap.zzavw());
                            if (v4_25 > 0) {
                                if ((v4_25 % 1000) == 1) {
                                    this.zzauk().zzayc().zze("Data loss. Too many public events logged. appId, count", com.google.android.gms.internal.zzcbo.a(v3_1), Long.valueOf(v2_26.a));
                                }
                                this.zzaug().zza(v3_1, 16, "_ev", p19.name, 0);
                                this.zzaue().c();
                                this.zzaue().d();
                                return;
                            }
                        }
                        if (v12_0 != 0) {
                            com.google.android.gms.internal.zzcbq v4_28 = (v2_26.d - ((long) Math.max(0, Math.min(1000000, this.c.zzb(p20.packageName, com.google.android.gms.internal.zzcbe.zziod)))));
                            if (v4_28 > 0) {
                                if (v4_28 == 1) {
                                    this.zzauk().zzayc().zze("Too many error events logged. appId, count", com.google.android.gms.internal.zzcbo.a(v3_1), Long.valueOf(v2_26.d));
                                }
                                this.zzaue().c();
                                this.zzaue().d();
                                return;
                            }
                        }
                        this.zzaug().zza(v14_1, "_o", p19.zzilz);
                        if (this.zzaug().zzke(v3_1)) {
                            this.zzaug().zza(v14_1, "_dbg", Long.valueOf(1));
                            this.zzaug().zza(v14_1, "_r", Long.valueOf(1));
                        }
                        com.google.android.gms.internal.zzcbq v4_32 = this.zzaue().c(v3_1);
                        if (v4_32 > 0) {
                            this.zzauk().zzaye().zze("Data lost. Too many events stored on disk, deleted. appId", com.google.android.gms.internal.zzcbo.a(v3_1), Long.valueOf(v4_32));
                        }
                        Object v7_10;
                        int v5_10 = new com.google.android.gms.internal.zzcax(this, p19.zzilz, v3_1, p19.name, p19.zzink, 0, v14_1);
                        com.google.android.gms.internal.zzcfo v2_40 = this.zzaue().a(v3_1, v5_10.b);
                        if (v2_40 != null) {
                            v5_10 = v5_10.a(this, v2_40.e);
                            v7_10 = v2_40.a(v5_10.c);
                        } else {
                            String v6_31 = this.zzaue().f(v3_1);
                            com.google.android.gms.internal.zzcap.f();
                            if (v6_31 < 500) {
                                v7_10 = new com.google.android.gms.internal.ge(v3_1, v5_10.b, 0, 0, v5_10.c);
                            } else {
                                this.zzauk().zzayc().zzd("Too many event names used, ignoring event. appId, name, supported count", com.google.android.gms.internal.zzcbo.a(v3_1), this.zzauf().a(v5_10.b), Integer.valueOf(com.google.android.gms.internal.zzcap.f()));
                                this.zzaug().zza(v3_1, 8, 0, 0, 0);
                                this.zzaue().d();
                                return;
                            }
                        }
                        this.zzaue().a(v7_10);
                        this.a(v5_10, p20);
                        this.zzaue().c();
                        if (this.zzauk().a(2)) {
                            this.zzauk().zzayi().zzj("Event recorded", this.zzauf().a(v5_10));
                        }
                        this.zzaue().d();
                        this.n().zzauk().zzayi().zzj("Background event processing time, ms", Long.valueOf((((System.nanoTime() - v16) + 500000) / 1000000)));
                    } else {
                        if ((v4_23 % 1000) == 1) {
                            this.zzauk().zzayc().zze("Data loss. Too many events logged. appId, count", com.google.android.gms.internal.zzcbo.a(v3_1), Long.valueOf(v2_26.b));
                        }
                        this.zzaue().c();
                        this.zzaue().d();
                    }
                } else {
                    String v8_11;
                    this.zzauk().zzaye().zze("Dropping blacklisted event. appId", com.google.android.gms.internal.zzcbo.a(v3_1), this.zzauf().a(p19.name));
                    if ((!this.zzaug().d(v3_1)) && (!this.zzaug().e(v3_1))) {
                        v8_11 = 0;
                    } else {
                        v8_11 = 1;
                    }
                    if ((v8_11 == null) && (!"_err".equals(p19.name))) {
                        this.zzaug().zza(v3_1, 11, "_ev", p19.name, 0);
                    }
                    if (v8_11 != null) {
                        com.google.android.gms.internal.zzcfo v2_83 = this.zzaue().b(v3_1);
                        if ((v2_83 != null) && (Math.abs((this.p.currentTimeMillis() - Math.max(v2_83.q(), v2_83.p()))) > com.google.android.gms.internal.zzcap.zzawn())) {
                            this.zzauk().zzayh().log("Fetching config for blacklisted app");
                            this.a(v2_83);
                        }
                    }
                }
            } else {
                this.b(p20);
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzcco.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private final boolean a(String p21, long p22)
    {
        this.zzaue().b();
        try {
            ark>com.google.android.gms.internal.zzccoark>$a v15_1 = new ark>com.google.android.gms.internal.zzccoark>$a(this, 0);
            int v14_1 = this.zzaue();
            com.google.android.gms.internal.zzcfz v4_10 = 0;
            com.google.android.gms.internal.zzcgc v16_0 = this.J;
            com.google.android.gms.common.internal.zzbp.zzu(v15_1);
            v14_1.zzug();
            v14_1.t();
            int v3_4 = 0;
            try {
                com.google.android.gms.internal.zzcfz v13_1;
                String[] v12_1;
                com.google.android.gms.internal.zzcbq v2_3 = v14_1.e();
            } catch (com.google.android.gms.internal.zzcbq v2_1) {
                v14_1.zzauk().zzayc().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzcbo.a(v4_10), v2_1);
                if (v3_4 == 0) {
                    if ((v15_1.c != null) && (!v15_1.c.isEmpty())) {
                        com.google.android.gms.internal.zzcbq v2_24 = 0;
                    } else {
                        v2_24 = 1;
                    }
                    com.google.android.gms.internal.zzcbq v2_27;
                    if (v2_24 != null) {
                        this.zzaue().c();
                        this.zzaue().d();
                        v2_27 = 0;
                    } else {
                        com.google.android.gms.internal.zzcfz v13_0 = 0;
                        com.google.android.gms.internal.zzcgc v16_1 = v15_1.a;
                        com.google.android.gms.internal.zzcbq v2_30 = new com.google.android.gms.internal.zzcfz[v15_1.c.size()];
                        v16_1.zziza = v2_30;
                        String[] v12_0 = 0;
                        int v14_0 = 0;
                        while (v14_0 < v15_1.c.size()) {
                            int v3_72;
                            com.google.android.gms.internal.zzcbq v2_171;
                            if (!this.zzauh().b(v15_1.a.zzch, ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) {
                                com.google.android.gms.internal.zzcfz v4_71;
                                boolean v17 = this.zzauh().c(v15_1.a.zzch, ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name);
                                if (v17) {
                                    int v3_41 = 0;
                                    com.google.android.gms.internal.zzcfz v4_43 = 0;
                                    if (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys == null) {
                                        int v5_34 = new com.google.android.gms.internal.zzcga[0];
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v5_34;
                                    }
                                    int v6_20 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys;
                                    com.google.android.gms.internal.zzcga[] v7_27 = v6_20.length;
                                    int v5_35 = 0;
                                    while (v5_35 < v7_27) {
                                        com.google.android.gms.internal.zzcbq v2_173;
                                        com.google.android.gms.internal.zzcbq v2_172 = v6_20[v5_35];
                                        if (!"_c".equals(v2_172.name)) {
                                            if (!"_r".equals(v2_172.name)) {
                                                v2_173 = v4_43;
                                            } else {
                                                v2_172.zziyw = Long.valueOf(1);
                                                v2_173 = 1;
                                            }
                                        } else {
                                            v2_172.zziyw = Long.valueOf(1);
                                            v3_41 = 1;
                                            v2_173 = v4_43;
                                        }
                                        v5_35++;
                                        v4_43 = v2_173;
                                    }
                                    if ((v3_41 == 0) && (v17)) {
                                        this.zzauk().zzayi().zzj("Marking event as conversion", this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcbq v2_127 = ((com.google.android.gms.internal.zzcga[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys, (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys.length + 1)));
                                        int v3_46 = new com.google.android.gms.internal.zzcga();
                                        v3_46.name = "_c";
                                        v3_46.zziyw = Long.valueOf(1);
                                        v2_127[(v2_127.length - 1)] = v3_46;
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v2_127;
                                    }
                                    if (v4_43 == null) {
                                        this.zzauk().zzayi().zzj("Marking event as real-time", this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcbq v2_144 = ((com.google.android.gms.internal.zzcga[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys, (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys.length + 1)));
                                        int v3_53 = new com.google.android.gms.internal.zzcga();
                                        v3_53.name = "_r";
                                        v3_53.zziyw = Long.valueOf(1);
                                        v2_144[(v2_144.length - 1)] = v3_53;
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v2_144;
                                    }
                                    if (this.zzaue().a(this.l(), v15_1.a.zzch, 0, 0, 0, 0, 1).e <= ((long) this.c.zzis(v15_1.a.zzch))) {
                                        v13_0 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcbq v2_148 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                        int v3_62 = 0;
                                        while (v3_62 < v2_148.zziys.length) {
                                            if (!"_r".equals(v2_148.zziys[v3_62].name)) {
                                                v3_62++;
                                            } else {
                                                com.google.android.gms.internal.zzcfz v4_59 = new com.google.android.gms.internal.zzcga[(v2_148.zziys.length - 1)];
                                                if (v3_62 > 0) {
                                                    System.arraycopy(v2_148.zziys, 0, v4_59, 0, v3_62);
                                                }
                                                if (v3_62 < v4_59.length) {
                                                    System.arraycopy(v2_148.zziys, (v3_62 + 1), v4_59, v3_62, (v4_59.length - v3_62));
                                                }
                                                v2_148.zziys = v4_59;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzcfo.a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) || ((!v17) || (this.zzaue().a(this.l(), v15_1.a.zzch, 0, 0, 1, 0, 0).c <= ((long) this.c.zzb(v15_1.a.zzch, com.google.android.gms.internal.zzcbe.zziof))))) {
                                        v4_71 = v13_0;
                                    } else {
                                        this.zzauk().zzaye().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                        com.google.android.gms.internal.zzcbq v2_162 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                        int v5_57 = 0;
                                        com.google.android.gms.internal.zzcfz v4_67 = 0;
                                        com.google.android.gms.internal.zzcga[] v7_33 = v2_162.zziys;
                                        int v6_34 = 0;
                                        while (v6_34 < v7_33.length) {
                                            com.google.android.gms.internal.zzcfz v4_72;
                                            int v3_74 = v7_33[v6_34];
                                            if (!"_c".equals(v3_74.name)) {
                                                if (!"_err".equals(v3_74.name)) {
                                                    v3_74 = v4_67;
                                                    v4_72 = v5_57;
                                                } else {
                                                    v4_72 = 1;
                                                    v3_74 = v4_67;
                                                }
                                            } else {
                                                v4_72 = v5_57;
                                            }
                                            v6_34++;
                                            v5_57 = v4_72;
                                            v4_67 = v3_74;
                                        }
                                        if ((v5_57 == 0) || (v4_67 == null)) {
                                            if (v4_67 == null) {
                                                this.zzauk().zzayc().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                            } else {
                                                v4_67.name = "_err";
                                                v4_67.zziyw = Long.valueOf(10);
                                                v4_71 = v13_0;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcga[] v7_35 = new com.google.android.gms.internal.zzcga[(v2_162.zziys.length - 1)];
                                            int v5_58 = 0;
                                            com.google.android.gms.internal.zzcga[] v8_17 = v2_162.zziys;
                                            int v9_4 = v8_17.length;
                                            int v6_35 = 0;
                                            while (v6_35 < v9_4) {
                                                int v3_73;
                                                com.google.android.gms.internal.zzcga v10_4 = v8_17[v6_35];
                                                if (v10_4 == v4_67) {
                                                    v3_73 = v5_58;
                                                } else {
                                                    v3_73 = (v5_58 + 1);
                                                    v7_35[v5_58] = v10_4;
                                                }
                                                v6_35++;
                                                v5_58 = v3_73;
                                            }
                                            v2_162.zziys = v7_35;
                                            v4_71 = v13_0;
                                        }
                                    }
                                } else {
                                    this.zzaug();
                                    if (!com.google.android.gms.internal.zzcfo.f(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) {
                                    }
                                }
                                int v3_71 = (v12_0 + 1);
                                v16_1.zziza[v12_0] = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                v2_171 = v3_71;
                                v3_72 = v4_71;
                            } else {
                                com.google.android.gms.internal.zzcbq v2_187;
                                this.zzauk().zzaye().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch), this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                if ((!this.zzaug().d(v15_1.a.zzch)) && (!this.zzaug().e(v15_1.a.zzch))) {
                                    v2_187 = 0;
                                } else {
                                    v2_187 = 1;
                                }
                                if ((v2_187 != null) || ("_err".equals(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name))) {
                                    v2_171 = v12_0;
                                    v3_72 = v13_0;
                                } else {
                                    this.zzaug().zza(v15_1.a.zzch, 11, "_ev", ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name, 0);
                                    v2_171 = v12_0;
                                    v3_72 = v13_0;
                                }
                            }
                            v14_0++;
                            v12_0 = v2_171;
                            v13_0 = v3_72;
                        }
                        if (v12_0 < v15_1.c.size()) {
                            v16_1.zziza = ((com.google.android.gms.internal.zzcfz[]) java.util.Arrays.copyOf(v16_1.zziza, v12_0));
                        }
                        v16_1.zzizt = this.a(v15_1.a.zzch, v15_1.a.zzizb, v16_1.zziza);
                        v16_1.zzizd = Long.valueOf(nan);
                        v16_1.zzize = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcbq v2_46 = 0;
                        while (v2_46 < v16_1.zziza.length) {
                            int v3_37 = v16_1.zziza[v2_46];
                            if (v3_37.zziyt.longValue() < v16_1.zzizd.longValue()) {
                                v16_1.zzizd = v3_37.zziyt;
                            }
                            if (v3_37.zziyt.longValue() > v16_1.zzize.longValue()) {
                                v16_1.zzize = v3_37.zziyt;
                            }
                            v2_46++;
                        }
                        int v6_15 = v15_1.a.zzch;
                        com.google.android.gms.internal.zzcga[] v7_18 = this.zzaue().b(v6_15);
                        if (v7_18 != null) {
                            if (v16_1.zziza.length > 0) {
                                com.google.android.gms.internal.zzcfz v4_22;
                                com.google.android.gms.internal.zzcbq v2_52 = v7_18.h();
                                if (v2_52 == 0) {
                                    v4_22 = 0;
                                } else {
                                    v4_22 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizg = v4_22;
                                com.google.android.gms.internal.zzcfz v4_23 = v7_18.g();
                                if (v4_23 != 0) {
                                    v2_52 = v4_23;
                                }
                                com.google.android.gms.internal.zzcbq v2_53;
                                if (v2_52 == 0) {
                                    v2_53 = 0;
                                } else {
                                    v2_53 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizf = v2_53;
                                v7_18.r();
                                v16_1.zzizr = Integer.valueOf(((int) v7_18.o()));
                                v7_18.a(v16_1.zzizd.longValue());
                                v7_18.b(v16_1.zzize.longValue());
                                v16_1.zzilr = v7_18.z();
                                this.zzaue().a(v7_18);
                            }
                        } else {
                            this.zzauk().zzayc().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                        }
                        if (v16_1.zziza.length > 0) {
                            com.google.android.gms.internal.zzcap.zzawj();
                            com.google.android.gms.internal.zzcbq v2_68 = this.zzauh().a(v15_1.a.zzch);
                            if ((v2_68 != null) && (v2_68.zziyh != null)) {
                                v16_1.zzizx = v2_68.zziyh;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v15_1.a.zziln)) {
                                    this.zzauk().zzaye().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                } else {
                                    v16_1.zzizx = Long.valueOf(-1);
                                }
                            }
                            this.zzaue().a(v16_1, v13_0);
                        }
                        this.zzaue().a(v15_1.b);
                        int v3_32 = this.zzaue();
                        com.google.android.gms.internal.zzcbq v2_79 = v3_32.e();
                        int v5_29 = new String[2];
                        v5_29[0] = v6_15;
                        v5_29[1] = v6_15;
                        v2_79.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_29);
                        this.zzaue().c();
                        if (v16_1.zziza.length <= 0) {
                            v2_27 = 0;
                        } else {
                            v2_27 = 1;
                        }
                        this.zzaue().d();
                    }
                    return v2_27;
                } else {
                    v3_4.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_12;
                if (v16_0 == -1) {
                    int v5_20 = new String[1];
                    v5_20[0] = 0;
                    v6_12 = v5_20;
                } else {
                    int v5_25 = new String[2];
                    v5_25[0] = 0;
                    v5_25[1] = String.valueOf(v16_0);
                    v6_12 = v5_25;
                }
                int v5_27;
                if (v16_0 == -1) {
                    v5_27 = "";
                } else {
                    v5_27 = " and rowid <= ?";
                }
                int v3_44 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_27).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_27).append(" order by rowid limit 1;").toString(), v6_12);
                if (v3_44.moveToFirst()) {
                    int v5_45 = v3_44.getString(0);
                    v3_44.close();
                    v13_1 = v5_45;
                    v12_1 = 0;
                } else {
                    if (v3_44 == 0) {
                    } else {
                        v3_44.close();
                    }
                }
            } else {
                int v6_36;
                if (v16_0 == -1) {
                    int v5_56 = new String[1];
                    v5_56[0] = String.valueOf(p22);
                    v6_36 = v5_56;
                } else {
                    int v5_62 = new String[2];
                    v5_62[0] = String.valueOf(v16_0);
                    v5_62[1] = String.valueOf(p22);
                    v6_36 = v5_62;
                }
                int v5_1;
                if (v16_0 == -1) {
                    v5_1 = "";
                } else {
                    v5_1 = "rowid <= ? and ";
                }
                int v3_0 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_1).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_1).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_36);
                if (v3_0.moveToFirst()) {
                    com.google.android.gms.internal.zzcfz v4_1 = v3_0.getString(0);
                    int v5_8 = v3_0.getString(1);
                    v3_0.close();
                    v13_1 = v5_8;
                    v12_1 = v4_1;
                } else {
                    if (v3_0 == 0) {
                    } else {
                        v3_0.close();
                    }
                }
            }
            try {
                com.google.android.gms.internal.zzcfz v4_3 = new String[1];
                v4_3[0] = "metadata";
                int v6_2 = new String[2];
                v6_2[0] = v12_1;
                v6_2[1] = v13_1;
                int v11_0 = v2_3.query("raw_events_metadata", v4_3, "app_id = ? and metadata_fingerprint = ?", v6_2, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcbq v2_4) {
                v3_4 = v11_0;
                if (v3_4 != 0) {
                    v3_4.close();
                }
                throw v2_4;
            } catch (com.google.android.gms.internal.zzcbq v2_1) {
                v3_4 = v11_0;
                v4_10 = v12_1;
            }
            if (v11_0.moveToFirst()) {
                int v3_5 = v11_0.getBlob(0);
                int v3_6 = com.google.android.gms.internal.zzegf.zzh(v3_5, 0, v3_5.length);
                com.google.android.gms.internal.zzcfz v4_6 = new com.google.android.gms.internal.zzcgc();
                try {
                    v4_6.zza(v3_6);
                } catch (com.google.android.gms.internal.zzcbq v2_2) {
                    v14_1.zzauk().zzayc().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzcbo.a(v12_1), v2_2);
                    if (v11_0 == 0) {
                    } else {
                        v11_0.close();
                    }
                }
                if (v11_0.moveToNext()) {
                    v14_1.zzauk().zzaye().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                }
                int v6_4;
                int v5_15;
                v11_0.close();
                v15_1.a(v4_6);
                if (v16_0 == -1) {
                    v5_15 = "app_id = ? and metadata_fingerprint = ?";
                    v6_4 = new String[2];
                    v6_4[0] = v12_1;
                    v6_4[1] = v13_1;
                } else {
                    v5_15 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_4 = new String[3];
                    v6_4[0] = v12_1;
                    v6_4[1] = v13_1;
                    v6_4[2] = String.valueOf(v16_0);
                }
                com.google.android.gms.internal.zzcfz v4_12 = new String[4];
                v4_12[0] = "rowid";
                v4_12[1] = "name";
                v4_12[2] = "timestamp";
                v4_12[3] = "data";
                v3_4 = v2_3.query("raw_events", v4_12, v5_15, v6_4, 0, 0, "rowid", 0);
                try {
                    if (!v3_4.moveToFirst()) {
                        v14_1.zzauk().zzaye().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcbq v2_1) {
                    v4_10 = v12_1;
                }
                do {
                    com.google.android.gms.internal.zzcfz v4_13 = v3_4.getLong(0);
                    com.google.android.gms.internal.zzcbq v2_8 = v3_4.getBlob(3);
                    com.google.android.gms.internal.zzcbq v2_9 = com.google.android.gms.internal.zzegf.zzh(v2_8, 0, v2_8.length);
                    int v6_8 = new com.google.android.gms.internal.zzcfz();
                    v6_8.zza(v2_9);
                    v6_8.name = v3_4.getString(1);
                    v6_8.zziyt = Long.valueOf(v3_4.getLong(2));
                    if (v15_1.a(v4_13, v6_8)) {
                    } else {
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } while(v3_4.moveToNext());
                if (v3_4 == 0) {
                } else {
                    v3_4.close();
                }
            } else {
                v14_1.zzauk().zzayc().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                if (v11_0 == 0) {
                } else {
                    v11_0.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcbq v2_193) {
            this.zzaue().d();
            throw v2_193;
        }
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    private static void a(com.google.android.gms.internal.zzcbo p6, android.database.sqlite.SQLiteDatabase p7, String p8, String p9, java.util.Map p10)
    {
        if (p6 != null) {
            String v1_0 = ark>com.google.android.gms.internal.fzark>.a(p7, p8);
            String v2_2 = p9.split(",");
            String v0_9 = 0;
            while (v0_9 < v2_2.length) {
                String v4 = v2_2[v0_9];
                if (v1_0.remove(v4)) {
                    v0_9++;
                } else {
                    throw new android.database.sqlite.SQLiteException(new StringBuilder(((String.valueOf(p8).length() + 35) + String.valueOf(v4).length())).append("Table ").append(p8).append(" is missing required column: ").append(v4).toString());
                }
            }
            if (p10 != null) {
                String v2_0 = p10.entrySet().iterator();
                while (v2_0.hasNext()) {
                    String v0_6 = ((java.util.Map$Entry) v2_0.next());
                    if (!v1_0.remove(v0_6.getKey())) {
                        p7.execSQL(((String) v0_6.getValue()));
                    }
                }
            }
            if (!v1_0.isEmpty()) {
                p6.zzaye().zze("Table has extra columns. table, columns", p8, android.text.TextUtils.join(", ", v1_0));
            }
            return;
        } else {
            throw new IllegalArgumentException("Monitor must not be null");
        }
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    static void a(com.google.android.gms.internal.zzcbo p3, android.database.sqlite.SQLiteDatabase p4, String p5, String p6, String p7, java.util.Map p8)
    {
        if (p3 != null) {
            if (!ark>com.google.android.gms.internal.fzark>.a(p3, p4, p5)) {
                p4.execSQL(p6);
            }
            try {
                ark>com.google.android.gms.internal.fzark>.a(p3, p4, p5, p7, p8);
                return;
            } catch (android.database.sqlite.SQLiteException v0_3) {
                p3.zzayc().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.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.i() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public declared_synchronized void i(String p7, String p8)
    {
        try {
            android.database.sqlite.SQLiteDatabase v1 = this.a.getWritableDatabase();
            v1.beginTransaction();
            try {
                if (!"unknown".equals(p7)) {
                    String v0_75 = new StringBuilder().append("INSERT INTO datasets(identity_id,dataset_name,creation_timestamp,storage_size_bytes,record_count) SELECT \'").append(p8).append("\',").append("dataset_name").append(",").append("creation_timestamp").append(",").append("storage_size_bytes").append(",").append("record_count").append(" FROM ").append("datasets").append(" WHERE ").append("identity_id").append(" = ?").toString();
                    String[] v2_59 = new String[1];
                    v2_59[0] = p7;
                    v1.execSQL(v0_75, v2_59);
                    String v0_9 = new StringBuilder().append("INSERT INTO records(identity_id,dataset_name,key,value,last_modified_timestamp,last_modified_by,device_last_modified_timestamp) SELECT \'").append(p8).append("\',").append("dataset_name").append(",").append("key").append(",").append("value").append(",").append("last_modified_timestamp").append(",").append("last_modified_by").append(",").append("device_last_modified_timestamp").append(" FROM ").append("records").append(" WHERE ").append("identity_id").append(" = ?").toString();
                    String[] v2_8 = new String[1];
                    v2_8[0] = p7;
                    v1.execSQL(v0_9, v2_8);
                    String v0_24 = new StringBuilder().append("UPDATE datasets SET identity_id = \'").append(p8).append("\', ").append("dataset_name").append(" = ").append("dataset_name").append(" || \'.").append(p7).append("\' WHERE ").append("identity_id").append(" = ?").toString();
                    String[] v2_20 = new String[1];
                    v2_20[0] = p7;
                    v1.execSQL(v0_24, v2_20);
                    String v0_40 = new StringBuilder().append("UPDATE records SET identity_id = \'").append(p8).append("\', ").append("dataset_name").append(" = ").append("dataset_name").append(" || \'.").append(p7).append("\' WHERE ").append("identity_id").append(" = ?").toString();
                    String[] v2_32 = new String[1];
                    v2_32[0] = p7;
                    v1.execSQL(v0_40, v2_32);
                } else {
                    String v0_41 = this.h(p7, p8);
                    if (v0_41.size() > 0) {
                        String[] v2_35 = v0_41.iterator();
                        while (v2_35.hasNext()) {
                            String v0_64 = ((String) v2_35.next());
                            String v3_16 = new StringBuilder().append("UPDATE datasets SET dataset_name = \'").append(v0_64).append(".").append(p7).append("\' WHERE ").append("identity_id").append(" = ? AND ").append("dataset_name").append(" = ?").toString();
                            String[] v4_8 = new String[2];
                            v4_8[0] = p7;
                            v4_8[1] = v0_64;
                            v1.execSQL(v3_16, v4_8);
                            String v3_28 = new StringBuilder().append("UPDATE records SET dataset_name = \'").append(v0_64).append(".").append(p7).append("\' WHERE ").append("identity_id").append(" = ? AND ").append("dataset_name").append(" = ?").toString();
                            String[] v4_17 = new String[2];
                            v4_17[0] = p7;
                            v4_17[1] = v0_64;
                            v1.execSQL(v3_28, v4_17);
                        }
                    }
                    String v0_51 = new StringBuilder().append("UPDATE datasets SET identity_id = \'").append(p8).append("\' WHERE ").append("identity_id").append(" = ?").toString();
                    String[] v2_41 = new String[1];
                    v2_41[0] = p7;
                    v1.execSQL(v0_51, v2_41);
                    String v0_59 = new StringBuilder().append("UPDATE records SET identity_id = \'").append(p8).append("\' WHERE ").append("identity_id").append(" = ?").toString();
                    String[] v2_48 = new String[1];
                    v2_48[0] = p7;
                    v1.execSQL(v0_59, v2_48);
                }
            } catch (String v0_61) {
                v1.endTransaction();
                throw v0_61;
            }
            v1.setTransactionSuccessful();
            v1.endTransaction();
            return;
        } catch (String v0_62) {
            throw v0_62;
        }
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.a() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void a()
    {
        android.database.sqlite.SQLiteDatabase v1 = this.a.getWritableDatabase();
        v1.beginTransaction();
        try {
            v1.execSQL("DELETE FROM datasets");
            v1.execSQL("DELETE FROM records");
            v1.setTransactionSuccessful();
            v1.endTransaction();
            return;
        } catch (Throwable v0_1) {
            v1.endTransaction();
            throw v0_1;
        }
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage$DatabaseHelper.onUpgrade() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onUpgrade(android.database.sqlite.SQLiteDatabase p3, int p4, int p5)
    {
        android.util.Log.w("SQLiteLocalStorage", "Upgrading database; wiping all data");
        p3.execSQL("DROP TABLE IF EXISTS datasets");
        p3.execSQL("DROP TABLE IF EXISTS records");
        this.onCreate(p3);
        return;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage$DatabaseHelper.onCreate() calling method android.database.sqlite.SQLiteDatabase.execSQL()


    public void onCreate(android.database.sqlite.SQLiteDatabase p2)
    {
        p2.execSQL("CREATE TABLE datasets(identity_id TEXT NOT NULL,dataset_name TEXT NOT NULL,creation_timestamp INTEGER DEFAULT 0,last_modified_timestamp INTEGER DEFAULT 0,last_modified_by TEXT,storage_size_bytes INTEGER DEFAULT 0,record_count INTEGER DEFAULT 0,last_sync_count INTEGER NOT NULL DEFAULT 0,last_sync_timestamp INTEGER DEFAULT 0,last_sync_result TEXT,UNIQUE (identity_id, dataset_name))");
        p2.execSQL("CREATE TABLE records(identity_id TEXT NOT NULL,dataset_name TEXT NOT NULL,key TEXT NOT NULL,value TEXT,sync_count INTEGER NOT NULL DEFAULT 0,last_modified_timestamp INTEGER DEFAULT 0,last_modified_by TEXT,device_last_modified_timestamp INTEGER DEFAULT 0,modified INTEGER NOT NULL DEFAULT 1,UNIQUE (identity_id, dataset_name, key))");
        return;
    }

Method com.mixpanel.android.a.k.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void a(String p6, ark>com.mixpanel.android.a.kark>$b p7, String p8, boolean p9)
    {
        String v1_0 = p7.a();
        try {
            ark>com.mixpanel.android.a.kark>$a v0_2 = this.f.getWritableDatabase();
            String v2_0 = new StringBuffer(new StringBuilder().append("_id <= ").append(p6).append(" AND ").append("token").append(" = \'").append(p8).append("\'").toString());
        } catch (ark>com.mixpanel.android.a.kark>$a v0_5) {
            this.f.close();
            throw v0_5;
        } catch (ark>com.mixpanel.android.a.kark>$a v0_1) {
            com.mixpanel.android.util.e.e("MixpanelAPI.Database", new StringBuilder().append("Could not clean sent Mixpanel records from ").append(v1_0).append(". Re-initializing database.").toString(), v0_1);
            this.f.a();
            this.f.close();
            return;
        }
        if (!p9) {
            v2_0.append(" AND automatic_data=0");
        }
        v0_2.delete(v1_0, v2_0.toString(), 0);
        this.f.close();
        return;
    }

Method com.mixpanel.android.a.k.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void a(long p6, ark>com.mixpanel.android.a.kark>$b p8)
    {
        String v1_0 = p8.a();
        try {
            this.f.getWritableDatabase().delete(v1_0, new StringBuilder().append("created_at <= ").append(p6).toString(), 0);
            this.f.close();
        } catch (ark>com.mixpanel.android.a.kark>$a v0_5) {
            this.f.close();
            throw v0_5;
        } catch (ark>com.mixpanel.android.a.kark>$a v0_1) {
            com.mixpanel.android.util.e.e("MixpanelAPI.Database", new StringBuilder().append("Could not clean timed-out Mixpanel records from ").append(v1_0).append(". Re-initializing database.").toString(), v0_1);
            this.f.a();
            this.f.close();
        }
        return;
    }

Method com.mixpanel.android.a.k.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    private void a(ark>com.mixpanel.android.a.kark>$b p6, String p7)
    {
        String v1_0 = p6.a();
        try {
            this.f.getWritableDatabase().delete(v1_0, new StringBuilder().append("automatic_data = 1 AND token = \'").append(p7).append("\'").toString(), 0);
            this.f.close();
        } catch (ark>com.mixpanel.android.a.kark>$a v0_6) {
            this.f.close();
            throw v0_6;
        } catch (ark>com.mixpanel.android.a.kark>$a v0_2) {
            com.mixpanel.android.util.e.e("MixpanelAPI.Database", new StringBuilder().append("Could not clean automatic Mixpanel records from ").append(v1_0).append(". Re-initializing database.").toString(), v0_2);
            this.f.a();
            this.f.close();
        }
        return;
    }

Method com.mixpanel.android.a.k$a.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    private void a(android.database.sqlite.SQLiteDatabase p8)
    {
        p8.execSQL(new StringBuilder().append("ALTER TABLE ").append(com.mixpanel.android.a.k$b.a.a()).append(" ADD COLUMN ").append("automatic_data").append(" INTEGER DEFAULT 0").toString());
        p8.execSQL(new StringBuilder().append("ALTER TABLE ").append(com.mixpanel.android.a.k$b.b.a()).append(" ADD COLUMN ").append("automatic_data").append(" INTEGER DEFAULT 0").toString());
        p8.execSQL(new StringBuilder().append("ALTER TABLE ").append(com.mixpanel.android.a.k$b.a.a()).append(" ADD COLUMN ").append("token").append(" STRING NOT NULL DEFAULT \'\'").toString());
        p8.execSQL(new StringBuilder().append("ALTER TABLE ").append(com.mixpanel.android.a.k$b.b.a()).append(" ADD COLUMN ").append("token").append(" STRING NOT NULL DEFAULT \'\'").toString());
        android.database.Cursor v2_0 = p8.rawQuery(new StringBuilder().append("SELECT * FROM ").append(com.mixpanel.android.a.k$b.a.a()).toString(), 0);
        while (v2_0.moveToNext()) {
            try {
                org.json.JSONException v3_16 = new org.json.JSONObject(v2_0.getString(v2_0.getColumnIndex("data"))).getJSONObject("properties").getString("token");
                String v0_25 = v2_0.getInt(v2_0.getColumnIndex("_id"));
                try {
                    p8.execSQL(new StringBuilder().append("UPDATE ").append(com.mixpanel.android.a.k$b.a.a()).append(" SET ").append("token").append(" = \'").append(v3_16).append("\' WHERE _id = ").append(v0_25).toString());
                } catch (org.json.JSONException v3) {
                    p8.delete(com.mixpanel.android.a.k$b.a.a(), new StringBuilder().append("_id = ").append(v0_25).toString(), 0);
                }
            } catch (String v0) {
                v0_25 = 0;
            }
        }
        android.database.Cursor v2_5 = p8.rawQuery(new StringBuilder().append("SELECT * FROM ").append(com.mixpanel.android.a.k$b.b.a()).toString(), 0);
        while (v2_5.moveToNext()) {
            try {
                org.json.JSONException v3_4 = new org.json.JSONObject(v2_5.getString(v2_5.getColumnIndex("data"))).getString("$token");
                String v0_13 = v2_5.getInt(v2_5.getColumnIndex("_id"));
                try {
                    p8.execSQL(new StringBuilder().append("UPDATE ").append(com.mixpanel.android.a.k$b.b.a()).append(" SET ").append("token").append(" = \'").append(v3_4).append("\' WHERE _id = ").append(v0_13).toString());
                } catch (org.json.JSONException v3) {
                    p8.delete(com.mixpanel.android.a.k$b.b.a(), new StringBuilder().append("_id = ").append(v0_13).toString(), 0);
                }
            } catch (String v0) {
                v0_13 = 0;
            }
        }
        return;
    }

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


    public final void zze(com.google.android.gms.internal.zzcak p11)
    {
        this.zzauj().zzug();
        this.a();
        com.google.android.gms.common.internal.zzbp.zzu(p11);
        com.google.android.gms.common.internal.zzbp.zzgf(p11.packageName);
        if (!android.text.TextUtils.isEmpty(p11.zziln)) {
            String v0_4 = this.zzaue().b(p11.packageName);
            if ((v0_4 != null) && ((android.text.TextUtils.isEmpty(v0_4.d())) && (!android.text.TextUtils.isEmpty(p11.zziln)))) {
                v0_4.g(0);
                this.zzaue().a(v0_4);
                this.zzauh().d(p11.packageName);
            }
            if (p11.zzils) {
                long v4 = p11.zzilx;
                if (v4 == 0) {
                    v4 = this.p.currentTimeMillis();
                }
                Long v6_12;
                String v0_65 = p11.zzily;
                if ((v0_65 == null) || (v0_65 == 1)) {
                    v6_12 = v0_65;
                } else {
                    this.zzauk().zzaye().zze("Incorrect app type, assuming installed app. appId, appType", com.google.android.gms.internal.zzcbo.a(p11.packageName), Integer.valueOf(v0_65));
                    v6_12 = 0;
                }
                this.zzaue().b();
                try {
                    String v0_7 = this.zzaue().b(p11.packageName);
                } catch (String v0_61) {
                    this.zzaue().d();
                    throw v0_61;
                }
                if ((v0_7 != null) && ((v0_7.d() != null) && (!v0_7.d().equals(p11.zziln)))) {
                    this.zzauk().zzaye().zzj("New GMP App Id passed in. Removing cached database data. appId", com.google.android.gms.internal.zzcbo.a(v0_7.b()));
                    String v1_40 = this.zzaue();
                    long v2_51 = v0_7.b();
                    v1_40.t();
                    v1_40.zzug();
                    com.google.android.gms.common.internal.zzbp.zzgf(v2_51);
                    try {
                        String v0_73 = v1_40.e();
                        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.zzauk().zzayc().zze("Error deleting application data. appId, error", com.google.android.gms.internal.zzcbo.a(v2_51), v0_6);
                        v0_7 = 0;
                    }
                    if (v0_3 <= null) {
                    } else {
                        v1_40.zzauk().zzayi().zze("Deleted application data. app, records", v2_51, Integer.valueOf(v0_3));
                    }
                }
                if ((v0_7 != null) && ((v0_7.i() != null) && (!v0_7.i().equals(p11.zzhtl)))) {
                    String v3_5 = new android.os.Bundle();
                    v3_5.putString("_pv", v0_7.i());
                    this.a(new com.google.android.gms.internal.zzcbc("_au", new com.google.android.gms.internal.zzcaz(v3_5), "auto", v4), p11);
                }
                this.b(p11);
                String v0_11 = 0;
                if (v6_12 != null) {
                    if (v6_12 == 1) {
                        v0_11 = this.zzaue().a(p11.packageName, "_v");
                    }
                } else {
                    v0_11 = this.zzaue().a(p11.packageName, "_f");
                }
                if (v0_11 != null) {
                    if (p11.zzilt) {
                        this.a(new com.google.android.gms.internal.zzcbc("_cd", new com.google.android.gms.internal.zzcaz(new android.os.Bundle()), "auto", v4), p11);
                    }
                } else {
                    String v0_19 = ((1 + (v4 / 3600000)) * 3600000);
                    if (v6_12 != null) {
                        if (v6_12 == 1) {
                            this.a(new com.google.android.gms.internal.zzcfl("_fvt", v4, Long.valueOf(v0_19), "auto"), p11);
                            this.zzauj().zzug();
                            this.a();
                            String v3_12 = new android.os.Bundle();
                            v3_12.putLong("_c", 1);
                            v3_12.putLong("_r", 1);
                            this.a(new com.google.android.gms.internal.zzcbc("_v", new com.google.android.gms.internal.zzcaz(v3_12), "auto", v4), p11);
                        }
                    } else {
                        this.a(new com.google.android.gms.internal.zzcfl("_fot", v4, Long.valueOf(v0_19), "auto"), p11);
                        this.zzauj().zzug();
                        this.a();
                        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.b.getPackageManager() != null) {
                            String v1_18 = com.google.android.gms.internal.zzbdp.zzcs(this.b).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.a(new com.google.android.gms.internal.zzcfl("_fi", v4, Long.valueOf(v0_41), "auto"), p11);
                            }
                            String v0_44 = com.google.android.gms.internal.zzbdp.zzcs(this.b).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.zzauk().zzayc().zzj("PackageManager is null, first open report might be inaccurate. appId", com.google.android.gms.internal.zzcbo.a(p11.packageName));
                        }
                        String v0_52 = this.zzaue();
                        String v1_27 = p11.packageName;
                        com.google.android.gms.common.internal.zzbp.zzgf(v1_27);
                        v0_52.zzug();
                        v0_52.t();
                        String v0_54 = v0_52.h(v1_27, "first_open_count");
                        if (v0_54 >= 0) {
                            v8_17.putLong("_pfo", v0_54);
                        }
                        this.a(new com.google.android.gms.internal.zzcbc("_f", new com.google.android.gms.internal.zzcaz(v8_17), "auto", v4), p11);
                    }
                    String v3_22 = new android.os.Bundle();
                    v3_22.putLong("_et", 1);
                    this.a(new com.google.android.gms.internal.zzcbc("_e", new com.google.android.gms.internal.zzcaz(v3_22), "auto", v4), p11);
                }
                this.zzaue().c();
                this.zzaue().d();
            } else {
                this.b(p11);
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzcco.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    protected final void a(int p10, Throwable p11, byte[] p12)
    {
        this.zzauj().zzug();
        this.a();
        try {
            if (p12 == null) {
                p12 = new byte[0];
            }
        } catch (boolean v0_12) {
            this.M = 0;
            this.p();
            throw v0_12;
        }
        boolean v0_29 = this.F;
        this.F = 0;
        if (((p10 != 200) && (p10 != 204)) || (p11 != null)) {
            boolean v0_20;
            this.zzauk().zzayi().zze("Network upload failed. Will retry later. code, error", Integer.valueOf(p10), p11);
            this.zzaul().d.set(this.p.currentTimeMillis());
            if ((p10 != 503) && (p10 != 429)) {
                v0_20 = 0;
            } else {
                v0_20 = 1;
            }
            if (v0_20) {
                this.zzaul().e.set(this.p.currentTimeMillis());
            }
            this.n();
        } else {
            try {
                this.zzaul().c.set(this.p.currentTimeMillis());
                this.zzaul().d.set(0);
                this.n();
                this.zzauk().zzayi().zze("Successful upload. Got network response. code, size", Integer.valueOf(p10), Integer.valueOf(p12.length));
                this.zzaue().b();
                try {
                    String v3_15 = v0_29.iterator();
                } catch (boolean v0_7) {
                    this.zzaue().d();
                    throw v0_7;
                }
                while (v3_15.hasNext()) {
                    boolean v0_1 = ((Long) v3_15.next());
                    com.google.android.gms.internal.fz v4_0 = this.zzaue();
                    String v6_0 = v0_1.longValue();
                    v4_0.zzug();
                    v4_0.t();
                    boolean v0_2 = v4_0.e();
                    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.zzauk().zzayc().zzj("Failed to delete a bundle in a queue table", v0_6);
                        throw v0_6;
                    }
                }
                this.zzaue().c();
                this.zzaue().d();
                if ((!this.zzayz().zzyu()) || (!this.m())) {
                    this.J = -1;
                    this.n();
                } else {
                    this.zzazf();
                }
                this.K = 0;
            } catch (boolean v0_8) {
                this.zzauk().zzayc().zzj("Database error while trying to delete uploaded bundles", v0_8);
                this.K = this.p.elapsedRealtime();
                this.zzauk().zzayi().zzj("Disable upload, time", Long.valueOf(this.K));
            }
        }
        this.M = 0;
        this.p();
        return;
    }

Method com.google.android.gms.internal.zzcbk.zzdv() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final java.util.List zzdv(int p15)
    {
        java.util.ArrayList v0_13;
        this.zzug();
        this.zzatu();
        if (!this.b) {
            java.util.ArrayList v10_1 = new java.util.ArrayList();
            if (this.getContext().getDatabasePath(com.google.android.gms.internal.zzcap.q()).exists()) {
                int v9 = 5;
                int v12 = 0;
                while (v12 < 5) {
                    String v1_27 = 0;
                    try {
                        java.util.ArrayList v0_14 = this.b();
                        try {
                            if (v0_14 != null) {
                                v0_14.beginTransaction();
                                Throwable v2_3 = new String[3];
                                v2_3[0] = "rowid";
                                v2_3[1] = "type";
                                v2_3[2] = "entry";
                                Throwable v2_1 = v0_14.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_0 = v2_1.getBlob(2);
                                        if (v1_46 != null) {
                                            if (v1_46 != 1) {
                                                if (v1_46 != 2) {
                                                    this.zzauk().zzayc().log("Unknown record type in local database");
                                                } else {
                                                    android.os.Parcel v7_0 = android.os.Parcel.obtain();
                                                    try {
                                                        v7_0.unmarshall(v6_0, 0, v6_0.length);
                                                        v7_0.setDataPosition(0);
                                                        String v1_6 = ((com.google.android.gms.internal.zzcan) com.google.android.gms.internal.zzcan.CREATOR.createFromParcel(v7_0));
                                                    } catch (String v1) {
                                                        this.zzauk().zzayc().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_0, 0, v6_0.length);
                                                    v7_1.setDataPosition(0);
                                                    String v1_14 = ((com.google.android.gms.internal.zzcfl) com.google.android.gms.internal.zzcfl.CREATOR.createFromParcel(v7_1));
                                                } catch (String v1) {
                                                    this.zzauk().zzayc().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_0, 0, v6_0.length);
                                                v3_5.setDataPosition(0);
                                                String v1_22 = ((com.google.android.gms.internal.zzcbc) com.google.android.gms.internal.zzcbc.CREATOR.createFromParcel(v3_5));
                                            } catch (String v1_25) {
                                                v3_5.recycle();
                                                throw v1_25;
                                            } catch (String v1) {
                                                this.zzauk().zzayc().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_14;
                                    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_14;
                                    java.util.ArrayList v0_5 = v1_28;
                                    try {
                                        this.zzauk().zzayc().zzj("Error reading entries from local database", v0_5);
                                        this.b = 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_11 = v9;
                                        v12++;
                                        v9 = v0_11;
                                    } else {
                                        v2_0.close();
                                        v0_11 = v9;
                                    }
                                } catch (String v1_26) {
                                    v1_27 = v0_14;
                                    java.util.ArrayList v0_4 = v1_26;
                                    try {
                                        if (android.os.Build$VERSION.SDK_INT < 11) {
                                            if (v1_27 != null) {
                                                if (v1_27.inTransaction()) {
                                                    v1_27.endTransaction();
                                                }
                                            }
                                            this.zzauk().zzayc().zzj("Error reading entries from local database", v0_4);
                                            this.b = 1;
                                            v0_11 = v9;
                                        } else {
                                            if (!(v0_4 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                            } else {
                                                android.os.SystemClock.sleep(((long) v9));
                                                v0_11 = (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_6 = new String[1];
                                v6_6[0] = Long.toString(v4_8);
                                if (v0_14.delete("messages", "rowid <= ?", v6_6) < v10_1.size()) {
                                    this.zzauk().zzayc().log("Fewer entries removed from local database than expected");
                                }
                                v0_14.setTransactionSuccessful();
                                v0_14.endTransaction();
                                if (v2_1 != null) {
                                    v2_1.close();
                                }
                                if (v0_14 != null) {
                                    v0_14.close();
                                }
                                v0_13 = v10_1;
                            } else {
                                this.b = 1;
                                if (v0_14 != null) {
                                    v0_14.close();
                                }
                                v0_13 = 0;
                            }
                        } catch (String v1_36) {
                            v2_1 = 0;
                            v1_27 = v0_14;
                            v0_7 = v1_36;
                        } catch (String v1_33) {
                            v2_0 = v0_14;
                            v0_5 = v1_33;
                            v1_29 = 0;
                        } catch (String v1_32) {
                            v2_1 = 0;
                            v1_27 = v0_14;
                            v0_4 = v1_32;
                        }
                    } catch (java.util.ArrayList v0_7) {
                        v2_1 = 0;
                    } catch (java.util.ArrayList v0_5) {
                        v2_0 = 0;
                        v1_29 = 0;
                    } catch (java.util.ArrayList v0_4) {
                        v2_1 = 0;
                    }
                }
                this.zzauk().zzaye().log("Failed to read events from database in reasonable time");
                v0_13 = 0;
            } else {
                v0_13 = v10_1;
            }
        } else {
            v0_13 = 0;
        }
        return v0_13;
    }

Method com.google.android.gms.internal.zzcbk.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final boolean a(int p14, byte[] p15)
    {
        int v0_3;
        this.zzatu();
        this.zzug();
        if (!this.b) {
            android.content.ContentValues v7_1 = new android.content.ContentValues();
            v7_1.put("type", Integer.valueOf(p14));
            v7_1.put("entry", p15);
            com.google.android.gms.internal.zzcap.zzaws();
            int v6 = 0;
            int v0_1 = 5;
            while (v6 < 5) {
                android.database.Cursor v2 = 0;
                try {
                    android.database.sqlite.SQLiteDatabase v3 = this.b();
                } catch (com.google.android.gms.internal.zzcbq v1_1) {
                    this.zzauk().zzayc().zzj("Error writing entry to local database", v1_1);
                    this.b = 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_3 = 1;
                } catch (com.google.android.gms.internal.zzcbq v1_21) {
                    if (android.os.Build$VERSION.SDK_INT < 11) {
                        if (v3 != null) {
                            if (v3.inTransaction()) {
                                v3.endTransaction();
                            }
                        }
                        this.zzauk().zzayc().zzj("Error writing entry to local database", v1_21);
                        this.b = 1;
                    } else {
                        if (!(v1_21 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_2) {
                    if (v2 != null) {
                        v2.close();
                    }
                    if (v3 != null) {
                        v3.close();
                    }
                    throw v0_2;
                }
                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.zzauk().zzayc().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.zzauk().zzayc().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.b = 1;
                    if (v3 != null) {
                        v3.close();
                    }
                    v0_3 = 0;
                }
            }
            this.zzauk().zzaye().log("Failed to write entry to local database");
            v0_3 = 0;
        } else {
            v0_3 = 0;
        }
        return v0_3;
    }

Method com.google.android.gms.internal.fz.h() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void h()
    {
        this.zzug();
        this.t();
        if (this.u()) {
            Integer v0_12 = this.zzaul().f.get();
            String v2_1 = this.zzvu().elapsedRealtime();
            if (Math.abs((v2_1 - v0_12)) > com.google.android.gms.internal.zzcap.zzawm()) {
                this.zzaul().f.set(v2_1);
                this.zzug();
                this.t();
                if (this.u()) {
                    Integer v0_7 = this.e();
                    com.google.android.gms.internal.zzcbq v1_1 = new String[2];
                    v1_1[0] = String.valueOf(this.zzvu().currentTimeMillis());
                    v1_1[1] = String.valueOf(com.google.android.gms.internal.zzcap.zzawl());
                    Integer v0_8 = v0_7.delete("queue", "abs(bundle_end_timestamp - ?) > cast(? as integer)", v1_1);
                    if (v0_8 > null) {
                        this.zzauk().zzayi().zzj("Deleted stale rows. rowsDeleted", Integer.valueOf(v0_8));
                    }
                }
            }
        }
        return;
    }

Method com.google.android.gms.internal.fz.e() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final int e(String p7, String p8)
    {
        String vtmp1 = com.google.android.gms.common.internal.zzbp.zzgf(p7);
        com.google.android.gms.common.internal.zzbp.zzgf(p8);
        this.zzug();
        this.t();
        try {
            android.database.sqlite.SQLiteException v1_1 = this.e();
            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.zzauk().zzayc().zzd("Error deleting conditional property", com.google.android.gms.internal.zzcbo.a(p7), this.zzauf().c(p8), v1_0);
        }
        return v0;
    }

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


    public final long c(String p7)
    {
        com.google.android.gms.common.internal.zzbp.zzgf(p7);
        this.zzug();
        this.t();
        try {
            long v0_3 = this.e();
            com.google.android.gms.internal.zzcbq v1_2 = String.valueOf(Math.max(0, Math.min(1000000, this.zzaum().zzb(p7, com.google.android.gms.internal.zzcbe.zzioh))));
            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.zzauk().zzayc().zze("Error deleting over the limit events. appId", com.google.android.gms.internal.zzcbo.a(p7), v0_2);
            v0_1 = 0;
        }
        return v0_1;
    }

Method com.google.android.gms.internal.fz.b() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void b(String p6, String p7)
    {
        com.google.android.gms.common.internal.zzbp.zzgf(p6);
        com.google.android.gms.common.internal.zzbp.zzgf(p7);
        this.zzug();
        this.t();
        try {
            android.database.sqlite.SQLiteException v0_3 = this.e();
            Object v3_2 = new String[2];
            v3_2[0] = p6;
            v3_2[1] = p7;
            this.zzauk().zzayi().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.zzauk().zzayc().zzd("Error deleting user attribute. appId", com.google.android.gms.internal.zzcbo.a(p6), this.zzauf().c(p7), v0_2);
        }
        return;
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    public final void a(java.util.List p7)
    {
        com.google.android.gms.common.internal.zzbp.zzu(p7);
        this.zzug();
        this.t();
        String v2_3 = new StringBuilder("rowid in (");
        com.google.android.gms.internal.zzcbq 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.e().delete("raw_events", v2_3.toString(), 0);
        if (v0_2 != p7.size()) {
            this.zzauk().zzayc().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.fz.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    final void a(String p13, com.google.android.gms.internal.zzcfp[] p14)
    {
        int v0_0 = 0;
        this.t();
        this.zzug();
        com.google.android.gms.common.internal.zzbp.zzgf(p13);
        com.google.android.gms.common.internal.zzbp.zzu(p14);
        android.database.sqlite.SQLiteDatabase v5 = this.e();
        v5.beginTransaction();
        try {
            this.t();
            this.zzug();
            com.google.android.gms.common.internal.zzbp.zzgf(p13);
            int v1_0 = this.e();
            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.t();
            this.zzug();
            com.google.android.gms.common.internal.zzbp.zzgf(p13);
            com.google.android.gms.common.internal.zzbp.zzu(v3_8);
            com.google.android.gms.common.internal.zzbp.zzu(v3_8.zzixg);
            com.google.android.gms.common.internal.zzbp.zzu(v3_8.zzixf);
            if (v3_8.zzixe != null) {
                String v7_6 = v3_8.zzixe.intValue();
                String v8_3 = v3_8.zzixg;
                int v2_3 = 0;
                while (v2_3 < v8_3.length) {
                    if (v8_3[v2_3].zzixi != null) {
                        v2_3++;
                    } else {
                        this.zzauk().zzaye().zze("Event filter with no ID. Audience definition ignored. appId, audienceId", com.google.android.gms.internal.zzcbo.a(p13), v3_8.zzixe);
                    }
                }
                String v8_4 = v3_8.zzixf;
                int v2_0 = 0;
                while (v2_0 < v8_4.length) {
                    if (v8_4[v2_0].zzixi != null) {
                        v2_0++;
                    } else {
                        this.zzauk().zzaye().zze("Property filter with no ID. Audience definition ignored. appId, audienceId", com.google.android.gms.internal.zzcbo.a(p13), v3_8.zzixe);
                    }
                }
                String v8_5 = v3_8.zzixg;
                int v2_15 = 0;
                while (v2_15 < v8_5.length) {
                    if (this.a(p13, v7_6, v8_5[v2_15])) {
                        v2_15++;
                    } else {
                        int v2_16 = 0;
                    }
                    if (v2_16 != 0) {
                        String v8_6 = v3_8.zzixf;
                        int v3_9 = 0;
                        while (v3_9 < v8_6.length) {
                            if (this.a(p13, v7_6, v8_6[v3_9])) {
                                v3_9++;
                            } else {
                                v2_16 = 0;
                                break;
                            }
                        }
                    }
                    if (v2_16 == 0) {
                        this.t();
                        this.zzug();
                        com.google.android.gms.common.internal.zzbp.zzgf(p13);
                        int v2_17 = this.e();
                        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.zzauk().zzaye().zzj("Audience with no ID. appId", com.google.android.gms.internal.zzcbo.a(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].zzixe);
            v0_0++;
        }
        this.a(p13, v1_3);
        v5.setTransactionSuccessful();
        v5.endTransaction();
        return;
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.delete()


    private final boolean a(String p9, java.util.List p10)
    {
        String v2 = 0;
        com.google.android.gms.common.internal.zzbp.zzgf(p9);
        this.t();
        this.zzug();
        Object v4_1 = this.e();
        try {
            int v1_11 = new String[1];
            v1_11[0] = p9;
            int v0_1 = this.b("select count(1) from audience_filter_values where app_id=?", v1_11);
            String v5_4 = Math.max(0, Math.min(2000, this.zzaum().zzb(p9, com.google.android.gms.internal.zzcbe.zziox)));
        } catch (int v0_3) {
            this.zzauk().zzayc().zze("Database error querying filters. appId", com.google.android.gms.internal.zzcbo.a(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.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.d() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void d(String p7, String p8)
    {
        this.c(p7, p8);
        String v0_3 = this.a.getWritableDatabase();
        String[] v3_1 = new String[2];
        v3_1[0] = p7;
        v3_1[1] = p8;
        if (v0_3.delete("datasets", "identity_id = ? AND dataset_name = ?", v3_1) != 1) {
            Object[] v2_0 = new Object[1];
            v2_0[0] = p8;
            android.util.Log.e("SQLiteLocalStorage", String.format("failed to purge dataset %s", v2_0));
        }
        return;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.c() calling method android.database.sqlite.SQLiteDatabase.delete()


    public void c(String p8, String p9)
    {
        android.database.sqlite.SQLiteDatabase v1 = this.a.getWritableDatabase();
        v1.beginTransaction();
        try {
            Object[] v3_8 = new String[2];
            v3_8[0] = p8;
            v3_8[1] = p9;
            int v4_2 = new Object[2];
            v4_2[0] = Integer.valueOf(v1.delete("records", "identity_id = ? AND dataset_name = ?", v3_8));
            v4_2[1] = p9;
            android.util.Log.i("SQLiteLocalStorage", String.format("%d records were deleted from dataset %s", v4_2));
            String v0_6 = new android.content.ContentValues();
            v0_6.put("last_modified_timestamp", Long.valueOf(System.currentTimeMillis()));
            v0_6.put("last_sync_count", String.valueOf(-1));
            int v4_5 = new String[2];
            v4_5[0] = p8;
            v4_5[1] = p9;
        } catch (String v0_10) {
            v1.endTransaction();
            throw v0_10;
        }
        if (v1.update("datasets", v0_6, "identity_id = ? AND dataset_name = ?", v4_5) == 1) {
            v1.setTransactionSuccessful();
        } else {
            Object[] v3_6 = new Object[1];
            v3_6[0] = p9;
            android.util.Log.e("SQLiteLocalStorage", String.format("couldn\'t mark dataset %s deleted", v3_6));
        }
        v1.endTransaction();
        return;
    }

Method com.google.android.gms.internal.zzcco.a() calling method android.database.sqlite.SQLiteDatabase.query()


    private final boolean a(String p21, long p22)
    {
        this.zzaue().b();
        try {
            ark>com.google.android.gms.internal.zzccoark>$a v15_1 = new ark>com.google.android.gms.internal.zzccoark>$a(this, 0);
            int v14_1 = this.zzaue();
            com.google.android.gms.internal.zzcfz v4_10 = 0;
            com.google.android.gms.internal.zzcgc v16_0 = this.J;
            com.google.android.gms.common.internal.zzbp.zzu(v15_1);
            v14_1.zzug();
            v14_1.t();
            int v3_4 = 0;
            try {
                com.google.android.gms.internal.zzcfz v13_1;
                String[] v12_1;
                com.google.android.gms.internal.zzcbq v2_3 = v14_1.e();
            } catch (com.google.android.gms.internal.zzcbq v2_1) {
                v14_1.zzauk().zzayc().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzcbo.a(v4_10), v2_1);
                if (v3_4 == 0) {
                    if ((v15_1.c != null) && (!v15_1.c.isEmpty())) {
                        com.google.android.gms.internal.zzcbq v2_24 = 0;
                    } else {
                        v2_24 = 1;
                    }
                    com.google.android.gms.internal.zzcbq v2_27;
                    if (v2_24 != null) {
                        this.zzaue().c();
                        this.zzaue().d();
                        v2_27 = 0;
                    } else {
                        com.google.android.gms.internal.zzcfz v13_0 = 0;
                        com.google.android.gms.internal.zzcgc v16_1 = v15_1.a;
                        com.google.android.gms.internal.zzcbq v2_30 = new com.google.android.gms.internal.zzcfz[v15_1.c.size()];
                        v16_1.zziza = v2_30;
                        String[] v12_0 = 0;
                        int v14_0 = 0;
                        while (v14_0 < v15_1.c.size()) {
                            com.google.android.gms.internal.zzcbq v2_171;
                            int v3_72;
                            if (!this.zzauh().b(v15_1.a.zzch, ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) {
                                com.google.android.gms.internal.zzcfz v4_71;
                                boolean v17 = this.zzauh().c(v15_1.a.zzch, ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name);
                                if (v17) {
                                    int v3_41 = 0;
                                    com.google.android.gms.internal.zzcfz v4_43 = 0;
                                    if (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys == null) {
                                        int v5_34 = new com.google.android.gms.internal.zzcga[0];
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v5_34;
                                    }
                                    int v6_20 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys;
                                    com.google.android.gms.internal.zzcga[] v7_27 = v6_20.length;
                                    int v5_35 = 0;
                                    while (v5_35 < v7_27) {
                                        com.google.android.gms.internal.zzcbq v2_173;
                                        com.google.android.gms.internal.zzcbq v2_172 = v6_20[v5_35];
                                        if (!"_c".equals(v2_172.name)) {
                                            if (!"_r".equals(v2_172.name)) {
                                                v2_173 = v4_43;
                                            } else {
                                                v2_172.zziyw = Long.valueOf(1);
                                                v2_173 = 1;
                                            }
                                        } else {
                                            v2_172.zziyw = Long.valueOf(1);
                                            v3_41 = 1;
                                            v2_173 = v4_43;
                                        }
                                        v5_35++;
                                        v4_43 = v2_173;
                                    }
                                    if ((v3_41 == 0) && (v17)) {
                                        this.zzauk().zzayi().zzj("Marking event as conversion", this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcbq v2_127 = ((com.google.android.gms.internal.zzcga[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys, (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys.length + 1)));
                                        int v3_46 = new com.google.android.gms.internal.zzcga();
                                        v3_46.name = "_c";
                                        v3_46.zziyw = Long.valueOf(1);
                                        v2_127[(v2_127.length - 1)] = v3_46;
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v2_127;
                                    }
                                    if (v4_43 == null) {
                                        this.zzauk().zzayi().zzj("Marking event as real-time", this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcbq v2_144 = ((com.google.android.gms.internal.zzcga[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys, (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys.length + 1)));
                                        int v3_53 = new com.google.android.gms.internal.zzcga();
                                        v3_53.name = "_r";
                                        v3_53.zziyw = Long.valueOf(1);
                                        v2_144[(v2_144.length - 1)] = v3_53;
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v2_144;
                                    }
                                    if (this.zzaue().a(this.l(), v15_1.a.zzch, 0, 0, 0, 0, 1).e <= ((long) this.c.zzis(v15_1.a.zzch))) {
                                        v13_0 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcbq v2_148 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                        int v3_62 = 0;
                                        while (v3_62 < v2_148.zziys.length) {
                                            if (!"_r".equals(v2_148.zziys[v3_62].name)) {
                                                v3_62++;
                                            } else {
                                                com.google.android.gms.internal.zzcfz v4_59 = new com.google.android.gms.internal.zzcga[(v2_148.zziys.length - 1)];
                                                if (v3_62 > 0) {
                                                    System.arraycopy(v2_148.zziys, 0, v4_59, 0, v3_62);
                                                }
                                                if (v3_62 < v4_59.length) {
                                                    System.arraycopy(v2_148.zziys, (v3_62 + 1), v4_59, v3_62, (v4_59.length - v3_62));
                                                }
                                                v2_148.zziys = v4_59;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzcfo.a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) || ((!v17) || (this.zzaue().a(this.l(), v15_1.a.zzch, 0, 0, 1, 0, 0).c <= ((long) this.c.zzb(v15_1.a.zzch, com.google.android.gms.internal.zzcbe.zziof))))) {
                                        v4_71 = v13_0;
                                    } else {
                                        this.zzauk().zzaye().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                        com.google.android.gms.internal.zzcbq v2_162 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                        int v5_57 = 0;
                                        com.google.android.gms.internal.zzcfz v4_67 = 0;
                                        com.google.android.gms.internal.zzcga[] v7_33 = v2_162.zziys;
                                        int v6_34 = 0;
                                        while (v6_34 < v7_33.length) {
                                            com.google.android.gms.internal.zzcfz v4_72;
                                            int v3_74 = v7_33[v6_34];
                                            if (!"_c".equals(v3_74.name)) {
                                                if (!"_err".equals(v3_74.name)) {
                                                    v3_74 = v4_67;
                                                    v4_72 = v5_57;
                                                } else {
                                                    v4_72 = 1;
                                                    v3_74 = v4_67;
                                                }
                                            } else {
                                                v4_72 = v5_57;
                                            }
                                            v6_34++;
                                            v5_57 = v4_72;
                                            v4_67 = v3_74;
                                        }
                                        if ((v5_57 == 0) || (v4_67 == null)) {
                                            if (v4_67 == null) {
                                                this.zzauk().zzayc().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                            } else {
                                                v4_67.name = "_err";
                                                v4_67.zziyw = Long.valueOf(10);
                                                v4_71 = v13_0;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcga[] v7_35 = new com.google.android.gms.internal.zzcga[(v2_162.zziys.length - 1)];
                                            int v5_58 = 0;
                                            com.google.android.gms.internal.zzcga[] v8_17 = v2_162.zziys;
                                            int v9_4 = v8_17.length;
                                            int v6_35 = 0;
                                            while (v6_35 < v9_4) {
                                                int v3_73;
                                                com.google.android.gms.internal.zzcga v10_4 = v8_17[v6_35];
                                                if (v10_4 == v4_67) {
                                                    v3_73 = v5_58;
                                                } else {
                                                    v3_73 = (v5_58 + 1);
                                                    v7_35[v5_58] = v10_4;
                                                }
                                                v6_35++;
                                                v5_58 = v3_73;
                                            }
                                            v2_162.zziys = v7_35;
                                            v4_71 = v13_0;
                                        }
                                    }
                                } else {
                                    this.zzaug();
                                    if (!com.google.android.gms.internal.zzcfo.f(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) {
                                    }
                                }
                                int v3_71 = (v12_0 + 1);
                                v16_1.zziza[v12_0] = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                v2_171 = v3_71;
                                v3_72 = v4_71;
                            } else {
                                com.google.android.gms.internal.zzcbq v2_187;
                                this.zzauk().zzaye().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch), this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                if ((!this.zzaug().d(v15_1.a.zzch)) && (!this.zzaug().e(v15_1.a.zzch))) {
                                    v2_187 = 0;
                                } else {
                                    v2_187 = 1;
                                }
                                if ((v2_187 != null) || ("_err".equals(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name))) {
                                    v2_171 = v12_0;
                                    v3_72 = v13_0;
                                } else {
                                    this.zzaug().zza(v15_1.a.zzch, 11, "_ev", ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name, 0);
                                    v2_171 = v12_0;
                                    v3_72 = v13_0;
                                }
                            }
                            v14_0++;
                            v12_0 = v2_171;
                            v13_0 = v3_72;
                        }
                        if (v12_0 < v15_1.c.size()) {
                            v16_1.zziza = ((com.google.android.gms.internal.zzcfz[]) java.util.Arrays.copyOf(v16_1.zziza, v12_0));
                        }
                        v16_1.zzizt = this.a(v15_1.a.zzch, v15_1.a.zzizb, v16_1.zziza);
                        v16_1.zzizd = Long.valueOf(nan);
                        v16_1.zzize = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcbq v2_46 = 0;
                        while (v2_46 < v16_1.zziza.length) {
                            int v3_37 = v16_1.zziza[v2_46];
                            if (v3_37.zziyt.longValue() < v16_1.zzizd.longValue()) {
                                v16_1.zzizd = v3_37.zziyt;
                            }
                            if (v3_37.zziyt.longValue() > v16_1.zzize.longValue()) {
                                v16_1.zzize = v3_37.zziyt;
                            }
                            v2_46++;
                        }
                        int v6_15 = v15_1.a.zzch;
                        com.google.android.gms.internal.zzcga[] v7_18 = this.zzaue().b(v6_15);
                        if (v7_18 != null) {
                            if (v16_1.zziza.length > 0) {
                                com.google.android.gms.internal.zzcfz v4_22;
                                com.google.android.gms.internal.zzcbq v2_52 = v7_18.h();
                                if (v2_52 == 0) {
                                    v4_22 = 0;
                                } else {
                                    v4_22 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizg = v4_22;
                                com.google.android.gms.internal.zzcfz v4_23 = v7_18.g();
                                if (v4_23 != 0) {
                                    v2_52 = v4_23;
                                }
                                com.google.android.gms.internal.zzcbq v2_53;
                                if (v2_52 == 0) {
                                    v2_53 = 0;
                                } else {
                                    v2_53 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizf = v2_53;
                                v7_18.r();
                                v16_1.zzizr = Integer.valueOf(((int) v7_18.o()));
                                v7_18.a(v16_1.zzizd.longValue());
                                v7_18.b(v16_1.zzize.longValue());
                                v16_1.zzilr = v7_18.z();
                                this.zzaue().a(v7_18);
                            }
                        } else {
                            this.zzauk().zzayc().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                        }
                        if (v16_1.zziza.length > 0) {
                            com.google.android.gms.internal.zzcap.zzawj();
                            com.google.android.gms.internal.zzcbq v2_68 = this.zzauh().a(v15_1.a.zzch);
                            if ((v2_68 != null) && (v2_68.zziyh != null)) {
                                v16_1.zzizx = v2_68.zziyh;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v15_1.a.zziln)) {
                                    this.zzauk().zzaye().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                } else {
                                    v16_1.zzizx = Long.valueOf(-1);
                                }
                            }
                            this.zzaue().a(v16_1, v13_0);
                        }
                        this.zzaue().a(v15_1.b);
                        int v3_32 = this.zzaue();
                        com.google.android.gms.internal.zzcbq v2_79 = v3_32.e();
                        int v5_29 = new String[2];
                        v5_29[0] = v6_15;
                        v5_29[1] = v6_15;
                        v2_79.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_29);
                        this.zzaue().c();
                        if (v16_1.zziza.length <= 0) {
                            v2_27 = 0;
                        } else {
                            v2_27 = 1;
                        }
                        this.zzaue().d();
                    }
                    return v2_27;
                } else {
                    v3_4.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_12;
                if (v16_0 == -1) {
                    int v5_20 = new String[1];
                    v5_20[0] = 0;
                    v6_12 = v5_20;
                } else {
                    int v5_25 = new String[2];
                    v5_25[0] = 0;
                    v5_25[1] = String.valueOf(v16_0);
                    v6_12 = v5_25;
                }
                int v5_27;
                if (v16_0 == -1) {
                    v5_27 = "";
                } else {
                    v5_27 = " and rowid <= ?";
                }
                int v3_44 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_27).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_27).append(" order by rowid limit 1;").toString(), v6_12);
                if (v3_44.moveToFirst()) {
                    int v5_45 = v3_44.getString(0);
                    v3_44.close();
                    v13_1 = v5_45;
                    v12_1 = 0;
                } else {
                    if (v3_44 == 0) {
                    } else {
                        v3_44.close();
                    }
                }
            } else {
                int v6_36;
                if (v16_0 == -1) {
                    int v5_56 = new String[1];
                    v5_56[0] = String.valueOf(p22);
                    v6_36 = v5_56;
                } else {
                    int v5_62 = new String[2];
                    v5_62[0] = String.valueOf(v16_0);
                    v5_62[1] = String.valueOf(p22);
                    v6_36 = v5_62;
                }
                int v5_1;
                if (v16_0 == -1) {
                    v5_1 = "";
                } else {
                    v5_1 = "rowid <= ? and ";
                }
                int v3_0 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_1).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_1).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_36);
                if (v3_0.moveToFirst()) {
                    com.google.android.gms.internal.zzcfz v4_1 = v3_0.getString(0);
                    int v5_8 = v3_0.getString(1);
                    v3_0.close();
                    v13_1 = v5_8;
                    v12_1 = v4_1;
                } else {
                    if (v3_0 == 0) {
                    } else {
                        v3_0.close();
                    }
                }
            }
            try {
                com.google.android.gms.internal.zzcfz v4_3 = new String[1];
                v4_3[0] = "metadata";
                int v6_2 = new String[2];
                v6_2[0] = v12_1;
                v6_2[1] = v13_1;
                int v11_0 = v2_3.query("raw_events_metadata", v4_3, "app_id = ? and metadata_fingerprint = ?", v6_2, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcbq v2_4) {
                v3_4 = v11_0;
                if (v3_4 != 0) {
                    v3_4.close();
                }
                throw v2_4;
            } catch (com.google.android.gms.internal.zzcbq v2_1) {
                v3_4 = v11_0;
                v4_10 = v12_1;
            }
            if (v11_0.moveToFirst()) {
                int v3_5 = v11_0.getBlob(0);
                int v3_6 = com.google.android.gms.internal.zzegf.zzh(v3_5, 0, v3_5.length);
                com.google.android.gms.internal.zzcfz v4_6 = new com.google.android.gms.internal.zzcgc();
                try {
                    v4_6.zza(v3_6);
                } catch (com.google.android.gms.internal.zzcbq v2_2) {
                    v14_1.zzauk().zzayc().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzcbo.a(v12_1), v2_2);
                    if (v11_0 == 0) {
                    } else {
                        v11_0.close();
                    }
                }
                if (v11_0.moveToNext()) {
                    v14_1.zzauk().zzaye().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                }
                int v5_15;
                int v6_4;
                v11_0.close();
                v15_1.a(v4_6);
                if (v16_0 == -1) {
                    v5_15 = "app_id = ? and metadata_fingerprint = ?";
                    v6_4 = new String[2];
                    v6_4[0] = v12_1;
                    v6_4[1] = v13_1;
                } else {
                    v5_15 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_4 = new String[3];
                    v6_4[0] = v12_1;
                    v6_4[1] = v13_1;
                    v6_4[2] = String.valueOf(v16_0);
                }
                com.google.android.gms.internal.zzcfz v4_12 = new String[4];
                v4_12[0] = "rowid";
                v4_12[1] = "name";
                v4_12[2] = "timestamp";
                v4_12[3] = "data";
                v3_4 = v2_3.query("raw_events", v4_12, v5_15, v6_4, 0, 0, "rowid", 0);
                try {
                    if (!v3_4.moveToFirst()) {
                        v14_1.zzauk().zzaye().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcbq v2_1) {
                    v4_10 = v12_1;
                }
                do {
                    com.google.android.gms.internal.zzcfz v4_13 = v3_4.getLong(0);
                    com.google.android.gms.internal.zzcbq v2_8 = v3_4.getBlob(3);
                    com.google.android.gms.internal.zzcbq v2_9 = com.google.android.gms.internal.zzegf.zzh(v2_8, 0, v2_8.length);
                    int v6_8 = new com.google.android.gms.internal.zzcfz();
                    v6_8.zza(v2_9);
                    v6_8.name = v3_4.getString(1);
                    v6_8.zziyt = Long.valueOf(v3_4.getLong(2));
                    if (v15_1.a(v4_13, v6_8)) {
                    } else {
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } while(v3_4.moveToNext());
                if (v3_4 == 0) {
                } else {
                    v3_4.close();
                }
            } else {
                v14_1.zzauk().zzayc().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                if (v11_0 == 0) {
                } else {
                    v11_0.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcbq v2_193) {
            this.zzaue().d();
            throw v2_193;
        }
    }

Method com.google.android.gms.internal.zzcco.a() calling method android.database.sqlite.SQLiteDatabase.query()


    private final boolean a(String p21, long p22)
    {
        this.zzaue().b();
        try {
            ark>com.google.android.gms.internal.zzccoark>$a v15_1 = new ark>com.google.android.gms.internal.zzccoark>$a(this, 0);
            int v14_1 = this.zzaue();
            com.google.android.gms.internal.zzcfz v4_10 = 0;
            com.google.android.gms.internal.zzcgc v16_0 = this.J;
            com.google.android.gms.common.internal.zzbp.zzu(v15_1);
            v14_1.zzug();
            v14_1.t();
            int v3_4 = 0;
            try {
                com.google.android.gms.internal.zzcfz v13_1;
                String[] v12_1;
                com.google.android.gms.internal.zzcbq v2_3 = v14_1.e();
            } catch (com.google.android.gms.internal.zzcbq v2_1) {
                v14_1.zzauk().zzayc().zze("Data loss. Error selecting raw event. appId", com.google.android.gms.internal.zzcbo.a(v4_10), v2_1);
                if (v3_4 == 0) {
                    if ((v15_1.c != null) && (!v15_1.c.isEmpty())) {
                        com.google.android.gms.internal.zzcbq v2_24 = 0;
                    } else {
                        v2_24 = 1;
                    }
                    com.google.android.gms.internal.zzcbq v2_27;
                    if (v2_24 != null) {
                        this.zzaue().c();
                        this.zzaue().d();
                        v2_27 = 0;
                    } else {
                        com.google.android.gms.internal.zzcfz v13_0 = 0;
                        com.google.android.gms.internal.zzcgc v16_1 = v15_1.a;
                        com.google.android.gms.internal.zzcbq v2_30 = new com.google.android.gms.internal.zzcfz[v15_1.c.size()];
                        v16_1.zziza = v2_30;
                        String[] v12_0 = 0;
                        int v14_0 = 0;
                        while (v14_0 < v15_1.c.size()) {
                            int v3_72;
                            com.google.android.gms.internal.zzcbq v2_171;
                            if (!this.zzauh().b(v15_1.a.zzch, ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) {
                                com.google.android.gms.internal.zzcfz v4_71;
                                boolean v17 = this.zzauh().c(v15_1.a.zzch, ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name);
                                if (v17) {
                                    int v3_41 = 0;
                                    com.google.android.gms.internal.zzcfz v4_43 = 0;
                                    if (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys == null) {
                                        int v5_34 = new com.google.android.gms.internal.zzcga[0];
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v5_34;
                                    }
                                    int v6_20 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys;
                                    com.google.android.gms.internal.zzcga[] v7_27 = v6_20.length;
                                    int v5_35 = 0;
                                    while (v5_35 < v7_27) {
                                        com.google.android.gms.internal.zzcbq v2_173;
                                        com.google.android.gms.internal.zzcbq v2_172 = v6_20[v5_35];
                                        if (!"_c".equals(v2_172.name)) {
                                            if (!"_r".equals(v2_172.name)) {
                                                v2_173 = v4_43;
                                            } else {
                                                v2_172.zziyw = Long.valueOf(1);
                                                v2_173 = 1;
                                            }
                                        } else {
                                            v2_172.zziyw = Long.valueOf(1);
                                            v3_41 = 1;
                                            v2_173 = v4_43;
                                        }
                                        v5_35++;
                                        v4_43 = v2_173;
                                    }
                                    if ((v3_41 == 0) && (v17)) {
                                        this.zzauk().zzayi().zzj("Marking event as conversion", this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcbq v2_127 = ((com.google.android.gms.internal.zzcga[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys, (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys.length + 1)));
                                        int v3_46 = new com.google.android.gms.internal.zzcga();
                                        v3_46.name = "_c";
                                        v3_46.zziyw = Long.valueOf(1);
                                        v2_127[(v2_127.length - 1)] = v3_46;
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v2_127;
                                    }
                                    if (v4_43 == null) {
                                        this.zzauk().zzayi().zzj("Marking event as real-time", this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                        com.google.android.gms.internal.zzcbq v2_144 = ((com.google.android.gms.internal.zzcga[]) java.util.Arrays.copyOf(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys, (((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys.length + 1)));
                                        int v3_53 = new com.google.android.gms.internal.zzcga();
                                        v3_53.name = "_r";
                                        v3_53.zziyw = Long.valueOf(1);
                                        v2_144[(v2_144.length - 1)] = v3_53;
                                        ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).zziys = v2_144;
                                    }
                                    if (this.zzaue().a(this.l(), v15_1.a.zzch, 0, 0, 0, 0, 1).e <= ((long) this.c.zzis(v15_1.a.zzch))) {
                                        v13_0 = 1;
                                    } else {
                                        com.google.android.gms.internal.zzcbq v2_148 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                        int v3_62 = 0;
                                        while (v3_62 < v2_148.zziys.length) {
                                            if (!"_r".equals(v2_148.zziys[v3_62].name)) {
                                                v3_62++;
                                            } else {
                                                com.google.android.gms.internal.zzcfz v4_59 = new com.google.android.gms.internal.zzcga[(v2_148.zziys.length - 1)];
                                                if (v3_62 > 0) {
                                                    System.arraycopy(v2_148.zziys, 0, v4_59, 0, v3_62);
                                                }
                                                if (v3_62 < v4_59.length) {
                                                    System.arraycopy(v2_148.zziys, (v3_62 + 1), v4_59, v3_62, (v4_59.length - v3_62));
                                                }
                                                v2_148.zziys = v4_59;
                                                break;
                                            }
                                        }
                                    }
                                    if ((!com.google.android.gms.internal.zzcfo.a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) || ((!v17) || (this.zzaue().a(this.l(), v15_1.a.zzch, 0, 0, 1, 0, 0).c <= ((long) this.c.zzb(v15_1.a.zzch, com.google.android.gms.internal.zzcbe.zziof))))) {
                                        v4_71 = v13_0;
                                    } else {
                                        this.zzauk().zzaye().zzj("Too many conversions. Not logging as conversion. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                        com.google.android.gms.internal.zzcbq v2_162 = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                        int v5_57 = 0;
                                        com.google.android.gms.internal.zzcfz v4_67 = 0;
                                        com.google.android.gms.internal.zzcga[] v7_33 = v2_162.zziys;
                                        int v6_34 = 0;
                                        while (v6_34 < v7_33.length) {
                                            com.google.android.gms.internal.zzcfz v4_72;
                                            int v3_74 = v7_33[v6_34];
                                            if (!"_c".equals(v3_74.name)) {
                                                if (!"_err".equals(v3_74.name)) {
                                                    v3_74 = v4_67;
                                                    v4_72 = v5_57;
                                                } else {
                                                    v4_72 = 1;
                                                    v3_74 = v4_67;
                                                }
                                            } else {
                                                v4_72 = v5_57;
                                            }
                                            v6_34++;
                                            v5_57 = v4_72;
                                            v4_67 = v3_74;
                                        }
                                        if ((v5_57 == 0) || (v4_67 == null)) {
                                            if (v4_67 == null) {
                                                this.zzauk().zzayc().zzj("Did not find conversion parameter. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                            } else {
                                                v4_67.name = "_err";
                                                v4_67.zziyw = Long.valueOf(10);
                                                v4_71 = v13_0;
                                            }
                                        } else {
                                            com.google.android.gms.internal.zzcga[] v7_35 = new com.google.android.gms.internal.zzcga[(v2_162.zziys.length - 1)];
                                            int v5_58 = 0;
                                            com.google.android.gms.internal.zzcga[] v8_17 = v2_162.zziys;
                                            int v9_4 = v8_17.length;
                                            int v6_35 = 0;
                                            while (v6_35 < v9_4) {
                                                int v3_73;
                                                com.google.android.gms.internal.zzcga v10_4 = v8_17[v6_35];
                                                if (v10_4 == v4_67) {
                                                    v3_73 = v5_58;
                                                } else {
                                                    v3_73 = (v5_58 + 1);
                                                    v7_35[v5_58] = v10_4;
                                                }
                                                v6_35++;
                                                v5_58 = v3_73;
                                            }
                                            v2_162.zziys = v7_35;
                                            v4_71 = v13_0;
                                        }
                                    }
                                } else {
                                    this.zzaug();
                                    if (!com.google.android.gms.internal.zzcfo.f(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name)) {
                                    }
                                }
                                int v3_71 = (v12_0 + 1);
                                v16_1.zziza[v12_0] = ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0));
                                v2_171 = v3_71;
                                v3_72 = v4_71;
                            } else {
                                com.google.android.gms.internal.zzcbq v2_187;
                                this.zzauk().zzaye().zze("Dropping blacklisted raw event. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch), this.zzauf().a(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name));
                                if ((!this.zzaug().d(v15_1.a.zzch)) && (!this.zzaug().e(v15_1.a.zzch))) {
                                    v2_187 = 0;
                                } else {
                                    v2_187 = 1;
                                }
                                if ((v2_187 != null) || ("_err".equals(((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name))) {
                                    v2_171 = v12_0;
                                    v3_72 = v13_0;
                                } else {
                                    this.zzaug().zza(v15_1.a.zzch, 11, "_ev", ((com.google.android.gms.internal.zzcfz) v15_1.c.get(v14_0)).name, 0);
                                    v2_171 = v12_0;
                                    v3_72 = v13_0;
                                }
                            }
                            v14_0++;
                            v12_0 = v2_171;
                            v13_0 = v3_72;
                        }
                        if (v12_0 < v15_1.c.size()) {
                            v16_1.zziza = ((com.google.android.gms.internal.zzcfz[]) java.util.Arrays.copyOf(v16_1.zziza, v12_0));
                        }
                        v16_1.zzizt = this.a(v15_1.a.zzch, v15_1.a.zzizb, v16_1.zziza);
                        v16_1.zzizd = Long.valueOf(nan);
                        v16_1.zzize = Long.valueOf(-0.0);
                        com.google.android.gms.internal.zzcbq v2_46 = 0;
                        while (v2_46 < v16_1.zziza.length) {
                            int v3_37 = v16_1.zziza[v2_46];
                            if (v3_37.zziyt.longValue() < v16_1.zzizd.longValue()) {
                                v16_1.zzizd = v3_37.zziyt;
                            }
                            if (v3_37.zziyt.longValue() > v16_1.zzize.longValue()) {
                                v16_1.zzize = v3_37.zziyt;
                            }
                            v2_46++;
                        }
                        int v6_15 = v15_1.a.zzch;
                        com.google.android.gms.internal.zzcga[] v7_18 = this.zzaue().b(v6_15);
                        if (v7_18 != null) {
                            if (v16_1.zziza.length > 0) {
                                com.google.android.gms.internal.zzcfz v4_22;
                                com.google.android.gms.internal.zzcbq v2_52 = v7_18.h();
                                if (v2_52 == 0) {
                                    v4_22 = 0;
                                } else {
                                    v4_22 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizg = v4_22;
                                com.google.android.gms.internal.zzcfz v4_23 = v7_18.g();
                                if (v4_23 != 0) {
                                    v2_52 = v4_23;
                                }
                                com.google.android.gms.internal.zzcbq v2_53;
                                if (v2_52 == 0) {
                                    v2_53 = 0;
                                } else {
                                    v2_53 = Long.valueOf(v2_52);
                                }
                                v16_1.zzizf = v2_53;
                                v7_18.r();
                                v16_1.zzizr = Integer.valueOf(((int) v7_18.o()));
                                v7_18.a(v16_1.zzizd.longValue());
                                v7_18.b(v16_1.zzize.longValue());
                                v16_1.zzilr = v7_18.z();
                                this.zzaue().a(v7_18);
                            }
                        } else {
                            this.zzauk().zzayc().zzj("Bundling raw events w/o app info. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                        }
                        if (v16_1.zziza.length > 0) {
                            com.google.android.gms.internal.zzcap.zzawj();
                            com.google.android.gms.internal.zzcbq v2_68 = this.zzauh().a(v15_1.a.zzch);
                            if ((v2_68 != null) && (v2_68.zziyh != null)) {
                                v16_1.zzizx = v2_68.zziyh;
                            } else {
                                if (!android.text.TextUtils.isEmpty(v15_1.a.zziln)) {
                                    this.zzauk().zzaye().zzj("Did not find measurement config or missing version info. appId", com.google.android.gms.internal.zzcbo.a(v15_1.a.zzch));
                                } else {
                                    v16_1.zzizx = Long.valueOf(-1);
                                }
                            }
                            this.zzaue().a(v16_1, v13_0);
                        }
                        this.zzaue().a(v15_1.b);
                        int v3_32 = this.zzaue();
                        com.google.android.gms.internal.zzcbq v2_79 = v3_32.e();
                        int v5_29 = new String[2];
                        v5_29[0] = v6_15;
                        v5_29[1] = v6_15;
                        v2_79.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_29);
                        this.zzaue().c();
                        if (v16_1.zziza.length <= 0) {
                            v2_27 = 0;
                        } else {
                            v2_27 = 1;
                        }
                        this.zzaue().d();
                    }
                    return v2_27;
                } else {
                    v3_4.close();
                }
            }
            if (!android.text.TextUtils.isEmpty(0)) {
                int v6_12;
                if (v16_0 == -1) {
                    int v5_20 = new String[1];
                    v5_20[0] = 0;
                    v6_12 = v5_20;
                } else {
                    int v5_25 = new String[2];
                    v5_25[0] = 0;
                    v5_25[1] = String.valueOf(v16_0);
                    v6_12 = v5_25;
                }
                int v5_27;
                if (v16_0 == -1) {
                    v5_27 = "";
                } else {
                    v5_27 = " and rowid <= ?";
                }
                int v3_44 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_27).length() + 84)).append("select metadata_fingerprint from raw_events where app_id = ?").append(v5_27).append(" order by rowid limit 1;").toString(), v6_12);
                if (v3_44.moveToFirst()) {
                    int v5_45 = v3_44.getString(0);
                    v3_44.close();
                    v13_1 = v5_45;
                    v12_1 = 0;
                } else {
                    if (v3_44 == 0) {
                    } else {
                        v3_44.close();
                    }
                }
            } else {
                int v6_36;
                if (v16_0 == -1) {
                    int v5_56 = new String[1];
                    v5_56[0] = String.valueOf(p22);
                    v6_36 = v5_56;
                } else {
                    int v5_62 = new String[2];
                    v5_62[0] = String.valueOf(v16_0);
                    v5_62[1] = String.valueOf(p22);
                    v6_36 = v5_62;
                }
                int v5_1;
                if (v16_0 == -1) {
                    v5_1 = "";
                } else {
                    v5_1 = "rowid <= ? and ";
                }
                int v3_0 = v2_3.rawQuery(new StringBuilder((String.valueOf(v5_1).length() + 148)).append("select app_id, metadata_fingerprint from raw_events where ").append(v5_1).append("app_id in (select app_id from apps where config_fetched_time >= ?) order by rowid limit 1;").toString(), v6_36);
                if (v3_0.moveToFirst()) {
                    com.google.android.gms.internal.zzcfz v4_1 = v3_0.getString(0);
                    int v5_8 = v3_0.getString(1);
                    v3_0.close();
                    v13_1 = v5_8;
                    v12_1 = v4_1;
                } else {
                    if (v3_0 == 0) {
                    } else {
                        v3_0.close();
                    }
                }
            }
            try {
                com.google.android.gms.internal.zzcfz v4_3 = new String[1];
                v4_3[0] = "metadata";
                int v6_2 = new String[2];
                v6_2[0] = v12_1;
                v6_2[1] = v13_1;
                int v11_0 = v2_3.query("raw_events_metadata", v4_3, "app_id = ? and metadata_fingerprint = ?", v6_2, 0, 0, "rowid", "2");
            } catch (com.google.android.gms.internal.zzcbq v2_4) {
                v3_4 = v11_0;
                if (v3_4 != 0) {
                    v3_4.close();
                }
                throw v2_4;
            } catch (com.google.android.gms.internal.zzcbq v2_1) {
                v3_4 = v11_0;
                v4_10 = v12_1;
            }
            if (v11_0.moveToFirst()) {
                int v3_5 = v11_0.getBlob(0);
                int v3_6 = com.google.android.gms.internal.zzegf.zzh(v3_5, 0, v3_5.length);
                com.google.android.gms.internal.zzcfz v4_6 = new com.google.android.gms.internal.zzcgc();
                try {
                    v4_6.zza(v3_6);
                } catch (com.google.android.gms.internal.zzcbq v2_2) {
                    v14_1.zzauk().zzayc().zze("Data loss. Failed to merge raw event metadata. appId", com.google.android.gms.internal.zzcbo.a(v12_1), v2_2);
                    if (v11_0 == 0) {
                    } else {
                        v11_0.close();
                    }
                }
                if (v11_0.moveToNext()) {
                    v14_1.zzauk().zzaye().zzj("Get multiple raw event metadata records, expected one. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                }
                int v6_4;
                int v5_15;
                v11_0.close();
                v15_1.a(v4_6);
                if (v16_0 == -1) {
                    v5_15 = "app_id = ? and metadata_fingerprint = ?";
                    v6_4 = new String[2];
                    v6_4[0] = v12_1;
                    v6_4[1] = v13_1;
                } else {
                    v5_15 = "app_id = ? and metadata_fingerprint = ? and rowid <= ?";
                    v6_4 = new String[3];
                    v6_4[0] = v12_1;
                    v6_4[1] = v13_1;
                    v6_4[2] = String.valueOf(v16_0);
                }
                com.google.android.gms.internal.zzcfz v4_12 = new String[4];
                v4_12[0] = "rowid";
                v4_12[1] = "name";
                v4_12[2] = "timestamp";
                v4_12[3] = "data";
                v3_4 = v2_3.query("raw_events", v4_12, v5_15, v6_4, 0, 0, "rowid", 0);
                try {
                    if (!v3_4.moveToFirst()) {
                        v14_1.zzauk().zzaye().zzj("Raw event data disappeared while in transaction. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } catch (com.google.android.gms.internal.zzcbq v2_1) {
                    v4_10 = v12_1;
                }
                do {
                    com.google.android.gms.internal.zzcfz v4_13 = v3_4.getLong(0);
                    com.google.android.gms.internal.zzcbq v2_8 = v3_4.getBlob(3);
                    com.google.android.gms.internal.zzcbq v2_9 = com.google.android.gms.internal.zzegf.zzh(v2_8, 0, v2_8.length);
                    int v6_8 = new com.google.android.gms.internal.zzcfz();
                    v6_8.zza(v2_9);
                    v6_8.name = v3_4.getString(1);
                    v6_8.zziyt = Long.valueOf(v3_4.getLong(2));
                    if (v15_1.a(v4_13, v6_8)) {
                    } else {
                        if (v3_4 == 0) {
                        } else {
                            v3_4.close();
                        }
                    }
                } while(v3_4.moveToNext());
                if (v3_4 == 0) {
                } else {
                    v3_4.close();
                }
            } else {
                v14_1.zzauk().zzayc().zzj("Raw event metadata record is missing. appId", com.google.android.gms.internal.zzcbo.a(v12_1));
                if (v11_0 == 0) {
                } else {
                    v11_0.close();
                }
            }
        } catch (com.google.android.gms.internal.zzcbq v2_193) {
            this.zzaue().d();
            throw v2_193;
        }
    }

Method com.google.android.gms.internal.zzcbk.zzdv() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List zzdv(int p15)
    {
        java.util.ArrayList v0_13;
        this.zzug();
        this.zzatu();
        if (!this.b) {
            java.util.ArrayList v10_1 = new java.util.ArrayList();
            if (this.getContext().getDatabasePath(com.google.android.gms.internal.zzcap.q()).exists()) {
                int v9 = 5;
                int v12 = 0;
                while (v12 < 5) {
                    String v1_27 = 0;
                    try {
                        java.util.ArrayList v0_14 = this.b();
                        try {
                            if (v0_14 != null) {
                                v0_14.beginTransaction();
                                Throwable v2_3 = new String[3];
                                v2_3[0] = "rowid";
                                v2_3[1] = "type";
                                v2_3[2] = "entry";
                                Throwable v2_1 = v0_14.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_0 = v2_1.getBlob(2);
                                        if (v1_46 != null) {
                                            if (v1_46 != 1) {
                                                if (v1_46 != 2) {
                                                    this.zzauk().zzayc().log("Unknown record type in local database");
                                                } else {
                                                    android.os.Parcel v7_0 = android.os.Parcel.obtain();
                                                    try {
                                                        v7_0.unmarshall(v6_0, 0, v6_0.length);
                                                        v7_0.setDataPosition(0);
                                                        String v1_6 = ((com.google.android.gms.internal.zzcan) com.google.android.gms.internal.zzcan.CREATOR.createFromParcel(v7_0));
                                                    } catch (String v1) {
                                                        this.zzauk().zzayc().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_0, 0, v6_0.length);
                                                    v7_1.setDataPosition(0);
                                                    String v1_14 = ((com.google.android.gms.internal.zzcfl) com.google.android.gms.internal.zzcfl.CREATOR.createFromParcel(v7_1));
                                                } catch (String v1) {
                                                    this.zzauk().zzayc().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_0, 0, v6_0.length);
                                                v3_5.setDataPosition(0);
                                                String v1_22 = ((com.google.android.gms.internal.zzcbc) com.google.android.gms.internal.zzcbc.CREATOR.createFromParcel(v3_5));
                                            } catch (String v1_25) {
                                                v3_5.recycle();
                                                throw v1_25;
                                            } catch (String v1) {
                                                this.zzauk().zzayc().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_14;
                                    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_14;
                                    java.util.ArrayList v0_5 = v1_28;
                                    try {
                                        this.zzauk().zzayc().zzj("Error reading entries from local database", v0_5);
                                        this.b = 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_11 = v9;
                                        v12++;
                                        v9 = v0_11;
                                    } else {
                                        v2_0.close();
                                        v0_11 = v9;
                                    }
                                } catch (String v1_26) {
                                    v1_27 = v0_14;
                                    java.util.ArrayList v0_4 = v1_26;
                                    try {
                                        if (android.os.Build$VERSION.SDK_INT < 11) {
                                            if (v1_27 != null) {
                                                if (v1_27.inTransaction()) {
                                                    v1_27.endTransaction();
                                                }
                                            }
                                            this.zzauk().zzayc().zzj("Error reading entries from local database", v0_4);
                                            this.b = 1;
                                            v0_11 = v9;
                                        } else {
                                            if (!(v0_4 instanceof android.database.sqlite.SQLiteDatabaseLockedException)) {
                                            } else {
                                                android.os.SystemClock.sleep(((long) v9));
                                                v0_11 = (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_6 = new String[1];
                                v6_6[0] = Long.toString(v4_8);
                                if (v0_14.delete("messages", "rowid <= ?", v6_6) < v10_1.size()) {
                                    this.zzauk().zzayc().log("Fewer entries removed from local database than expected");
                                }
                                v0_14.setTransactionSuccessful();
                                v0_14.endTransaction();
                                if (v2_1 != null) {
                                    v2_1.close();
                                }
                                if (v0_14 != null) {
                                    v0_14.close();
                                }
                                v0_13 = v10_1;
                            } else {
                                this.b = 1;
                                if (v0_14 != null) {
                                    v0_14.close();
                                }
                                v0_13 = 0;
                            }
                        } catch (String v1_36) {
                            v2_1 = 0;
                            v1_27 = v0_14;
                            v0_7 = v1_36;
                        } catch (String v1_33) {
                            v2_0 = v0_14;
                            v0_5 = v1_33;
                            v1_29 = 0;
                        } catch (String v1_32) {
                            v2_1 = 0;
                            v1_27 = v0_14;
                            v0_4 = v1_32;
                        }
                    } catch (java.util.ArrayList v0_7) {
                        v2_1 = 0;
                    } catch (java.util.ArrayList v0_5) {
                        v2_0 = 0;
                        v1_29 = 0;
                    } catch (java.util.ArrayList v0_4) {
                        v2_1 = 0;
                    }
                }
                this.zzauk().zzaye().log("Failed to read events from database in reasonable time");
                v0_13 = 0;
            } else {
                v0_13 = v10_1;
            }
        } else {
            v0_13 = 0;
        }
        return v0_13;
    }

Method com.google.android.gms.internal.fz.g() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map g(String p11, String p12)
    {
        this.t();
        this.zzug();
        com.google.android.gms.common.internal.zzbp.zzgf(p11);
        com.google.android.gms.common.internal.zzbp.zzgf(p12);
        android.support.v4.util.ArrayMap v8_1 = new android.support.v4.util.ArrayMap();
        android.support.v4.util.ArrayMap v0_12 = this.e();
        try {
            com.google.android.gms.internal.zzcbq 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.zzauk().zzayc().zze("Database error querying filters. appId", com.google.android.gms.internal.zzcbo.a(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.zzegf.zzh(v0_4, 0, v0_4.length);
                com.google.android.gms.internal.zzcbq v2_4 = new com.google.android.gms.internal.zzcft();
                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.fz.f() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map f(String p11, String p12)
    {
        this.t();
        this.zzug();
        com.google.android.gms.common.internal.zzbp.zzgf(p11);
        com.google.android.gms.common.internal.zzbp.zzgf(p12);
        android.support.v4.util.ArrayMap v8_1 = new android.support.v4.util.ArrayMap();
        android.support.v4.util.ArrayMap v0_12 = this.e();
        try {
            com.google.android.gms.internal.zzcbq 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.zzauk().zzayc().zze("Database error querying filters. appId", com.google.android.gms.internal.zzcbo.a(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.zzegf.zzh(v0_4, 0, v0_4.length);
                com.google.android.gms.internal.zzcbq v2_4 = new com.google.android.gms.internal.zzcfq();
                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.fz.e() calling method android.database.sqlite.SQLiteDatabase.query()


    final java.util.Map e(String p10)
    {
        this.t();
        this.zzug();
        com.google.android.gms.common.internal.zzbp.zzgf(p10);
        int v0_5 = this.e();
        try {
            boolean v2_8 = new String[2];
            v2_8[0] = "audience_id";
            v2_8[1] = "current_results";
            com.google.android.gms.internal.zzcbq 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.zzegf.zzh(v3_3, 0, v3_3.length);
                        com.google.android.gms.internal.zzcbq v4_6 = new com.google.android.gms.internal.zzcgd();
                        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.zzauk().zzayc().zze("Database error querying filter results. appId", com.google.android.gms.internal.zzcbo.a(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.fz.d() calling method android.database.sqlite.SQLiteDatabase.query()


    public final byte[] d(String p10)
    {
        com.google.android.gms.common.internal.zzbp.zzgf(p10);
        this.zzug();
        this.t();
        try {
            byte[] v0_5 = this.e();
            com.google.android.gms.internal.zzcbq 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.zzauk().zzayc().zzj("Got multiple records for app config, expected one. appId", com.google.android.gms.internal.zzcbo.a(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.zzauk().zzayc().zze("Error querying remote config. appId", com.google.android.gms.internal.zzcbo.a(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.fz.d() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.zzcan d(String p22, String p23)
    {
        com.google.android.gms.common.internal.zzbp.zzgf(p22);
        com.google.android.gms.common.internal.zzbp.zzgf(p23);
        this.zzug();
        this.t();
        try {
            com.google.android.gms.internal.zzcbq v2_11 = this.e();
            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.zzcan v5_3;
                if (v20.moveToFirst()) {
                    int v11;
                    String v7_5 = v20.getString(0);
                    String v6_17 = this.a(v20, 1);
                    if (v20.getInt(2) == 0) {
                        v11 = 0;
                    } else {
                        v11 = 1;
                    }
                    v5_3 = new com.google.android.gms.internal.zzcan(p22, v7_5, new com.google.android.gms.internal.zzcfl(p23, v20.getLong(8), v6_17, v7_5), v20.getLong(6), v11, v20.getString(3), ((com.google.android.gms.internal.zzcbc) this.zzaug().a(v20.getBlob(5), com.google.android.gms.internal.zzcbc.CREATOR)), v20.getLong(4), ((com.google.android.gms.internal.zzcbc) this.zzaug().a(v20.getBlob(7), com.google.android.gms.internal.zzcbc.CREATOR)), v20.getLong(9), ((com.google.android.gms.internal.zzcbc) this.zzaug().a(v20.getBlob(10), com.google.android.gms.internal.zzcbc.CREATOR)));
                    if (v20.moveToNext()) {
                        this.zzauk().zzayc().zze("Got multiple records for conditional property, expected one", com.google.android.gms.internal.zzcbo.a(p22), this.zzauf().c(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.zzcbq v2_10) {
                if (v20 != 0) {
                    v20.close();
                }
                throw v2_10;
            } catch (com.google.android.gms.internal.zzcbq v2_9) {
                String v3_6 = v20;
                try {
                    this.zzauk().zzayc().zzd("Error querying conditional property", com.google.android.gms.internal.zzcbo.a(p22), this.zzauf().c(p23), v2_9);
                } catch (com.google.android.gms.internal.zzcbq v2_10) {
                    v20 = v3_6;
                }
                if (v3_6 != null) {
                    v3_6.close();
                }
                v5_3 = 0;
                return v5_3;
            }
        } catch (com.google.android.gms.internal.zzcbq v2_10) {
            v20 = 0;
        } catch (com.google.android.gms.internal.zzcbq v2_9) {
            v3_6 = 0;
        }
    }

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


    public final com.google.android.gms.internal.jn c(String p10, String p11)
    {
        android.database.Cursor v8 = 0;
        com.google.android.gms.common.internal.zzbp.zzgf(p10);
        com.google.android.gms.common.internal.zzbp.zzgf(p11);
        this.zzug();
        this.t();
        try {
            com.google.android.gms.internal.jn v0_8 = this.e();
            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.jn v0_7;
                if (v7_1.moveToFirst()) {
                    v0_7 = new com.google.android.gms.internal.jn(p10, v7_1.getString(2), p11, v7_1.getLong(0), this.a(v7_1, 1));
                    if (v7_1.moveToNext()) {
                        this.zzauk().zzayc().zzj("Got multiple records for user property, expected one. appId", com.google.android.gms.internal.zzcbo.a(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.jn v0_1) {
                v8 = v7_1;
                if (v8 != null) {
                    v8.close();
                }
                throw v0_1;
            } catch (com.google.android.gms.internal.jn v0_0) {
                com.google.android.gms.internal.zzcbq v1_0 = v7_1;
                try {
                    this.zzauk().zzayc().zzd("Error querying user property. appId", com.google.android.gms.internal.zzcbo.a(p10), this.zzauf().c(p11), v0_0);
                } catch (com.google.android.gms.internal.jn v0_1) {
                    v8 = v1_0;
                }
                if (v1_0 != null) {
                    v1_0.close();
                }
                v0_7 = 0;
                return v0_7;
            }
        } catch (com.google.android.gms.internal.jn v0_1) {
        } catch (com.google.android.gms.internal.jn v0_0) {
            v1_0 = 0;
        }
    }

Method com.google.android.gms.internal.fz.b() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.fx b(String p12)
    {
        com.google.android.gms.common.internal.zzbp.zzgf(p12);
        this.zzug();
        this.t();
        try {
            int v0_3 = this.e();
            com.google.android.gms.internal.zzcbq v2_0 = new String[23];
            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";
            Object v4_26 = new String[1];
            v4_26[0] = p12;
            int v1_1 = v0_3.query("apps", v2_0, "app_id=?", v4_26, 0, 0, 0);
            try {
                int v0_1;
                if (v1_1.moveToFirst()) {
                    com.google.android.gms.internal.zzcbq v2_24;
                    v0_1 = new com.google.android.gms.internal.fx(this.p, p12);
                    v0_1.a(v1_1.getString(0));
                    v0_1.b(v1_1.getString(1));
                    v0_1.c(v1_1.getString(2));
                    v0_1.f(v1_1.getLong(3));
                    v0_1.a(v1_1.getLong(4));
                    v0_1.b(v1_1.getLong(5));
                    v0_1.e(v1_1.getString(6));
                    v0_1.f(v1_1.getString(7));
                    v0_1.d(v1_1.getLong(8));
                    v0_1.e(v1_1.getLong(9));
                    if (!v1_1.isNull(10)) {
                        v2_24 = v1_1.getInt(10);
                    } else {
                        v2_24 = 1;
                    }
                    com.google.android.gms.internal.zzcbq v2_25;
                    if (v2_24 == null) {
                        v2_25 = 0;
                    } else {
                        v2_25 = 1;
                    }
                    com.google.android.gms.internal.zzcbq v2_42;
                    v0_1.a(v2_25);
                    v0_1.i(v1_1.getLong(11));
                    v0_1.j(v1_1.getLong(12));
                    v0_1.k(v1_1.getLong(13));
                    v0_1.l(v1_1.getLong(14));
                    v0_1.g(v1_1.getLong(15));
                    v0_1.h(v1_1.getLong(16));
                    if (!v1_1.isNull(17)) {
                        v2_42 = ((long) v1_1.getInt(17));
                    } else {
                        v2_42 = -2147483648;
                    }
                    com.google.android.gms.internal.zzcbq v2_54;
                    v0_1.c(v2_42);
                    v0_1.d(v1_1.getString(18));
                    v0_1.n(v1_1.getLong(19));
                    v0_1.m(v1_1.getLong(20));
                    v0_1.g(v1_1.getString(21));
                    if (!v1_1.isNull(22)) {
                        v2_54 = v1_1.getLong(22);
                    } else {
                        v2_54 = 0;
                    }
                    v0_1.o(v2_54);
                    v0_1.a();
                    if (v1_1.moveToNext()) {
                        this.zzauk().zzayc().zzj("Got multiple records for app, expected one. appId", com.google.android.gms.internal.zzcbo.a(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_0) {
                this.zzauk().zzayc().zze("Error querying app. appId", com.google.android.gms.internal.zzcbo.a(p12), v0_0);
                if (v1_1 != 0) {
                    v1_1.close();
                }
                v0_1 = 0;
                return v0_1;
            }
        } catch (int v0_2) {
            v1_1 = 0;
            if (v1_1 != 0) {
                v1_1.close();
            }
            throw v0_2;
        } catch (int v0_0) {
            v1_1 = 0;
        } catch (int v0_2) {
        }
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p24, String[] p25)
    {
        this.zzug();
        this.t();
        java.util.ArrayList v20_1 = new java.util.ArrayList();
        try {
            boolean v2_14 = this.e();
            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";
            com.google.android.gms.internal.zzcap.j();
            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.zzauk().zzayc().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() < com.google.android.gms.internal.zzcap.j()) {
                int v11_1;
                com.google.android.gms.internal.zzcfl v8_2 = v21.getString(0);
                String v7_1 = v21.getString(1);
                String v3_4 = v21.getString(2);
                String v6_15 = this.a(v21, 3);
                if (v21.getInt(4) == 0) {
                    v11_1 = 0;
                } else {
                    v11_1 = 1;
                }
                v20_1.add(new com.google.android.gms.internal.zzcan(v8_2, v7_1, new com.google.android.gms.internal.zzcfl(v3_4, v21.getLong(10), v6_15, v7_1), v21.getLong(8), v11_1, v21.getString(5), ((com.google.android.gms.internal.zzcbc) this.zzaug().a(v21.getBlob(7), com.google.android.gms.internal.zzcbc.CREATOR)), v21.getLong(6), ((com.google.android.gms.internal.zzcbc) this.zzaug().a(v21.getBlob(9), com.google.android.gms.internal.zzcbc.CREATOR)), v21.getLong(11), ((com.google.android.gms.internal.zzcbc) this.zzaug().a(v21.getBlob(12), com.google.android.gms.internal.zzcbc.CREATOR))));
                if (!v21.moveToNext()) {
                }
            }
            this.zzauk().zzayc().zzj("Read more than the max allowed conditional properties, ignoring extra", Integer.valueOf(com.google.android.gms.internal.zzcap.j()));
        } catch (boolean v2_13) {
            v21 = 0;
        } catch (boolean v2_11) {
            v3_1 = 0;
        }
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p12, String p13, String p14)
    {
        android.database.Cursor v10 = 0;
        com.google.android.gms.common.internal.zzbp.zzgf(p12);
        this.zzug();
        this.t();
        java.util.ArrayList v9_1 = new java.util.ArrayList();
        try {
            boolean v0_12 = new java.util.ArrayList(3);
            v0_12.add(p12);
            Object v3_1 = 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.zzauk().zzayc().zzd("(2)Error querying user properties", com.google.android.gms.internal.zzcbo.a(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_1.append(" and origin=?");
        }
        if (!android.text.TextUtils.isEmpty(p14)) {
            v0_12.add(String.valueOf(p14).concat("*"));
            v3_1.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.e();
        String v2_6 = new String[4];
        v2_6[0] = "name";
        v2_6[1] = "set_timestamp";
        v2_6[2] = "value";
        v2_6[3] = "origin";
        Object v3_3 = v3_1.toString();
        com.google.android.gms.internal.zzcap.h();
        android.database.Cursor v7_1 = v0_5.query("user_attributes", v2_6, v3_3, 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() < com.google.android.gms.internal.zzcap.h()) {
            Object v3_4 = v7_1.getString(0);
            long v4_3 = v7_1.getLong(1);
            Object v6_5 = this.a(v7_1, 2);
            String v2_7 = v7_1.getString(3);
            try {
                if (v6_5 != null) {
                    v9_1.add(new com.google.android.gms.internal.jn(p12, v2_7, v3_4, v4_3, v6_5));
                } else {
                    this.zzauk().zzayc().zzd("(2)Read invalid user property value, ignoring it", com.google.android.gms.internal.zzcbo.a(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.zzauk().zzayc().zzj("Read more than the max allowed user properties, ignoring excess", Integer.valueOf(com.google.android.gms.internal.zzcap.h()));
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p12, int p13, int p14)
    {
        Throwable v0_6;
        int v1_0 = 1;
        this.zzug();
        this.t();
        if (p13 <= 0) {
            v0_6 = 0;
        } else {
            v0_6 = 1;
        }
        com.google.android.gms.common.internal.zzbp.zzbh(v0_6);
        if (p14 <= 0) {
            v1_0 = 0;
        }
        com.google.android.gms.common.internal.zzbp.zzbh(v1_0);
        com.google.android.gms.common.internal.zzbp.zzgf(p12);
        try {
            Throwable v0_2 = this.e();
            com.google.android.gms.internal.zzcbq v2_3 = new String[2];
            v2_3[0] = "rowid";
            v2_3[1] = "data";
            com.google.android.gms.internal.zzcbq v4_4 = new String[1];
            v4_4[0] = p12;
            com.google.android.gms.internal.zzcbq 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.zzcbq v4_5 = v2_1.getLong(0);
                        int v1_6 = this.zzaug().zzp(v2_1.getBlob(1));
                        if ((!v0_0.isEmpty()) && ((v1_6.length + v3_2) > p14)) {
                            break;
                        }
                        Object v6_7 = com.google.android.gms.internal.zzegf.zzh(v1_6, 0, v1_6.length);
                        com.google.android.gms.internal.zzcgc v7_3 = new com.google.android.gms.internal.zzcgc();
                        try {
                            v7_3.zza(v6_7);
                        } catch (int v1_9) {
                            this.zzauk().zzayc().zze("Failed to merge queued bundle. appId", com.google.android.gms.internal.zzcbo.a(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.zzauk().zzayc().zze("Error querying bundles. appId", com.google.android.gms.internal.zzcbo.a(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.fz.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final java.util.List a(String p12)
    {
        android.database.Cursor v10 = 0;
        com.google.android.gms.common.internal.zzbp.zzgf(p12);
        this.zzug();
        this.t();
        java.util.ArrayList v9_1 = new java.util.ArrayList();
        try {
            java.util.ArrayList v0_11 = this.e();
            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", String.valueOf(com.google.android.gms.internal.zzcap.h()));
            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.zzauk().zzayc().zze("Error querying user properties. appId", com.google.android.gms.internal.zzcbo.a(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.a(v7_1, 3);
                if (v6_1 != null) {
                    v9_1.add(new com.google.android.gms.internal.jn(p12, v2_1, v3_5, v4_6, v6_1));
                } else {
                    this.zzauk().zzayc().zzj("Read invalid user property value, ignoring it. appId", com.google.android.gms.internal.zzcbo.a(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.fz.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.zzcar a(long p12, String p14, boolean p15, boolean p16, boolean p17, boolean p18, boolean p19)
    {
        com.google.android.gms.common.internal.zzbp.zzgf(p14);
        this.zzug();
        this.t();
        String[] v10 = new String[1];
        v10[0] = p14;
        com.google.android.gms.internal.zzcar v8_1 = new com.google.android.gms.internal.zzcar();
        try {
            com.google.android.gms.internal.zzcar v0_1 = this.e();
            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.zzcar v0_2;
                if (v1_1.moveToFirst()) {
                    if (v1_1.getLong(0) == p12) {
                        v8_1.b = v1_1.getLong(1);
                        v8_1.a = v1_1.getLong(2);
                        v8_1.c = v1_1.getLong(3);
                        v8_1.d = v1_1.getLong(4);
                        v8_1.e = v1_1.getLong(5);
                    }
                    if (p15) {
                        v8_1.b = (v8_1.b + 1);
                    }
                    if (p16) {
                        v8_1.a = (v8_1.a + 1);
                    }
                    if (p17) {
                        v8_1.c = (v8_1.c + 1);
                    }
                    if (p18) {
                        v8_1.d = (v8_1.d + 1);
                    }
                    if (p19) {
                        v8_1.e = (v8_1.e + 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.a));
                    v2_3.put("daily_events_count", Long.valueOf(v8_1.b));
                    v2_3.put("daily_conversions_count", Long.valueOf(v8_1.c));
                    v2_3.put("daily_error_events_count", Long.valueOf(v8_1.d));
                    v2_3.put("daily_realtime_events_count", Long.valueOf(v8_1.e));
                    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.zzauk().zzaye().zzj("Not updating daily counts, app is not known. appId", com.google.android.gms.internal.zzcbo.a(p14));
                    if (v1_1 != 0) {
                        v1_1.close();
                    }
                    v0_2 = v8_1;
                    return v0_2;
                }
            } catch (com.google.android.gms.internal.zzcar v0_0) {
                this.zzauk().zzayc().zze("Error updating daily counts. appId", com.google.android.gms.internal.zzcbo.a(p14), v0_0);
                if (v1_1 != 0) {
                    v1_1.close();
                }
                v0_2 = v8_1;
                return v0_2;
            }
        } catch (com.google.android.gms.internal.zzcar v0_3) {
            v1_1 = 0;
            if (v1_1 != 0) {
                v1_1.close();
            }
            throw v0_3;
        } catch (com.google.android.gms.internal.zzcar v0_0) {
            v1_1 = 0;
        } catch (com.google.android.gms.internal.zzcar v0_3) {
        }
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public final com.google.android.gms.internal.ge a(String p13, String p14)
    {
        android.database.Cursor v10 = 0;
        com.google.android.gms.common.internal.zzbp.zzgf(p13);
        com.google.android.gms.common.internal.zzbp.zzgf(p14);
        this.zzug();
        this.t();
        try {
            com.google.android.gms.internal.zzcbq v0_9 = this.e();
            String v2_5 = new String[3];
            v2_5[0] = "lifetime_count";
            v2_5[1] = "current_bundle_count";
            v2_5[2] = "last_fire_timestamp";
            long v4_4 = new String[2];
            v4_4[0] = p13;
            v4_4[1] = p14;
            android.database.Cursor v11 = v0_9.query("events", v2_5, "app_id=? and name=?", v4_4, 0, 0, 0);
            try {
                com.google.android.gms.internal.ge v1_2;
                if (v11.moveToFirst()) {
                    v1_2 = new com.google.android.gms.internal.ge(p13, p14, v11.getLong(0), v11.getLong(1), v11.getLong(2));
                    if (v11.moveToNext()) {
                        this.zzauk().zzayc().zzj("Got multiple records for event aggregates, expected one. appId", com.google.android.gms.internal.zzcbo.a(p13));
                    }
                    if (v11 == null) {
                        return v1_2;
                    } else {
                        v11.close();
                        return v1_2;
                    }
                } else {
                    if (v11 != null) {
                        v11.close();
                    }
                    v1_2 = 0;
                    return v1_2;
                }
            } catch (com.google.android.gms.internal.zzcbq v0_1) {
                v10 = v11;
                if (v10 != null) {
                    v10.close();
                }
                throw v0_1;
            } catch (com.google.android.gms.internal.zzcbq v0_0) {
                com.google.android.gms.internal.ge v1_0 = v11;
                try {
                    this.zzauk().zzayc().zzd("Error querying events. appId", com.google.android.gms.internal.zzcbo.a(p13), this.zzauf().a(p14), v0_0);
                } catch (com.google.android.gms.internal.zzcbq v0_1) {
                    v10 = v1_0;
                }
                if (v1_0 != null) {
                    v1_0.close();
                }
                v1_2 = 0;
                return v1_2;
            }
        } catch (com.google.android.gms.internal.zzcbq v0_1) {
        } catch (com.google.android.gms.internal.zzcbq v0_0) {
            v1_0 = 0;
        }
    }

Method com.google.android.gms.internal.fz.a() calling method android.database.sqlite.SQLiteDatabase.query()


    private static boolean a(com.google.android.gms.internal.zzcbo p10, android.database.sqlite.SQLiteDatabase p11, String p12)
    {
        int v9 = 0;
        if (p10 != null) {
            try {
                com.google.android.gms.internal.zzcbq 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.zzaye().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.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.f() calling method android.database.sqlite.SQLiteDatabase.query()


    public long f(String p14, String p15)
    {
        long v0_2;
        long v0_7 = this.a.getWritableDatabase();
        String v4_0 = new String[2];
        v4_0[0] = p14;
        v4_0[1] = p15;
        android.database.Cursor v2_0 = v0_7.query("datasets", com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage$DatasetColumns.a, "identity_id = ? AND dataset_name = ?", v4_0, 0, 0, 0);
        if (!v2_0.moveToFirst()) {
            Object[] v3_1 = new Object[2];
            v3_1[0] = p15;
            v3_1[1] = "datasets";
            android.util.Log.w("SQLiteLocalStorage", String.format("couldn\'t find %s in %s table", v3_1));
            v0_2 = 0;
        } else {
            v0_2 = ((long) v2_0.getInt(v2_0.getColumnIndex("last_sync_count")));
        }
        v2_0.close();
        return v0_2;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.e() calling method android.database.sqlite.SQLiteDatabase.query()


    public com.amazonaws.mobileconnectors.cognito.DatasetMetadata e(String p9, String p10)
    {
        com.amazonaws.mobileconnectors.cognito.DatasetMetadata v5 = 0;
        android.database.Cursor v0_2 = this.a.getWritableDatabase();
        String[] v4_1 = new String[2];
        v4_1[0] = p9;
        v4_1[1] = p10;
        android.database.Cursor v0_1 = v0_2.query("datasets", com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage$DatasetColumns.a, "identity_id = ? AND dataset_name = ?", v4_1, 0, 0, 0);
        if (v0_1.moveToFirst()) {
            v5 = this.a(v0_1);
        }
        v0_1.close();
        return v5;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.b() calling method android.database.sqlite.SQLiteDatabase.query()


    public java.util.List b(String p10, String p11)
    {
        java.util.ArrayList v8_1 = new java.util.ArrayList();
        android.database.Cursor v0_2 = this.a.getWritableDatabase();
        String[] v4_1 = new String[3];
        v4_1[0] = p10;
        v4_1[1] = p11;
        v4_1[2] = String.valueOf(1);
        android.database.Cursor v0_0 = v0_2.query("records", com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage$RecordColumns.a, "identity_id = ? AND dataset_name = ? AND modified = ?", v4_1, 0, 0, 0);
        while (v0_0.moveToNext()) {
            v8_1.add(this.b(v0_0));
        }
        v0_0.close();
        return v8_1;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.b() calling method android.database.sqlite.SQLiteDatabase.query()


    public com.amazonaws.mobileconnectors.cognito.Record b(String p9, String p10, String p11)
    {
        com.amazonaws.mobileconnectors.cognito.Record v5 = 0;
        android.database.Cursor v0_2 = this.a.getWritableDatabase();
        String[] v4_1 = new String[3];
        v4_1[0] = p9;
        v4_1[1] = p10;
        v4_1[2] = p11;
        android.database.Cursor v0_1 = v0_2.query("records", com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage$RecordColumns.a, "identity_id = ? AND dataset_name = ? AND key = ?", v4_1, 0, 0, 0);
        if (v0_1.moveToFirst()) {
            v5 = this.b(v0_1);
        }
        v0_1.close();
        return v5;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.b() calling method android.database.sqlite.SQLiteDatabase.query()


    com.amazonaws.mobileconnectors.cognito.DatasetMetadata b(android.database.sqlite.SQLiteDatabase p9, String p10, String p11)
    {
        com.amazonaws.mobileconnectors.cognito.DatasetMetadata v5 = 0;
        String[] v4 = new String[2];
        v4[0] = p10;
        v4[1] = p11;
        android.database.Cursor v0_1 = p9.query("datasets", com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage$DatasetColumns.a, "identity_id = ? AND dataset_name = ?", v4, 0, 0, 0);
        if (v0_1.moveToFirst()) {
            v5 = this.a(v0_1);
        }
        v0_1.close();
        return v5;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public java.util.List a(String p10, String p11)
    {
        java.util.ArrayList v8_1 = new java.util.ArrayList();
        android.database.Cursor v0_2 = this.a.getWritableDatabase();
        String[] v4_0 = new String[2];
        v4_0[0] = p10;
        v4_0[1] = p11;
        android.database.Cursor v0_0 = v0_2.query("records", ark>com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorageark>$RecordColumns.a, "identity_id = ? AND dataset_name = ?", v4_0, 0, 0, 0);
        while (v0_0.moveToNext()) {
            v8_1.add(this.b(v0_0));
        }
        v0_0.close();
        return v8_1;
    }

Method com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorage.a() calling method android.database.sqlite.SQLiteDatabase.query()


    public java.util.List a(String p10)
    {
        java.util.ArrayList v8_1 = new java.util.ArrayList();
        android.database.Cursor v0_2 = this.a.getWritableDatabase();
        String[] v4_0 = new String[1];
        v4_0[0] = p10;
        android.database.Cursor v0_0 = v0_2.query("datasets", ark>com.amazonaws.mobileconnectors.cognito.internal.storage.SQLiteLocalStorageark>$DatasetColumns.a, "identity_id = ?", v4_0, 0, 0, 0);
        while (v0_0.moveToNext()) {
            v8_1.add(this.a(v0_0));
        }
        v0_0.close();
        return v8_1;
    }