.class public final Lha/r;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lha/x;


# instance fields
.field public final r:Ljava/io/OutputStream;

.field public final s:Lha/a0;


# direct methods
.method public constructor <init>(Ljava/io/OutputStream;Lha/a0;)V
    .registers 3

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

    iput-object p1, p0, Lha/r;->r:Ljava/io/OutputStream;

    iput-object p2, p0, Lha/r;->s:Lha/a0;

    return-void
.end method


# virtual methods
.method public E(Lha/e;J)V
    .registers 11

    const-string v0, "source"

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

    .line 1
    iget-wide v1, p1, Lha/e;->s:J

    const-wide/16 v3, 0x0

    move-wide v5, p2

    .line 2
    invoke-static/range {v1 .. v6}, Le/g;->b(JJJ)V

    :cond_d
    :goto_d
    const-wide/16 v0, 0x0

    cmp-long v0, p2, v0

    if-lez v0, :cond_4b

    iget-object v0, p0, Lha/r;->s:Lha/a0;

    invoke-virtual {v0}, Lha/a0;->f()V

    iget-object v0, p1, Lha/e;->r:Lha/u;

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

    iget v1, v0, Lha/u;->c:I

    iget v2, v0, Lha/u;->b:I

    sub-int/2addr v1, v2

    int-to-long v1, v1

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

    move-result-wide v1

    long-to-int v1, v1

    iget-object v2, p0, Lha/r;->r:Ljava/io/OutputStream;

    iget-object v3, v0, Lha/u;->a:[B

    iget v4, v0, Lha/u;->b:I

    invoke-virtual {v2, v3, v4, v1}, Ljava/io/OutputStream;->write([BII)V

    iget v2, v0, Lha/u;->b:I

    add-int/2addr v2, v1

    iput v2, v0, Lha/u;->b:I

    int-to-long v3, v1

    sub-long/2addr p2, v3

    .line 3
    iget-wide v5, p1, Lha/e;->s:J

    sub-long/2addr v5, v3

    .line 4
    iput-wide v5, p1, Lha/e;->s:J

    .line 5
    iget v1, v0, Lha/u;->c:I

    if-ne v2, v1, :cond_d

    invoke-virtual {v0}, Lha/u;->a()Lha/u;

    move-result-object v1

    iput-object v1, p1, Lha/e;->r:Lha/u;

    invoke-static {v0}, Lha/v;->b(Lha/u;)V

    goto :goto_d

    :cond_4b
    return-void
.end method

.method public close()V
    .registers 2

    iget-object v0, p0, Lha/r;->r:Ljava/io/OutputStream;

    invoke-virtual {v0}, Ljava/io/OutputStream;->close()V

    return-void
.end method

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

    iget-object v0, p0, Lha/r;->s:Lha/a0;

    return-object v0
.end method

.method public flush()V
    .registers 2

    iget-object v0, p0, Lha/r;->r:Ljava/io/OutputStream;

    invoke-virtual {v0}, Ljava/io/OutputStream;->flush()V

    return-void
.end method

.method public toString()Ljava/lang/String;
    .registers 3

    const-string v0, "sink("

    invoke-static {v0}, Landroidx/activity/c;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lha/r;->r:Ljava/io/OutputStream;

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

    const/16 v1, 0x29

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

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

    move-result-object v0

    return-object v0
.end method
