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

487 lines
11 KiB
Smali
Raw Normal View History

2020-11-12 02:11:44 +00:00
.class public Landroidx/recyclerview/widget/ChildHelper$Bucket;
.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;
accessFlags = 0x9
name = "Bucket"
.end annotation
# static fields
.field public static final BITS_PER_WORD:I = 0x40
.field public static final LAST_BIT:J = -0x8000000000000000L
# instance fields
.field public mData:J
.field public mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
# direct methods
.method public constructor <init>()V
.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
.method public clear(I)V
.locals 4
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
goto :goto_0
:cond_0
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
const-wide/16 v2, 0x1
shl-long/2addr v2, p1
not-long v2, v2
and-long/2addr v0, v2
iput-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
:cond_1
:goto_0
return-void
.end method
.method public countOnesBefore(I)I
.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
add-int/2addr v0, p1
return v0
.end method
.method public get(I)Z
.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
goto :goto_0
:cond_1
const/4 p1, 0x0
:goto_0
return p1
.end method
.method public insert(IZ)V
.locals 10
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
goto :goto_2
:cond_0
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
const-wide/high16 v2, -0x8000000000000000L
2020-11-21 22:11:07 +00:00
and-long/2addr v2, v0
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const-wide/16 v4, 0x0
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const/4 v6, 0x1
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const/4 v7, 0x0
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
cmp-long v8, v2, v4
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
if-eqz v8, :cond_1
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const/4 v2, 0x1
2020-11-12 02:11:44 +00:00
goto :goto_0
:cond_1
2020-11-21 22:11:07 +00:00
const/4 v2, 0x0
2020-11-12 02:11:44 +00:00
:goto_0
2020-11-21 22:11:07 +00:00
const-wide/16 v3, 0x1
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
shl-long v8, v3, p1
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
sub-long/2addr v8, v3
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
and-long v3, v0, v8
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
not-long v8, v8
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
and-long/2addr v0, v8
2020-11-14 02:19:59 +00:00
2020-11-21 22:11:07 +00:00
shl-long/2addr v0, v6
2020-11-16 01:00:50 +00:00
2020-11-21 22:11:07 +00:00
or-long/2addr v0, v3
2020-11-21 21:10:53 +00:00
2020-11-21 22:11:07 +00:00
iput-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
2020-11-12 02:11:44 +00:00
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
2020-11-21 22:11:07 +00:00
if-nez v2, :cond_3
2020-11-12 02:11:44 +00:00
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;
2020-11-21 22:11:07 +00:00
invoke-virtual {p1, v7, v2}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->insert(IZ)V
2020-11-12 02:11:44 +00:00
:cond_4
:goto_2
return-void
.end method
.method public remove(I)Z
2020-11-21 22:11:07 +00:00
.locals 12
2020-11-12 02:11:44 +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
2020-11-21 22:11:07 +00:00
and-long v6, v4, v2
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const-wide/16 v8, 0x0
2020-11-12 02:11:44 +00:00
const/4 p1, 0x1
2020-11-21 22:11:07 +00:00
const/4 v10, 0x0
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
cmp-long v11, v6, v8
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
if-eqz v11, :cond_1
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
const/4 v6, 0x1
2020-11-12 02:11:44 +00:00
goto :goto_0
:cond_1
2020-11-21 22:11:07 +00:00
const/4 v6, 0x0
2020-11-12 02:11:44 +00:00
:goto_0
2020-11-21 22:11:07 +00:00
not-long v7, v2
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
and-long/2addr v4, v7
2020-11-12 02:11:44 +00:00
2020-11-21 22:11:07 +00:00
iput-wide v4, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
2020-11-12 02:11:44 +00:00
sub-long/2addr v2, v0
2020-11-21 22:11:07 +00:00
and-long v0, v4, v2
2020-11-12 02:11:44 +00:00
not-long v2, v2
2020-11-21 22:11:07 +00:00
and-long/2addr v2, v4
2020-11-12 02:11:44 +00:00
invoke-static {v2, v3, p1}, Ljava/lang/Long;->rotateRight(JI)J
move-result-wide v2
or-long/2addr v0, v2
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
2020-11-21 22:11:07 +00:00
invoke-virtual {p1, v10}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->get(I)Z
2020-11-12 02:11:44 +00:00
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;
2020-11-21 22:11:07 +00:00
invoke-virtual {p1, v10}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->remove(I)Z
2020-11-12 02:11:44 +00:00
:cond_3
2020-11-21 22:11:07 +00:00
return v6
2020-11-12 02:11:44 +00:00
.end method
.method public reset()V
.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
.method public set(I)V
.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
goto :goto_0
: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
:goto_0
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
goto :goto_0
: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/jumbo 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
:goto_0
return-object v0
.end method