.class public final Lq8/d;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Ln8/x;


# instance fields
.field public final r:Lp8/g;


# direct methods
.method public constructor <init>(Lp8/g;)V
    .registers 2

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

    iput-object p1, p0, Lq8/d;->r:Lp8/g;

    return-void
.end method


# virtual methods
.method public a(Ln8/h;Lt8/a;)Ln8/w;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Ln8/h;",
            "Lt8/a<",
            "TT;>;)",
            "Ln8/w<",
            "TT;>;"
        }
    .end annotation

    .line 1
    iget-object v0, p2, Lt8/a;->a:Ljava/lang/Class;

    .line 2
    const-class v1, Lo8/a;

    invoke-virtual {v0, v1}, Ljava/lang/Class;->getAnnotation(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;

    move-result-object v0

    check-cast v0, Lo8/a;

    if-nez v0, :cond_e

    const/4 p1, 0x0

    return-object p1

    :cond_e
    iget-object v1, p0, Lq8/d;->r:Lp8/g;

    invoke-virtual {p0, v1, p1, p2, v0}, Lq8/d;->b(Lp8/g;Ln8/h;Lt8/a;Lo8/a;)Ln8/w;

    move-result-object p1

    return-object p1
.end method

.method public b(Lp8/g;Ln8/h;Lt8/a;Lo8/a;)Ln8/w;
    .registers 13
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lp8/g;",
            "Ln8/h;",
            "Lt8/a<",
            "*>;",
            "Lo8/a;",
            ")",
            "Ln8/w<",
            "*>;"
        }
    .end annotation

    invoke-interface {p4}, Lo8/a;->value()Ljava/lang/Class;

    move-result-object v0

    .line 1
    new-instance v1, Lt8/a;

    invoke-direct {v1, v0}, Lt8/a;-><init>(Ljava/lang/reflect/Type;)V

    .line 2
    invoke-virtual {p1, v1}, Lp8/g;->a(Lt8/a;)Lp8/s;

    move-result-object p1

    invoke-interface {p1}, Lp8/s;->a()Ljava/lang/Object;

    move-result-object p1

    instance-of v0, p1, Ln8/w;

    if-eqz v0, :cond_18

    check-cast p1, Ln8/w;

    goto :goto_72

    :cond_18
    instance-of v0, p1, Ln8/x;

    if-eqz v0, :cond_23

    check-cast p1, Ln8/x;

    invoke-interface {p1, p2, p3}, Ln8/x;->a(Ln8/h;Lt8/a;)Ln8/w;

    move-result-object p1

    goto :goto_72

    :cond_23
    instance-of v0, p1, Ln8/t;

    if-nez v0, :cond_58

    instance-of v1, p1, Ln8/l;

    if-eqz v1, :cond_2c

    goto :goto_58

    :cond_2c
    new-instance p2, Ljava/lang/IllegalArgumentException;

    const-string p4, "Invalid attempt to bind an instance of "

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

    move-result-object p4

    invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object p1

    invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object p1

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

    const-string p1, " as a @JsonAdapter for "

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

    invoke-virtual {p3}, Lt8/a;->toString()Ljava/lang/String;

    move-result-object p1

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

    const-string p1, ". @JsonAdapter value must be a TypeAdapter, TypeAdapterFactory, JsonSerializer or JsonDeserializer."

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

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

    move-result-object p1

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

    throw p2

    :cond_58
    :goto_58
    const/4 v1, 0x0

    if-eqz v0, :cond_60

    move-object v0, p1

    check-cast v0, Ln8/t;

    move-object v3, v0

    goto :goto_61

    :cond_60
    move-object v3, v1

    :goto_61
    instance-of v0, p1, Ln8/l;

    if-eqz v0, :cond_68

    move-object v1, p1

    check-cast v1, Ln8/l;

    :cond_68
    move-object v4, v1

    new-instance p1, Lq8/m;

    const/4 v7, 0x0

    move-object v2, p1

    move-object v5, p2

    move-object v6, p3

    invoke-direct/range {v2 .. v7}, Lq8/m;-><init>(Ln8/t;Ln8/l;Ln8/h;Lt8/a;Ln8/x;)V

    :goto_72
    if-eqz p1, :cond_80

    invoke-interface {p4}, Lo8/a;->nullSafe()Z

    move-result p2

    if-eqz p2, :cond_80

    .line 3
    new-instance p2, Ln8/v;

    invoke-direct {p2, p1}, Ln8/v;-><init>(Ln8/w;)V

    move-object p1, p2

    :cond_80
    return-object p1
.end method
