apkfuckery/com.discord/smali_classes2/p0/h.smali

387 lines
7.3 KiB
Smali
Raw Normal View History

2020-09-09 19:21:20 +00:00
.class public final Lp0/h;
2020-09-02 04:07:20 +00:00
.super Ljava/lang/Object;
2020-09-09 19:21:20 +00:00
.source "DeflaterSink.kt"
2020-09-02 04:07:20 +00:00
# interfaces
2020-09-09 19:21:20 +00:00
.implements Lp0/v;
2020-09-02 04:07:20 +00:00
# instance fields
2020-09-09 19:21:20 +00:00
.field public d:Z
.field public final e:Lokio/BufferedSink;
.field public final f:Ljava/util/zip/Deflater;
2020-09-02 04:07:20 +00:00
# direct methods
2020-09-09 19:21:20 +00:00
.method public constructor <init>(Lp0/v;Ljava/util/zip/Deflater;)V
.locals 3
const-string v0, "sink"
invoke-static {p1, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string v1, "deflater"
invoke-static {p2, v1}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string v2, "$this$buffer"
invoke-static {p1, v2}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
new-instance v2, Lp0/q;
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
invoke-direct {v2, p1}, Lp0/q;-><init>(Lp0/v;)V
invoke-static {v2, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-static {p2, v1}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-02 04:07:20 +00:00
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2020-09-09 19:21:20 +00:00
iput-object v2, p0, Lp0/h;->e:Lokio/BufferedSink;
iput-object p2, p0, Lp0/h;->f:Ljava/util/zip/Deflater;
2020-09-02 04:07:20 +00:00
return-void
2020-09-09 19:21:20 +00:00
.end method
# virtual methods
.method public final a(Z)V
.locals 7
.annotation build Lorg/codehaus/mojo/animal_sniffer/IgnoreJRERequirement;
.end annotation
iget-object v0, p0, Lp0/h;->e:Lokio/BufferedSink;
invoke-interface {v0}, Lokio/BufferedSink;->i()Lp0/e;
move-result-object v0
2020-09-08 08:16:32 +00:00
:cond_0
2020-09-09 19:21:20 +00:00
:goto_0
const/4 v1, 0x1
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {v0, v1}, Lp0/e;->z(I)Lp0/s;
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
move-result-object v1
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
if-eqz p1, :cond_1
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
iget-object v2, p0, Lp0/h;->f:Ljava/util/zip/Deflater;
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
iget-object v3, v1, Lp0/s;->a:[B
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
iget v4, v1, Lp0/s;->c:I
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
rsub-int v5, v4, 0x2000
const/4 v6, 0x2
invoke-virtual {v2, v3, v4, v5, v6}, Ljava/util/zip/Deflater;->deflate([BIII)I
move-result v2
goto :goto_1
:cond_1
iget-object v2, p0, Lp0/h;->f:Ljava/util/zip/Deflater;
iget-object v3, v1, Lp0/s;->a:[B
iget v4, v1, Lp0/s;->c:I
rsub-int v5, v4, 0x2000
invoke-virtual {v2, v3, v4, v5}, Ljava/util/zip/Deflater;->deflate([BII)I
move-result v2
:goto_1
if-lez v2, :cond_2
iget v3, v1, Lp0/s;->c:I
add-int/2addr v3, v2
iput v3, v1, Lp0/s;->c:I
iget-wide v3, v0, Lp0/e;->e:J
int-to-long v1, v2
add-long/2addr v3, v1
iput-wide v3, v0, Lp0/e;->e:J
iget-object v1, p0, Lp0/h;->e:Lokio/BufferedSink;
invoke-interface {v1}, Lokio/BufferedSink;->U()Lokio/BufferedSink;
goto :goto_0
:cond_2
iget-object v2, p0, Lp0/h;->f:Ljava/util/zip/Deflater;
invoke-virtual {v2}, Ljava/util/zip/Deflater;->needsInput()Z
move-result v2
if-eqz v2, :cond_0
iget p1, v1, Lp0/s;->b:I
iget v2, v1, Lp0/s;->c:I
if-ne p1, v2, :cond_3
invoke-virtual {v1}, Lp0/s;->a()Lp0/s;
move-result-object p1
iput-object p1, v0, Lp0/e;->d:Lp0/s;
invoke-static {v1}, Lp0/t;->a(Lp0/s;)V
:cond_3
return-void
2020-09-02 04:07:20 +00:00
.end method
.method public close()V
2020-09-09 19:21:20 +00:00
.locals 2
2020-09-02 04:07:20 +00:00
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
2020-09-09 19:21:20 +00:00
iget-boolean v0, p0, Lp0/h;->d:Z
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
if-eqz v0, :cond_0
2020-09-02 04:07:20 +00:00
return-void
2020-09-09 19:21:20 +00:00
:cond_0
const/4 v0, 0x0
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
:try_start_0
iget-object v1, p0, Lp0/h;->f:Ljava/util/zip/Deflater;
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {v1}, Ljava/util/zip/Deflater;->finish()V
const/4 v1, 0x0
invoke-virtual {p0, v1}, Lp0/h;->a(Z)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
goto :goto_0
:catchall_0
move-exception v0
:goto_0
:try_start_1
iget-object v1, p0, Lp0/h;->f:Ljava/util/zip/Deflater;
invoke-virtual {v1}, Ljava/util/zip/Deflater;->end()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
goto :goto_1
:catchall_1
move-exception v1
if-nez v0, :cond_1
move-object v0, v1
:cond_1
:goto_1
:try_start_2
iget-object v1, p0, Lp0/h;->e:Lokio/BufferedSink;
invoke-interface {v1}, Lp0/v;->close()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_2
goto :goto_2
:catchall_2
move-exception v1
if-nez v0, :cond_2
move-object v0, v1
:cond_2
:goto_2
const/4 v1, 0x1
iput-boolean v1, p0, Lp0/h;->d:Z
if-nez v0, :cond_3
return-void
:cond_3
throw v0
2020-09-02 04:07:20 +00:00
.end method
.method public flush()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
2020-09-09 19:21:20 +00:00
const/4 v0, 0x1
invoke-virtual {p0, v0}, Lp0/h;->a(Z)V
iget-object v0, p0, Lp0/h;->e:Lokio/BufferedSink;
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
invoke-interface {v0}, Lokio/BufferedSink;->flush()V
2020-09-02 04:07:20 +00:00
return-void
.end method
2020-09-09 19:21:20 +00:00
.method public timeout()Lp0/y;
2020-09-02 04:07:20 +00:00
.locals 1
2020-09-09 19:21:20 +00:00
iget-object v0, p0, Lp0/h;->e:Lokio/BufferedSink;
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
invoke-interface {v0}, Lp0/v;->timeout()Lp0/y;
2020-09-02 04:07:20 +00:00
move-result-object v0
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 2
2020-09-09 19:21:20 +00:00
const-string v0, "DeflaterSink("
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v0}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
move-result-object v0
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
iget-object v1, p0, Lp0/h;->e:Lokio/BufferedSink;
2020-09-02 04:07:20 +00:00
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
.method public write(Lp0/e;J)V
2020-09-09 19:21:20 +00:00
.locals 7
2020-09-02 04:07:20 +00:00
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
2020-09-09 19:21:20 +00:00
const-string v0, "source"
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p1, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
iget-wide v1, p1, Lp0/e;->e:J
2020-09-02 04:07:20 +00:00
2020-09-09 19:21:20 +00:00
const-wide/16 v3, 0x0
move-wide v5, p2
invoke-static/range {v1 .. v6}, Lk0/j/a;->n(JJJ)V
:goto_0
const-wide/16 v0, 0x0
cmp-long v2, p2, v0
if-lez v2, :cond_2
iget-object v0, p1, Lp0/e;->d:Lp0/s;
if-eqz v0, :cond_1
iget v1, v0, Lp0/s;->c:I
iget v2, v0, Lp0/s;->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 v2, v1
iget-object v1, p0, Lp0/h;->f:Ljava/util/zip/Deflater;
iget-object v3, v0, Lp0/s;->a:[B
iget v4, v0, Lp0/s;->b:I
invoke-virtual {v1, v3, v4, v2}, Ljava/util/zip/Deflater;->setInput([BII)V
const/4 v1, 0x0
invoke-virtual {p0, v1}, Lp0/h;->a(Z)V
iget-wide v3, p1, Lp0/e;->e:J
int-to-long v5, v2
sub-long/2addr v3, v5
iput-wide v3, p1, Lp0/e;->e:J
iget v1, v0, Lp0/s;->b:I
add-int/2addr v1, v2
iput v1, v0, Lp0/s;->b:I
iget v2, v0, Lp0/s;->c:I
if-ne v1, v2, :cond_0
invoke-virtual {v0}, Lp0/s;->a()Lp0/s;
move-result-object v1
iput-object v1, p1, Lp0/e;->d:Lp0/s;
invoke-static {v0}, Lp0/t;->a(Lp0/s;)V
2020-09-08 08:16:32 +00:00
:cond_0
2020-09-09 19:21:20 +00:00
sub-long/2addr p2, v5
goto :goto_0
2020-09-08 08:16:32 +00:00
2020-09-09 19:21:20 +00:00
:cond_1
invoke-static {}, Lk0/n/c/i;->throwNpe()V
2020-09-08 08:16:32 +00:00
const/4 p1, 0x0
throw p1
2020-09-09 19:21:20 +00:00
:cond_2
return-void
2020-09-02 04:07:20 +00:00
.end method