e.smali

.class public Lv/e;
.super Lv/a;
.source "LottieValueAnimator.java"

# interfaces
.implements Landroid/view/Choreographer$FrameCallback;


# instance fields
.field public c:F

.field public d:Z

.field public e:J

.field public f:F

.field public g:I

.field public h:F

.field public i:F

.field public j:Lj/d;
    .annotation build Landroidx/annotation/Nullable;
    .end annotation
.end field

.field public k:Z
    .annotation build Landroidx/annotation/VisibleForTesting;
    .end annotation
.end field


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

    return-void
.end method

.method public constructor <init>()V
    .registers 4

    invoke-direct {p0}, Lv/a;-><init>()V

    const/high16 v0, 0x3f800000    # 1.0f

    iput v0, p0, Lv/e;->c:F

    const/4 v0, 0x0

    iput-boolean v0, p0, Lv/e;->d:Z

    const-wide/16 v1, 0x0

    iput-wide v1, p0, Lv/e;->e:J

    const/4 v1, 0x0

    iput v1, p0, Lv/e;->f:F

    iput v0, p0, Lv/e;->g:I

    const/high16 v1, -0x31000000

    iput v1, p0, Lv/e;->h:F

    const/high16 v1, 0x4f000000

    iput v1, p0, Lv/e;->i:F

    iput-boolean v0, p0, Lv/e;->k:Z

    return-void
.end method


# virtual methods
.method public a(F)V
    .registers 4

    iget v0, p0, Lv/e;->f:F

    cmpl-float v0, v0, p1

    if-nez v0, :cond_7

    return-void

    :cond_7
    invoke-virtual {p0}, Lv/e;->j()F

    move-result v0

    invoke-virtual {p0}, Lv/e;->i()F

    move-result v1

    invoke-static {p1, v0, v1}, Lv/g;->a(FFF)F

    move-result p1

    iput p1, p0, Lv/e;->f:F

    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lv/e;->e:J

    invoke-virtual {p0}, Lv/a;->c()V

    return-void
.end method

.method public a(FF)V
    .registers 6

    cmpl-float v0, p1, p2

    if-gtz v0, :cond_34

    iget-object v0, p0, Lv/e;->j:Lj/d;

    if-nez v0, :cond_c

    const v0, -0x800001

    goto :goto_10

    :cond_c
    invoke-virtual {v0}, Lj/d;->l()F

    move-result v0

    :goto_10
    iget-object v1, p0, Lv/e;->j:Lj/d;

    if-nez v1, :cond_18

    const v1, 0x7f7fffff    # Float.MAX_VALUE

    goto :goto_1c

    :cond_18
    invoke-virtual {v1}, Lj/d;->e()F

    move-result v1

    :goto_1c
    invoke-static {p1, v0, v1}, Lv/g;->a(FFF)F

    move-result v2

    iput v2, p0, Lv/e;->h:F

    invoke-static {p2, v0, v1}, Lv/g;->a(FFF)F

    move-result v0

    iput v0, p0, Lv/e;->i:F

    iget v0, p0, Lv/e;->f:F

    invoke-static {v0, p1, p2}, Lv/g;->a(FFF)F

    move-result p1

    float-to-int p1, p1

    int-to-float p1, p1

    invoke-virtual {p0, p1}, Lv/e;->a(F)V

    return-void

    :cond_34
    new-instance v0, Ljava/lang/IllegalArgumentException;

    const/4 v1, 0x2

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

    const/4 v2, 0x0

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

    move-result-object p1

    aput-object p1, v1, v2

    const/4 p1, 0x1

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

    move-result-object p2

    aput-object p2, v1, p1

    const-string p1, "minFrame (%s) must be <= maxFrame (%s)"

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

    move-result-object p1

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

    throw v0
.end method

.method public a(I)V
    .registers 3

    int-to-float p1, p1

    iget v0, p0, Lv/e;->i:F

    float-to-int v0, v0

    int-to-float v0, v0

    invoke-virtual {p0, p1, v0}, Lv/e;->a(FF)V

    return-void
.end method

