Files
rr3-apk/smali_classes3/com/google/zxing/aztec/encoder/State.smali
Daniel Elliott f3960ee359 Add Discord APKTool decompilation (Smali source for modding)
- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3
- APKTool decompilation (Smali bytecode) for modding and rebuilding APK
- Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures
- Includes full Smali source, resources, and native libraries
- Ready to rebuild APK after modifications with apktool b command
- Added comprehensive README-apktool.md with modding guide

This branch complements the JADX branches:
- Use JADX (main/discord-community) to UNDERSTAND code (readable Java)
- Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali)

Total: 44,417 files, 538.51 MB Smali source code
2026-02-18 16:13:44 -08:00

475 lines
11 KiB
Smali

.class public final Lcom/google/zxing/aztec/encoder/State;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final INITIAL_STATE:Lcom/google/zxing/aztec/encoder/State;
# instance fields
.field public final binaryShiftByteCount:I
.field public final bitCount:I
.field public final mode:I
.field public final token:Lcom/google/zxing/aztec/encoder/Token;
# direct methods
.method static constructor <clinit>()V
.locals 3
.line 30
new-instance v0, Lcom/google/zxing/aztec/encoder/State;
sget-object v1, Lcom/google/zxing/aztec/encoder/Token;->EMPTY:Lcom/google/zxing/aztec/encoder/Token;
const/4 v2, 0x0
invoke-direct {v0, v1, v2, v2, v2}, Lcom/google/zxing/aztec/encoder/State;-><init>(Lcom/google/zxing/aztec/encoder/Token;III)V
sput-object v0, Lcom/google/zxing/aztec/encoder/State;->INITIAL_STATE:Lcom/google/zxing/aztec/encoder/State;
return-void
.end method
.method public constructor <init>(Lcom/google/zxing/aztec/encoder/Token;III)V
.locals 0
.line 44
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/google/zxing/aztec/encoder/State;->token:Lcom/google/zxing/aztec/encoder/Token;
iput p2, p0, Lcom/google/zxing/aztec/encoder/State;->mode:I
iput p3, p0, Lcom/google/zxing/aztec/encoder/State;->binaryShiftByteCount:I
iput p4, p0, Lcom/google/zxing/aztec/encoder/State;->bitCount:I
return-void
.end method
# virtual methods
.method public addBinaryShiftChar(I)Lcom/google/zxing/aztec/encoder/State;
.locals 6
iget-object v0, p0, Lcom/google/zxing/aztec/encoder/State;->token:Lcom/google/zxing/aztec/encoder/Token;
iget v1, p0, Lcom/google/zxing/aztec/encoder/State;->mode:I
iget v2, p0, Lcom/google/zxing/aztec/encoder/State;->bitCount:I
const/4 v3, 0x4
if-eq v1, v3, :cond_0
const/4 v3, 0x2
if-ne v1, v3, :cond_1
.line 109
:cond_0
sget-object v3, Lcom/google/zxing/aztec/encoder/HighLevelEncoder;->LATCH_TABLE:[[I
aget-object v1, v3, v1
const/4 v3, 0x0
aget v1, v1, v3
const v4, 0xffff
and-int/2addr v4, v1
shr-int/lit8 v1, v1, 0x10
.line 110
invoke-virtual {v0, v4, v1}, Lcom/google/zxing/aztec/encoder/Token;->add(II)Lcom/google/zxing/aztec/encoder/Token;
move-result-object v0
add-int/2addr v2, v1
move v1, v3
:cond_1
iget v3, p0, Lcom/google/zxing/aztec/encoder/State;->binaryShiftByteCount:I
if-eqz v3, :cond_4
const/16 v4, 0x1f
if-ne v3, v4, :cond_2
goto :goto_0
:cond_2
const/16 v4, 0x3e
if-ne v3, v4, :cond_3
const/16 v4, 0x9
goto :goto_1
:cond_3
const/16 v4, 0x8
goto :goto_1
:cond_4
:goto_0
const/16 v4, 0x12
.line 117
:goto_1
new-instance v5, Lcom/google/zxing/aztec/encoder/State;
add-int/lit8 v3, v3, 0x1
add-int/2addr v2, v4
invoke-direct {v5, v0, v1, v3, v2}, Lcom/google/zxing/aztec/encoder/State;-><init>(Lcom/google/zxing/aztec/encoder/Token;III)V
iget v0, v5, Lcom/google/zxing/aztec/encoder/State;->binaryShiftByteCount:I
const/16 v1, 0x81e
if-ne v0, v1, :cond_5
add-int/lit8 p1, p1, 0x1
.line 120
invoke-virtual {v5, p1}, Lcom/google/zxing/aztec/encoder/State;->endBinaryShift(I)Lcom/google/zxing/aztec/encoder/State;
move-result-object v5
:cond_5
return-object v5
.end method
.method public endBinaryShift(I)Lcom/google/zxing/aztec/encoder/State;
.locals 4
iget v0, p0, Lcom/google/zxing/aztec/encoder/State;->binaryShiftByteCount:I
if-nez v0, :cond_0
return-object p0
:cond_0
iget-object v1, p0, Lcom/google/zxing/aztec/encoder/State;->token:Lcom/google/zxing/aztec/encoder/Token;
sub-int/2addr p1, v0
.line 132
invoke-virtual {v1, p1, v0}, Lcom/google/zxing/aztec/encoder/Token;->addBinaryShift(II)Lcom/google/zxing/aztec/encoder/Token;
move-result-object p1
.line 134
new-instance v0, Lcom/google/zxing/aztec/encoder/State;
iget v1, p0, Lcom/google/zxing/aztec/encoder/State;->mode:I
const/4 v2, 0x0
iget v3, p0, Lcom/google/zxing/aztec/encoder/State;->bitCount:I
invoke-direct {v0, p1, v1, v2, v3}, Lcom/google/zxing/aztec/encoder/State;-><init>(Lcom/google/zxing/aztec/encoder/Token;III)V
return-object v0
.end method
.method public getBinaryShiftByteCount()I
.locals 1
iget v0, p0, Lcom/google/zxing/aztec/encoder/State;->binaryShiftByteCount:I
return v0
.end method
.method public getBitCount()I
.locals 1
iget v0, p0, Lcom/google/zxing/aztec/encoder/State;->bitCount:I
return v0
.end method
.method public getMode()I
.locals 1
iget v0, p0, Lcom/google/zxing/aztec/encoder/State;->mode:I
return v0
.end method
.method public isBetterThanOrEqualTo(Lcom/google/zxing/aztec/encoder/State;)Z
.locals 3
iget v0, p0, Lcom/google/zxing/aztec/encoder/State;->bitCount:I
.line 140
sget-object v1, Lcom/google/zxing/aztec/encoder/HighLevelEncoder;->LATCH_TABLE:[[I
iget v2, p0, Lcom/google/zxing/aztec/encoder/State;->mode:I
aget-object v1, v1, v2
iget v2, p1, Lcom/google/zxing/aztec/encoder/State;->mode:I
aget v1, v1, v2
shr-int/lit8 v1, v1, 0x10
add-int/2addr v0, v1
.line 141
iget v1, p1, Lcom/google/zxing/aztec/encoder/State;->binaryShiftByteCount:I
if-lez v1, :cond_1
iget v2, p0, Lcom/google/zxing/aztec/encoder/State;->binaryShiftByteCount:I
if-eqz v2, :cond_0
if-le v2, v1, :cond_1
:cond_0
add-int/lit8 v0, v0, 0xa
.line 145
:cond_1
iget p1, p1, Lcom/google/zxing/aztec/encoder/State;->bitCount:I
if-gt v0, p1, :cond_2
const/4 p1, 0x1
return p1
:cond_2
const/4 p1, 0x0
return p1
.end method
.method public latchAndAppend(II)Lcom/google/zxing/aztec/encoder/State;
.locals 4
iget v0, p0, Lcom/google/zxing/aztec/encoder/State;->bitCount:I
iget-object v1, p0, Lcom/google/zxing/aztec/encoder/State;->token:Lcom/google/zxing/aztec/encoder/Token;
iget v2, p0, Lcom/google/zxing/aztec/encoder/State;->mode:I
if-eq p1, v2, :cond_0
.line 80
sget-object v3, Lcom/google/zxing/aztec/encoder/HighLevelEncoder;->LATCH_TABLE:[[I
aget-object v2, v3, v2
aget v2, v2, p1
const v3, 0xffff
and-int/2addr v3, v2
shr-int/lit8 v2, v2, 0x10
.line 81
invoke-virtual {v1, v3, v2}, Lcom/google/zxing/aztec/encoder/Token;->add(II)Lcom/google/zxing/aztec/encoder/Token;
move-result-object v1
add-int/2addr v0, v2
:cond_0
const/4 v2, 0x2
if-ne p1, v2, :cond_1
const/4 v2, 0x4
goto :goto_0
:cond_1
const/4 v2, 0x5
.line 85
:goto_0
invoke-virtual {v1, p2, v2}, Lcom/google/zxing/aztec/encoder/Token;->add(II)Lcom/google/zxing/aztec/encoder/Token;
move-result-object p2
.line 86
new-instance v1, Lcom/google/zxing/aztec/encoder/State;
const/4 v3, 0x0
add-int/2addr v0, v2
invoke-direct {v1, p2, p1, v3, v0}, Lcom/google/zxing/aztec/encoder/State;-><init>(Lcom/google/zxing/aztec/encoder/Token;III)V
return-object v1
.end method
.method public shiftAndAppend(II)Lcom/google/zxing/aztec/encoder/State;
.locals 5
iget-object v0, p0, Lcom/google/zxing/aztec/encoder/State;->token:Lcom/google/zxing/aztec/encoder/Token;
iget v1, p0, Lcom/google/zxing/aztec/encoder/State;->mode:I
const/4 v2, 0x2
const/4 v3, 0x5
if-ne v1, v2, :cond_0
const/4 v2, 0x4
goto :goto_0
:cond_0
move v2, v3
.line 96
:goto_0
sget-object v4, Lcom/google/zxing/aztec/encoder/HighLevelEncoder;->SHIFT_TABLE:[[I
aget-object v1, v4, v1
aget p1, v1, p1
invoke-virtual {v0, p1, v2}, Lcom/google/zxing/aztec/encoder/Token;->add(II)Lcom/google/zxing/aztec/encoder/Token;
move-result-object p1
.line 97
invoke-virtual {p1, p2, v3}, Lcom/google/zxing/aztec/encoder/Token;->add(II)Lcom/google/zxing/aztec/encoder/Token;
move-result-object p1
.line 98
new-instance p2, Lcom/google/zxing/aztec/encoder/State;
iget v0, p0, Lcom/google/zxing/aztec/encoder/State;->mode:I
iget v1, p0, Lcom/google/zxing/aztec/encoder/State;->bitCount:I
add-int/2addr v1, v2
add-int/2addr v1, v3
const/4 v2, 0x0
invoke-direct {p2, p1, v0, v2, v1}, Lcom/google/zxing/aztec/encoder/State;-><init>(Lcom/google/zxing/aztec/encoder/Token;III)V
return-object p2
.end method
.method public toBitArray([B)Lcom/google/zxing/common/BitArray;
.locals 3
.line 151
new-instance v0, Ljava/util/LinkedList;
invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V
.line 152
array-length v1, p1
invoke-virtual {p0, v1}, Lcom/google/zxing/aztec/encoder/State;->endBinaryShift(I)Lcom/google/zxing/aztec/encoder/State;
move-result-object v1
iget-object v1, v1, Lcom/google/zxing/aztec/encoder/State;->token:Lcom/google/zxing/aztec/encoder/Token;
:goto_0
if-eqz v1, :cond_0
.line 153
invoke-interface {v0, v1}, Ljava/util/Deque;->addFirst(Ljava/lang/Object;)V
.line 152
invoke-virtual {v1}, Lcom/google/zxing/aztec/encoder/Token;->getPrevious()Lcom/google/zxing/aztec/encoder/Token;
move-result-object v1
goto :goto_0
.line 155
:cond_0
new-instance v1, Lcom/google/zxing/common/BitArray;
invoke-direct {v1}, Lcom/google/zxing/common/BitArray;-><init>()V
.line 157
invoke-interface {v0}, Ljava/util/Deque;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_1
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/google/zxing/aztec/encoder/Token;
.line 158
invoke-virtual {v2, v1, p1}, Lcom/google/zxing/aztec/encoder/Token;->appendTo(Lcom/google/zxing/common/BitArray;[B)V
goto :goto_1
:cond_1
return-object v1
.end method
.method public toString()Ljava/lang/String;
.locals 3
.line 166
sget-object v0, Lcom/google/zxing/aztec/encoder/HighLevelEncoder;->MODE_NAMES:[Ljava/lang/String;
iget v1, p0, Lcom/google/zxing/aztec/encoder/State;->mode:I
aget-object v0, v0, v1
iget v1, p0, Lcom/google/zxing/aztec/encoder/State;->bitCount:I
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
iget v2, p0, Lcom/google/zxing/aztec/encoder/State;->binaryShiftByteCount:I
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
filled-new-array {v0, v1, v2}, [Ljava/lang/Object;
move-result-object v0
const-string v1, "%s bits=%d bytes=%d"
invoke-static {v1, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method