.class public final Lca/n$a;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lha/z;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lca/n;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "a"
.end annotation


# instance fields
.field public r:I

.field public s:I

.field public t:I

.field public u:I

.field public v:I

.field public final w:Lha/h;


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

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

    iput-object p1, p0, Lca/n$a;->w:Lha/h;

    return-void
.end method


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

    return-void
.end method

.method public d()Lha/a0;
    .registers 2

    iget-object v0, p0, Lca/n$a;->w:Lha/h;

    invoke-interface {v0}, Lha/z;->d()Lha/a0;

    move-result-object v0

    return-object v0
.end method

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

    const-string v0, "sink"

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

    :goto_5
    iget v0, p0, Lca/n$a;->u:I

    const-wide/16 v1, -0x1

    if-nez v0, :cond_8a

    iget-object v0, p0, Lca/n$a;->w:Lha/h;

    iget v3, p0, Lca/n$a;->v:I

    int-to-long v3, v3

    invoke-interface {v0, v3, v4}, Lha/h;->a(J)V

    const/4 v0, 0x0

    iput v0, p0, Lca/n$a;->v:I

    iget v0, p0, Lca/n$a;->s:I

    and-int/lit8 v0, v0, 0x4

    if-eqz v0, :cond_1d

    return-wide v1

    .line 1
    :cond_1d
    iget v0, p0, Lca/n$a;->t:I

    iget-object v1, p0, Lca/n$a;->w:Lha/h;

    invoke-static {v1}, Lw9/c;->s(Lha/h;)I

    move-result v1

    iput v1, p0, Lca/n$a;->u:I

    iput v1, p0, Lca/n$a;->r:I

    iget-object v1, p0, Lca/n$a;->w:Lha/h;

    invoke-interface {v1}, Lha/h;->readByte()B

    move-result v1

    and-int/lit16 v1, v1, 0xff

    iget-object v2, p0, Lca/n$a;->w:Lha/h;

    invoke-interface {v2}, Lha/h;->readByte()B

    move-result v2

    and-int/lit16 v2, v2, 0xff

    iput v2, p0, Lca/n$a;->s:I

    sget-object v2, Lca/n;->w:Lca/n;

    .line 2
    sget-object v8, Lca/n;->v:Ljava/util/logging/Logger;

    .line 3
    sget-object v2, Ljava/util/logging/Level;->FINE:Ljava/util/logging/Level;

    invoke-virtual {v8, v2}, Ljava/util/logging/Logger;->isLoggable(Ljava/util/logging/Level;)Z

    move-result v2

    if-eqz v2, :cond_58

    sget-object v2, Lca/e;->e:Lca/e;

    const/4 v3, 0x1

    iget v4, p0, Lca/n$a;->t:I

    iget v5, p0, Lca/n$a;->r:I

    iget v7, p0, Lca/n$a;->s:I

    move v6, v1

    invoke-virtual/range {v2 .. v7}, Lca/e;->b(ZIIII)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v8, v2}, Ljava/util/logging/Logger;->fine(Ljava/lang/String;)V

    :cond_58
    iget-object v2, p0, Lca/n$a;->w:Lha/h;

    invoke-interface {v2}, Lha/h;->readInt()I

    move-result v2

    const v3, 0x7fffffff

    and-int/2addr v2, v3

    iput v2, p0, Lca/n$a;->t:I

    const/16 v3, 0x9

    if-ne v1, v3, :cond_73

    if-ne v2, v0, :cond_6b

    goto :goto_5

    :cond_6b
    new-instance p1, Ljava/io/IOException;

    const-string p2, "TYPE_CONTINUATION streamId changed"

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

    throw p1

    :cond_73
    new-instance p1, Ljava/io/IOException;

    new-instance p2, Ljava/lang/StringBuilder;

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

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p3, " != TYPE_CONTINUATION"

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

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

    move-result-object p2

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

    throw p1

    .line 4
    :cond_8a
    iget-object v3, p0, Lca/n$a;->w:Lha/h;

    int-to-long v4, v0

    invoke-static {p2, p3, v4, v5}, Ljava/lang/Math;->min(JJ)J

    move-result-wide p2

    invoke-interface {v3, p1, p2, p3}, Lha/z;->x(Lha/e;J)J

    move-result-wide p1

    cmp-long p3, p1, v1

    if-nez p3, :cond_9a

    return-wide v1

    :cond_9a
    iget p3, p0, Lca/n$a;->u:I

    long-to-int v0, p1

    sub-int/2addr p3, v0

    iput p3, p0, Lca/n$a;->u:I

    return-wide p1
.end method
