.class public Lg4/g;
.super Ljava/lang/Object;
.source ""


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lg4/g$a;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        "Y:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/lang/Object;"
    }
.end annotation


# instance fields
.field public final a:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "TT;",
            "Lg4/g$a<",
            "TY;>;>;"
        }
    .end annotation
.end field

.field public b:J

.field public c:J


# direct methods
.method public constructor <init>(J)V
    .registers 7

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

    new-instance v0, Ljava/util/LinkedHashMap;

    const/16 v1, 0x64

    const/high16 v2, 0x3f400000    # 0.75f

    const/4 v3, 0x1

    invoke-direct {v0, v1, v2, v3}, Ljava/util/LinkedHashMap;-><init>(IFZ)V

    iput-object v0, p0, Lg4/g;->a:Ljava/util/Map;

    iput-wide p1, p0, Lg4/g;->b:J

    return-void
.end method


# virtual methods
.method public declared-synchronized a(Ljava/lang/Object;)Ljava/lang/Object;
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;)TY;"
        }
    .end annotation

    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lg4/g;->a:Ljava/util/Map;

    invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lg4/g$a;

    if-eqz p1, :cond_e

    iget-object p1, p1, Lg4/g$a;->a:Ljava/lang/Object;
    :try_end_d
    .catchall {:try_start_1 .. :try_end_d} :catchall_11

    goto :goto_f

    :cond_e
    const/4 p1, 0x0

    :goto_f
    monitor-exit p0

    return-object p1

    :catchall_11
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public b(Ljava/lang/Object;)I
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TY;)I"
        }
    .end annotation

    const/4 p1, 0x1

    return p1
.end method

.method public c(Ljava/lang/Object;Ljava/lang/Object;)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;TY;)V"
        }
    .end annotation

    return-void
.end method

.method public declared-synchronized d(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    .registers 10
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TT;TY;)TY;"
        }
    .end annotation

    monitor-enter p0

    :try_start_1
    invoke-virtual {p0, p2}, Lg4/g;->b(Ljava/lang/Object;)I

    move-result v0

    int-to-long v1, v0

    iget-wide v3, p0, Lg4/g;->b:J

    cmp-long v3, v1, v3

    const/4 v4, 0x0

    if-ltz v3, :cond_12

    invoke-virtual {p0, p1, p2}, Lg4/g;->c(Ljava/lang/Object;Ljava/lang/Object;)V
    :try_end_10
    .catchall {:try_start_1 .. :try_end_10} :catchall_4c

    monitor-exit p0

    return-object v4

    :cond_12
    if-eqz p2, :cond_19

    :try_start_14
    iget-wide v5, p0, Lg4/g;->c:J

    add-long/2addr v5, v1

    iput-wide v5, p0, Lg4/g;->c:J

    :cond_19
    iget-object v1, p0, Lg4/g;->a:Ljava/util/Map;

    if-nez p2, :cond_1f

    move-object v2, v4

    goto :goto_24

    :cond_1f
    new-instance v2, Lg4/g$a;

    invoke-direct {v2, p2, v0}, Lg4/g$a;-><init>(Ljava/lang/Object;I)V

    :goto_24
    invoke-interface {v1, p1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lg4/g$a;

    if-eqz v0, :cond_41

    iget-wide v1, p0, Lg4/g;->c:J

    iget v3, v0, Lg4/g$a;->b:I

    int-to-long v5, v3

    sub-long/2addr v1, v5

    iput-wide v1, p0, Lg4/g;->c:J

    iget-object v1, v0, Lg4/g$a;->a:Ljava/lang/Object;

    invoke-virtual {v1, p2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result p2

    if-nez p2, :cond_41

    iget-object p2, v0, Lg4/g$a;->a:Ljava/lang/Object;

    invoke-virtual {p0, p1, p2}, Lg4/g;->c(Ljava/lang/Object;Ljava/lang/Object;)V

    .line 1
    :cond_41
    iget-wide p1, p0, Lg4/g;->b:J

    invoke-virtual {p0, p1, p2}, Lg4/g;->e(J)V

    if-eqz v0, :cond_4a

    .line 2
    iget-object v4, v0, Lg4/g$a;->a:Ljava/lang/Object;
    :try_end_4a
    .catchall {:try_start_14 .. :try_end_4a} :catchall_4c

    :cond_4a
    monitor-exit p0

    return-object v4

    :catchall_4c
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public declared-synchronized e(J)V
    .registers 10

    monitor-enter p0

    :goto_1
    :try_start_1
    iget-wide v0, p0, Lg4/g;->c:J

    cmp-long v0, v0, p1

    if-lez v0, :cond_32

    iget-object v0, p0, Lg4/g;->a:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v0

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

    move-result-object v1

    check-cast v1, Ljava/util/Map$Entry;

    invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lg4/g$a;

    iget-wide v3, p0, Lg4/g;->c:J

    iget v5, v2, Lg4/g$a;->b:I

    int-to-long v5, v5

    sub-long/2addr v3, v5

    iput-wide v3, p0, Lg4/g;->c:J

    invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v1

    invoke-interface {v0}, Ljava/util/Iterator;->remove()V

    iget-object v0, v2, Lg4/g$a;->a:Ljava/lang/Object;

    invoke-virtual {p0, v1, v0}, Lg4/g;->c(Ljava/lang/Object;Ljava/lang/Object;)V
    :try_end_31
    .catchall {:try_start_1 .. :try_end_31} :catchall_34

    goto :goto_1

    :cond_32
    monitor-exit p0

    return-void

    :catchall_34
    move-exception p1

    monitor-exit p0

    throw p1
.end method