.method public a(Lj/d;)V
    .registers 4

    iget-object v0, p0, Lv/e;->j:Lj/d;

    if-nez v0, :cond_6

    const/4 v0, 0x1

    goto :goto_7

    :cond_6
    const/4 v0, 0x0

    :goto_7
    iput-object p1, p0, Lv/e;->j:Lj/d;

    if-eqz v0, :cond_27

    iget v0, p0, Lv/e;->h:F

    invoke-virtual {p1}, Lj/d;->l()F

    move-result v1

    invoke-static {v0, v1}, Ljava/lang/Math;->max(FF)F

    move-result v0

    float-to-int v0, v0

    int-to-float v0, v0

    iget v1, p0, Lv/e;->i:F

    invoke-virtual {p1}, Lj/d;->e()F

    move-result p1

    invoke-static {v1, p1}, Ljava/lang/Math;->min(FF)F

    move-result p1

    float-to-int p1, p1

    int-to-float p1, p1

    invoke-virtual {p0, v0, p1}, Lv/e;->a(FF)V

    goto :goto_36

    :cond_27
    invoke-virtual {p1}, Lj/d;->l()F

    move-result v0

    float-to-int v0, v0

    int-to-float v0, v0

    invoke-virtual {p1}, Lj/d;->e()F

    move-result p1

    float-to-int p1, p1

    int-to-float p1, p1

    invoke-virtual {p0, v0, p1}, Lv/e;->a(FF)V

    :goto_36
    iget p1, p0, Lv/e;->f:F

    const/4 v0, 0x0

    iput v0, p0, Lv/e;->f:F

    float-to-int p1, p1

    int-to-float p1, p1

    invoke-virtual {p0, p1}, Lv/e;->a(F)V

    invoke-virtual {p0}, Lv/a;->c()V

    return-void
.end method

.method public b(F)V
    .registers 3

    iget v0, p0, Lv/e;->h:F

    invoke-virtual {p0, v0, p1}, Lv/e;->a(FF)V

    return-void
.end method

.method public c(F)V
    .registers 2

    iput p1, p0, Lv/e;->c:F

    return-void
.end method

.method public c(Z)V
    .registers 3
    .annotation build Landroidx/annotation/MainThread;
    .end annotation

    invoke-static {}, Landroid/view/Choreographer;->getInstance()Landroid/view/Choreographer;

    move-result-object v0

    invoke-virtual {v0, p0}, Landroid/view/Choreographer;->removeFrameCallback(Landroid/view/Choreographer$FrameCallback;)V

    if-eqz p1, :cond_c

    const/4 p1, 0x0

    iput-boolean p1, p0, Lv/e;->k:Z

    :cond_c
    return-void
.end method

.method public cancel()V
    .registers 1
    .annotation build Landroidx/annotation/MainThread;
    .end annotation

    invoke-virtual {p0}, Lv/a;->a()V

    invoke-virtual {p0}, Lv/e;->p()V

    return-void
.end method

.method public d()V
    .registers 2

    const/4 v0, 0x0

    iput-object v0, p0, Lv/e;->j:Lj/d;

    const/high16 v0, -0x31000000

    iput v0, p0, Lv/e;->h:F

    const/high16 v0, 0x4f000000

    iput v0, p0, Lv/e;->i:F

    return-void
.end method

