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

# interfaces
.implements Lh9/c;


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

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ld9/h;",
        "Lh9/c<",
        "Lq9/w;",
        "Lb9/d<",
        "-",
        "Ljava/util/ArrayList<",
        "Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse$App;",
        ">;>;",
        "Ljava/lang/Object;",
        ">;"
    }
.end annotation


# instance fields
.field public final synthetic v:Landroid/content/Context;


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

    iput-object p1, p0, Ls4/l;->v:Landroid/content/Context;

    const/4 p1, 0x2

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

    return-void
.end method


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

    new-instance p1, Ls4/l;

    iget-object v0, p0, Ls4/l;->v:Landroid/content/Context;

    invoke-direct {p1, v0, p2}, Ls4/l;-><init>(Landroid/content/Context;Lb9/d;)V

    return-object p1
.end method

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

    check-cast p1, Lq9/w;

    check-cast p2, Lb9/d;

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

    iget-object v0, p0, Ls4/l;->v:Landroid/content/Context;

    invoke-direct {p1, v0, p2}, Ls4/l;-><init>(Landroid/content/Context;Lb9/d;)V

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

    invoke-virtual {p1, p2}, Ls4/l;->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 10

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

    iget-object p1, p0, Ls4/l;->v:Landroid/content/Context;

    sget-object v0, Lo4/b$a;->w:Lo4/b$a;

    const-string v1, "key"

    .line 1
    invoke-static {v0, v1}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    new-instance v1, Ljava/util/ArrayList;

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

    if-nez p1, :cond_14

    goto :goto_5c

    :cond_14
    const/4 v2, 0x0

    const-string v3, "game_centre"

    invoke-virtual {p1, v3, v2}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object p1

    invoke-virtual {v0}, Ljava/lang/Enum;->name()Ljava/lang/String;

    move-result-object v0

    const-string v3, ""

    invoke-interface {p1, v0, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    if-nez p1, :cond_28

    goto :goto_29

    :cond_28
    move-object v3, p1

    :goto_29
    const-string p1, ","

    filled-new-array {p1}, [Ljava/lang/String;

    move-result-object p1

    const/4 v0, 0x6

    invoke-static {v3, p1, v2, v2, v0}, Lp9/l;->P(Ljava/lang/CharSequence;[Ljava/lang/String;ZII)Ljava/util/List;

    move-result-object p1

    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

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

    move-result v0

    if-eqz v0, :cond_5c

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

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    const-string v2, "null cannot be cast to non-null type kotlin.CharSequence"

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

    invoke-static {v0}, Lp9/l;->R(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;

    move-result-object v0

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

    move-result-object v0

    invoke-static {v0}, Lp9/h;->s(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_58

    goto :goto_38

    :cond_58
    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_38

    .line 2
    :cond_5c
    :goto_5c
    new-instance p1, Ljava/util/ArrayList;

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

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

    move-result-object v0

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

    move-result v1

    if-eqz v1, :cond_98

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

    move-result-object v1

    move-object v4, v1

    check-cast v4, Ljava/lang/String;

    iget-object v1, p0, Ls4/l;->v:Landroid/content/Context;

    const-string v2, "pkg"

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

    invoke-static {v1, v4}, Lq4/a;->c(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_80

    goto :goto_65

    :cond_80
    new-instance v1, Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse$App;

    iget-object v2, p0, Ls4/l;->v:Landroid/content/Context;

    invoke-static {v2, v4}, Lq4/a;->b(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    const/4 v5, 0x0

    const/4 v6, 0x0

    iget-object v2, p0, Ls4/l;->v:Landroid/content/Context;

    invoke-static {v2, v4}, Lq4/a;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v7

    move-object v2, v1

    invoke-direct/range {v2 .. v7}, Lcom/floydwiz/gamingcenter/models/network/GameCenterDataResponse$App;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/graphics/drawable/Drawable;)V

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

    goto :goto_65

    :cond_98
    return-object p1
.end method
