.class public final Ls4/p;
.super Ld9/h;
.source ""

# interfaces
.implements Lh9/c;


# annotations
.annotation runtime Ld9/e;
    c = "com.floydwiz.gamingcenter.viewmodels.MainActivityVM$refreshUsageStats$1"
    f = "MainActivityVM.kt"
    l = {
        0xfb
    }
    m = "invokeSuspend"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ld9/h;",
        "Lh9/c<",
        "Lq9/w;",
        "Lb9/d<",
        "-",
        "Ly8/k;",
        ">;",
        "Ljava/lang/Object;",
        ">;"
    }
.end annotation


# instance fields
.field public v:I

.field public final synthetic w:Ls4/o;

.field public final synthetic x:Lo4/a;

.field public final synthetic y:Landroid/content/Context;


# direct methods
.method public constructor <init>(Ls4/o;Lo4/a;Landroid/content/Context;Lb9/d;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ls4/o;",
            "Lo4/a;",
            "Landroid/content/Context;",
            "Lb9/d<",
            "-",
            "Ls4/p;",
            ">;)V"
        }
    .end annotation

    iput-object p1, p0, Ls4/p;->w:Ls4/o;

    iput-object p2, p0, Ls4/p;->x:Lo4/a;

    iput-object p3, p0, Ls4/p;->y:Landroid/content/Context;

    const/4 p1, 0x2

    invoke-direct {p0, p1, p4}, Ld9/h;-><init>(ILb9/d;)V

    return-void
.end method


# virtual methods
.method public final b(Ljava/lang/Object;Lb9/d;)Lb9/d;
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Object;",
            "Lb9/d<",
            "*>;)",
            "Lb9/d<",
            "Ly8/k;",
            ">;"
        }
    .end annotation

    new-instance p1, Ls4/p;

    iget-object v0, p0, Ls4/p;->w:Ls4/o;

    iget-object v1, p0, Ls4/p;->x:Lo4/a;

    iget-object v2, p0, Ls4/p;->y:Landroid/content/Context;

    invoke-direct {p1, v0, v1, v2, p2}, Ls4/p;-><init>(Ls4/o;Lo4/a;Landroid/content/Context;Lb9/d;)V

    return-object p1
.end method