.method public doFrame(J)V
    .registers 9

    invoke-virtual {p0}, Lv/e;->o()V

    iget-object v0, p0, Lv/e;->j:Lj/d;

    if-eqz v0, :cond_b5

    invoke-virtual {p0}, Lv/e;->isRunning()Z

    move-result v0

    if-nez v0, :cond_f

    goto/16 :goto_b5

    :cond_f
    const-string v0, "LottieValueAnimator#doFrame"

    invoke-static {v0}, Lj/c;->a(Ljava/lang/String;)V

    iget-wide v1, p0, Lv/e;->e:J

    const-wide/16 v3, 0x0

    cmp-long v5, v1, v3

    if-nez v5, :cond_1d

    goto :goto_1f

    :cond_1d
    sub-long v3, p1, v1

    :goto_1f
    invoke-virtual {p0}, Lv/e;->h()F

    move-result v1

    long-to-float v2, v3

    div-float/2addr v2, v1

    iget v1, p0, Lv/e;->f:F

    invoke-virtual {p0}, Lv/e;->l()Z

    move-result v3

    if-eqz v3, :cond_2e

    neg-float v2, v2

    :cond_2e
    add-float/2addr v1, v2

    iput v1, p0, Lv/e;->f:F

    invoke-virtual {p0}, Lv/e;->j()F

    move-result v2

    invoke-virtual {p0}, Lv/e;->i()F

    move-result v3

    invoke-static {v1, v2, v3}, Lv/g;->b(FFF)Z

    move-result v1

    xor-int/lit8 v1, v1, 0x1

    iget v2, p0, Lv/e;->f:F

    invoke-virtual {p0}, Lv/e;->j()F

    move-result v3

    invoke-virtual {p0}, Lv/e;->i()F

    move-result v4

    invoke-static {v2, v3, v4}, Lv/g;->a(FFF)F

    move-result v2

    iput v2, p0, Lv/e;->f:F

    iput-wide p1, p0, Lv/e;->e:J

    invoke-virtual {p0}, Lv/a;->c()V

    if-eqz v1, :cond_af

    invoke-virtual {p0}, Landroid/animation/ValueAnimator;->getRepeatCount()I

    move-result v1

    const/4 v2, -0x1

    if-eq v1, v2, :cond_82

    iget v1, p0, Lv/e;->g:I

    invoke-virtual {p0}, Landroid/animation/ValueAnimator;->getRepeatCount()I

    move-result v2

    if-lt v1, v2, :cond_82

    iget p1, p0, Lv/e;->c:F

    const/4 p2, 0x0

    cmpg-float p1, p1, p2

    if-gez p1, :cond_71

    invoke-virtual {p0}, Lv/e;->j()F

    move-result p1

    goto :goto_75

    :cond_71
    invoke-virtual {p0}, Lv/e;->i()F

    move-result p1

    :goto_75
    iput p1, p0, Lv/e;->f:F

    invoke-virtual {p0}, Lv/e;->p()V

    invoke-virtual {p0}, Lv/e;->l()Z

    move-result p1

    invoke-virtual {p0, p1}, Lv/a;->a(Z)V

    goto :goto_af

    :cond_82
    invoke-virtual {p0}, Lv/a;->b()V

    iget v1, p0, Lv/e;->g:I

    add-int/lit8 v1, v1, 0x1

    iput v1, p0, Lv/e;->g:I

    invoke-virtual {p0}, Landroid/animation/ValueAnimator;->getRepeatMode()I

    move-result v1

    const/4 v2, 0x2

    if-ne v1, v2, :cond_9c

    iget-boolean v1, p0, Lv/e;->d:Z

    xor-int/lit8 v1, v1, 0x1

    iput-boolean v1, p0, Lv/e;->d:Z

    invoke-virtual {p0}, Lv/e;->r()V

    goto :goto_ad

    :cond_9c
    invoke-virtual {p0}, Lv/e;->l()Z

    move-result v1

    if-eqz v1, :cond_a7

    invoke-virtual {p0}, Lv/e;->i()F

    move-result v1

    goto :goto_ab

    :cond_a7
    invoke-virtual {p0}, Lv/e;->j()F

    move-result v1

    :goto_ab
    iput v1, p0, Lv/e;->f:F

    :goto_ad
    iput-wide p1, p0, Lv/e;->e:J

    :cond_af
    :goto_af
    invoke-virtual {p0}, Lv/e;->s()V

    invoke-static {v0}, Lj/c;->b(Ljava/lang/String;)F

    :cond_b5
    :goto_b5
    return-void
.end method

.method public e()V
    .registers 2
    .annotation build Landroidx/annotation/MainThread;
    .end annotation

    invoke-virtual {p0}, Lv/e;->p()V

    invoke-virtual {p0}, Lv/e;->l()Z

    move-result v0

    invoke-virtual {p0, v0}, Lv/a;->a(Z)V

    return-void
.end method

.method public f()F
    .registers 4
    .annotation build Landroidx/annotation/FloatRange;
        from = 0.0
        to = 1.0
    .end annotation

    iget-object v0, p0, Lv/e;->j:Lj/d;

    if-nez v0, :cond_6

    const/4 v0, 0x0

    return v0

    :cond_6
    iget v1, p0, Lv/e;->f:F

    invoke-virtual {v0}, Lj/d;->l()F

    move-result v0

    sub-float/2addr v1, v0

    iget-object v0, p0, Lv/e;->j:Lj/d;

    invoke-virtual {v0}, Lj/d;->e()F

    move-result v0

    iget-object v2, p0, Lv/e;->j:Lj/d;

    invoke-virtual {v2}, Lj/d;->l()F

    move-result v2

    sub-float/2addr v0, v2

    div-float/2addr v1, v0

    return v1
.end method

.method public g()F
    .registers 2

    iget v0, p0, Lv/e;->f:F

    return v0
.end method

