RSS14Reader.smali
.class public final Lcom/google/zxing/oned/rss/RSS14Reader;
.super Lcom/google/zxing/oned/rss/AbstractRSSReader;
.source "RSS14Reader.java"
# static fields
.field private static final FINDER_PATTERNS:[[I
.field private static final INSIDE_GSUM:[I
.field private static final INSIDE_ODD_TOTAL_SUBSET:[I
.field private static final INSIDE_ODD_WIDEST:[I
.field private static final OUTSIDE_EVEN_TOTAL_SUBSET:[I
.field private static final OUTSIDE_GSUM:[I
.field private static final OUTSIDE_ODD_WIDEST:[I
# instance fields
.field private final possibleLeftPairs:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/google/zxing/oned/rss/Pair;",
">;"
}
.end annotation
.end field
.field private final possibleRightPairs:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/google/zxing/oned/rss/Pair;",
">;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 5
const/4 v0, 0x5
new-array v1, v0, [I
.line 38
fill-array-data v1, :array_7a
sput-object v1, Lcom/google/zxing/oned/rss/RSS14Reader;->OUTSIDE_EVEN_TOTAL_SUBSET:[I
const/4 v1, 0x4
new-array v2, v1, [I
.line 39
fill-array-data v2, :array_88
sput-object v2, Lcom/google/zxing/oned/rss/RSS14Reader;->INSIDE_ODD_TOTAL_SUBSET:[I
new-array v2, v0, [I
.line 40
fill-array-data v2, :array_94
sput-object v2, Lcom/google/zxing/oned/rss/RSS14Reader;->OUTSIDE_GSUM:[I
new-array v2, v1, [I
.line 41
fill-array-data v2, :array_a2
sput-object v2, Lcom/google/zxing/oned/rss/RSS14Reader;->INSIDE_GSUM:[I
new-array v2, v0, [I
.line 42
fill-array-data v2, :array_ae
sput-object v2, Lcom/google/zxing/oned/rss/RSS14Reader;->OUTSIDE_ODD_WIDEST:[I
new-array v2, v1, [I
.line 43
fill-array-data v2, :array_bc
sput-object v2, Lcom/google/zxing/oned/rss/RSS14Reader;->INSIDE_ODD_WIDEST:[I
const/16 v2, 0x9
new-array v2, v2, [[I
new-array v3, v1, [I
.line 45
fill-array-data v3, :array_c8
const/4 v4, 0x0
aput-object v3, v2, v4
new-array v3, v1, [I
fill-array-data v3, :array_d4
const/4 v4, 0x1
aput-object v3, v2, v4
new-array v3, v1, [I
fill-array-data v3, :array_e0
const/4 v4, 0x2
aput-object v3, v2, v4
new-array v3, v1, [I
fill-array-data v3, :array_ec
const/4 v4, 0x3
aput-object v3, v2, v4
new-array v3, v1, [I
fill-array-data v3, :array_f8
aput-object v3, v2, v1
new-array v3, v1, [I
fill-array-data v3, :array_104
aput-object v3, v2, v0
new-array v0, v1, [I
fill-array-data v0, :array_110
const/4 v3, 0x6
aput-object v0, v2, v3
new-array v0, v1, [I
fill-array-data v0, :array_11c
const/4 v3, 0x7
aput-object v0, v2, v3
new-array v0, v1, [I
fill-array-data v0, :array_128
const/16 v1, 0x8
aput-object v0, v2, v1
sput-object v2, Lcom/google/zxing/oned/rss/RSS14Reader;->FINDER_PATTERNS:[[I
return-void
:array_7a
.array-data 4
0x1
0xa
0x22
0x46
0x7e
.end array-data
:array_88
.array-data 4
0x4
0x14
0x30
0x51
.end array-data
:array_94
.array-data 4
0x0
0xa1
0x3c1
0x7df
0xa9b
.end array-data
:array_a2
.array-data 4
0x0
0x150
0x40c
0x5ec
.end array-data
:array_ae
.array-data 4
0x8
0x6
0x4
0x3
0x1
.end array-data
:array_bc
.array-data 4
0x2
0x4
0x6
0x8
.end array-data
:array_c8
.array-data 4
0x3
0x8
0x2
0x1
.end array-data
:array_d4
.array-data 4
0x3
0x5
0x5
0x1
.end array-data
:array_e0
.array-data 4
0x3
0x3
0x7
0x1
.end array-data
:array_ec
.array-data 4
0x3
0x1
0x9
0x1
.end array-data
:array_f8
.array-data 4
0x2
0x7
0x4
0x1
.end array-data
:array_104
.array-data 4
0x2
0x5
0x6
0x1
.end array-data
:array_110
.array-data 4
0x2
0x3
0x8
0x1
.end array-data
:array_11c
.array-data 4
0x1
0x5
0x7
0x1
.end array-data
:array_128
.array-data 4
0x1
0x3
0x9
0x1
.end array-data
.end method
.method public constructor <init>()V
.registers 2
.line 60
invoke-direct {p0}, Lcom/google/zxing/oned/rss/AbstractRSSReader;-><init>()V
.line 61
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/google/zxing/oned/rss/RSS14Reader;->possibleLeftPairs:Ljava/util/List;
.line 62
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/google/zxing/oned/rss/RSS14Reader;->possibleRightPairs:Ljava/util/List;
return-void
.end method
.method private static addOrTally(Ljava/util/Collection;Lcom/google/zxing/oned/rss/Pair;)V
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Collection<",
"Lcom/google/zxing/oned/rss/Pair;",
">;",
"Lcom/google/zxing/oned/rss/Pair;",
")V"
}
.end annotation
if-nez p1, :cond_3
return-void
:cond_3
const/4 v0, 0x0
.line 94
invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_8
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_22
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/google/zxing/oned/rss/Pair;
.line 95
invoke-virtual {v2}, Lcom/google/zxing/oned/rss/Pair;->getValue()I
move-result v3
invoke-virtual {p1}, Lcom/google/zxing/oned/rss/Pair;->getValue()I
move-result v4
if-ne v3, v4, :cond_8
.line 96
invoke-virtual {v2}, Lcom/google/zxing/oned/rss/Pair;->incrementCount()V
const/4 v0, 0x1
:cond_22
if-nez v0, :cond_27
.line 102
invoke-interface {p0, p1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
:cond_27
return-void
.end method
.method private adjustOddEvenCounts(ZI)V
.registers 12
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/NotFoundException;
}
.end annotation
.line 359
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getOddCounts()[I
move-result-object v0
invoke-static {v0}, Lcom/google/zxing/common/detector/MathUtils;->sum([I)I
move-result v0
.line 360
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getEvenCounts()[I
move-result-object v1
invoke-static {v1}, Lcom/google/zxing/common/detector/MathUtils;->sum([I)I
move-result v1
const/4 v2, 0x4
const/4 v3, 0x0
const/4 v4, 0x1
if-eqz p1, :cond_28
const/16 v5, 0xc
if-le v0, v5, :cond_1c
const/4 v6, 0x0
const/4 v7, 0x1
goto :goto_22
:cond_1c
if-ge v0, v2, :cond_20
const/4 v6, 0x1
goto :goto_21
:cond_20
const/4 v6, 0x0
:goto_21
const/4 v7, 0x0
:goto_22
if-le v1, v5, :cond_25
goto :goto_3a
:cond_25
if-ge v1, v2, :cond_41
goto :goto_3f
:cond_28
const/16 v5, 0xb
if-le v0, v5, :cond_2f
const/4 v6, 0x0
const/4 v7, 0x1
goto :goto_36
:cond_2f
const/4 v5, 0x5
if-ge v0, v5, :cond_34
const/4 v6, 0x1
goto :goto_35
:cond_34
const/4 v6, 0x0
:goto_35
const/4 v7, 0x0
:goto_36
const/16 v5, 0xa
if-le v1, v5, :cond_3d
:goto_3a
const/4 v2, 0x0
const/4 v5, 0x1
goto :goto_43
:cond_3d
if-ge v1, v2, :cond_41
:goto_3f
const/4 v2, 0x1
goto :goto_42
:cond_41
const/4 v2, 0x0
:goto_42
const/4 v5, 0x0
:goto_43
add-int v8, v0, v1
sub-int/2addr v8, p2
and-int/lit8 p2, v0, 0x1
if-ne p2, p1, :cond_4c
const/4 p1, 0x1
goto :goto_4d
:cond_4c
const/4 p1, 0x0
:goto_4d
and-int/lit8 p2, v1, 0x1
if-ne p2, v4, :cond_52
const/4 v3, 0x1
:cond_52
if-ne v8, v4, :cond_6a
if-eqz p1, :cond_60
if-nez v3, :cond_5b
move v4, v6
:goto_59
const/4 v7, 0x1
goto :goto_95
.line 409
:cond_5b
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object p1
throw p1
:cond_60
if-eqz v3, :cond_65
move v4, v6
:goto_63
const/4 v5, 0x1
goto :goto_95
.line 414
:cond_65
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object p1
throw p1
:cond_6a
const/4 p2, -0x1
if-ne v8, p2, :cond_81
if-eqz p1, :cond_77
if-nez v3, :cond_72
goto :goto_95
.line 421
:cond_72
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object p1
throw p1
:cond_77
if-eqz v3, :cond_7c
move v4, v6
const/4 v2, 0x1
goto :goto_95
.line 426
:cond_7c
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object p1
throw p1
:cond_81
if-nez v8, :cond_df
if-eqz p1, :cond_92
if-eqz v3, :cond_8d
if-ge v0, v1, :cond_8a
goto :goto_63
:cond_8a
move v4, v6
const/4 v2, 0x1
goto :goto_59
.line 433
:cond_8d
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object p1
throw p1
:cond_92
if-nez v3, :cond_da
move v4, v6
:goto_95
if-eqz v4, :cond_aa
if-nez v7, :cond_a5
.line 457
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getOddCounts()[I
move-result-object p1
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getOddRoundingErrors()[F
move-result-object p2
invoke-static {p1, p2}, Lcom/google/zxing/oned/rss/RSS14Reader;->increment([I[F)V
goto :goto_aa
.line 455
:cond_a5
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object p1
throw p1
:cond_aa
:goto_aa
if-eqz v7, :cond_b7
.line 460
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getOddCounts()[I
move-result-object p1
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getOddRoundingErrors()[F
move-result-object p2
invoke-static {p1, p2}, Lcom/google/zxing/oned/rss/RSS14Reader;->decrement([I[F)V
:cond_b7
if-eqz v2, :cond_cc
if-nez v5, :cond_c7
.line 466
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getEvenCounts()[I
move-result-object p1
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getOddRoundingErrors()[F
move-result-object p2
invoke-static {p1, p2}, Lcom/google/zxing/oned/rss/RSS14Reader;->increment([I[F)V
goto :goto_cc
.line 464
:cond_c7
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object p1
throw p1
:cond_cc
:goto_cc
if-eqz v5, :cond_d9
.line 469
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getEvenCounts()[I
move-result-object p1
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getEvenRoundingErrors()[F
move-result-object p2
invoke-static {p1, p2}, Lcom/google/zxing/oned/rss/RSS14Reader;->decrement([I[F)V
:cond_d9
return-void
.line 445
:cond_da
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object p1
throw p1
.line 450
:cond_df
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object p1
throw p1
.end method
.method private static checkChecksum(Lcom/google/zxing/oned/rss/Pair;Lcom/google/zxing/oned/rss/Pair;)Z
.registers 4
.line 148
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/Pair;->getChecksumPortion()I
move-result v0
invoke-virtual {p1}, Lcom/google/zxing/oned/rss/Pair;->getChecksumPortion()I
move-result v1
mul-int/lit8 v1, v1, 0x10
add-int/2addr v0, v1
rem-int/lit8 v0, v0, 0x4f
.line 150
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/Pair;->getFinderPattern()Lcom/google/zxing/oned/rss/FinderPattern;
move-result-object p0
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/FinderPattern;->getValue()I
move-result p0
mul-int/lit8 p0, p0, 0x9
invoke-virtual {p1}, Lcom/google/zxing/oned/rss/Pair;->getFinderPattern()Lcom/google/zxing/oned/rss/FinderPattern;
move-result-object p1
invoke-virtual {p1}, Lcom/google/zxing/oned/rss/FinderPattern;->getValue()I
move-result p1
add-int/2addr p0, p1
const/16 p1, 0x48
if-le p0, p1, :cond_26
add-int/lit8 p0, p0, -0x1
:cond_26
const/16 p1, 0x8
if-le p0, p1, :cond_2c
add-int/lit8 p0, p0, -0x1
:cond_2c
if-ne v0, p0, :cond_30
const/4 p0, 0x1
return p0
:cond_30
const/4 p0, 0x0
return p0
.end method
.method private static constructResult(Lcom/google/zxing/oned/rss/Pair;Lcom/google/zxing/oned/rss/Pair;)Lcom/google/zxing/Result;
.registers 10
.line 113
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/Pair;->getValue()I
move-result v0
int-to-long v0, v0
const-wide/32 v2, 0x453af5
mul-long v0, v0, v2
invoke-virtual {p1}, Lcom/google/zxing/oned/rss/Pair;->getValue()I
move-result v2
int-to-long v2, v2
add-long/2addr v0, v2
.line 114
invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v0
.line 116
new-instance v1, Ljava/lang/StringBuilder;
const/16 v2, 0xe
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(I)V
.line 117
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v2
const/16 v3, 0xd
rsub-int/lit8 v2, v2, 0xd
:goto_23
const/16 v4, 0x30
if-lez v2, :cond_2d
.line 118
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
add-int/lit8 v2, v2, -0x1
goto :goto_23
.line 120
:cond_2d
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const/4 v0, 0x0
const/4 v2, 0x0
const/4 v5, 0x0
:goto_33
if-ge v2, v3, :cond_44
.line 124
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->charAt(I)C
move-result v6
sub-int/2addr v6, v4
and-int/lit8 v7, v2, 0x1
if-nez v7, :cond_40
mul-int/lit8 v6, v6, 0x3
:cond_40
add-int/2addr v5, v6
add-int/lit8 v2, v2, 0x1
goto :goto_33
:cond_44
const/16 v2, 0xa
.line 127
rem-int/2addr v5, v2
rsub-int/lit8 v3, v5, 0xa
if-ne v3, v2, :cond_4c
const/4 v3, 0x0
.line 131
:cond_4c
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
.line 133
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/Pair;->getFinderPattern()Lcom/google/zxing/oned/rss/FinderPattern;
move-result-object p0
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/FinderPattern;->getResultPoints()[Lcom/google/zxing/ResultPoint;
move-result-object p0
.line 134
invoke-virtual {p1}, Lcom/google/zxing/oned/rss/Pair;->getFinderPattern()Lcom/google/zxing/oned/rss/FinderPattern;
move-result-object p1
invoke-virtual {p1}, Lcom/google/zxing/oned/rss/FinderPattern;->getResultPoints()[Lcom/google/zxing/ResultPoint;
move-result-object p1
.line 135
new-instance v2, Lcom/google/zxing/Result;
.line 136
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
const/4 v3, 0x0
const/4 v4, 0x4
new-array v4, v4, [Lcom/google/zxing/ResultPoint;
aget-object v5, p0, v0
aput-object v5, v4, v0
const/4 v5, 0x1
aget-object p0, p0, v5
aput-object p0, v4, v5
const/4 p0, 0x2
aget-object v0, p1, v0
aput-object v0, v4, p0
aget-object p0, p1, v5
const/4 p1, 0x3
aput-object p0, v4, p1
sget-object p0, Lcom/google/zxing/BarcodeFormat;->RSS_14:Lcom/google/zxing/BarcodeFormat;
invoke-direct {v2, v1, v3, v4, p0}, Lcom/google/zxing/Result;-><init>(Ljava/lang/String;[B[Lcom/google/zxing/ResultPoint;Lcom/google/zxing/BarcodeFormat;)V
return-object v2
.end method
.method private decodeDataCharacter(Lcom/google/zxing/common/BitArray;Lcom/google/zxing/oned/rss/FinderPattern;Z)Lcom/google/zxing/oned/rss/DataCharacter;
.registers 21
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/NotFoundException;
}
.end annotation
move-object/from16 v0, p1
move/from16 v1, p3
.line 190
invoke-virtual/range {p0 .. p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getDataCharacterCounters()[I
move-result-object v2
const/4 v3, 0x0
.line 191
aput v3, v2, v3
const/4 v4, 0x1
.line 192
aput v3, v2, v4
const/4 v5, 0x2
.line 193
aput v3, v2, v5
const/4 v6, 0x3
.line 194
aput v3, v2, v6
const/4 v7, 0x4
.line 195
aput v3, v2, v7
const/4 v8, 0x5
.line 196
aput v3, v2, v8
const/4 v8, 0x6
.line 197
aput v3, v2, v8
const/4 v8, 0x7
.line 198
aput v3, v2, v8
if-eqz v1, :cond_2c
.line 201
invoke-virtual/range {p2 .. p2}, Lcom/google/zxing/oned/rss/FinderPattern;->getStartEnd()[I
move-result-object v8
aget v8, v8, v3
invoke-static {v0, v8, v2}, Lcom/google/zxing/oned/rss/RSS14Reader;->recordPatternInReverse(Lcom/google/zxing/common/BitArray;I[I)V
goto :goto_48
.line 203
:cond_2c
invoke-virtual/range {p2 .. p2}, Lcom/google/zxing/oned/rss/FinderPattern;->getStartEnd()[I
move-result-object v8
aget v8, v8, v4
add-int/2addr v8, v4
invoke-static {v0, v8, v2}, Lcom/google/zxing/oned/rss/RSS14Reader;->recordPattern(Lcom/google/zxing/common/BitArray;I[I)V
.line 205
array-length v0, v2
sub-int/2addr v0, v4
const/4 v8, 0x0
:goto_39
if-ge v8, v0, :cond_48
.line 206
aget v9, v2, v8
.line 207
aget v10, v2, v0
aput v10, v2, v8
.line 208
aput v9, v2, v0
add-int/lit8 v8, v8, 0x1
add-int/lit8 v0, v0, -0x1
goto :goto_39
:cond_48
:goto_48
if-eqz v1, :cond_4d
const/16 v0, 0x10
goto :goto_4f
:cond_4d
const/16 v0, 0xf
.line 213
:goto_4f
invoke-static {v2}, Lcom/google/zxing/common/detector/MathUtils;->sum([I)I
move-result v8
int-to-float v8, v8
int-to-float v9, v0
div-float/2addr v8, v9
.line 215
invoke-virtual/range {p0 .. p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getOddCounts()[I
move-result-object v9
.line 216
invoke-virtual/range {p0 .. p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getEvenCounts()[I
move-result-object v10
.line 217
invoke-virtual/range {p0 .. p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getOddRoundingErrors()[F
move-result-object v11
.line 218
invoke-virtual/range {p0 .. p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getEvenRoundingErrors()[F
move-result-object v12
const/4 v13, 0x0
.line 220
:goto_67
array-length v14, v2
if-ge v13, v14, :cond_93
.line 221
aget v14, v2, v13
int-to-float v14, v14
div-float/2addr v14, v8
const/high16 v15, 0x3f000000 # 0.5f
add-float/2addr v15, v14
float-to-int v15, v15
const/16 v3, 0x8
if-gtz v15, :cond_78
const/4 v15, 0x1
goto :goto_7c
:cond_78
if-le v15, v3, :cond_7c
const/16 v15, 0x8
.line 228
:cond_7c
:goto_7c
div-int/lit8 v3, v13, 0x2
and-int/lit8 v16, v13, 0x1
if-nez v16, :cond_89
.line 230
aput v15, v9, v3
int-to-float v15, v15
sub-float/2addr v14, v15
.line 231
aput v14, v11, v3
goto :goto_8f
.line 233
:cond_89
aput v15, v10, v3
int-to-float v15, v15
sub-float/2addr v14, v15
.line 234
aput v14, v12, v3
:goto_8f
add-int/lit8 v13, v13, 0x1
const/4 v3, 0x0
goto :goto_67
:cond_93
move-object/from16 v3, p0
.line 238
invoke-direct {v3, v1, v0}, Lcom/google/zxing/oned/rss/RSS14Reader;->adjustOddEvenCounts(ZI)V
.line 242
array-length v0, v9
sub-int/2addr v0, v4
const/4 v2, 0x0
const/4 v8, 0x0
:goto_9c
if-ltz v0, :cond_a9
mul-int/lit8 v2, v2, 0x9
.line 244
aget v11, v9, v0
add-int/2addr v2, v11
.line 245
aget v11, v9, v0
add-int/2addr v8, v11
add-int/lit8 v0, v0, -0x1
goto :goto_9c
.line 249
:cond_a9
array-length v0, v10
sub-int/2addr v0, v4
const/4 v11, 0x0
const/4 v12, 0x0
:goto_ad
if-ltz v0, :cond_ba
mul-int/lit8 v11, v11, 0x9
.line 251
aget v13, v10, v0
add-int/2addr v11, v13
.line 252
aget v13, v10, v0
add-int/2addr v12, v13
add-int/lit8 v0, v0, -0x1
goto :goto_ad
:cond_ba
mul-int/lit8 v11, v11, 0x3
add-int/2addr v2, v11
if-eqz v1, :cond_f1
and-int/lit8 v0, v8, 0x1
if-nez v0, :cond_ec
const/16 v0, 0xc
if-gt v8, v0, :cond_ec
if-lt v8, v7, :cond_ec
sub-int/2addr v0, v8
.line 260
div-int/2addr v0, v5
.line 261
sget-object v1, Lcom/google/zxing/oned/rss/RSS14Reader;->OUTSIDE_ODD_WIDEST:[I
aget v1, v1, v0
rsub-int/lit8 v5, v1, 0x9
const/4 v6, 0x0
.line 263
invoke-static {v9, v1, v6}, Lcom/google/zxing/oned/rss/RSSUtils;->getRSSvalue([IIZ)I
move-result v1
.line 264
invoke-static {v10, v5, v4}, Lcom/google/zxing/oned/rss/RSSUtils;->getRSSvalue([IIZ)I
move-result v4
.line 265
sget-object v5, Lcom/google/zxing/oned/rss/RSS14Reader;->OUTSIDE_EVEN_TOTAL_SUBSET:[I
aget v5, v5, v0
.line 266
sget-object v6, Lcom/google/zxing/oned/rss/RSS14Reader;->OUTSIDE_GSUM:[I
aget v0, v6, v0
.line 267
new-instance v6, Lcom/google/zxing/oned/rss/DataCharacter;
mul-int v1, v1, v5
add-int/2addr v1, v4
add-int/2addr v1, v0
invoke-direct {v6, v1, v2}, Lcom/google/zxing/oned/rss/DataCharacter;-><init>(II)V
return-object v6
.line 258
:cond_ec
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object v0
throw v0
:cond_f1
and-int/lit8 v0, v12, 0x1
if-nez v0, :cond_11e
const/16 v0, 0xa
if-gt v12, v0, :cond_11e
if-lt v12, v7, :cond_11e
sub-int/2addr v0, v12
.line 272
div-int/2addr v0, v5
.line 273
sget-object v1, Lcom/google/zxing/oned/rss/RSS14Reader;->INSIDE_ODD_WIDEST:[I
aget v1, v1, v0
rsub-int/lit8 v5, v1, 0x9
.line 275
invoke-static {v9, v1, v4}, Lcom/google/zxing/oned/rss/RSSUtils;->getRSSvalue([IIZ)I
move-result v1
const/4 v4, 0x0
.line 276
invoke-static {v10, v5, v4}, Lcom/google/zxing/oned/rss/RSSUtils;->getRSSvalue([IIZ)I
move-result v4
.line 277
sget-object v5, Lcom/google/zxing/oned/rss/RSS14Reader;->INSIDE_ODD_TOTAL_SUBSET:[I
aget v5, v5, v0
.line 278
sget-object v6, Lcom/google/zxing/oned/rss/RSS14Reader;->INSIDE_GSUM:[I
aget v0, v6, v0
.line 279
new-instance v6, Lcom/google/zxing/oned/rss/DataCharacter;
mul-int v4, v4, v5
add-int/2addr v4, v1
add-int/2addr v4, v0
invoke-direct {v6, v4, v2}, Lcom/google/zxing/oned/rss/DataCharacter;-><init>(II)V
return-object v6
.line 270
:cond_11e
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object v0
throw v0
.end method
.method private decodePair(Lcom/google/zxing/common/BitArray;ZILjava/util/Map;)Lcom/google/zxing/oned/rss/Pair;
.registers 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/zxing/common/BitArray;",
"ZI",
"Ljava/util/Map<",
"Lcom/google/zxing/DecodeHintType;",
"*>;)",
"Lcom/google/zxing/oned/rss/Pair;"
}
.end annotation
const/4 v0, 0x0
const/4 v1, 0x0
.line 162
:try_start_2
invoke-direct {p0, p1, v1, p2}, Lcom/google/zxing/oned/rss/RSS14Reader;->findFinderPattern(Lcom/google/zxing/common/BitArray;IZ)[I
move-result-object v2
.line 163
invoke-direct {p0, p1, p3, p2, v2}, Lcom/google/zxing/oned/rss/RSS14Reader;->parseFoundFinderPattern(Lcom/google/zxing/common/BitArray;IZ[I)Lcom/google/zxing/oned/rss/FinderPattern;
move-result-object v3
if-nez p4, :cond_e
move-object p4, v0
goto :goto_16
.line 165
:cond_e
sget-object v4, Lcom/google/zxing/DecodeHintType;->NEED_RESULT_POINT_CALLBACK:Lcom/google/zxing/DecodeHintType;
.line 166
invoke-interface {p4, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p4
check-cast p4, Lcom/google/zxing/ResultPointCallback;
:goto_16
const/4 v4, 0x1
if-eqz p4, :cond_35
.line 169
aget v5, v2, v1
aget v2, v2, v4
add-int/2addr v5, v2
int-to-float v2, v5
const/high16 v5, 0x40000000 # 2.0f
div-float/2addr v2, v5
if-eqz p2, :cond_2c
.line 172
invoke-virtual {p1}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result p2
sub-int/2addr p2, v4
int-to-float p2, p2
sub-float v2, p2, v2
.line 174
:cond_2c
new-instance p2, Lcom/google/zxing/ResultPoint;
int-to-float p3, p3
invoke-direct {p2, v2, p3}, Lcom/google/zxing/ResultPoint;-><init>(FF)V
invoke-interface {p4, p2}, Lcom/google/zxing/ResultPointCallback;->foundPossibleResultPoint(Lcom/google/zxing/ResultPoint;)V
.line 177
:cond_35
invoke-direct {p0, p1, v3, v4}, Lcom/google/zxing/oned/rss/RSS14Reader;->decodeDataCharacter(Lcom/google/zxing/common/BitArray;Lcom/google/zxing/oned/rss/FinderPattern;Z)Lcom/google/zxing/oned/rss/DataCharacter;
move-result-object p2
.line 178
invoke-direct {p0, p1, v3, v1}, Lcom/google/zxing/oned/rss/RSS14Reader;->decodeDataCharacter(Lcom/google/zxing/common/BitArray;Lcom/google/zxing/oned/rss/FinderPattern;Z)Lcom/google/zxing/oned/rss/DataCharacter;
move-result-object p1
.line 179
new-instance p3, Lcom/google/zxing/oned/rss/Pair;
invoke-virtual {p2}, Lcom/google/zxing/oned/rss/DataCharacter;->getValue()I
move-result p4
mul-int/lit16 p4, p4, 0x63d
invoke-virtual {p1}, Lcom/google/zxing/oned/rss/DataCharacter;->getValue()I
move-result v1
add-int/2addr p4, v1
.line 180
invoke-virtual {p2}, Lcom/google/zxing/oned/rss/DataCharacter;->getChecksumPortion()I
move-result p2
invoke-virtual {p1}, Lcom/google/zxing/oned/rss/DataCharacter;->getChecksumPortion()I
move-result p1
mul-int/lit8 p1, p1, 0x4
add-int/2addr p2, p1
invoke-direct {p3, p4, p2, v3}, Lcom/google/zxing/oned/rss/Pair;-><init>(IILcom/google/zxing/oned/rss/FinderPattern;)V
:try_end_58
.catch Lcom/google/zxing/NotFoundException; {:try_start_2 .. :try_end_58} :catch_59
return-object p3
:catch_59
return-object v0
.end method
.method private findFinderPattern(Lcom/google/zxing/common/BitArray;IZ)[I
.registers 14
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/NotFoundException;
}
.end annotation
.line 287
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getDecodeFinderCounters()[I
move-result-object v0
const/4 v1, 0x0
.line 288
aput v1, v0, v1
const/4 v2, 0x1
.line 289
aput v1, v0, v2
const/4 v3, 0x2
.line 290
aput v1, v0, v3
const/4 v4, 0x3
.line 291
aput v1, v0, v4
.line 293
invoke-virtual {p1}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result v5
const/4 v6, 0x0
:goto_15
if-ge p2, v5, :cond_21
.line 296
invoke-virtual {p1, p2}, Lcom/google/zxing/common/BitArray;->get(I)Z
move-result v6
xor-int/2addr v6, v2
if-eq p3, v6, :cond_21
add-int/lit8 p2, p2, 0x1
goto :goto_15
:cond_21
move p3, p2
const/4 v7, 0x0
:goto_23
if-ge p2, v5, :cond_5f
.line 307
invoke-virtual {p1, p2}, Lcom/google/zxing/common/BitArray;->get(I)Z
move-result v8
xor-int/2addr v8, v6
if-eqz v8, :cond_32
.line 308
aget v8, v0, v7
add-int/2addr v8, v2
aput v8, v0, v7
goto :goto_5c
:cond_32
if-ne v7, v4, :cond_56
.line 311
invoke-static {v0}, Lcom/google/zxing/oned/rss/RSS14Reader;->isFinderPattern([I)Z
move-result v8
if-eqz v8, :cond_41
new-array p1, v3, [I
aput p3, p1, v1
aput p2, p1, v2
return-object p1
.line 314
:cond_41
aget v8, v0, v1
aget v9, v0, v2
add-int/2addr v8, v9
add-int/2addr p3, v8
.line 315
aget v8, v0, v3
aput v8, v0, v1
.line 316
aget v8, v0, v4
aput v8, v0, v2
.line 317
aput v1, v0, v3
.line 318
aput v1, v0, v4
add-int/lit8 v7, v7, -0x1
goto :goto_58
:cond_56
add-int/lit8 v7, v7, 0x1
.line 323
:goto_58
aput v2, v0, v7
xor-int/lit8 v6, v6, 0x1
:goto_5c
add-int/lit8 p2, p2, 0x1
goto :goto_23
.line 327
:cond_5f
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object p1
throw p1
.end method
.method private parseFoundFinderPattern(Lcom/google/zxing/common/BitArray;IZ[I)Lcom/google/zxing/oned/rss/FinderPattern;
.registers 16
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/NotFoundException;
}
.end annotation
const/4 v0, 0x0
.line 334
aget v1, p4, v0
invoke-virtual {p1, v1}, Lcom/google/zxing/common/BitArray;->get(I)Z
move-result v1
.line 335
aget v2, p4, v0
const/4 v3, 0x1
sub-int/2addr v2, v3
:goto_b
if-ltz v2, :cond_17
.line 337
invoke-virtual {p1, v2}, Lcom/google/zxing/common/BitArray;->get(I)Z
move-result v4
xor-int/2addr v4, v1
if-eqz v4, :cond_17
add-int/lit8 v2, v2, -0x1
goto :goto_b
:cond_17
add-int/2addr v2, v3
.line 341
aget v1, p4, v0
sub-int/2addr v1, v2
.line 343
invoke-virtual {p0}, Lcom/google/zxing/oned/rss/RSS14Reader;->getDecodeFinderCounters()[I
move-result-object v4
.line 344
array-length v5, v4
sub-int/2addr v5, v3
invoke-static {v4, v0, v4, v3, v5}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 345
aput v1, v4, v0
.line 346
sget-object v1, Lcom/google/zxing/oned/rss/RSS14Reader;->FINDER_PATTERNS:[[I
invoke-static {v4, v1}, Lcom/google/zxing/oned/rss/RSS14Reader;->parseFinderValue([I[[I)I
move-result v6
.line 348
aget v1, p4, v3
if-eqz p3, :cond_3f
.line 351
invoke-virtual {p1}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result p3
sub-int/2addr p3, v3
sub-int/2addr p3, v2
.line 352
invoke-virtual {p1}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result p1
sub-int/2addr p1, v3
sub-int/2addr p1, v1
move v9, p1
move v8, p3
goto :goto_41
:cond_3f
move v9, v1
move v8, v2
.line 354
:goto_41
new-instance p1, Lcom/google/zxing/oned/rss/FinderPattern;
const/4 p3, 0x2
new-array v7, p3, [I
aput v2, v7, v0
aget p3, p4, v3
aput p3, v7, v3
move-object v5, p1
move v10, p2
invoke-direct/range {v5 .. v10}, Lcom/google/zxing/oned/rss/FinderPattern;-><init>(I[IIII)V
return-object p1
.end method
# virtual methods
.method public decodeRow(ILcom/google/zxing/common/BitArray;Ljava/util/Map;)Lcom/google/zxing/Result;
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(I",
"Lcom/google/zxing/common/BitArray;",
"Ljava/util/Map<",
"Lcom/google/zxing/DecodeHintType;",
"*>;)",
"Lcom/google/zxing/Result;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/NotFoundException;
}
.end annotation
const/4 v0, 0x0
.line 69
invoke-direct {p0, p2, v0, p1, p3}, Lcom/google/zxing/oned/rss/RSS14Reader;->decodePair(Lcom/google/zxing/common/BitArray;ZILjava/util/Map;)Lcom/google/zxing/oned/rss/Pair;
move-result-object v0
.line 70
iget-object v1, p0, Lcom/google/zxing/oned/rss/RSS14Reader;->possibleLeftPairs:Ljava/util/List;
invoke-static {v1, v0}, Lcom/google/zxing/oned/rss/RSS14Reader;->addOrTally(Ljava/util/Collection;Lcom/google/zxing/oned/rss/Pair;)V
.line 71
invoke-virtual {p2}, Lcom/google/zxing/common/BitArray;->reverse()V
const/4 v0, 0x1
.line 72
invoke-direct {p0, p2, v0, p1, p3}, Lcom/google/zxing/oned/rss/RSS14Reader;->decodePair(Lcom/google/zxing/common/BitArray;ZILjava/util/Map;)Lcom/google/zxing/oned/rss/Pair;
move-result-object p1
.line 73
iget-object p3, p0, Lcom/google/zxing/oned/rss/RSS14Reader;->possibleRightPairs:Ljava/util/List;
invoke-static {p3, p1}, Lcom/google/zxing/oned/rss/RSS14Reader;->addOrTally(Ljava/util/Collection;Lcom/google/zxing/oned/rss/Pair;)V
.line 74
invoke-virtual {p2}, Lcom/google/zxing/common/BitArray;->reverse()V
.line 75
iget-object p1, p0, Lcom/google/zxing/oned/rss/RSS14Reader;->possibleLeftPairs:Ljava/util/List;
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p1
:cond_20
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result p2
if-eqz p2, :cond_55
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object p2
check-cast p2, Lcom/google/zxing/oned/rss/Pair;
.line 76
invoke-virtual {p2}, Lcom/google/zxing/oned/rss/Pair;->getCount()I
move-result p3
if-le p3, v0, :cond_20
.line 77
iget-object p3, p0, Lcom/google/zxing/oned/rss/RSS14Reader;->possibleRightPairs:Ljava/util/List;
invoke-interface {p3}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p3
:cond_38
invoke-interface {p3}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_20
invoke-interface {p3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/zxing/oned/rss/Pair;
.line 78
invoke-virtual {v1}, Lcom/google/zxing/oned/rss/Pair;->getCount()I
move-result v2
if-le v2, v0, :cond_38
.line 79
invoke-static {p2, v1}, Lcom/google/zxing/oned/rss/RSS14Reader;->checkChecksum(Lcom/google/zxing/oned/rss/Pair;Lcom/google/zxing/oned/rss/Pair;)Z
move-result v2
if-eqz v2, :cond_38
.line 80
invoke-static {p2, v1}, Lcom/google/zxing/oned/rss/RSS14Reader;->constructResult(Lcom/google/zxing/oned/rss/Pair;Lcom/google/zxing/oned/rss/Pair;)Lcom/google/zxing/Result;
move-result-object p1
return-object p1
.line 86
:cond_55
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object p1
throw p1
.end method
.method public reset()V
.registers 2
.line 108
iget-object v0, p0, Lcom/google/zxing/oned/rss/RSS14Reader;->possibleLeftPairs:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->clear()V
.line 109
iget-object v0, p0, Lcom/google/zxing/oned/rss/RSS14Reader;->possibleRightPairs:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->clear()V
return-void
.end method