apkfuckery/com.discord/smali_classes2/f/g/j/l/h.smali
2020-07-23 01:06:17 +00:00

570 lines
11 KiB
Smali

.class public Lf/g/j/l/h;
.super Ljava/lang/Object;
.source "BufferMemoryChunk.java"
# interfaces
.implements Lf/g/j/l/r;
.implements Ljava/io/Closeable;
# instance fields
.field public d:Ljava/nio/ByteBuffer;
.field public final e:I
.field public final f:J
# direct methods
.method public constructor <init>(I)V
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
invoke-static {p1}, Ljava/nio/ByteBuffer;->allocateDirect(I)Ljava/nio/ByteBuffer;
move-result-object v0
iput-object v0, p0, Lf/g/j/l/h;->d:Ljava/nio/ByteBuffer;
iput p1, p0, Lf/g/j/l/h;->e:I
invoke-static {p0}, Ljava/lang/System;->identityHashCode(Ljava/lang/Object;)I
move-result p1
int-to-long v0, p1
iput-wide v0, p0, Lf/g/j/l/h;->f:J
return-void
.end method
# virtual methods
.method public a(ILf/g/j/l/r;II)V
.locals 5
if-eqz p2, :cond_2
invoke-interface {p2}, Lf/g/j/l/r;->getUniqueId()J
move-result-wide v0
iget-wide v2, p0, Lf/g/j/l/h;->f:J
cmp-long v4, v0, v2
if-nez v4, :cond_0
const-string v0, "BufferMemoryChunk"
const-string v1, "Copying from BufferMemoryChunk "
invoke-static {v1}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-wide v2, p0, Lf/g/j/l/h;->f:J
invoke-static {v2, v3}, Ljava/lang/Long;->toHexString(J)Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v2, " to BufferMemoryChunk "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-interface {p2}, Lf/g/j/l/r;->getUniqueId()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/Long;->toHexString(J)Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v2, " which are the same "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
const/4 v0, 0x0
invoke-static {v0}, Ld0/a/b/b/a;->h(Z)V
:cond_0
invoke-interface {p2}, Lf/g/j/l/r;->getUniqueId()J
move-result-wide v0
iget-wide v2, p0, Lf/g/j/l/h;->f:J
cmp-long v4, v0, v2
if-gez v4, :cond_1
monitor-enter p2
:try_start_0
monitor-enter p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
invoke-virtual {p0, p1, p2, p3, p4}, Lf/g/j/l/h;->c(ILf/g/j/l/r;II)V
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:try_start_2
monitor-exit p2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
return-void
:catchall_0
move-exception p1
:try_start_3
monitor-exit p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:try_start_4
throw p1
:catchall_1
move-exception p1
monitor-exit p2
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_1
throw p1
:cond_1
monitor-enter p0
:try_start_5
monitor-enter p2
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_3
:try_start_6
invoke-virtual {p0, p1, p2, p3, p4}, Lf/g/j/l/h;->c(ILf/g/j/l/r;II)V
monitor-exit p2
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_2
:try_start_7
monitor-exit p0
:try_end_7
.catchall {:try_start_7 .. :try_end_7} :catchall_3
return-void
:catchall_2
move-exception p1
:try_start_8
monitor-exit p2
:try_end_8
.catchall {:try_start_8 .. :try_end_8} :catchall_2
:try_start_9
throw p1
:catchall_3
move-exception p1
monitor-exit p0
:try_end_9
.catchall {:try_start_9 .. :try_end_9} :catchall_3
throw p1
:cond_2
const/4 p1, 0x0
throw p1
.end method
.method public declared-synchronized b(I[BII)I
.locals 2
monitor-enter p0
:try_start_0
invoke-virtual {p0}, Lf/g/j/l/h;->isClosed()Z
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Ld0/a/b/b/a;->m(Z)V
iget v0, p0, Lf/g/j/l/h;->e:I
invoke-static {p1, p4, v0}, Ld0/a/b/b/a;->c(III)I
move-result p4
array-length v0, p2
iget v1, p0, Lf/g/j/l/h;->e:I
invoke-static {p1, v0, p3, p4, v1}, Ld0/a/b/b/a;->j(IIIII)V
iget-object v0, p0, Lf/g/j/l/h;->d:Ljava/nio/ByteBuffer;
invoke-virtual {v0, p1}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
iget-object p1, p0, Lf/g/j/l/h;->d:Ljava/nio/ByteBuffer;
invoke-virtual {p1, p2, p3, p4}, Ljava/nio/ByteBuffer;->put([BII)Ljava/nio/ByteBuffer;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return p4
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final c(ILf/g/j/l/r;II)V
.locals 2
instance-of v0, p2, Lf/g/j/l/h;
if-eqz v0, :cond_0
invoke-virtual {p0}, Lf/g/j/l/h;->isClosed()Z
move-result v0
xor-int/lit8 v0, v0, 0x1
invoke-static {v0}, Ld0/a/b/b/a;->m(Z)V
invoke-interface {p2}, Lf/g/j/l/r;->isClosed()Z
move-result v0
xor-int/lit8 v0, v0, 0x1
invoke-static {v0}, Ld0/a/b/b/a;->m(Z)V
invoke-interface {p2}, Lf/g/j/l/r;->getSize()I
move-result v0
iget v1, p0, Lf/g/j/l/h;->e:I
invoke-static {p1, v0, p3, p4, v1}, Ld0/a/b/b/a;->j(IIIII)V
iget-object v0, p0, Lf/g/j/l/h;->d:Ljava/nio/ByteBuffer;
invoke-virtual {v0, p1}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
invoke-interface {p2}, Lf/g/j/l/r;->getByteBuffer()Ljava/nio/ByteBuffer;
move-result-object p1
invoke-virtual {p1, p3}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
new-array p1, p4, [B
iget-object p3, p0, Lf/g/j/l/h;->d:Ljava/nio/ByteBuffer;
const/4 v0, 0x0
invoke-virtual {p3, p1, v0, p4}, Ljava/nio/ByteBuffer;->get([BII)Ljava/nio/ByteBuffer;
invoke-interface {p2}, Lf/g/j/l/r;->getByteBuffer()Ljava/nio/ByteBuffer;
move-result-object p2
invoke-virtual {p2, p1, v0, p4}, Ljava/nio/ByteBuffer;->put([BII)Ljava/nio/ByteBuffer;
return-void
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Cannot copy two incompatible MemoryChunks"
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public declared-synchronized close()V
.locals 1
monitor-enter p0
const/4 v0, 0x0
:try_start_0
iput-object v0, p0, Lf/g/j/l/h;->d:Ljava/nio/ByteBuffer;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized getByteBuffer()Ljava/nio/ByteBuffer;
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lf/g/j/l/h;->d:Ljava/nio/ByteBuffer;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public getSize()I
.locals 1
iget v0, p0, Lf/g/j/l/h;->e:I
return v0
.end method
.method public getUniqueId()J
.locals 2
iget-wide v0, p0, Lf/g/j/l/h;->f:J
return-wide v0
.end method
.method public declared-synchronized isClosed()Z
.locals 1
monitor-enter p0
:try_start_0
iget-object v0, p0, Lf/g/j/l/h;->d:Ljava/nio/ByteBuffer;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized k(I)B
.locals 3
monitor-enter p0
:try_start_0
invoke-virtual {p0}, Lf/g/j/l/h;->isClosed()Z
move-result v0
const/4 v1, 0x1
const/4 v2, 0x0
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Ld0/a/b/b/a;->m(Z)V
if-ltz p1, :cond_1
const/4 v0, 0x1
goto :goto_1
:cond_1
const/4 v0, 0x0
:goto_1
invoke-static {v0}, Ld0/a/b/b/a;->h(Z)V
iget v0, p0, Lf/g/j/l/h;->e:I
if-ge p1, v0, :cond_2
goto :goto_2
:cond_2
const/4 v1, 0x0
:goto_2
invoke-static {v1}, Ld0/a/b/b/a;->h(Z)V
iget-object v0, p0, Lf/g/j/l/h;->d:Ljava/nio/ByteBuffer;
invoke-virtual {v0, p1}, Ljava/nio/ByteBuffer;->get(I)B
move-result p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return p1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized m(I[BII)I
.locals 2
monitor-enter p0
if-eqz p2, :cond_1
:try_start_0
invoke-virtual {p0}, Lf/g/j/l/h;->isClosed()Z
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
invoke-static {v0}, Ld0/a/b/b/a;->m(Z)V
iget v0, p0, Lf/g/j/l/h;->e:I
invoke-static {p1, p4, v0}, Ld0/a/b/b/a;->c(III)I
move-result p4
array-length v0, p2
iget v1, p0, Lf/g/j/l/h;->e:I
invoke-static {p1, v0, p3, p4, v1}, Ld0/a/b/b/a;->j(IIIII)V
iget-object v0, p0, Lf/g/j/l/h;->d:Ljava/nio/ByteBuffer;
invoke-virtual {v0, p1}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
iget-object p1, p0, Lf/g/j/l/h;->d:Ljava/nio/ByteBuffer;
invoke-virtual {p1, p2, p3, p4}, Ljava/nio/ByteBuffer;->get([BII)Ljava/nio/ByteBuffer;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return p4
:catchall_0
move-exception p1
goto :goto_1
:cond_1
const/4 p1, 0x0
:try_start_1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:goto_1
monitor-exit p0
throw p1
.end method
.method public p()J
.locals 2
new-instance v0, Ljava/lang/UnsupportedOperationException;
const-string v1, "Cannot get the pointer of a BufferMemoryChunk"
invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
throw v0
.end method