.class final Lcom/a/a/ad;
.super Lcom/a/a/ae;


# instance fields
.field a:B

.field b:Lcom/a/a/a/d;


# direct methods
.method public constructor <init>(BLcom/a/a/a/d;)V
    .locals 1

    const/4 v0, 0x1

    invoke-direct {p0, v0}, Lcom/a/a/ae;-><init>(I)V

    iput-byte p1, p0, Lcom/a/a/ad;->a:B

    iput-object p2, p0, Lcom/a/a/ad;->b:Lcom/a/a/a/d;

    return-void
.end method


# virtual methods
.method public final a(Lcom/a/a/q;Lcom/a/a/o;)Lcom/a/a/ae;
    .locals 7

    const/4 v1, 0x1

    const/4 v3, 0x0

    new-instance v5, Lcom/a/a/o;

    invoke-direct {v5}, Lcom/a/a/o;-><init>()V

    move v0, v1

    :goto_0
    invoke-virtual {p2}, Lcom/a/a/o;->n()I

    move-result v2

    if-lez v2, :cond_3

    invoke-virtual {p2}, Lcom/a/a/o;->m()Ljava/nio/ByteBuffer;

    move-result-object v6

    invoke-virtual {v6}, Ljava/nio/ByteBuffer;->mark()Ljava/nio/Buffer;

    move v2, v3

    :goto_1
    invoke-virtual {v6}, Ljava/nio/ByteBuffer;->remaining()I

    move-result v4

    if-lez v4, :cond_2

    invoke-virtual {v6}, Ljava/nio/ByteBuffer;->get()B

    move-result v0

    iget-byte v4, p0, Lcom/a/a/ad;->a:B

    if-ne v0, v4, :cond_0

    move v4, v1

    :goto_2
    if-nez v4, :cond_1

    add-int/lit8 v0, v2, 0x1

    move v2, v0

    move v0, v4

    goto :goto_1

    :cond_0
    move v4, v3

    goto :goto_2

    :cond_1
    move v0, v4

    :cond_2
    invoke-virtual {v6}, Ljava/nio/ByteBuffer;->reset()Ljava/nio/Buffer;

    if-eqz v0, :cond_5

    invoke-virtual {p2, v6}, Lcom/a/a/o;->c(Ljava/nio/ByteBuffer;)V

    invoke-virtual {p2, v5, v2}, Lcom/a/a/o;->a(Lcom/a/a/o;I)V

    invoke-virtual {p2}, Lcom/a/a/o;->a()B

    :cond_3
    iget-object v1, p0, Lcom/a/a/ad;->b:Lcom/a/a/a/d;

    invoke-interface {v1, p1, v5}, Lcom/a/a/a/d;->a(Lcom/a/a/q;Lcom/a/a/o;)V

    if-eqz v0, :cond_4

    const/4 p0, 0x0

    :cond_4
    return-object p0

    :cond_5
    invoke-virtual {v5, v6}, Lcom/a/a/o;->b(Ljava/nio/ByteBuffer;)Lcom/a/a/o;

    goto :goto_0
.end method
