.class public final Lba/b$f;
.super Lba/b$a;
.source ""


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lba/b;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x11
    name = "f"
.end annotation


# instance fields
.field public u:Z


# direct methods
.method public constructor <init>(Lba/b;)V
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()V"
        }
    .end annotation

    invoke-direct {p0, p1}, Lba/b$a;-><init>(Lba/b;)V

    return-void
.end method


# virtual methods
.method public close()V
    .registers 2

    .line 1
    iget-boolean v0, p0, Lba/b$a;->s:Z

    if-eqz v0, :cond_5

    return-void

    .line 2
    :cond_5
    iget-boolean v0, p0, Lba/b$f;->u:Z

    if-nez v0, :cond_c

    invoke-virtual {p0}, Lba/b$a;->b()V

    :cond_c
    const/4 v0, 0x1

    .line 3
    iput-boolean v0, p0, Lba/b$a;->s:Z

    return-void
.end method

.method public x(Lha/e;J)J
    .registers 8

    const-string v0, "sink"

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

    const-wide/16 v0, 0x0

    cmp-long v0, p2, v0

    const/4 v1, 0x1

    if-ltz v0, :cond_e

    move v0, v1

    goto :goto_f

    :cond_e
    const/4 v0, 0x0

    :goto_f
    if-eqz v0, :cond_38

    .line 1
    iget-boolean v0, p0, Lba/b$a;->s:Z

    xor-int/2addr v0, v1

    if-eqz v0, :cond_2c

    .line 2
    iget-boolean v0, p0, Lba/b$f;->u:Z

    const-wide/16 v2, -0x1

    if-eqz v0, :cond_1d

    return-wide v2

    :cond_1d
    invoke-super {p0, p1, p2, p3}, Lba/b$a;->x(Lha/e;J)J

    move-result-wide p1

    cmp-long p3, p1, v2

    if-nez p3, :cond_2b

    iput-boolean v1, p0, Lba/b$f;->u:Z

    invoke-virtual {p0}, Lba/b$a;->b()V

    return-wide v2

    :cond_2b
    return-wide p1

    :cond_2c
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "closed"

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

    move-result-object p2

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

    throw p1

    :cond_38
    const-string p1, "byteCount < 0: "

    invoke-static {p1, p2, p3}, Lv0/a;->a(Ljava/lang/String;J)Ljava/lang/String;

    move-result-object p1

    new-instance p2, Ljava/lang/IllegalArgumentException;

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

    move-result-object p1

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

    throw p2
.end method