.method public e(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    .registers 6

    check-cast p1, Lq9/w;

    check-cast p2, Lb9/d;

    .line 1
    new-instance p1, Ls4/p;

    iget-object v0, p0, Ls4/p;->w:Ls4/o;

    iget-object v1, p0, Ls4/p;->x:Lo4/a;

    iget-object v2, p0, Ls4/p;->y:Landroid/content/Context;

    invoke-direct {p1, v0, v1, v2, p2}, Ls4/p;-><init>(Ls4/o;Lo4/a;Landroid/content/Context;Lb9/d;)V

    .line 2
    sget-object p2, Ly8/k;->a:Ly8/k;

    invoke-virtual {p1, p2}, Ls4/p;->o(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p1

    return-object p1
.end method

.method public final o(Ljava/lang/Object;)Ljava/lang/Object;
    .registers 18

    move-object/from16 v0, p0

    sget-object v1, Lc9/a;->r:Lc9/a;

    iget v2, v0, Ls4/p;->v:I

    const/4 v3, 0x1

    if-eqz v2, :cond_19

    if-ne v2, v3, :cond_11

    invoke-static/range {p1 .. p1}, Le/h;->h(Ljava/lang/Object;)V

    move-object/from16 v2, p1

    goto :goto_34

    :cond_11
    new-instance v1, Ljava/lang/IllegalStateException;

    const-string v2, "call to \'resume\' before \'invoke\' with coroutine"

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

    throw v1

    :cond_19
    invoke-static/range {p1 .. p1}, Le/h;->h(Ljava/lang/Object;)V

    iget-object v2, v0, Ls4/p;->w:Ls4/o;

    iget-object v4, v0, Ls4/p;->x:Lo4/a;

    iput v3, v0, Ls4/p;->v:I

    .line 1
    invoke-static {v2}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 2
    sget-object v2, Lq9/e0;->c:Lq9/u;

    .line 3
    new-instance v5, Ls4/m;

    const/4 v6, 0x0

    invoke-direct {v5, v4, v6}, Ls4/m;-><init>(Lo4/a;Lb9/d;)V

    invoke-static {v2, v5, v0}, Le/j;->g(Lb9/f;Lh9/c;Lb9/d;)Ljava/lang/Object;

    move-result-object v2

    if-ne v2, v1, :cond_34

    return-object v1

    .line 4
    :cond_34
    :goto_34
    check-cast v2, Ljava/lang/Number;

    invoke-virtual {v2}, Ljava/lang/Number;->longValue()J

    move-result-wide v1

    iget-object v4, v0, Ls4/p;->y:Landroid/content/Context;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v5

    const-wide/16 v7, 0x2710

    sub-long/2addr v5, v7

    const/4 v7, 0x0

    if-nez v4, :cond_47

    goto :goto_53

    :cond_47
    const-string v8, "game_centre"

    .line 5
    invoke-virtual {v4, v8, v7}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v4

    const-string v8, "FIRST_OPEN_TS"

    invoke-interface {v4, v8, v5, v6}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide v5

    .line 6
    :goto_53
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v8

    sub-long/2addr v8, v5

    long-to-double v8, v8

    const-wide v10, 0x4194997000000000L    # 8.64E7

    div-double/2addr v8, v10

    const-wide/high16 v10, 0x3ff0000000000000L    # 1.0

    cmpg-double v4, v8, v10

    if-gez v4, :cond_66

    move-wide v8, v10

    :cond_66
    new-instance v4, Ljava/lang/StringBuilder;

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

    const-string v10, "debugstats total time = "

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

    invoke-virtual {v4, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v10, " start time = "

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

    invoke-virtual {v4, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v5, " days = "

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

    invoke-virtual {v4, v8, v9}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;

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

    move-result-object v4

    new-array v5, v7, [Ljava/lang/Object;

    invoke-static {v4, v5}, Lbb/a;->a(Ljava/lang/String;[Ljava/lang/Object;)V

    iget-object v4, v0, Ls4/p;->w:Ls4/o;

    .line 7
    iget-object v4, v4, Ls4/o;->o:Landroidx/databinding/k;

    long-to-double v5, v1

    div-double v8, v5, v8

    double-to-long v8, v8

    const-wide/16 v10, 0x3e8

    cmp-long v12, v8, v10

    const-string v13, "0"

    const-string v14, "java.lang.String.format(format, *args)"

    const-string v15, "%.2f"

    const-wide/32 v10, 0x36ee80

    if-gez v12, :cond_a8

    move-object/from16 p1, v13

    move-object/from16 v8, p1

    goto :goto_c0

    :cond_a8
    long-to-double v8, v8

    move-object/from16 p1, v13

    long-to-double v12, v10

    div-double/2addr v8, v12

    new-array v12, v3, [Ljava/lang/Object;

    .line 8
    invoke-static {v8, v9}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v8

    aput-object v8, v12, v7

    invoke-static {v12, v3}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;

    move-result-object v8

    invoke-static {v15, v8}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-static {v8, v14}, Lx/e;->e(Ljava/lang/Object;Ljava/lang/String;)V

    :goto_c0
    const-string v9, "\nHRS"

    .line 9
    invoke-static {v8, v9}, Lx/e;->k(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v4, v8}, Landroidx/databinding/k;->I(Ljava/lang/Object;)V

    iget-object v4, v0, Ls4/p;->w:Ls4/o;

    .line 10
    iget-object v4, v4, Ls4/o;->p:Landroidx/databinding/k;

    const-wide/16 v8, 0x3e8

    cmp-long v1, v1, v8

    if-gez v1, :cond_d6

    move-object/from16 v13, p1

    goto :goto_eb

    :cond_d6
    long-to-double v1, v10

    div-double/2addr v5, v1

    new-array v1, v3, [Ljava/lang/Object;

    .line 11
    invoke-static {v5, v6}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v2

    aput-object v2, v1, v7

    invoke-static {v1, v3}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;

    move-result-object v1

    invoke-static {v15, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v13

    invoke-static {v13, v14}, Lx/e;->e(Ljava/lang/Object;Ljava/lang/String;)V

    :goto_eb
    const-string v1, " HRS PLAYED"

    .line 12
    invoke-static {v13, v1}, Lx/e;->k(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v4, v1}, Landroidx/databinding/k;->I(Ljava/lang/Object;)V

    sget-object v1, Ly8/k;->a:Ly8/k;

    return-object v1
.end method