.method public getAnimatedFraction()F
    .registers 4
    .annotation build Landroidx/annotation/FloatRange;
        from = 0.0
        to = 1.0
    .end annotation

    iget-object v0, p0, Lv/e;->j:Lj/d;

    if-nez v0, :cond_6

    const/4 v0, 0x0

    return v0

    :cond_6
    invoke-virtual {p0}, Lv/e;->l()Z

    move-result v0

    if-eqz v0, :cond_1e

    invoke-virtual {p0}, Lv/e;->i()F

    move-result v0

    iget v1, p0, Lv/e;->f:F

    sub-float/2addr v0, v1

    invoke-virtual {p0}, Lv/e;->i()F

    move-result v1

    invoke-virtual {p0}, Lv/e;->j()F

    move-result v2

    :goto_1b
    sub-float/2addr v1, v2

    div-float/2addr v0, v1

    return v0

    :cond_1e
    iget v0, p0, Lv/e;->f:F

    invoke-virtual {p0}, Lv/e;->j()F

    move-result v1

    sub-float/2addr v0, v1

    invoke-virtual {p0}, Lv/e;->i()F

    move-result v1

    invoke-virtual {p0}, Lv/e;->j()F

    move-result v2

    goto :goto_1b
.end method

.method public getAnimatedValue()Ljava/lang/Object;
    .registers 2

    invoke-virtual {p0}, Lv/e;->f()F

    move-result v0

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

    move-result-object v0

    return-object v0
.end method

.method public getDuration()J
    .registers 3

    iget-object v0, p0, Lv/e;->j:Lj/d;

    if-nez v0, :cond_7

    const-wide/16 v0, 0x0

    goto :goto_c

    :cond_7
    invoke-virtual {v0}, Lj/d;->c()F

    move-result v0

    float-to-long v0, v0

    :goto_c
    return-wide v0
.end method

.method public final h()F
    .registers 3

    iget-object v0, p0, Lv/e;->j:Lj/d;

    if-nez v0, :cond_8

    const v0, 0x7f7fffff    # Float.MAX_VALUE

    return v0

    :cond_8
    const v1, 0x4e6e6b28    # 1.0E9f

    invoke-virtual {v0}, Lj/d;->g()F

    move-result v0

    div-float/2addr v1, v0

    iget v0, p0, Lv/e;->c:F

    invoke-static {v0}, Ljava/lang/Math;->abs(F)F

    move-result v0

    div-float/2addr v1, v0

    return v1
.end method

.method public i()F
    .registers 4

    iget-object v0, p0, Lv/e;->j:Lj/d;

    if-nez v0, :cond_6

    const/4 v0, 0x0

    return v0

    :cond_6
    iget v1, p0, Lv/e;->i:F

    const/high16 v2, 0x4f000000

    cmpl-float v2, v1, v2

    if-nez v2, :cond_12

    invoke-virtual {v0}, Lj/d;->e()F

    move-result v1

    :cond_12
    return v1
.end method

.method public isRunning()Z
    .registers 2

    iget-boolean v0, p0, Lv/e;->k:Z

    return v0
.end method

.method public j()F
    .registers 4

    iget-object v0, p0, Lv/e;->j:Lj/d;

    if-nez v0, :cond_6

    const/4 v0, 0x0

    return v0

    :cond_6
    iget v1, p0, Lv/e;->h:F

    const/high16 v2, -0x31000000

    cmpl-float v2, v1, v2

    if-nez v2, :cond_12

    invoke-virtual {v0}, Lj/d;->l()F

    move-result v1

    :cond_12
    return v1
.end method

.method public k()F
    .registers 2

    iget v0, p0, Lv/e;->c:F

    return v0
.end method

.method public final l()Z
    .registers 3

    invoke-virtual {p0}, Lv/e;->k()F

    move-result v0

    const/4 v1, 0x0

    cmpg-float v0, v0, v1

    if-gez v0, :cond_b

    const/4 v0, 0x1

    goto :goto_c

    :cond_b
    const/4 v0, 0x0

    :goto_c
    return v0
.end method

.method public m()V
    .registers 1
    .annotation build Landroidx/annotation/MainThread;
    .end annotation

    invoke-virtual {p0}, Lv/e;->p()V

    return-void
.end method

.method public n()V
    .registers 3
    .annotation build Landroidx/annotation/MainThread;
    .end annotation

    const/4 v0, 0x1

    iput-boolean v0, p0, Lv/e;->k:Z

    invoke-virtual {p0}, Lv/e;->l()Z

    move-result v0

    invoke-virtual {p0, v0}, Lv/a;->b(Z)V

    invoke-virtual {p0}, Lv/e;->l()Z

    move-result v0

    if-eqz v0, :cond_15

    invoke-virtual {p0}, Lv/e;->i()F

    move-result v0

    goto :goto_19

    :cond_15
    invoke-virtual {p0}, Lv/e;->j()F

    move-result v0

    :goto_19
    float-to-int v0, v0

    int-to-float v0, v0

    invoke-virtual {p0, v0}, Lv/e;->a(F)V

    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lv/e;->e:J

    const/4 v0, 0x0

    iput v0, p0, Lv/e;->g:I

    invoke-virtual {p0}, Lv/e;->o()V

    return-void
