MatrixUtil.smali
.class final Lcom/google/zxing/qrcode/encoder/MatrixUtil;
.super Ljava/lang/Object;
.source "MatrixUtil.java"
# static fields
.field private static final POSITION_ADJUSTMENT_PATTERN:[[I
.field private static final POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE:[[I
.field private static final POSITION_DETECTION_PATTERN:[[I
.field private static final TYPE_INFO_COORDINATES:[[I
.field private static final TYPE_INFO_MASK_PATTERN:I = 0x5412
.field private static final TYPE_INFO_POLY:I = 0x537
.field private static final VERSION_INFO_POLY:I = 0x1f25
# direct methods
.method static constructor <clinit>()V
.registers 18
const/4 v0, 0x7
new-array v1, v0, [[I
new-array v2, v0, [I
.line 34
fill-array-data v2, :array_232
const/4 v3, 0x0
aput-object v2, v1, v3
new-array v2, v0, [I
fill-array-data v2, :array_244
const/4 v4, 0x1
aput-object v2, v1, v4
new-array v2, v0, [I
fill-array-data v2, :array_256
const/4 v5, 0x2
aput-object v2, v1, v5
new-array v2, v0, [I
fill-array-data v2, :array_268
const/4 v6, 0x3
aput-object v2, v1, v6
new-array v2, v0, [I
fill-array-data v2, :array_27a
const/4 v7, 0x4
aput-object v2, v1, v7
new-array v2, v0, [I
fill-array-data v2, :array_28c
const/4 v8, 0x5
aput-object v2, v1, v8
new-array v2, v0, [I
fill-array-data v2, :array_29e
const/4 v9, 0x6
aput-object v2, v1, v9
sput-object v1, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->POSITION_DETECTION_PATTERN:[[I
new-array v1, v8, [[I
new-array v2, v8, [I
.line 44
fill-array-data v2, :array_2b0
aput-object v2, v1, v3
new-array v2, v8, [I
fill-array-data v2, :array_2be
aput-object v2, v1, v4
new-array v2, v8, [I
fill-array-data v2, :array_2cc
aput-object v2, v1, v5
new-array v2, v8, [I
fill-array-data v2, :array_2da
aput-object v2, v1, v6
new-array v2, v8, [I
fill-array-data v2, :array_2e8
aput-object v2, v1, v7
sput-object v1, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->POSITION_ADJUSTMENT_PATTERN:[[I
const/16 v1, 0x28
new-array v1, v1, [[I
new-array v2, v0, [I
.line 53
fill-array-data v2, :array_2f6
aput-object v2, v1, v3
new-array v2, v0, [I
fill-array-data v2, :array_308
aput-object v2, v1, v4
new-array v2, v0, [I
fill-array-data v2, :array_31a
aput-object v2, v1, v5
new-array v2, v0, [I
fill-array-data v2, :array_32c
aput-object v2, v1, v6
new-array v2, v0, [I
fill-array-data v2, :array_33e
aput-object v2, v1, v7
new-array v2, v0, [I
fill-array-data v2, :array_350
aput-object v2, v1, v8
new-array v2, v0, [I
fill-array-data v2, :array_362
aput-object v2, v1, v9
new-array v2, v0, [I
fill-array-data v2, :array_374
aput-object v2, v1, v0
new-array v2, v0, [I
fill-array-data v2, :array_386
const/16 v10, 0x8
aput-object v2, v1, v10
new-array v2, v0, [I
fill-array-data v2, :array_398
const/16 v11, 0x9
aput-object v2, v1, v11
new-array v2, v0, [I
fill-array-data v2, :array_3aa
const/16 v12, 0xa
aput-object v2, v1, v12
new-array v2, v0, [I
fill-array-data v2, :array_3bc
const/16 v13, 0xb
aput-object v2, v1, v13
new-array v2, v0, [I
fill-array-data v2, :array_3ce
const/16 v14, 0xc
aput-object v2, v1, v14
new-array v2, v0, [I
fill-array-data v2, :array_3e0
const/16 v15, 0xd
aput-object v2, v1, v15
new-array v2, v0, [I
fill-array-data v2, :array_3f2
const/16 v16, 0xe
aput-object v2, v1, v16
new-array v2, v0, [I
fill-array-data v2, :array_404
const/16 v15, 0xf
aput-object v2, v1, v15
new-array v2, v0, [I
fill-array-data v2, :array_416
const/16 v17, 0x10
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_428
const/16 v17, 0x11
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_43a
const/16 v17, 0x12
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_44c
const/16 v17, 0x13
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_45e
const/16 v17, 0x14
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_470
const/16 v17, 0x15
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_482
const/16 v17, 0x16
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_494
const/16 v17, 0x17
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_4a6
const/16 v17, 0x18
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_4b8
const/16 v17, 0x19
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_4ca
const/16 v17, 0x1a
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_4dc
const/16 v17, 0x1b
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_4ee
const/16 v17, 0x1c
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_500
const/16 v17, 0x1d
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_512
const/16 v17, 0x1e
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_524
const/16 v17, 0x1f
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_536
const/16 v17, 0x20
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_548
const/16 v17, 0x21
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_55a
const/16 v17, 0x22
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_56c
const/16 v17, 0x23
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_57e
const/16 v17, 0x24
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_590
const/16 v17, 0x25
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_5a2
const/16 v17, 0x26
aput-object v2, v1, v17
new-array v2, v0, [I
fill-array-data v2, :array_5b4
const/16 v17, 0x27
aput-object v2, v1, v17
sput-object v1, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE:[[I
new-array v1, v15, [[I
new-array v2, v5, [I
.line 97
fill-array-data v2, :array_5c6
aput-object v2, v1, v3
new-array v2, v5, [I
fill-array-data v2, :array_5ce
aput-object v2, v1, v4
new-array v2, v5, [I
fill-array-data v2, :array_5d6
aput-object v2, v1, v5
new-array v2, v5, [I
fill-array-data v2, :array_5de
aput-object v2, v1, v6
new-array v2, v5, [I
fill-array-data v2, :array_5e6
aput-object v2, v1, v7
new-array v2, v5, [I
fill-array-data v2, :array_5ee
aput-object v2, v1, v8
new-array v2, v5, [I
fill-array-data v2, :array_5f6
aput-object v2, v1, v9
new-array v2, v5, [I
fill-array-data v2, :array_5fe
aput-object v2, v1, v0
new-array v0, v5, [I
fill-array-data v0, :array_606
aput-object v0, v1, v10
new-array v0, v5, [I
fill-array-data v0, :array_60e
aput-object v0, v1, v11
new-array v0, v5, [I
fill-array-data v0, :array_616
aput-object v0, v1, v12
new-array v0, v5, [I
fill-array-data v0, :array_61e
aput-object v0, v1, v13
new-array v0, v5, [I
fill-array-data v0, :array_626
aput-object v0, v1, v14
new-array v0, v5, [I
fill-array-data v0, :array_62e
const/16 v2, 0xd
aput-object v0, v1, v2
new-array v0, v5, [I
fill-array-data v0, :array_636
aput-object v0, v1, v16
sput-object v1, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->TYPE_INFO_COORDINATES:[[I
return-void
:array_232
.array-data 4
0x1
0x1
0x1
0x1
0x1
0x1
0x1
.end array-data
:array_244
.array-data 4
0x1
0x0
0x0
0x0
0x0
0x0
0x1
.end array-data
:array_256
.array-data 4
0x1
0x0
0x1
0x1
0x1
0x0
0x1
.end array-data
:array_268
.array-data 4
0x1
0x0
0x1
0x1
0x1
0x0
0x1
.end array-data
:array_27a
.array-data 4
0x1
0x0
0x1
0x1
0x1
0x0
0x1
.end array-data
:array_28c
.array-data 4
0x1
0x0
0x0
0x0
0x0
0x0
0x1
.end array-data
:array_29e
.array-data 4
0x1
0x1
0x1
0x1
0x1
0x1
0x1
.end array-data
:array_2b0
.array-data 4
0x1
0x1
0x1
0x1
0x1
.end array-data
:array_2be
.array-data 4
0x1
0x0
0x0
0x0
0x1
.end array-data
:array_2cc
.array-data 4
0x1
0x0
0x1
0x0
0x1
.end array-data
:array_2da
.array-data 4
0x1
0x0
0x0
0x0
0x1
.end array-data
:array_2e8
.array-data 4
0x1
0x1
0x1
0x1
0x1
.end array-data
:array_2f6
.array-data 4
-0x1
-0x1
-0x1
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_308
.array-data 4
0x6
0x12
-0x1
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_31a
.array-data 4
0x6
0x16
-0x1
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_32c
.array-data 4
0x6
0x1a
-0x1
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_33e
.array-data 4
0x6
0x1e
-0x1
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_350
.array-data 4
0x6
0x22
-0x1
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_362
.array-data 4
0x6
0x16
0x26
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_374
.array-data 4
0x6
0x18
0x2a
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_386
.array-data 4
0x6
0x1a
0x2e
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_398
.array-data 4
0x6
0x1c
0x32
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_3aa
.array-data 4
0x6
0x1e
0x36
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_3bc
.array-data 4
0x6
0x20
0x3a
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_3ce
.array-data 4
0x6
0x22
0x3e
-0x1
-0x1
-0x1
-0x1
.end array-data
:array_3e0
.array-data 4
0x6
0x1a
0x2e
0x42
-0x1
-0x1
-0x1
.end array-data
:array_3f2
.array-data 4
0x6
0x1a
0x30
0x46
-0x1
-0x1
-0x1
.end array-data
:array_404
.array-data 4
0x6
0x1a
0x32
0x4a
-0x1
-0x1
-0x1
.end array-data
:array_416
.array-data 4
0x6
0x1e
0x36
0x4e
-0x1
-0x1
-0x1
.end array-data
:array_428
.array-data 4
0x6
0x1e
0x38
0x52
-0x1
-0x1
-0x1
.end array-data
:array_43a
.array-data 4
0x6
0x1e
0x3a
0x56
-0x1
-0x1
-0x1
.end array-data
:array_44c
.array-data 4
0x6
0x22
0x3e
0x5a
-0x1
-0x1
-0x1
.end array-data
:array_45e
.array-data 4
0x6
0x1c
0x32
0x48
0x5e
-0x1
-0x1
.end array-data
:array_470
.array-data 4
0x6
0x1a
0x32
0x4a
0x62
-0x1
-0x1
.end array-data
:array_482
.array-data 4
0x6
0x1e
0x36
0x4e
0x66
-0x1
-0x1
.end array-data
:array_494
.array-data 4
0x6
0x1c
0x36
0x50
0x6a
-0x1
-0x1
.end array-data
:array_4a6
.array-data 4
0x6
0x20
0x3a
0x54
0x6e
-0x1
-0x1
.end array-data
:array_4b8
.array-data 4
0x6
0x1e
0x3a
0x56
0x72
-0x1
-0x1
.end array-data
:array_4ca
.array-data 4
0x6
0x22
0x3e
0x5a
0x76
-0x1
-0x1
.end array-data
:array_4dc
.array-data 4
0x6
0x1a
0x32
0x4a
0x62
0x7a
-0x1
.end array-data
:array_4ee
.array-data 4
0x6
0x1e
0x36
0x4e
0x66
0x7e
-0x1
.end array-data
:array_500
.array-data 4
0x6
0x1a
0x34
0x4e
0x68
0x82
-0x1
.end array-data
:array_512
.array-data 4
0x6
0x1e
0x38
0x52
0x6c
0x86
-0x1
.end array-data
:array_524
.array-data 4
0x6
0x22
0x3c
0x56
0x70
0x8a
-0x1
.end array-data
:array_536
.array-data 4
0x6
0x1e
0x3a
0x56
0x72
0x8e
-0x1
.end array-data
:array_548
.array-data 4
0x6
0x22
0x3e
0x5a
0x76
0x92
-0x1
.end array-data
:array_55a
.array-data 4
0x6
0x1e
0x36
0x4e
0x66
0x7e
0x96
.end array-data
:array_56c
.array-data 4
0x6
0x18
0x32
0x4c
0x66
0x80
0x9a
.end array-data
:array_57e
.array-data 4
0x6
0x1c
0x36
0x50
0x6a
0x84
0x9e
.end array-data
:array_590
.array-data 4
0x6
0x20
0x3a
0x54
0x6e
0x88
0xa2
.end array-data
:array_5a2
.array-data 4
0x6
0x1a
0x36
0x52
0x6e
0x8a
0xa6
.end array-data
:array_5b4
.array-data 4
0x6
0x1e
0x3a
0x56
0x72
0x8e
0xaa
.end array-data
:array_5c6
.array-data 4
0x8
0x0
.end array-data
:array_5ce
.array-data 4
0x8
0x1
.end array-data
:array_5d6
.array-data 4
0x8
0x2
.end array-data
:array_5de
.array-data 4
0x8
0x3
.end array-data
:array_5e6
.array-data 4
0x8
0x4
.end array-data
:array_5ee
.array-data 4
0x8
0x5
.end array-data
:array_5f6
.array-data 4
0x8
0x7
.end array-data
:array_5fe
.array-data 4
0x8
0x8
.end array-data
:array_606
.array-data 4
0x7
0x8
.end array-data
:array_60e
.array-data 4
0x5
0x8
.end array-data
:array_616
.array-data 4
0x4
0x8
.end array-data
:array_61e
.array-data 4
0x3
0x8
.end array-data
:array_626
.array-data 4
0x2
0x8
.end array-data
:array_62e
.array-data 4
0x1
0x8
.end array-data
:array_636
.array-data 4
0x0
0x8
.end array-data
.end method
.method private constructor <init>()V
.registers 1
.line 30
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method static buildMatrix(Lcom/google/zxing/common/BitArray;Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;Lcom/google/zxing/qrcode/decoder/Version;ILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 5
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
.line 137
invoke-static {p4}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->clearMatrix(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 138
invoke-static {p2, p4}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedBasicPatterns(Lcom/google/zxing/qrcode/decoder/Version;Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 140
invoke-static {p1, p3, p4}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedTypeInfo(Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;ILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 142
invoke-static {p2, p4}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->maybeEmbedVersionInfo(Lcom/google/zxing/qrcode/decoder/Version;Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 144
invoke-static {p0, p3, p4}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedDataBits(Lcom/google/zxing/common/BitArray;ILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
return-void
.end method
.method static calculateBCHCode(II)I
.registers 4
if-eqz p1, :cond_19
.line 308
invoke-static {p1}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->findMSBSet(I)I
move-result v0
add-int/lit8 v1, v0, -0x1
shl-int/2addr p0, v1
.line 311
:goto_9
invoke-static {p0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->findMSBSet(I)I
move-result v1
if-lt v1, v0, :cond_18
.line 312
invoke-static {p0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->findMSBSet(I)I
move-result v1
sub-int/2addr v1, v0
shl-int v1, p1, v1
xor-int/2addr p0, v1
goto :goto_9
:cond_18
return p0
.line 304
:cond_19
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "0 polynomial"
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method static clearMatrix(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 2
const/4 v0, -0x1
.line 127
invoke-virtual {p0, v0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->clear(B)V
return-void
.end method
.method static embedBasicPatterns(Lcom/google/zxing/qrcode/decoder/Version;Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
.line 155
invoke-static {p1}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedPositionDetectionPatternsAndSeparators(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 157
invoke-static {p1}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedDarkDotAtLeftBottomCorner(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 160
invoke-static {p0, p1}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->maybeEmbedPositionAdjustmentPatterns(Lcom/google/zxing/qrcode/decoder/Version;Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 162
invoke-static {p1}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedTimingPatterns(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
return-void
.end method
.method private static embedDarkDotAtLeftBottomCorner(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
.line 376
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v0
const/16 v1, 0x8
sub-int/2addr v0, v1
invoke-virtual {p0, v1, v0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->get(II)B
move-result v0
if-eqz v0, :cond_17
.line 379
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v0
sub-int/2addr v0, v1
const/4 v2, 0x1
invoke-virtual {p0, v1, v0, v2}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(III)V
return-void
.line 377
:cond_17
new-instance p0, Lcom/google/zxing/WriterException;
invoke-direct {p0}, Lcom/google/zxing/WriterException;-><init>()V
throw p0
.end method
.method static embedDataBits(Lcom/google/zxing/common/BitArray;ILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 13
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
.line 226
invoke-virtual {p2}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v0
add-int/lit8 v0, v0, -0x1
.line 227
invoke-virtual {p2}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v1
add-int/lit8 v1, v1, -0x1
const/4 v2, -0x1
const/4 v3, 0x0
const/4 v4, 0x0
const/4 v5, -0x1
:goto_10
if-lez v0, :cond_54
const/4 v6, 0x6
if-ne v0, v6, :cond_17
add-int/lit8 v0, v0, -0x1
:cond_17
:goto_17
if-ltz v1, :cond_4f
.line 233
invoke-virtual {p2}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v6
if-ge v1, v6, :cond_4f
const/4 v6, 0x0
:goto_20
const/4 v7, 0x2
if-ge v6, v7, :cond_4d
sub-int v7, v0, v6
.line 237
invoke-virtual {p2, v7, v1}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->get(II)B
move-result v8
invoke-static {v8}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->isEmpty(I)Z
move-result v8
if-eqz v8, :cond_4a
.line 241
invoke-virtual {p0}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result v8
if-ge v4, v8, :cond_3c
.line 242
invoke-virtual {p0, v4}, Lcom/google/zxing/common/BitArray;->get(I)Z
move-result v8
add-int/lit8 v4, v4, 0x1
goto :goto_3d
:cond_3c
const/4 v8, 0x0
:goto_3d
if-eq p1, v2, :cond_47
.line 251
invoke-static {p1, v7, v1}, Lcom/google/zxing/qrcode/encoder/MaskUtil;->getDataMaskBit(III)Z
move-result v9
if-eqz v9, :cond_47
xor-int/lit8 v8, v8, 0x1
.line 254
:cond_47
invoke-virtual {p2, v7, v1, v8}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(IIZ)V
:cond_4a
add-int/lit8 v6, v6, 0x1
goto :goto_20
:cond_4d
add-int/2addr v1, v5
goto :goto_17
:cond_4f
neg-int v5, v5
add-int/2addr v1, v5
add-int/lit8 v0, v0, -0x2
goto :goto_10
.line 263
:cond_54
invoke-virtual {p0}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result p1
if-ne v4, p1, :cond_5b
return-void
.line 264
:cond_5b
new-instance p1, Lcom/google/zxing/WriterException;
new-instance p2, Ljava/lang/StringBuilder;
const-string v0, "Not all bits consumed: "
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p2, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const/16 v0, 0x2f
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {p0}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result p0
invoke-virtual {p2, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Lcom/google/zxing/WriterException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method private static embedHorizontalSeparationPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
const/4 v0, 0x0
const/4 v1, 0x0
:goto_2
const/16 v2, 0x8
if-ge v1, v2, :cond_1e
add-int v2, p0, v1
.line 386
invoke-virtual {p2, v2, p1}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->get(II)B
move-result v3
invoke-static {v3}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->isEmpty(I)Z
move-result v3
if-eqz v3, :cond_18
.line 389
invoke-virtual {p2, v2, p1, v0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(III)V
add-int/lit8 v1, v1, 0x1
goto :goto_2
.line 387
:cond_18
new-instance p0, Lcom/google/zxing/WriterException;
invoke-direct {p0}, Lcom/google/zxing/WriterException;-><init>()V
throw p0
:cond_1e
return-void
.end method
.method private static embedPositionAdjustmentPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 10
const/4 v0, 0x0
const/4 v1, 0x0
:goto_2
const/4 v2, 0x5
if-ge v1, v2, :cond_1b
const/4 v3, 0x0
:goto_6
if-ge v3, v2, :cond_18
add-int v4, p0, v3
add-int v5, p1, v1
.line 410
sget-object v6, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->POSITION_ADJUSTMENT_PATTERN:[[I
aget-object v6, v6, v1
aget v6, v6, v3
invoke-virtual {p2, v4, v5, v6}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(III)V
add-int/lit8 v3, v3, 0x1
goto :goto_6
:cond_18
add-int/lit8 v1, v1, 0x1
goto :goto_2
:cond_1b
return-void
.end method
.method private static embedPositionDetectionPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 10
const/4 v0, 0x0
const/4 v1, 0x0
:goto_2
const/4 v2, 0x7
if-ge v1, v2, :cond_1b
const/4 v3, 0x0
:goto_6
if-ge v3, v2, :cond_18
add-int v4, p0, v3
add-int v5, p1, v1
.line 418
sget-object v6, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->POSITION_DETECTION_PATTERN:[[I
aget-object v6, v6, v1
aget v6, v6, v3
invoke-virtual {p2, v4, v5, v6}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(III)V
add-int/lit8 v3, v3, 0x1
goto :goto_6
:cond_18
add-int/lit8 v1, v1, 0x1
goto :goto_2
:cond_1b
return-void
.end method
.method private static embedPositionDetectionPatternsAndSeparators(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
.line 426
sget-object v0, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->POSITION_DETECTION_PATTERN:[[I
const/4 v1, 0x0
aget-object v0, v0, v1
array-length v0, v0
.line 428
invoke-static {v1, v1, p0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedPositionDetectionPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 430
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v2
sub-int/2addr v2, v0
invoke-static {v2, v1, p0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedPositionDetectionPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 432
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v2
sub-int/2addr v2, v0
invoke-static {v1, v2, p0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedPositionDetectionPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
const/4 v0, 0x7
.line 437
invoke-static {v1, v0, p0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedHorizontalSeparationPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 439
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v2
add-int/lit8 v2, v2, -0x8
invoke-static {v2, v0, p0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedHorizontalSeparationPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 442
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v2
add-int/lit8 v2, v2, -0x8
invoke-static {v1, v2, p0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedHorizontalSeparationPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 447
invoke-static {v0, v1, p0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedVerticalSeparationPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 449
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v2
sub-int/2addr v2, v0
add-int/lit8 v2, v2, -0x1
invoke-static {v2, v1, p0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedVerticalSeparationPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.line 451
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v1
sub-int/2addr v1, v0
invoke-static {v0, v1, p0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedVerticalSeparationPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
return-void
.end method
.method private static embedTimingPatterns(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 7
const/16 v0, 0x8
const/16 v1, 0x8
.line 361
:goto_4
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v2
sub-int/2addr v2, v0
if-ge v1, v2, :cond_2c
add-int/lit8 v2, v1, 0x1
.line 362
rem-int/lit8 v3, v2, 0x2
const/4 v4, 0x6
.line 364
invoke-virtual {p0, v1, v4}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->get(II)B
move-result v5
invoke-static {v5}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->isEmpty(I)Z
move-result v5
if-eqz v5, :cond_1d
.line 365
invoke-virtual {p0, v1, v4, v3}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(III)V
.line 368
:cond_1d
invoke-virtual {p0, v4, v1}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->get(II)B
move-result v5
invoke-static {v5}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->isEmpty(I)Z
move-result v5
if-eqz v5, :cond_2a
.line 369
invoke-virtual {p0, v4, v1, v3}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(III)V
:cond_2a
move v1, v2
goto :goto_4
:cond_2c
return-void
.end method
.method static embedTypeInfo(Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;ILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 8
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
.line 168
new-instance v0, Lcom/google/zxing/common/BitArray;
invoke-direct {v0}, Lcom/google/zxing/common/BitArray;-><init>()V
.line 169
invoke-static {p0, p1, v0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->makeTypeInfoBits(Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;ILcom/google/zxing/common/BitArray;)V
const/4 p0, 0x0
const/4 p1, 0x0
.line 171
:goto_a
invoke-virtual {v0}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result v1
if-ge p1, v1, :cond_45
.line 174
invoke-virtual {v0}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result v1
const/4 v2, 0x1
sub-int/2addr v1, v2
sub-int/2addr v1, p1
invoke-virtual {v0, v1}, Lcom/google/zxing/common/BitArray;->get(I)Z
move-result v1
.line 177
sget-object v3, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->TYPE_INFO_COORDINATES:[[I
aget-object v4, v3, p1
aget v4, v4, p0
.line 178
aget-object v3, v3, p1
aget v3, v3, v2
.line 179
invoke-virtual {p2, v4, v3, v1}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(IIZ)V
const/16 v3, 0x8
if-ge p1, v3, :cond_36
.line 183
invoke-virtual {p2}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v4
sub-int/2addr v4, p1
sub-int/2addr v4, v2
.line 185
invoke-virtual {p2, v4, v3, v1}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(IIZ)V
goto :goto_42
.line 189
:cond_36
invoke-virtual {p2}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v2
add-int/lit8 v2, v2, -0x7
add-int/lit8 v4, p1, -0x8
add-int/2addr v2, v4
.line 190
invoke-virtual {p2, v3, v2, v1}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(IIZ)V
:goto_42
add-int/lit8 p1, p1, 0x1
goto :goto_a
:cond_45
return-void
.end method
.method private static embedVerticalSeparationPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
const/4 v0, 0x0
const/4 v1, 0x0
:goto_2
const/4 v2, 0x7
if-ge v1, v2, :cond_1d
add-int v2, p1, v1
.line 397
invoke-virtual {p2, p0, v2}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->get(II)B
move-result v3
invoke-static {v3}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->isEmpty(I)Z
move-result v3
if-eqz v3, :cond_17
.line 400
invoke-virtual {p2, p0, v2, v0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(III)V
add-int/lit8 v1, v1, 0x1
goto :goto_2
.line 398
:cond_17
new-instance p0, Lcom/google/zxing/WriterException;
invoke-direct {p0}, Lcom/google/zxing/WriterException;-><init>()V
throw p0
:cond_1d
return-void
.end method
.method static findMSBSet(I)I
.registers 1
.line 274
invoke-static {p0}, Ljava/lang/Integer;->numberOfLeadingZeros(I)I
move-result p0
rsub-int/lit8 p0, p0, 0x20
return p0
.end method
.method private static isEmpty(I)Z
.registers 2
const/4 v0, -0x1
if-ne p0, v0, :cond_5
const/4 p0, 0x1
return p0
:cond_5
const/4 p0, 0x0
return p0
.end method
.method static makeTypeInfoBits(Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;ILcom/google/zxing/common/BitArray;)V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
.line 323
invoke-static {p1}, Lcom/google/zxing/qrcode/encoder/QRCode;->isValidMaskPattern(I)Z
move-result v0
if-eqz v0, :cond_4a
.line 326
invoke-virtual {p0}, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->getBits()I
move-result p0
shl-int/lit8 p0, p0, 0x3
or-int/2addr p0, p1
const/4 p1, 0x5
.line 327
invoke-virtual {p2, p0, p1}, Lcom/google/zxing/common/BitArray;->appendBits(II)V
const/16 p1, 0x537
.line 329
invoke-static {p0, p1}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->calculateBCHCode(II)I
move-result p0
const/16 p1, 0xa
.line 330
invoke-virtual {p2, p0, p1}, Lcom/google/zxing/common/BitArray;->appendBits(II)V
.line 332
new-instance p0, Lcom/google/zxing/common/BitArray;
invoke-direct {p0}, Lcom/google/zxing/common/BitArray;-><init>()V
const/16 p1, 0x5412
const/16 v0, 0xf
.line 333
invoke-virtual {p0, p1, v0}, Lcom/google/zxing/common/BitArray;->appendBits(II)V
.line 334
invoke-virtual {p2, p0}, Lcom/google/zxing/common/BitArray;->xor(Lcom/google/zxing/common/BitArray;)V
.line 336
invoke-virtual {p2}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result p0
if-ne p0, v0, :cond_32
return-void
.line 337
:cond_32
new-instance p0, Lcom/google/zxing/WriterException;
new-instance p1, Ljava/lang/StringBuilder;
const-string v0, "should not happen but we got: "
invoke-direct {p1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p2}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result p2
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Lcom/google/zxing/WriterException;-><init>(Ljava/lang/String;)V
throw p0
.line 324
:cond_4a
new-instance p0, Lcom/google/zxing/WriterException;
const-string p1, "Invalid mask pattern"
invoke-direct {p0, p1}, Lcom/google/zxing/WriterException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method static makeVersionInfoBits(Lcom/google/zxing/qrcode/decoder/Version;Lcom/google/zxing/common/BitArray;)V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
.line 344
invoke-virtual {p0}, Lcom/google/zxing/qrcode/decoder/Version;->getVersionNumber()I
move-result v0
const/4 v1, 0x6
invoke-virtual {p1, v0, v1}, Lcom/google/zxing/common/BitArray;->appendBits(II)V
.line 345
invoke-virtual {p0}, Lcom/google/zxing/qrcode/decoder/Version;->getVersionNumber()I
move-result p0
const/16 v0, 0x1f25
invoke-static {p0, v0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->calculateBCHCode(II)I
move-result p0
const/16 v0, 0xc
.line 346
invoke-virtual {p1, p0, v0}, Lcom/google/zxing/common/BitArray;->appendBits(II)V
.line 348
invoke-virtual {p1}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result p0
const/16 v0, 0x12
if-ne p0, v0, :cond_20
return-void
.line 349
:cond_20
new-instance p0, Lcom/google/zxing/WriterException;
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "should not happen but we got: "
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p1}, Lcom/google/zxing/common/BitArray;->getSize()I
move-result p1
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Lcom/google/zxing/WriterException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method private static maybeEmbedPositionAdjustmentPatterns(Lcom/google/zxing/qrcode/decoder/Version;Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 9
.line 457
invoke-virtual {p0}, Lcom/google/zxing/qrcode/decoder/Version;->getVersionNumber()I
move-result v0
const/4 v1, 0x2
if-ge v0, v1, :cond_8
return-void
.line 460
:cond_8
invoke-virtual {p0}, Lcom/google/zxing/qrcode/decoder/Version;->getVersionNumber()I
move-result p0
add-int/lit8 p0, p0, -0x1
.line 461
sget-object v0, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE:[[I
aget-object v1, v0, p0
.line 462
aget-object p0, v0, p0
array-length p0, p0
const/4 v0, 0x0
const/4 v2, 0x0
:goto_17
if-ge v2, p0, :cond_3c
const/4 v3, 0x0
:goto_1a
if-ge v3, p0, :cond_39
.line 465
aget v4, v1, v2
.line 466
aget v5, v1, v3
const/4 v6, -0x1
if-eq v5, v6, :cond_36
if-eq v4, v6, :cond_36
.line 471
invoke-virtual {p1, v5, v4}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->get(II)B
move-result v6
invoke-static {v6}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->isEmpty(I)Z
move-result v6
if-eqz v6, :cond_36
add-int/lit8 v5, v5, -0x2
add-int/lit8 v4, v4, -0x2
.line 474
invoke-static {v5, v4, p1}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->embedPositionAdjustmentPattern(IILcom/google/zxing/qrcode/encoder/ByteMatrix;)V
:cond_36
add-int/lit8 v3, v3, 0x1
goto :goto_1a
:cond_39
add-int/lit8 v2, v2, 0x1
goto :goto_17
:cond_3c
return-void
.end method
.method static maybeEmbedVersionInfo(Lcom/google/zxing/qrcode/decoder/Version;Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.registers 8
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/WriterException;
}
.end annotation
.line 198
invoke-virtual {p0}, Lcom/google/zxing/qrcode/decoder/Version;->getVersionNumber()I
move-result v0
const/4 v1, 0x7
if-ge v0, v1, :cond_8
return-void
.line 201
:cond_8
new-instance v0, Lcom/google/zxing/common/BitArray;
invoke-direct {v0}, Lcom/google/zxing/common/BitArray;-><init>()V
.line 202
invoke-static {p0, v0}, Lcom/google/zxing/qrcode/encoder/MatrixUtil;->makeVersionInfoBits(Lcom/google/zxing/qrcode/decoder/Version;Lcom/google/zxing/common/BitArray;)V
const/16 p0, 0x11
const/4 v1, 0x0
const/4 v2, 0x0
:goto_14
const/4 v3, 0x6
if-ge v2, v3, :cond_3b
const/4 v3, 0x0
:goto_18
const/4 v4, 0x3
if-ge v3, v4, :cond_38
.line 208
invoke-virtual {v0, p0}, Lcom/google/zxing/common/BitArray;->get(I)Z
move-result v4
add-int/lit8 p0, p0, -0x1
.line 211
invoke-virtual {p1}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v5
add-int/lit8 v5, v5, -0xb
add-int/2addr v5, v3
invoke-virtual {p1, v2, v5, v4}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(IIZ)V
.line 213
invoke-virtual {p1}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v5
add-int/lit8 v5, v5, -0xb
add-int/2addr v5, v3
invoke-virtual {p1, v5, v2, v4}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->set(IIZ)V
add-int/lit8 v3, v3, 0x1
goto :goto_18
:cond_38
add-int/lit8 v2, v2, 0x1
goto :goto_14
:cond_3b
return-void
.end method