.class public final Lokhttp3/internal/http2/Hpack$Writer; .super Ljava/lang/Object; .source "Hpack.kt" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lokhttp3/internal/http2/Hpack; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = "Writer" .end annotation .annotation runtime Lkotlin/Metadata; bv = { 0x1, 0x0, 0x3 } d1 = { "\u0000B\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0008\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\u0008\u0008\n\u0002\u0010\u0002\n\u0002\u0008\u0008\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010 \n\u0002\u0008\u0005\u0018\u00002\u00020\u0001B#\u0008\u0007\u0012\u0008\u0008\u0002\u0010\u0002\u001a\u00020\u0003\u0012\u0008\u0008\u0002\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007\u00a2\u0006\u0002\u0010\u0008J\u0008\u0010\u0013\u001a\u00020\u0014H\u0002J\u0008\u0010\u0015\u001a\u00020\u0014H\u0002J\u0010\u0010\u0016\u001a\u00020\u00032\u0006\u0010\u0017\u001a\u00020\u0003H\u0002J\u0010\u0010\u0018\u001a\u00020\u00142\u0006\u0010\u0019\u001a\u00020\u000bH\u0002J\u000e\u0010\u001a\u001a\u00020\u00142\u0006\u0010\u0002\u001a\u00020\u0003J\u000e\u0010\u001b\u001a\u00020\u00142\u0006\u0010\u001c\u001a\u00020\u001dJ\u0014\u0010\u001e\u001a\u00020\u00142\u000c\u0010\u001f\u001a\u0008\u0012\u0004\u0012\u00020\u000b0 J\u001e\u0010!\u001a\u00020\u00142\u0006\u0010\"\u001a\u00020\u00032\u0006\u0010#\u001a\u00020\u00032\u0006\u0010$\u001a\u00020\u0003R\u001c\u0010\t\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u000b0\n8\u0006@\u0006X\u0087\u000e\u00a2\u0006\u0004\n\u0002\u0010\u000cR\u0012\u0010\r\u001a\u00020\u00038\u0006@\u0006X\u0087\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000e\u001a\u00020\u0005X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0012\u0010\u000f\u001a\u00020\u00038\u0006@\u0006X\u0087\u000e\u00a2\u0006\u0002\n\u0000R\u0012\u0010\u0002\u001a\u00020\u00038\u0006@\u0006X\u0087\u000e\u00a2\u0006\u0002\n\u0000R\u0012\u0010\u0010\u001a\u00020\u00038\u0006@\u0006X\u0087\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0011\u001a\u00020\u0003X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0012\u001a\u00020\u0003X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006%" } d2 = { "Lokhttp3/internal/http2/Hpack$Writer;", "", "headerTableSizeSetting", "", "useCompression", "", "out", "Lokio/Buffer;", "(IZLokio/Buffer;)V", "dynamicTable", "", "Lokhttp3/internal/http2/Header;", "[Lokhttp3/internal/http2/Header;", "dynamicTableByteCount", "emitDynamicTableSizeUpdate", "headerCount", "maxDynamicTableByteCount", "nextHeaderIndex", "smallestHeaderTableSizeSetting", "adjustDynamicTableByteCount", "", "clearDynamicTable", "evictToRecoverBytes", "bytesToRecover", "insertIntoDynamicTable", "entry", "resizeHeaderTable", "writeByteString", "data", "Lokio/ByteString;", "writeHeaders", "headerBlock", "", "writeInt", "value", "prefixMask", "bits", "okhttp" } k = 0x1 mv = { 0x1, 0x4, 0x0 } .end annotation # instance fields .field public dynamicTable:[Lokhttp3/internal/http2/Header; .field public dynamicTableByteCount:I .field private emitDynamicTableSizeUpdate:Z .field public headerCount:I .field public headerTableSizeSetting:I .field public maxDynamicTableByteCount:I .field private nextHeaderIndex:I .field private final out:Lokio/Buffer; .field private smallestHeaderTableSizeSetting:I .field private final useCompression:Z # direct methods .method public constructor (ILokio/Buffer;)V .locals 6 const/4 v2, 0x0 const/4 v4, 0x2 const/4 v5, 0x0 move-object v0, p0 move v1, p1 move-object v3, p2 invoke-direct/range {v0 .. v5}, Lokhttp3/internal/http2/Hpack$Writer;->(IZLokio/Buffer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V return-void .end method .method public constructor (IZLokio/Buffer;)V .locals 1 const-string v0, "out" invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 392 invoke-direct {p0}, Ljava/lang/Object;->()V iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerTableSizeSetting:I iput-boolean p2, p0, Lokhttp3/internal/http2/Hpack$Writer;->useCompression:Z iput-object p3, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer; const p2, 0x7fffffff iput p2, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I const/16 p1, 0x8 new-array p1, p1, [Lokhttp3/internal/http2/Header; iput-object p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; array-length p1, p1 add-int/lit8 p1, p1, -0x1 iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I return-void .end method .method public synthetic constructor (IZLokio/Buffer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V .locals 0 and-int/lit8 p5, p4, 0x1 if-eqz p5, :cond_0 const/16 p1, 0x1000 :cond_0 and-int/lit8 p4, p4, 0x2 if-eqz p4, :cond_1 const/4 p2, 0x1 .line 394 :cond_1 invoke-direct {p0, p1, p2, p3}, Lokhttp3/internal/http2/Hpack$Writer;->(IZLokio/Buffer;)V return-void .end method .method public constructor (Lokio/Buffer;)V .locals 6 const/4 v1, 0x0 const/4 v2, 0x0 const/4 v4, 0x3 const/4 v5, 0x0 move-object v0, p0 move-object v3, p1 invoke-direct/range {v0 .. v5}, Lokhttp3/internal/http2/Hpack$Writer;->(IZLokio/Buffer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V return-void .end method .method private final adjustDynamicTableByteCount()V .locals 2 iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I if-ge v0, v1, :cond_1 if-nez v0, :cond_0 .line 598 invoke-direct {p0}, Lokhttp3/internal/http2/Hpack$Writer;->clearDynamicTable()V goto :goto_0 :cond_0 sub-int/2addr v1, v0 .line 600 invoke-direct {p0, v1}, Lokhttp3/internal/http2/Hpack$Writer;->evictToRecoverBytes(I)I :cond_1 :goto_0 return-void .end method .method private final clearDynamicTable()V .locals 6 iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; const/4 v1, 0x0 const/4 v2, 0x0 const/4 v3, 0x0 const/4 v4, 0x6 const/4 v5, 0x0 .line 413 invoke-static/range {v0 .. v5}, Lkotlin/collections/ArraysKt;->fill$default([Ljava/lang/Object;Ljava/lang/Object;IIILjava/lang/Object;)V iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; .line 414 array-length v0, v0 add-int/lit8 v0, v0, -0x1 iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I const/4 v0, 0x0 iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I return-void .end method .method private final evictToRecoverBytes(I)I .locals 4 const/4 v0, 0x0 if-lez p1, :cond_1 iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; .line 425 array-length v1, v1 add-int/lit8 v1, v1, -0x1 :goto_0 iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I if-lt v1, v2, :cond_0 if-lez p1, :cond_0 iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; .line 427 aget-object v2, v2, v1 invoke-static {v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V iget v2, v2, Lokhttp3/internal/http2/Header;->hpackSize:I sub-int/2addr p1, v2 iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I iget-object v3, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; .line 428 aget-object v3, v3, v1 invoke-static {v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V iget v3, v3, Lokhttp3/internal/http2/Header;->hpackSize:I sub-int/2addr v2, v3 iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I add-int/lit8 v2, v2, -0x1 iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I add-int/lit8 v0, v0, 0x1 add-int/lit8 v1, v1, -0x1 goto :goto_0 :cond_0 iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; add-int/lit8 v1, v2, 0x1 add-int/lit8 v2, v2, 0x1 add-int/2addr v2, v0 iget v3, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I .line 433 invoke-static {p1, v1, p1, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I add-int/lit8 v2, v1, 0x1 add-int/lit8 v1, v1, 0x1 add-int/2addr v1, v0 const/4 v3, 0x0 .line 435 invoke-static {p1, v2, v1, v3}, Ljava/util/Arrays;->fill([Ljava/lang/Object;IILjava/lang/Object;)V iget p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I add-int/2addr p1, v0 iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I :cond_1 return v0 .end method .method private final insertIntoDynamicTable(Lokhttp3/internal/http2/Header;)V .locals 6 .line 442 iget v0, p1, Lokhttp3/internal/http2/Header;->hpackSize:I iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I if-le v0, v1, :cond_0 .line 446 invoke-direct {p0}, Lokhttp3/internal/http2/Hpack$Writer;->clearDynamicTable()V return-void :cond_0 iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I add-int/2addr v2, v0 sub-int/2addr v2, v1 .line 452 invoke-direct {p0, v2}, Lokhttp3/internal/http2/Hpack$Writer;->evictToRecoverBytes(I)I iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I add-int/lit8 v1, v1, 0x1 iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; .line 454 array-length v3, v2 if-le v1, v3, :cond_1 .line 455 array-length v1, v2 mul-int/lit8 v1, v1, 0x2 new-array v1, v1, [Lokhttp3/internal/http2/Header; .line 456 array-length v3, v2 array-length v4, v2 const/4 v5, 0x0 invoke-static {v2, v5, v1, v3, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; .line 457 array-length v2, v2 add-int/lit8 v2, v2, -0x1 iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I iput-object v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; :cond_1 iget v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I add-int/lit8 v2, v1, -0x1 iput v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; .line 461 aput-object p1, v2, v1 iget p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I add-int/lit8 p1, p1, 0x1 iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerCount:I iget p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I add-int/2addr p1, v0 iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTableByteCount:I return-void .end method # virtual methods .method public final resizeHeaderTable(I)V .locals 1 iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->headerTableSizeSetting:I const/16 v0, 0x4000 .line 582 invoke-static {p1, v0}, Ljava/lang/Math;->min(II)I move-result p1 iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I if-ne v0, p1, :cond_0 return-void :cond_0 if-ge p1, v0, :cond_1 iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I .line 588 invoke-static {v0, p1}, Ljava/lang/Math;->min(II)I move-result v0 iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I :cond_1 const/4 v0, 0x1 iput-boolean v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->emitDynamicTableSizeUpdate:Z iput p1, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I .line 592 invoke-direct {p0}, Lokhttp3/internal/http2/Hpack$Writer;->adjustDynamicTableByteCount()V return-void .end method .method public final writeByteString(Lokio/ByteString;)V .locals 4 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const-string v0, "data" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-boolean v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->useCompression:Z const/16 v1, 0x7f if-eqz v0, :cond_0 .line 568 sget-object v0, Lokhttp3/internal/http2/Huffman;->INSTANCE:Lokhttp3/internal/http2/Huffman; invoke-virtual {v0, p1}, Lokhttp3/internal/http2/Huffman;->encodedLength(Lokio/ByteString;)I move-result v0 invoke-virtual {p1}, Lokio/ByteString;->size()I move-result v2 if-ge v0, v2, :cond_0 .line 569 new-instance v0, Lokio/Buffer; invoke-direct {v0}, Lokio/Buffer;->()V .line 570 sget-object v2, Lokhttp3/internal/http2/Huffman;->INSTANCE:Lokhttp3/internal/http2/Huffman; move-object v3, v0 check-cast v3, Lokio/BufferedSink; invoke-virtual {v2, p1, v3}, Lokhttp3/internal/http2/Huffman;->encode(Lokio/ByteString;Lokio/BufferedSink;)V .line 571 invoke-virtual {v0}, Lokio/Buffer;->readByteString()Lokio/ByteString; move-result-object p1 .line 572 invoke-virtual {p1}, Lokio/ByteString;->size()I move-result v0 const/16 v2, 0x80 invoke-virtual {p0, v0, v1, v2}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V iget-object p0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer; .line 573 invoke-virtual {p0, p1}, Lokio/Buffer;->write(Lokio/ByteString;)Lokio/Buffer; goto :goto_0 .line 575 :cond_0 invoke-virtual {p1}, Lokio/ByteString;->size()I move-result v0 const/4 v2, 0x0 invoke-virtual {p0, v0, v1, v2}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V iget-object p0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer; .line 576 invoke-virtual {p0, p1}, Lokio/Buffer;->write(Lokio/ByteString;)Lokio/Buffer; :goto_0 return-void .end method .method public final writeHeaders(Ljava/util/List;)V .locals 13 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "Lokhttp3/internal/http2/Header;", ">;)V" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const-string v0, "headerBlock" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-boolean v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->emitDynamicTableSizeUpdate:Z const/4 v1, 0x0 if-eqz v0, :cond_1 iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I iget v2, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I const/16 v3, 0x20 const/16 v4, 0x1f if-ge v0, v2, :cond_0 .line 473 invoke-virtual {p0, v0, v4, v3}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V :cond_0 iput-boolean v1, p0, Lokhttp3/internal/http2/Hpack$Writer;->emitDynamicTableSizeUpdate:Z const v0, 0x7fffffff iput v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->smallestHeaderTableSizeSetting:I iget v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->maxDynamicTableByteCount:I .line 477 invoke-virtual {p0, v0, v4, v3}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V .line 480 :cond_1 invoke-interface {p1}, Ljava/util/List;->size()I move-result v0 move v2, v1 :goto_0 if-ge v2, v0, :cond_c .line 481 invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object; move-result-object v3 check-cast v3, Lokhttp3/internal/http2/Header; .line 482 iget-object v4, v3, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString; invoke-virtual {v4}, Lokio/ByteString;->toAsciiLowercase()Lokio/ByteString; move-result-object v4 .line 483 iget-object v5, v3, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString; .line 487 sget-object v6, Lokhttp3/internal/http2/Hpack;->INSTANCE:Lokhttp3/internal/http2/Hpack; invoke-virtual {v6}, Lokhttp3/internal/http2/Hpack;->getNAME_TO_FIRST_INDEX()Ljava/util/Map; move-result-object v6 invoke-interface {v6, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v6 check-cast v6, Ljava/lang/Integer; const/4 v7, -0x1 if-eqz v6, :cond_5 .line 489 invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I move-result v6 add-int/lit8 v8, v6, 0x1 const/4 v9, 0x2 if-le v9, v8, :cond_2 goto :goto_1 :cond_2 const/4 v9, 0x7 if-lt v9, v8, :cond_4 .line 495 sget-object v9, Lokhttp3/internal/http2/Hpack;->INSTANCE:Lokhttp3/internal/http2/Hpack; invoke-virtual {v9}, Lokhttp3/internal/http2/Hpack;->getSTATIC_HEADER_TABLE()[Lokhttp3/internal/http2/Header; move-result-object v9 aget-object v9, v9, v6 iget-object v9, v9, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString; invoke-static {v9, v5}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v9 if-eqz v9, :cond_3 move v6, v8 goto :goto_2 .line 497 :cond_3 sget-object v9, Lokhttp3/internal/http2/Hpack;->INSTANCE:Lokhttp3/internal/http2/Hpack; invoke-virtual {v9}, Lokhttp3/internal/http2/Hpack;->getSTATIC_HEADER_TABLE()[Lokhttp3/internal/http2/Header; move-result-object v9 aget-object v9, v9, v8 iget-object v9, v9, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString; invoke-static {v9, v5}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v9 if-eqz v9, :cond_4 add-int/lit8 v6, v6, 0x2 move v12, v8 move v8, v6 move v6, v12 goto :goto_2 :cond_4 :goto_1 move v6, v8 move v8, v7 goto :goto_2 :cond_5 move v6, v7 move v8, v6 :goto_2 if-ne v8, v7, :cond_8 iget v9, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I add-int/lit8 v9, v9, 0x1 iget-object v10, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; .line 504 array-length v10, v10 :goto_3 if-ge v9, v10, :cond_8 iget-object v11, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; .line 505 aget-object v11, v11, v9 invoke-static {v11}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V iget-object v11, v11, Lokhttp3/internal/http2/Header;->name:Lokio/ByteString; invoke-static {v11, v4}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v11 if-eqz v11, :cond_7 iget-object v11, p0, Lokhttp3/internal/http2/Hpack$Writer;->dynamicTable:[Lokhttp3/internal/http2/Header; .line 506 aget-object v11, v11, v9 invoke-static {v11}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V iget-object v11, v11, Lokhttp3/internal/http2/Header;->value:Lokio/ByteString; invoke-static {v11, v5}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v11 if-eqz v11, :cond_6 iget v8, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I sub-int/2addr v9, v8 .line 507 sget-object v8, Lokhttp3/internal/http2/Hpack;->INSTANCE:Lokhttp3/internal/http2/Hpack; invoke-virtual {v8}, Lokhttp3/internal/http2/Hpack;->getSTATIC_HEADER_TABLE()[Lokhttp3/internal/http2/Header; move-result-object v8 array-length v8, v8 add-int/2addr v8, v9 goto :goto_4 :cond_6 if-ne v6, v7, :cond_7 iget v6, p0, Lokhttp3/internal/http2/Hpack$Writer;->nextHeaderIndex:I sub-int v6, v9, v6 .line 510 sget-object v11, Lokhttp3/internal/http2/Hpack;->INSTANCE:Lokhttp3/internal/http2/Hpack; invoke-virtual {v11}, Lokhttp3/internal/http2/Hpack;->getSTATIC_HEADER_TABLE()[Lokhttp3/internal/http2/Header; move-result-object v11 array-length v11, v11 add-int/2addr v6, v11 :cond_7 add-int/lit8 v9, v9, 0x1 goto :goto_3 :cond_8 :goto_4 if-eq v8, v7, :cond_9 const/16 v3, 0x7f const/16 v4, 0x80 .line 519 invoke-virtual {p0, v8, v3, v4}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V goto :goto_5 :cond_9 const/16 v8, 0x40 if-ne v6, v7, :cond_a iget-object v6, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer; .line 523 invoke-virtual {v6, v8}, Lokio/Buffer;->writeByte(I)Lokio/Buffer; .line 524 invoke-virtual {p0, v4}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V .line 525 invoke-virtual {p0, v5}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V .line 526 invoke-direct {p0, v3}, Lokhttp3/internal/http2/Hpack$Writer;->insertIntoDynamicTable(Lokhttp3/internal/http2/Header;)V goto :goto_5 .line 528 :cond_a sget-object v7, Lokhttp3/internal/http2/Header;->PSEUDO_PREFIX:Lokio/ByteString; invoke-virtual {v4, v7}, Lokio/ByteString;->startsWith(Lokio/ByteString;)Z move-result v7 if-eqz v7, :cond_b sget-object v7, Lokhttp3/internal/http2/Header;->TARGET_AUTHORITY:Lokio/ByteString; invoke-static {v7, v4}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v4 xor-int/lit8 v4, v4, 0x1 if-eqz v4, :cond_b const/16 v3, 0xf .line 531 invoke-virtual {p0, v6, v3, v1}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V .line 532 invoke-virtual {p0, v5}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V goto :goto_5 :cond_b const/16 v4, 0x3f .line 536 invoke-virtual {p0, v6, v4, v8}, Lokhttp3/internal/http2/Hpack$Writer;->writeInt(III)V .line 537 invoke-virtual {p0, v5}, Lokhttp3/internal/http2/Hpack$Writer;->writeByteString(Lokio/ByteString;)V .line 538 invoke-direct {p0, v3}, Lokhttp3/internal/http2/Hpack$Writer;->insertIntoDynamicTable(Lokhttp3/internal/http2/Header;)V :goto_5 add-int/lit8 v2, v2, 0x1 goto/16 :goto_0 :cond_c return-void .end method .method public final writeInt(III)V .locals 1 if-ge p1, p2, :cond_0 iget-object p0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer; or-int/2addr p1, p3 .line 549 invoke-virtual {p0, p1}, Lokio/Buffer;->writeByte(I)Lokio/Buffer; return-void :cond_0 iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer; or-int/2addr p3, p2 .line 554 invoke-virtual {v0, p3}, Lokio/Buffer;->writeByte(I)Lokio/Buffer; sub-int/2addr p1, p2 :goto_0 const/16 p2, 0x80 if-lt p1, p2, :cond_1 and-int/lit8 p3, p1, 0x7f iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer; or-int/2addr p2, p3 .line 560 invoke-virtual {v0, p2}, Lokio/Buffer;->writeByte(I)Lokio/Buffer; ushr-int/lit8 p1, p1, 0x7 goto :goto_0 :cond_1 iget-object p0, p0, Lokhttp3/internal/http2/Hpack$Writer;->out:Lokio/Buffer; .line 563 invoke-virtual {p0, p1}, Lokio/Buffer;->writeByte(I)Lokio/Buffer; return-void .end method