Files
rr3-apk/smali/androidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter.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

2798 lines
58 KiB
Smali

.class final Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;
.super Landroidx/datastore/preferences/protobuf/BinaryWriter;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/datastore/preferences/protobuf/BinaryWriter;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "SafeHeapWriter"
.end annotation
# instance fields
.field private allocatedBuffer:Landroidx/datastore/preferences/protobuf/AllocatedBuffer;
.field private buffer:[B
.field private limit:I
.field private limitMinusOne:I
.field private offset:I
.field private offsetMinusOne:I
.field private pos:I
# direct methods
.method public constructor <init>(Landroidx/datastore/preferences/protobuf/BufferAllocator;I)V
.locals 1
const/4 v0, 0x0
.line 928
invoke-direct {p0, p1, p2, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter;-><init>(Landroidx/datastore/preferences/protobuf/BufferAllocator;ILandroidx/datastore/preferences/protobuf/BinaryWriter$1;)V
.line 929
invoke-direct {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->nextBuffer()V
return-void
.end method
.method private nextBuffer()V
.locals 1
.line 944
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter;->newHeapBuffer()Landroidx/datastore/preferences/protobuf/AllocatedBuffer;
move-result-object v0
invoke-direct {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->nextBuffer(Landroidx/datastore/preferences/protobuf/AllocatedBuffer;)V
return-void
.end method
.method private nextBuffer(I)V
.locals 0
.line 948
invoke-virtual {p0, p1}, Landroidx/datastore/preferences/protobuf/BinaryWriter;->newHeapBuffer(I)Landroidx/datastore/preferences/protobuf/AllocatedBuffer;
move-result-object p1
invoke-direct {p0, p1}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->nextBuffer(Landroidx/datastore/preferences/protobuf/AllocatedBuffer;)V
return-void
.end method
.method private nextBuffer(Landroidx/datastore/preferences/protobuf/AllocatedBuffer;)V
.locals 2
.line 952
invoke-virtual {p1}, Landroidx/datastore/preferences/protobuf/AllocatedBuffer;->hasArray()Z
move-result v0
if-eqz v0, :cond_0
.line 956
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->finishCurrentBuffer()V
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter;->buffers:Ljava/util/ArrayDeque;
.line 958
invoke-virtual {v0, p1}, Ljava/util/ArrayDeque;->addFirst(Ljava/lang/Object;)V
iput-object p1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->allocatedBuffer:Landroidx/datastore/preferences/protobuf/AllocatedBuffer;
.line 961
invoke-virtual {p1}, Landroidx/datastore/preferences/protobuf/AllocatedBuffer;->array()[B
move-result-object v0
iput-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
.line 962
invoke-virtual {p1}, Landroidx/datastore/preferences/protobuf/AllocatedBuffer;->arrayOffset()I
move-result v0
.line 963
invoke-virtual {p1}, Landroidx/datastore/preferences/protobuf/AllocatedBuffer;->limit()I
move-result v1
add-int/2addr v1, v0
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->limit:I
.line 964
invoke-virtual {p1}, Landroidx/datastore/preferences/protobuf/AllocatedBuffer;->position()I
move-result p1
add-int/2addr v0, p1
iput v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->offset:I
add-int/lit8 v0, v0, -0x1
iput v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->offsetMinusOne:I
iget p1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->limit:I
add-int/lit8 p1, p1, -0x1
iput p1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->limitMinusOne:I
iput p1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
return-void
.line 953
:cond_0
new-instance p1, Ljava/lang/RuntimeException;
const-string v0, "Allocator returned non-heap buffer"
invoke-direct {p1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method private writeVarint32FiveBytes(I)V
.locals 5
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
ushr-int/lit8 v3, p1, 0x1c
int-to-byte v3, v3
.line 1174
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
ushr-int/lit8 v4, p1, 0x15
and-int/lit8 v4, v4, 0x7f
or-int/lit16 v4, v4, 0x80
int-to-byte v4, v4
.line 1175
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x3
ushr-int/lit8 v4, p1, 0xe
and-int/lit8 v4, v4, 0x7f
or-int/lit16 v4, v4, 0x80
int-to-byte v4, v4
.line 1176
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x4
ushr-int/lit8 v4, p1, 0x7
and-int/lit8 v4, v4, 0x7f
or-int/lit16 v4, v4, 0x80
int-to-byte v4, v4
.line 1177
aput-byte v4, v0, v2
add-int/lit8 v1, v1, -0x5
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-int/lit8 p1, p1, 0x7f
or-int/lit16 p1, p1, 0x80
int-to-byte p1, p1
.line 1178
aput-byte p1, v0, v3
return-void
.end method
.method private writeVarint32FourBytes(I)V
.locals 5
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
ushr-int/lit8 v3, p1, 0x15
int-to-byte v3, v3
.line 1167
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
ushr-int/lit8 v4, p1, 0xe
and-int/lit8 v4, v4, 0x7f
or-int/lit16 v4, v4, 0x80
int-to-byte v4, v4
.line 1168
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x3
ushr-int/lit8 v4, p1, 0x7
and-int/lit8 v4, v4, 0x7f
or-int/lit16 v4, v4, 0x80
int-to-byte v4, v4
.line 1169
aput-byte v4, v0, v3
add-int/lit8 v1, v1, -0x4
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-int/lit8 p1, p1, 0x7f
or-int/lit16 p1, p1, 0x80
int-to-byte p1, p1
.line 1170
aput-byte p1, v0, v2
return-void
.end method
.method private writeVarint32OneByte(I)V
.locals 3
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
iput v2, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
int-to-byte p1, p1
.line 1152
aput-byte p1, v0, v1
return-void
.end method
.method private writeVarint32ThreeBytes(I)V
.locals 5
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
ushr-int/lit8 v3, p1, 0xe
int-to-byte v3, v3
.line 1161
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
ushr-int/lit8 v4, p1, 0x7
and-int/lit8 v4, v4, 0x7f
or-int/lit16 v4, v4, 0x80
int-to-byte v4, v4
.line 1162
aput-byte v4, v0, v2
add-int/lit8 v1, v1, -0x3
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-int/lit8 p1, p1, 0x7f
or-int/lit16 p1, p1, 0x80
int-to-byte p1, p1
.line 1163
aput-byte p1, v0, v3
return-void
.end method
.method private writeVarint32TwoBytes(I)V
.locals 4
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
ushr-int/lit8 v3, p1, 0x7
int-to-byte v3, v3
.line 1156
aput-byte v3, v0, v1
add-int/lit8 v1, v1, -0x2
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-int/lit8 p1, p1, 0x7f
or-int/lit16 p1, p1, 0x80
int-to-byte p1, p1
.line 1157
aput-byte p1, v0, v2
return-void
.end method
.method private writeVarint64EightBytes(J)V
.locals 10
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
const/16 v3, 0x31
ushr-long v3, p1, v3
long-to-int v3, v3
int-to-byte v3, v3
.line 1267
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
const/16 v4, 0x2a
ushr-long v4, p1, v4
const-wide/16 v6, 0x7f
and-long/2addr v4, v6
const-wide/16 v8, 0x80
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1268
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x3
const/16 v4, 0x23
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1269
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x4
const/16 v4, 0x1c
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1270
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x5
const/16 v4, 0x15
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1271
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x6
const/16 v4, 0xe
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1272
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x7
const/4 v4, 0x7
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1273
aput-byte v4, v0, v3
add-int/lit8 v1, v1, -0x8
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-long/2addr p1, v6
or-long/2addr p1, v8
long-to-int p1, p1
int-to-byte p1, p1
.line 1274
aput-byte p1, v0, v2
return-void
.end method
.method private writeVarint64FiveBytes(J)V
.locals 10
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
const/16 v3, 0x1c
ushr-long v3, p1, v3
long-to-int v3, v3
int-to-byte v3, v3
.line 1240
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
const/16 v4, 0x15
ushr-long v4, p1, v4
const-wide/16 v6, 0x7f
and-long/2addr v4, v6
const-wide/16 v8, 0x80
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1241
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x3
const/16 v4, 0xe
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1242
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x4
const/4 v4, 0x7
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1243
aput-byte v4, v0, v2
add-int/lit8 v1, v1, -0x5
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-long/2addr p1, v6
or-long/2addr p1, v8
long-to-int p1, p1
int-to-byte p1, p1
.line 1244
aput-byte p1, v0, v3
return-void
.end method
.method private writeVarint64FourBytes(J)V
.locals 10
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
const/16 v3, 0x15
ushr-long v3, p1, v3
long-to-int v3, v3
int-to-byte v3, v3
.line 1233
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
const/16 v4, 0xe
ushr-long v4, p1, v4
const-wide/16 v6, 0x7f
and-long/2addr v4, v6
const-wide/16 v8, 0x80
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1234
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x3
const/4 v4, 0x7
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1235
aput-byte v4, v0, v3
add-int/lit8 v1, v1, -0x4
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-long/2addr p1, v6
or-long/2addr p1, v8
long-to-int p1, p1
int-to-byte p1, p1
.line 1236
aput-byte p1, v0, v2
return-void
.end method
.method private writeVarint64NineBytes(J)V
.locals 10
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
const/16 v3, 0x38
ushr-long v3, p1, v3
long-to-int v3, v3
int-to-byte v3, v3
.line 1278
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
const/16 v4, 0x31
ushr-long v4, p1, v4
const-wide/16 v6, 0x7f
and-long/2addr v4, v6
const-wide/16 v8, 0x80
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1279
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x3
const/16 v4, 0x2a
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1280
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x4
const/16 v4, 0x23
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1281
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x5
const/16 v4, 0x1c
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1282
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x6
const/16 v4, 0x15
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1283
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x7
const/16 v4, 0xe
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1284
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x8
const/4 v4, 0x7
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1285
aput-byte v4, v0, v2
add-int/lit8 v1, v1, -0x9
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-long/2addr p1, v6
or-long/2addr p1, v8
long-to-int p1, p1
int-to-byte p1, p1
.line 1286
aput-byte p1, v0, v3
return-void
.end method
.method private writeVarint64OneByte(J)V
.locals 3
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
iput v2, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
long-to-int p1, p1
int-to-byte p1, p1
.line 1218
aput-byte p1, v0, v1
return-void
.end method
.method private writeVarint64SevenBytes(J)V
.locals 12
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
const/16 v3, 0x2a
ushr-long v3, p1, v3
long-to-int v3, v3
int-to-byte v3, v3
.line 1257
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
const/16 v4, 0x23
ushr-long v4, p1, v4
const-wide/16 v6, 0x7f
and-long/2addr v4, v6
const-wide/16 v8, 0x80
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1258
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x3
const/16 v4, 0x1c
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1259
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x4
const/16 v4, 0x15
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1260
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x5
const/16 v4, 0xe
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1261
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x6
const/4 v4, 0x7
ushr-long v10, p1, v4
and-long/2addr v10, v6
or-long/2addr v10, v8
long-to-int v5, v10
int-to-byte v5, v5
.line 1262
aput-byte v5, v0, v2
sub-int/2addr v1, v4
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-long/2addr p1, v6
or-long/2addr p1, v8
long-to-int p1, p1
int-to-byte p1, p1
.line 1263
aput-byte p1, v0, v3
return-void
.end method
.method private writeVarint64SixBytes(J)V
.locals 10
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
const/16 v3, 0x23
ushr-long v3, p1, v3
long-to-int v3, v3
int-to-byte v3, v3
.line 1248
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
const/16 v4, 0x1c
ushr-long v4, p1, v4
const-wide/16 v6, 0x7f
and-long/2addr v4, v6
const-wide/16 v8, 0x80
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1249
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x3
const/16 v4, 0x15
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1250
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x4
const/16 v4, 0xe
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1251
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x5
const/4 v4, 0x7
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1252
aput-byte v4, v0, v3
add-int/lit8 v1, v1, -0x6
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-long/2addr p1, v6
or-long/2addr p1, v8
long-to-int p1, p1
int-to-byte p1, p1
.line 1253
aput-byte p1, v0, v2
return-void
.end method
.method private writeVarint64TenBytes(J)V
.locals 10
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
const/16 v3, 0x3f
ushr-long v3, p1, v3
long-to-int v3, v3
int-to-byte v3, v3
.line 1290
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
const/16 v4, 0x38
ushr-long v4, p1, v4
const-wide/16 v6, 0x7f
and-long/2addr v4, v6
const-wide/16 v8, 0x80
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1291
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x3
const/16 v4, 0x31
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1292
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x4
const/16 v4, 0x2a
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1293
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x5
const/16 v4, 0x23
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1294
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x6
const/16 v4, 0x1c
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1295
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x7
const/16 v4, 0x15
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1296
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x8
const/16 v4, 0xe
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1297
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x9
const/4 v4, 0x7
ushr-long v4, p1, v4
and-long/2addr v4, v6
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1298
aput-byte v4, v0, v3
add-int/lit8 v1, v1, -0xa
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-long/2addr p1, v6
or-long/2addr p1, v8
long-to-int p1, p1
int-to-byte p1, p1
.line 1299
aput-byte p1, v0, v2
return-void
.end method
.method private writeVarint64ThreeBytes(J)V
.locals 10
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
long-to-int v3, p1
ushr-int/lit8 v3, v3, 0xe
int-to-byte v3, v3
.line 1227
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
const/4 v4, 0x7
ushr-long v4, p1, v4
const-wide/16 v6, 0x7f
and-long/2addr v4, v6
const-wide/16 v8, 0x80
or-long/2addr v4, v8
long-to-int v4, v4
int-to-byte v4, v4
.line 1228
aput-byte v4, v0, v2
add-int/lit8 v1, v1, -0x3
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-long/2addr p1, v6
or-long/2addr p1, v8
long-to-int p1, p1
int-to-byte p1, p1
.line 1229
aput-byte p1, v0, v3
return-void
.end method
.method private writeVarint64TwoBytes(J)V
.locals 5
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
const/4 v3, 0x7
ushr-long v3, p1, v3
long-to-int v3, v3
int-to-byte v3, v3
.line 1222
aput-byte v3, v0, v1
add-int/lit8 v1, v1, -0x2
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
long-to-int p1, p1
and-int/lit8 p1, p1, 0x7f
or-int/lit16 p1, p1, 0x80
int-to-byte p1, p1
.line 1223
aput-byte p1, v0, v2
return-void
.end method
# virtual methods
.method public bytesWrittenToCurrentBuffer()I
.locals 2
iget v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->limitMinusOne:I
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
sub-int/2addr v0, v1
return v0
.end method
.method public finishCurrentBuffer()V
.locals 3
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->allocatedBuffer:Landroidx/datastore/preferences/protobuf/AllocatedBuffer;
if-eqz v0, :cond_0
iget v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter;->totalDoneBytes:I
.line 935
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->bytesWrittenToCurrentBuffer()I
move-result v1
add-int/2addr v0, v1
iput v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter;->totalDoneBytes:I
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->allocatedBuffer:Landroidx/datastore/preferences/protobuf/AllocatedBuffer;
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
.line 936
invoke-virtual {v0}, Landroidx/datastore/preferences/protobuf/AllocatedBuffer;->arrayOffset()I
move-result v2
sub-int/2addr v1, v2
add-int/lit8 v1, v1, 0x1
invoke-virtual {v0, v1}, Landroidx/datastore/preferences/protobuf/AllocatedBuffer;->position(I)Landroidx/datastore/preferences/protobuf/AllocatedBuffer;
const/4 v0, 0x0
iput-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->allocatedBuffer:Landroidx/datastore/preferences/protobuf/AllocatedBuffer;
const/4 v0, 0x0
iput v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
iput v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->limitMinusOne:I
:cond_0
return-void
.end method
.method public getTotalBytesWritten()I
.locals 2
iget v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter;->totalDoneBytes:I
.line 972
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->bytesWrittenToCurrentBuffer()I
move-result v1
add-int/2addr v0, v1
return v0
.end method
.method public requireSpace(I)V
.locals 1
.line 1440
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->spaceLeft()I
move-result v0
if-ge v0, p1, :cond_0
.line 1441
invoke-direct {p0, p1}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->nextBuffer(I)V
:cond_0
return-void
.end method
.method public spaceLeft()I
.locals 2
iget v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->offsetMinusOne:I
sub-int/2addr v0, v1
return v0
.end method
.method public write(B)V
.locals 3
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
iput v2, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
.line 1378
aput-byte p1, v0, v1
return-void
.end method
.method public write(Ljava/nio/ByteBuffer;)V
.locals 3
.line 1411
invoke-virtual {p1}, Ljava/nio/Buffer;->remaining()I
move-result v0
.line 1412
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->spaceLeft()I
move-result v1
if-ge v1, v0, :cond_0
.line 1413
invoke-direct {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->nextBuffer(I)V
:cond_0
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
sub-int/2addr v1, v0
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
iget-object v2, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
add-int/lit8 v1, v1, 0x1
.line 1417
invoke-virtual {p1, v2, v1, v0}, Ljava/nio/ByteBuffer;->get([BII)Ljava/nio/ByteBuffer;
return-void
.end method
.method public write([BII)V
.locals 2
.line 1383
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->spaceLeft()I
move-result v0
if-ge v0, p3, :cond_0
.line 1384
invoke-direct {p0, p3}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->nextBuffer(I)V
:cond_0
iget v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
sub-int/2addr v0, p3
iput v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
iget-object v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
add-int/lit8 v0, v0, 0x1
.line 1388
invoke-static {p1, p2, v1, v0, p3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
return-void
.end method
.method public writeBool(IZ)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x6
.line 1034
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
int-to-byte p2, p2
.line 1035
invoke-virtual {p0, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->write(B)V
const/4 p2, 0x0
.line 1036
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeBool(Z)V
.locals 0
int-to-byte p1, p1
.line 1128
invoke-virtual {p0, p1}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->write(B)V
return-void
.end method
.method public writeBytes(ILandroidx/datastore/preferences/protobuf/ByteString;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1052
:try_start_0
invoke-virtual {p2, p0}, Landroidx/datastore/preferences/protobuf/ByteString;->writeToReverse(Landroidx/datastore/preferences/protobuf/ByteOutput;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
const/16 v0, 0xa
.line 1058
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
.line 1059
invoke-virtual {p2}, Landroidx/datastore/preferences/protobuf/ByteString;->size()I
move-result p2
invoke-virtual {p0, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32(I)V
const/4 p2, 0x2
.line 1060
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
:catch_0
move-exception p1
.line 1055
new-instance p2, Ljava/lang/RuntimeException;
invoke-direct {p2, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
throw p2
.end method
.method public writeEndGroup(I)V
.locals 1
const/4 v0, 0x4
.line 1104
invoke-virtual {p0, p1, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeFixed32(I)V
.locals 5
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
shr-int/lit8 v3, p1, 0x18
and-int/lit16 v3, v3, 0xff
int-to-byte v3, v3
.line 1304
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
shr-int/lit8 v4, p1, 0x10
and-int/lit16 v4, v4, 0xff
int-to-byte v4, v4
.line 1305
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x3
shr-int/lit8 v4, p1, 0x8
and-int/lit16 v4, v4, 0xff
int-to-byte v4, v4
.line 1306
aput-byte v4, v0, v3
add-int/lit8 v1, v1, -0x4
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
and-int/lit16 p1, p1, 0xff
int-to-byte p1, p1
.line 1307
aput-byte p1, v0, v2
return-void
.end method
.method public writeFixed32(II)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/16 v0, 0x9
.line 1006
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
.line 1007
invoke-virtual {p0, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeFixed32(I)V
const/4 p2, 0x5
.line 1008
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeFixed64(IJ)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/16 v0, 0xd
.line 1027
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
.line 1028
invoke-virtual {p0, p2, p3}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeFixed64(J)V
const/4 p2, 0x1
.line 1029
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeFixed64(J)V
.locals 7
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v2, v1, -0x1
const/16 v3, 0x38
shr-long v3, p1, v3
long-to-int v3, v3
and-int/lit16 v3, v3, 0xff
int-to-byte v3, v3
.line 1312
aput-byte v3, v0, v1
add-int/lit8 v3, v1, -0x2
const/16 v4, 0x30
shr-long v4, p1, v4
long-to-int v4, v4
and-int/lit16 v4, v4, 0xff
int-to-byte v4, v4
.line 1313
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x3
const/16 v4, 0x28
shr-long v4, p1, v4
long-to-int v4, v4
and-int/lit16 v4, v4, 0xff
int-to-byte v4, v4
.line 1314
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x4
const/16 v4, 0x20
shr-long v4, p1, v4
long-to-int v4, v4
and-int/lit16 v4, v4, 0xff
int-to-byte v4, v4
.line 1315
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x5
const/16 v4, 0x18
shr-long v4, p1, v4
long-to-int v4, v4
and-int/lit16 v4, v4, 0xff
int-to-byte v4, v4
.line 1316
aput-byte v4, v0, v3
add-int/lit8 v3, v1, -0x6
const/16 v4, 0x10
shr-long v4, p1, v4
long-to-int v4, v4
and-int/lit16 v4, v4, 0xff
int-to-byte v4, v4
.line 1317
aput-byte v4, v0, v2
add-int/lit8 v2, v1, -0x7
const/16 v4, 0x8
shr-long v5, p1, v4
long-to-int v5, v5
and-int/lit16 v5, v5, 0xff
int-to-byte v5, v5
.line 1318
aput-byte v5, v0, v3
sub-int/2addr v1, v4
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
long-to-int p1, p1
and-int/lit16 p1, p1, 0xff
int-to-byte p1, p1
.line 1319
aput-byte p1, v0, v2
return-void
.end method
.method public writeGroup(ILjava/lang/Object;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x4
.line 1085
invoke-virtual {p0, p1, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
.line 1086
invoke-static {}, Landroidx/datastore/preferences/protobuf/Protobuf;->getInstance()Landroidx/datastore/preferences/protobuf/Protobuf;
move-result-object v0
invoke-virtual {v0, p2, p0}, Landroidx/datastore/preferences/protobuf/Protobuf;->writeTo(Ljava/lang/Object;Landroidx/datastore/preferences/protobuf/Writer;)V
const/4 p2, 0x3
.line 1087
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeGroup(ILjava/lang/Object;Landroidx/datastore/preferences/protobuf/Schema;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x4
.line 1092
invoke-virtual {p0, p1, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
.line 1093
invoke-interface {p3, p2, p0}, Landroidx/datastore/preferences/protobuf/Schema;->writeTo(Ljava/lang/Object;Landroidx/datastore/preferences/protobuf/Writer;)V
const/4 p2, 0x3
.line 1094
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeInt32(I)V
.locals 2
if-ltz p1, :cond_0
.line 1110
invoke-virtual {p0, p1}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32(I)V
goto :goto_0
:cond_0
int-to-long v0, p1
.line 1112
invoke-virtual {p0, v0, v1}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64(J)V
:goto_0
return-void
.end method
.method public writeInt32(II)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/16 v0, 0xf
.line 992
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
.line 993
invoke-virtual {p0, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeInt32(I)V
const/4 p2, 0x0
.line 994
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeLazy(Ljava/nio/ByteBuffer;)V
.locals 3
.line 1422
invoke-virtual {p1}, Ljava/nio/Buffer;->remaining()I
move-result v0
.line 1423
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->spaceLeft()I
move-result v1
if-ge v1, v0, :cond_0
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter;->totalDoneBytes:I
add-int/2addr v1, v0
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter;->totalDoneBytes:I
iget-object v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter;->buffers:Ljava/util/ArrayDeque;
.line 1427
invoke-static {p1}, Landroidx/datastore/preferences/protobuf/AllocatedBuffer;->wrap(Ljava/nio/ByteBuffer;)Landroidx/datastore/preferences/protobuf/AllocatedBuffer;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/util/ArrayDeque;->addFirst(Ljava/lang/Object;)V
.line 1431
invoke-direct {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->nextBuffer()V
:cond_0
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
sub-int/2addr v1, v0
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
iget-object v2, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
add-int/lit8 v1, v1, 0x1
.line 1435
invoke-virtual {p1, v2, v1, v0}, Ljava/nio/ByteBuffer;->get([BII)Ljava/nio/ByteBuffer;
return-void
.end method
.method public writeLazy([BII)V
.locals 2
.line 1393
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->spaceLeft()I
move-result v0
if-ge v0, p3, :cond_0
iget v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter;->totalDoneBytes:I
add-int/2addr v0, p3
iput v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter;->totalDoneBytes:I
iget-object v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter;->buffers:Ljava/util/ArrayDeque;
.line 1397
invoke-static {p1, p2, p3}, Landroidx/datastore/preferences/protobuf/AllocatedBuffer;->wrap([BII)Landroidx/datastore/preferences/protobuf/AllocatedBuffer;
move-result-object p1
invoke-virtual {v0, p1}, Ljava/util/ArrayDeque;->addFirst(Ljava/lang/Object;)V
.line 1401
invoke-direct {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->nextBuffer()V
return-void
:cond_0
iget v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
sub-int/2addr v0, p3
iput v0, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
iget-object v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
add-int/lit8 v0, v0, 0x1
.line 1406
invoke-static {p1, p2, v1, v0, p3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
return-void
.end method
.method public writeMessage(ILjava/lang/Object;)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1065
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->getTotalBytesWritten()I
move-result v0
.line 1066
invoke-static {}, Landroidx/datastore/preferences/protobuf/Protobuf;->getInstance()Landroidx/datastore/preferences/protobuf/Protobuf;
move-result-object v1
invoke-virtual {v1, p2, p0}, Landroidx/datastore/preferences/protobuf/Protobuf;->writeTo(Ljava/lang/Object;Landroidx/datastore/preferences/protobuf/Writer;)V
.line 1067
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->getTotalBytesWritten()I
move-result p2
sub-int/2addr p2, v0
const/16 v0, 0xa
.line 1068
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
.line 1069
invoke-virtual {p0, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32(I)V
const/4 p2, 0x2
.line 1070
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeMessage(ILjava/lang/Object;Landroidx/datastore/preferences/protobuf/Schema;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1075
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->getTotalBytesWritten()I
move-result v0
.line 1076
invoke-interface {p3, p2, p0}, Landroidx/datastore/preferences/protobuf/Schema;->writeTo(Ljava/lang/Object;Landroidx/datastore/preferences/protobuf/Writer;)V
.line 1077
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->getTotalBytesWritten()I
move-result p2
sub-int/2addr p2, v0
const/16 p3, 0xa
.line 1078
invoke-virtual {p0, p3}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
.line 1079
invoke-virtual {p0, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32(I)V
const/4 p2, 0x2
.line 1080
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeSInt32(I)V
.locals 0
.line 1118
invoke-static {p1}, Landroidx/datastore/preferences/protobuf/CodedOutputStream;->encodeZigZag32(I)I
move-result p1
invoke-virtual {p0, p1}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32(I)V
return-void
.end method
.method public writeSInt32(II)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/16 v0, 0xa
.line 999
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
.line 1000
invoke-virtual {p0, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeSInt32(I)V
const/4 p2, 0x0
.line 1001
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeSInt64(IJ)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/16 v0, 0xf
.line 1020
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
.line 1021
invoke-virtual {p0, p2, p3}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeSInt64(J)V
const/4 p2, 0x0
.line 1022
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeSInt64(J)V
.locals 0
.line 1123
invoke-static {p1, p2}, Landroidx/datastore/preferences/protobuf/CodedOutputStream;->encodeZigZag64(J)J
move-result-wide p1
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64(J)V
return-void
.end method
.method public writeStartGroup(I)V
.locals 1
const/4 v0, 0x3
.line 1099
invoke-virtual {p0, p1, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeString(ILjava/lang/String;)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1041
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->getTotalBytesWritten()I
move-result v0
.line 1042
invoke-virtual {p0, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeString(Ljava/lang/String;)V
.line 1043
invoke-virtual {p0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->getTotalBytesWritten()I
move-result p2
sub-int/2addr p2, v0
const/16 v0, 0xa
.line 1044
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
.line 1045
invoke-virtual {p0, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32(I)V
const/4 p2, 0x2
.line 1046
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeString(Ljava/lang/String;)V
.locals 9
.line 1325
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
.line 1328
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
add-int/lit8 v0, v0, -0x1
iget v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
sub-int/2addr v1, v0
iput v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
:goto_0
const/16 v1, 0x80
if-ltz v0, :cond_0
.line 1333
invoke-virtual {p1, v0}, Ljava/lang/String;->charAt(I)C
move-result v2
if-ge v2, v1, :cond_0
iget-object v1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v3, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/2addr v3, v0
int-to-byte v2, v2
.line 1334
aput-byte v2, v1, v3
add-int/lit8 v0, v0, -0x1
goto :goto_0
:cond_0
const/4 v2, -0x1
if-ne v0, v2, :cond_1
iget p1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 p1, p1, -0x1
iput p1, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
return-void
:cond_1
iget v3, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/2addr v3, v0
iput v3, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
:goto_1
if-ltz v0, :cond_8
.line 1343
invoke-virtual {p1, v0}, Ljava/lang/String;->charAt(I)C
move-result v3
if-ge v3, v1, :cond_2
iget v4, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
iget v5, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->offsetMinusOne:I
if-le v4, v5, :cond_2
iget-object v5, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
add-int/lit8 v6, v4, -0x1
iput v6, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
int-to-byte v3, v3
.line 1345
aput-byte v3, v5, v4
goto/16 :goto_2
:cond_2
const/16 v4, 0x800
if-ge v3, v4, :cond_3
iget v4, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
iget v5, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->offset:I
if-le v4, v5, :cond_3
iget-object v5, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
add-int/lit8 v6, v4, -0x1
and-int/lit8 v7, v3, 0x3f
or-int/2addr v7, v1
int-to-byte v7, v7
.line 1347
aput-byte v7, v5, v4
add-int/lit8 v4, v4, -0x2
iput v4, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
ushr-int/lit8 v3, v3, 0x6
or-int/lit16 v3, v3, 0x3c0
int-to-byte v3, v3
.line 1348
aput-byte v3, v5, v6
goto/16 :goto_2
:cond_3
const v4, 0xd800
if-lt v3, v4, :cond_4
const v4, 0xdfff
if-ge v4, v3, :cond_5
:cond_4
iget v4, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
iget v5, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->offset:I
add-int/lit8 v5, v5, 0x1
if-le v4, v5, :cond_5
iget-object v5, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
add-int/lit8 v6, v4, -0x1
and-int/lit8 v7, v3, 0x3f
or-int/2addr v7, v1
int-to-byte v7, v7
.line 1352
aput-byte v7, v5, v4
add-int/lit8 v7, v4, -0x2
ushr-int/lit8 v8, v3, 0x6
and-int/lit8 v8, v8, 0x3f
or-int/2addr v8, v1
int-to-byte v8, v8
.line 1353
aput-byte v8, v5, v6
add-int/lit8 v4, v4, -0x3
iput v4, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
ushr-int/lit8 v3, v3, 0xc
or-int/lit16 v3, v3, 0x1e0
int-to-byte v3, v3
.line 1354
aput-byte v3, v5, v7
goto :goto_2
:cond_5
iget v4, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
iget v5, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->offset:I
add-int/lit8 v5, v5, 0x2
if-le v4, v5, :cond_7
if-eqz v0, :cond_6
add-int/lit8 v4, v0, -0x1
.line 1359
invoke-virtual {p1, v4}, Ljava/lang/String;->charAt(I)C
move-result v4
invoke-static {v4, v3}, Ljava/lang/Character;->isSurrogatePair(CC)Z
move-result v5
if-eqz v5, :cond_6
add-int/lit8 v0, v0, -0x1
.line 1363
invoke-static {v4, v3}, Ljava/lang/Character;->toCodePoint(CC)I
move-result v3
iget-object v4, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->buffer:[B
iget v5, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
add-int/lit8 v6, v5, -0x1
and-int/lit8 v7, v3, 0x3f
or-int/2addr v7, v1
int-to-byte v7, v7
.line 1364
aput-byte v7, v4, v5
add-int/lit8 v7, v5, -0x2
ushr-int/lit8 v8, v3, 0x6
and-int/lit8 v8, v8, 0x3f
or-int/2addr v8, v1
int-to-byte v8, v8
.line 1365
aput-byte v8, v4, v6
add-int/lit8 v6, v5, -0x3
ushr-int/lit8 v8, v3, 0xc
and-int/lit8 v8, v8, 0x3f
or-int/2addr v8, v1
int-to-byte v8, v8
.line 1366
aput-byte v8, v4, v7
add-int/lit8 v5, v5, -0x4
iput v5, p0, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->pos:I
ushr-int/lit8 v3, v3, 0x12
or-int/lit16 v3, v3, 0xf0
int-to-byte v3, v3
.line 1367
aput-byte v3, v4, v6
goto :goto_2
.line 1360
:cond_6
new-instance p1, Landroidx/datastore/preferences/protobuf/Utf8$UnpairedSurrogateException;
add-int/lit8 v1, v0, -0x1
invoke-direct {p1, v1, v0}, Landroidx/datastore/preferences/protobuf/Utf8$UnpairedSurrogateException;-><init>(II)V
throw p1
.line 1370
:cond_7
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
add-int/lit8 v0, v0, 0x1
:goto_2
add-int/2addr v0, v2
goto/16 :goto_1
:cond_8
return-void
.end method
.method public writeTag(II)V
.locals 0
.line 1133
invoke-static {p1, p2}, Landroidx/datastore/preferences/protobuf/WireFormat;->makeTag(II)I
move-result p1
invoke-virtual {p0, p1}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32(I)V
return-void
.end method
.method public writeUInt32(II)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/16 v0, 0xa
.line 985
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
.line 986
invoke-virtual {p0, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32(I)V
const/4 p2, 0x0
.line 987
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeUInt64(IJ)V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/16 v0, 0xf
.line 1013
invoke-virtual {p0, v0}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->requireSpace(I)V
.line 1014
invoke-virtual {p0, p2, p3}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64(J)V
const/4 p2, 0x0
.line 1015
invoke-virtual {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeTag(II)V
return-void
.end method
.method public writeVarint32(I)V
.locals 1
and-int/lit8 v0, p1, -0x80
if-nez v0, :cond_0
.line 1139
invoke-direct {p0, p1}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32OneByte(I)V
goto :goto_0
:cond_0
and-int/lit16 v0, p1, -0x4000
if-nez v0, :cond_1
.line 1141
invoke-direct {p0, p1}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32TwoBytes(I)V
goto :goto_0
:cond_1
const/high16 v0, -0x200000
and-int/2addr v0, p1
if-nez v0, :cond_2
.line 1143
invoke-direct {p0, p1}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32ThreeBytes(I)V
goto :goto_0
:cond_2
const/high16 v0, -0x10000000
and-int/2addr v0, p1
if-nez v0, :cond_3
.line 1145
invoke-direct {p0, p1}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32FourBytes(I)V
goto :goto_0
.line 1147
:cond_3
invoke-direct {p0, p1}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint32FiveBytes(I)V
:goto_0
return-void
.end method
.method public writeVarint64(J)V
.locals 1
.line 1183
invoke-static {p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter;->access$200(J)B
move-result v0
packed-switch v0, :pswitch_data_0
goto :goto_0
.line 1212
:pswitch_0
invoke-direct {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64TenBytes(J)V
goto :goto_0
.line 1209
:pswitch_1
invoke-direct {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64NineBytes(J)V
goto :goto_0
.line 1206
:pswitch_2
invoke-direct {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64EightBytes(J)V
goto :goto_0
.line 1203
:pswitch_3
invoke-direct {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64SevenBytes(J)V
goto :goto_0
.line 1200
:pswitch_4
invoke-direct {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64SixBytes(J)V
goto :goto_0
.line 1197
:pswitch_5
invoke-direct {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64FiveBytes(J)V
goto :goto_0
.line 1194
:pswitch_6
invoke-direct {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64FourBytes(J)V
goto :goto_0
.line 1191
:pswitch_7
invoke-direct {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64ThreeBytes(J)V
goto :goto_0
.line 1188
:pswitch_8
invoke-direct {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64TwoBytes(J)V
goto :goto_0
.line 1185
:pswitch_9
invoke-direct {p0, p1, p2}, Landroidx/datastore/preferences/protobuf/BinaryWriter$SafeHeapWriter;->writeVarint64OneByte(J)V
:goto_0
return-void
:pswitch_data_0
.packed-switch 0x1
:pswitch_9
:pswitch_8
:pswitch_7
:pswitch_6
:pswitch_5
:pswitch_4
:pswitch_3
:pswitch_2
:pswitch_1
:pswitch_0
.end packed-switch
.end method