.class public Lv1/f;
.super Ljava/lang/Object;
.source ""


# instance fields
.field public final a:Landroidx/work/impl/WorkDatabase;


# direct methods
.method public constructor <init>(Landroidx/work/impl/WorkDatabase;)V
    .registers 2

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

    iput-object p1, p0, Lv1/f;->a:Landroidx/work/impl/WorkDatabase;

    return-void
.end method


# virtual methods
.method public final a(Ljava/lang/String;)I
    .registers 8

    iget-object v0, p0, Lv1/f;->a:Landroidx/work/impl/WorkDatabase;

    invoke-virtual {v0}, Lb1/h;->c()V

    :try_start_5
    iget-object v0, p0, Lv1/f;->a:Landroidx/work/impl/WorkDatabase;

    invoke-virtual {v0}, Landroidx/work/impl/WorkDatabase;->m()Lu1/e;

    move-result-object v0

    check-cast v0, Lu1/f;

    invoke-virtual {v0, p1}, Lu1/f;->a(Ljava/lang/String;)Ljava/lang/Long;

    move-result-object v0

    const/4 v1, 0x0

    if-eqz v0, :cond_19

    invoke-virtual {v0}, Ljava/lang/Long;->intValue()I

    move-result v0

    goto :goto_1a

    :cond_19
    move v0, v1

    :goto_1a
    const v2, 0x7fffffff

    if-ne v0, v2, :cond_20

    goto :goto_22

    :cond_20
    add-int/lit8 v1, v0, 0x1

    .line 1
    :goto_22
    iget-object v2, p0, Lv1/f;->a:Landroidx/work/impl/WorkDatabase;

    invoke-virtual {v2}, Landroidx/work/impl/WorkDatabase;->m()Lu1/e;

    move-result-object v2

    new-instance v3, Lu1/d;

    int-to-long v4, v1

    invoke-direct {v3, p1, v4, v5}, Lu1/d;-><init>(Ljava/lang/String;J)V

    check-cast v2, Lu1/f;

    invoke-virtual {v2, v3}, Lu1/f;->b(Lu1/d;)V

    .line 2
    iget-object p1, p0, Lv1/f;->a:Landroidx/work/impl/WorkDatabase;

    invoke-virtual {p1}, Lb1/h;->k()V
    :try_end_38
    .catchall {:try_start_5 .. :try_end_38} :catchall_3e

    iget-object p1, p0, Lv1/f;->a:Landroidx/work/impl/WorkDatabase;

    invoke-virtual {p1}, Lb1/h;->g()V

    return v0

    :catchall_3e
    move-exception p1

    iget-object v0, p0, Lv1/f;->a:Landroidx/work/impl/WorkDatabase;

    invoke-virtual {v0}, Lb1/h;->g()V

    throw p1
.end method

.method public b(II)I
    .registers 9

    const-class v0, Lv1/f;

    monitor-enter v0

    :try_start_3
    const-string v1, "next_job_scheduler_id"

    invoke-virtual {p0, v1}, Lv1/f;->a(Ljava/lang/String;)I

    move-result v1

    if-lt v1, p1, :cond_10

    if-le v1, p2, :cond_e

    goto :goto_10

    :cond_e
    move p1, v1

    goto :goto_25

    :cond_10
    :goto_10
    const-string p2, "next_job_scheduler_id"

    add-int/lit8 v1, p1, 0x1

    .line 1
    iget-object v2, p0, Lv1/f;->a:Landroidx/work/impl/WorkDatabase;

    invoke-virtual {v2}, Landroidx/work/impl/WorkDatabase;->m()Lu1/e;

    move-result-object v2

    new-instance v3, Lu1/d;

    int-to-long v4, v1

    invoke-direct {v3, p2, v4, v5}, Lu1/d;-><init>(Ljava/lang/String;J)V

    check-cast v2, Lu1/f;

    invoke-virtual {v2, v3}, Lu1/f;->b(Lu1/d;)V

    .line 2
    :goto_25
    monitor-exit v0

    return p1

    :catchall_27
    move-exception p1

    monitor-exit v0
    :try_end_29
    .catchall {:try_start_3 .. :try_end_29} :catchall_27

    throw p1
.end method
