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

387 lines
7.3 KiB
Smali
Raw Normal View History

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