apkfuckery/com.discord/smali/androidx/recyclerview/widget/ChildHelper$Bucket.smali

493 lines
11 KiB
Smali
Raw Normal View History

2019-12-06 03:29:40 +00:00
.class public Landroidx/recyclerview/widget/ChildHelper$Bucket;
2019-07-24 11:27:29 +00:00
.super Ljava/lang/Object;
.source "ChildHelper.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/recyclerview/widget/ChildHelper;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
2019-12-06 03:29:40 +00:00
accessFlags = 0x9
2019-07-24 11:27:29 +00:00
name = "Bucket"
.end annotation
# static fields
2019-12-06 03:29:40 +00:00
.field public static final BITS_PER_WORD:I = 0x40
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public static final LAST_BIT:J = -0x8000000000000000L
2019-07-24 11:27:29 +00:00
# instance fields
2019-12-06 03:29:40 +00:00
.field public mData:J
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
2019-07-24 11:27:29 +00:00
# direct methods
2019-12-06 03:29:40 +00:00
.method public constructor <init>()V
2019-07-24 11:27:29 +00:00
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-wide/16 v0, 0x0
iput-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
return-void
.end method
.method private ensureNext()V
.locals 1
iget-object v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
if-nez v0, :cond_0
new-instance v0, Landroidx/recyclerview/widget/ChildHelper$Bucket;
invoke-direct {v0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;-><init>()V
iput-object v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
:cond_0
return-void
.end method
# virtual methods
2019-12-06 03:29:40 +00:00
.method public clear(I)V
2019-11-20 22:09:14 +00:00
.locals 4
2019-07-24 11:27:29 +00:00
const/16 v0, 0x40
if-lt p1, v0, :cond_0
iget-object v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
if-eqz v1, :cond_1
sub-int/2addr p1, v0
invoke-virtual {v1, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->clear(I)V
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
const-wide/16 v2, 0x1
shl-long/2addr v2, p1
2019-11-20 22:09:14 +00:00
not-long v2, v2
2019-07-24 11:27:29 +00:00
and-long/2addr v0, v2
iput-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
:cond_1
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public countOnesBefore(I)I
2019-07-24 11:27:29 +00:00
.locals 6
iget-object v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
const/16 v1, 0x40
const-wide/16 v2, 0x1
if-nez v0, :cond_1
if-lt p1, v1, :cond_0
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
invoke-static {v0, v1}, Ljava/lang/Long;->bitCount(J)I
move-result p1
return p1
:cond_0
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
shl-long v4, v2, p1
sub-long/2addr v4, v2
and-long/2addr v0, v4
invoke-static {v0, v1}, Ljava/lang/Long;->bitCount(J)I
move-result p1
return p1
:cond_1
if-ge p1, v1, :cond_2
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
shl-long v4, v2, p1
sub-long/2addr v4, v2
and-long/2addr v0, v4
invoke-static {v0, v1}, Ljava/lang/Long;->bitCount(J)I
move-result p1
return p1
:cond_2
sub-int/2addr p1, v1
invoke-virtual {v0, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->countOnesBefore(I)I
move-result p1
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
invoke-static {v0, v1}, Ljava/lang/Long;->bitCount(J)I
move-result v0
2019-12-06 03:29:40 +00:00
add-int/2addr v0, p1
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
return v0
2019-07-24 11:27:29 +00:00
.end method
2019-12-06 03:29:40 +00:00
.method public get(I)Z
2019-07-24 11:27:29 +00:00
.locals 4
const/16 v0, 0x40
if-lt p1, v0, :cond_0
invoke-direct {p0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->ensureNext()V
iget-object v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
sub-int/2addr p1, v0
invoke-virtual {v1, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->get(I)Z
move-result p1
return p1
:cond_0
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
const-wide/16 v2, 0x1
shl-long/2addr v2, p1
and-long/2addr v0, v2
const-wide/16 v2, 0x0
cmp-long p1, v0, v2
if-eqz p1, :cond_1
const/4 p1, 0x1
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_1
const/4 p1, 0x0
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return p1
.end method
2019-12-06 03:29:40 +00:00
.method public insert(IZ)V
2019-11-20 22:09:14 +00:00
.locals 10
2019-07-24 11:27:29 +00:00
const/16 v0, 0x40
if-lt p1, v0, :cond_0
invoke-direct {p0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->ensureNext()V
iget-object v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
sub-int/2addr p1, v0
invoke-virtual {v1, p1, p2}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->insert(IZ)V
2019-12-06 03:29:40 +00:00
goto :goto_2
2019-07-24 11:27:29 +00:00
:cond_0
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
const-wide/high16 v2, -0x8000000000000000L
and-long/2addr v0, v2
const-wide/16 v2, 0x0
const/4 v4, 0x1
const/4 v5, 0x0
cmp-long v6, v0, v2
if-eqz v6, :cond_1
const/4 v0, 0x1
goto :goto_0
:cond_1
const/4 v0, 0x0
:goto_0
const-wide/16 v1, 0x1
shl-long v6, v1, p1
sub-long/2addr v6, v1
iget-wide v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
and-long v8, v1, v6
2019-11-20 22:09:14 +00:00
not-long v6, v6
2019-07-24 11:27:29 +00:00
and-long/2addr v1, v6
shl-long/2addr v1, v4
or-long/2addr v1, v8
iput-wide v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
if-eqz p2, :cond_2
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->set(I)V
goto :goto_1
:cond_2
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->clear(I)V
:goto_1
if-nez v0, :cond_3
iget-object p1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
if-eqz p1, :cond_4
:cond_3
invoke-direct {p0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->ensureNext()V
iget-object p1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
invoke-virtual {p1, v5, v0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->insert(IZ)V
:cond_4
2019-12-06 03:29:40 +00:00
:goto_2
2019-07-24 11:27:29 +00:00
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public remove(I)Z
2019-11-20 22:09:14 +00:00
.locals 11
2019-07-24 11:27:29 +00:00
const/16 v0, 0x40
if-lt p1, v0, :cond_0
invoke-direct {p0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->ensureNext()V
iget-object v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
sub-int/2addr p1, v0
invoke-virtual {v1, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->remove(I)Z
move-result p1
return p1
:cond_0
const-wide/16 v0, 0x1
shl-long v2, v0, p1
iget-wide v4, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
and-long/2addr v4, v2
const-wide/16 v6, 0x0
const/4 p1, 0x1
const/4 v8, 0x0
cmp-long v9, v4, v6
if-eqz v9, :cond_1
const/4 v4, 0x1
goto :goto_0
:cond_1
const/4 v4, 0x0
:goto_0
iget-wide v5, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
2019-11-20 22:09:14 +00:00
not-long v9, v2
2019-07-24 11:27:29 +00:00
2019-11-20 22:09:14 +00:00
and-long/2addr v5, v9
2019-07-24 11:27:29 +00:00
iput-wide v5, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
sub-long/2addr v2, v0
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
and-long v5, v0, v2
2019-11-20 22:09:14 +00:00
not-long v2, v2
2019-07-24 11:27:29 +00:00
and-long/2addr v0, v2
invoke-static {v0, v1, p1}, Ljava/lang/Long;->rotateRight(JI)J
move-result-wide v0
or-long/2addr v0, v5
iput-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
iget-object p1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
if-eqz p1, :cond_3
invoke-virtual {p1, v8}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->get(I)Z
move-result p1
if-eqz p1, :cond_2
const/16 p1, 0x3f
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->set(I)V
:cond_2
iget-object p1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
invoke-virtual {p1, v8}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->remove(I)Z
:cond_3
return v4
.end method
2019-12-06 03:29:40 +00:00
.method public reset()V
2019-07-24 11:27:29 +00:00
.locals 2
const-wide/16 v0, 0x0
iput-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
iget-object v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
if-eqz v0, :cond_0
invoke-virtual {v0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->reset()V
:cond_0
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public set(I)V
2019-07-24 11:27:29 +00:00
.locals 4
const/16 v0, 0x40
if-lt p1, v0, :cond_0
invoke-direct {p0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->ensureNext()V
iget-object v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
sub-int/2addr p1, v0
invoke-virtual {v1, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->set(I)V
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
const-wide/16 v2, 0x1
shl-long/2addr v2, p1
or-long/2addr v0, v2
iput-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return-void
.end method
.method public toString()Ljava/lang/String;
.locals 3
iget-object v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
if-nez v0, :cond_0
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
invoke-static {v0, v1}, Ljava/lang/Long;->toBinaryString(J)Ljava/lang/String;
move-result-object v0
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
iget-object v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
invoke-virtual {v1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->toString()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, "xx"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-wide v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
invoke-static {v1, v2}, Ljava/lang/Long;->toBinaryString(J)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return-object v0
.end method