l.smali

.class public Lt/l;
.super Ljava/lang/Object;
.source "GradientColorParser.java"

# interfaces
.implements Lt/j0;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Lt/j0<",
        "Lq/c;",
        ">;"
    }
.end annotation


# instance fields
.field public a:I


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method public constructor <init>(I)V
    .registers 2

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

    iput p1, p0, Lt/l;->a:I

    return-void
.end method


# virtual methods
.method public final a(D[D[D)I
    .registers 24
    .annotation build Landroidx/annotation/IntRange;
        from = 0x0L
        to = 0xffL
    .end annotation

    move-object/from16 v0, p3

    move-object/from16 v1, p4

    const/4 v2, 0x1

    const/4 v3, 0x1

    :goto_6
    array-length v4, v0

    const-wide v5, 0x406fe00000000000L    # 255.0

    if-ge v3, v4, :cond_36

    add-int/lit8 v4, v3, -0x1

    aget-wide v7, v0, v4

    aget-wide v9, v0, v3

    aget-wide v11, v0, v3

    cmpl-double v13, v11, p1

    if-ltz v13, :cond_33

    sub-double v11, p1, v7

    sub-double/2addr v9, v7

    div-double v13, v11, v9

    const-wide/16 v15, 0x0

    const-wide/high16 v17, 0x3ff0000000000000L    # 1.0

    invoke-static/range {v13 .. v18}, Lv/g;->a(DDD)D

    move-result-wide v11

    aget-wide v7, v1, v4

    aget-wide v9, v1, v3

    invoke-static/range {v7 .. v12}, Lv/g;->b(DDD)D

    move-result-wide v0

    :goto_2f
    mul-double v0, v0, v5

    double-to-int v0, v0

    return v0

    :cond_33
    add-int/lit8 v3, v3, 0x1

    goto :goto_6

    :cond_36
    array-length v0, v1

    sub-int/2addr v0, v2

    aget-wide v0, v1, v0

    goto :goto_2f
.end method

.method public bridge synthetic a(Lcom/airbnb/lottie/parser/moshi/JsonReader;F)Ljava/lang/Object;
    .registers 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    invoke-virtual {p0, p1, p2}, Lt/l;->a(Lcom/airbnb/lottie/parser/moshi/JsonReader;F)Lq/c;

    move-result-object p1

    return-object p1
.end method

.method public a(Lcom/airbnb/lottie/parser/moshi/JsonReader;F)Lq/c;
    .registers 15
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    new-instance p2, Ljava/util/ArrayList;

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

    invoke-virtual {p1}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->peek()Lcom/airbnb/lottie/parser/moshi/JsonReader$Token;

    move-result-object v0

    sget-object v1, Lcom/airbnb/lottie/parser/moshi/JsonReader$Token;->BEGIN_ARRAY:Lcom/airbnb/lottie/parser/moshi/JsonReader$Token;

    const/4 v2, 0x1

    const/4 v3, 0x0

    if-ne v0, v1, :cond_11

    const/4 v0, 0x1

    goto :goto_12

    :cond_11
    const/4 v0, 0x0

    :goto_12
    if-eqz v0, :cond_17

    invoke-virtual {p1}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->a()V

    :cond_17
    :goto_17
    invoke-virtual {p1}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->e()Z

    move-result v1

    if-eqz v1, :cond_2a

    invoke-virtual {p1}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->h()D

    move-result-wide v4

    double-to-float v1, v4

    invoke-static {v1}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object v1

    invoke-interface {p2, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_17

    :cond_2a
    if-eqz v0, :cond_2f

    invoke-virtual {p1}, Lcom/airbnb/lottie/parser/moshi/JsonReader;->c()V

    :cond_2f
    iget p1, p0, Lt/l;->a:I

    const/4 v0, -0x1

    if-ne p1, v0, :cond_3c

    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result p1

    div-int/lit8 p1, p1, 0x4

    iput p1, p0, Lt/l;->a:I

    :cond_3c
    iget p1, p0, Lt/l;->a:I

    new-array v0, p1, [F

    new-array p1, p1, [I

    const/4 v1, 0x0

    const/4 v4, 0x0

    :goto_44
    iget v5, p0, Lt/l;->a:I

    mul-int/lit8 v5, v5, 0x4

    if-ge v3, v5, :cond_8c

    div-int/lit8 v5, v3, 0x4

    invoke-interface {p2, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/lang/Float;

    invoke-virtual {v6}, Ljava/lang/Float;->floatValue()F

    move-result v6

    float-to-double v6, v6

    rem-int/lit8 v8, v3, 0x4

    if-eqz v8, :cond_86

    const-wide v9, 0x406fe00000000000L    # 255.0

    if-eq v8, v2, :cond_7f

    const/4 v11, 0x2

    if-eq v8, v11, :cond_78

    const/4 v11, 0x3

    if-eq v8, v11, :cond_69

    goto :goto_89

    :cond_69
    invoke-static {v6, v7}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v6, v6, v9

    double-to-int v6, v6

    const/16 v7, 0xff

    invoke-static {v7, v1, v4, v6}, Landroid/graphics/Color;->argb(IIII)I

    move-result v6

    aput v6, p1, v5

    goto :goto_89

    :cond_78
    invoke-static {v6, v7}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v6, v6, v9

    double-to-int v4, v6

    goto :goto_89

    :cond_7f
    invoke-static {v6, v7}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v6, v6, v9

    double-to-int v1, v6

    goto :goto_89

    :cond_86
    double-to-float v6, v6

    aput v6, v0, v5

    :goto_89
    add-int/lit8 v3, v3, 0x1

    goto :goto_44

    :cond_8c
    new-instance v1, Lq/c;

    invoke-direct {v1, v0, p1}, Lq/c;-><init>([F[I)V

    invoke-virtual {p0, v1, p2}, Lt/l;->a(Lq/c;Ljava/util/List;)V

    return-object v1
.end method

.method public final a(Lq/c;Ljava/util/List;)V
    .registers 10
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lq/c;",
            "Ljava/util/List<",
            "Ljava/lang/Float;",
            ">;)V"
        }
    .end annotation

    iget v0, p0, Lt/l;->a:I

    mul-int/lit8 v0, v0, 0x4

    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v1

    if-gt v1, v0, :cond_b

    return-void

    :cond_b
    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v0

    div-int/lit8 v1, v1, 0x2

    new-array v2, v1, [D

    new-array v1, v1, [D

    const/4 v3, 0x0

    const/4 v4, 0x0

    :goto_18
    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v5

    if-ge v0, v5, :cond_42

    rem-int/lit8 v5, v0, 0x2

    if-nez v5, :cond_30

    invoke-interface {p2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/Float;

    invoke-virtual {v5}, Ljava/lang/Float;->floatValue()F

    move-result v5

    float-to-double v5, v5

    aput-wide v5, v2, v4

    goto :goto_3f

    :cond_30
    invoke-interface {p2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/Float;

    invoke-virtual {v5}, Ljava/lang/Float;->floatValue()F

    move-result v5

    float-to-double v5, v5

    aput-wide v5, v1, v4

    add-int/lit8 v4, v4, 0x1

    :goto_3f
    add-int/lit8 v0, v0, 0x1

    goto :goto_18

    :cond_42
    :goto_42
    invoke-virtual {p1}, Lq/c;->c()I

    move-result p2

    if-ge v3, p2, :cond_72

    invoke-virtual {p1}, Lq/c;->a()[I

    move-result-object p2

    aget p2, p2, v3

    invoke-virtual {p1}, Lq/c;->b()[F

    move-result-object v0

    aget v0, v0, v3

    float-to-double v4, v0

    invoke-virtual {p0, v4, v5, v2, v1}, Lt/l;->a(D[D[D)I

    move-result v0

    invoke-static {p2}, Landroid/graphics/Color;->red(I)I

    move-result v4

    invoke-static {p2}, Landroid/graphics/Color;->green(I)I

    move-result v5

    invoke-static {p2}, Landroid/graphics/Color;->blue(I)I

    move-result p2

    invoke-static {v0, v4, v5, p2}, Landroid/graphics/Color;->argb(IIII)I

    move-result p2

    invoke-virtual {p1}, Lq/c;->a()[I

    move-result-object v0

    aput p2, v0, v3

    add-int/lit8 v3, v3, 0x1

    goto :goto_42

    :cond_72
    return-void
.end method