apkfuckery/com.discord/smali_classes2/okio/c$a.smali

358 lines
5.9 KiB
Smali

.class public final Lokio/c$a;
.super Ljava/lang/Object;
.source "Buffer.java"
# interfaces
.implements Ljava/io/Closeable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokio/c;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "a"
.end annotation
# instance fields
.field public byF:Z
.field private byG:Lokio/n;
.field public data:[B
.field public end:I
.field public ma:Lokio/c;
.field public offset:J
.field public start:I
# direct methods
.method public constructor <init>()V
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-wide/16 v0, -0x1
iput-wide v0, p0, Lokio/c$a;->offset:J
const/4 v0, -0x1
iput v0, p0, Lokio/c$a;->start:I
iput v0, p0, Lokio/c$a;->end:I
return-void
.end method
# virtual methods
.method public final aG(J)I
.locals 11
const-wide/16 v0, -0x1
cmp-long v2, p1, v0
if-ltz v2, :cond_8
iget-object v2, p0, Lokio/c$a;->ma:Lokio/c;
iget-wide v2, v2, Lokio/c;->size:J
cmp-long v4, p1, v2
if-gtz v4, :cond_8
cmp-long v2, p1, v0
if-eqz v2, :cond_7
iget-object v0, p0, Lokio/c$a;->ma:Lokio/c;
iget-wide v0, v0, Lokio/c;->size:J
cmp-long v2, p1, v0
if-nez v2, :cond_0
goto/16 :goto_3
:cond_0
const-wide/16 v0, 0x0
iget-object v2, p0, Lokio/c$a;->ma:Lokio/c;
iget-wide v2, v2, Lokio/c;->size:J
iget-object v4, p0, Lokio/c$a;->ma:Lokio/c;
iget-object v4, v4, Lokio/c;->byD:Lokio/n;
iget-object v5, p0, Lokio/c$a;->ma:Lokio/c;
iget-object v5, v5, Lokio/c;->byD:Lokio/n;
iget-object v6, p0, Lokio/c$a;->byG:Lokio/n;
if-eqz v6, :cond_2
iget-wide v7, p0, Lokio/c$a;->offset:J
iget v9, p0, Lokio/c$a;->start:I
iget v6, v6, Lokio/n;->pos:I
sub-int/2addr v9, v6
int-to-long v9, v9
sub-long/2addr v7, v9
cmp-long v6, v7, p1
if-lez v6, :cond_1
iget-object v5, p0, Lokio/c$a;->byG:Lokio/n;
move-wide v2, v7
goto :goto_0
:cond_1
iget-object v4, p0, Lokio/c$a;->byG:Lokio/n;
move-wide v0, v7
:cond_2
:goto_0
sub-long v6, v2, p1
sub-long v8, p1, v0
cmp-long v10, v6, v8
if-lez v10, :cond_3
:goto_1
iget v2, v4, Lokio/n;->limit:I
iget v3, v4, Lokio/n;->pos:I
sub-int/2addr v2, v3
int-to-long v2, v2
add-long/2addr v2, v0
cmp-long v5, p1, v2
if-ltz v5, :cond_4
iget v2, v4, Lokio/n;->limit:I
iget v3, v4, Lokio/n;->pos:I
sub-int/2addr v2, v3
int-to-long v2, v2
add-long/2addr v0, v2
iget-object v4, v4, Lokio/n;->byY:Lokio/n;
goto :goto_1
:cond_3
move-wide v0, v2
move-object v4, v5
:goto_2
cmp-long v2, v0, p1
if-lez v2, :cond_4
iget-object v4, v4, Lokio/n;->byZ:Lokio/n;
iget v2, v4, Lokio/n;->limit:I
iget v3, v4, Lokio/n;->pos:I
sub-int/2addr v2, v3
int-to-long v2, v2
sub-long/2addr v0, v2
goto :goto_2
:cond_4
iget-boolean v2, p0, Lokio/c$a;->byF:Z
if-eqz v2, :cond_6
iget-boolean v2, v4, Lokio/n;->bkc:Z
if-eqz v2, :cond_6
invoke-virtual {v4}, Lokio/n;->HI()Lokio/n;
move-result-object v2
iget-object v3, p0, Lokio/c$a;->ma:Lokio/c;
iget-object v3, v3, Lokio/c;->byD:Lokio/n;
if-ne v3, v4, :cond_5
iget-object v3, p0, Lokio/c$a;->ma:Lokio/c;
iput-object v2, v3, Lokio/c;->byD:Lokio/n;
:cond_5
invoke-virtual {v4, v2}, Lokio/n;->a(Lokio/n;)Lokio/n;
move-result-object v4
iget-object v2, v4, Lokio/n;->byZ:Lokio/n;
invoke-virtual {v2}, Lokio/n;->HJ()Lokio/n;
:cond_6
iput-object v4, p0, Lokio/c$a;->byG:Lokio/n;
iput-wide p1, p0, Lokio/c$a;->offset:J
iget-object v2, v4, Lokio/n;->data:[B
iput-object v2, p0, Lokio/c$a;->data:[B
iget v2, v4, Lokio/n;->pos:I
sub-long/2addr p1, v0
long-to-int p2, p1
add-int/2addr v2, p2
iput v2, p0, Lokio/c$a;->start:I
iget p1, v4, Lokio/n;->limit:I
iput p1, p0, Lokio/c$a;->end:I
iget p1, p0, Lokio/c$a;->end:I
iget p2, p0, Lokio/c$a;->start:I
sub-int/2addr p1, p2
return p1
:cond_7
:goto_3
const/4 v0, 0x0
iput-object v0, p0, Lokio/c$a;->byG:Lokio/n;
iput-wide p1, p0, Lokio/c$a;->offset:J
iput-object v0, p0, Lokio/c$a;->data:[B
const/4 p1, -0x1
iput p1, p0, Lokio/c$a;->start:I
iput p1, p0, Lokio/c$a;->end:I
return p1
:cond_8
new-instance v0, Ljava/lang/ArrayIndexOutOfBoundsException;
const/4 v1, 0x2
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p1
aput-object p1, v1, v2
const/4 p1, 0x1
iget-object p2, p0, Lokio/c$a;->ma:Lokio/c;
iget-wide v2, p2, Lokio/c;->size:J
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p2
aput-object p2, v1, p1
const-string p1, "offset=%s > size=%s"
invoke-static {p1, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/ArrayIndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
goto :goto_5
:goto_4
throw v0
:goto_5
goto :goto_4
.end method
.method public final close()V
.locals 3
iget-object v0, p0, Lokio/c$a;->ma:Lokio/c;
if-eqz v0, :cond_0
const/4 v0, 0x0
iput-object v0, p0, Lokio/c$a;->ma:Lokio/c;
iput-object v0, p0, Lokio/c$a;->byG:Lokio/n;
const-wide/16 v1, -0x1
iput-wide v1, p0, Lokio/c$a;->offset:J
iput-object v0, p0, Lokio/c$a;->data:[B
const/4 v0, -0x1
iput v0, p0, Lokio/c$a;->start:I
iput v0, p0, Lokio/c$a;->end:I
return-void
:cond_0
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "not attached to a buffer"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method