.end method

.method public o()V
    .registers 2

    invoke-virtual {p0}, Lv/e;->isRunning()Z

    move-result v0

    if-eqz v0, :cond_11

    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lv/e;->c(Z)V

    invoke-static {}, Landroid/view/Choreographer;->getInstance()Landroid/view/Choreographer;

    move-result-object v0

    invoke-virtual {v0, p0}, Landroid/view/Choreographer;->postFrameCallback(Landroid/view/Choreographer$FrameCallback;)V

    :cond_11
    return-void
.end method

.method public p()V
    .registers 2
    .annotation build Landroidx/annotation/MainThread;
    .end annotation

    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Lv/e;->c(Z)V

    return-void
.end method

.method public q()V
    .registers 3
    .annotation build Landroidx/annotation/MainThread;
    .end annotation

    const/4 v0, 0x1

    iput-boolean v0, p0, Lv/e;->k:Z

    invoke-virtual {p0}, Lv/e;->o()V

    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lv/e;->e:J

    invoke-virtual {p0}, Lv/e;->l()Z

    move-result v0

    if-eqz v0, :cond_23

    invoke-virtual {p0}, Lv/e;->g()F

    move-result v0

    invoke-virtual {p0}, Lv/e;->j()F

    move-result v1

    cmpl-float v0, v0, v1

    if-nez v0, :cond_23

    invoke-virtual {p0}, Lv/e;->i()F

    move-result v0

    iput v0, p0, Lv/e;->f:F

    goto :goto_3b

    :cond_23
    invoke-virtual {p0}, Lv/e;->l()Z

    move-result v0

    if-nez v0, :cond_3b

    invoke-virtual {p0}, Lv/e;->g()F

    move-result v0

    invoke-virtual {p0}, Lv/e;->i()F

    move-result v1

    cmpl-float v0, v0, v1

    if-nez v0, :cond_3b

    invoke-virtual {p0}, Lv/e;->j()F

    move-result v0

    iput v0, p0, Lv/e;->f:F

    :cond_3b
    :goto_3b
    return-void
.end method

.method public r()V
    .registers 2

    invoke-virtual {p0}, Lv/e;->k()F

    move-result v0

    neg-float v0, v0

    invoke-virtual {p0, v0}, Lv/e;->c(F)V

    return-void
.end method

.method public final s()V
    .registers 5

    iget-object v0, p0, Lv/e;->j:Lj/d;

    if-nez v0, :cond_5

    return-void

    :cond_5
    iget v0, p0, Lv/e;->f:F

    iget v1, p0, Lv/e;->h:F

    cmpg-float v1, v0, v1

    if-ltz v1, :cond_14

    iget v1, p0, Lv/e;->i:F

    cmpl-float v0, v0, v1

    if-gtz v0, :cond_14

    return-void

    :cond_14
    new-instance v0, Ljava/lang/IllegalStateException;

    const/4 v1, 0x3

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

    const/4 v2, 0x0

    iget v3, p0, Lv/e;->h:F

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

    move-result-object v3

    aput-object v3, v1, v2

    const/4 v2, 0x1

    iget v3, p0, Lv/e;->i:F

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

    move-result-object v3

    aput-object v3, v1, v2

    const/4 v2, 0x2

    iget v3, p0, Lv/e;->f:F

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

    move-result-object v3

    aput-object v3, v1, v2

    const-string v2, "Frame must be [%f,%f]. It is %f"

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

    move-result-object v1

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

    throw v0
.end method

.method public setRepeatMode(I)V
    .registers 3

    invoke-super {p0, p1}, Landroid/animation/ValueAnimator;->setRepeatMode(I)V

    const/4 v0, 0x2

    if-eq p1, v0, :cond_10

    iget-boolean p1, p0, Lv/e;->d:Z

    if-eqz p1, :cond_10

    const/4 p1, 0x0

    iput-boolean p1, p0, Lv/e;->d:Z

    invoke-virtual {p0}, Lv/e;->r()V

    :cond_10
    return-void
.end method