.class public Lb1/i;
.super Le1/b$a;
.source ""


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lb1/i$b;,
        Lb1/i$a;
    }
.end annotation


# instance fields
.field public b:Lb1/a;

.field public final c:Lb1/i$a;


# direct methods
.method public constructor <init>(Lb1/a;Lb1/i$a;Ljava/lang/String;Ljava/lang/String;)V
    .registers 5

    iget p3, p2, Lb1/i$a;->a:I

    invoke-direct {p0, p3}, Le1/b$a;-><init>(I)V

    iput-object p1, p0, Lb1/i;->b:Lb1/a;

    iput-object p2, p0, Lb1/i;->c:Lb1/i$a;

    return-void
.end method


# virtual methods
.method public b(Le1/a;II)V
    .registers 15

    iget-object v0, p0, Lb1/i;->b:Lb1/a;

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-eqz v0, :cond_10a

    iget-object v0, v0, Lb1/a;->d:Lb1/h$c;

    invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    const/4 v3, 0x0

    if-ne p2, p3, :cond_14

    .line 1
    invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;

    move-result-object v0

    goto/16 :goto_78

    :cond_14
    if-le p3, p2, :cond_18

    move v4, v1

    goto :goto_19

    :cond_18
    move v4, v2

    :goto_19
    new-instance v5, Ljava/util/ArrayList;

    invoke-direct {v5}, Ljava/util/ArrayList;-><init>()V

    move v6, p2

    :cond_1f
    if-eqz v4, :cond_24

    if-ge v6, p3, :cond_77

    goto :goto_26

    :cond_24
    if-le v6, p3, :cond_77

    .line 2
    :goto_26
    iget-object v7, v0, Lb1/h$c;->a:Ljava/util/HashMap;

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Ljava/util/TreeMap;

    if-nez v7, :cond_35

    goto :goto_75

    :cond_35
    if-eqz v4, :cond_3c

    invoke-virtual {v7}, Ljava/util/TreeMap;->descendingKeySet()Ljava/util/NavigableSet;

    move-result-object v8

    goto :goto_40

    :cond_3c
    invoke-virtual {v7}, Ljava/util/TreeMap;->keySet()Ljava/util/Set;

    move-result-object v8

    :goto_40
    invoke-interface {v8}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v8

    :cond_44
    invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z

    move-result v9

    if-eqz v9, :cond_72

    invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Ljava/lang/Integer;

    invoke-virtual {v9}, Ljava/lang/Integer;->intValue()I

    move-result v9

    if-eqz v4, :cond_5b

    if-gt v9, p3, :cond_61

    if-le v9, v6, :cond_61

    goto :goto_5f

    :cond_5b
    if-lt v9, p3, :cond_61

    if-ge v9, v6, :cond_61

    :goto_5f
    move v10, v1

    goto :goto_62

    :cond_61
    move v10, v2

    :goto_62
    if-eqz v10, :cond_44

    invoke-static {v9}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v7, v6}, Ljava/util/TreeMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    move v7, v1

    move v6, v9

    goto :goto_73

    :cond_72
    move v7, v2

    :goto_73
    if-nez v7, :cond_1f

    :goto_75
    move-object v0, v3

    goto :goto_78

    :cond_77
    move-object v0, v5

    :goto_78
    if-eqz v0, :cond_10a

    .line 3
    iget-object v4, p0, Lb1/i;->c:Lb1/i$a;

    check-cast v4, Landroidx/work/impl/WorkDatabase_Impl$a;

    invoke-static {v4}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 4
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    move-object v5, p1

    check-cast v5, Lf1/a;

    .line 5
    new-instance v6, Landroidx/appcompat/widget/d0;

    const-string v7, "SELECT name FROM sqlite_master WHERE type = \'trigger\'"

    .line 6
    invoke-direct {v6, v7, v3}, Landroidx/appcompat/widget/d0;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V

    .line 7
    invoke-virtual {v5, v6}, Lf1/a;->e(Le1/d;)Landroid/database/Cursor;

    move-result-object v3

    .line 8
    :goto_94
    :try_start_94
    invoke-interface {v3}, Landroid/database/Cursor;->moveToNext()Z

    move-result v6

    if-eqz v6, :cond_a2

    invoke-interface {v3, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v4, v6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    :try_end_a1
    .catchall {:try_start_94 .. :try_end_a1} :catchall_105

    goto :goto_94

    :cond_a2
    invoke-interface {v3}, Landroid/database/Cursor;->close()V

    invoke-virtual {v4}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :cond_a9
    :goto_a9
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_c9

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;

    const-string v6, "room_fts_content_sync_"

    invoke-virtual {v4, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_a9

    const-string v6, "DROP TRIGGER IF EXISTS "

    invoke-static {v6, v4}, Le/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    .line 9
    iget-object v6, v5, Lf1/a;->r:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v6, v4}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    goto :goto_a9

    .line 10
    :cond_c9
    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_cd
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_dd

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lc1/a;

    invoke-virtual {v3, p1}, Lc1/a;->a(Le1/a;)V

    goto :goto_cd

    :cond_dd
    iget-object v0, p0, Lb1/i;->c:Lb1/i$a;

    invoke-virtual {v0, p1}, Lb1/i$a;->b(Le1/a;)Lb1/i$b;

    move-result-object v0

    iget-boolean v3, v0, Lb1/i$b;->a:Z

    if-eqz v3, :cond_f0

    iget-object v0, p0, Lb1/i;->c:Lb1/i$a;

    invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    invoke-virtual {p0, p1}, Lb1/i;->c(Le1/a;)V

    goto :goto_10b

    :cond_f0
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "Migration didn\'t properly handle: "

    invoke-static {p2}, Landroidx/activity/c;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p2

    iget-object p3, v0, Lb1/i$b;->b:Ljava/lang/String;

    invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p1

    :catchall_105
    move-exception p1

    .line 11
    invoke-interface {v3}, Landroid/database/Cursor;->close()V

    throw p1

    :cond_10a
    move v1, v2

    :goto_10b
    if-nez v1, :cond_19a

    .line 12
    iget-object v0, p0, Lb1/i;->b:Lb1/a;

    if-eqz v0, :cond_176

    invoke-virtual {v0, p2, p3}, Lb1/a;->a(II)Z

    move-result v0

    if-nez v0, :cond_176

    iget-object p2, p0, Lb1/i;->c:Lb1/i$a;

    check-cast p2, Landroidx/work/impl/WorkDatabase_Impl$a;

    invoke-static {p2}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 13
    move-object p3, p1

    check-cast p3, Lf1/a;

    .line 14
    iget-object v0, p3, Lf1/a;->r:Landroid/database/sqlite/SQLiteDatabase;

    const-string v1, "DROP TABLE IF EXISTS `Dependency`"

    invoke-virtual {v0, v1}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    iget-object v0, p3, Lf1/a;->r:Landroid/database/sqlite/SQLiteDatabase;

    const-string v1, "DROP TABLE IF EXISTS `WorkSpec`"

    invoke-virtual {v0, v1}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    iget-object v0, p3, Lf1/a;->r:Landroid/database/sqlite/SQLiteDatabase;

    const-string v1, "DROP TABLE IF EXISTS `WorkTag`"

    invoke-virtual {v0, v1}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    iget-object v0, p3, Lf1/a;->r:Landroid/database/sqlite/SQLiteDatabase;

    const-string v1, "DROP TABLE IF EXISTS `SystemIdInfo`"

    invoke-virtual {v0, v1}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    iget-object v0, p3, Lf1/a;->r:Landroid/database/sqlite/SQLiteDatabase;

    const-string v1, "DROP TABLE IF EXISTS `WorkName`"

    invoke-virtual {v0, v1}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    iget-object v0, p3, Lf1/a;->r:Landroid/database/sqlite/SQLiteDatabase;

    const-string v1, "DROP TABLE IF EXISTS `WorkProgress`"

    invoke-virtual {v0, v1}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    iget-object p3, p3, Lf1/a;->r:Landroid/database/sqlite/SQLiteDatabase;

    const-string v0, "DROP TABLE IF EXISTS `Preference`"

    invoke-virtual {p3, v0}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 15
    iget-object p3, p2, Landroidx/work/impl/WorkDatabase_Impl$a;->b:Landroidx/work/impl/WorkDatabase_Impl;

    sget v0, Landroidx/work/impl/WorkDatabase_Impl;->s:I

    .line 16
    iget-object p3, p3, Lb1/h;->g:Ljava/util/List;

    if-eqz p3, :cond_170

    .line 17
    invoke-interface {p3}, Ljava/util/List;->size()I

    move-result p3

    :goto_15e
    if-ge v2, p3, :cond_170

    iget-object v0, p2, Landroidx/work/impl/WorkDatabase_Impl$a;->b:Landroidx/work/impl/WorkDatabase_Impl;

    .line 18
    iget-object v0, v0, Lb1/h;->g:Ljava/util/List;

    .line 19
    invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lb1/h$b;

    invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    add-int/lit8 v2, v2, 0x1

    goto :goto_15e

    .line 20
    :cond_170
    iget-object p2, p0, Lb1/i;->c:Lb1/i$a;

    invoke-virtual {p2, p1}, Lb1/i$a;->a(Le1/a;)V

    goto :goto_19a

    :cond_176
    new-instance p1, Ljava/lang/IllegalStateException;

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "A migration from "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p2, " to "

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p2, " was required but not found. Please provide the necessary Migration path via RoomDatabase.Builder.addMigration(Migration ...) or allow for destructive migrations via one of the RoomDatabase.Builder.fallbackToDestructiveMigration* methods."

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p1

    :cond_19a
    :goto_19a
    return-void
.end method

.method public final c(Le1/a;)V
    .registers 4

    .line 1
    check-cast p1, Lf1/a;

    .line 2
    iget-object v0, p1, Lf1/a;->r:Landroid/database/sqlite/SQLiteDatabase;

    const-string v1, "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)"

    invoke-virtual {v0, v1}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 3
    iget-object p1, p1, Lf1/a;->r:Landroid/database/sqlite/SQLiteDatabase;

    const-string v0, "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \'c103703e120ae8cc73c9248622f3cd1e\')"

    invoke-virtual {p1, v0}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    return-void
.end method
